From 38cda7566ebcf8d3da7e167526da0b5c6c65f8a3 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 17 Jan 2017 01:09:11 +0100 Subject: [PATCH] Add milk --- mods/mcl_cake/init.lua | 9 ++++++--- mods/mcl_mobitems/init.lua | 19 ++++++++++-------- .../textures/mcl_mobitems_bucket_milk.png | Bin 0 -> 312 bytes mods/mobs_mc/cow.lua | 6 +++--- 4 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 mods/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png diff --git a/mods/mcl_cake/init.lua b/mods/mcl_cake/init.lua index aa2024c93..9472037dd 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 33fe09f47..e20442b40 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 0000000000000000000000000000000000000000..8b46f30eee3cad5118d56ac3fa7d9d5621181689 GIT binary patch literal 312 zcmV-80muG{P)JR0f1GHqRwJyKxFTNWYbh5^w917xYb2Zom3QxL#t z!@{?1;{Z_z4Ict1Vg#b!({LEzAsC1~F6Vq1P64ECK(B4xO%DU~G1A)i-EEopF@QxN z0K5D&phd6%`9!Y&5I`CMAk)JD1ff%h0oYYg0JHp$0MNUi2H3~3Mf9eh23-9pA%MH^ zM*z(9@LRDU