diff --git a/mods/mcl_cake/init.lua b/mods/mcl_cake/init.lua index aa2024c935..9472037dd1 100644 --- a/mods/mcl_cake/init.lua +++ b/mods/mcl_cake/init.lua @@ -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", { diff --git a/mods/mcl_mobitems/init.lua b/mods/mcl_mobitems/init.lua index 33fe09f475..e20442b409 100644 --- a/mods/mcl_mobitems/init.lua +++ b/mods/mcl_mobitems/init.lua @@ -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", diff --git a/mods/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png b/mods/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png new file mode 100644 index 0000000000..8b46f30eee Binary files /dev/null and b/mods/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png differ diff --git a/mods/mobs_mc/cow.lua b/mods/mobs_mc/cow.lua index 6d4d414e90..6fb45c6a9c 100644 --- a/mods/mobs_mc/cow.lua +++ b/mods/mobs_mc/cow.lua @@ -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