mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 15:45:10 +00:00
Add ender chest
This commit is contained in:
parent
b85683ecdd
commit
21da583c51
10 changed files with 57 additions and 6 deletions
|
@ -1 +1,2 @@
|
||||||
mcl_core
|
mcl_core
|
||||||
|
mcl_end
|
||||||
|
|
|
@ -95,7 +95,6 @@ minetest.register_node("mcl_chests:chest", {
|
||||||
else
|
else
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[9,8.75]"..
|
"size[9,8.75]"..
|
||||||
"background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]"..
|
|
||||||
mcl_core.inventory_header..
|
mcl_core.inventory_header..
|
||||||
"list[current_name;main;0,0.5;9,3;]"..
|
"list[current_name;main;0,0.5;9,3;]"..
|
||||||
"list[current_player;main;0,4.5;9,3;9]"..
|
"list[current_player;main;0,4.5;9,3;9]"..
|
||||||
|
@ -258,3 +257,45 @@ minetest.register_craft({
|
||||||
{'group:wood', 'group:wood', 'group:wood'},
|
{'group:wood', 'group:wood', 'group:wood'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_chests:ender_chest", {
|
||||||
|
description = "Ender Chest",
|
||||||
|
tiles = {"mcl_chests_ender_chest_top.png", "mcl_chests_ender_chest_bottom.png",
|
||||||
|
"mcl_chests_ender_chest_right.png", "mcl_chests_ender_chest_left.png",
|
||||||
|
"mcl_chests_ender_chest_back.png", "mcl_chests_ender_chest_front.png"},
|
||||||
|
groups = {cracky=1, deco_block=1},
|
||||||
|
is_ground_content = false,
|
||||||
|
light_source = 7,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
sounds = mcl_core.node_sound_stone_defaults(),
|
||||||
|
drop = "mcl_core:obsidian 8",
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("formspec",
|
||||||
|
"size[9,8.75]"..
|
||||||
|
mcl_core.inventory_header..
|
||||||
|
"background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]"..
|
||||||
|
"list[current_player;enderchest;0,0.5;9,3;]"..
|
||||||
|
"list[current_player;main;0,4.5;9,3;9]"..
|
||||||
|
"list[current_player;main;0,7.74;9,1;]"..
|
||||||
|
"listring[current_player;enderchest]"..
|
||||||
|
"listring[current_player;main]")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
local inv = player:get_inventory()
|
||||||
|
inv:set_size("enderchest", 9*3)
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'mcl_chests:ender_chest',
|
||||||
|
recipe = {
|
||||||
|
{'mcl_core:obsidian', 'mcl_core:obsidian', 'mcl_core:obsidian'},
|
||||||
|
{'mcl_core:obsidian', 'mcl_end:ender_eye', 'mcl_core:obsidian'},
|
||||||
|
{'mcl_core:obsidian', 'mcl_core:obsidian', 'mcl_core:obsidian'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_back.png
Normal file
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_bottom.png
Normal file
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_bottom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_front.png
Normal file
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_front.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_left.png
Normal file
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_right.png
Normal file
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_top.png
Normal file
BIN
mods/mcl_chests/textures/mcl_chests_ender_chest_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -438,7 +438,7 @@ function mcl_core.duengen(pointed_thing)
|
||||||
generate_tree(pos, "mcl_core:tree", "mcl_core:leaves", 1)
|
generate_tree(pos, "mcl_core:tree", "mcl_core:leaves", 1)
|
||||||
return true
|
return true
|
||||||
elseif string.find(n.name, "mcl_farming:wheat_") ~= nil then
|
elseif string.find(n.name, "mcl_farming:wheat_") ~= nil then
|
||||||
stage = string.sub(n.name, 15)
|
stage = string.sub(n.name, -1)
|
||||||
if stage == "3" then
|
if stage == "3" then
|
||||||
minetest.add_node(pos, {name="mcl_farming:wheat"})
|
minetest.add_node(pos, {name="mcl_farming:wheat"})
|
||||||
elseif math.random(1,5) < 3 then
|
elseif math.random(1,5) < 3 then
|
||||||
|
@ -448,15 +448,23 @@ function mcl_core.duengen(pointed_thing)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
elseif string.find(n.name, "mcl_farming:potato_") ~= nil then
|
elseif string.find(n.name, "mcl_farming:potato_") ~= nil then
|
||||||
stage = tonumber(string.sub(n.name, 16))
|
stage = tonumber(string.sub(n.name, -1))
|
||||||
if stage == 1 then
|
if stage == 1 then
|
||||||
minetest.add_node(pos, {name="mcl_farming:potato_"..math.random(stage,2)})
|
minetest.add_node(pos, {name="mcl_farming:potato_"..math.random(stage,2)})
|
||||||
else
|
else
|
||||||
minetest.add_node(pos, {name="mcl_farming:potato"})
|
minetest.add_node(pos, {name="mcl_farming:potato"})
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
elseif string.find(n.name, "mcl_farming:beetroot_") ~= nil then
|
||||||
|
stage = tonumber(string.sub(n.name, -1))
|
||||||
|
if stage == 1 then
|
||||||
|
minetest.add_node(pos, {name="mcl_farming:beetroot_"..math.random(stage,2)})
|
||||||
|
else
|
||||||
|
minetest.add_node(pos, {name="mcl_farming:beetroot"})
|
||||||
|
end
|
||||||
|
return true
|
||||||
elseif string.find(n.name, "mcl_farming:carrot_") ~= nil then
|
elseif string.find(n.name, "mcl_farming:carrot_") ~= nil then
|
||||||
stage = tonumber(string.sub(n.name, 16))
|
stage = tonumber(string.sub(n.name, -1))
|
||||||
if stage == 1 then
|
if stage == 1 then
|
||||||
minetest.add_node(pos, {name="mcl_farming:carrot_"..math.random(stage,2)})
|
minetest.add_node(pos, {name="mcl_farming:carrot_"..math.random(stage,2)})
|
||||||
else
|
else
|
||||||
|
@ -464,7 +472,7 @@ function mcl_core.duengen(pointed_thing)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
elseif string.find(n.name, "mcl_farming:pumpkin_") ~= nil then
|
elseif string.find(n.name, "mcl_farming:pumpkin_") ~= nil then
|
||||||
stage = tonumber(string.sub(n.name, 17))
|
stage = tonumber(string.sub(n.name, -1))
|
||||||
if stage == 1 then
|
if stage == 1 then
|
||||||
minetest.add_node(pos, {name="mcl_farming:pumpkin_"..math.random(stage,2)})
|
minetest.add_node(pos, {name="mcl_farming:pumpkin_"..math.random(stage,2)})
|
||||||
else
|
else
|
||||||
|
@ -472,7 +480,7 @@ function mcl_core.duengen(pointed_thing)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
elseif string.find(n.name, "mcl_farming:melontige_") ~= nil then
|
elseif string.find(n.name, "mcl_farming:melontige_") ~= nil then
|
||||||
stage = tonumber(string.sub(n.name, 18))
|
stage = tonumber(string.sub(n.name, -1))
|
||||||
if stage == 1 then
|
if stage == 1 then
|
||||||
minetest.add_node(pos, {name="mcl_farming:melontige_"..math.random(stage,2)})
|
minetest.add_node(pos, {name="mcl_farming:melontige_"..math.random(stage,2)})
|
||||||
else
|
else
|
||||||
|
|
|
@ -130,6 +130,7 @@ mesecon:register_mvps_stopper("mcl_core:barrier")
|
||||||
mesecon:register_mvps_stopper("mcl_chests:chest")
|
mesecon:register_mvps_stopper("mcl_chests:chest")
|
||||||
mesecon:register_mvps_stopper("mcl_chests:chest_left")
|
mesecon:register_mvps_stopper("mcl_chests:chest_left")
|
||||||
mesecon:register_mvps_stopper("mcl_chests:chest_right")
|
mesecon:register_mvps_stopper("mcl_chests:chest_right")
|
||||||
|
mesecon:register_mvps_stopper("mcl_chests:ender_chest")
|
||||||
mesecon:register_mvps_stopper("mcl_furnaces:furnace")
|
mesecon:register_mvps_stopper("mcl_furnaces:furnace")
|
||||||
mesecon:register_mvps_stopper("mcl_furnaces:furnace_active")
|
mesecon:register_mvps_stopper("mcl_furnaces:furnace_active")
|
||||||
mesecon:register_mvps_stopper("mcl_hoppers:hopper")
|
mesecon:register_mvps_stopper("mcl_hoppers:hopper")
|
||||||
|
|
Loading…
Reference in a new issue