Merge branch 'lever'
|
@ -50,6 +50,7 @@ Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times
|
||||||
* `destroys_items=1`: If an item happens to be *inside* this node, the item will be destroyed
|
* `destroys_items=1`: If an item happens to be *inside* this node, the item will be destroyed
|
||||||
* `no_eat_delay=1`: Only for foodstuffs. When eating this, all eating delays are ignored.
|
* `no_eat_delay=1`: Only for foodstuffs. When eating this, all eating delays are ignored.
|
||||||
* `can_eat_when_full=1`: Only for foodstuffs. This item can be eaten when the user has a full hunger bar
|
* `can_eat_when_full=1`: Only for foodstuffs. This item can be eaten when the user has a full hunger bar
|
||||||
|
* `attached_node_facedir=1`: Like `attached_node`, but for facedir nodes
|
||||||
* `cauldron`: Cauldron. 1: Empty. 2-4: Water height
|
* `cauldron`: Cauldron. 1: Empty. 2-4: Water height
|
||||||
|
|
||||||
#### Footnotes
|
#### Footnotes
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Adds additional ways for nodes to be attached.
|
|
@ -0,0 +1,24 @@
|
||||||
|
local original_function = minetest.check_single_for_falling
|
||||||
|
|
||||||
|
minetest.check_single_for_falling = function(pos)
|
||||||
|
local ret_o = original_function(pos)
|
||||||
|
|
||||||
|
local ret = false
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
if minetest.get_item_group(node.name, "attached_node_facedir") ~= 0 then
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
local cpos = vector.add(pos, dir)
|
||||||
|
local cnode = minetest.get_node(cpos)
|
||||||
|
if minetest.get_item_group(cnode.name, "solid") == 0 then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
local drops = minetest.get_node_drops(node.name, "")
|
||||||
|
for dr=1, #drops do
|
||||||
|
minetest.add_item(pos, drops[dr])
|
||||||
|
end
|
||||||
|
ret = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return ret_o or ret
|
||||||
|
end
|
||||||
|
|
|
@ -1,90 +1,153 @@
|
||||||
-- WALL LEVER
|
local lever_get_output_rules = function(node)
|
||||||
-- Basically a switch that can be attached to a wall
|
local rules = {
|
||||||
-- Powers the block 2 nodes behind (using a receiver)
|
{x = -1, y = 0, z = 0},
|
||||||
|
{x = 1, y = 0, z = 0},
|
||||||
|
{x = 0, y = 0, z = -1},
|
||||||
|
{x = 0, y = 0, z = 1},
|
||||||
|
{x = 0, y = -1, z = 0},
|
||||||
|
{x = 0, y = 1, z = 0},
|
||||||
|
}
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
dir = vector.multiply(dir, 2)
|
||||||
|
table.insert(rules, dir)
|
||||||
|
return rules
|
||||||
|
end
|
||||||
|
|
||||||
|
-- LEVER
|
||||||
minetest.register_node("mesecons_walllever:wall_lever_off", {
|
minetest.register_node("mesecons_walllever:wall_lever_off", {
|
||||||
drawtype = "nodebox",
|
drawtype = "mesh",
|
||||||
tiles = {
|
tiles = {
|
||||||
"jeija_wall_lever_tb.png",
|
"jeija_wall_lever_lever_light_on.png",
|
||||||
"jeija_wall_lever_bottom.png",
|
|
||||||
"jeija_wall_lever_sides.png",
|
|
||||||
"jeija_wall_lever_sides.png",
|
|
||||||
"jeija_wall_lever_back.png",
|
|
||||||
"jeija_wall_lever_off.png",
|
|
||||||
},
|
},
|
||||||
inventory_image = "jeija_wall_lever.png",
|
inventory_image = "jeija_wall_lever.png",
|
||||||
wield_image = "jeija_wall_lever.png",
|
wield_image = "jeija_wall_lever.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "jeija_wall_lever_off.obj",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {{ -2/16, -3/16, 8/16, 2/16, 3/16, 4/16 },
|
fixed = { -3/16, -4/16, 2/16, 3/16, 4/16, 8/16 },
|
||||||
{ -1/16, -8/16, 7/16, 1/16, 0/16, 5/16 }},
|
|
||||||
},
|
},
|
||||||
node_box = {
|
groups = {handy=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1},
|
||||||
type = "fixed",
|
|
||||||
fixed = {{ -2/16, -3/16, 8/16, 2/16, 3/16, 4/16 }, -- the base
|
|
||||||
{ -1/16, -8/16, 7/16, 1/16, 0/16, 5/16 }} -- the lever itself.
|
|
||||||
},
|
|
||||||
groups = {handy=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1},
|
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
description="Lever",
|
description="Lever",
|
||||||
_doc_items_longdesc = "A lever is a redstone component which can be flipped on and off. It supplies redstone power to the blocks behind while it is in the “on” state.",
|
_doc_items_longdesc = "A lever is a redstone component which can be flipped on and off. It supplies redstone power to the blocks behind while it is in the “on” state.",
|
||||||
_doc_items_usagehelp = "Right-click the lever to flip it on or off.",
|
_doc_items_usagehelp = "Right-click the lever to flip it on or off.",
|
||||||
on_rightclick = function (pos, node)
|
on_rightclick = function (pos, node)
|
||||||
minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_on", param2=node.param2})
|
minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_on", param2=node.param2})
|
||||||
mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node))
|
mesecon.receptor_on(pos, lever_get_output_rules(node))
|
||||||
minetest.sound_play("mesecons_lever", {pos=pos})
|
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||||
end,
|
end,
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
node_placement_prediction = "",
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
-- no interaction possible with entities
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
local under = pointed_thing.under
|
||||||
|
local node = minetest.get_node(under)
|
||||||
|
local def = minetest.registered_nodes[node.name]
|
||||||
|
if not def then return end
|
||||||
|
local groups = def.groups
|
||||||
|
|
||||||
|
-- Check special rightclick action of pointed node
|
||||||
|
if def and def.on_rightclick then
|
||||||
|
if not placer:get_player_control().sneak then
|
||||||
|
return def.on_rightclick(under, node, placer, itemstack,
|
||||||
|
pointed_thing) or itemstack, false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- If the pointed node is buildable, let's look at the node *behind* that node
|
||||||
|
if def.buildable_to then
|
||||||
|
local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
|
||||||
|
local actual = vector.subtract(under, dir)
|
||||||
|
local actualnode = minetest.get_node(actual)
|
||||||
|
def = minetest.registered_nodes[actualnode.name]
|
||||||
|
groups = def.groups
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Only allow placement on full-cube solid opaque nodes
|
||||||
|
if (not groups) or (not groups.solid) or (not groups.opaque) or (def.node_box and def.node_box.type ~= "regular") then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
local above = pointed_thing.above
|
||||||
|
local dir = vector.subtract(under, above)
|
||||||
|
local tau = math.pi*2
|
||||||
|
local wdir = minetest.dir_to_facedir(dir, true)
|
||||||
|
if dir.y ~= 0 then
|
||||||
|
local yaw = placer:get_look_horizontal()
|
||||||
|
if (yaw > tau/8 and yaw < (tau/8)*3) or (yaw < (tau/8)*7 and yaw > (tau/8)*5) then
|
||||||
|
if dir.y == -1 then
|
||||||
|
wdir = 13
|
||||||
|
else
|
||||||
|
wdir = 15
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if dir.y == -1 then
|
||||||
|
wdir = 10
|
||||||
|
else
|
||||||
|
wdir = 8
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local idef = itemstack:get_definition()
|
||||||
|
local itemstack, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir)
|
||||||
|
|
||||||
|
if success then
|
||||||
|
if idef.sounds and idef.sounds.place then
|
||||||
|
minetest.sound_play(idef.sounds.place, {pos=above, gain=1})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
|
||||||
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
rules = mesecon.rules.buttonlike_get,
|
rules = lever_get_output_rules,
|
||||||
state = mesecon.state.off
|
state = mesecon.state.off
|
||||||
}},
|
}},
|
||||||
|
on_rotate = false,
|
||||||
_mcl_blast_resistance = 2.5,
|
_mcl_blast_resistance = 2.5,
|
||||||
_mcl_hardness = 0.5,
|
_mcl_hardness = 0.5,
|
||||||
})
|
})
|
||||||
minetest.register_node("mesecons_walllever:wall_lever_on", {
|
minetest.register_node("mesecons_walllever:wall_lever_on", {
|
||||||
drawtype = "nodebox",
|
drawtype = "mesh",
|
||||||
tiles = {
|
tiles = {
|
||||||
"jeija_wall_lever_top.png",
|
"jeija_wall_lever_lever_light_on.png",
|
||||||
"jeija_wall_lever_tb.png",
|
|
||||||
"jeija_wall_lever_sides.png",
|
|
||||||
"jeija_wall_lever_sides.png",
|
|
||||||
"jeija_wall_lever_back.png",
|
|
||||||
"jeija_wall_lever_on.png",
|
|
||||||
},
|
},
|
||||||
inventory_image = "jeija_wall_lever.png",
|
inventory_image = "jeija_wall_lever.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
mesh = "jeija_wall_lever_on.obj",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {{ -2/16, -3/16, 8/16, 2/16, 3/16, 4/16 },
|
fixed = { -3/16, -4/16, 2/16, 3/16, 4/16, 8/16 },
|
||||||
{ -1/16, 0, 7/16, 1/16, 8/16, 5/16 }},
|
|
||||||
},
|
},
|
||||||
node_box = {
|
groups = {handy=1, not_in_creative_inventory = 1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1},
|
||||||
type = "fixed",
|
|
||||||
fixed = {{ -2/16, -3/16, 8/16, 2/16, 3/16, 4/16 }, -- the base
|
|
||||||
{ -1/16, 0/16, 7/16, 1/16, 8/16, 5/16 }} -- the lever itself.
|
|
||||||
},
|
|
||||||
groups = {handy=1, not_in_creative_inventory = 1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1},
|
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
drop = '"mesecons_walllever:wall_lever_off" 1',
|
drop = '"mesecons_walllever:wall_lever_off" 1',
|
||||||
description="Lever",
|
description="Lever",
|
||||||
_doc_items_create_entry = false,
|
_doc_items_create_entry = false,
|
||||||
on_rightclick = function (pos, node)
|
on_rightclick = function (pos, node)
|
||||||
minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_off", param2=node.param2})
|
minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_off", param2=node.param2})
|
||||||
mesecon.receptor_off(pos, mesecon.rules.buttonlike_get(node))
|
mesecon.receptor_off(pos, lever_get_output_rules(node))
|
||||||
minetest.sound_play("mesecons_lever", {pos=pos})
|
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||||
end,
|
end,
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
mesecons = {receptor = {
|
mesecons = {receptor = {
|
||||||
rules = mesecon.rules.buttonlike_get,
|
rules = lever_get_output_rules,
|
||||||
state = mesecon.state.on
|
state = mesecon.state.on
|
||||||
}},
|
}},
|
||||||
|
on_rotate = false,
|
||||||
_mcl_blast_resistance = 2.5,
|
_mcl_blast_resistance = 2.5,
|
||||||
_mcl_hardness = 0.5,
|
_mcl_hardness = 0.5,
|
||||||
})
|
})
|
||||||
|
|
After Width: | Height: | Size: 344 B |
|
@ -0,0 +1,88 @@
|
||||||
|
# Blender v2.79 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib jeija_wall_lever_off.mtl
|
||||||
|
o nodebox1.009
|
||||||
|
v -0.070437 0.138562 0.459573
|
||||||
|
v -0.070383 0.058650 0.407149
|
||||||
|
v -0.070618 0.289563 0.117785
|
||||||
|
v -0.070672 0.369475 0.170211
|
||||||
|
v 0.054549 0.139792 0.459559
|
||||||
|
v 0.054604 0.059883 0.407135
|
||||||
|
v 0.054369 0.290797 0.117772
|
||||||
|
v 0.054313 0.370707 0.170196
|
||||||
|
vt 0.062500 0.562500
|
||||||
|
vt 0.062500 0.875000
|
||||||
|
vt 0.125000 0.875000
|
||||||
|
vt 0.125000 0.562500
|
||||||
|
vt 0.187500 0.562500
|
||||||
|
vt 0.250000 0.562500
|
||||||
|
vt 0.250000 0.875000
|
||||||
|
vt 0.187500 0.875000
|
||||||
|
vt 0.125000 0.562500
|
||||||
|
vt 0.062500 0.562500
|
||||||
|
vt 0.062500 0.875000
|
||||||
|
vt 0.125000 0.875000
|
||||||
|
vt 0.250000 0.562500
|
||||||
|
vt 0.250000 0.875000
|
||||||
|
vt 0.187500 0.875000
|
||||||
|
vt 0.187500 0.562500
|
||||||
|
vt 0.625000 0.875000
|
||||||
|
vt 0.562500 0.875000
|
||||||
|
vt 0.562500 0.937500
|
||||||
|
vt 0.625000 0.937500
|
||||||
|
vn -1.0000 -0.0008 0.0002
|
||||||
|
vn 1.0000 0.0008 -0.0002
|
||||||
|
vn -0.0076 0.7816 0.6237
|
||||||
|
vn 0.0076 -0.7816 -0.6237
|
||||||
|
vn -0.0055 0.5485 -0.8361
|
||||||
|
usemtl none.009
|
||||||
|
s off
|
||||||
|
f 1/1/1 4/2/1 3/3/1 2/4/1
|
||||||
|
f 5/5/2 6/6/2 7/7/2 8/8/2
|
||||||
|
f 1/9/3 5/10/3 8/11/3 4/12/3
|
||||||
|
f 2/13/4 3/14/4 7/15/4 6/16/4
|
||||||
|
f 4/17/5 8/18/5 7/19/5 3/20/5
|
||||||
|
o nodebox1.008
|
||||||
|
v -0.170183 0.248882 0.492124
|
||||||
|
v -0.161792 -0.249536 0.496140
|
||||||
|
v -0.161781 -0.250523 0.373114
|
||||||
|
v -0.170172 0.247894 0.369098
|
||||||
|
v 0.161753 0.245254 0.492135
|
||||||
|
v 0.170145 -0.253163 0.496151
|
||||||
|
v 0.170155 -0.254151 0.373125
|
||||||
|
v 0.161764 0.244266 0.369109
|
||||||
|
vt 0.500000 0.203100
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.203100
|
||||||
|
vt 0.500000 0.203100
|
||||||
|
vt 0.000000 0.203100
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.000000 0.203100
|
||||||
|
vt 0.000100 0.000100
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.500000 0.203100
|
||||||
|
vt 0.000000 0.203100
|
||||||
|
vt 0.000000 -0.000000
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.500000 -0.000000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt -0.000000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.500000 -0.000000
|
||||||
|
vn -0.9999 -0.0168 0.0000
|
||||||
|
vn 0.9999 0.0168 -0.0000
|
||||||
|
vn 0.0109 0.9999 -0.0080
|
||||||
|
vn -0.0109 -0.9999 0.0080
|
||||||
|
vn 0.0001 0.0081 1.0000
|
||||||
|
vn -0.0001 -0.0081 -1.0000
|
||||||
|
usemtl none.008
|
||||||
|
s off
|
||||||
|
f 9/21/6 12/22/6 11/23/6 10/24/6
|
||||||
|
f 13/25/7 14/26/7 15/27/7 16/28/7
|
||||||
|
f 9/29/8 13/25/8 16/28/8 12/30/8
|
||||||
|
f 10/31/9 11/32/9 15/33/9 14/34/9
|
||||||
|
f 9/35/10 10/36/10 14/37/10 13/38/10
|
||||||
|
f 12/39/11 16/40/11 15/41/11 11/23/11
|
|
@ -0,0 +1,88 @@
|
||||||
|
# Blender v2.79 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib jeija_wall_lever_on.mtl
|
||||||
|
o nodebox1.011
|
||||||
|
v -0.170183 0.248540 0.492297
|
||||||
|
v -0.161792 -0.249880 0.495967
|
||||||
|
v -0.161781 -0.250782 0.372940
|
||||||
|
v -0.170172 0.247638 0.369270
|
||||||
|
v 0.161753 0.244912 0.492305
|
||||||
|
v 0.170145 -0.253508 0.495975
|
||||||
|
v 0.170155 -0.254410 0.372949
|
||||||
|
v 0.161764 0.244010 0.369279
|
||||||
|
vt 0.500000 0.203100
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.203100
|
||||||
|
vt 0.500000 0.203100
|
||||||
|
vt 0.000000 0.203100
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.000000 0.203100
|
||||||
|
vt 0.000100 0.000100
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.500000 0.203100
|
||||||
|
vt 0.000000 0.203100
|
||||||
|
vt 0.000000 -0.000000
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.500000 -0.000000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt -0.000000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.500000 -0.000000
|
||||||
|
vn -0.9999 -0.0168 0.0000
|
||||||
|
vn 0.9999 0.0168 -0.0000
|
||||||
|
vn 0.0109 0.9999 -0.0073
|
||||||
|
vn -0.0109 -0.9999 0.0073
|
||||||
|
vn 0.0001 0.0074 1.0000
|
||||||
|
vn -0.0001 -0.0074 -1.0000
|
||||||
|
usemtl none.011
|
||||||
|
s off
|
||||||
|
f 1/1/1 4/2/1 3/3/1 2/4/1
|
||||||
|
f 5/5/2 6/6/2 7/7/2 8/8/2
|
||||||
|
f 1/9/3 5/5/3 8/8/3 4/10/3
|
||||||
|
f 2/11/4 3/12/4 7/13/4 6/14/4
|
||||||
|
f 1/15/5 2/16/5 6/17/5 5/18/5
|
||||||
|
f 4/19/6 8/20/6 7/21/6 3/3/6
|
||||||
|
o nodebox1.010
|
||||||
|
v 0.070437 -0.138656 0.459545
|
||||||
|
v 0.070383 -0.058733 0.407137
|
||||||
|
v -0.054604 -0.059966 0.407123
|
||||||
|
v -0.054549 -0.139886 0.459530
|
||||||
|
v 0.070618 -0.289587 0.117726
|
||||||
|
v 0.070672 -0.369510 0.170135
|
||||||
|
v -0.054369 -0.290821 0.117712
|
||||||
|
v -0.054313 -0.370742 0.170120
|
||||||
|
vt 0.062500 0.562500
|
||||||
|
vt 0.062500 0.875000
|
||||||
|
vt 0.125000 0.875000
|
||||||
|
vt 0.125000 0.562500
|
||||||
|
vt 0.187500 0.562500
|
||||||
|
vt 0.250000 0.562500
|
||||||
|
vt 0.250000 0.875000
|
||||||
|
vt 0.187500 0.875000
|
||||||
|
vt 0.125000 0.562500
|
||||||
|
vt 0.062500 0.562500
|
||||||
|
vt 0.062500 0.875000
|
||||||
|
vt 0.125000 0.875000
|
||||||
|
vt 0.250000 0.562500
|
||||||
|
vt 0.250000 0.875000
|
||||||
|
vt 0.187500 0.875000
|
||||||
|
vt 0.187500 0.562500
|
||||||
|
vt 0.625000 0.875000
|
||||||
|
vt 0.562500 0.875000
|
||||||
|
vt 0.562500 0.937500
|
||||||
|
vt 0.625000 0.937500
|
||||||
|
vn 1.0000 0.0008 0.0002
|
||||||
|
vn -1.0000 -0.0008 -0.0002
|
||||||
|
vn 0.0076 -0.7817 0.6236
|
||||||
|
vn -0.0076 0.7817 -0.6236
|
||||||
|
vn 0.0055 -0.5484 -0.8362
|
||||||
|
usemtl none.010
|
||||||
|
s off
|
||||||
|
f 9/22/7 14/23/7 13/24/7 10/25/7
|
||||||
|
f 12/26/8 11/27/8 15/28/8 16/29/8
|
||||||
|
f 9/30/9 12/31/9 16/32/9 14/33/9
|
||||||
|
f 10/34/10 13/35/10 15/36/10 11/37/10
|
||||||
|
f 14/38/11 16/39/11 15/40/11 13/41/11
|
|
@ -1,244 +0,0 @@
|
||||||
xof 0302txt 0064
|
|
||||||
// File created by CINEMA 4D
|
|
||||||
|
|
||||||
template Header {
|
|
||||||
<3D82AB43-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
SWORD major;
|
|
||||||
SWORD minor;
|
|
||||||
DWORD flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Vector {
|
|
||||||
<3D82AB5E-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
FLOAT x;
|
|
||||||
FLOAT y;
|
|
||||||
FLOAT z;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Coords2d {
|
|
||||||
<F6F23F44-7686-11cf-8F52-0040333594A3>
|
|
||||||
FLOAT u;
|
|
||||||
FLOAT v;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Matrix4x4 {
|
|
||||||
<F6F23F45-7686-11cf-8F52-0040333594A3>
|
|
||||||
array FLOAT matrix[16];
|
|
||||||
}
|
|
||||||
|
|
||||||
template ColorRGBA {
|
|
||||||
<35FF44E0-6C7C-11cf-8F52-0040333594A3>
|
|
||||||
FLOAT red;
|
|
||||||
FLOAT green;
|
|
||||||
FLOAT blue;
|
|
||||||
FLOAT alpha;
|
|
||||||
}
|
|
||||||
|
|
||||||
template ColorRGB {
|
|
||||||
<D3E16E81-7835-11cf-8F52-0040333594A3>
|
|
||||||
FLOAT red;
|
|
||||||
FLOAT green;
|
|
||||||
FLOAT blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
template IndexedColor {
|
|
||||||
<1630B820-7842-11cf-8F52-0040333594A3>
|
|
||||||
DWORD index;
|
|
||||||
ColorRGBA indexColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Boolean {
|
|
||||||
<4885AE61-78E8-11cf-8F52-0040333594A3>
|
|
||||||
SWORD truefalse;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Boolean2d {
|
|
||||||
<4885AE63-78E8-11cf-8F52-0040333594A3>
|
|
||||||
Boolean u;
|
|
||||||
Boolean v;
|
|
||||||
}
|
|
||||||
|
|
||||||
template MaterialWrap {
|
|
||||||
<4885AE60-78E8-11cf-8F52-0040333594A3>
|
|
||||||
Boolean u;
|
|
||||||
Boolean v;
|
|
||||||
}
|
|
||||||
|
|
||||||
template TextureFilename {
|
|
||||||
<A42790E1-7810-11cf-8F52-0040333594A3>
|
|
||||||
STRING filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Material {
|
|
||||||
<3D82AB4D-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
ColorRGBA faceColor;
|
|
||||||
FLOAT power;
|
|
||||||
ColorRGB specularColor;
|
|
||||||
ColorRGB emissiveColor;
|
|
||||||
[...]
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshFace {
|
|
||||||
<3D82AB5F-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
DWORD nFaceVertexIndices;
|
|
||||||
array DWORD faceVertexIndices[nFaceVertexIndices];
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshFaceWraps {
|
|
||||||
<4885AE62-78E8-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nFaceWrapValues;
|
|
||||||
Boolean2d faceWrapValues;
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshTextureCoords {
|
|
||||||
<F6F23F40-7686-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nTextureCoords;
|
|
||||||
array Coords2d textureCoords[nTextureCoords];
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshMaterialList {
|
|
||||||
<F6F23F42-7686-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nMaterials;
|
|
||||||
DWORD nFaceIndexes;
|
|
||||||
array DWORD faceIndexes[nFaceIndexes];
|
|
||||||
[Material]
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshNormals {
|
|
||||||
<F6F23F43-7686-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nNormals;
|
|
||||||
array Vector normals[nNormals];
|
|
||||||
DWORD nFaceNormals;
|
|
||||||
array MeshFace faceNormals[nFaceNormals];
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshVertexColors {
|
|
||||||
<1630B821-7842-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nVertexColors;
|
|
||||||
array IndexedColor vertexColors[nVertexColors];
|
|
||||||
}
|
|
||||||
|
|
||||||
template Mesh {
|
|
||||||
<3D82AB44-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
DWORD nVertices;
|
|
||||||
array Vector vertices[nVertices];
|
|
||||||
DWORD nFaces;
|
|
||||||
array MeshFace faces[nFaces];
|
|
||||||
[...]
|
|
||||||
}
|
|
||||||
|
|
||||||
template FrameTransformMatrix {
|
|
||||||
<F6F23F41-7686-11cf-8F52-0040333594A3>
|
|
||||||
Matrix4x4 frameMatrix;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Frame {
|
|
||||||
<3D82AB46-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
[...]
|
|
||||||
}
|
|
||||||
|
|
||||||
Header {
|
|
||||||
1;
|
|
||||||
0;
|
|
||||||
1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Mesh CINEMA4D_Mesh {
|
|
||||||
16;
|
|
||||||
// Lever1
|
|
||||||
-4.481;-4.311;-6.25;,
|
|
||||||
-44.655;43.567;-6.25;,
|
|
||||||
5.095;3.724;-6.25;,
|
|
||||||
-35.079;51.602;-6.25;,
|
|
||||||
5.095;3.724;6.25;,
|
|
||||||
-35.079;51.602;6.25;,
|
|
||||||
-4.481;-4.311;6.25;,
|
|
||||||
-44.655;43.567;6.25;,
|
|
||||||
// Lever_Hold
|
|
||||||
-25.0;-9.375;-18.75;,
|
|
||||||
-25.0;9.375;-18.75;,
|
|
||||||
25.0;-9.375;-18.75;,
|
|
||||||
25.0;9.375;-18.75;,
|
|
||||||
25.0;-9.375;18.75;,
|
|
||||||
25.0;9.375;18.75;,
|
|
||||||
-25.0;-9.375;18.75;,
|
|
||||||
-25.0;9.375;18.75;;
|
|
||||||
|
|
||||||
12;
|
|
||||||
// Lever1
|
|
||||||
4;0,1,3,2;,
|
|
||||||
4;2,3,5,4;,
|
|
||||||
4;4,5,7,6;,
|
|
||||||
4;6,7,1,0;,
|
|
||||||
4;1,7,5,3;,
|
|
||||||
4;6,0,2,4;,
|
|
||||||
// Lever_Hold
|
|
||||||
4;8,9,11,10;,
|
|
||||||
4;10,11,13,12;,
|
|
||||||
4;12,13,15,14;,
|
|
||||||
4;14,15,9,8;,
|
|
||||||
4;9,15,13,11;,
|
|
||||||
4;14,8,10,12;;
|
|
||||||
|
|
||||||
MeshNormals {
|
|
||||||
16;
|
|
||||||
// Lever1
|
|
||||||
0.088;-0.161;-0.036;,
|
|
||||||
-0.144;0.115;-0.036;,
|
|
||||||
0.144;-0.115;-0.036;,
|
|
||||||
-0.088;0.161;-0.036;,
|
|
||||||
0.144;-0.115;0.036;,
|
|
||||||
-0.088;0.161;0.036;,
|
|
||||||
0.088;-0.161;0.036;,
|
|
||||||
-0.144;0.115;0.036;,
|
|
||||||
// Lever_Hold
|
|
||||||
-0.144;-0.054;-0.108;,
|
|
||||||
-0.144;0.054;-0.108;,
|
|
||||||
0.144;-0.054;-0.108;,
|
|
||||||
0.144;0.054;-0.108;,
|
|
||||||
0.144;-0.054;0.108;,
|
|
||||||
0.144;0.054;0.108;,
|
|
||||||
-0.144;-0.054;0.108;,
|
|
||||||
-0.144;0.054;0.108;;
|
|
||||||
|
|
||||||
12;
|
|
||||||
// Lever1
|
|
||||||
4;0,1,3,2;,
|
|
||||||
4;2,3,5,4;,
|
|
||||||
4;4,5,7,6;,
|
|
||||||
4;6,7,1,0;,
|
|
||||||
4;1,7,5,3;,
|
|
||||||
4;6,0,2,4;,
|
|
||||||
// Lever_Hold
|
|
||||||
4;8,9,11,10;,
|
|
||||||
4;10,11,13,12;,
|
|
||||||
4;12,13,15,14;,
|
|
||||||
4;14,15,9,8;,
|
|
||||||
4;9,15,13,11;,
|
|
||||||
4;14,8,10,12;;
|
|
||||||
|
|
||||||
}
|
|
||||||
MeshTextureCoords {
|
|
||||||
16;
|
|
||||||
// Lever1
|
|
||||||
0.027;0.399;,
|
|
||||||
0.027;0.437;,
|
|
||||||
0.035;0.399;,
|
|
||||||
0.035;0.437;,
|
|
||||||
0.035;0.437;,
|
|
||||||
0.035;0.399;,
|
|
||||||
0.027;0.437;,
|
|
||||||
0.027;0.399;,
|
|
||||||
// Lever_Hold
|
|
||||||
0.0;0.063;,
|
|
||||||
0.0;0.086;,
|
|
||||||
0.031;0.063;,
|
|
||||||
0.031;0.086;,
|
|
||||||
0.031;0.086;,
|
|
||||||
0.031;0.063;,
|
|
||||||
0.0;0.086;,
|
|
||||||
0.0;0.063;;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,274 +0,0 @@
|
||||||
xof 0302txt 0064
|
|
||||||
// File created by CINEMA 4D
|
|
||||||
|
|
||||||
template Header {
|
|
||||||
<3D82AB43-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
SWORD major;
|
|
||||||
SWORD minor;
|
|
||||||
DWORD flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Vector {
|
|
||||||
<3D82AB5E-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
FLOAT x;
|
|
||||||
FLOAT y;
|
|
||||||
FLOAT z;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Coords2d {
|
|
||||||
<F6F23F44-7686-11cf-8F52-0040333594A3>
|
|
||||||
FLOAT u;
|
|
||||||
FLOAT v;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Matrix4x4 {
|
|
||||||
<F6F23F45-7686-11cf-8F52-0040333594A3>
|
|
||||||
array FLOAT matrix[16];
|
|
||||||
}
|
|
||||||
|
|
||||||
template ColorRGBA {
|
|
||||||
<35FF44E0-6C7C-11cf-8F52-0040333594A3>
|
|
||||||
FLOAT red;
|
|
||||||
FLOAT green;
|
|
||||||
FLOAT blue;
|
|
||||||
FLOAT alpha;
|
|
||||||
}
|
|
||||||
|
|
||||||
template ColorRGB {
|
|
||||||
<D3E16E81-7835-11cf-8F52-0040333594A3>
|
|
||||||
FLOAT red;
|
|
||||||
FLOAT green;
|
|
||||||
FLOAT blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
template IndexedColor {
|
|
||||||
<1630B820-7842-11cf-8F52-0040333594A3>
|
|
||||||
DWORD index;
|
|
||||||
ColorRGBA indexColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Boolean {
|
|
||||||
<4885AE61-78E8-11cf-8F52-0040333594A3>
|
|
||||||
SWORD truefalse;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Boolean2d {
|
|
||||||
<4885AE63-78E8-11cf-8F52-0040333594A3>
|
|
||||||
Boolean u;
|
|
||||||
Boolean v;
|
|
||||||
}
|
|
||||||
|
|
||||||
template MaterialWrap {
|
|
||||||
<4885AE60-78E8-11cf-8F52-0040333594A3>
|
|
||||||
Boolean u;
|
|
||||||
Boolean v;
|
|
||||||
}
|
|
||||||
|
|
||||||
template TextureFilename {
|
|
||||||
<A42790E1-7810-11cf-8F52-0040333594A3>
|
|
||||||
STRING filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Material {
|
|
||||||
<3D82AB4D-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
ColorRGBA faceColor;
|
|
||||||
FLOAT power;
|
|
||||||
ColorRGB specularColor;
|
|
||||||
ColorRGB emissiveColor;
|
|
||||||
[...]
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshFace {
|
|
||||||
<3D82AB5F-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
DWORD nFaceVertexIndices;
|
|
||||||
array DWORD faceVertexIndices[nFaceVertexIndices];
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshFaceWraps {
|
|
||||||
<4885AE62-78E8-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nFaceWrapValues;
|
|
||||||
Boolean2d faceWrapValues;
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshTextureCoords {
|
|
||||||
<F6F23F40-7686-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nTextureCoords;
|
|
||||||
array Coords2d textureCoords[nTextureCoords];
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshMaterialList {
|
|
||||||
<F6F23F42-7686-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nMaterials;
|
|
||||||
DWORD nFaceIndexes;
|
|
||||||
array DWORD faceIndexes[nFaceIndexes];
|
|
||||||
[Material]
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshNormals {
|
|
||||||
<F6F23F43-7686-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nNormals;
|
|
||||||
array Vector normals[nNormals];
|
|
||||||
DWORD nFaceNormals;
|
|
||||||
array MeshFace faceNormals[nFaceNormals];
|
|
||||||
}
|
|
||||||
|
|
||||||
template MeshVertexColors {
|
|
||||||
<1630B821-7842-11cf-8F52-0040333594A3>
|
|
||||||
DWORD nVertexColors;
|
|
||||||
array IndexedColor vertexColors[nVertexColors];
|
|
||||||
}
|
|
||||||
|
|
||||||
template Mesh {
|
|
||||||
<3D82AB44-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
DWORD nVertices;
|
|
||||||
array Vector vertices[nVertices];
|
|
||||||
DWORD nFaces;
|
|
||||||
array MeshFace faces[nFaces];
|
|
||||||
[...]
|
|
||||||
}
|
|
||||||
|
|
||||||
template FrameTransformMatrix {
|
|
||||||
<F6F23F41-7686-11cf-8F52-0040333594A3>
|
|
||||||
Matrix4x4 frameMatrix;
|
|
||||||
}
|
|
||||||
|
|
||||||
template Frame {
|
|
||||||
<3D82AB46-62DA-11cf-AB39-0020AF71E433>
|
|
||||||
[...]
|
|
||||||
}
|
|
||||||
|
|
||||||
Header {
|
|
||||||
1;
|
|
||||||
0;
|
|
||||||
1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Mesh CINEMA4D_Mesh {
|
|
||||||
16;
|
|
||||||
// Lever1
|
|
||||||
4.968;-3.861;6.175;,
|
|
||||||
44.767;43.898;-0.249;,
|
|
||||||
-4.623;4.154;6.346;,
|
|
||||||
35.177;51.913;-0.078;,
|
|
||||||
-5.577;3.277;-6.087;,
|
|
||||||
34.222;51.036;-12.511;,
|
|
||||||
4.014;-4.738;-6.258;,
|
|
||||||
43.813;43.021;-12.682;,
|
|
||||||
// Lever_Hold
|
|
||||||
-25.0;-9.375;-18.75;,
|
|
||||||
-25.0;9.375;-18.75;,
|
|
||||||
25.0;-9.375;-18.75;,
|
|
||||||
25.0;9.375;-18.75;,
|
|
||||||
25.0;-9.375;18.75;,
|
|
||||||
25.0;9.375;18.75;,
|
|
||||||
-25.0;-9.375;18.75;,
|
|
||||||
-25.0;9.375;18.75;;
|
|
||||||
|
|
||||||
12;
|
|
||||||
// Lever1
|
|
||||||
4;0,1,3,2;,
|
|
||||||
4;2,3,5,4;,
|
|
||||||
4;4,5,7,6;,
|
|
||||||
4;6,7,1,0;,
|
|
||||||
4;1,7,5,3;,
|
|
||||||
4;6,0,2,4;,
|
|
||||||
// Lever_Hold
|
|
||||||
4;8,9,11,10;,
|
|
||||||
4;10,11,13,12;,
|
|
||||||
4;12,13,15,14;,
|
|
||||||
4;14,15,9,8;,
|
|
||||||
4;9,15,13,11;,
|
|
||||||
4;14,8,10,12;;
|
|
||||||
|
|
||||||
MeshNormals {
|
|
||||||
16;
|
|
||||||
// Lever1
|
|
||||||
-0.084;-0.158;0.054;,
|
|
||||||
0.145;0.117;0.017;,
|
|
||||||
-0.14;-0.112;0.055;,
|
|
||||||
0.09;0.164;0.018;,
|
|
||||||
-0.145;-0.117;-0.017;,
|
|
||||||
0.084;0.158;-0.054;,
|
|
||||||
-0.09;-0.164;-0.018;,
|
|
||||||
0.14;0.112;-0.055;,
|
|
||||||
// Lever_Hold
|
|
||||||
-0.144;-0.054;-0.108;,
|
|
||||||
-0.144;0.054;-0.108;,
|
|
||||||
0.144;-0.054;-0.108;,
|
|
||||||
0.144;0.054;-0.108;,
|
|
||||||
0.144;-0.054;0.108;,
|
|
||||||
0.144;0.054;0.108;,
|
|
||||||
-0.144;-0.054;0.108;,
|
|
||||||
-0.144;0.054;0.108;;
|
|
||||||
|
|
||||||
12;
|
|
||||||
// Lever1
|
|
||||||
4;0,1,3,2;,
|
|
||||||
4;2,3,5,4;,
|
|
||||||
4;4,5,7,6;,
|
|
||||||
4;6,7,1,0;,
|
|
||||||
4;1,7,5,3;,
|
|
||||||
4;6,0,2,4;,
|
|
||||||
// Lever_Hold
|
|
||||||
4;8,9,11,10;,
|
|
||||||
4;10,11,13,12;,
|
|
||||||
4;12,13,15,14;,
|
|
||||||
4;14,15,9,8;,
|
|
||||||
4;9,15,13,11;,
|
|
||||||
4;14,8,10,12;;
|
|
||||||
|
|
||||||
}
|
|
||||||
MeshTextureCoords {
|
|
||||||
16;
|
|
||||||
// Lever1
|
|
||||||
0.027;0.399;,
|
|
||||||
0.027;0.437;,
|
|
||||||
0.035;0.399;,
|
|
||||||
0.035;0.437;,
|
|
||||||
0.035;0.437;,
|
|
||||||
0.035;0.399;,
|
|
||||||
0.027;0.437;,
|
|
||||||
0.027;0.399;,
|
|
||||||
// Lever_Hold
|
|
||||||
0.0;0.063;,
|
|
||||||
0.0;0.086;,
|
|
||||||
0.031;0.063;,
|
|
||||||
0.031;0.086;,
|
|
||||||
0.031;0.086;,
|
|
||||||
0.031;0.063;,
|
|
||||||
0.0;0.086;,
|
|
||||||
0.0;0.063;;
|
|
||||||
}
|
|
||||||
MeshMaterialList {
|
|
||||||
2;
|
|
||||||
12;
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1;
|
|
||||||
|
|
||||||
Material C4DMAT_NONE {
|
|
||||||
1.0;1.0;1.0;1.0;;
|
|
||||||
1.0;
|
|
||||||
0.0;0.0;0.0;;
|
|
||||||
0.0;0.0;0.0;;
|
|
||||||
}
|
|
||||||
Material C4DMAT_Terrain {
|
|
||||||
1.0;1.0;1.0;1.0;;
|
|
||||||
1.0;
|
|
||||||
0.0;0.0;0.0;;
|
|
||||||
0.0;0.0;0.0;;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 304 B |
|
@ -68,12 +68,7 @@ end
|
||||||
-- Cocoa definition
|
-- Cocoa definition
|
||||||
-- 1st stage
|
-- 1st stage
|
||||||
|
|
||||||
--[[ TODO (code quality): Turn the cocoa nodes into attached nodes and make use of wallmounted. This is much better
|
--[[ TODO: Use a mesh for cocoas for perfect texture compability. ]]
|
||||||
than the current ugly hacky check after digging a jungle tree (in mcl_core).
|
|
||||||
Problem: If we want to use wallmounted, we MUST use a mesh, since wallmounted does not support
|
|
||||||
nodeboxes with multiple boxes. :-(
|
|
||||||
Using meshes will also clean up the texture mess.
|
|
||||||
]]
|
|
||||||
local crop_def = {
|
local crop_def = {
|
||||||
description = "Premature Cocoa",
|
description = "Premature Cocoa",
|
||||||
_doc_items_create_entry = true,
|
_doc_items_create_entry = true,
|
||||||
|
@ -110,7 +105,7 @@ local crop_def = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {
|
groups = {
|
||||||
handy=1,axey=1, cocoa=1, not_in_creative_inventory=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1
|
handy=1,axey=1, cocoa=1, not_in_creative_inventory=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1,
|
||||||
},
|
},
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
_mcl_blast_resistance = 15,
|
_mcl_blast_resistance = 15,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
-- Tree nodes: Wood, Wooden Planks, Sapling, Leaves
|
-- Tree nodes: Wood, Wooden Planks, Sapling, Leaves
|
||||||
|
|
||||||
-- Register tree trunk (wood) and bark
|
-- Register tree trunk (wood) and bark
|
||||||
local register_tree_trunk = function(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark, after_dig_node)
|
local register_tree_trunk = function(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark)
|
||||||
minetest.register_node("mcl_core:"..subname, {
|
minetest.register_node("mcl_core:"..subname, {
|
||||||
description = description_trunk,
|
description = description_trunk,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
|
@ -14,8 +14,6 @@ local register_tree_trunk = function(subname, description_trunk, description_bar
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
_mcl_blast_resistance = 10,
|
_mcl_blast_resistance = 10,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
|
|
||||||
after_dig_node = after_dig_node,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_core:"..subname.."_bark", {
|
minetest.register_node("mcl_core:"..subname.."_bark", {
|
||||||
|
@ -146,37 +144,12 @@ end
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
-- This is a bad bad workaround which is only done because cocoas are not wallmounted (but should)
|
|
||||||
-- As long cocoas only EVER stick to jungle trees, and nothing else, this is probably a lesser sin.
|
|
||||||
local jungle_tree_after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|
||||||
-- Drop attached cocoas
|
|
||||||
local posses = {
|
|
||||||
{ x = pos.x + 1, y = pos.y, z = pos.z },
|
|
||||||
{ x = pos.x - 1, y = pos.y, z = pos.z },
|
|
||||||
{ x = pos.x, y = pos.y, z = pos.z + 1 },
|
|
||||||
{ x = pos.x, y = pos.y, z = pos.z - 1 },
|
|
||||||
}
|
|
||||||
for p=1, #posses do
|
|
||||||
local node = minetest.get_node(posses[p])
|
|
||||||
local g = minetest.get_item_group(node.name, "cocoa")
|
|
||||||
if g and g >= 1 then
|
|
||||||
minetest.remove_node(posses[p])
|
|
||||||
local drops = minetest.get_node_drops(node.name, "")
|
|
||||||
for d=1, #drops do
|
|
||||||
minetest.add_item(posses[p], drops[d])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
register_tree_trunk("tree", "Oak Wood", "Oak Bark", "The trunk of an oak tree.", "default_tree_top.png", "default_tree.png")
|
register_tree_trunk("tree", "Oak Wood", "Oak Bark", "The trunk of an oak tree.", "default_tree_top.png", "default_tree.png")
|
||||||
register_tree_trunk("darktree", "Dark Oak Wood", "Dark Oak Bark", "The trunk of a dark oak tree.", "mcl_core_log_big_oak_top.png", "mcl_core_log_big_oak.png")
|
register_tree_trunk("darktree", "Dark Oak Wood", "Dark Oak Bark", "The trunk of a dark oak tree.", "mcl_core_log_big_oak_top.png", "mcl_core_log_big_oak.png")
|
||||||
register_tree_trunk("acaciatree", "Acacia Wood", "Acacia Bark", "The trunk of an acacia.", "default_acacia_tree_top.png", "default_acacia_tree.png")
|
register_tree_trunk("acaciatree", "Acacia Wood", "Acacia Bark", "The trunk of an acacia.", "default_acacia_tree_top.png", "default_acacia_tree.png")
|
||||||
register_tree_trunk("sprucetree", "Spruce Wood", "Spruce Bark", "The trunk of a spruce tree.", "mcl_core_log_spruce_top.png", "mcl_core_log_spruce.png")
|
register_tree_trunk("sprucetree", "Spruce Wood", "Spruce Bark", "The trunk of a spruce tree.", "mcl_core_log_spruce_top.png", "mcl_core_log_spruce.png")
|
||||||
register_tree_trunk("birchtree", "Birch Wood", "Birch Bark", "The trunk of a birch tree.", "mcl_core_log_birch_top.png", "mcl_core_log_birch.png")
|
register_tree_trunk("birchtree", "Birch Wood", "Birch Bark", "The trunk of a birch tree.", "mcl_core_log_birch_top.png", "mcl_core_log_birch.png")
|
||||||
|
register_tree_trunk("jungletree", "Jungle Wood", "Jungle Bark", "The trunk of a jungle tree.", "default_jungletree_top.png", "default_jungletree.png")
|
||||||
register_tree_trunk("jungletree", "Jungle Wood", "Jungle Bark", "The trunk of a jungle tree.", "default_jungletree_top.png", "default_jungletree.png", jungle_tree_after_dig_node)
|
|
||||||
|
|
||||||
|
|
||||||
register_wooden_planks("wood", "Oak Wood Planks", {"default_wood.png"})
|
register_wooden_planks("wood", "Oak Wood Planks", {"default_wood.png"})
|
||||||
register_wooden_planks("darkwood", "Dark Oak Wood Planks", {"mcl_core_planks_big_oak.png"})
|
register_wooden_planks("darkwood", "Dark Oak Wood Planks", {"mcl_core_planks_big_oak.png"})
|
||||||
|
|