rename _mcl_basenode to _mcl_baseitem
This commit is contained in:
parent
b6340ec7c2
commit
ef55292f8b
@ -236,7 +236,7 @@ function mcl_beds.register_bed(name, def)
|
||||
|
||||
on_rotate = rotate,
|
||||
after_destruct = destruct_bed,
|
||||
_mcl_basenode = name .. "_bottom",
|
||||
_mcl_baseitem = name .. "_bottom",
|
||||
})
|
||||
|
||||
minetest.register_alias(name, name .. "_bottom")
|
||||
|
@ -113,7 +113,7 @@ for l = 1, 4 do
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 0.6,
|
||||
_mcl_hardness = 0.6,
|
||||
_mcl_basenode = "mcl_beehives:beehive",
|
||||
_mcl_baseitem = "mcl_beehives:beehive",
|
||||
drop = "",
|
||||
after_dig_node = dig_hive,
|
||||
})
|
||||
@ -132,7 +132,7 @@ minetest.register_node("mcl_beehives:beehive_5", {
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 0.6,
|
||||
_mcl_hardness = 0.6,
|
||||
_mcl_basenode = "mcl_beehives:beehive",
|
||||
_mcl_baseitem = "mcl_beehives:beehive",
|
||||
on_rightclick = honey_harvest,
|
||||
drop = "",
|
||||
after_dig_node = dig_hive,
|
||||
@ -173,7 +173,7 @@ for i = 1, 4 do
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 0.3,
|
||||
_mcl_hardness = 0.3,
|
||||
_mcl_basenode = "mcl_beehives:bee_nest",
|
||||
_mcl_baseitem = "mcl_beehives:bee_nest",
|
||||
drop = "",
|
||||
after_dig_node = dig_hive,
|
||||
})
|
||||
@ -193,7 +193,7 @@ minetest.register_node("mcl_beehives:bee_nest_5", {
|
||||
_mcl_blast_resistance = 0.3,
|
||||
_mcl_hardness = 0.3,
|
||||
_mcl_honey_level = 5,
|
||||
_mcl_basenode = "mcl_beehives:bee_nest",
|
||||
_mcl_baseitem = "mcl_beehives:bee_nest",
|
||||
on_rightclick = honey_harvest,
|
||||
drop = "",
|
||||
after_dig_node = dig_hive,
|
||||
|
@ -405,7 +405,7 @@ local tpl_brewing_stand = {
|
||||
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||||
_mcl_blast_resistance = 1,
|
||||
_mcl_hardness = 1,
|
||||
_mcl_basenode = "mcl_brewing:stand_000",
|
||||
_mcl_baseitem = "mcl_brewing:stand_000",
|
||||
after_dig_node = drop_contents,
|
||||
allow_metadata_inventory_take = allow_take,
|
||||
allow_metadata_inventory_put = allow_put,
|
||||
|
@ -95,7 +95,7 @@ local crop_def = {
|
||||
on_rotate = false,
|
||||
_mcl_blast_resistance = 3,
|
||||
_mcl_hardness = 0.2,
|
||||
_mcl_basenode = "mcl_cocoas:cocoa_beans",
|
||||
_mcl_baseitem = "mcl_cocoas:cocoa_beans",
|
||||
_on_bone_meal = function(_, _, _, pos, n)
|
||||
if n.name == "mcl_cocoas:cocoa_1" or n.name == "mcl_cocoas:cocoa_2" then
|
||||
return mcl_cocoas.grow(pos)
|
||||
|
@ -297,7 +297,7 @@ function mcl_doors:register_door(name, def)
|
||||
groups = def.groups,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
_mcl_basenode = name,
|
||||
_mcl_baseitem = name,
|
||||
sounds = def.sounds,
|
||||
|
||||
after_destruct = function(bottom, _)
|
||||
@ -377,7 +377,7 @@ function mcl_doors:register_door(name, def)
|
||||
groups = def.groups,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
_mcl_basenode = name,
|
||||
_mcl_baseitem = name,
|
||||
sounds = def.sounds,
|
||||
|
||||
after_destruct = function(top, oldnode)
|
||||
@ -457,7 +457,7 @@ function mcl_doors:register_door(name, def)
|
||||
groups = def.groups,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
_mcl_basenode = name,
|
||||
_mcl_baseitem = name,
|
||||
sounds = def.sounds,
|
||||
|
||||
after_destruct = function(bottom, _)
|
||||
@ -537,7 +537,7 @@ function mcl_doors:register_door(name, def)
|
||||
groups = def.groups,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
_mcl_basenode = name,
|
||||
_mcl_baseitem = name,
|
||||
sounds = def.sounds,
|
||||
|
||||
after_destruct = function(top, oldnode)
|
||||
|
@ -220,7 +220,7 @@ function mcl_doors:register_trapdoor(name, def)
|
||||
groups = groups_open,
|
||||
_mcl_hardness = def._mcl_hardness,
|
||||
_mcl_blast_resistance = def._mcl_blast_resistance,
|
||||
_mcl_basenode = name,
|
||||
_mcl_baseitem = name,
|
||||
sounds = def.sounds,
|
||||
drop = name,
|
||||
node_box = {
|
||||
|
@ -43,7 +43,7 @@ minetest.register_node("mcl_farming:beetroot_0", {
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:beetroot_seeds",
|
||||
_mcl_baseitem = "mcl_farming:beetroot_seeds",
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_farming:beetroot_1", {
|
||||
@ -69,7 +69,7 @@ minetest.register_node("mcl_farming:beetroot_1", {
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:beetroot_seeds",
|
||||
_mcl_baseitem = "mcl_farming:beetroot_seeds",
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_farming:beetroot_2", {
|
||||
@ -95,7 +95,7 @@ minetest.register_node("mcl_farming:beetroot_2", {
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:beetroot_seeds",
|
||||
_mcl_baseitem = "mcl_farming:beetroot_seeds",
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_farming:beetroot", {
|
||||
@ -149,7 +149,7 @@ minetest.register_node("mcl_farming:beetroot", {
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:beetroot_seeds",
|
||||
_mcl_baseitem = "mcl_farming:beetroot_seeds",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_farming:beetroot_item", {
|
||||
|
@ -50,7 +50,7 @@ for i=1, 7 do
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:carrot_item",
|
||||
_mcl_baseitem = "mcl_farming:carrot_item",
|
||||
})
|
||||
end
|
||||
|
||||
@ -92,7 +92,7 @@ minetest.register_node("mcl_farming:carrot", {
|
||||
max_count = 4,
|
||||
cap = 5,
|
||||
},
|
||||
_mcl_basenode = "mcl_farming:carrot_item",
|
||||
_mcl_baseitem = "mcl_farming:carrot_item",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_farming:carrot_item", {
|
||||
|
@ -111,7 +111,7 @@ for s=1,7 do
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:melon_seeds",
|
||||
_mcl_baseitem = "mcl_farming:melon_seeds",
|
||||
})
|
||||
end
|
||||
|
||||
@ -123,7 +123,7 @@ local stem_def = {
|
||||
tiles = {"mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127"},
|
||||
wield_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127",
|
||||
inventory_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127",
|
||||
_mcl_basenode = "mcl_farming:melon_seeds",
|
||||
_mcl_baseitem = "mcl_farming:melon_seeds",
|
||||
}
|
||||
|
||||
-- Register stem growth
|
||||
|
@ -54,7 +54,7 @@ for i=1, 7 do
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:potato_item",
|
||||
_mcl_baseitem = "mcl_farming:potato_item",
|
||||
})
|
||||
end
|
||||
|
||||
@ -96,7 +96,7 @@ minetest.register_node("mcl_farming:potato", {
|
||||
max_count = 4,
|
||||
cap = 5
|
||||
},
|
||||
_mcl_basenode = "mcl_farming:potato_item",
|
||||
_mcl_baseitem = "mcl_farming:potato_item",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_farming:potato_item", {
|
||||
|
@ -102,7 +102,7 @@ for s=1,7 do
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:pumpkin_seeds",
|
||||
_mcl_baseitem = "mcl_farming:pumpkin_seeds",
|
||||
})
|
||||
end
|
||||
|
||||
@ -113,7 +113,7 @@ local stem_def = {
|
||||
tiles = {"mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127"},
|
||||
wield_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127",
|
||||
inventory_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127",
|
||||
_mcl_basenode = "mcl_farming:pumpkin_seeds",
|
||||
_mcl_baseitem = "mcl_farming:pumpkin_seeds",
|
||||
}
|
||||
|
||||
-- Template for pumpkin
|
||||
|
@ -70,7 +70,7 @@ for i=1,7 do
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
_mcl_blast_resistance = 0,
|
||||
_on_bone_meal = on_bone_meal,
|
||||
_mcl_basenode = "mcl_farming:wheat_seeds",
|
||||
_mcl_baseitem = "mcl_farming:wheat_seeds",
|
||||
})
|
||||
end
|
||||
|
||||
@ -110,7 +110,7 @@ minetest.register_node("mcl_farming:wheat", {
|
||||
max_count = 6,
|
||||
cap = 7
|
||||
},
|
||||
_mcl_basenode = "mcl_farming:wheat_seeds",
|
||||
_mcl_baseitem = "mcl_farming:wheat_seeds",
|
||||
})
|
||||
|
||||
mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 25, 20)
|
||||
|
@ -316,7 +316,7 @@ function mcl_flowers.add_large_plant(name, def)
|
||||
drop = def.bottom.drop or ( "mcl_flowers:"..name ),
|
||||
_mcl_shears_drop = def.bottom._mcl_shears_drop,
|
||||
_mcl_fortune_drop = def.bottom._mcl_fortune_drop,
|
||||
_mcl_basenode = "mcl_flowers:"..name,
|
||||
_mcl_baseitem = "mcl_flowers:"..name,
|
||||
after_destruct = function(pos, _)
|
||||
-- Remove bottom half of flower (if it exists)
|
||||
local top = pos
|
||||
|
@ -102,7 +102,7 @@ for _,root in pairs(propagule_water_nodes) do
|
||||
_mcl_hardness = 0,
|
||||
_mcl_blast_resistance = 0,
|
||||
_mcl_silk_touch_drop = true,
|
||||
_mcl_basenode = "mcl_mangrove:propagule",
|
||||
_mcl_baseitem = "mcl_mangrove:propagule",
|
||||
})
|
||||
|
||||
end
|
||||
@ -226,7 +226,7 @@ minetest.register_node("mcl_mangrove:hanging_propagule_1", {
|
||||
tiles = {"mcl_mangrove_propagule_hanging.png"},
|
||||
inventory_image = "mcl_mangrove_propagule.png",
|
||||
wield_image = "mcl_mangrove_propagule.png",
|
||||
_mcl_basenode = "mcl_mangrove:propagule",
|
||||
_mcl_baseitem = "mcl_mangrove:propagule",
|
||||
})
|
||||
|
||||
|
||||
@ -272,7 +272,7 @@ local wlroots = {
|
||||
handy = 1, hoey = 1, water=4, liquid=3, puts_out_fire=1, dig_by_piston = 1, deco_block = 1, not_in_creative_inventory=1 },
|
||||
_mcl_blast_resistance = 100,
|
||||
_mcl_hardness = -1, -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
|
||||
_mcl_basenode = "mcl_mangrove:mangrove_roots",
|
||||
_mcl_baseitem = "mcl_mangrove:mangrove_roots",
|
||||
on_construct = function(pos)
|
||||
local dim = mcl_worlds.pos_to_dimension(pos)
|
||||
if dim == "nether" then
|
||||
|
@ -491,7 +491,7 @@ kelp.surface_deftemplate = {
|
||||
--_mcl_falling_node_alternative = is_falling and nodename or nil,
|
||||
_mcl_hardness = 0,
|
||||
_mcl_blast_resistance = 0,
|
||||
_mcl_basenode = "mcl_ocean:kelp"
|
||||
_mcl_baseitem = "mcl_ocean:kelp"
|
||||
}
|
||||
|
||||
-- Commented properties are the ones obtained using register_kelp_surface.
|
||||
|
@ -169,7 +169,7 @@ for s=1,4 do
|
||||
on_place = on_place,
|
||||
_mcl_sea_pickle_off = "mcl_ocean:sea_pickle_"..s.."_off_"..ontop,
|
||||
_mcl_sea_pickle_next = next_on,
|
||||
_mcl_basenode = "mcl_ocean:sea_pickle_1_dead_brain_coral_block",
|
||||
_mcl_baseitem = "mcl_ocean:sea_pickle_1_dead_brain_coral_block",
|
||||
_mcl_hardness = 0,
|
||||
_mcl_blast_resistance = 0,
|
||||
_mcl_cooking_output = cookoutput,
|
||||
@ -204,7 +204,7 @@ for s=1,4 do
|
||||
end,
|
||||
_mcl_sea_pickle_on = "mcl_ocean:sea_pickle_"..s.."_"..ontop,
|
||||
_mcl_sea_pickle_next = next_off,
|
||||
_mcl_basenode = "mcl_ocean:sea_pickle_1_dead_brain_coral_block",
|
||||
_mcl_baseitem = "mcl_ocean:sea_pickle_1_dead_brain_coral_block",
|
||||
_mcl_hardness = 0,
|
||||
_mcl_blast_resistance = 0,
|
||||
})
|
||||
|
@ -143,7 +143,7 @@ for s=1, #surfaces do
|
||||
_mcl_shears_drop = { "mcl_ocean:seagrass" },
|
||||
_mcl_hardness = 0,
|
||||
_mcl_blast_resistance = 0,
|
||||
_mcl_basenode = "mcl_ocean:seagrass",
|
||||
_mcl_baseitem = "mcl_ocean:seagrass",
|
||||
})
|
||||
if mod_doc and surfaces[s][1] ~= "dirt" then
|
||||
doc.add_entry_alias("nodes", "mcl_ocean:seagrass_dirt", "nodes", "mcl_ocean:seagrass_"..surfaces[s][1])
|
||||
|
@ -360,7 +360,7 @@ local function register_slab(subname, stairdef)
|
||||
topdef._doc_items_usagehelp = nil
|
||||
topdef.drop = lower_slab
|
||||
topdef._mcl_other_slab_half = lower_slab
|
||||
topdef._mcl_basenode = lower_slab
|
||||
topdef._mcl_baseitem = lower_slab
|
||||
function topdef.on_rotate(pos, node, _, mode)
|
||||
-- Flip slab
|
||||
if mode == screwdriver.ROTATE_AXIS then
|
||||
@ -397,7 +397,7 @@ local function register_slab(subname, stairdef)
|
||||
drop = lower_slab .. " 2",
|
||||
_mcl_hardness = stairdef.hardness,
|
||||
_mcl_blast_resistance = stairdef.blast_resistance,
|
||||
_mcl_basenode = lower_slab,
|
||||
_mcl_baseitem = lower_slab,
|
||||
})
|
||||
|
||||
if stairdef.recipeitem and stairdef.recipeitem ~= "" then
|
||||
|
@ -761,7 +761,7 @@ function mcl_stairs.cornerstair.add(name, stairtiles)
|
||||
stairs = {name, name.."_outer", name.."_inner"},
|
||||
after_dig_node = function(pos, oldnode) after_dig_node(pos, oldnode) end,
|
||||
_mcl_hardness = node_def._mcl_hardness,
|
||||
_mcl_basenode = name,
|
||||
_mcl_baseitem = name,
|
||||
on_rotate = false,
|
||||
placement_prevented = placement_prevented_outer,
|
||||
})
|
||||
@ -787,7 +787,7 @@ function mcl_stairs.cornerstair.add(name, stairtiles)
|
||||
stairs = {name, name.."_outer", name.."_inner"},
|
||||
after_dig_node = function(pos, oldnode) after_dig_node(pos, oldnode) end,
|
||||
_mcl_hardness = node_def._mcl_hardness,
|
||||
_mcl_basenode = name,
|
||||
_mcl_baseitem = name,
|
||||
on_rotate = false,
|
||||
placement_prevented = placement_prevented_inner,
|
||||
})
|
||||
|
@ -118,8 +118,8 @@ minetest.override_item("", {
|
||||
local stack = ItemStack(name)
|
||||
if minetest.get_item_group(name, "not_in_creative_inventory") > 0 then
|
||||
local def = stack:get_definition()
|
||||
if not def._mcl_basenode then return end
|
||||
name = def._mcl_basenode
|
||||
if not def._mcl_baseitem then return end
|
||||
name = def._mcl_baseitem
|
||||
stack = ItemStack(name)
|
||||
end
|
||||
local inv = placer:get_inventory()
|
||||
|
Loading…
x
Reference in New Issue
Block a user