Guest User

Untitled

a guest
Feb 16th, 2013
41
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Mod by artur99
  2. --Started working on 2.16.2013
  3. --Version:0.1
  4.  
  5. minetest.register_node("secret:chestwood", { description = "name",
  6. tiles = {"1.png"},
  7. inventory_image = {"1.png",}
  8. groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,crumbly=3},
  9. on_construct = function(pos)
  10. local meta = minetest.env:get_meta(pos)
  11. meta:set_string("formspec",
  12. "size[8,9]"..
  13. "list[current_name;main;0,0;8,4;]"..
  14. "list[current_player;main;0,5;8,4;]")
  15. meta:set_string("infotext", "Chest")
  16. local inv = meta:get_inventory()
  17. inv:set_size("main", 8*4)
  18. end,
  19. can_dig = function(pos,player)
  20. local meta = minetest.env:get_meta(pos);
  21. local inv = meta:get_inventory()
  22. return inv:is_empty("main")
  23. end,
  24.  
  25.  
  26. on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
  27. minetest.log("action", player:get_player_name()..
  28. " moves stuff in chest at "..minetest.pos_to_string(pos))
  29. end,
  30.  
  31.  
  32. on_metadata_inventory_put = function(pos, listname, index, stack, player)
  33. minetest.log("action", player:get_player_name()..
  34. " moves stuff to chest at "..minetest.pos_to_string(pos))
  35. end,
  36. on_metadata_inventory_take = function(pos, listname, index, stack, player)
  37. minetest.log("action", player:get_player_name()..
  38. " takes stuff from chest at "..minetest.pos_to_string(pos))
  39. end,
  40. })
  41.  
  42.  
  43.  
  44.  
  45. minetest.register_craft({
  46. output = 'secret:chestwood',
  47. recipe = {
  48. {'default:chest', '', 'default:chest'},
  49. {'', 'default:glass', ''},
  50. {'default:chest', '', 'default:chest'},
  51. }
  52. })
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

Ă—