mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-04 00:51:13 +02:00
handle legacy drop definitions correctly
This commit is contained in:
@ -149,7 +149,15 @@ function api.register_single(node, shape, overrides, meta)
|
||||
end
|
||||
|
||||
-- if there's a drop defined, and we can drop a shaped version, do so
|
||||
if node_def.drop and type(node_def.drop) == "string" then
|
||||
if meta.legacy_drop then
|
||||
if type(meta.legacy_drop) == "string" then
|
||||
local item = api.get_schema_recipe_item(meta.legacy_drop, shape)
|
||||
if item then
|
||||
def.drop = item
|
||||
end
|
||||
end
|
||||
|
||||
elseif node_def.drop and type(node_def.drop) == "string" then
|
||||
local item = api.get_schema_recipe_item(node_def.drop, shape)
|
||||
if item then
|
||||
def.drop = item
|
||||
|
Reference in New Issue
Block a user