init.lua 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. default = default or {}
  2. utility = utility or {}
  3. utility.modpath = minetest.get_modpath("utility")
  4. -- Localize for performance.
  5. local vector_round = vector.round
  6. local math_floor = math.floor
  7. local math_random = math.random
  8. -- Dummy function.
  9. fireambiance = {}
  10. function fireambiance.on_flame_addremove(pos)
  11. end
  12. function utility.trim_remove_special_chars(msg)
  13. local sub = string.gsub
  14. msg = sub(msg, "%z", "") -- Zero byte.
  15. msg = sub(msg, "%c", "") -- Control bytes.
  16. -- Trim whitespace.
  17. msg = sub(msg, "^%s+", "")
  18. msg = sub(msg, "%s+$", "")
  19. return msg
  20. end
  21. -- `level = 0/1, snappy = 3` enables quick digging via shears.
  22. -- Otherwise item cannot be dug by shears at all.
  23. --
  24. -- The 'hand' only digs items `level = 0` or `level = 1`, with some additional
  25. -- restrictions. See tool-data file for details.
  26. --
  27. -- Important/hard-to-craft nodes should be level 0 (like machines) otherwise
  28. -- player will lose the item if dug with a tool without a high enough level.
  29. --
  30. -- Shears only dig nodes with `level = 0/1, snappy = 3`.
  31. --
  32. -- `oddly_breakable_by_hand` only works if `level = 0/1`. HOWEVER, node drops
  33. -- can ONLY be obtained if the node's level is 0! Level 1 nodes may be dug if
  34. -- they're `oddly_breakable_by_hand`, but the player won't get the drops.
  35. --
  36. -- Base hardness for regular stone is `level = 2, cracky = 2`. Cobble is at
  37. -- `level = 1, cracky = 3`. These are both carefully tuned to allow new players
  38. -- to advance: wooden pick digs cobble to make stone pick, and a stone pick is
  39. -- able to dig regular stone. All other rocks/stones in the game should have
  40. -- their hardness calculated around regular stone/cobble.
  41. --
  42. -- The base hardness for tree trunks is `level = 2, choppy = 2`. Wood is
  43. -- calculated at `level = 2, choppy = 3`. All other wooden nodes should be
  44. -- calculated around these two.
  45. local dig_groups = {}
  46. -- Special undiggable group.
  47. dig_groups["ignore"] = {}
  48. -- Cracky stuff (stones/rocks/minerals).
  49. dig_groups["stone"] = {level = 2, cracky = 2} -- Carefully tuned dig-params! Do not modify.
  50. dig_groups["softstone"] = {level = 2, cracky = 3} -- Like sandstone.
  51. dig_groups["cobble"] = {level = 1, cracky = 3} -- Must be `cracky=3` otherwise cannot be dug by wooden pick.
  52. dig_groups["softcobble"] = {level = 1, cracky = 3, crumbly = 1} -- Can be dug by wodden pick.
  53. dig_groups["clay"] = {level = 0, cracky = 2, crumbly = 2}
  54. dig_groups["hardore"] = {level = 2, cracky = 1}
  55. dig_groups["hardclay"] = {level = 1, cracky = 2}
  56. dig_groups["ice"] = {level = 0, cracky = 2}
  57. dig_groups["hardice"] = {level = 1, cracky = 1}
  58. dig_groups["glass"] = {level = 1, cracky = 3}
  59. dig_groups["netherack"] = {level = 1, cracky = 3, oddly_breakable_by_hand = 1} -- Easiest thing to dig, practically!
  60. dig_groups["mineral"] = {level = 2, cracky = 3}
  61. dig_groups["hardmineral"] = {level = 2, cracky = 1}
  62. dig_groups["obsidian"] = {level = 3, cracky = 1} -- Obsidian, etc. Hardest possible.
  63. dig_groups["hardstone"] = {level = 3, cracky = 2} -- Granites, marbles.
  64. dig_groups["crystal"] = {level = 2, cracky = 3}
  65. -- Cracky stuff (building blocks/walls/bricks/etc).
  66. dig_groups["wall"] = {level = 1, cracky = 2}
  67. dig_groups["brick"] = {level = 1, cracky = 1}
  68. dig_groups["block"] = {level = 1, cracky = 1} -- Stone blocks, metal blocks, etc.
  69. -- Crumbly stuff (loose earth material).
  70. dig_groups["gravel"] = {level = 2, crumbly = 2} -- Cannot be dug by hand (level 1).
  71. dig_groups["dirt"] = {level = 2, crumbly = 3}
  72. dig_groups["sand"] = {level = 1, crumbly = 2}
  73. dig_groups["snow"] = {level = 0, crumbly = 3, oddly_breakable_by_hand = 3}
  74. dig_groups["mud"] = {level = 0, crumbly = 3, oddly_breakable_by_hand = 1}
  75. dig_groups["racksand"] = {level = 2, crumbly = 3}
  76. -- Choppy stuff (trees/wood).
  77. dig_groups["tree"] = {level = 2, choppy = 2} -- Carefully tuned dig-params! Do not change.
  78. dig_groups["deadtree"] = {level = 0, choppy = 2, oddly_breakable_by_hand = 1}
  79. dig_groups["wood"] = {level = 2, choppy = 3} -- Also wooden 'blocklike'. Planks & stuff.
  80. dig_groups["nyan"] = {level = 3, choppy = 1}
  81. -- Choppy stuff (crafted building materials).
  82. dig_groups["hardwood"] = {level = 1, choppy = 1}
  83. dig_groups["softwood"] = {level = 1, choppy = 3} -- Cactus, etc.
  84. -- Snappy stuff (plants/crops/leaves).
  85. -- Plants/crops can be dug by hand, but leaves cannot without proper tool.
  86. -- Addendum: player can dig leaves by hand but won't get drops.
  87. dig_groups["leaves"] = {level = 1, snappy = 3, choppy = 2, oddly_breakable_by_hand = 1} -- Must be `snappy=3` otherwise shears won't work.
  88. dig_groups["seeds"] = {level = 1, snappy = 2, oddly_breakable_by_hand = 3}
  89. dig_groups["plant"] = {level = 0, snappy = 3, choppy = 2} -- Must be `snappy=3` otherwise shears won't work.
  90. dig_groups["crop"] = {level = 0, snappy = 3, choppy = 2} -- Ditto ^^^. Also diggable by hand.
  91. dig_groups["straw"] = {level = 1, snappy = 2, choppy = 1, oddly_breakable_by_hand = 1}
  92. dig_groups["shroom"] = {level = 1, snappy = 2, choppy = 3, oddly_breakable_by_hand = 1}
  93. -- Misc items (items/machines/furniture/etc).
  94. dig_groups["wool"] = {level = 1, snappy = 3, choppy = 3}
  95. dig_groups["pane_wood"] = {level = 1, choppy = 3}
  96. dig_groups["pane_metal"] = {level = 1, cracky = 2}
  97. dig_groups["pane_glass"] = {level = 1, cracky = 3}
  98. dig_groups["fence_metal"] = {level = 1, cracky = 2}
  99. dig_groups["fence_wood"] = {level = 1, choppy = 2}
  100. dig_groups["furniture"] = {level = 0, snappy = 1, choppy = 3, oddly_breakable_by_hand = 3}
  101. dig_groups["item"] = {level = 0, dig_immediate = 3}
  102. dig_groups["bigitem"] = {level = 0, dig_immediate = 2}
  103. dig_groups["door_metal"] = {level = 1, cracky = 1}
  104. dig_groups["door_glass"] = {level = 1, cracky = 2}
  105. dig_groups["door_wood"] = {level = 1, choppy = 2}
  106. dig_groups["door_woodglass"]= {level = 1, choppy = 1}
  107. dig_groups["door_stone"] = {level = 1, cracky = 1}
  108. dig_groups["scaffolding"] = {level = 0, dig_immediate = 2}
  109. dig_groups["chest"] = {level = 0, choppy = 3, oddly_breakable_by_hand = 3}
  110. dig_groups["metalchest"] = {level = 0, cracky = 3, oddly_breakable_by_hand = 3}
  111. dig_groups["machine"] = {level = 0, cracky = 3} -- Must be level 0, or player may lose machine when dug!
  112. -- Get dig groups for a node based on its broad category.
  113. -- When choosing a name for a node, choose the name closest to the node's main material.
  114. function utility.dig_groups(name, ex)
  115. local groups = {}
  116. if not dig_groups[name] then
  117. minetest.log("error", "Could not find data for digging group '" .. name .. "'!")
  118. end
  119. local dig = dig_groups[name] or {level = 1, oddly_breakable_by_hand = 3}
  120. for k, v in pairs(dig) do
  121. groups[k] = v
  122. end
  123. -- Let custom groups override, include other stuff from groups.
  124. if ex then
  125. for k, v in pairs(ex) do
  126. groups[k] = v
  127. end
  128. end
  129. return groups
  130. end
  131. -- Copy standard/builtin groups only.
  132. -- Used mainly to ensure that stairs/microblock nodes don't include strange groups
  133. -- that should ONLY apply to their parent fullblock nodes.
  134. --
  135. -- Shall not return any groups used in crafting recipes!
  136. -- Shall return any/all groups required by tools!
  137. function utility.copy_builtin_groups(old_groups)
  138. local groups = {}
  139. groups.level = old_groups.level or 1
  140. if old_groups.crumbly then
  141. groups.crumbly = old_groups.crumbly
  142. end
  143. if old_groups.cracky then
  144. groups.cracky = old_groups.cracky
  145. end
  146. if old_groups.snappy then
  147. groups.snappy = old_groups.snappy
  148. end
  149. if old_groups.choppy then
  150. groups.choppy = old_groups.choppy
  151. end
  152. if old_groups.oddly_breakable_by_hand then
  153. groups.oddly_breakable_by_hand = old_groups.oddly_breakable_by_hand
  154. end
  155. if old_groups.flammable then
  156. groups.flammable = old_groups.flammable
  157. end
  158. if old_groups.dig_immediate then
  159. groups.dig_immediate = old_groups.dig_immediate
  160. end
  161. return groups
  162. end
  163. function utility.inventory_count_items(inv, listname, itemname)
  164. local list = inv:get_list(listname)
  165. local count = 0
  166. for i = 1, #list, 1 do
  167. if list[i]:get_name() == itemname then
  168. count = count + list[i]:get_count()
  169. end
  170. end
  171. return count
  172. end
  173. function utility.get_short_desc(str)
  174. if string.find(str, "[\n%(]") then
  175. str = string.sub(str, 1, string.find(str, "[\n%(]")-1)
  176. end
  177. str = string.gsub(str, "^%s+", "")
  178. str = string.gsub(str, "%s+$", "")
  179. return str
  180. end
  181. dofile(utility.modpath .. "/particle_override.lua")
  182. dofile(utility.modpath .. "/mapsave.lua")
  183. dofile(utility.modpath .. "/functions.lua")
  184. dofile(utility.modpath .. "/getopts.lua")
  185. -- Get a player's foot position, given the player's position.
  186. -- Should help compatibility going into 0.5.0 and beyond.
  187. function utility.get_foot_pos(pos)
  188. return vector.add(pos, {x=0, y=0, z=0})
  189. end
  190. function utility.get_middle_pos(pos)
  191. return vector.add(pos, {x=0, y=1, z=0})
  192. end
  193. function utility.get_head_pos(pos)
  194. return vector.add(pos, {x=0, y=1.75, z=0})
  195. end
  196. -- Get rounded position of node player is standing on.
  197. function utility.node_under_pos(pos)
  198. return vector_round(vector.add(pos, {x=0, y=-0.05, z=0}))
  199. end
  200. -- Global multipliers for ABMs. Performance setting.
  201. default.ABM_TIMER_MULTIPLIER = 1
  202. default.ABM_CHANCE_MULTIPLIER = 2
  203. -- Global player-movement multiplier values.
  204. default.ROAD_SPEED = 1.3
  205. default.ROAD_SPEED_NETHER = 1.1
  206. default.ROAD_SPEED_CAVERN = 1.15
  207. default.SLOW_SPEED = 0.7
  208. default.SLOW_SPEED_SNOW_LIGHT = 0.95
  209. default.SLOW_SPEED_SNOW = 0.75
  210. default.SLOW_SPEED_SNOW_THICK = 0.6
  211. default.SLOW_SPEED_SNOW_TRACKS_ADDITIVE = 0.15
  212. default.SLOW_SPEED_NETHER = 0.85
  213. default.SLOW_SPEED_ICE = 0.85
  214. default.SLOW_SPEED_GRASS = 0.85
  215. default.SLOW_SPEED_PLANTS = 0.55
  216. default.NORM_SPEED = 1.0
  217. default.ROPE_SPEED = 1.1
  218. default.FAST_JUMP = 1.0
  219. default.SLOW_JUMP = 1.0
  220. default.NORM_JUMP = 1.0
  221. function utility.transform_nodebox(nodebox)
  222. for k, v in ipairs(nodebox) do
  223. for m, n in ipairs(v) do
  224. local p = nodebox[k][m]
  225. p = p / 16
  226. p = p - 0.5
  227. nodebox[k][m] = p
  228. end
  229. end
  230. return nodebox
  231. end
  232. -- Public API function. Sort two positions such that the first is always less than the second.
  233. utility.sort_positions = function(p1, p2)
  234. local pos1 = {x=p1.x, y=p1.y, z=p1.z}
  235. local pos2 = {x=p2.x, y=p2.y, z=p2.z}
  236. if pos1.x > pos2.x then pos2.x, pos1.x = pos1.x, pos2.x end
  237. if pos1.y > pos2.y then pos2.y, pos1.y = pos1.y, pos2.y end
  238. if pos1.z > pos2.z then pos2.z, pos1.z = pos1.z, pos2.z end
  239. return pos1, pos2
  240. end
  241. --
  242. -- optimized helper to put all items in an inventory into a drops list
  243. --
  244. function default.get_inventory_drops(pos, inventory, drops)
  245. local inv = minetest.get_meta(pos):get_inventory()
  246. local n = #drops
  247. for i = 1, inv:get_size(inventory) do
  248. local stack = inv:get_stack(inventory, i)
  249. if stack:get_count() > 0 then
  250. drops[n+1] = stack:to_table()
  251. n = n + 1
  252. end
  253. end
  254. end
  255. --
  256. -- dig upwards
  257. --
  258. function default.dig_up(pos, node, digger)
  259. if digger == nil then return end
  260. local np = {x = pos.x, y = pos.y + 1, z = pos.z}
  261. local nn = minetest.get_node(np)
  262. if nn.name == node.name then
  263. minetest.node_dig(np, nn, digger)
  264. end
  265. end
  266. --
  267. -- Checks if specified volume intersects a protected volume
  268. --
  269. function default.intersects_protection(minp, maxp, player_name, interval)
  270. -- 'interval' is the largest allowed interval for the 3D lattice of checks
  271. -- Compute the optimal float step 'd' for each axis so that all corners and
  272. -- borders are checked. 'd' will be smaller or equal to 'interval'.
  273. -- Subtracting 1e-4 ensures that the max co-ordinate will be reached by the
  274. -- for loop (which might otherwise not be the case due to rounding errors).
  275. local d = {}
  276. for _, c in pairs({"x", "y", "z"}) do
  277. if maxp[c] > minp[c] then
  278. d[c] = (maxp[c] - minp[c]) / math.ceil((maxp[c] - minp[c]) / interval) - 1e-4
  279. elseif maxp[c] == minp[c] then
  280. d[c] = 1 -- Any value larger than 0 to avoid division by zero
  281. else -- maxp[c] < minp[c], print error and treat as protection intersected
  282. minetest.log("error", "maxp < minp in 'default.intersects_protection()'")
  283. return true
  284. end
  285. end
  286. for zf = minp.z, maxp.z, d.z do
  287. local z = math_floor(zf + 0.5)
  288. for yf = minp.y, maxp.y, d.y do
  289. local y = math_floor(yf + 0.5)
  290. for xf = minp.x, maxp.x, d.x do
  291. local x = math_floor(xf + 0.5)
  292. if minetest.test_protection({x = x, y = y, z = z}, player_name) then
  293. return true
  294. end
  295. end
  296. end
  297. end
  298. return false
  299. end
  300. default.get_raillike_selection_box = function()
  301. return {
  302. type = "fixed",
  303. -- but how to specify the dimensions for curved and sideways rails?
  304. fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
  305. }
  306. end
  307. default.get_raillike_collision_box = function()
  308. return {
  309. type = "fixed",
  310. fixed = {
  311. {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
  312. },
  313. }
  314. end
  315. --
  316. -- Sapling 'on place' function to check protection of node and resulting tree volume
  317. --
  318. function default.sapling_on_place(itemstack, placer, pointed_thing,
  319. sapling_name, minp_relative, maxp_relative, interval)
  320. -- Position of sapling
  321. local pos = pointed_thing.under
  322. local node = minetest.get_node_or_nil(pos)
  323. local pdef = node and minetest.reg_ns_nodes[node.name]
  324. if pdef and pdef.on_rightclick and not placer:get_player_control().sneak then
  325. return pdef.on_rightclick(pos, node, placer, itemstack, pointed_thing)
  326. end
  327. if not pdef or not pdef.buildable_to then
  328. pos = pointed_thing.above
  329. node = minetest.get_node_or_nil(pos)
  330. pdef = node and minetest.reg_ns_nodes[node.name]
  331. if not pdef or not pdef.buildable_to then
  332. return itemstack
  333. end
  334. end
  335. local player_name = placer:get_player_name()
  336. -- Check sapling position for protection
  337. if minetest.is_protected(pos, player_name) then
  338. minetest.record_protection_violation(pos, player_name)
  339. return itemstack
  340. end
  341. -- Check tree volume for protection
  342. if default.intersects_protection(
  343. vector.add(pos, vector.add(minp_relative, {x=-1, y=-1, z=-1})),
  344. vector.add(pos, vector.add(maxp_relative, {x=1, y=1, z=1})),
  345. player_name,
  346. interval) then
  347. minetest.record_protection_violation(pos, player_name)
  348. -- Print extra information to explain
  349. minetest.chat_send_player(player_name, "# Server: Tree will intersect protection!")
  350. return itemstack
  351. end
  352. minetest.log("action", player_name .. " places node "
  353. .. sapling_name .. " at " .. minetest.pos_to_string(pos))
  354. local take_item = not minetest.setting_getbool("creative_mode")
  355. local newnode = {name = sapling_name}
  356. local ndef = minetest.reg_ns_nodes[sapling_name]
  357. minetest.set_node(pos, newnode)
  358. -- Run callback
  359. if ndef and ndef.after_place_node then
  360. -- Deepcopy place_to and pointed_thing because callback can modify it
  361. if ndef.after_place_node(table.copy(pos), placer,
  362. itemstack, table.copy(pointed_thing)) then
  363. take_item = false
  364. end
  365. end
  366. -- Run script hook
  367. for _, callback in ipairs(minetest.registered_on_placenodes) do
  368. -- Deepcopy pos, node and pointed_thing because callback can modify them
  369. if callback(table.copy(pos), table.copy(newnode),
  370. placer, table.copy(node or {}),
  371. itemstack, table.copy(pointed_thing)) then
  372. take_item = false
  373. end
  374. end
  375. -- Notify other hooks.
  376. dirtspread.on_environment(pos)
  377. droplift.notify(pos)
  378. if take_item then
  379. itemstack:take_item()
  380. end
  381. return itemstack
  382. end
  383. --
  384. -- NOTICE: This method is not an official part of the API yet!
  385. -- This method may change in future.
  386. --
  387. function utility.can_interact_with_node(player, pos)
  388. if player then
  389. if minetest.check_player_privs(player, "protection_bypass") then
  390. return true
  391. end
  392. else
  393. return false
  394. end
  395. local meta = minetest.get_meta(pos)
  396. local owner = meta:get_string("owner") or ""
  397. if owner == "" or owner == player:get_player_name() then
  398. -- Owner can access the node to any time
  399. return true
  400. end
  401. -- is player wielding the right key?
  402. local item = player:get_wielded_item()
  403. if item:get_name() == "key:key" or item:get_name() == "key:chain" then
  404. local key_meta = item:get_meta()
  405. if key_meta:get_string("secret") == "" then
  406. local key_oldmeta = item:get_metadata()
  407. if key_oldmeta == "" or not minetest.parse_json(key_oldmeta) then
  408. return false
  409. end
  410. key_meta:set_string("secret", minetest.parse_json(key_oldmeta).secret)
  411. item:set_metadata("")
  412. end
  413. return meta:get_string("key_lock_secret") == key_meta:get_string("secret")
  414. end
  415. return false
  416. end
  417. -- Called from bones mod to ensure the map is loaded before placing bones.
  418. -- Dunno if this has any real effect on the problem of bones disappearing.
  419. function utility.ensure_map_loaded(minp, maxp)
  420. local vm = minetest.get_voxel_manip()
  421. vm:read_from_map(minp, maxp)
  422. return vm:get_emerged_area() -- Return area actually loaded.
  423. end
  424. function table.shuffle(t, from, to, random)
  425. from = from or 1
  426. to = to or #t
  427. random = random or math_random
  428. local n = to - from + 1
  429. while n > 1 do
  430. local r = from + n-1
  431. local l = from + random(0, n-1)
  432. t[l], t[r] = t[r], t[l]
  433. n = n-1
  434. end
  435. end
  436. -- A helper for formspecs which need to show a progress image.
  437. -- Note: percent value is assumed to be an integer, but if it's a float,
  438. -- anthing less than 1 will be treated as 0!
  439. function utility.progress_image(x, y, bg, fg, percent, modifier)
  440. if not modifier then
  441. modifier = ""
  442. end
  443. if percent < 1 then
  444. -- Must handle this case specially, because otherwise Minetest will insist
  445. -- on drawing at least 1 row of pixels from the FG image, even when percent
  446. -- is zero!
  447. return "image[" .. x .. "," .. y .. ";1,1;" .. bg .. modifier .. "]"
  448. else
  449. return "image[" .. x .. "," .. y .. ";1,1;" .. bg .. "^[lowpart:" ..
  450. (percent) .. ":" .. fg .. modifier .. "]"
  451. end
  452. end
  453. minetest.register_alias("akalin:ore_mined", "akalin:ore")
  454. minetest.register_alias("alatro:ore_mined", "alatro:ore")
  455. minetest.register_alias("arol:ore_mined", "arol:ore")
  456. minetest.register_alias("chromium:ore_mined", "chromium:ore")
  457. minetest.register_alias("default:stone_with_diamond_mined", "default:stone_with_diamond")
  458. minetest.register_alias("default:stone_with_gold_mined", "default:stone_with_gold")
  459. minetest.register_alias("default:desert_stone_with_diamond_mined", "default:desert_stone_with_diamond")
  460. minetest.register_alias("default:desert_stone_with_iron_mined", "default:desert_stone_with_iron")
  461. minetest.register_alias("default:desert_stone_with_copper_mined", "default:desert_stone_with_copper")
  462. minetest.register_alias("default:stone_with_copper_mined", "default:stone_with_copper")
  463. minetest.register_alias("default:stone_with_iron_mined", "default:stone_with_iron")
  464. minetest.register_alias("default:desert_stone_with_coal_mined", "default:desert_stone_with_coal")
  465. minetest.register_alias("default:stone_with_coal_mined", "default:stone_with_coal")
  466. minetest.register_alias("rackstone:rackstone_with_meat_mined", "rackstone:rackstone_with_meat")
  467. minetest.register_alias("rackstone:rackstone_with_mese_mined", "rackstone:rackstone_with_mese")
  468. minetest.register_alias("rackstone:rackstone_with_diamond_mined", "rackstone:rackstone_with_diamond")
  469. minetest.register_alias("rackstone:rackstone_with_gold_mined", "rackstone:rackstone_with_gold")
  470. minetest.register_alias("rackstone:rackstone_with_copper_mined", "rackstone:rackstone_with_copper")
  471. minetest.register_alias("rackstone:rackstone_with_iron_mined", "rackstone:rackstone_with_iron")
  472. minetest.register_alias("rackstone:rackstone_with_coal_mined", "rackstone:rackstone_with_coal")
  473. minetest.register_alias("rackstone:redrack_with_tin_mined", "rackstone:redrack_with_tin")
  474. minetest.register_alias("rackstone:redrack_with_coal_mined", "rackstone:redrack_with_coal")
  475. minetest.register_alias("rackstone:redrack_with_copper_mined", "rackstone:redrack_with_copper")
  476. minetest.register_alias("rackstone:redrack_with_iron_mined", "rackstone:redrack_with_iron")
  477. minetest.register_alias("glowstone:luxore_mined", "glowstone:luxore")
  478. minetest.register_alias("glowstone:minerals_mined", "glowstone:minerals")
  479. minetest.register_alias("glowstone:glowstone_mined", "glowstone:glowstone")
  480. minetest.register_alias("quartz:quartz_ore_mined", "quartz:quartz_ore")
  481. minetest.register_alias("pm:quartz_ore_mined", "pm:quartz_ore")
  482. minetest.register_alias("luxore:luxore_mined", "luxore:luxore")
  483. minetest.register_alias("thorium:ore_mined", "thorium:ore")
  484. minetest.register_alias("lead:ore_mined", "lead:ore")
  485. minetest.register_alias("lapis:pyrite_ore_mined", "lapis:pyrite_ore")
  486. minetest.register_alias("kalite:ore_mined", "kalite:ore")
  487. minetest.register_alias("sulfur:ore_mined", "sulfur:ore")
  488. minetest.register_alias("titanium:ore_mined", "titanium:ore")
  489. minetest.register_alias("uranium:ore_mined", "uranium:ore")
  490. minetest.register_alias("whitestone:stone_mined", "whitestone:stone")
  491. minetest.register_alias("zinc:ore_mined", "zinc:ore")
  492. minetest.register_alias("talinite:desert_ore_mined", "talinite:desert_ore")
  493. minetest.register_alias("talinite:ore_mined", "talinite:ore")