diff --git a/mods/mcl_chests/depends.txt b/mods/mcl_chests/depends.txt index 315237e07..cf343b242 100644 --- a/mods/mcl_chests/depends.txt +++ b/mods/mcl_chests/depends.txt @@ -1 +1,2 @@ mcl_core +mcl_end diff --git a/mods/mcl_chests/init.lua b/mods/mcl_chests/init.lua index 13c586aaa..aafd460cc 100644 --- a/mods/mcl_chests/init.lua +++ b/mods/mcl_chests/init.lua @@ -95,7 +95,6 @@ minetest.register_node("mcl_chests:chest", { else meta:set_string("formspec", "size[9,8.75]".. - "background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]".. mcl_core.inventory_header.. "list[current_name;main;0,0.5;9,3;]".. "list[current_player;main;0,4.5;9,3;9]".. @@ -258,3 +257,45 @@ minetest.register_craft({ {'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'}, + } +}) + + diff --git a/mods/mcl_chests/textures/mcl_chests_ender_chest_back.png b/mods/mcl_chests/textures/mcl_chests_ender_chest_back.png new file mode 100644 index 000000000..b0c558cf2 Binary files /dev/null and b/mods/mcl_chests/textures/mcl_chests_ender_chest_back.png differ diff --git a/mods/mcl_chests/textures/mcl_chests_ender_chest_bottom.png b/mods/mcl_chests/textures/mcl_chests_ender_chest_bottom.png new file mode 100644 index 000000000..f126b51cf Binary files /dev/null and b/mods/mcl_chests/textures/mcl_chests_ender_chest_bottom.png differ diff --git a/mods/mcl_chests/textures/mcl_chests_ender_chest_front.png b/mods/mcl_chests/textures/mcl_chests_ender_chest_front.png new file mode 100644 index 000000000..0956799d2 Binary files /dev/null and b/mods/mcl_chests/textures/mcl_chests_ender_chest_front.png differ diff --git a/mods/mcl_chests/textures/mcl_chests_ender_chest_left.png b/mods/mcl_chests/textures/mcl_chests_ender_chest_left.png new file mode 100644 index 000000000..c4ef00dfc Binary files /dev/null and b/mods/mcl_chests/textures/mcl_chests_ender_chest_left.png differ diff --git a/mods/mcl_chests/textures/mcl_chests_ender_chest_right.png b/mods/mcl_chests/textures/mcl_chests_ender_chest_right.png new file mode 100644 index 000000000..977709c99 Binary files /dev/null and b/mods/mcl_chests/textures/mcl_chests_ender_chest_right.png differ diff --git a/mods/mcl_chests/textures/mcl_chests_ender_chest_top.png b/mods/mcl_chests/textures/mcl_chests_ender_chest_top.png new file mode 100644 index 000000000..cef691fe4 Binary files /dev/null and b/mods/mcl_chests/textures/mcl_chests_ender_chest_top.png differ diff --git a/mods/mcl_core/functions.lua b/mods/mcl_core/functions.lua index fee20a515..29bb1358d 100644 --- a/mods/mcl_core/functions.lua +++ b/mods/mcl_core/functions.lua @@ -438,7 +438,7 @@ function mcl_core.duengen(pointed_thing) generate_tree(pos, "mcl_core:tree", "mcl_core:leaves", 1) return true 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 minetest.add_node(pos, {name="mcl_farming:wheat"}) elseif math.random(1,5) < 3 then @@ -448,15 +448,23 @@ function mcl_core.duengen(pointed_thing) end return true 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 minetest.add_node(pos, {name="mcl_farming:potato_"..math.random(stage,2)}) else minetest.add_node(pos, {name="mcl_farming:potato"}) end 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 - stage = tonumber(string.sub(n.name, 16)) + stage = tonumber(string.sub(n.name, -1)) if stage == 1 then minetest.add_node(pos, {name="mcl_farming:carrot_"..math.random(stage,2)}) else @@ -464,7 +472,7 @@ function mcl_core.duengen(pointed_thing) end return true 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 minetest.add_node(pos, {name="mcl_farming:pumpkin_"..math.random(stage,2)}) else @@ -472,7 +480,7 @@ function mcl_core.duengen(pointed_thing) end return true 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 minetest.add_node(pos, {name="mcl_farming:melontige_"..math.random(stage,2)}) else diff --git a/mods/redstone/mesecons_mvps/init.lua b/mods/redstone/mesecons_mvps/init.lua index 2ca7fad7a..b82dc3718 100644 --- a/mods/redstone/mesecons_mvps/init.lua +++ b/mods/redstone/mesecons_mvps/init.lua @@ -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_left") 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_active") mesecon:register_mvps_stopper("mcl_hoppers:hopper")