forked from VoxeLibre/VoxeLibre
Compare commits
33 Commits
master
...
Bamboo-Pis
Author | SHA1 | Date |
---|---|---|
Michieal | f81d530912 | |
Michieal | 14383d6c6f | |
Michieal | a5bdc8a166 | |
Michieal | ae62f567e6 | |
ancientmarinerdev | 51a1dfee56 | |
ancientmarinerdev | c3e6bbd871 | |
ancientmarinerdev | da3a576637 | |
ancientmarinerdev | 01a4eea631 | |
anarquimico | afe111de5b | |
anarquimico | 1dc6b03b01 | |
anarquimico | f4ca472b42 | |
anarquimico | fd23bbe553 | |
anarquimico | dedbc64c59 | |
Michieal | 35ff3e9f48 | |
Michieal | 05f86a5f89 | |
Michieal | e285079507 | |
Michieal | 2ca0e286fe | |
Michieal | cb5acc782a | |
Michieal | 973300357d | |
Michieal | 91b4f7a2de | |
Michieal | bceacd59b1 | |
Michieal | 03379ba0d7 | |
Michieal | b4eaf1c7ce | |
Michieal | 4593f84145 | |
Michieal | 7039bf9e7d | |
Michieal | 865d260f83 | |
Michieal | dfa849e19a | |
Michieal | 76507025d9 | |
Michieal | acf2fbdaed | |
Michieal | 5dff9e1994 | |
Michieal | a44566f863 | |
Michieal | 449cbdb330 | |
Michieal | 83bc60722d |
|
@ -477,6 +477,19 @@ mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_black")
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_brown")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_brown")
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue")
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink")
|
||||||
|
-- Bamboo
|
||||||
|
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo")
|
||||||
|
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_endcap")
|
||||||
|
|
||||||
|
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_1")
|
||||||
|
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_2")
|
||||||
|
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_3")
|
||||||
|
|
||||||
|
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_door")
|
||||||
|
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_trapdoor")
|
||||||
|
mesecon.register_mvps_unsticky("mcl_signs:wall_sign_bamboo")
|
||||||
|
mesecon.register_mvps_unsticky("mcl_bamboo:scaffolding")
|
||||||
|
|
||||||
-- Beds
|
-- Beds
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_black_top")
|
mesecon.register_mvps_unsticky("mcl_beds:bed_black_top")
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_black_bottom")
|
mesecon.register_mvps_unsticky("mcl_beds:bed_black_bottom")
|
||||||
|
|
|
@ -29,7 +29,7 @@ local bamboo_def = {
|
||||||
tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"},
|
tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {handy = 1, axey = 1, choppy = 1, flammable = 3},
|
groups = {handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3},
|
||||||
sounds = node_sound,
|
sounds = node_sound,
|
||||||
|
|
||||||
drop = {
|
drop = {
|
||||||
|
@ -293,7 +293,6 @@ local bamboo_block_def = {
|
||||||
|
|
||||||
return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under)))
|
return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under)))
|
||||||
end,
|
end,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_node("mcl_bamboo:bamboo_block", bamboo_block_def)
|
minetest.register_node("mcl_bamboo:bamboo_block", bamboo_block_def)
|
||||||
|
|
|
@ -279,7 +279,7 @@ minetest.register_node(SCAFFOLDING_NAME, {
|
||||||
climbable = true,
|
climbable = true,
|
||||||
physical = true,
|
physical = true,
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, falling_node = 1, stack_falling = 1},
|
groups = { handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, dig_by_piston = 1, falling_node = 1, stack_falling = 1 },
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
_mcl_blast_resistance = 0,
|
_mcl_blast_resistance = 0,
|
||||||
_mcl_hardness = 0,
|
_mcl_hardness = 0,
|
||||||
|
|
|
@ -67,6 +67,31 @@ end
|
||||||
|
|
||||||
local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap"
|
local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap"
|
||||||
|
|
||||||
|
-- For when I learn more about the pistons...
|
||||||
|
function mcl_bamboo.break_orphaned(pos)
|
||||||
|
local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0))
|
||||||
|
local node_name = node_below.name
|
||||||
|
|
||||||
|
-- short circuit checks.
|
||||||
|
if mcl_bamboo.is_dirt(node_name) or mcl_bamboo.is_bamboo(node_name) or mcl_bamboo.is_bamboo(minetest.get_node(pos).name) == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- dig the node.
|
||||||
|
minetest.remove_node(pos) -- if that fails, remove the node
|
||||||
|
local istack = ItemStack("mcl_bamboo:bamboo")
|
||||||
|
local sound_params = {
|
||||||
|
pos = pos,
|
||||||
|
gain = 1.0, -- default
|
||||||
|
max_hear_distance = 10, -- default, uses a Euclidean metric
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true)
|
||||||
|
minetest.add_item(pos, istack)
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
|
||||||
function mcl_bamboo.grow_bamboo(pos, bonemeal_applied)
|
function mcl_bamboo.grow_bamboo(pos, bonemeal_applied)
|
||||||
local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0))
|
local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0))
|
||||||
mcl_bamboo.mcl_log("Grow bamboo called; bonemeal: " .. tostring(bonemeal_applied))
|
mcl_bamboo.mcl_log("Grow bamboo called; bonemeal: " .. tostring(bonemeal_applied))
|
||||||
|
|
|
@ -26,6 +26,7 @@ dofile(minetest.get_modpath(modname) .. "/recipes.lua")
|
||||||
|
|
||||||
--ABMs
|
--ABMs
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
|
label = "Bamboo Grow",
|
||||||
nodenames = mcl_bamboo.bamboo_index,
|
nodenames = mcl_bamboo.bamboo_index,
|
||||||
interval = 10,
|
interval = 10,
|
||||||
chance = 20,
|
chance = 20,
|
||||||
|
@ -34,6 +35,43 @@ minetest.register_abm({
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("mesecons_mvps") then
|
||||||
|
if mesecons_mvps then
|
||||||
|
for x = 1, #mcl_bamboo.bamboo_index do
|
||||||
|
mesecon.register_mvps_dropper(mcl_bamboo.bamboo_index[x], mcl_bamboo.break_orphaned)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Break Orphaned Bamboo",
|
||||||
|
nodenames = mcl_bamboo.bamboo_index,
|
||||||
|
interval = 1.5,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos, _)
|
||||||
|
local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0))
|
||||||
|
local node_name = node_below.name
|
||||||
|
|
||||||
|
-- short circuit checks.
|
||||||
|
if mcl_bamboo.is_dirt(node_name) or mcl_bamboo.is_bamboo(node_name) or mcl_bamboo.is_bamboo(minetest.get_node(pos).name) == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- dig the node.
|
||||||
|
minetest.remove_node(pos) -- if that fails, remove the node
|
||||||
|
local istack = ItemStack("mcl_bamboo:bamboo")
|
||||||
|
local sound_params = {
|
||||||
|
pos = pos,
|
||||||
|
gain = 1.0, -- default
|
||||||
|
max_hear_distance = 10, -- default, uses a Euclidean metric
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true)
|
||||||
|
minetest.add_item(pos, istack)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- Base Aliases.
|
-- Base Aliases.
|
||||||
local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding"
|
local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding"
|
||||||
minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block")
|
minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name = mcl_bamboo
|
name = mcl_bamboo
|
||||||
depends = mcl_core, mcl_sounds, mcl_tools
|
depends = mcl_core, mcl_sounds, mcl_tools
|
||||||
optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button
|
optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button, mesecons_mvps
|
||||||
author = Michieal
|
author = Michieal
|
|
@ -45,8 +45,8 @@ minetest.register_craft({
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = BAMBOO .. "_mosaic",
|
output = BAMBOO .. "_mosaic",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"mcl_stair:slab_bamboo_plank"},
|
{"mcl_stairs:slab_bamboo_plank"},
|
||||||
{"mcl_stair:slab_bamboo_plank"},
|
{"mcl_stairs:slab_bamboo_plank"},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue