init.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. -- legacy (Minetest 0.4 mod)
  2. -- Provides as much backwards-compatibility as feasible
  3. --
  4. -- Aliases to support loading 0.3 and old 0.4 worlds and inventories
  5. --
  6. minetest.register_alias("stone", "default:stone")
  7. minetest.register_alias("stone_with_coal", "default:stone_with_coal")
  8. minetest.register_alias("stone_with_iron", "default:stone_with_iron")
  9. minetest.register_alias("dirt_with_grass", "default:dirt_with_grass")
  10. minetest.register_alias("dirt_with_grass_footsteps", "default:dirt_with_grass_footsteps")
  11. minetest.register_alias("dirt", "default:dirt")
  12. minetest.register_alias("sand", "default:sand")
  13. minetest.register_alias("gravel", "default:gravel")
  14. minetest.register_alias("sandstone", "default:sandstone")
  15. minetest.register_alias("clay", "default:clay")
  16. minetest.register_alias("brick", "default:brick")
  17. minetest.register_alias("tree", "default:tree")
  18. minetest.register_alias("jungletree", "default:jungletree")
  19. minetest.register_alias("junglegrass", "default:junglegrass")
  20. minetest.register_alias("leaves", "default:leaves")
  21. minetest.register_alias("cactus", "default:cactus")
  22. minetest.register_alias("papyrus", "default:papyrus")
  23. minetest.register_alias("bookshelf", "default:bookshelf")
  24. minetest.register_alias("glass", "default:glass")
  25. minetest.register_alias("wooden_fence", "default:fence_wood")
  26. minetest.register_alias("rail", "default:rail")
  27. minetest.register_alias("ladder", "default:ladder")
  28. minetest.register_alias("wood", "default:wood")
  29. minetest.register_alias("mese", "default:mese")
  30. minetest.register_alias("cloud", "default:cloud")
  31. minetest.register_alias("water_flowing", "default:water_flowing")
  32. minetest.register_alias("water_source", "default:water_source")
  33. minetest.register_alias("lava_flowing", "default:lava_flowing")
  34. minetest.register_alias("lava_source", "default:lava_source")
  35. minetest.register_alias("torch", "default:torch")
  36. minetest.register_alias("sign_wall", "default:sign_wall")
  37. minetest.register_alias("furnace", "default:furnace")
  38. minetest.register_alias("chest", "default:chest")
  39. minetest.register_alias("locked_chest", "default:chest_locked")
  40. minetest.register_alias("cobble", "default:cobble")
  41. minetest.register_alias("mossycobble", "default:mossycobble")
  42. minetest.register_alias("steelblock", "default:steelblock")
  43. minetest.register_alias("nyancat", "default:nyancat")
  44. minetest.register_alias("nyancat_rainbow", "default:nyancat_rainbow")
  45. minetest.register_alias("sapling", "default:sapling")
  46. minetest.register_alias("apple", "default:apple")
  47. minetest.register_alias("WPick", "default:pick_wood")
  48. minetest.register_alias("STPick", "default:pick_stone")
  49. minetest.register_alias("SteelPick", "default:pick_steel")
  50. minetest.register_alias("MesePick", "default:pick_mese")
  51. minetest.register_alias("WShovel", "default:shovel_wood")
  52. minetest.register_alias("STShovel", "default:shovel_stone")
  53. minetest.register_alias("SteelShovel", "default:shovel_steel")
  54. minetest.register_alias("WAxe", "default:axe_wood")
  55. minetest.register_alias("STAxe", "default:axe_stone")
  56. minetest.register_alias("SteelAxe", "default:axe_steel")
  57. minetest.register_alias("WSword", "default:sword_wood")
  58. minetest.register_alias("STSword", "default:sword_stone")
  59. minetest.register_alias("SteelSword", "default:sword_steel")
  60. minetest.register_alias("Stick", "default:stick")
  61. minetest.register_alias("paper", "default:paper")
  62. minetest.register_alias("book", "default:book")
  63. minetest.register_alias("lump_of_coal", "default:coal_lump")
  64. minetest.register_alias("lump_of_iron", "default:iron_lump")
  65. minetest.register_alias("lump_of_clay", "default:clay_lump")
  66. minetest.register_alias("steel_ingot", "default:steel_ingot")
  67. minetest.register_alias("clay_brick", "default:clay_brick")
  68. minetest.register_alias("scorched_stuff", "default:scorched_stuff")
  69. --
  70. -- Old items
  71. --
  72. minetest.register_craftitem(":rat", {
  73. description = "Rat",
  74. inventory_image = "rat.png",
  75. on_drop = function(item, dropper, pos)
  76. item:take_item()
  77. return item
  78. end,
  79. on_place = function(item, dropped, pointed)
  80. pos = minetest.get_pointed_thing_position(pointed, true)
  81. if pos ~= nil then
  82. item:take_item()
  83. return item
  84. end
  85. end
  86. })
  87. minetest.register_craftitem(":cooked_rat", {
  88. description = "Cooked rat",
  89. inventory_image = "cooked_rat.png",
  90. on_use = minetest.item_eat(6),
  91. })
  92. minetest.register_craftitem(":firefly", {
  93. description = "Firefly",
  94. inventory_image = "firefly.png",
  95. on_drop = function(item, dropper, pos)
  96. item:take_item()
  97. return item
  98. end,
  99. on_place = function(item, dropped, pointed)
  100. pos = minetest.get_pointed_thing_position(pointed, true)
  101. if pos ~= nil then
  102. item:take_item()
  103. return item
  104. end
  105. end
  106. })
  107. minetest.register_craft({
  108. type = "cooking",
  109. output = "cooked_rat",
  110. recipe = "rat",
  111. })
  112. minetest.register_craft({
  113. type = "cooking",
  114. output = "scorched_stuff",
  115. recipe = "cooked_rat",
  116. })
  117. -- END