Made nodes breakable again

This commit is contained in:
James David Clarke
2023-12-28 08:47:46 +00:00
parent 58df66b7bc
commit 9a231387a3
31 changed files with 263 additions and 65 deletions

View File

@ -10,8 +10,11 @@ minetest.register_node(":moretrees:rubber_tree_sapling", {
wield_image = "technic_rubber_sapling.png",
paramtype = "light",
walkable = false,
groups = {dig_immediate=3, flammable=2, sapling=1},
groups = {dig_immediate=3, flammable=2, sapling=1, pickaxey=1, handy=1},
sounds = sounds.node_sound_defaults(),
_mcl_hardness = 1,
_mcl_blast_resistance = 1,
_mcl_silk_touch_drop = true
})
minetest.register_craft({
@ -25,8 +28,11 @@ minetest.register_node(":moretrees:rubber_tree_trunk", {
tiles = {"default_tree_top.png", "default_tree_top.png",
"technic_rubber_tree_full.png"},
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2},
flammable=2, handy=1},
sounds = sounds.node_sound_wood_defaults(),
_mcl_hardness = 1,
_mcl_blast_resistance = 1,
_mcl_silk_touch_drop = true
})
minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
@ -34,8 +40,11 @@ minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
tiles = {"default_tree_top.png", "default_tree_top.png",
"technic_rubber_tree_empty.png"},
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2, not_in_creative_inventory=1},
flammable=2, not_in_creative_inventory=1,handy=1},
sounds = sounds.node_sound_wood_defaults(),
_mcl_hardness = 1,
_mcl_blast_resistance = 1,
_mcl_silk_touch_drop = true
})
minetest.register_node(":moretrees:rubber_tree_leaves", {
@ -43,7 +52,7 @@ minetest.register_node(":moretrees:rubber_tree_leaves", {
description = S("Rubber Tree Leaves"),
tiles = {"technic_rubber_leaves.png"},
paramtype = "light",
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1,},
drop = {
max_items = 1,
items = {{
@ -55,7 +64,10 @@ minetest.register_node(":moretrees:rubber_tree_leaves", {
}
}
},
sounds = sounds.node_sound_leaves_defaults()
sounds = sounds.node_sound_leaves_defaults(),
_mcl_hardness = 1,
_mcl_blast_resistance = 1,
_mcl_silk_touch_drop = true
})
technic.rubber_tree_model={
@ -91,8 +103,17 @@ if technic.config:get_bool("enable_rubber_tree_generation") then
x = (maxp.x - minp.x) / 2 + minp.x,
y = (maxp.y - minp.y) / 2 + minp.y,
z = (maxp.z - minp.z) / 2 + minp.z}
local near_node = nil
if minetest.get_modpath("mcl_core") then
near_node = "mcl_core:dirt_with_grass"
else if minetest.get_modpath("default") then
near_node = "default:dirt_with_grass"
else
error(S("[TECHNIC] Cant generate rubber trees as default or mcl_core is not installed, please use a mineclone compatible game or minetest_game"))
end
end
local pos = minetest.find_node_near(tmp, maxp.x - minp.x,
{"default:dirt_with_grass"})
near_node)
if pos ~= nil then
minetest.spawn_tree({x=pos.x, y=pos.y+1, z=pos.z}, technic.rubber_tree_model)
end