mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Add milk
This commit is contained in:
parent
4fdfe8d60e
commit
38cda7566e
4 changed files with 20 additions and 14 deletions
|
@ -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", {
|
||||
|
|
|
@ -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",
|
||||
|
|
BIN
mods/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png
Normal file
BIN
mods/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 312 B |
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue