This commit is contained in:
Wuzzy 2017-01-17 01:09:11 +01:00
parent 4fdfe8d60e
commit 38cda7566e
4 changed files with 20 additions and 14 deletions

View File

@ -11,15 +11,18 @@ slice_4 = { -7/16, -8/16, -7/16, 3/16, 0/16, 7/16}
slice_5 = { -7/16, -8/16, -7/16, 5/16, 0/16, 7/16}
slice_6 = { -7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
-- FIXME: Recipe. milk instead of water bucket and egg instead of leaves
minetest.register_craft({
output = "mcl_cake:cake",
recipe = {
{'bucket:bucket_water', 'bucket:bucket_water', 'bucket:bucket_water'},
{'mcl_mobitems:milk_bucket', 'mcl_mobitems:milk_bucket', 'mcl_mobitems:milk_bucket'},
{'default:sugar', 'mcl_throwing:egg', 'default:sugar'},
{'farming:wheat_harvested', 'farming:wheat_harvested', 'farming:wheat_harvested'},
},
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
replacements = {
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
{"mcl_mobitems:milk_bucket", "bucket:bucket_empty"},
},
})
minetest.register_node("mcl_cake:cake", {

View File

@ -100,6 +100,17 @@ minetest.register_craftitem("mcl_mobitems:cooked_rabbit", {
stack_max = 64,
})
-- TODO: Fix drinking sound
-- TODO: Clear status effects
minetest.register_craftitem("mcl_mobitems:milk_bucket", {
description = "Milk",
inventory_image = "mcl_mobitems_bucket_milk.png",
wield_image = "mcl_mobitems_bucket_milk.png",
on_use = minetest.item_eat(0, "bucket:bucket_empty"),
groups = { food = 3, },
stack_max = 1,
})
minetest.register_craftitem("mcl_mobitems:spider_eye", {
description = "Spider Eye",
inventory_image = "mcl_mobitems_spider_eye.png",
@ -151,14 +162,6 @@ minetest.register_craftitem("mcl_mobitems:leather", {
stack_max = 64,
})
minetest.register_craftitem("mcl_mobitems:egg", {
description = "Egg",
inventory_image = "mcl_mobitems_rotten_flesh.png",
wield_image = "mcl_mobitems_rotten_flesh.png",
stack_max = 16,
})
minetest.register_craftitem("mcl_mobitems:feather", {
description = "Feather",
wield_image = "mcl_mobitems_feather.png",

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

View File

@ -107,12 +107,12 @@ mobs:register_mob("mobs_mc:cow", {
inv:remove_item("main", "bucket:bucket_empty")
if inv:room_for_item("main", {name = "mcl_mobitems:milk"}) then
clicker:get_inventory():add_item("main", "mcl_mobitems:milk")
if inv:room_for_item("main", {name = "mcl_mobitems:milk_bucket"}) then
clicker:get_inventory():add_item("main", "mcl_mobitems:milk_bucket")
else
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = "mcl_mobitems:milk"})
minetest.add_item(pos, {name = "mcl_mobitems:milk_bucket"})
end
self.gotten = true -- milked