Update mobs_mc

This commit is contained in:
Wuzzy 2017-07-06 00:43:34 +02:00
parent ef64b56282
commit 37e943ae91
19 changed files with 189 additions and 356 deletions

View file

@ -61,6 +61,7 @@ end
if c("chicken_raw") then
minetest.register_craftitem("mobs_mc:chicken_raw", {
description = S("Raw Chicken"),
_doc_items_longdesc = S("Raw chicken is a food item and can be eaten safely. Cooking it will increase its nutritional value."),
inventory_image = "mcl_mobitems_chicken_raw.png",
groups = { food = 2, eatable = 2 },
on_use = minetest.item_eat(2),
@ -70,6 +71,7 @@ end
if c("chicken_cooked") then
minetest.register_craftitem("mobs_mc:chicken_cooked", {
description = S("Cooked Chicken"),
_doc_items_longdesc = S("A cooked chicken is a healthy food item which can be eaten."),
inventory_image = "mcl_mobitems_chicken_cooked.png",
groups = { food = 2, eatable = 6 },
on_use = minetest.item_eat(6),
@ -88,6 +90,7 @@ end
if c("feather") then
minetest.register_craftitem("mobs_mc:feather", {
description = S("Feather"),
_doc_items_longdesc = S("Feathers are used in crafting and are dropped from chickens."),
inventory_image = "mcl_mobitems_feather.png",
})
end
@ -96,6 +99,7 @@ end
if c("beef_raw") then
minetest.register_craftitem("mobs_mc:beef_raw", {
description = S("Raw Beef"),
_doc_items_longdesc = S("Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value."),
inventory_image = "mcl_mobitems_beef_raw.png",
groups = { food = 2, eatable = 3 },
on_use = minetest.item_eat(3),
@ -105,6 +109,7 @@ end
if c("beef_cooked") then
minetest.register_craftitem("mobs_mc:beef_cooked", {
description = S("Steak"),
_doc_items_longdesc = S("Steak is cooked beef from cows and can be eaten."),
inventory_image = "mcl_mobitems_beef_cooked.png",
groups = { food = 2, eatable = 8 },
on_use = minetest.item_eat(8),
@ -125,6 +130,7 @@ if c("milk") then
-- milk
minetest.register_craftitem("mobs_mc:milk_bucket", {
description = S("Milk"),
_doc_items_longdesc = S("Milk is a food item obtained by using a bucket on a cow."),
inventory_image = "mobs_bucket_milk.png",
groups = { food = 3, eatable = 1 },
on_use = minetest.item_eat(1, "bucket:bucket_empty"),
@ -135,6 +141,7 @@ end
if c("bowl") then
minetest.register_craftitem("mobs_mc:bowl", {
description = S("Bowl"),
_doc_items_longdesc = S("Bowls are mainly used to hold tasty soups."),
inventory_image = "mcl_core_bowl.png",
})
@ -156,6 +163,7 @@ end
if c("mushroom_stew") then
minetest.register_craftitem("mobs_mc:mushroom_stew", {
description = S("Mushroom Stew"),
_doc_items_longdesc = S("Mushroom stew is a healthy soup."),
inventory_image = "farming_mushroom_stew.png",
groups = { food = 3, eatable = 6 },
on_use = minetest.item_eat(6, "mobs_mc:bowl"),
@ -209,11 +217,16 @@ if c("dragon_egg") then
})
end
local longdesc_craftitem
if minetest.get_modpath("doc_items") then
longdesc_craftitem = doc.sub.items.temp.craftitem
end
-- Enderman
if c("ender_eye") then
minetest.register_craftitem("mobs_mc:ender_eye", {
description = S("Eye of Ender"),
_doc_items_longdesc = longdesc_craftitem,
inventory_image = "mcl_end_ender_eye.png",
groups = { craftitem = 1 },
})
@ -243,6 +256,8 @@ if c("saddle") then
-- Overwrite the saddle from Mobs Redo
minetest.register_craftitem(":mobs:saddle", {
description = S("Saddle"),
_doc_items_longdesc = S("Saddles can be put on horses, donkeys, mules and pigs in order to mount them."),
_doc_items_usagehelp = S("Rightclick an animal while holding a saddle to put on the saddle. You can now mount the animal by rightclicking it again."),
inventory_image = "mcl_mobitems_saddle.png",
stack_max = 1,
})
@ -260,10 +275,13 @@ if c("saddle") and c("lether") and c("string") and c("iron_ingot") then
end
-- Horse Armor
local horse_armor_use = S("Rightclick a horse to put on the horse armor. Donkeys and mules can't wear horse armor.")
-- TODO: Balance the horse armor strength, compare with MC armor strength
if c("iron_horse_armor") then
minetest.register_craftitem("mobs_mc:iron_horse_armor", {
description = S("Iron Horse Armor"),
_doc_items_longdesc = S("Iron horse armor can be worn by horses to increase their protection from harm a bit."),
_doc_items_usagehelp = horse_armor_use,
inventory_image = "mobs_mc_iron_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_iron.png",
stack_max = 1,
@ -273,6 +291,8 @@ end
if c("gold_horse_armor") then
minetest.register_craftitem("mobs_mc:gold_horse_armor", {
description = S("Golden Horse Armor"),
_doc_items_longdesc = S("Golden horse armor can be worn by horses to increase their protection from harm."),
_doc_items_usagehelp = horse_armor_use,
inventory_image = "mobs_mc_gold_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_gold.png",
stack_max = 1,
@ -282,6 +302,8 @@ end
if c("diamond_horse_armor") then
minetest.register_craftitem("mobs_mc:diamond_horse_armor", {
description = S("Diamond Horse Armor"),
_doc_items_longdesc = S("Diamond horse armor can be worn by horses to greatly increase their protection from harm."),
_doc_items_usagehelp = horse_armor_use,
inventory_image = "mobs_mc_diamond_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_diamond.png",
stack_max = 1,
@ -293,6 +315,7 @@ end
if c("porkchop_raw") then
minetest.register_craftitem("mobs_mc:porkchop_raw", {
description = S("Raw Porkchop"),
_doc_items_longdesc = S("A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value."),
inventory_image = "mcl_mobitems_porkchop_raw.png",
groups = { food = 2, eatable = 3 },
on_use = minetest.item_eat(3),
@ -302,6 +325,7 @@ end
if c("porkchop_cooked") then
minetest.register_craftitem("mobs_mc:porkchop_cooked", {
description = S("Cooked Porkchop"),
_doc_items_longdesc = "Cooked porkchop is the cooked flesh of a pig and is used as food.",
inventory_image = "mcl_mobitems_porkchop_cooked.png",
groups = { food = 2, eatable = 8 },
on_use = minetest.item_eat(8),
@ -320,6 +344,8 @@ end
if c("carrot_on_a_stick") then
minetest.register_tool("mobs_mc:carrot_on_a_stick", {
description = S("Carrot on a Stick"),
_doc_items_longdesc = S("A carrot on a stick can be used on saddled pigs to ride them. Pigs will also follow anyone who holds a carrot on a stick near them."),
_doc_items_usagehelp = S("Rightclick a saddled pig with the carrot on a stick to mount it. You can now ride it like a horse."),
wield_image = "mcl_mobitems_carrot_on_a_stick.png",
inventory_image = "mcl_mobitems_carrot_on_a_stick.png",
sounds = { breaks = "default_tool_breaks" },
@ -360,6 +386,7 @@ end
if c("rabbit_raw") then
minetest.register_craftitem("mobs_mc:rabbit_raw", {
description = S("Raw Rabbit"),
_doc_items_longdesc = S("Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value."),
inventory_image = "mcl_mobitems_rabbit_raw.png",
groups = { food = 2, eatable = 3 },
on_use = minetest.item_eat(3),
@ -369,6 +396,7 @@ end
if c("rabbit_cooked") then
minetest.register_craftitem("mobs_mc:rabbit_cooked", {
description = S("Cooked Rabbit"),
_doc_items_longdesc = S("This is a food item which can be eaten."),
inventory_image = "mcl_mobitems_rabbit_cooked.png",
groups = { food = 2, eatable = 5 },
on_use = minetest.item_eat(5),
@ -387,6 +415,7 @@ end
if c("rabbit_hide") then
minetest.register_craftitem("mobs_mc:rabbit_hide", {
description = S("Rabbit Hide"),
_doc_items_longdesc = S("Rabbit hide is used to create leather."),
inventory_image = "mcl_mobitems_rabbit_hide.png"
})
end
@ -404,6 +433,7 @@ end
if c("rabbit_foot") then
minetest.register_craftitem("mobs_mc:rabbit_foot", {
description = S("Rabbit's Foot"),
_doc_items_longdesc = S("This item is used in brewing."),
inventory_image = "mcl_mobitems_rabbit_foot.png"
})
end
@ -412,6 +442,7 @@ end
if c("mutton_raw") then
minetest.register_craftitem("mobs_mc:mutton_raw", {
description = S("Raw Mutton"),
_doc_items_longdesc = S("Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value."),
inventory_image = "mcl_mobitems_mutton_raw.png",
groups = { food = 2, eatable = 4 },
on_use = minetest.item_eat(4),
@ -421,6 +452,7 @@ end
if c("mutton_cooked") then
minetest.register_craftitem("mobs_mc:mutton_cooked", {
description = S("Cooked Mutton"),
_doc_items_longdesc = S("Cooked mutton is the cooked flesh from a sheep and is used as food."),
inventory_image = "mcl_mobitems_mutton_cooked.png",
groups = { food = 2, eatable = 8 },
on_use = minetest.item_eat(8),
@ -440,6 +472,7 @@ end
if c("shulker_shell") then
minetest.register_craftitem("mobs_mc:shulker_shell", {
description = S("Shulker Shell"),
_doc_items_longdesc = S("Shulker shells are used in crafting. They are dropped from dead shulkers."),
inventory_image = "mcl_mobitems_shulker_shell.png",
groups = { craftitem = 1 },
})
@ -460,6 +493,7 @@ end
if c("slimeball") then
minetest.register_craftitem("mobs_mc:slimeball", {
description = S("Slimeball"),
_doc_items_longdesc = S("Slimeballs are used in crafting. They are dropped from slimes."),
inventory_image = "mcl_mobitems_slimeball.png"
})
if minetest.get_modpath("mesecons_materials") then
@ -485,13 +519,21 @@ end
-- Evoker
if c("totem") then
-- TODO: Implement actual MC totem behaviour
minetest.register_craftitem("mobs_mc:totem", {
description = S("Totem of Undying"),
_doc_items_longdesc = S("A totem of undying is a rare artifact which may safe you from certain death."),
_doc_items_usagehelp = S("Hold it in your hand and punch once to instantly get back to full health. The totem gets destroyed in the process."),
wield_image = "mcl_mobitems_totem.png",
inventory_image = "mcl_mobitems_totem.png",
groups = {fleshy=3,dig_immediate=3,flammable=2},
stack_max =1,
on_use = minetest.item_eat(20),
stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
user:set_hp(20)
if not minetest.settings:get_bool("creative_mode") then
itemstack:take_item()
end
return itemstack
end,
})
end
@ -499,6 +541,7 @@ end
if c("rotten_flesh") then
minetest.register_craftitem("mobs_mc:rotten_flesh", {
description = S("Rotten Flesh"),
_doc_items_longdesc = S("Yuck! This piece of flesh clearly has seen better days. Eating it will only poison you and reduces your health by 4 hit points. But tamed wolves can eat it just fine."),
inventory_image = "mcl_mobitems_rotten_flesh.png",
-- Simplified poisonous food
groups = { food = 2, eatable = -4 },
@ -510,6 +553,7 @@ end
if c("nether_star") then
minetest.register_craftitem("mobs_mc:nether_star", {
description = S("Nether Star"),
_doc_items_longdesc = S("A nether star is a crafting component. It is dropped from the Wither."),
inventory_image = "mcl_mobitems_nether_star.png"
})
end
@ -538,6 +582,8 @@ end
if c("bone") then
minetest.register_craftitem("mobs_mc:bone", {
description = S("Bone"),
_doc_items_longdesc = S("Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient."),
_doc_items_usagehelp = S("Hold the bone in your hand near wolves to attract them. Rightclick the wolf to give it a bone and tame it."),
inventory_image = "mcl_mobitems_bone.png"
})
if minetest.get_modpath("bones") then