ITEMS/mcl_end: Make dragon egg teleport on punching #119

Merged
erlehmann merged 1 commits from dragon-egg-teleport into master 2021-07-13 10:02:13 +02:00
Owner
Problem

TRACKING ISSUE: #112

In Minecraft, dragon eggs can not be picked up by punching them. Instead, they teleport.

Solution

This patch adds an on_punch handler to the mcl_end:dragon_egg node.

The on_punch handler seeks an air node nearby and teleports the dragon egg there.

Details

This patch is a cherry-pick of MineClone2 commit f65c40f805a7d9311519755a22725c5f4bfb38c9.

Testing Steps
Verify Bug
  1. In Mineclonia commit 9f086a9242, create new world with map generator v7 and the seed dragonegg.
  2. Enter the new world.
  3. Execute the following commands:
    • /grantme give
    • /giveme mcl_end:dragon_egg
  4. Verify that you have a dragon egg in your inventory.
  5. Place the dragon egg.
  6. Verify that you have no dragon egg in your inventory.
  7. Punch the dragon egg until it breaks.
  8. Verify the dragon egg drops a dragon egg item.
  9. Pick up the dragon egg item.
  10. Verify that you have a dragon egg in your inventory.
Verify Patch
  1. In Mineclonia commit 920ca96764, create new world with map generator v7 and the seed dragonegg.
  2. Enter the new world.
  3. Execute the following commands:
    • /grantme give
    • /giveme mcl_end:dragon_egg
    • /giveme mcl_torches:torch
    • /giveme mesecons_pistons:piston_normal_off
    • /giveme mesecons_button:button_wood_off
  4. Verify that you have a dragon egg, a torch, a piston, a wood button in your inventory.
  5. Place the dragon egg.
  6. Verify that you have no dragon egg in your inventory.
  7. Punch the dragon egg.
  8. Verify the dragon egg drops no dragon egg item.
  9. Verify the dragon egg teleports to somewhere near.
  10. Verify the dragon egg falls to the ground.
  11. Place a torch two nodes under the dragon egg, with a solid node between the dragon egg and the torch.
  12. Dig the solid node under the dragon egg.
  13. Verify that the dragon egg falls.
  14. Verify that the dragon egg turns into a dragon egg item once it hits the torch.
  15. Pick up the dragon egg item.
  16. Verify that you have a dragon egg in your inventory.
  17. Place the dragon egg.
  18. Verify that you have no dragon egg in your inventory.
  19. Place the piston so it faces the dragon egg.
  20. Place the wood button next to the piston.
  21. Press the wood button.
  22. Verify that the dragon egg turns into a dragon egg item once it is pushed.
  23. Pick up the dragon egg item.
  24. Verify that you have a dragon egg in your inventory.
To do
  • Fill out PR template
  • Create testing instructions
  • Validate testing instructions
