init.lua 713 B

1234567891011121314151617181920
  1. -- Sticky blocks can be used together with pistons or movestones to push / pull
  2. -- structures that are "glued" together using sticky blocks
  3. -- All sides sticky block
  4. minetest.register_node("mesecons_stickyblocks:sticky_block_all", {
  5. -- TODO: Rename to “All-Faces Sticky Block” when other sticky blocks become available
  6. description = "Sticky Block",
  7. tiles = {"mesecons_stickyblocks_sticky.png"},
  8. is_ground_content = false,
  9. groups = {choppy=3, oddly_breakable_by_hand=2},
  10. mvps_sticky = function (pos, node)
  11. local connected = {}
  12. for _, r in ipairs(mesecon.rules.alldirs) do
  13. table.insert(connected, vector.add(pos, r))
  14. end
  15. return connected
  16. end,
  17. sounds = default.node_sound_wood_defaults(),
  18. })