Make falling anvils crush some nodes

This commit is contained in:
Wuzzy 2017-11-27 07:57:02 +01:00
parent c6016c2053
commit f9a2607200
3 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times
### Groups for interactions ### Groups for interactions
* `crush_after_fall=1`: For falling nodes. These will crush whatever they hit after falling, not dropping as an item
* `dig_by_water=1`: Blocks with this group will drop when they are near flowing water * `dig_by_water=1`: Blocks with this group will drop when they are near flowing water
* `destroy_by_lava_flow=1`: Blocks with this group will be destroyed by flowing lava * `destroy_by_lava_flow=1`: Blocks with this group will be destroyed by flowing lava
* `dig_by_piston=1`: Blocks which will drop as an item when pushed by a piston. They also cannot be pulled by sticky pistons * `dig_by_piston=1`: Blocks which will drop as an item when pushed by a piston. They also cannot be pulled by sticky pistons

View File

@ -92,7 +92,7 @@ minetest.register_entity(":__builtin:falling_node", {
if n2.name == "mcl_portals:portal_end" then if n2.name == "mcl_portals:portal_end" then
-- TODO: Teleport falling node. -- TODO: Teleport falling node.
elseif nd and nd.buildable_to == true then elseif (nd and nd.buildable_to == true) or minetest.get_item_group(self.node.name, "crush_after_fall") ~= 0 then
-- Replace destination node if it's buildable to -- Replace destination node if it's buildable to
minetest.remove_node(np) minetest.remove_node(np)
-- Run script hook -- Run script hook

View File

@ -1,5 +1,5 @@
local anvildef = { local anvildef = {
groups = {pickaxey=1, falling_node=1, deco_block=1, anvil=1}, groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, anvil=1},
tiles = {"mcl_anvils_anvil_top_damaged_0.png^[transformR90", "mcl_anvils_anvil_base.png", "mcl_anvils_anvil_side.png"}, tiles = {"mcl_anvils_anvil_top_damaged_0.png^[transformR90", "mcl_anvils_anvil_base.png", "mcl_anvils_anvil_side.png"},
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,