##### Problem TRACKING ISSUE: https://git.minetest.land/Mineclonia/Mineclonia/issues/112 In Minecraft, dragon eggs can not be picked up by punching them. Instead, they teleport. ##### Solution This patch adds an `on_punch` handler to the `mcl_end:dragon_egg` node. The `on_punch` handler seeks an air node nearby and teleports the dragon egg there. ##### Details This patch is a cherry-pick of MineClone2 commit f65c40f805a7d9311519755a22725c5f4bfb38c9. ##### Testing Steps ###### Verify Bug 1. In Mineclonia commit 9f086a9242292be1044ee128ff9d54ce2fad3c07, create new world with map generator v7 and the seed `dragonegg`. 2. Enter the new world. 3. Execute the following commands: - /grantme give - /giveme mcl_end:dragon_egg 4. Verify that you have a dragon egg in your inventory. 5. Place the dragon egg. 6. Verify that you have no dragon egg in your inventory. 7. Punch the dragon egg until it breaks. 8. Verify the dragon egg drops a dragon egg item. 9. Pick up the dragon egg item. 10. Verify that you have a dragon egg in your inventory. ###### Verify Patch 1. In Mineclonia commit 920ca9676461b68b835313e274271e83c6fc623a, create new world with map generator v7 and the seed `dragonegg`. 2. Enter the new world. 3. Execute the following commands: - /grantme give - /giveme mcl_end:dragon_egg - /giveme mcl_torches:torch - /giveme mesecons_pistons:piston_normal_off - /giveme mesecons_button:button_wood_off 4. Verify that you have a dragon egg, a torch, a piston, a wood button in your inventory. 5. Place the dragon egg. 6. Verify that you have no dragon egg in your inventory. 7. Punch the dragon egg. 7. Verify the dragon egg drops no dragon egg item. 8. Verify the dragon egg teleports to somewhere near. 9. Verify the dragon egg falls to the ground. 10. Place a torch two nodes under the dragon egg, with a solid node between the dragon egg and the torch. 11. Dig the solid node under the dragon egg. 12. Verify that the dragon egg falls. 13. Verify that the dragon egg turns into a dragon egg item once it hits the torch. 14. Pick up the dragon egg item. 15. Verify that you have a dragon egg in your inventory. 16. Place the dragon egg. 16. Verify that you have no dragon egg in your inventory. 17. Place the piston so it faces the dragon egg. 18. Place the wood button next to the piston. 19. Press the wood button. 13. Verify that the dragon egg turns into a dragon egg item once it is pushed. 22. Pick up the dragon egg item. 23. Verify that you have a dragon egg in your inventory. ##### To do - [x] Fill out PR template - [x] Create testing instructions - [x] Validate testing instructions
erlehmann force-pushed dragon-egg-teleport from e445a82bec to 920ca96764 2021-07-13 09:13:03 +02:00 Compare
e approved these changes 2021-07-13 10:00:36 +02:00
e left a comment
Member
  • In Mineclonia commit 9f086a9242, create new world with map generator v7 and the seed dragonegg.
    NB: Using 920ca96764, current HEAD for this PR
  • Enter the new world.
  • Execute the following commands:
        /grantme give
        /giveme mcl_end:dragon_egg
        /giveme mcl_torches:torch
        /giveme mesecons_pistons:piston_normal_off
        /giveme mesecons_button:button_wood_off
  • Verify that you have a dragon egg, a torch, a piston, a wood button in your inventory.
  • Place the dragon egg.
  • Verify that you have no dragon egg in your inventory.
  • Punch the dragon egg.
  • Verify the dragon egg drops no dragon egg item.
  • Verify the dragon egg teleports to somewhere near.
  • Verify the dragon egg falls to the ground.
  • Place a torch two nodes under the dragon egg, with a solid node between the dragon egg and the torch.
  • Dig the solid node under the dragon egg.
  • Verify that the dragon egg falls.
  • Verify that the dragon egg turns into a dragon egg item once it hits the torch.
  • Pick up the dragon egg item.
  • Verify that you have a dragon egg in your inventory.
  • Place the dragon egg.
  • Verify that you have no dragon egg in your inventory.
  • Place the piston so it faces the dragon egg.
  • Place the wood button next to the piston.
  • Press the wood button.
  • Verify that the dragon egg turns into a dragon egg item once it is pushed.
  • Pick up the dragon egg item.
  • Verify that you have a dragon egg in your inventory.
- [x] In Mineclonia commit 9f086a9242, create new world with map generator v7 and the seed dragonegg. **NB: Using 920ca9676461b68b835313e274271e83c6fc623a, current HEAD for this PR** - [x] Enter the new world. - [x] Execute the following commands: ``` /grantme give /giveme mcl_end:dragon_egg /giveme mcl_torches:torch /giveme mesecons_pistons:piston_normal_off /giveme mesecons_button:button_wood_off ``` - [x] Verify that you have a dragon egg, a torch, a piston, a wood button in your inventory. - [x] Place the dragon egg. - [x] Verify that you have no dragon egg in your inventory. - [x] Punch the dragon egg. - [x] Verify the dragon egg drops no dragon egg item. - [x] Verify the dragon egg teleports to somewhere near. - [x] Verify the dragon egg falls to the ground. - [x] Place a torch two nodes under the dragon egg, with a solid node between the dragon egg and the torch. - [x] Dig the solid node under the dragon egg. - [x] Verify that the dragon egg falls. - [x] Verify that the dragon egg turns into a dragon egg item once it hits the torch. - [x] Pick up the dragon egg item. - [x] Verify that you have a dragon egg in your inventory. - [x] Place the dragon egg. - [x] Verify that you have no dragon egg in your inventory. - [x] Place the piston so it faces the dragon egg. - [x] Place the wood button next to the piston. - [x] Press the wood button. - [x] Verify that the dragon egg turns into a dragon egg item once it is pushed. - [x] Pick up the dragon egg item. - [x] Verify that you have a dragon egg in your inventory.
erlehmann merged commit 6219e8ae12 into master 2021-07-13 10:02:13 +02:00
erlehmann deleted branch dragon-egg-teleport 2021-07-13 10:11:15 +02:00
This repo is archived. You cannot comment on pull requests.
No description provided.