2015-06-29 19:55:56 +02:00
|
|
|
--[[
|
|
|
|
#!#!#!#Cake mod created by Jordan4ibanez#!#!#
|
|
|
|
#!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!#
|
|
|
|
]]--
|
|
|
|
|
2017-01-24 02:31:49 +01:00
|
|
|
local cake_texture = {"cake_top.png","cake_bottom.png","cake_inner.png","cake_side.png","cake_side.png","cake_side.png"}
|
|
|
|
local slice_1 = { -7/16, -8/16, -7/16, -5/16, 0/16, 7/16}
|
|
|
|
local slice_2 = { -7/16, -8/16, -7/16, -2/16, 0/16, 7/16}
|
|
|
|
local slice_3 = { -7/16, -8/16, -7/16, 1/16, 0/16, 7/16}
|
|
|
|
local slice_4 = { -7/16, -8/16, -7/16, 3/16, 0/16, 7/16}
|
|
|
|
local slice_5 = { -7/16, -8/16, -7/16, 5/16, 0/16, 7/16}
|
|
|
|
local slice_6 = { -7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
|
2015-06-29 19:55:56 +02:00
|
|
|
|
|
|
|
minetest.register_craft({
|
2017-01-16 21:13:26 +01:00
|
|
|
output = "mcl_cake:cake",
|
2015-06-29 19:55:56 +02:00
|
|
|
recipe = {
|
2017-01-17 01:09:11 +01:00
|
|
|
{'mcl_mobitems:milk_bucket', 'mcl_mobitems:milk_bucket', 'mcl_mobitems:milk_bucket'},
|
2017-01-31 23:32:56 +01:00
|
|
|
{'mcl_core:sugar', 'mcl_throwing:egg', 'mcl_core:sugar'},
|
2017-01-31 12:35:59 +01:00
|
|
|
{'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested', 'mcl_farming:wheat_harvested'},
|
2015-06-29 19:55:56 +02:00
|
|
|
},
|
2017-01-17 01:09:11 +01:00
|
|
|
replacements = {
|
|
|
|
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
|
|
|
|
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
|
|
|
|
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
|
|
|
|
},
|
2015-06-29 19:55:56 +02:00
|
|
|
})
|
|
|
|
|
2017-01-16 21:13:26 +01:00
|
|
|
minetest.register_node("mcl_cake:cake", {
|
2015-06-29 19:55:56 +02:00
|
|
|
description = "Cake",
|
|
|
|
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
|
2017-01-16 20:59:07 +01:00
|
|
|
inventory_image = "cake.png",
|
|
|
|
wield_image = "cake.png",
|
2015-06-29 19:55:56 +02:00
|
|
|
paramtype = "light",
|
2017-01-04 22:36:51 +01:00
|
|
|
is_ground_content = false,
|
2015-06-29 19:55:56 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_6
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_6
|
|
|
|
},
|
|
|
|
stack_max = 1,
|
2017-01-16 21:10:55 +01:00
|
|
|
groups = {food=2,crumbly=3,attached_node=1},
|
2015-06-29 19:55:56 +02:00
|
|
|
drop = '',
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack)
|
2017-01-16 21:40:59 +01:00
|
|
|
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_5"), ItemStack("mcl_cake:cake"), clicker, {type="nothing"})
|
2017-01-24 02:31:49 +01:00
|
|
|
minetest.add_node(pos,{type="node",name="mcl_cake:cake_5",param2=0})
|
2015-06-29 19:55:56 +02:00
|
|
|
end,
|
2017-01-31 23:32:56 +01:00
|
|
|
sounds = mcl_core.node_sound_leaves_defaults(),
|
2015-06-29 19:55:56 +02:00
|
|
|
})
|
2017-01-16 21:13:26 +01:00
|
|
|
minetest.register_node("mcl_cake:cake_5", {
|
2017-01-04 22:36:51 +01:00
|
|
|
description = "Cake (5 Slices Left)",
|
2015-06-29 19:55:56 +02:00
|
|
|
tiles = cake_texture,
|
|
|
|
paramtype = "light",
|
2017-01-04 22:36:51 +01:00
|
|
|
is_ground_content = false,
|
2015-06-29 19:55:56 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_5
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_5
|
|
|
|
},
|
2017-01-16 21:10:55 +01:00
|
|
|
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
|
2015-06-29 19:55:56 +02:00
|
|
|
drop = '',
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack)
|
2017-01-16 21:40:59 +01:00
|
|
|
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_4"), ItemStack("mcl_cake:cake_5"), clicker, {type="nothing"})
|
2017-01-24 02:31:49 +01:00
|
|
|
minetest.add_node(pos,{type="node",name="mcl_cake:cake_4",param2=0})
|
2015-06-29 19:55:56 +02:00
|
|
|
end,
|
2017-01-31 23:32:56 +01:00
|
|
|
sounds = mcl_core.node_sound_leaves_defaults(),
|
2015-06-29 19:55:56 +02:00
|
|
|
})
|
2017-01-16 21:13:26 +01:00
|
|
|
minetest.register_node("mcl_cake:cake_4", {
|
2017-01-04 22:36:51 +01:00
|
|
|
description = "Cake (4 Slices Left)",
|
2015-06-29 19:55:56 +02:00
|
|
|
tiles = cake_texture,
|
|
|
|
paramtype = "light",
|
2017-01-04 22:36:51 +01:00
|
|
|
is_ground_content = false,
|
2015-06-29 19:55:56 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_4
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_4
|
|
|
|
},
|
2017-01-16 21:10:55 +01:00
|
|
|
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
|
2015-06-29 19:55:56 +02:00
|
|
|
drop = '',
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack)
|
2017-01-16 21:40:59 +01:00
|
|
|
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_3"), ItemStack("mcl_cake:cake_4"), clicker, {type="nothing"})
|
2017-01-24 02:31:49 +01:00
|
|
|
minetest.add_node(pos,{type="node",name="mcl_cake:cake_3",param2=0})
|
2015-06-29 19:55:56 +02:00
|
|
|
end,
|
2017-01-31 23:32:56 +01:00
|
|
|
sounds = mcl_core.node_sound_leaves_defaults(),
|
2015-06-29 19:55:56 +02:00
|
|
|
})
|
2017-01-16 21:13:26 +01:00
|
|
|
minetest.register_node("mcl_cake:cake_3", {
|
2017-01-04 22:36:51 +01:00
|
|
|
description = "Cake (3 Slices Left)",
|
2015-06-29 19:55:56 +02:00
|
|
|
tiles = cake_texture,
|
|
|
|
paramtype = "light",
|
2017-01-04 22:36:51 +01:00
|
|
|
is_ground_content = false,
|
2015-06-29 19:55:56 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_3
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_3
|
|
|
|
},
|
2017-01-16 21:10:55 +01:00
|
|
|
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
|
2015-06-29 19:55:56 +02:00
|
|
|
drop = '',
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack)
|
2017-01-16 21:40:59 +01:00
|
|
|
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_2"), ItemStack("mcl_cake:cake_3"), clicker, {type="nothing"})
|
2017-01-24 02:31:49 +01:00
|
|
|
minetest.add_node(pos,{type="node",name="mcl_cake:cake_2",param2=0})
|
2015-06-29 19:55:56 +02:00
|
|
|
end,
|
2017-01-31 23:32:56 +01:00
|
|
|
sounds = mcl_core.node_sound_leaves_defaults(),
|
2015-06-29 19:55:56 +02:00
|
|
|
})
|
2017-01-16 21:13:26 +01:00
|
|
|
minetest.register_node("mcl_cake:cake_2", {
|
2017-01-04 22:36:51 +01:00
|
|
|
description = "Cake (2 Slices Left)",
|
2015-06-29 19:55:56 +02:00
|
|
|
tiles = cake_texture,
|
|
|
|
paramtype = "light",
|
2017-01-04 22:36:51 +01:00
|
|
|
is_ground_content = false,
|
2015-06-29 19:55:56 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_2
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_2
|
|
|
|
},
|
2017-01-16 21:10:55 +01:00
|
|
|
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
|
2015-06-29 19:55:56 +02:00
|
|
|
drop = '',
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack)
|
2017-01-16 21:40:59 +01:00
|
|
|
minetest.do_item_eat(2, ItemStack("mcl_cake:cake_1"), ItemStack("mcl_cake:cake_2"), clicker, {type="nothing"})
|
2017-01-24 02:31:49 +01:00
|
|
|
minetest.add_node(pos,{type="node",name="mcl_cake:cake_1",param2=0})
|
2015-06-29 19:55:56 +02:00
|
|
|
end,
|
2017-01-31 23:32:56 +01:00
|
|
|
sounds = mcl_core.node_sound_leaves_defaults(),
|
2015-06-29 19:55:56 +02:00
|
|
|
})
|
2017-01-16 21:13:26 +01:00
|
|
|
minetest.register_node("mcl_cake:cake_1", {
|
2017-01-04 22:36:51 +01:00
|
|
|
description = "Cake (1 Slice Left)",
|
2015-06-29 19:55:56 +02:00
|
|
|
tiles = cake_texture,
|
|
|
|
paramtype = "light",
|
2017-01-04 22:36:51 +01:00
|
|
|
is_ground_content = false,
|
2015-06-29 19:55:56 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_1
|
|
|
|
},
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = slice_1
|
|
|
|
},
|
2017-01-16 21:10:55 +01:00
|
|
|
groups = {food=2,crumbly=3,attached_node=1,not_in_creative_inventory=1},
|
2015-06-29 19:55:56 +02:00
|
|
|
drop = '',
|
|
|
|
on_rightclick = function(pos, node, clicker, itemstack)
|
2017-01-16 21:40:59 +01:00
|
|
|
minetest.do_item_eat(2, ItemStack("mcl:cake:cake 0"), ItemStack("mcl_cake:cake_1"), clicker, {type="nothing"})
|
|
|
|
minetest.remove_node(pos)
|
2015-06-29 19:55:56 +02:00
|
|
|
end,
|
2017-01-31 23:32:56 +01:00
|
|
|
sounds = mcl_core.node_sound_leaves_defaults(),
|
2017-01-04 22:36:51 +01:00
|
|
|
})
|