Fix infinite gold ingot / diamond spawning
This commit is contained in:
parent
3230804bce
commit
19dbfe5827
@ -1181,6 +1181,10 @@ minetest.register_node("tutorial:itemspawner", {
|
|||||||
|
|
||||||
local offset = minetest.string_to_pos(meta:get_string("offset"))
|
local offset = minetest.string_to_pos(meta:get_string("offset"))
|
||||||
local itemstring = meta:get_string("itemstring")
|
local itemstring = meta:get_string("itemstring")
|
||||||
|
local alias = minetest.registered_aliases[itemstring]
|
||||||
|
if alias then
|
||||||
|
itemstring = alias
|
||||||
|
end
|
||||||
local x, y, z = offset.x, offset.y, offset.z
|
local x, y, z = offset.x, offset.y, offset.z
|
||||||
local spawnpos = {x=pos.x+x, y=pos.y+y, z=pos.z+z}
|
local spawnpos = {x=pos.x+x, y=pos.y+y, z=pos.z+z}
|
||||||
local objs = minetest.get_objects_inside_radius(spawnpos, 1)
|
local objs = minetest.get_objects_inside_radius(spawnpos, 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user