Fix infinite gold ingot / diamond spawning

master
Wuzzy 2022-08-02 15:00:46 +02:00
parent 3230804bce
commit 19dbfe5827
1 changed files with 4 additions and 0 deletions

View File

@ -1181,6 +1181,10 @@ minetest.register_node("tutorial:itemspawner", {
local offset = minetest.string_to_pos(meta:get_string("offset"))
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 spawnpos = {x=pos.x+x, y=pos.y+y, z=pos.z+z}
local objs = minetest.get_objects_inside_radius(spawnpos, 1)