This commit is contained in:
Dyed ef Ra 2024-03-28 20:10:54 +01:00
commit 64f1ab4275
2 changed files with 24 additions and 16 deletions

View File

@ -358,6 +358,12 @@ if industrialtest.mclAvailable then
mcl_armor.register_set({
name=material,
description=materialDisplayName,
descriptions = {
head = "Helmet",
torso = "Chestplate",
legs = "Leggings",
feet = "Boots",
},
durability=config.uses,
points=config.armorPoints,
craft_material="industrialtest:"..material,

View File

@ -379,23 +379,25 @@ if not industrialtest.mods.mclRubber then
end
end
})
mcl_dye.register_on_bone_meal_apply(function(pointed)
local node=minetest.get_node(pointed.under)
if node.name~="industrialtest:rubber_sapling" then
return
end
if industrialtest.random:next(1,100)>45 then
return
end
local meta=minetest.get_meta(pointed.under)
local stage=meta:get_int("stage") or 0
stage=stage+1
if stage>=3 then
if mcl_dye.register_on_bone_meal_apply then
mcl_dye.register_on_bone_meal_apply(function(pointed)
local node=minetest.get_node(pointed.under)
if node.name~="industrialtest:rubber_sapling" then
return
end
if industrialtest.random:next(1,100)>45 then
return
end
local meta=minetest.get_meta(pointed.under)
local stage=meta:get_int("stage") or 0
stage=stage+1
if stage>=3 then
industrialtest.internal.makeRubberTree(pointed.under)
else
meta:set_int("stage",stage)
end
end)
else
meta:set_int("stage",stage)
end
end)
end
end
definition.groups.attached_node=1
definition.groups.dig_immediate=3