1 -- TODO: Add special status effects for raw flesh
3 minetest
.register_craftitem("mcl_mobitems:rotten_flesh", {
4 description
= "Rotten Flesh",
5 _doc_items_longdesc
= "Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.",
6 inventory_image
= "mcl_mobitems_rotten_flesh.png",
7 wield_image
= "mcl_mobitems_rotten_flesh.png",
8 on_place
= minetest
.item_eat(4),
9 on_secondary_use
= minetest
.item_eat(4),
10 groups
= { food
= 2, eatable
= 4 },
11 _mcl_saturation
= 0.8,
15 minetest
.register_craftitem("mcl_mobitems:mutton", {
16 description
= "Raw Mutton",
17 _doc_items_longdesc
= "Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.",
18 inventory_image
= "mcl_mobitems_mutton_raw.png",
19 wield_image
= "mcl_mobitems_mutton_raw.png",
20 on_place
= minetest
.item_eat(2),
21 on_secondary_use
= minetest
.item_eat(2),
22 groups
= { food
= 2, eatable
= 2 },
23 _mcl_saturation
= 1.2,
27 minetest
.register_craftitem("mcl_mobitems:cooked_mutton", {
28 description
= "Cooked Mutton",
29 _doc_items_longdesc
= "Cooked mutton is the cooked flesh from a sheep and is used as food.",
30 inventory_image
= "mcl_mobitems_mutton_cooked.png",
31 wield_image
= "mcl_mobitems_mutton_cooked.png",
32 on_place
= minetest
.item_eat(6),
33 on_secondary_use
= minetest
.item_eat(6),
34 groups
= { food
= 2, eatable
= 6 },
35 _mcl_saturation
= 9.6,
39 minetest
.register_craftitem("mcl_mobitems:beef", {
40 description
= "Raw Beef",
41 _doc_items_longdesc
= "Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.",
42 inventory_image
= "mcl_mobitems_beef_raw.png",
43 wield_image
= "mcl_mobitems_beef_raw.png",
44 on_place
= minetest
.item_eat(3),
45 on_secondary_use
= minetest
.item_eat(3),
46 groups
= { food
= 2, eatable
= 3 },
47 _mcl_saturation
= 1.8,
51 minetest
.register_craftitem("mcl_mobitems:cooked_beef", {
52 description
= "Steak",
53 _doc_items_longdesc
= "Steak is cooked beef from cows and can be eaten.",
54 inventory_image
= "mcl_mobitems_beef_cooked.png",
55 wield_image
= "mcl_mobitems_beef_cooked.png",
56 on_place
= minetest
.item_eat(8),
57 on_secondary_use
= minetest
.item_eat(8),
58 groups
= { food
= 2, eatable
= 8 },
59 _mcl_saturation
= 12.8,
63 minetest
.register_craftitem("mcl_mobitems:chicken", {
64 description
= "Raw Chicken",
65 _doc_items_longdesc
= "Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.",
66 inventory_image
= "mcl_mobitems_chicken_raw.png",
67 wield_image
= "mcl_mobitems_chicken_raw.png",
68 on_place
= minetest
.item_eat(2),
69 on_secondary_use
= minetest
.item_eat(2),
70 groups
= { food
= 2, eatable
= 2 },
71 _mcl_saturation
= 1.2,
75 minetest
.register_craftitem("mcl_mobitems:cooked_chicken", {
76 description
= "Cooked Chicken",
77 _doc_items_longdesc
= "A cooked chicken is a healthy food item which can be eaten.",
78 inventory_image
= "mcl_mobitems_chicken_cooked.png",
79 wield_image
= "mcl_mobitems_chicken_cooked.png",
80 on_place
= minetest
.item_eat(6),
81 on_secondary_use
= minetest
.item_eat(6),
82 groups
= { food
= 2, eatable
= 6 },
83 _mcl_saturation
= 7.2,
87 minetest
.register_craftitem("mcl_mobitems:porkchop", {
88 description
= "Raw Porkchop",
89 _doc_items_longdesc
= "A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.",
90 inventory_image
= "mcl_mobitems_porkchop_raw.png",
91 wield_image
= "mcl_mobitems_porkchop_raw.png",
92 on_place
= minetest
.item_eat(3),
93 on_secondary_use
= minetest
.item_eat(3),
94 groups
= { food
= 2, eatable
= 3 },
95 _mcl_saturation
= 1.8,
99 minetest
.register_craftitem("mcl_mobitems:cooked_porkchop", {
100 description
= "Cooked Porkchop",
101 _doc_items_longdesc
= "Cooked porkchop is the cooked flesh of a pig and is used as food.",
102 inventory_image
= "mcl_mobitems_porkchop_cooked.png",
103 wield_image
= "mcl_mobitems_porkchop_cooked.png",
104 on_place
= minetest
.item_eat(8),
105 on_secondary_use
= minetest
.item_eat(8),
106 groups
= { food
= 2, eatable
= 8 },
107 _mcl_saturation
= 12.8,
111 minetest
.register_craftitem("mcl_mobitems:rabbit", {
112 description
= "Raw Rabbit",
113 _doc_items_longdesc
= "Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.",
114 inventory_image
= "mcl_mobitems_rabbit_raw.png",
115 wield_image
= "mcl_mobitems_rabbit_raw.png",
116 on_place
= minetest
.item_eat(3),
117 on_secondary_use
= minetest
.item_eat(3),
118 groups
= { food
= 2, eatable
= 3 },
119 _mcl_saturation
= 1.8,
123 minetest
.register_craftitem("mcl_mobitems:cooked_rabbit", {
124 description
= "Cooked Rabbit",
125 _doc_items_longdesc
= "This is a food item which can be eaten.",
126 inventory_image
= "mcl_mobitems_rabbit_cooked.png",
127 wield_image
= "mcl_mobitems_rabbit_cooked.png",
128 on_place
= minetest
.item_eat(5),
129 on_secondary_use
= minetest
.item_eat(5),
130 groups
= { food
= 2, eatable
= 5 },
131 _mcl_saturation
= 6.0,
135 local drink_milk
= function(itemstack
, player
, pointed_thing
)
136 local bucket
= minetest
.do_item_eat(0, "mcl_buckets:bucket_empty", itemstack
, player
, pointed_thing
)
137 -- Check if we were allowed to drink this (eat delay check)
138 if bucket
:get_name() ~= "mcl_mobitems:milk_bucket" and mcl_hunger
.active
then
139 mcl_hunger
.stop_poison(player
)
144 -- TODO: Clear *all* status effects
145 minetest
.register_craftitem("mcl_mobitems:milk_bucket", {
146 description
= "Milk",
147 _doc_items_longdesc
= "Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will cure all forms of poisoning (in later versions: all status effects), but restores no hunger points.",
148 _doc_items_usagehelp
= "Rightclick to drink the milk.",
149 inventory_image
= "mcl_mobitems_bucket_milk.png",
150 wield_image
= "mcl_mobitems_bucket_milk.png",
151 -- Clear poisoning when used
152 on_place
= drink_milk
,
153 on_secondary_use
= drink_milk
,
155 groups
= { food
= 3, can_eat_when_full
= 1 },
158 minetest
.register_craftitem("mcl_mobitems:spider_eye", {
159 description
= "Spider Eye",
160 _doc_items_longdesc
= "Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.",
161 inventory_image
= "mcl_mobitems_spider_eye.png",
162 wield_image
= "mcl_mobitems_spider_eye.png",
163 on_place
= minetest
.item_eat(2),
164 on_secondary_use
= minetest
.item_eat(2),
165 groups
= { food
= 2, eatable
= 2 },
166 _mcl_saturation
= 3.2,
170 minetest
.register_craftitem("mcl_mobitems:bone", {
171 description
= "Bone",
172 _doc_items_longdesc
= "Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.",
173 _doc_items_usagehelp
= "Hold the bone in your hand near wolves to attract them. Rightclick the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by rightclicking it.",
174 inventory_image
= "mcl_mobitems_bone.png",
176 groups
= { craftitem
=1 },
179 minetest
.register_craftitem("mcl_mobitems:string",{
180 description
= "String",
181 _doc_items_longdesc
= "Strings are used in crafting.",
182 inventory_image
= "mcl_mobitems_string.png",
184 groups
= { craftitem
= 1 },
187 minetest
.register_craftitem("mcl_mobitems:blaze_rod", {
188 description
= "Blaze Rod",
189 _doc_items_longdesc
= "This is a crafting component dropped from dead blazes.",
190 wield_image
= "mcl_mobitems_blaze_rod.png",
191 inventory_image
= "mcl_mobitems_blaze_rod.png",
192 groups
= { craftitem
= 1 },
196 minetest
.register_craftitem("mcl_mobitems:blaze_powder", {
197 description
= "Blaze Powder",
198 _doc_items_longdesc
= "This item is mainly used for crafting.",
199 wield_image
= "mcl_mobitems_blaze_powder.png",
200 inventory_image
= "mcl_mobitems_blaze_powder.png",
201 groups
= { brewitem
= 1 },
205 minetest
.register_craftitem("mcl_mobitems:magma_cream", {
206 description
= "Magma Cream",
207 _doc_items_longdesc
= "Magma cream is a crafting component.",
208 wield_image
= "mcl_mobitems_magma_cream.png",
209 inventory_image
= "mcl_mobitems_magma_cream.png",
210 groups
= { brewitem
= 1 },
214 minetest
.register_craftitem("mcl_mobitems:ghast_tear", {
215 description
= "Ghast Tear",
216 _doc_items_longdesc
= "A ghast tear is dropped from dead ghasts. It has no purpose yet.",
217 wield_image
= "mcl_mobitems_ghast_tear.png",
218 inventory_image
= "mcl_mobitems_ghast_tear.png",
219 groups
= { brewitem
= 1 },
223 minetest
.register_craftitem("mcl_mobitems:nether_star", {
224 description
= "Nether Star",
225 _doc_items_longdesc
= "A nether star is a crafting component. It is dropped from the Wither.",
226 wield_image
= "mcl_mobitems_nether_star.png",
227 inventory_image
= "mcl_mobitems_nether_star.png",
228 groups
= { craftitem
= 1 },
232 minetest
.register_craftitem("mcl_mobitems:leather", {
233 description
= "Leather",
234 _doc_items_longdesc
= "Leather is a versatile crafting component.",
235 wield_image
= "mcl_mobitems_leather.png",
236 inventory_image
= "mcl_mobitems_leather.png",
237 groups
= { craftitem
= 1 },
241 minetest
.register_craftitem("mcl_mobitems:feather", {
242 description
= "Feather",
243 _doc_items_longdesc
= "Feathers are used in crafting and are dropped from chickens.",
244 wield_image
= "mcl_mobitems_feather.png",
245 inventory_image
= "mcl_mobitems_feather.png",
246 groups
= { craftitem
= 1 },
250 minetest
.register_craftitem("mcl_mobitems:rabbit_hide", {
251 description
= "Rabbit Hide",
252 _doc_items_longdesc
= "Rabbit hide is used to create leather.",
253 wield_image
= "mcl_mobitems_rabbit_hide.png",
254 inventory_image
= "mcl_mobitems_rabbit_hide.png",
255 groups
= { craftitem
= 1 },
259 minetest
.register_craftitem("mcl_mobitems:rabbit_foot", {
260 description
= "Rabbit's Foot",
261 _doc_items_longdesc
= "This item currently has no purpose.",
262 wield_image
= "mcl_mobitems_rabbit_foot.png",
263 inventory_image
= "mcl_mobitems_rabbit_foot.png",
264 groups
= { brewitem
= 1 },
268 minetest
.register_craftitem("mcl_mobitems:saddle", {
269 description
= "Saddle",
270 _doc_items_longdesc
= "Saddles can be put on some animals in order to mount them.",
271 _doc_items_usagehelp
= "Rightclick an animal (with the saddle in your hand) to try put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by rightclicking them again.",
272 wield_image
= "mcl_mobitems_saddle.png",
273 inventory_image
= "mcl_mobitems_saddle.png",
277 minetest
.register_craftitem("mcl_mobitems:rabbit_stew", {
278 description
= "Rabbit Stew",
279 _doc_items_longdesc
= "Rabbit stew is a very nutricious food item.",
280 wield_image
= "mcl_mobitems_rabbit_stew.png",
281 inventory_image
= "mcl_mobitems_rabbit_stew.png",
283 on_place
= minetest
.item_eat(10, "mcl_core:bowl"),
284 on_secondary_use
= minetest
.item_eat(10, "mcl_core:bowl"),
285 groups
= { food
= 3, eatable
= 10 },
286 _mcl_saturation
= 12.0,
289 minetest
.register_craftitem("mcl_mobitems:shulker_shell", {
290 description
= "Shulker Shell",
291 _doc_items_longdesc
= "Shulker shells are used in crafting. They are dropped from dead shulkers.",
292 inventory_image
= "mcl_mobitems_shulker_shell.png",
293 groups
= { craftitem
= 1 },
296 minetest
.register_craftitem("mcl_mobitems:slimeball", {
297 description
= "Slimeball",
298 _doc_items_longdesc
= "Slimeballs are used in crafting. They are dropped from slimes.",
299 inventory_image
= "mcl_mobitems_slimeball.png",
300 groups
= { craftitem
= 1 },
303 minetest
.register_craftitem("mcl_mobitems:gunpowder", {
304 description
= "Gunpowder",
305 _doc_items_longdesc
= doc
.sub
.items
.temp
.craftitem
,
306 inventory_image
= "default_gunpowder.png",
308 groups
= { craftitem
=1 },
311 minetest
.register_tool("mcl_mobitems:carrot_on_a_stick", {
312 description
= "Carrot on a Stick",
313 _doc_items_longdesc
= "A carrot on a stick can be used on saddled pigs to ride them.",
314 _doc_items_usagehelp
= "Rightclick a saddled pig with the carrot on a stick to mount it. You can now ride it like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.",
315 wield_image
= "mcl_mobitems_carrot_on_a_stick.png",
316 inventory_image
= "mcl_mobitems_carrot_on_a_stick.png",
317 groups
= { transport
= 1 },
325 minetest
.register_craft({
326 output
= "mcl_mobitems:leather",
328 { "mcl_mobitems:rabbit_hide", "mcl_mobitems:rabbit_hide" },
329 { "mcl_mobitems:rabbit_hide", "mcl_mobitems:rabbit_hide" },
333 minetest
.register_craft({
334 output
= "mcl_mobitems:blaze_powder 2",
335 recipe
= {{"mcl_mobitems:blaze_rod"}},
338 minetest
.register_craft({
339 output
= "mcl_mobitems:rabbit_stew",
341 { "", "mcl_mobitems:cooked_rabbit", "", },
342 { "group:mushroom", "mcl_farming:potato_item_baked", "mcl_farming:carrot_item", },
343 { "", "mcl_core:bowl", "", },
347 minetest
.register_craft({
348 output
= "mcl_mobitems:rabbit_stew",
350 { "", "mcl_mobitems:cooked_rabbit", "", },
351 { "mcl_farming:carrot_item", "mcl_farming:potato_item_baked", "group:mushroom", },
352 { "", "mcl_core:bowl", "", },
357 TODO: Re-enable this when fishing rod is available again
358 minetest.register_craft({
359 output = "mcl_mobitems:carrot_on_a_stick",
361 { "mcl_fishing:fishing_rod", "", },
362 { "", "mcl_farming:carrot_item" },
366 minetest.register_craft({
367 output = "mcl_mobitems:carrot_on_a_stick",
369 { "", "mcl_fishing:fishing_rod", },
370 { "mcl_farming:carrot_item", "" },
375 minetest
.register_craft({
377 output
= "mcl_mobitems:magma_cream",
378 recipe
= {"mcl_mobitems:blaze_powder", "mcl_mobitems:slimeball"},
381 minetest
.register_craft({
383 output
= "mcl_mobitems:cooked_mutton",
384 recipe
= "mcl_mobitems:mutton",
388 minetest
.register_craft({
390 output
= "mcl_mobitems:cooked_rabbit",
391 recipe
= "mcl_mobitems:rabbit",
395 minetest
.register_craft({
397 output
= "mcl_mobitems:cooked_chicken",
398 recipe
= "mcl_mobitems:chicken",
402 minetest
.register_craft({
404 output
= "mcl_mobitems:cooked_beef",
405 recipe
= "mcl_mobitems:beef",
409 minetest
.register_craft({
411 output
= "mcl_mobitems:cooked_porkchop",
412 recipe
= "mcl_mobitems:porkchop",
416 minetest
.register_craft({
418 recipe
= "mcl_mobitems:blaze_rod",
422 minetest
.register_craft({
423 output
= 'mcl_mobitems:slimeball 9',
424 recipe
= {{"mcl_core:slimeblock"}},
427 minetest
.register_craft({
428 output
= "mcl_core:slimeblock",
429 recipe
= {{"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",},
430 {"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",},
431 {"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",}},