forked from MineClone5/MineClone5
Make falling anvils crush some nodes
This commit is contained in:
parent
c6016c2053
commit
f9a2607200
|
@ -29,6 +29,7 @@ Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times
|
|||
|
||||
### 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
|
||||
* `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
|
||||
|
|
|
@ -92,7 +92,7 @@ minetest.register_entity(":__builtin:falling_node", {
|
|||
if n2.name == "mcl_portals:portal_end" then
|
||||
-- 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
|
||||
minetest.remove_node(np)
|
||||
-- Run script hook
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
|
|
Loading…
Reference in New Issue