Merge branch 'master' of https://github.com/maikerumine/mobs_mc into mäh

This commit is contained in:
Wuzzy 2017-07-04 17:54:16 +02:00
commit 894a8d45ba
84 changed files with 1954 additions and 409 deletions

View File

@ -33,7 +33,10 @@ mobs_mc.items = {
egg = "mobs_mc:egg", egg = "mobs_mc:egg",
ender_eye = "mobs_mc:ender_eye", ender_eye = "mobs_mc:ender_eye",
ghast_tear = "mobs_mc:ghast_tear", ghast_tear = "mobs_mc:ghast_tear",
saddle = "mobs_mc:saddle", saddle = "mobs:saddle",
iron_horse_armor = "mobs_mc:iron_horse_armor",
gold_horse_armor = "mobs_mc:gold_horse_armor",
diamond_horse_armor = "mobs_mc:diamond_horse_armor",
porkchop_raw = "mobs_mc:porkchop_raw", porkchop_raw = "mobs_mc:porkchop_raw",
porkchop_cooked = "mobs_mc:porkchop_cooked", porkchop_cooked = "mobs_mc:porkchop_cooked",
carrot_on_a_stick = "mobs_mc:carrot_on_a_stick", carrot_on_a_stick = "mobs_mc:carrot_on_a_stick",
@ -45,8 +48,10 @@ mobs_mc.items = {
shulker_shell = "mobs_mc:shulker_shell", shulker_shell = "mobs_mc:shulker_shell",
magma_cream = "mobs_mc:magma_cream", magma_cream = "mobs_mc:magma_cream",
spider_eye = "mobs_mc:spider_eye", spider_eye = "mobs_mc:spider_eye",
snowball = "mobs_mc:snowball",
totem = "mobs_mc:totem", totem = "mobs_mc:totem",
rotten_flesh = "mobs_mc:rotten_flesh", rotten_flesh = "mobs_mc:rotten_flesh",
nether_star = "mobs_mc:nether_star",
arrow = "mobs_mc:arrow", arrow = "mobs_mc:arrow",
bow = "mobs_mc:bow_wood", bow = "mobs_mc:bow_wood",
@ -57,6 +62,8 @@ mobs_mc.items = {
shears = "mobs:shears", shears = "mobs:shears",
-- Minetest Game -- Minetest Game
top_snow = "default:snow",
snow_block = "default:snowblock",
mushroom_red = "flowers:mushroom_red", mushroom_red = "flowers:mushroom_red",
bucket = "bucket:bucket_empty", bucket = "bucket:bucket_empty",
grass_block = "default:dirt_with_grass", grass_block = "default:dirt_with_grass",
@ -64,6 +71,7 @@ mobs_mc.items = {
stick = "default:stick", stick = "default:stick",
flint = "default:flint", flint = "default:flint",
iron_ingot = "default:steel_ingot", iron_ingot = "default:steel_ingot",
iron_block = "default:steelblock",
fire = "fire:basic_flame", fire = "fire:basic_flame",
gunpowder = "tnt:gunpowder", gunpowder = "tnt:gunpowder",
flint_and_steel = "fire:flint_and_steel", flint_and_steel = "fire:flint_and_steel",
@ -83,6 +91,14 @@ mobs_mc.items = {
sugar = "default:papyrus", sugar = "default:papyrus",
wheat = "farming:wheat", wheat = "farming:wheat",
hay_bale = "farming:straw", hay_bale = "farming:straw",
prismarine_shard = "default:mese_crystal_fragment",
prismarine_crystals = "default:mese_crystal",
apple = "default:apple",
golden_apple = "default:apple",
rabbit_foot = "mobs_mc:rabbit_foot",
-- Boss items
wet_sponge = "default:gold_block", -- only dropped by elder guardian; there is no equivalent block in Minetest Game
-- Other -- Other
nether_brick_block = "nether:brick", nether_brick_block = "nether:brick",
@ -97,8 +113,6 @@ mobs_mc.items = {
pufferfish_raw = "fishing:pike_raw", pufferfish_raw = "fishing:pike_raw",
bone = "bonemeal:bone", bone = "bonemeal:bone",
slimeball = "mesecons_materials:glue", slimeball = "mesecons_materials:glue",
apple = "default:apple",
golden_apple = "default:apple",
-- TODO: Add actual ender pearl -- TODO: Add actual ender pearl
ender_pearl = "farorb:farorb", ender_pearl = "farorb:farorb",
@ -124,6 +138,9 @@ mobs_mc.items = {
wool_magenta = "wool:magenta", wool_magenta = "wool:magenta",
wool_black = "wool:black", wool_black = "wool:black",
-- Light blue intentionally missing -- Light blue intentionally missing
-- Special items
music_discs = {}, -- No music discs by default; used by creeper. Override this if your subgame has music discs.
} }
-- Tables for attracting, feeding and breeding mobs -- Tables for attracting, feeding and breeding mobs
@ -232,9 +249,13 @@ mobs_mc.spawn = {
water = { mobs_mc.items.water_source, "mcl_core:water_source", "default:water_source" }, water = { mobs_mc.items.water_source, "mcl_core:water_source", "default:water_source" },
} }
mobs_mc.misc = {
shears_wear = 276, -- Wear to add per shears usage (238 uses)
}
-- Item name overrides from mobs_mc_gameconfig (if present) -- Item name overrides from mobs_mc_gameconfig (if present)
if minetest.get_modpath("mobs_mc_gameconfig") and mobs_mc.override then if minetest.get_modpath("mobs_mc_gameconfig") and mobs_mc.override then
local tables = {"items", "follow", "replace", "spawn"} local tables = {"items", "follow", "replace", "spawn", "misc"}
for t=1, #tables do for t=1, #tables do
local tbl = tables[t] local tbl = tables[t]
if mobs_mc.override[tbl] then if mobs_mc.override[tbl] then

View File

@ -7,13 +7,17 @@
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
--THIS IS THE MASTER ITEM LIST TO USE WITH DEFAULT --THIS IS THE MASTER ITEM LIST TO USE WITH DEFAULT
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local c = mobs_mc.is_item_variable_overridden local c = mobs_mc.is_item_variable_overridden
-- Blaze -- Blaze
if c("blaze_rod") then if c("blaze_rod") then
minetest.register_craftitem("mobs_mc:blaze_rod", { minetest.register_craftitem("mobs_mc:blaze_rod", {
description = "Blaze Rod", description = S("Blaze Rod"),
_doc_items_longdesc = "This is a crafting component dropped from dead blazes.", _doc_items_longdesc = S("This is a crafting component dropped from dead blazes."),
wield_image = "mcl_mobitems_blaze_rod.png", wield_image = "mcl_mobitems_blaze_rod.png",
inventory_image = "mcl_mobitems_blaze_rod.png", inventory_image = "mcl_mobitems_blaze_rod.png",
}) })
@ -39,8 +43,8 @@ end
if c("blaze_powder") then if c("blaze_powder") then
minetest.register_craftitem("mobs_mc:blaze_powder", { minetest.register_craftitem("mobs_mc:blaze_powder", {
description = "Blaze Powder", description = S("Blaze Powder"),
_doc_items_longdesc = "This item is mainly used for brewing potions and crafting.", _doc_items_longdesc = S("This item is mainly used for brewing potions and crafting."),
wield_image = "mcl_mobitems_blaze_powder.png", wield_image = "mcl_mobitems_blaze_powder.png",
inventory_image = "mcl_mobitems_blaze_powder.png", inventory_image = "mcl_mobitems_blaze_powder.png",
}) })
@ -56,7 +60,7 @@ end
-- Chicken -- Chicken
if c("chicken_raw") then if c("chicken_raw") then
minetest.register_craftitem("mobs_mc:chicken_raw", { minetest.register_craftitem("mobs_mc:chicken_raw", {
description = "Raw Chicken", description = S("Raw Chicken"),
inventory_image = "mcl_mobitems_chicken_raw.png", inventory_image = "mcl_mobitems_chicken_raw.png",
groups = { food = 2, eatable = 2 }, groups = { food = 2, eatable = 2 },
on_use = minetest.item_eat(2), on_use = minetest.item_eat(2),
@ -65,7 +69,7 @@ end
if c("chicken_cooked") then if c("chicken_cooked") then
minetest.register_craftitem("mobs_mc:chicken_cooked", { minetest.register_craftitem("mobs_mc:chicken_cooked", {
description = "Cooked Chicken", description = S("Cooked Chicken"),
inventory_image = "mcl_mobitems_chicken_cooked.png", inventory_image = "mcl_mobitems_chicken_cooked.png",
groups = { food = 2, eatable = 6 }, groups = { food = 2, eatable = 6 },
on_use = minetest.item_eat(6), on_use = minetest.item_eat(6),
@ -83,7 +87,7 @@ end
if c("feather") then if c("feather") then
minetest.register_craftitem("mobs_mc:feather", { minetest.register_craftitem("mobs_mc:feather", {
description = "Feather", description = S("Feather"),
inventory_image = "mcl_mobitems_feather.png", inventory_image = "mcl_mobitems_feather.png",
}) })
end end
@ -91,7 +95,7 @@ end
-- Cow and mooshroom -- Cow and mooshroom
if c("beef_raw") then if c("beef_raw") then
minetest.register_craftitem("mobs_mc:beef_raw", { minetest.register_craftitem("mobs_mc:beef_raw", {
description = "Raw Beef", description = S("Raw Beef"),
inventory_image = "mcl_mobitems_beef_raw.png", inventory_image = "mcl_mobitems_beef_raw.png",
groups = { food = 2, eatable = 3 }, groups = { food = 2, eatable = 3 },
on_use = minetest.item_eat(3), on_use = minetest.item_eat(3),
@ -100,7 +104,7 @@ end
if c("beef_cooked") then if c("beef_cooked") then
minetest.register_craftitem("mobs_mc:beef_cooked", { minetest.register_craftitem("mobs_mc:beef_cooked", {
description = "Steak", description = S("Steak"),
inventory_image = "mcl_mobitems_beef_cooked.png", inventory_image = "mcl_mobitems_beef_cooked.png",
groups = { food = 2, eatable = 8 }, groups = { food = 2, eatable = 8 },
on_use = minetest.item_eat(8), on_use = minetest.item_eat(8),
@ -120,7 +124,7 @@ end
if c("milk_bucket") then if c("milk_bucket") then
-- milk -- milk
minetest.register_craftitem("mobs_mc:milk_bucket", { minetest.register_craftitem("mobs_mc:milk_bucket", {
description = "Milk", description = S("Milk"),
inventory_image = "mobs_bucket_milk.png", inventory_image = "mobs_bucket_milk.png",
groups = { food = 3, eatable = 1 }, groups = { food = 3, eatable = 1 },
on_use = minetest.item_eat(1, "bucket:bucket_empty"), on_use = minetest.item_eat(1, "bucket:bucket_empty"),
@ -130,7 +134,7 @@ end
if c("bowl") then if c("bowl") then
minetest.register_craftitem("mobs_mc:bowl", { minetest.register_craftitem("mobs_mc:bowl", {
description = "Bowl", description = S("Bowl"),
inventory_image = "mcl_core_bowl.png", inventory_image = "mcl_core_bowl.png",
}) })
@ -151,7 +155,7 @@ end
if c("mushroom_stew") then if c("mushroom_stew") then
minetest.register_craftitem("mobs_mc:mushroom_stew", { minetest.register_craftitem("mobs_mc:mushroom_stew", {
description = "Mushroom Stew", description = S("Mushroom Stew"),
inventory_image = "farming_mushroom_stew.png", inventory_image = "farming_mushroom_stew.png",
groups = { food = 3, eatable = 6 }, groups = { food = 3, eatable = 6 },
on_use = minetest.item_eat(6, "mobs_mc:bowl"), on_use = minetest.item_eat(6, "mobs_mc:bowl"),
@ -169,7 +173,7 @@ if c("dragon_egg") then
--ender dragon --ender dragon
minetest.register_node("mobs_mc:dragon_egg", { minetest.register_node("mobs_mc:dragon_egg", {
description = "Dragon Egg", description = S("Dragon Egg"),
tiles = { tiles = {
"mcl_end_dragon_egg.png", "mcl_end_dragon_egg.png",
"mcl_end_dragon_egg.png", "mcl_end_dragon_egg.png",
@ -208,7 +212,7 @@ end
-- Enderman -- Enderman
if c("ender_eye") then if c("ender_eye") then
minetest.register_craftitem("mobs_mc:ender_eye", { minetest.register_craftitem("mobs_mc:ender_eye", {
description = "Ender Eye", description = S("Eye of Ender"),
inventory_image = "mcl_end_ender_eye.png", inventory_image = "mcl_end_ender_eye.png",
groups = { craftitem = 1 }, groups = { craftitem = 1 },
@ -226,8 +230,8 @@ end
-- Ghast -- Ghast
if c("ghast_tear") then if c("ghast_tear") then
minetest.register_craftitem("mobs_mc:ghast_tear", { minetest.register_craftitem("mobs_mc:ghast_tear", {
description = "Ghast Tear", description = S("Ghast Tear"),
_doc_items_longdesc = "A ghast tear is an item used in potion brewing. It is dropped from dead ghasts.", _doc_items_longdesc = S("A ghast tear is an item used in potion brewing. It is dropped from dead ghasts."),
wield_image = "mcl_mobitems_ghast_tear.png", wield_image = "mcl_mobitems_ghast_tear.png",
inventory_image = "mcl_mobitems_ghast_tear.png", inventory_image = "mcl_mobitems_ghast_tear.png",
groups = { brewitem = 1 }, groups = { brewitem = 1 },
@ -236,8 +240,9 @@ end
-- Saddle -- Saddle
if c("saddle") then if c("saddle") then
minetest.register_craftitem("mobs_mc:saddle", { -- Overwrite the saddle from Mobs Redo
description = "Saddle", minetest.register_craftitem(":mobs:saddle", {
description = S("Saddle"),
inventory_image = "mcl_mobitems_saddle.png", inventory_image = "mcl_mobitems_saddle.png",
stack_max = 1, stack_max = 1,
}) })
@ -254,10 +259,40 @@ if c("saddle") and c("lether") and c("string") and c("iron_ingot") then
}) })
end end
-- 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"),
inventory_image = "mobs_mc_iron_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_iron.png",
stack_max = 1,
groups = { horse_armor = 85 },
})
end
if c("gold_horse_armor") then
minetest.register_craftitem("mobs_mc:gold_horse_armor", {
description = S("Golden Horse Armor"),
inventory_image = "mobs_mc_gold_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_gold.png",
stack_max = 1,
groups = { horse_armor = 60 },
})
end
if c("diamond_horse_armor") then
minetest.register_craftitem("mobs_mc:diamond_horse_armor", {
description = S("Diamond Horse Armor"),
inventory_image = "mobs_mc_diamond_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_diamond.png",
stack_max = 1,
groups = { horse_armor = 45 },
})
end
-- Pig -- Pig
if c("porkchop_raw") then if c("porkchop_raw") then
minetest.register_craftitem("mobs_mc:porkchop_raw", { minetest.register_craftitem("mobs_mc:porkchop_raw", {
description = "Raw Porkchop", description = S("Raw Porkchop"),
inventory_image = "mcl_mobitems_porkchop_raw.png", inventory_image = "mcl_mobitems_porkchop_raw.png",
groups = { food = 2, eatable = 3 }, groups = { food = 2, eatable = 3 },
on_use = minetest.item_eat(3), on_use = minetest.item_eat(3),
@ -266,7 +301,7 @@ end
if c("porkchop_cooked") then if c("porkchop_cooked") then
minetest.register_craftitem("mobs_mc:porkchop_cooked", { minetest.register_craftitem("mobs_mc:porkchop_cooked", {
description = "Cooked Porkchop", description = S("Cooked Porkchop"),
inventory_image = "mcl_mobitems_porkchop_cooked.png", inventory_image = "mcl_mobitems_porkchop_cooked.png",
groups = { food = 2, eatable = 8 }, groups = { food = 2, eatable = 8 },
on_use = minetest.item_eat(8), on_use = minetest.item_eat(8),
@ -284,7 +319,7 @@ end
if c("carrot_on_a_stick") then if c("carrot_on_a_stick") then
minetest.register_tool("mobs_mc:carrot_on_a_stick", { minetest.register_tool("mobs_mc:carrot_on_a_stick", {
description = "Carrot on a Stick", description = S("Carrot on a Stick"),
wield_image = "mcl_mobitems_carrot_on_a_stick.png", wield_image = "mcl_mobitems_carrot_on_a_stick.png",
inventory_image = "mcl_mobitems_carrot_on_a_stick.png", inventory_image = "mcl_mobitems_carrot_on_a_stick.png",
sounds = { breaks = "default_tool_breaks" }, sounds = { breaks = "default_tool_breaks" },
@ -324,7 +359,7 @@ end
-- Rabbit -- Rabbit
if c("rabbit_raw") then if c("rabbit_raw") then
minetest.register_craftitem("mobs_mc:rabbit_raw", { minetest.register_craftitem("mobs_mc:rabbit_raw", {
description = "Raw Rabbit", description = S("Raw Rabbit"),
inventory_image = "mcl_mobitems_rabbit_raw.png", inventory_image = "mcl_mobitems_rabbit_raw.png",
groups = { food = 2, eatable = 3 }, groups = { food = 2, eatable = 3 },
on_use = minetest.item_eat(3), on_use = minetest.item_eat(3),
@ -333,7 +368,7 @@ end
if c("rabbit_cooked") then if c("rabbit_cooked") then
minetest.register_craftitem("mobs_mc:rabbit_cooked", { minetest.register_craftitem("mobs_mc:rabbit_cooked", {
description = "Cooked Rabbit", description = S("Cooked Rabbit"),
inventory_image = "mcl_mobitems_rabbit_cooked.png", inventory_image = "mcl_mobitems_rabbit_cooked.png",
groups = { food = 2, eatable = 5 }, groups = { food = 2, eatable = 5 },
on_use = minetest.item_eat(5), on_use = minetest.item_eat(5),
@ -351,7 +386,7 @@ end
if c("rabbit_hide") then if c("rabbit_hide") then
minetest.register_craftitem("mobs_mc:rabbit_hide", { minetest.register_craftitem("mobs_mc:rabbit_hide", {
description = "Rabbit Hide", description = S("Rabbit Hide"),
inventory_image = "mcl_mobitems_rabbit_hide.png" inventory_image = "mcl_mobitems_rabbit_hide.png"
}) })
end end
@ -366,10 +401,17 @@ if c("leather") and c("rabbit_hide") then
}) })
end end
if c("rabbit_foot") then
minetest.register_craftitem("mobs_mc:rabbit_foot", {
description = S("Rabbit's Foot"),
inventory_image = "mcl_mobitems_rabbit_foot.png"
})
end
-- Sheep -- Sheep
if c("mutton_raw") then if c("mutton_raw") then
minetest.register_craftitem("mobs_mc:mutton_raw", { minetest.register_craftitem("mobs_mc:mutton_raw", {
description = "Raw Mutton", description = S("Raw Mutton"),
inventory_image = "mcl_mobitems_mutton_raw.png", inventory_image = "mcl_mobitems_mutton_raw.png",
groups = { food = 2, eatable = 4 }, groups = { food = 2, eatable = 4 },
on_use = minetest.item_eat(4), on_use = minetest.item_eat(4),
@ -378,7 +420,7 @@ end
if c("mutton_cooked") then if c("mutton_cooked") then
minetest.register_craftitem("mobs_mc:mutton_cooked", { minetest.register_craftitem("mobs_mc:mutton_cooked", {
description = "Cooked Mutton", description = S("Cooked Mutton"),
inventory_image = "mcl_mobitems_mutton_cooked.png", inventory_image = "mcl_mobitems_mutton_cooked.png",
groups = { food = 2, eatable = 8 }, groups = { food = 2, eatable = 8 },
on_use = minetest.item_eat(8), on_use = minetest.item_eat(8),
@ -397,7 +439,7 @@ end
-- Shulker -- Shulker
if c("shulker_shell") then if c("shulker_shell") then
minetest.register_craftitem("mobs_mc:shulker_shell", { minetest.register_craftitem("mobs_mc:shulker_shell", {
description = "Shulker Shell", description = S("Shulker Shell"),
inventory_image = "mcl_mobitems_shulker_shell.png", inventory_image = "mcl_mobitems_shulker_shell.png",
groups = { craftitem = 1 }, groups = { craftitem = 1 },
}) })
@ -406,8 +448,8 @@ end
-- Magma cube -- Magma cube
if c("magma_cream") then if c("magma_cream") then
minetest.register_craftitem("mobs_mc:magma_cream", { minetest.register_craftitem("mobs_mc:magma_cream", {
description = "Magma Cream", description = S("Magma Cream"),
_doc_items_longdesc = "Magma cream is a crafting component.", _doc_items_longdesc = S("Magma cream is a crafting component."),
wield_image = "mcl_mobitems_magma_cream.png", wield_image = "mcl_mobitems_magma_cream.png",
inventory_image = "mcl_mobitems_magma_cream.png", inventory_image = "mcl_mobitems_magma_cream.png",
groups = { brewitem = 1 }, groups = { brewitem = 1 },
@ -417,8 +459,8 @@ end
-- Spider -- Spider
if c("spider_eye") then if c("spider_eye") then
minetest.register_craftitem("mobs_mc:spider_eye", { minetest.register_craftitem("mobs_mc:spider_eye", {
description = "Spider Eye", description = S("Spider Eye"),
_doc_items_longdesc = "Spider eyes are used mainly in crafting and brewing. If you're really desperate, you can eat a spider eye for 2 hunger points, but it will poison you.", _doc_items_longdesc = S("Spider eyes are used mainly in crafting and brewing. Spider eyes can be eaten, but they poison you and reduce your health by 2 hit points."),
inventory_image = "mcl_mobitems_spider_eye.png", inventory_image = "mcl_mobitems_spider_eye.png",
wield_image = "mcl_mobitems_spider_eye.png", wield_image = "mcl_mobitems_spider_eye.png",
-- Simplified poisonous food -- Simplified poisonous food
@ -430,7 +472,7 @@ end
-- Evoker -- Evoker
if c("totem") then if c("totem") then
minetest.register_craftitem("mobs_mc:totem", { minetest.register_craftitem("mobs_mc:totem", {
description = "Totem", description = S("Totem of Undying"),
wield_image = "mcl_mobitems_totem.png", wield_image = "mcl_mobitems_totem.png",
inventory_image = "mcl_mobitems_totem.png", inventory_image = "mcl_mobitems_totem.png",
groups = {fleshy=3,dig_immediate=3,flammable=2}, groups = {fleshy=3,dig_immediate=3,flammable=2},
@ -442,7 +484,7 @@ end
-- Rotten flesh -- Rotten flesh
if c("rotten_flesh") then if c("rotten_flesh") then
minetest.register_craftitem("mobs_mc:rotten_flesh", { minetest.register_craftitem("mobs_mc:rotten_flesh", {
description = "Rotten Flesh", description = S("Rotten Flesh"),
inventory_image = "mcl_mobitems_rotten_flesh.png", inventory_image = "mcl_mobitems_rotten_flesh.png",
-- Simplified poisonous food -- Simplified poisonous food
groups = { food = 2, eatable = -4 }, groups = { food = 2, eatable = -4 },
@ -450,3 +492,30 @@ if c("rotten_flesh") then
}) })
end end
if c("nether_star") then
minetest.register_craftitem("mobs_mc:nether_star", {
description = S("Nether Star"),
inventory_image = "mcl_mobitems_nether_star.png"
})
end
if c("snowball") and minetest.get_modpath("default") then
minetest.register_craft({
output = "mobs_mc:snowball 2",
recipe = {
{"default:snow"},
},
})
minetest.register_craft({
output = "default:snow 2",
recipe = {
{"mobs_mc:snowball", "mobs_mc:snowball"},
{"mobs_mc:snowball", "mobs_mc:snowball"},
},
})
-- Change the appearance of default snow to avoid confusion with snowball
minetest.override_item("default:snow", {
inventory_image = "",
wield_image = "",
})
end

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--maikerumines throwing code --maikerumines throwing code
--arrow (weapon) --arrow (weapon)
@ -130,7 +133,7 @@ end
if c("arrow") then if c("arrow") then
minetest.register_craftitem("mobs_mc:arrow", { minetest.register_craftitem("mobs_mc:arrow", {
description = "Arrow", description = S("Arrow"),
inventory_image = "throwing_arrow_2.png", inventory_image = "throwing_arrow_2.png",
}) })
end end
@ -148,7 +151,7 @@ end
if c("bow") then if c("bow") then
minetest.register_tool("mobs_mc:bow_wood", { minetest.register_tool("mobs_mc:bow_wood", {
description = "Bow", description = S("Bow"),
inventory_image = "mobs_mc_bow.png", inventory_image = "mobs_mc_bow.png",
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
if throwing_shoot_arrow(itemstack, user, pointed_thing) then if throwing_shoot_arrow(itemstack, user, pointed_thing) then
@ -173,11 +176,14 @@ end
-- egg throwing item -- egg throwing item
-- egg entity -- egg entity
if c("egg") then if c("egg") then
local egg_GRAVITY = 9
local egg_VELOCITY = 19
mobs:register_arrow("mobs_mc:egg_entity", { mobs:register_arrow("mobs_mc:egg_entity", {
visual = "sprite", visual = "sprite",
visual_size = {x=.5, y=.5}, visual_size = {x=.5, y=.5},
textures = {"mobs_chicken_egg.png"}, textures = {"mobs_chicken_egg.png"},
velocity = 6, velocity = egg_velocity,
hit_player = function(self, player) hit_player = function(self, player)
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, { player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
@ -233,9 +239,6 @@ if c("egg") then
end end
}) })
local egg_GRAVITY = 9
local egg_VELOCITY = 19
-- shoot egg -- shoot egg
local mobs_shoot_egg = function (item, player, pointed_thing) local mobs_shoot_egg = function (item, player, pointed_thing)
@ -275,18 +278,104 @@ if c("egg") then
local ent2 = obj:get_luaentity() local ent2 = obj:get_luaentity()
ent2.playername = player:get_player_name() ent2.playername = player:get_player_name()
if not minetest.settings:get_bool("creative_mode") then
item:take_item() item:take_item()
end
return item return item
end end
minetest.register_craftitem("mobs_mc:egg", { minetest.register_craftitem("mobs_mc:egg", {
description = "Egg", description = S("Egg"),
inventory_image = "mobs_chicken_egg.png", inventory_image = "mobs_chicken_egg.png",
on_use = mobs_shoot_egg, on_use = mobs_shoot_egg,
}) })
end end
if c("snowball") then
local snowball_GRAVITY = 9
local snowball_VELOCITY = 19
mobs:register_arrow("mobs_mc:snowball_entity", {
visual = "sprite",
visual_size = {x=.5, y=.5},
textures = {"mcl_throwing_snowball.png"},
velocity = snowball_VELOCITY,
hit_player = function(self, player)
-- FIXME: No knockback
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {},
}, nil)
end,
hit_mob = function(self, mob)
-- Hurt blazes, but not damage to anything else
local dmg = {}
minetest.log("error", dump(mob))
if mob:get_luaentity().name == "mobs_mc:blaze" then
dmg = {fleshy = 3}
end
-- FIXME: No knockback
mob:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = dmg,
}, nil)
end,
})
-- shoot snowball
local mobs_shoot_snowball = function (item, player, pointed_thing)
local playerpos = player:getpos()
local obj = minetest.add_entity({
x = playerpos.x,
y = playerpos.y +1.5,
z = playerpos.z
}, "mobs_mc:snowball_entity")
local ent = obj:get_luaentity()
local dir = player:get_look_dir()
ent.velocity = snowball_VELOCITY -- needed for api internal timing
ent.switch = 1 -- needed so that egg doesn't despawn straight away
obj:setvelocity({
x = dir.x * snowball_VELOCITY,
y = dir.y * snowball_VELOCITY,
z = dir.z * snowball_VELOCITY
})
obj:setacceleration({
x = dir.x * -3,
y = -snowball_GRAVITY,
z = dir.z * -3
})
-- pass player name to egg for chick ownership
local ent2 = obj:get_luaentity()
ent2.playername = player:get_player_name()
if not minetest.settings:get_bool("creative_mode") then
item:take_item()
end
return item
end
-- Snowball
minetest.register_craftitem("mobs_mc:snowball", {
description = S("Snowball"),
_doc_items_longdesc = S("Snowballs can be thrown at your enemies. A snowball deals 3 damage to blazes, but is harmless to anything else."),
inventory_image = "mcl_throwing_snowball.png",
on_use = mobs_shoot_snowball,
})
end
--end maikerumine code --end maikerumine code
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then

72
LICENSE-media.md Normal file
View File

@ -0,0 +1,72 @@
# Credits licensing for media files in `mobs_mc`
## Licenses used
The following media licenses are used:
* **Unknown license :-(**
* [CC0](https://creativecommons.org/choose/zero/)
* [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
* [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
* [GPL v3](https://www.gnu.org/licenses/gpl-3.0.html])
* [MIT](https://opensource.org/licenses/MIT)
* [LGPL v2.1](https://www.gnu.org/licenses/lgpl-2.1.html)
Note: A “`*`” in a file name below is a placeholder which can stand for any text.
## Models
All models were done by [22i](https://github.com/22i) and are licensed under GPLv3.
Origin of those models:
* [Mod “amc”](https://github.com/22i/amc/)
* [Repository with Blender source files for models](https://github.com/22i/minecraft-voxel-blender-models)
## Textures (W.I.P.)
* Mob and most item textures come from from [Faithful Vanilla](https://minecraft.curseforge.com/projects/faithful-vanilla)
* **WARNING**: Licensing status of Faithful Vanilla is currently dubious, so if you're paranoid, assume full copyright. We plan to replace the textures.
* “Spawn egg” textures: 22i
* Mob head textures: **UNKNOWN!**
* `throwing_*`: Jeija (CC0)
* Anything else: **UNKNOWN!**
## Sounds
* PilzAdam and Wuzzy (CC0)
* `mobs_mc_chicken_lay_egg.ogg`
* Randomation (CC0)
* `green_slime_damage.ogg`
* `green_slime_attack.ogg`
* Source: <http://www.freesound.org/people/RandomationPictures/sounds/138481/>
* [Dr. Minky](http://www.freesound.org/people/DrMinky/sounds/) (CC BY 3.0)
* `green_slime_jump.ogg`
* `green_slime_land.ogg`
* `green_slime_death.ogg`
* Zozzy from Freesound.org (CC0)
* `mobs_mc_cow.ogg`
* Source: <https://www.freesound.org/people/Zozzy/sounds/59245/>
* [NPXcoot](https://github.com/NPXcoot1) (CC BY-SA 4.0)
* `mobs_mc_ender_dragon_*`
* Blender Foundation (CC BY 3.0)
* `mobs_sheep.ogg`,
* daufinsyd (MIT License)
* `mobs_mc_blaze_breath.ogg`
* `mobs_mc_blaze_died.ogg`
* `mobs_mc_squid_hurt.ogg`
* [thefilmbakery](https://freesound.org/people/thefilmbakery/) (CC0)
* `mobs_mc_blaze_hurt.ogg`
* Source: <https://freesound.org/people/thefilmbakery/sounds/137836/>
* TenPlus1, from `mobs_monster` or `mobs_animal` mod (MIT License)
* `mobs_chicken.ogg`
* `mobs_fireball.ogg`
* `mobs_kitten.ogg`
* `mobs_mc_llama.ogg`
* `mobs_pig.ogg`
* `mobs_pig_angry.ogg`
* `mobs_rat.ogg`
* `mobs_sandmonster.ogg`
* `mobs_spider.ogg`
* BrandonReese (LGPL v2.1)
* `mobs_eerie.ogg`

View File

@ -1,27 +1,32 @@
--MCmobs v0.4 # MC-like mobs [`mobs_mc`]
--maikerumine
--made for MC like Survival game
--License for code GPL or otherwise stated in readme's
This mod adds mobs which closely resemble the mobs from the game Minecraft, version 1.12.
## Credits
* [maikerumine](https://github.com/maikerumine): Coding behaviour, spawning, drops, and misc.
* [Wuzzy2](https://github.com/Wuzzy2): Zombies, husks, item textures, and code
* [toby109tt](https://github.com/tobyplowy): Mapping fixes - better 2D planes
* [22i](https://github.com/22i): Models (done in Blender) and mob icons for spawn eggs
* See `LICENSE_media.md` for detailed credits about each file
# amc ## Licensing
test out the minecraft mobs in minetest most mob abilites are missing
#### Links [blender models](https://github.com/22i/minecraft-voxel-blender-models), [mobs_mc](https://github.com/maikerumine/mobs_mc), [how to recreate mobs from textures with Blender and Gimp](http://imgur.com/a/Iqg88) * Code: GNU General Public License, version 3 (see `LICENSE`)
* Media: **WARNING!** Possibly includes non-free license (we will replace it soon). See `LICENSE_media.md`
Minecraft mobs were remade in blender ## Useful information for developers
Credits: ### Subgame integration
[toby109tt](https://github.com/tobyplowy) mapping fixes - better 2d planes
[maikerumine](https://github.com/maikerumine) Coding behaviour, spawning, drops, and misc.
[wuzzy2](https://github.com/Wuzzy2) Zombies, Husks, Item textures, and code.
## Subgame integration
Want to include this mod in your subgame? Read `gameconfig.md`. Want to include this mod in your subgame? Read `gameconfig.md`.
## List of mobs ### Links
* [`mobs_mc`](https://github.com/maikerumine/mobs_mc)
* [Blender models](https://github.com/22i/minecraft-voxel-blender-models)
* [How to recreate mobs from textures with Blender and Gimp](http://imgur.com/a/Iqg88)
## List of mobs (excerpt)
<img src="http://i.imgur.com/sDrPv0I.png"> <img src="http://i.imgur.com/sDrPv0I.png">
@ -159,4 +164,3 @@ Skeleton
Zombie pigman Zombie pigman

View File

@ -1,23 +0,0 @@
--Mobs_MC v0.5
--maikerumine
--made for MC like Survival game
--License for code GPL and otherwise stated in readmes such as this one.
#### Links
[blender models](https://github.com/22i/minecraft-voxel-blender-models),
[mobs_mc](https://github.com/maikerumine/mobs_mc),
[how to recreate mobs from textures with Blender and Gimp](http://imgur.com/a/Iqg88)
Minecraft mobs were remade in blender
Credits:[22i](https://github.com/22i) All 3-D Models - Most of the models, otherwise stated elsewhere.[toby109tt](https://github.com/tobyplowy) mapping fixes - better 2d planes.[maikerumine](https://github.com/maikerumine) Coding behaviour, spawning, drops, and misc.[wuzzy2](https://github.com/Wuzzy2) Zombies, Husks, Item textures, and lots of code.
Sounds:  W.I.P.
Pig sounds: mobs_pig, mobs_pig_angryPig sounds taken from mobs_animal mod, licensed under MIT LicensePig textures: From Faithful Vanilla <https://minecraft.curseforge.com/projects/faithful-vanilla>
Chicken sounds:- `mobs_mc_chicken_lay_egg.ogg` - WTFPL, by PilzAdam and Wuzzy- `mobs_chicken.ogg` - MIT License, from `mobs_animal` and `mobs_monster` by TenPlus1
Slimes sounds:- Author: Tomas J. Luis
- Original sound for slime damage by RandomationPictures under licence CC0 1.0.http://www.freesound.org/people/RandomationPictures/sounds/138481/
- Original sounds for slime jump, land and death by Dr. Minky under licence CC BY 3.0.http://www.freesound.org/people/DrMinky/sounds/
Mese Dragon sounds:NPXcoot   https://github.com/NPXcoot1 The license for all the models, textures and sound is 2 CC BY-SA 4.0

View File

@ -1,5 +1,9 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:bat", { mobs:register_mob("mobs_mc:bat", {
type = "animal", type = "animal",
passive = true, passive = true,
@ -54,7 +58,7 @@ mobs:spawn_specific("mobs_mc:bat", mobs_mc.spawn.solid,{"air"},0, maxlight, 20,
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:bat", "Bat", "mobs_mc_spawn_icon_bat.png", 0) mobs:register_egg("mobs_mc:bat", S("Bat"), "mobs_mc_spawn_icon_bat.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then

View File

@ -3,7 +3,9 @@
-- Model and mobs_blaze.png see https://github.com/22i/minecraft-voxel-blender-models -- Model and mobs_blaze.png see https://github.com/22i/minecraft-voxel-blender-models
-- blaze.lua partial copy of mobs_mc/ghast.lua -- blaze.lua partial copy of mobs_mc/ghast.lua
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
--################### --###################
@ -24,9 +26,9 @@ mobs:register_mob("mobs_mc:blaze", {
}, },
visual_size = {x=3, y=3}, visual_size = {x=3, y=3},
sounds = { sounds = {
random = "blaze_breath", random = "mobs_mc_blaze_breath",
death = "blaze_died", death = "mobs_mc_blaze_died",
damage = "blaze_hurt1", damage = "mobs_mc_blaze_hurt",
distance = 16, distance = 16,
}, },
walk_velocity = .8, walk_velocity = .8,
@ -53,6 +55,7 @@ mobs:register_mob("mobs_mc:blaze", {
water_damage = 2, water_damage = 2,
lava_damage = 0, lava_damage = 0,
fall_damage = 0, fall_damage = 0,
fall_speed = -2.25,
light_damage = 0, light_damage = 0,
view_range = 16, view_range = 16,
attack_type = "dogshoot", attack_type = "dogshoot",
@ -101,7 +104,7 @@ mobs:register_arrow("mobs_mc:blaze_fireball", {
}) })
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:blaze", "Blaze", "mobs_mc_spawn_icon_blaze.png", 0) mobs:register_egg("mobs_mc:blaze", S("Blaze"), "mobs_mc_spawn_icon_blaze.png", 0)

View File

@ -1,5 +1,8 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -38,8 +41,10 @@ mobs:register_mob("mobs_mc:chicken", {
max = 2,}, max = 2,},
}, },
water_damage = 1, water_damage = 1,
lava_damage = 5, lava_damage = 4,
light_damage = 0, light_damage = 0,
fall_damage = 0,
fall_speed = -2.25,
sounds = { sounds = {
random = "mobs_chicken", random = "mobs_chicken",
death = "Chickenhurt1", -- TODO: replace death = "Chickenhurt1", -- TODO: replace
@ -91,10 +96,10 @@ mobs:register_mob("mobs_mc:chicken", {
}) })
--spawn --spawn
mobs:register_spawn("mobs_mc:chicken", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 9, 7000, 3, 31000) mobs:register_spawn("mobs_mc:chicken", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 9, 17000, 3, 31000)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:chicken", "Chicken", "mobs_mc_spawn_icon_chicken.png", 0) mobs:register_egg("mobs_mc:chicken", S("Chicken"), "mobs_mc_spawn_icon_chicken.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC chicken loaded") minetest.log("action", "MC chicken loaded")

View File

@ -1,5 +1,9 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local cow_def = { local cow_def = {
type = "animal", type = "animal",
hp_min = 10, hp_min = 10,
@ -28,9 +32,9 @@ local cow_def = {
light_damage = 0, light_damage = 0,
runaway = true, runaway = true,
sounds = { sounds = {
random = "Cow1", random = "mobs_mc_cow",
death = "Cowhurt1", death = "Cowhurt1", -- TODO: Replace
damage = "Cowhurt1", damage = "Cowhurt1", -- TODO: Replace
distance = 16, distance = 16,
}, },
animation = { animation = {
@ -88,7 +92,7 @@ mooshroom_def.on_rightclick = function(self, clicker)
cow:setyaw(oldyaw) cow:setyaw(oldyaw)
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then
item:add_wear(300) item:add_wear(mobs_mc.misc.shears_wear)
clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item) clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item)
end end
-- Use bucket to milk -- Use bucket to milk
@ -122,16 +126,16 @@ mobs:register_mob("mobs_mc:mooshroom", mooshroom_def)
-- Spawning -- Spawning
mobs:register_spawn("mobs_mc:cow", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 9, 7000, 20, 31000) mobs:register_spawn("mobs_mc:cow", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 9, 17000, 20, 31000)
mobs:register_spawn("mobs_mc:mooshroom", mobs_mc.spawn.mushroom_island, minetest.LIGHT_MAX+1, 9, 7000, 10, 31000) mobs:register_spawn("mobs_mc:mooshroom", mobs_mc.spawn.mushroom_island, minetest.LIGHT_MAX+1, 9, 17000, 10, 31000)
-- compatibility -- compatibility
mobs:alias_mob("mobs_animal:cow", "mobs_mc:cow") mobs:alias_mob("mobs_animal:cow", "mobs_mc:cow")
-- spawn egg -- spawn egg
mobs:register_egg("mobs_mc:cow", "Cow", "mobs_mc_spawn_icon_cow.png", 0) mobs:register_egg("mobs_mc:cow", S("Cow"), "mobs_mc_spawn_icon_cow.png", 0)
mobs:register_egg("mobs_mc:mooshroom", "Mooshroom", "mobs_mc_spawn_icon_mooshroom.png", 0) mobs:register_egg("mobs_mc:mooshroom", S("Mooshroom"), "mobs_mc_spawn_icon_mooshroom.png", 0)
if minetest.setting_get("log_mods") then if minetest.setting_get("log_mods") then
minetest.log("action", "MC Cow loaded") minetest.log("action", "MC Cow loaded")

View File

@ -1,6 +1,8 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -72,6 +74,14 @@ mobs:register_mob("mobs_mc:creeper", {
end end
end end
end, end,
on_die = function(self, pos)
-- Drop a random music disc
-- TODO: Only do this if killed by skeleton
if math.random(1, 200) == 1 then
local r = math.random(1, #mobs_mc.items.music_discs)
minetest.add_item({x=pos.x, y=pos.y+1, z=pos.z}, mobs_mc.items.music_discs[r])
end
end,
maxdrops = 2, maxdrops = 2,
drops = { drops = {
{name = mobs_mc.items.gunpowder, {name = mobs_mc.items.gunpowder,
@ -79,65 +89,6 @@ mobs:register_mob("mobs_mc:creeper", {
min = 0, min = 0,
max = 2,}, max = 2,},
-- FIXME: Music disc drops
--[[
{name = "jdukebox:disc_1",
chance = 30,
min = 0,
max = 1,},
{name = "jdukebox:disc_2",
chance = 30,
min = 0,
max = 1,},
{name = "jdukebox:disc_3",
chance = 30,
min = 0,
max = 1,},
{name = "jdukebox:disc_4",
chance = 30,
min = 0,
max = 1,},
{name = "jdukebox:disc_5",
chance = 30,
min = 0,
max = 1,},
{name = "jdukebox:disc_6",
chance = 30,
min = 0,
max = 1,},
]]
{name = "mcl_jukebox:record_1",
chance = 1600,
min = 1,
max = 1,},
{name = "mcl_jukebox:record_2",
chance = 1600,
min = 1,
max = 1,},
{name = "mcl_jukebox:record_3",
chance = 1600,
min = 1,
max = 1,},
{name = "mcl_jukebox:record_4",
chance = 1600,
min = 1,
max = 1,},
{name = "mcl_jukebox:record_5",
chance = 1600,
min = 1,
max = 1,},
{name = "mcl_jukebox:record_6",
chance = 1600,
min = 1,
max = 1,},
{name = "mcl_jukebox:record_7",
chance = 1600,
min = 1,
max = 1,},
{name = "mcl_jukebox:record_8",
chance = 1600,
min = 1,
max = 1,},
{name = "mobs_mc:creeper_head", {name = "mobs_mc:creeper_head",
chance = 200, chance = 200,
min = 1, min = 1,
@ -169,13 +120,13 @@ mobs:register_mob("mobs_mc:creeper", {
}) })
mobs:spawn_specific("mobs_mc:creeper", mobs_mc.spawn.solid, {"air"},0, 7, 20, 6500, 1, -310, 31000) mobs:spawn_specific("mobs_mc:creeper", mobs_mc.spawn.solid, {"air"},0, 7, 20, 16500, 1, -310, 31000)
-- compatibility -- compatibility
mobs:alias_mob("mobs:creeper", "mobs_mc:creeper") mobs:alias_mob("mobs:creeper", "mobs_mc:creeper")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:creeper", "Creeper", "mobs_mc_spawn_icon_creeper.png", 0) mobs:register_egg("mobs_mc:creeper", S("Creeper"), "mobs_mc_spawn_icon_creeper.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Creeper loaded") minetest.log("action", "MC Creeper loaded")

View File

@ -5,3 +5,4 @@ mcl_throwing?
throwing? throwing?
fishing? fishing?
mobs_mc_gameconfig? mobs_mc_gameconfig?
intllib?

View File

@ -1,8 +1,11 @@
--################### --###################
--################### ENDERDRAGON --################### ENDERDRAGON
--################### --###################
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--[[ --[[
mobs:register_mob("mobs_mc:12enderdragon", { mobs:register_mob("mobs_mc:12enderdragon", {
type = "animal", type = "animal",
@ -42,17 +45,17 @@ mobs:register_mob("mobs_mc:enderdragon", {
collisionbox = {-2, 3, -2, 2, 5, 2}, collisionbox = {-2, 3, -2, 2, 5, 2},
physical = false, physical = false,
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_ender_dragon.b3d", mesh = "mobs_mc_dragon.b3d",
textures = { textures = {
{"mobs_mc_enderdragon.png"}, {"mobs_mc_dragon.png"},
}, },
visual_size = {x=3, y=3}, visual_size = {x=3, y=3},
view_range = 35, view_range = 35,
walk_velocity = 6, walk_velocity = 6,
run_velocity = 6, run_velocity = 6,
sounds = { sounds = {
shoot_attack = "mesed", shoot_attack = "mobs_mc_ender_dragon_shoot",
attack = "mese_dragon", attack = "mobs_mc_ender_dragon_attack",
distance = 60, distance = 60,
}, },
physical = true, physical = true,
@ -175,5 +178,5 @@ mobs:register_arrow(":mobs_mc:fireball2", {
end end
}) })
mobs:register_egg("mobs_mc:enderdragon", "Ender Dragon", "mobs_mc_spawn_icon_enderdragon.png", 0) mobs:register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "mobs_mc_spawn_icon_enderdragon.png", 0)

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -147,7 +150,7 @@ mobs:register_mob("mobs_mc:enderman", {
mobs:register_spawn("mobs_mc:enderman", mobs_mc.spawn.desert, 7, 0, 9000, -31000, 31000) mobs:register_spawn("mobs_mc:enderman", mobs_mc.spawn.desert, 7, 0, 9000, -31000, 31000)
mobs:register_spawn("mobs_mc:enderman", mobs_mc.end_city, minetest.LIGHT_MAX+1, 0, 9000, -31000, -5000) mobs:register_spawn("mobs_mc:enderman", mobs_mc.end_city, minetest.LIGHT_MAX+1, 0, 9000, -31000, -5000)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:enderman", "Enderman", "mobs_mc_spawn_icon_enderman.png", 0) mobs:register_egg("mobs_mc:enderman", S("Enderman"), "mobs_mc_spawn_icon_enderman.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then

View File

@ -2,6 +2,10 @@
--################### ENDERMITE --################### ENDERMITE
--################### --###################
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:endermite", { mobs:register_mob("mobs_mc:endermite", {
type = "monster", type = "monster",
passive = false, passive = false,
@ -35,4 +39,4 @@ mobs:register_mob("mobs_mc:endermite", {
blood_amount = 0, blood_amount = 0,
}) })
mobs:register_egg("mobs_mc:endermite", "Endermite", "mobs_mc_spawn_icon_endermite.png", 0) mobs:register_egg("mobs_mc:endermite", S("Endermite"), "mobs_mc_spawn_icon_endermite.png", 0)

View File

@ -2,7 +2,7 @@
This mod has been designed to make subgame integration rather easy. Ideally, it should be possible to include this mod verbatim in your subgame, with modifications only done by an external mod. This mod has been designed to make subgame integration rather easy. Ideally, it should be possible to include this mod verbatim in your subgame, with modifications only done by an external mod.
To integrate this mod in a subgame, you have to do 2 things: Adding the mod, and adding another mod which tells `mobs_mc` which items to use. The idea is that `mobs_mc` should work with any items. Specifically, theres are the steps you need to follow To integrate this mod in a subgame, you have to do 2 things: Adding the mod, and adding another mod which tells `mobs_mc` which items to use. The idea is that `mobs_mc` should work with any items. Specifically, these are the steps you need to follow:
* Add the `mobs_mc` mod and its dependencies * Add the `mobs_mc` mod and its dependencies
* Add a mod with name “`mobs_mc_gameconfig` * Add a mod with name “`mobs_mc_gameconfig`
@ -12,6 +12,10 @@ To integrate this mod in a subgame, you have to do 2 things: Adding the mod, and
* Create the table `mobs_mc.override` * Create the table `mobs_mc.override`
* In `mobs_mc.override`, create subtables (`items`, `spawn`, etc.) like in `0_gameconfig.lua`, defining the na * In `mobs_mc.override`, create subtables (`items`, `spawn`, etc.) like in `0_gameconfig.lua`, defining the na
* Read `0_gameconfig.lua` to see which items you can override (and more explanations) * Read `0_gameconfig.lua` to see which items you can override (and more explanations)
* In `on_construct` of a pumpkin or jack'o lantern node, call:
* `mobs_mc.tools.check_iron_golem_summon(pos)`
* `mobs_mc.tools.check_snow_golem_summon(pos)`
* For more information, see `snowman.lua` and `iron_golem.lua`
Some things to note: Some things to note:

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -75,7 +78,7 @@ mobs:register_mob("mobs_mc:ghast", {
--mobs:register_spawn("mobs_mc:ghast", {"default:flowing_lava", "nether:rack","air"}, 17, -1, 5000, 1, -2000) --mobs:register_spawn("mobs_mc:ghast", {"default:flowing_lava", "nether:rack","air"}, 17, -1, 5000, 1, -2000)
mobs:spawn_specific("mobs_mc:ghast", mobs_mc.spawn.nether, {"air"},0, minetest.LIGHT_MAX+1, 0, 8000, 2, -3610, -2100) mobs:spawn_specific("mobs_mc:ghast", mobs_mc.spawn.nether, {"air"},0, minetest.LIGHT_MAX+1, 0, 18000, 2, -3610, -2100)
-- fireball (weapon) -- fireball (weapon)
mobs:register_arrow(":mobs_monster:fireball", { mobs:register_arrow(":mobs_monster:fireball", {
visual = "sprite", visual = "sprite",
@ -108,7 +111,7 @@ mobs:register_arrow(":mobs_monster:fireball", {
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:ghast", "Ghast", "mobs_mc_spawn_icon_ghast.png", 0) mobs:register_egg("mobs_mc:ghast", S("Ghast"), "mobs_mc_spawn_icon_ghast.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Ghast loaded") minetest.log("action", "MC Ghast loaded")

View File

@ -4,6 +4,10 @@
--################### GUARDIAN --################### GUARDIAN
--################### --###################
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:guardian", { mobs:register_mob("mobs_mc:guardian", {
type = "monster", type = "monster",
hp_min = 30, hp_min = 30,
@ -33,11 +37,39 @@ mobs:register_mob("mobs_mc:guardian", {
run_start = 0, run_end = 20, run_start = 0, run_end = 20,
}, },
drops = { drops = {
-- TODO: Fix drops {name = mobs_mc.items.prismarine_shard,
{name = mobs_mc.items.black_dye,
chance = 1, chance = 1,
min = 0,
max = 2,},
-- The following drops are approximations
-- Fish / prismarine crystal
{name = mobs_mc.items.fish_raw,
chance = 4,
min = 1, min = 1,
max = 3,}, max = 1,},
{name = mobs_mc.items.prismarine_crystals,
chance = 4,
min = 1,
max = 1,},
-- Rare drop: fish
{name = mobs_mc.items.fish_raw,
chance = 160, -- 2.5% / 4
min = 1,
max = 1,},
{name = mobs_mc.items.salmon_raw,
chance = 160,
min = 1,
max = 1,},
{name = mobs_mc.items.clownfish_raw,
chance = 160,
min = 1,
max = 1,},
{name = mobs_mc.items.pufferfish_raw,
chance = 160,
min = 1,
max = 1,},
}, },
fly = true, fly = true,
fly_in = mobs_mc.items.water_source, fly_in = mobs_mc.items.water_source,
@ -51,4 +83,4 @@ mobs:register_mob("mobs_mc:guardian", {
mobs:register_spawn("mobs_mc:guardian", mobs_mc.spawn.water, minetest.LIGHT_MAX+1, 0, 5000, 2, -1000, true) mobs:register_spawn("mobs_mc:guardian", mobs_mc.spawn.water, minetest.LIGHT_MAX+1, 0, 5000, 2, -1000, true)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:guardian", "Guardian", "mobs_mc_spawn_icon_guardian.png", 0) mobs:register_egg("mobs_mc:guardian", S("Guardian"), "mobs_mc_spawn_icon_guardian.png", 0)

View File

@ -4,6 +4,10 @@
--################### GUARDIAN --################### GUARDIAN
--################### --###################
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:guardian_elder", { mobs:register_mob("mobs_mc:guardian_elder", {
type = "monster", type = "monster",
hp_min = 80, hp_min = 80,
@ -33,11 +37,44 @@ mobs:register_mob("mobs_mc:guardian_elder", {
run_start = 0, run_end = 20, run_start = 0, run_end = 20,
}, },
drops = { drops = {
-- TODO: Implement correct drops {name = mobs_mc.items.prismarine_shard,
{name = mobs_mc.items.black_dye, chance = 1,
min = 0,
max = 2,},
-- TODO: Only drop if killed by player
{name = mobs_mc.items.wet_sponge,
chance = 1, chance = 1,
min = 1, min = 1,
max = 3,}, max = 1,},
-- The following drops are approximations
-- Fish / prismarine crystal
{name = mobs_mc.items.fish_raw,
chance = 4,
min = 1,
max = 1,},
{name = mobs_mc.items.prismarine_crystals,
chance = 4,
min = 1,
max = 1,},
-- Rare drop: fish
{name = mobs_mc.items.fish_raw,
chance = 160, -- 2.5% / 4
min = 1,
max = 1,},
{name = mobs_mc.items.salmon_raw,
chance = 160,
min = 1,
max = 1,},
{name = mobs_mc.items.clownfish_raw,
chance = 160,
min = 1,
max = 1,},
{name = mobs_mc.items.pufferfish_raw,
chance = 160,
min = 1,
max = 1,},
}, },
fly = true, fly = true,
fly_in = mobs_mc.items.water_source, fly_in = mobs_mc.items.water_source,
@ -51,5 +88,5 @@ mobs:register_mob("mobs_mc:guardian_elder", {
mobs:register_spawn("mobs_mc:guardian_elder", mobs_mc.spawn.water, minetest.LIGHT_MAX+1, 0, 5000, 2, -1000, true) mobs:register_spawn("mobs_mc:guardian_elder", mobs_mc.spawn.water, minetest.LIGHT_MAX+1, 0, 5000, 2, -1000, true)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:guardian_elder", "Guardian Elder", "mobs_mc_spawn_icon_guardian_elder.png", 0) mobs:register_egg("mobs_mc:guardian_elder", S("Elder Guardian"), "mobs_mc_spawn_icon_guardian_elder.png", 0)

View File

@ -1,8 +1,12 @@
--MC Heads for minetest --MC Heads for minetest
--maikerumine --maikerumine
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
minetest.register_node( "mobs_mc:creeper_head", { minetest.register_node( "mobs_mc:creeper_head", {
description = "Creeper Head (WIP)", description = S("Creeper Head (WIP)"),
tiles = { tiles = {
"mobs_creeper_top.png", "mobs_creeper_top.png",
"mobs_creeper_top.png", --was bottom "mobs_creeper_top.png", --was bottom
@ -27,7 +31,7 @@ minetest.register_node( "mobs_mc:creeper_head", {
}) })
minetest.register_node( "mobs_mc:enderman_head", { minetest.register_node( "mobs_mc:enderman_head", {
description = "Enderman Head (WIP)", description = S("Enderman Head (WIP)"),
tiles = { tiles = {
"mobs_endermen_top.png", "mobs_endermen_top.png",
"mobs_endermen_top.png", "mobs_endermen_top.png",
@ -52,7 +56,7 @@ minetest.register_node( "mobs_mc:enderman_head", {
}) })
minetest.register_node( "mobs_mc:ghast_head", { minetest.register_node( "mobs_mc:ghast_head", {
description = "Ghast Head (WIP)", description = S("Ghast Head (WIP)"),
tiles = { tiles = {
"mobs_mc_ghast_white.png", "mobs_mc_ghast_white.png",
"mobs_mc_ghast_white.png", "mobs_mc_ghast_white.png",
@ -77,7 +81,7 @@ minetest.register_node( "mobs_mc:ghast_head", {
}) })
minetest.register_node( "mobs_mc:skeleton_head", { minetest.register_node( "mobs_mc:skeleton_head", {
description = "Skeleton Skull (WIP)", description = S("Skeleton Skull (WIP)"),
tiles = { tiles = {
"mobs_skeleton_top.png", "mobs_skeleton_top.png",
"mobs_skeleton_top.png", "mobs_skeleton_top.png",
@ -102,7 +106,7 @@ minetest.register_node( "mobs_mc:skeleton_head", {
}) })
minetest.register_node( "mobs_mc:skeleton2_head", { minetest.register_node( "mobs_mc:skeleton2_head", {
description = "Wither Skeleton Skull (WIP)", description = S("Wither Skeleton Skull (WIP)"),
tiles = { tiles = {
"mobs_skeleton2_top.png", "mobs_skeleton2_top.png",
"mobs_skeleton2_top.png", "mobs_skeleton2_top.png",
@ -127,7 +131,7 @@ minetest.register_node( "mobs_mc:skeleton2_head", {
}) })
minetest.register_node( "mobs_mc:spider_head", { minetest.register_node( "mobs_mc:spider_head", {
description = "Spider Head (WIP)", description = S("Spider Head (WIP)"),
tiles = { tiles = {
"mobs_spider_top.png", "mobs_spider_top.png",
"mobs_spider_top.png", "mobs_spider_top.png",
@ -152,7 +156,7 @@ minetest.register_node( "mobs_mc:spider_head", {
}) })
minetest.register_node( "mobs_mc:zombie_head", { minetest.register_node( "mobs_mc:zombie_head", {
description = "Zombie Head (WIP)", description = S("Zombie Head (WIP)"),
tiles = { tiles = {
"mobs_zombie_top.png", "mobs_zombie_top.png",
"mobs_zombie_top.png", "mobs_zombie_top.png",
@ -177,7 +181,7 @@ minetest.register_node( "mobs_mc:zombie_head", {
}) })
minetest.register_node( "mobs_mc:zombiepig_head", { minetest.register_node( "mobs_mc:zombiepig_head", {
description = "Zombie Pigmen Head (WIP)", description = S("Zombie Pigman Head (WIP)"),
tiles = { tiles = {
"mobs_zombiepig_top.png", "mobs_zombiepig_top.png",
"mobs_zombiepig_top.png", "mobs_zombiepig_top.png",

175
horse.lua
View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -10,7 +13,17 @@
--################### HORSE --################### HORSE
--################### --###################
local horse_extra_texture = function(base, saddle, chest) -- Return overlay texture for horse/donkey/mule, e.g. chest, saddle or horse armor
local horse_extra_texture = function(horse)
local base = horse._naked_texture
local saddle = horse._saddle
local chest = horse._chest
local armor = horse._horse_armor
if armor then
if minetest.get_item_group(armor, "horse_armor") > 0 then
base = base .. "^" .. minetest.registered_items[armor]._horse_overlay_image
end
end
if saddle then if saddle then
base = base .. "^mobs_mc_horse_saddle.png" base = base .. "^mobs_mc_horse_saddle.png"
end end
@ -20,6 +33,41 @@ local horse_extra_texture = function(base, saddle, chest)
return base return base
end end
-- Helper functions to determine equipment rules
local can_equip_horse_armor = function(entity_id)
return entity_id == "mobs_mc:horse" or entity_id == "mobs_mc:skeleton_horse" or entity_id == "mobs_mc:zombie_horse"
end
local can_equip_chest = function(entity_id)
return entity_id == "mobs_mc:mule" or entity_id == "mobs_mc:donkey"
end
--[[ Generate all possible horse textures.
Horse textures are a combination of a base texture and an optional marking overlay. ]]
-- The base horse textures
local horse_base = {
"mobs_mc_horse_brown.png",
"mobs_mc_horse_darkbrown.png",
"mobs_mc_horse_white.png",
"mobs_mc_horse_gray.png",
"mobs_mc_horse_black.png",
"mobs_mc_horse_chestnut.png",
}
-- Horse marking texture overlay, to be appended to the base texture string
local horse_markings = {
"", -- no markings
"^mobs_mc_horse_markings_whitedots.png", -- snowflake appaloosa
"^mobs_mc_horse_markings_blackdots.png", -- sooty
"^mobs_mc_horse_markings_whitefield.png", -- paint
"^mobs_mc_horse_markings_white.png", -- stockings and blaze
}
local horse_textures = {}
for b=1, #horse_base do
for m=1, #horse_markings do
table.insert(horse_textures, { horse_base[b] .. horse_markings[m] })
end
end
-- Horse -- Horse
local horse = { local horse = {
type = "animal", type = "animal",
@ -28,19 +76,12 @@ local horse = {
visual_size = {x=3.0, y=3.0}, visual_size = {x=3.0, y=3.0},
collisionbox = {-0.69825, -0.01, -0.69825, 0.69825, 1.59, 0.69825}, collisionbox = {-0.69825, -0.01, -0.69825, 0.69825, 1.59, 0.69825},
animation = { animation = {
speed_normal = 25, speed_run = 50, stand_speed = 25, walk_speed = 25, run_speed = 50,
stand_start = 0, stand_end = 0, stand_start = 0, stand_end = 0,
walk_start = 0, walk_end = 40, walk_start = 0, walk_end = 40,
run_start = 0, run_end = 40, run_start = 0, run_end = 40,
}, },
textures = { textures = horse_textures,
{"mobs_mc_horse_brown.png"},
{"mobs_mc_horse_darkbrown.png"},
{"mobs_mc_horse_white.png"},
{"mobs_mc_horse_gray.png"},
{"mobs_mc_horse_black.png"},
{"mobs_mc_horse_chestnut.png"},
},
fear_height = 4, fear_height = 4,
fly = false, fly = false,
walk_chance = 60, walk_chance = 60,
@ -63,6 +104,9 @@ local horse = {
do_custom = function(self, dtime) do_custom = function(self, dtime)
-- set needed values if not already present -- set needed values if not already present
if not self._regentimer then
self._regentimer = 0
end
if not self.v2 then if not self.v2 then
self.v2 = 0 self.v2 = 0
self.max_speed_forward = 7 self.max_speed_forward = 7
@ -74,6 +118,15 @@ local horse = {
self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y} self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y}
end end
-- Slowly regenerate health
self._regentimer = self._regentimer + dtime
if self._regentimer >= 4 then
if self.health < self.hp_max then
self.health = self.health + 1
end
self._regentimer = 0
end
-- if driver present allow control of horse -- if driver present allow control of horse
if self.driver then if self.driver then
@ -88,9 +141,11 @@ local horse = {
on_die = function(self, pos) on_die = function(self, pos)
-- drop saddle when horse is killed while riding -- drop saddle when horse is killed while riding
if self._saddle then
minetest.add_item(pos, mobs_mc.items.saddle)
end
-- also detach from horse properly -- also detach from horse properly
if self.driver then if self.driver then
minetest.add_item(pos, mobs_mc.items.saddle)
mobs.detach(self.driver, {x = 1, y = 0, z = 1}) mobs.detach(self.driver, {x = 1, y = 0, z = 1})
end end
@ -108,8 +163,8 @@ local horse = {
return return
end end
-- make sure tamed horse is being clicked by owner only -- Make sure tamed horse is mature and being clicked by owner only
if self.tamed and self.owner == clicker:get_player_name() then if self.tamed and not self.child and self.owner == clicker:get_player_name() then
local inv = clicker:get_inventory() local inv = clicker:get_inventory()
@ -118,43 +173,73 @@ local horse = {
mobs.detach(clicker, {x = 1, y = 0, z = 1}) mobs.detach(clicker, {x = 1, y = 0, z = 1})
-- add saddle back to inventory -- Put on saddle if tamed
if inv:room_for_item("main", mobs_mc.items.saddle) then elseif not self.driver and not self._saddle
inv:add_item("main", mobs_mc.items.saddle)
else
minetest.add_item(clicker.getpos(), mobs_mc.items.saddle)
end
-- Update texture
local tex = horse_extra_texture(self._naked_texture, false)
self.base_texture = { tex }
self.object:set_properties({textures = self.base_texture})
-- attach player to horse
elseif not self.driver
and clicker:get_wielded_item():get_name() == mobs_mc.items.saddle then and clicker:get_wielded_item():get_name() == mobs_mc.items.saddle then
self.object:set_properties({stepheight = 1.1}) -- Put on saddle and take saddle from player's inventory
mobs.attach(self, clicker) local w = clicker:get_wielded_item()
self._saddle = true
-- take saddle from inventory if not minetest.settings:get_bool("creative_mode") then
inv:remove_item("main", mobs_mc.items.saddle) w:take_item()
clicker:set_wielded_item(w)
end
-- Update texture -- Update texture
if not self._naked_texture then if not self._naked_texture then
-- Base horse texture without chest or saddle -- Base horse texture without chest or saddle
self._naked_texture = self.base_texture[1] self._naked_texture = self.base_texture[1]
end end
local tex = horse_extra_texture(self._naked_texture, true) local tex = horse_extra_texture(self)
self.base_texture = { tex } self.base_texture = { tex }
self.object:set_properties({textures = self.base_texture}) self.object:set_properties({textures = self.base_texture})
end -- Put on horse armor if tamed
elseif can_equip_horse_armor(self.name) and not self.driver and not self._horse_armor
and minetest.get_item_group(clicker:get_wielded_item():get_name(), "horse_armor") > 0 then
-- Put on armor and take armor from player's inventory
local w = clicker:get_wielded_item()
local armor = minetest.get_item_group(w:get_name(), "horse_armor")
self._horse_armor = w:get_name()
if not minetest.settings:get_bool("creative_mode") then
w:take_item()
clicker:set_wielded_item(w)
end end
-- used to capture horse with magic lasso -- Set horse armor strength
--[[ WARNING: This goes deep into the entity data structure and depends on
how Mobs Redo works internally. This code assumes that Mobs Redo uses
the fleshy group for armor. ]]
-- TODO: Change this code as soon Mobs Redo officially allows to change armor afterwards
self.armor = armor
local agroups = self.object:get_armor_groups()
agroups.fleshy = self.armor
self.object:set_armor_groups(agroups)
-- Update texture
if not self._naked_texture then
-- Base horse texture without chest or saddle
self._naked_texture = self.base_texture[1]
end
local tex = horse_extra_texture(self)
self.base_texture = { tex }
self.object:set_properties({textures = self.base_texture})
-- Mount horse
elseif not self.driver and self._saddle then
self.object:set_properties({stepheight = 1.1})
mobs.attach(self, clicker)
-- Used to capture horse with magic lasso
elseif not self.driver and clicker:get_wielded_item():get_name() ~= "" then
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil) mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
end end
end
end
} }
mobs:register_mob("mobs_mc:horse", horse) mobs:register_mob("mobs_mc:horse", horse)
@ -165,8 +250,8 @@ skeleton_horse.textures = {{"mobs_mc_horse_skeleton.png"}}
skeleton_horse.drops = { skeleton_horse.drops = {
{name = mobs_mc.items.bone, {name = mobs_mc.items.bone,
chance = 1, chance = 1,
min = 1, min = 0,
max = 1,}, max = 2,},
} }
skeleton_horse.sounds = { skeleton_horse.sounds = {
random = "skeleton1", random = "skeleton1",
@ -174,6 +259,7 @@ skeleton_horse.sounds = {
damage = "skeletonhurt1", damage = "skeletonhurt1",
distance = 16, distance = 16,
} }
skeleton_horse.blood_amount = 0
mobs:register_mob("mobs_mc:skeleton_horse", skeleton_horse) mobs:register_mob("mobs_mc:skeleton_horse", skeleton_horse)
-- Zombie horse -- Zombie horse
@ -182,8 +268,8 @@ zombie_horse.textures = {{"mobs_mc_horse_zombie.png"}}
zombie_horse.drops = { zombie_horse.drops = {
{name = mobs_mc.items.rotten_flesh, {name = mobs_mc.items.rotten_flesh,
chance = 1, chance = 1,
min = 1, min = 0,
max = 1,}, max = 2,},
} }
zombie_horse.sounds = { zombie_horse.sounds = {
random = "zombie1", random = "zombie1",
@ -196,7 +282,6 @@ mobs:register_mob("mobs_mc:zombie_horse", zombie_horse)
-- Donkey -- Donkey
local d = 0.86 -- donkey scale local d = 0.86 -- donkey scale
local donkey = table.copy(horse) local donkey = table.copy(horse)
donkey.mesh = "mobs_mc_horse.b3d"
donkey.textures = {{"mobs_mc_horse_creamy.png"}} donkey.textures = {{"mobs_mc_horse_creamy.png"}}
donkey.animation = { donkey.animation = {
speed_normal = 25, speed_normal = 25,
@ -239,11 +324,11 @@ mobs:register_spawn("mobs_mc:donkey", mobs_mc.spawn.grassland_savanna, minetest.
mobs:alias_mob("mobs:horse", "mobs_mc:horse") mobs:alias_mob("mobs:horse", "mobs_mc:horse")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:horse", "Horse", "mobs_mc_spawn_icon_horse.png", 0) mobs:register_egg("mobs_mc:horse", S("Horse"), "mobs_mc_spawn_icon_horse.png", 0)
mobs:register_egg("mobs_mc:skeleton_horse", "Skeleton Horse", "mobs_mc_spawn_icon_horse_skeleton.png", 0) mobs:register_egg("mobs_mc:skeleton_horse", S("Skeleton Horse"), "mobs_mc_spawn_icon_horse_skeleton.png", 0)
mobs:register_egg("mobs_mc:zombie_horse", "Zombie Horse", "mobs_mc_spawn_icon_horse_zombie.png", 0) mobs:register_egg("mobs_mc:zombie_horse", S("Zombie Horse"), "mobs_mc_spawn_icon_horse_zombie.png", 0)
mobs:register_egg("mobs_mc:donkey", "Donkey", "mobs_mc_spawn_icon_donkey.png", 0) mobs:register_egg("mobs_mc:donkey", S("Donkey"), "mobs_mc_spawn_icon_donkey.png", 0)
mobs:register_egg("mobs_mc:mule", "Mule", "mobs_mc_spawn_icon_mule.png", 0) mobs:register_egg("mobs_mc:mule", S("Mule"), "mobs_mc_spawn_icon_mule.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then

View File

@ -9,6 +9,9 @@ if not minetest.get_modpath("mobs_mc_gameconfig") then
mobs_mc = {} mobs_mc = {}
end end
-- For utility functions
mobs_mc.tools = {}
-- This function checks if the item ID has been overwritten and returns true if it is unchanged -- This function checks if the item ID has been overwritten and returns true if it is unchanged
if minetest.get_modpath("mobs_mc_gameconfig") and mobs_mc.override and mobs_mc.override.items then if minetest.get_modpath("mobs_mc_gameconfig") and mobs_mc.override and mobs_mc.override.items then
mobs_mc.is_item_variable_overridden = function(id) mobs_mc.is_item_variable_overridden = function(id)
@ -87,6 +90,7 @@ dofile(path .. "/villager_illusioner.lua") -- Mesh and animation by toby109tt /
dofile(path .. "/ghast.lua") -- maikerumine dofile(path .. "/ghast.lua") -- maikerumine
dofile(path .. "/guardian.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i dofile(path .. "/guardian.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
dofile(path .. "/guardian_elder.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i dofile(path .. "/guardian_elder.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
dofile(path .. "/snowman.lua")
dofile(path .. "/iron_golem.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i dofile(path .. "/iron_golem.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
dofile(path .. "/shulker.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i dofile(path .. "/shulker.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
dofile(path .. "/silverfish.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i dofile(path .. "/silverfish.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i

45
intllib.lua Normal file
View File

@ -0,0 +1,45 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
--################### --###################
@ -67,9 +70,117 @@ mobs:register_mob("mobs_mc:iron_golem", {
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:iron_golem", "Iron Golem", "mobs_mc_spawn_icon_iron_golem.png", 0) mobs:register_egg("mobs_mc:iron_golem", S("Iron Golem"), "mobs_mc_spawn_icon_iron_golem.png", 0)
--[[ This is to be called when a pumpkin or jack'o lantern has been placed. Recommended: In the on_construct function of the node.
This summons an iron golen if placing the pumpkin created an iron golem summon pattern:
.P.
III
.I.
P = Pumpkin or jack'o lantern
I = Iron block
. = Air
]]
mobs_mc.tools.check_iron_golem_summon = function(pos)
local checks = {
-- These are the possible placement patterns, with offset from the pumpkin block.
-- These tables include the positions of the iron blocks (1-4) and air blocks (5-8)
-- 4th element is used to determine spawn position.
-- If a 9th element is present, that one is used for the spawn position instead.
-- Standing (x axis)
{
{x=-1, y=-1, z=0}, {x=1, y=-1, z=0}, {x=0, y=-1, z=0}, {x=0, y=-2, z=0}, -- iron blocks
{x=-1, y=0, z=0}, {x=1, y=0, z=0}, {x=-1, y=-2, z=0}, {x=1, y=-2, z=0}, -- air
},
-- Upside down standing (x axis)
{
{x=-1, y=1, z=0}, {x=1, y=1, z=0}, {x=0, y=1, z=0}, {x=0, y=2, z=0},
{x=-1, y=0, z=0}, {x=1, y=0, z=0}, {x=-1, y=2, z=0}, {x=1, y=2, z=0},
{x=0, y=0, z=0}, -- Different offset for upside down pattern
},
-- Standing (z axis)
{
{x=0, y=-1, z=-1}, {x=0, y=-1, z=1}, {x=0, y=-1, z=0}, {x=0, y=-2, z=0},
{x=0, y=0, z=-1}, {x=0, y=0, z=1}, {x=0, y=-2, z=-1}, {x=0, y=-2, z=1},
},
-- Upside down standing (z axis)
{
{x=0, y=1, z=-1}, {x=0, y=1, z=1}, {x=0, y=1, z=0}, {x=0, y=2, z=0},
{x=0, y=0, z=-1}, {x=0, y=0, z=1}, {x=0, y=2, z=-1}, {x=0, y=2, z=1},
{x=0, y=0, z=0},
},
-- Lying
{
{x=-1, y=0, z=-1}, {x=0, y=0, z=-1}, {x=1, y=0, z=-1}, {x=0, y=0, z=-2},
{x=-1, y=0, z=0}, {x=1, y=0, z=0}, {x=-1, y=0, z=-2}, {x=1, y=0, z=-2},
},
{
{x=-1, y=0, z=1}, {x=0, y=0, z=1}, {x=1, y=0, z=1}, {x=0, y=0, z=2},
{x=-1, y=0, z=0}, {x=1, y=0, z=0}, {x=-1, y=0, z=2}, {x=1, y=0, z=2},
},
{
{x=-1, y=0, z=-1}, {x=-1, y=0, z=0}, {x=-1, y=0, z=1}, {x=-2, y=0, z=0},
{x=0, y=0, z=-1}, {x=0, y=0, z=1}, {x=-2, y=0, z=-1}, {x=-2, y=0, z=1},
},
{
{x=1, y=0, z=-1}, {x=1, y=0, z=0}, {x=1, y=0, z=1}, {x=2, y=0, z=0},
{x=0, y=0, z=-1}, {x=0, y=0, z=1}, {x=2, y=0, z=-1}, {x=2, y=0, z=1},
},
}
for c=1, #checks do
-- Check all possible patterns
local ok = true
-- Check iron block nodes
for i=1, 4 do
local cpos = vector.add(pos, checks[c][i])
local node = minetest.get_node(cpos)
if node.name ~= mobs_mc.items.iron_block then
ok = false
break
end
end
-- Check air nodes
for a=5, 8 do
local cpos = vector.add(pos, checks[c][a])
local node = minetest.get_node(cpos)
if node.name ~= "air" then
ok = false
break
end
end
-- Pattern found!
if ok then
-- Remove the nodes
minetest.remove_node(pos)
core.check_for_falling(pos)
for i=1, 4 do
local cpos = vector.add(pos, checks[c][i])
minetest.remove_node(cpos)
core.check_for_falling(cpos)
end
-- Summon iron golem
local place
if checks[c][9] then
place = vector.add(pos, checks[c][9])
else
place = vector.add(pos, checks[c][4])
end
place.y = place.y - 0.5
minetest.add_entity(place, "mobs_mc:iron_golem")
break
end
end
end
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Iron Golem loaded") minetest.log("action", "MC Iron Golem loaded")
end end

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -38,9 +41,8 @@ mobs:register_mob("mobs_mc:llama", {
light_damage = 0, light_damage = 0,
fear_height = 4, fear_height = 4,
sounds = { sounds = {
random = "mobs_sheep", random = "mobs_mc_llama",
death = "mobs_sheep", -- TODO: Death and damage sounds
damage = "mobs_sheep",
distance = 16, distance = 16,
}, },
animation = { animation = {
@ -74,7 +76,7 @@ mobs:register_mob("mobs_mc:llama", {
self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y} self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y}
end end
-- if driver present allow control of horse -- if driver present allow control of llama
if self.driver then if self.driver then
mobs.drive(self, "walk", "stand", false, dtime) mobs.drive(self, "walk", "stand", false, dtime)
@ -96,22 +98,22 @@ mobs:register_mob("mobs_mc:llama", {
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)
-- make sure player is clicking -- Make sure player is clicking
if not clicker or not clicker:is_player() then if not clicker or not clicker:is_player() then
return return
end end
-- feed, tame or heal horse -- Feed, tame or heal llama
if mobs:feed_tame(self, clicker, 1, true, true) then if mobs:feed_tame(self, clicker, 1, true, true) then
return return
end end
-- make sure tamed horse is being clicked by owner only -- Make sure tamed llama is mature and being clicked by owner only
if self.tamed and self.owner == clicker:get_player_name() then if self.tamed and not self.child and self.owner == clicker:get_player_name() then
local inv = clicker:get_inventory() local inv = clicker:get_inventory()
-- detatch player already riding horse -- detatch player already riding llama
if self.driver and clicker == self.driver then if self.driver and clicker == self.driver then
mobs.detach(clicker, {x = 1, y = 0, z = 1}) mobs.detach(clicker, {x = 1, y = 0, z = 1})
@ -122,11 +124,12 @@ mobs:register_mob("mobs_mc:llama", {
self.object:set_properties({stepheight = 1.1}) self.object:set_properties({stepheight = 1.1})
mobs.attach(self, clicker) mobs.attach(self, clicker)
end end
end
-- used to capture horse with magic lasso -- Used to capture llama with lasso
elseif not self.driver and clicker:get_wielded_item():get_name() ~= "" then
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil) mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
end end
end
}) })
@ -134,7 +137,7 @@ mobs:register_mob("mobs_mc:llama", {
mobs:register_spawn("mobs_mc:llama", mobs_mc.spawn.savanna, minetest.LIGHT_MAX+1, 0, 15000, 1, 40) mobs:register_spawn("mobs_mc:llama", mobs_mc.spawn.savanna, minetest.LIGHT_MAX+1, 0, 15000, 1, 40)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:llama", "Llama", "mobs_mc_spawn_icon_llama.png", 0) mobs:register_egg("mobs_mc:llama", S("Llama"), "mobs_mc_spawn_icon_llama.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Llama loaded") minetest.log("action", "MC Llama loaded")

450
locale/de_DE.po Normal file
View File

@ -0,0 +1,450 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-02 20:52+0200\n"
"PO-Revision-Date: 2017-07-02 16:20+0200\n"
"Last-Translator: Wuzzy <almikes@aol.com>\n"
"Language-Team: \n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: 1_items_default.lua
msgid "Blaze Rod"
msgstr "Lohenrute"
#: 1_items_default.lua
msgid "This is a crafting component dropped from dead blazes."
msgstr "Dies ist eine Fertigungskomponente, welche von toten Lohen abfällt."
#: 1_items_default.lua
msgid "Blaze Powder"
msgstr "Lohenstaub"
#: 1_items_default.lua
msgid "This item is mainly used for brewing potions and crafting."
msgstr ""
"Dieser Gegenstand wird hauptsächlich für die Trankzubereitung und die "
"Fertigung benutzt."
#: 1_items_default.lua
msgid "Raw Chicken"
msgstr "Rohes Hühnchen"
#: 1_items_default.lua
msgid "Cooked Chicken"
msgstr "Gebratenes Hühnchen"
#: 1_items_default.lua
msgid "Feather"
msgstr "Feder"
#: 1_items_default.lua
msgid "Raw Beef"
msgstr "Rohes Rindfleisch"
#: 1_items_default.lua
msgid "Steak"
msgstr "Steak"
#: 1_items_default.lua
msgid "Milk"
msgstr "Milch"
#: 1_items_default.lua
msgid "Bowl"
msgstr "Schale"
#: 1_items_default.lua
msgid "Mushroom Stew"
msgstr "Pilzsuppe"
#: 1_items_default.lua
msgid "Dragon Egg"
msgstr "Drachenei"
#: 1_items_default.lua
msgid "Eye of Ender"
msgstr "Enderauge"
#: 1_items_default.lua
msgid "Ghast Tear"
msgstr "Ghastträne"
#: 1_items_default.lua
msgid ""
"A ghast tear is an item used in potion brewing. It is dropped from dead "
"ghasts."
msgstr ""
"Eine Ghastträne kann für die Trankzubereitung benutzt werden. Sie wird von "
"toten Ghasts abgeworfen."
#: 1_items_default.lua
msgid "Saddle"
msgstr "Sattel"
#: 1_items_default.lua
msgid "Iron Horse Armor"
msgstr "Eiserne Pferderüstung"
#: 1_items_default.lua
msgid "Golden Horse Armor"
msgstr "Goldene Pferderüstung"
#: 1_items_default.lua
msgid "Diamond Horse Armor"
msgstr "Diamantene Pferderüstung"
#: 1_items_default.lua
msgid "Raw Porkchop"
msgstr "Rohes Schweinefleisch"
#: 1_items_default.lua
msgid "Cooked Porkchop"
msgstr "Gebratenes Schweinefleisch"
#: 1_items_default.lua
msgid "Carrot on a Stick"
msgstr "Karottenrute"
#: 1_items_default.lua
msgid "Raw Rabbit"
msgstr "Rohes Kaninchen"
#: 1_items_default.lua
msgid "Cooked Rabbit"
msgstr "Gebratenes Kaninchen"
#: 1_items_default.lua
msgid "Rabbit Hide"
msgstr "Kaninchenfell"
#: 1_items_default.lua
msgid "Rabbit's Foot"
msgstr "Hasenpfote"
#: 1_items_default.lua
msgid "Raw Mutton"
msgstr "Rohes Hammelfleisch"
#: 1_items_default.lua
msgid "Cooked Mutton"
msgstr "Gebratenes Hammelfleisch"
#: 1_items_default.lua
msgid "Shulker Shell"
msgstr "Shulkerschale"
#: 1_items_default.lua
msgid "Magma Cream"
msgstr "Magmacreme"
#: 1_items_default.lua
msgid "Magma cream is a crafting component."
msgstr "Magmacreme wird zum Fertigen benutzt."
#: 1_items_default.lua
msgid "Spider Eye"
msgstr "Spinnenauge"
#: 1_items_default.lua
msgid ""
"Spider eyes are used mainly in crafting and brewing. Spider eyes can be "
"eaten, but they poison you and reduce your health by 2 hit points."
msgstr ""
"Spinnenaugen werden hauptsächlich für die Fertigung und die Trankzubereitung "
"benutzt. Spinnenaugen können gegessen werden, aber sie vergiften Sie und Sie "
"verlieren 2 Trefferpunkte."
#: 1_items_default.lua
msgid "Totem of Undying"
msgstr "Totem der Unsterblichkeit"
#: 1_items_default.lua
msgid "Rotten Flesh"
msgstr "Verrottetes Fleisch"
#: 1_items_default.lua
msgid "Nether Star"
msgstr "Netherstern"
#: 2_throwing.lua
msgid "Arrow"
msgstr "Pfeil"
#: 2_throwing.lua
msgid "Bow"
msgstr "Bogen"
#: 2_throwing.lua
msgid "Egg"
msgstr "Ei"
#: 2_throwing.lua
msgid "Snowball"
msgstr "Schneeball"
#: 2_throwing.lua
msgid ""
"Snowballs can be thrown at your enemies. A snowball deals 3 damage to "
"blazes, but is harmless to anything else."
msgstr ""
"Werfen Sie Schnebälle auf Ihre Feinde. Ein Schneeball richtet gegenüber "
"Lohen 3 Schaden an, ist aber harmlos für alles andere."
#: bat.lua
msgid "Bat"
msgstr "Fledermaus"
#: blaze.lua
msgid "Blaze"
msgstr "Lohe"
#: chicken.lua
msgid "Chicken"
msgstr "Huhn"
#: cow+mooshroom.lua
msgid "Cow"
msgstr "Kuh"
#: cow+mooshroom.lua
msgid "Mooshroom"
msgstr "Mooshroom"
#: creeper.lua
msgid "Creeper"
msgstr "Creeper"
#: ender_dragon.lua
msgid "Ender Dragon"
msgstr "Enderdrache"
#: enderman.lua
msgid "Enderman"
msgstr "Enderman"
#: endermite.lua
msgid "Endermite"
msgstr "Endermite"
#: ghast.lua
msgid "Ghast"
msgstr "Ghast"
#: guardian_elder.lua
msgid "Elder Guardian"
msgstr "Großer Wächter"
#: guardian.lua
msgid "Guardian"
msgstr "Wächter"
#: heads.lua
msgid "Creeper Head (WIP)"
msgstr "Creeperkopf (unfertig)"
#: heads.lua
msgid "Enderman Head (WIP)"
msgstr "Endermankopf (unfertig)"
#: heads.lua
msgid "Ghast Head (WIP)"
msgstr "Ghastkopf (unfertig)"
#: heads.lua
msgid "Skeleton Skull (WIP)"
msgstr "Skelettschädel (unfertig)"
#: heads.lua
msgid "Wither Skeleton Skull (WIP)"
msgstr "Witherskelettschädel (unfertig)"
#: heads.lua
msgid "Spider Head (WIP)"
msgstr "Spinnenkopf (unfertig)"
#: heads.lua
msgid "Zombie Head (WIP)"
msgstr "Zombiekopf (unfertig)"
#: heads.lua
msgid "Zombie Pigman Head (WIP)"
msgstr "Schweinezombiekopf (unfertig)"
#: horse.lua
msgid "Horse"
msgstr "Pferd"
#: horse.lua
msgid "Skeleton Horse"
msgstr "Skelettpferd"
#: horse.lua
msgid "Zombie Horse"
msgstr "Zombiepferd"
#: horse.lua
msgid "Donkey"
msgstr "Esel"
#: horse.lua
msgid "Mule"
msgstr "Maultier"
#: iron_golem.lua
msgid "Iron Golem"
msgstr "Eisengolem"
#: llama.lua
msgid "Llama"
msgstr "Lama"
#: ocelot.lua
msgid "Ocelot"
msgstr "Ozelot"
#: parrot.lua
msgid "Parrot"
msgstr "Papagei"
#: pig.lua
msgid "Pig"
msgstr "Schwein"
#: polar_bear.lua
msgid "Polar Bear"
msgstr "Eisbär"
#: rabbit.lua
msgid "Rabbit"
msgstr "Kaninchen"
#: rabbit.lua
msgid "Killer Bunny"
msgstr "Killer-Kaninchen"
#: sheep.lua
msgid "Sheep"
msgstr "Schaf"
#: shulker.lua
msgid "Shulker"
msgstr "Shulker"
#: silverfish.lua
msgid "Silverfish"
msgstr "Silberfischchen"
#: silverfish.lua
msgid "Stone Monster Egg"
msgstr "Silberfischchen-Stein"
#: silverfish.lua
msgid "Cobblestone Monster Egg"
msgstr "Silberfischchen-Bruchstein"
#: silverfish.lua
msgid "Mossy Cobblestone Monster Egg"
msgstr "Bemooster Silberfischchen-Bruchstein"
#: silverfish.lua
msgid "Stone Brick Monster Egg"
msgstr "Silberfischchen-Steinziegel"
#: silverfish.lua
msgid "Stone Block Monster Egg"
msgstr "Silberfischchen-Steinblock"
#: skeleton.lua
msgid "Skeleton"
msgstr "Skelett"
#: skeleton_stray.lua
msgid "Stray"
msgstr "Eiswanderer"
#: skeleton_wither.lua
msgid "Wither Skeleton"
msgstr "Witherskelett"
#: slime+magma_cube.lua
msgid "Magma Cube"
msgstr "Magmawürfel"
#: slime+magma_cube.lua
msgid "Slime"
msgstr "Schleim"
#: snowman.lua
msgid "Snow Golem"
msgstr "Schneegolem"
#: spider.lua
msgid "Spider"
msgstr "Spinne"
#: spider.lua
msgid "Cave Spider"
msgstr "Höhlenspinne"
#: squid.lua
msgid "Squid"
msgstr "Tintenfisch"
#: vex.lua
msgid "Vex"
msgstr "Plagegeist"
#: villager_evoker.lua
msgid "Evoker"
msgstr "Magier"
#: villager_illusioner.lua
msgid "Illusioner"
msgstr "Illusionist"
#: villager.lua
msgid "Villager"
msgstr "Dorfbewohner"
#: villager_vindicator.lua
msgid "Vindicator"
msgstr "Diener"
#: villager_zombie.lua
msgid "Zombie Villager"
msgstr "Dorfbewohnerzombie"
#: witch.lua
msgid "Witch"
msgstr "Hexe"
#: wither.lua
msgid "Wither"
msgstr "Wither"
#: wolf.lua
msgid "Wolf"
msgstr "Wolf"
#: zombie.lua
msgid "Husk"
msgstr "Wüstenzombie"
#: zombie.lua
msgid "Zombie"
msgstr "Zombie"
#: zombiepig.lua
msgid "Zombie Pigman"
msgstr "Schweinezombie"

440
locale/template.pot Normal file
View File

@ -0,0 +1,440 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-02 20:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: 1_items_default.lua
msgid "Blaze Rod"
msgstr ""
#: 1_items_default.lua
msgid "This is a crafting component dropped from dead blazes."
msgstr ""
#: 1_items_default.lua
msgid "Blaze Powder"
msgstr ""
#: 1_items_default.lua
msgid "This item is mainly used for brewing potions and crafting."
msgstr ""
#: 1_items_default.lua
msgid "Raw Chicken"
msgstr ""
#: 1_items_default.lua
msgid "Cooked Chicken"
msgstr ""
#: 1_items_default.lua
msgid "Feather"
msgstr ""
#: 1_items_default.lua
msgid "Raw Beef"
msgstr ""
#: 1_items_default.lua
msgid "Steak"
msgstr ""
#: 1_items_default.lua
msgid "Milk"
msgstr ""
#: 1_items_default.lua
msgid "Bowl"
msgstr ""
#: 1_items_default.lua
msgid "Mushroom Stew"
msgstr ""
#: 1_items_default.lua
msgid "Dragon Egg"
msgstr ""
#: 1_items_default.lua
msgid "Eye of Ender"
msgstr ""
#: 1_items_default.lua
msgid "Ghast Tear"
msgstr ""
#: 1_items_default.lua
msgid ""
"A ghast tear is an item used in potion brewing. It is dropped from dead "
"ghasts."
msgstr ""
#: 1_items_default.lua
msgid "Saddle"
msgstr ""
#: 1_items_default.lua
msgid "Iron Horse Armor"
msgstr ""
#: 1_items_default.lua
msgid "Golden Horse Armor"
msgstr ""
#: 1_items_default.lua
msgid "Diamond Horse Armor"
msgstr ""
#: 1_items_default.lua
msgid "Raw Porkchop"
msgstr ""
#: 1_items_default.lua
msgid "Cooked Porkchop"
msgstr ""
#: 1_items_default.lua
msgid "Carrot on a Stick"
msgstr ""
#: 1_items_default.lua
msgid "Raw Rabbit"
msgstr ""
#: 1_items_default.lua
msgid "Cooked Rabbit"
msgstr ""
#: 1_items_default.lua
msgid "Rabbit Hide"
msgstr ""
#: 1_items_default.lua
msgid "Rabbit's Foot"
msgstr ""
#: 1_items_default.lua
msgid "Raw Mutton"
msgstr ""
#: 1_items_default.lua
msgid "Cooked Mutton"
msgstr ""
#: 1_items_default.lua
msgid "Shulker Shell"
msgstr ""
#: 1_items_default.lua
msgid "Magma Cream"
msgstr ""
#: 1_items_default.lua
msgid "Magma cream is a crafting component."
msgstr ""
#: 1_items_default.lua
msgid "Spider Eye"
msgstr ""
#: 1_items_default.lua
msgid ""
"Spider eyes are used mainly in crafting and brewing. Spider eyes can be "
"eaten, but they poison you and reduce your health by 2 hit points."
msgstr ""
#: 1_items_default.lua
msgid "Totem of Undying"
msgstr ""
#: 1_items_default.lua
msgid "Rotten Flesh"
msgstr ""
#: 1_items_default.lua
msgid "Nether Star"
msgstr ""
#: 2_throwing.lua
msgid "Arrow"
msgstr ""
#: 2_throwing.lua
msgid "Bow"
msgstr ""
#: 2_throwing.lua
msgid "Egg"
msgstr ""
#: 2_throwing.lua
msgid "Snowball"
msgstr ""
#: 2_throwing.lua
msgid ""
"Snowballs can be thrown at your enemies. A snowball deals 3 damage to "
"blazes, but is harmless to anything else."
msgstr ""
#: bat.lua
msgid "Bat"
msgstr ""
#: blaze.lua
msgid "Blaze"
msgstr ""
#: chicken.lua
msgid "Chicken"
msgstr ""
#: cow+mooshroom.lua
msgid "Cow"
msgstr ""
#: cow+mooshroom.lua
msgid "Mooshroom"
msgstr ""
#: creeper.lua
msgid "Creeper"
msgstr ""
#: ender_dragon.lua
msgid "Ender Dragon"
msgstr ""
#: enderman.lua
msgid "Enderman"
msgstr ""
#: endermite.lua
msgid "Endermite"
msgstr ""
#: ghast.lua
msgid "Ghast"
msgstr ""
#: guardian_elder.lua
msgid "Elder Guardian"
msgstr ""
#: guardian.lua
msgid "Guardian"
msgstr ""
#: heads.lua
msgid "Creeper Head (WIP)"
msgstr ""
#: heads.lua
msgid "Enderman Head (WIP)"
msgstr ""
#: heads.lua
msgid "Ghast Head (WIP)"
msgstr ""
#: heads.lua
msgid "Skeleton Skull (WIP)"
msgstr ""
#: heads.lua
msgid "Wither Skeleton Skull (WIP)"
msgstr ""
#: heads.lua
msgid "Spider Head (WIP)"
msgstr ""
#: heads.lua
msgid "Zombie Head (WIP)"
msgstr ""
#: heads.lua
msgid "Zombie Pigman Head (WIP)"
msgstr ""
#: horse.lua
msgid "Horse"
msgstr ""
#: horse.lua
msgid "Skeleton Horse"
msgstr ""
#: horse.lua
msgid "Zombie Horse"
msgstr ""
#: horse.lua
msgid "Donkey"
msgstr ""
#: horse.lua
msgid "Mule"
msgstr ""
#: iron_golem.lua
msgid "Iron Golem"
msgstr ""
#: llama.lua
msgid "Llama"
msgstr ""
#: ocelot.lua
msgid "Ocelot"
msgstr ""
#: parrot.lua
msgid "Parrot"
msgstr ""
#: pig.lua
msgid "Pig"
msgstr ""
#: polar_bear.lua
msgid "Polar Bear"
msgstr ""
#: rabbit.lua
msgid "Rabbit"
msgstr ""
#: rabbit.lua
msgid "Killer Bunny"
msgstr ""
#: sheep.lua
msgid "Sheep"
msgstr ""
#: shulker.lua
msgid "Shulker"
msgstr ""
#: silverfish.lua
msgid "Silverfish"
msgstr ""
#: silverfish.lua
msgid "Stone Monster Egg"
msgstr ""
#: silverfish.lua
msgid "Cobblestone Monster Egg"
msgstr ""
#: silverfish.lua
msgid "Mossy Cobblestone Monster Egg"
msgstr ""
#: silverfish.lua
msgid "Stone Brick Monster Egg"
msgstr ""
#: silverfish.lua
msgid "Stone Block Monster Egg"
msgstr ""
#: skeleton.lua
msgid "Skeleton"
msgstr ""
#: skeleton_stray.lua
msgid "Stray"
msgstr ""
#: skeleton_wither.lua
msgid "Wither Skeleton"
msgstr ""
#: slime+magma_cube.lua
msgid "Magma Cube"
msgstr ""
#: slime+magma_cube.lua
msgid "Slime"
msgstr ""
#: snowman.lua
msgid "Snow Golem"
msgstr ""
#: spider.lua
msgid "Spider"
msgstr ""
#: spider.lua
msgid "Cave Spider"
msgstr ""
#: squid.lua
msgid "Squid"
msgstr ""
#: vex.lua
msgid "Vex"
msgstr ""
#: villager_evoker.lua
msgid "Evoker"
msgstr ""
#: villager_illusioner.lua
msgid "Illusioner"
msgstr ""
#: villager.lua
msgid "Villager"
msgstr ""
#: villager_vindicator.lua
msgid "Vindicator"
msgstr ""
#: villager_zombie.lua
msgid "Zombie Villager"
msgstr ""
#: witch.lua
msgid "Witch"
msgstr ""
#: wither.lua
msgid "Wither"
msgstr ""
#: wolf.lua
msgid "Wolf"
msgstr ""
#: zombie.lua
msgid "Husk"
msgstr ""
#: zombie.lua
msgid "Zombie"
msgstr ""
#: zombiepig.lua
msgid "Zombie Pigman"
msgstr ""

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,6 +3,10 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--################### --###################
--################### OCELOT AND CAT --################### OCELOT AND CAT
--################### --###################
@ -196,7 +200,7 @@ mobs:alias_mob("mobs:kitten", "mobs_mc:ocelot")
-- spawn eggs -- spawn eggs
-- FIXME: The spawn icon shows a cat texture, not an ocelot texture -- FIXME: The spawn icon shows a cat texture, not an ocelot texture
mobs:register_egg("mobs_mc:ocelot", "Ocelot", "mobs_mc_spawn_icon_cat.png", 0) mobs:register_egg("mobs_mc:ocelot", S("Ocelot"), "mobs_mc_spawn_icon_cat.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Ocelot loaded") minetest.log("action", "MC Ocelot loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -49,6 +52,7 @@ mobs:register_mob("mobs_mc:parrot", {
lava_damage = 4, lava_damage = 4,
light_damage = 0, light_damage = 0,
fall_damage = 0, fall_damage = 0,
fall_speed = -2.25,
attack_type = "dogfight", attack_type = "dogfight",
jump = true, jump = true,
jump_height = 4, jump_height = 4,
@ -71,7 +75,7 @@ mobs:register_mob("mobs_mc:parrot", {
mobs:spawn_specific("mobs_mc:parrot", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX+1, 20, 20000, 2, 15, 20) mobs:spawn_specific("mobs_mc:parrot", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX+1, 20, 20000, 2, 15, 20)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:parrot", "Parrot", "mobs_mc_spawn_icon_parrot.png", 0) mobs:register_egg("mobs_mc:parrot", S("Parrot"), "mobs_mc_spawn_icon_parrot.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Parrot loaded") minetest.log("action", "MC Parrot loaded")

17
pig.lua
View File

@ -1,5 +1,9 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:pig", { mobs:register_mob("mobs_mc:pig", {
type = "animal", type = "animal",
runaway = true, runaway = true,
@ -96,6 +100,10 @@ mobs:register_mob("mobs_mc:pig", {
end end
end end
if self.child then
return
end
-- Put saddle on pig -- Put saddle on pig
local item = clicker:get_wielded_item() local item = clicker:get_wielded_item()
if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then
@ -153,20 +161,21 @@ mobs:register_mob("mobs_mc:pig", {
inv:set_stack("main",self.driver:get_wield_index(), wielditem) inv:set_stack("main",self.driver:get_wield_index(), wielditem)
end end
return return
end
-- used to capture pig with magic lasso -- Capture pig with lasso
elseif not self.driver and clicker:get_wielded_item():get_name() ~= "" then
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil) mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
end
end, end,
}) })
mobs:register_spawn("mobs_mc:pig", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 9, 5000, 30, 31000) mobs:register_spawn("mobs_mc:pig", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 9, 15000, 30, 31000)
-- compatibility -- compatibility
mobs:alias_mob("mobs:pig", "mobs_mc:pig") mobs:alias_mob("mobs:pig", "mobs_mc:pig")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:pig", "Pig", "mobs_mc_spawn_icon_pig.png", 0) mobs:register_egg("mobs_mc:pig", S("Pig"), "mobs_mc_spawn_icon_pig.png", 0)
if minetest.settings:get("log_mods") then if minetest.settings:get("log_mods") then

View File

@ -1,6 +1,8 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -18,7 +20,7 @@ mobs:register_mob("mobs_mc:polar_bear", {
hp_max = 30, hp_max = 30,
collisionbox = {-0.7, -0.01, -0.7, 0.7, 1.39, 0.7}, collisionbox = {-0.7, -0.01, -0.7, 0.7, 1.39, 0.7},
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_polar_bear.b3d", mesh = "mobs_mc_polarbear.b3d",
textures = { textures = {
{"mobs_mc_polarbear.png"}, {"mobs_mc_polarbear.png"},
}, },
@ -73,7 +75,7 @@ mobs:register_spawn("mobs_mc:polar_bear", mobs_mc.spawn.snow, minetest.LIGHT_MAX
mobs:register_egg("mobs_mc:polar_bear", "Polar Bear", "mobs_mc_spawn_icon_polarbear.png", 0) mobs:register_egg("mobs_mc:polar_bear", S("Polar Bear"), "mobs_mc_spawn_icon_polarbear.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then

View File

@ -1,5 +1,9 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local rabbit = { local rabbit = {
type = "animal", type = "animal",
passive = true, passive = true,
@ -30,6 +34,7 @@ local rabbit = {
drops = { drops = {
{name = mobs_mc.items.rabbit_raw, chance = 1, min = 0, max = 1}, {name = mobs_mc.items.rabbit_raw, chance = 1, min = 0, max = 1},
{name = mobs_mc.items.rabbit_hide, chance = 1, min = 0, max = 1}, {name = mobs_mc.items.rabbit_hide, chance = 1, min = 0, max = 1},
{name = mobs_mc.items.rabbit_foot, chance = 10, min = 1, max = 1},
}, },
water_damage = 1, water_damage = 1,
lava_damage = 4, lava_damage = 4,
@ -102,7 +107,7 @@ mobs:register_mob("mobs_mc:killer_bunny", killer_bunny)
local spawn = { local spawn = {
name = "mobs_mc:rabbit", name = "mobs_mc:rabbit",
chance = 5000, chance = 15000,
active_object_count = 99, active_object_count = 99,
min_light = 0, min_light = 0,
max_light = minetest.LIGHT_MAX+1, max_light = minetest.LIGHT_MAX+1,
@ -158,10 +163,10 @@ end
mobs:spawn(spawn_grass) mobs:spawn(spawn_grass)
-- Spawn egg -- Spawn egg
mobs:register_egg("mobs_mc:rabbit", "Rabbit", "mobs_mc_spawn_icon_rabbit.png", 0) mobs:register_egg("mobs_mc:rabbit", S("Rabbit"), "mobs_mc_spawn_icon_rabbit.png", 0)
-- Note: This spawn egg does not exist in Minecraft -- Note: This spawn egg does not exist in Minecraft
mobs:register_egg("mobs_mc:killer_bunny", "Killer Bunny", "mobs_mc_spawn_icon_rabbit.png^[colorize:#FF0000:192", 0) -- TODO: Update inventory image mobs:register_egg("mobs_mc:killer_bunny", S("Killer Bunny"), "mobs_mc_spawn_icon_rabbit.png^[colorize:#FF0000:192", 0) -- TODO: Update inventory image
-- compatibility -- compatibility

View File

@ -1,6 +1,8 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -165,7 +167,7 @@ mobs:register_mob("mobs_mc:sheep", {
}) })
-- TODO: Change mesh back to mobs_mc_sheepfur.b3d after regrowing wool (requires on_replace) -- TODO: Change mesh back to mobs_mc_sheepfur.b3d after regrowing wool (requires on_replace)
if not minetest.settings:get_bool("creative_mode") then if not minetest.settings:get_bool("creative_mode") then
item:add_wear(300) item:add_wear(mobs_mc.misc.shears_wear)
clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item) clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item)
end end
self.drops = { self.drops = {
@ -201,12 +203,12 @@ mobs:register_mob("mobs_mc:sheep", {
end end
end, end,
}) })
mobs:register_spawn("mobs_mc:sheep", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 0, 5000, 3, 31000) mobs:register_spawn("mobs_mc:sheep", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 0, 15000, 3, 31000)
-- compatibility -- compatibility
mobs:alias_mob("mobs_animal:sheep", "mobs_mc:sheep") mobs:alias_mob("mobs_animal:sheep", "mobs_mc:sheep")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:sheep", "Sheep", "mobs_mc_spawn_icon_sheep.png", 0) mobs:register_egg("mobs_mc:sheep", S("Sheep"), "mobs_mc_spawn_icon_sheep.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Sheep loaded") minetest.log("action", "MC Sheep loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -32,8 +35,8 @@ mobs:register_mob("mobs_mc:shulker", {
jump = false, jump = false,
drops = { drops = {
{name = mobs_mc.items.shulker_shell, {name = mobs_mc.items.shulker_shell,
chance = 3, chance = 1,
min = 1, min = 0,
max = 1,}, max = 1,},
}, },
animation = { animation = {
@ -78,7 +81,7 @@ mobs:register_arrow("mobs_mc:shulkerbullet", {
}) })
mobs:register_egg("mobs_mc:shulker", "Shulker", "mobs_mc_spawn_icon_shulker.png", 0) mobs:register_egg("mobs_mc:shulker", S("Shulker"), "mobs_mc_spawn_icon_shulker.png", 0)
mobs:spawn_specific("mobs_mc:shulker", mobs_mc.spawn.end_city, 0, minetest.LIGHT_MAX+1, 5, 3, 1, -31000, -5000) mobs:spawn_specific("mobs_mc:shulker", mobs_mc.spawn.end_city, 0, minetest.LIGHT_MAX+1, 5, 3, 1, -31000, -5000)

View File

@ -2,6 +2,10 @@
--################### SILVERFISH --################### SILVERFISH
--################### --###################
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:silverfish", { mobs:register_mob("mobs_mc:silverfish", {
type = "monster", type = "monster",
passive = false, passive = false,
@ -40,7 +44,7 @@ mobs:register_mob("mobs_mc:silverfish", {
blood_amount = 0, blood_amount = 0,
}) })
mobs:register_egg("mobs_mc:silverfish", "Silverfish", "mobs_mc_spawn_icon_silverfish.png", 0) mobs:register_egg("mobs_mc:silverfish", S("Silverfish"), "mobs_mc_spawn_icon_silverfish.png", 0)
-- Monster egg blocks (Minetest Game) -- Monster egg blocks (Minetest Game)
if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then
@ -50,7 +54,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then
end end
end end
minetest.register_node("mobs_mc:monster_egg_stone", { minetest.register_node("mobs_mc:monster_egg_stone", {
description = "Stone Monster Egg", description = S("Stone Monster Egg"),
tiles = {"default_stone.png"}, tiles = {"default_stone.png"},
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},
drop = '', drop = '',
@ -60,7 +64,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then
}) })
minetest.register_node("mobs_mc:monster_egg_cobble", { minetest.register_node("mobs_mc:monster_egg_cobble", {
description = "Cobblestone Monster Egg", description = S("Cobblestone Monster Egg"),
tiles = {"default_cobble.png"}, tiles = {"default_cobble.png"},
is_ground_content = false, is_ground_content = false,
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},
@ -70,7 +74,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then
}) })
minetest.register_node("mobs_mc:monster_egg_mossycobble", { minetest.register_node("mobs_mc:monster_egg_mossycobble", {
description = "Mossy Cobblestone Monster Egg", description = S("Mossy Cobblestone Monster Egg"),
tiles = {"default_mossycobble.png"}, tiles = {"default_mossycobble.png"},
is_ground_content = false, is_ground_content = false,
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},
@ -80,7 +84,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then
}) })
minetest.register_node("mobs_mc:monster_egg_stonebrick", { minetest.register_node("mobs_mc:monster_egg_stonebrick", {
description = "Stone Brick Monster Egg", description = S("Stone Brick Monster Egg"),
paramtype2 = "facedir", paramtype2 = "facedir",
place_param2 = 0, place_param2 = 0,
tiles = {"default_stone_brick.png"}, tiles = {"default_stone_brick.png"},
@ -92,7 +96,7 @@ if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then
}) })
minetest.register_node("mobs_mc:monster_egg_stone_block", { minetest.register_node("mobs_mc:monster_egg_stone_block", {
description = "Stone Block Monster Egg", description = S("Stone Block Monster Egg"),
tiles = {"default_stone_block.png"}, tiles = {"default_stone_block.png"},
is_ground_content = false, is_ground_content = false,
groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1},

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -90,10 +93,10 @@ mobs:register_mob("mobs_mc:skeleton", {
mobs:alias_mob("mobs:skeleton", "mobs_mc:skeleton") mobs:alias_mob("mobs:skeleton", "mobs_mc:skeleton")
--spawn --spawn
mobs:spawn_specific("mobs_mc:skeleton", mobs_mc.spawn.solid,{"air"},0, 7, 20, 7000, 2, -110, 31000) mobs:spawn_specific("mobs_mc:skeleton", mobs_mc.spawn.solid,{"air"},0, 7, 20, 17000, 2, -110, 31000)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:skeleton", "Skeleton", "mobs_mc_spawn_icon_skeleton.png", 0) mobs:register_egg("mobs_mc:skeleton", S("Skeleton"), "mobs_mc_spawn_icon_skeleton.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Skeleton loaded") minetest.log("action", "MC Skeleton loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -86,10 +89,10 @@ mobs:register_mob("mobs_mc:stray", {
}) })
--spawn --spawn
mobs:spawn_specific("mobs_mc:stray", mobs_mc.spawn.snow, {"air"}, minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1, 20, 9000, 2, -110, 31000) mobs:spawn_specific("mobs_mc:stray", mobs_mc.spawn.snow, {"air"}, minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1, 20, 19000, 2, -110, 31000)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:stray", "Stray", "mobs_mc_spawn_icon_stray.png", 0) mobs:register_egg("mobs_mc:stray", S("Stray"), "mobs_mc_spawn_icon_stray.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Stray Skeleton loaded") minetest.log("action", "MC Stray Skeleton loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -21,7 +24,7 @@ mobs:register_mob("mobs_mc:witherskeleton", {
group_attack = true, group_attack = true,
collisionbox = {-0.35, -0.01, -0.35, 0.35, 2.39, 0.35}, collisionbox = {-0.35, -0.01, -0.35, 0.35, 2.39, 0.35},
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_wither_skeleton.b3d", mesh = "mobs_mc_witherskeleton.b3d",
textures = { textures = {
{"mobs_mc_witherskeleton.png"}, {"mobs_mc_witherskeleton.png"},
}, },
@ -84,7 +87,7 @@ mobs:register_mob("mobs_mc:witherskeleton", {
--spawn --spawn
mobs:register_spawn("mobs_mc:witherskeleton", mobs_mc.spawn.nether_fortress, 7, 0, 5000, 3, -3000, true) mobs:register_spawn("mobs_mc:witherskeleton", mobs_mc.spawn.nether_fortress, 7, 0, 5000, 3, -3000, true)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:witherskeleton", "Wither Skeleton", "mobs_mc_spawn_icon_witherskeleton.png", 0) mobs:register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "mobs_mc_spawn_icon_witherskeleton.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Wither Skeleton loaded") minetest.log("action", "MC Wither Skeleton loaded")

View File

@ -1,5 +1,9 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-- Slime -- Slime
local slime_big = { local slime_big = {
type = "monster", type = "monster",
@ -115,9 +119,9 @@ slime_tiny.on_die = nil
mobs:register_mob("mobs_mc:slime_tiny", slime_tiny) mobs:register_mob("mobs_mc:slime_tiny", slime_tiny)
mobs:register_spawn("mobs_mc:slime_tiny", mobs_mc.spawn.solid, minetest.LIGHT_MAX+1, 0, 5000, 4, -12) mobs:register_spawn("mobs_mc:slime_tiny", mobs_mc.spawn.solid, minetest.LIGHT_MAX+1, 0, 35000, 4, -12)
mobs:register_spawn("mobs_mc:slime_small", mobs_mc.spawn.solid, minetest.LIGHT_MAX+1, 0, 5000, 4, -12) mobs:register_spawn("mobs_mc:slime_small", mobs_mc.spawn.solid, minetest.LIGHT_MAX+1, 0, 35000, 4, -12)
mobs:register_spawn("mobs_mc:slime_big", mobs_mc.spawn.solid, minetest.LIGHT_MAX+1, 0, 5000, 4, -12) mobs:register_spawn("mobs_mc:slime_big", mobs_mc.spawn.solid, minetest.LIGHT_MAX+1, 0, 35000, 4, -12)
-- Magma cube -- Magma cube
@ -129,7 +133,7 @@ local magma_cube_big = {
visual_size = {x=12.5, y=12.5}, visual_size = {x=12.5, y=12.5},
textures = {{ "mobs_mc_magmacube.png" }}, textures = {{ "mobs_mc_magmacube.png" }},
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_magma_cube.b3d", mesh = "mobs_mc_magmacube.b3d",
blood_texture = "lava_slime_blood.png", blood_texture = "lava_slime_blood.png",
makes_footstep_sound = true, makes_footstep_sound = true,
sounds = { sounds = {
@ -237,13 +241,13 @@ mobs:register_mob("mobs_mc:magma_cube_tiny", magma_cube_tiny)
mobs:register_spawn("mobs_mc:magma_cube_tiny", mobs_mc.spawn.nether, minetest.LIGHT_MAX+1, 0, 5000, 4, -1000) mobs:register_spawn("mobs_mc:magma_cube_tiny", mobs_mc.spawn.nether, minetest.LIGHT_MAX+1, 0, 15000, 4, -1000)
mobs:register_spawn("mobs_mc:magma_cube_small", mobs_mc.spawn.nether, minetest.LIGHT_MAX+1, 0, 5500, 4, -1000) mobs:register_spawn("mobs_mc:magma_cube_small", mobs_mc.spawn.nether, minetest.LIGHT_MAX+1, 0, 15500, 4, -1000)
mobs:register_spawn("mobs_mc:magma_cube_big", mobs_mc.spawn.nether, minetest.LIGHT_MAX+1, 0, 6000, 4, -1000) mobs:register_spawn("mobs_mc:magma_cube_big", mobs_mc.spawn.nether, minetest.LIGHT_MAX+1, 0, 16000, 4, -1000)
mobs:register_spawn("mobs_mc:magma_cube_tiny", mobs_mc.spawn.nether_fortress, minetest.LIGHT_MAX+1, 0, 1000, 4, -1000) mobs:register_spawn("mobs_mc:magma_cube_tiny", mobs_mc.spawn.nether_fortress, minetest.LIGHT_MAX+1, 0, 11000, 4, -1000)
mobs:register_spawn("mobs_mc:magma_cube_small", mobs_mc.spawn.nether_fortress, minetest.LIGHT_MAX+1, 0, 1100, 4, -1000) mobs:register_spawn("mobs_mc:magma_cube_small", mobs_mc.spawn.nether_fortress, minetest.LIGHT_MAX+1, 0, 11100, 4, -1000)
mobs:register_spawn("mobs_mc:magma_cube_big", mobs_mc.spawn.nether_fortress, minetest.LIGHT_MAX+1, 0, 1200, 4, -1000) mobs:register_spawn("mobs_mc:magma_cube_big", mobs_mc.spawn.nether_fortress, minetest.LIGHT_MAX+1, 0, 11200, 4, -1000)
-- Compability -- Compability
mobs:alias_mob("mobs_mc:greensmall", "mobs_mc:slime_tiny") mobs:alias_mob("mobs_mc:greensmall", "mobs_mc:slime_tiny")
@ -254,8 +258,8 @@ mobs:alias_mob("mobs_mc:lavamedium", "mobs_mc:magma_cube_small")
mobs:alias_mob("mobs_mc:lavabig", "mobs_mc:magma_cube_big") mobs:alias_mob("mobs_mc:lavabig", "mobs_mc:magma_cube_big")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:magma_cube_big", "Magma Cube", "mobs_mc_spawn_icon_magmacube.png") mobs:register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "mobs_mc_spawn_icon_magmacube.png")
mobs:register_egg("mobs_mc:slime_big", "Slime", "mobs_mc_spawn_icon_slime.png") mobs:register_egg("mobs_mc:slime_big", S("Slime"), "mobs_mc_spawn_icon_slime.png")
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then

View File

@ -3,109 +3,139 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local snow_trail_frequency = 0.5 -- Time in seconds for checking to add a new snow trail
--dofile(minetest.get_modpath("mobs").."/api.lua") mobs:register_mob("mobs_mc:snowman", {
type = "npc",
--###################
--################### SNOWMAN
--###################
--[[
mobs:register_mob("mobs_mc:26snowman", {
type = "animal",
passive = true, passive = true,
runaway = true, hp_min = 4,
stepheight = 1.2, hp_max = 4,
hp_min = 30, pathfinding = 1,
hp_max = 60, view_range = 10,
armor = 150, fall_damage = 0,
collisionbox = {-0.35, -0.01, -0.35, 0.35, 2, 0.35}, water_damage = 4,
lava_damage = 20,
attacks_monsters = true,
collisionbox = {-0.35, -0.01, -0.35, 0.35, 1.89, 0.35},
visual = "mesh", visual = "mesh",
mesh = "snowman.b3d", mesh = "mobs_mc_snowman.b3d",
textures = { textures = {
{"snowman.png"}, {"mobs_mc_snowman.png^mobs_mc_snowman_pumpkin.png"},
}, },
gotten_texture = { "mobs_mc_snowman.png" },
drops = {{ name = mobs_mc.items.snowball, chance = 1, min = 0, max = 15 }},
visual_size = {x=3, y=3}, visual_size = {x=3, y=3},
walk_velocity = 0.6, walk_velocity = 0.6,
run_velocity = 2, run_velocity = 2,
jump = true, jump = true,
animation = {
speed_normal = 25, speed_run = 50,
stand_start = 40, stand_end = 80,
walk_start = 0, walk_end = 40,
run_start = 0, run_end = 40,
},
})
mobs:register_egg("mobs_mc:26snowman", "Snowman", "snowman_inv.png", 0)
]]
mobs:register_mob("mobs_mc:enderman", {
type = "monster",
hp_max = 79,
collisionbox = {-0.4, -2.4, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
mesh = "mobs_mc_snowman.b3d",
textures = {
{"mobs_mc_snowman.png"}
},
visual_size = {x=1.2, y=2.5},
makes_footstep_sound = true, makes_footstep_sound = true,
sounds = { attack_type = "shoot",
-- TODO arrow = "mobs_mc:snowball_entity",
distance = 16, shoot_interval = 1,
}, shoot_offset = 1,
walk_velocity = 3.2,
run_velocity = 5.4,
damage = 3,
armor = 200,
drops = {
{name = "default:obsidian",
chance = 40,
min = 0,
max = 2,},
{name = "default:diamond",
chance = 61,
min = 1,
max = 1,},
{name = "farorb:farorb",
chance = 3,
min = 0,
max = 1,},
{name = "mobs_mc:enderman_head",
chance = 50,
min = 0,
max = 1,},
},
animation = { animation = {
speed_normal = 45, speed_normal = 25,
speed_run = 15, speed_run = 50,
stand_start = 0, stand_start = 20,
stand_end = 39, stand_end = 40,
walk_start = 41, walk_start = 0,
walk_end = 72, walk_end = 20,
run_start = 74, run_start = 0,
run_end = 105, run_end = 20,
punch_start = 74, die_start = 40,
punch_end = 105, die_end = 50,
die_loop = false,
}, },
water_damage = 1, blood_amount = 0,
lava_damage = 5, do_custom = function(self, dtime)
light_damage = 0, -- Leave a trail of top snow behind.
view_range = 16, -- This is done in do_custom instead of just using replace_what because with replace_what,
attack_type = "dogfight", -- the top snop may end up floating in the air.
replace_rate = 1, if not self._snowtimer then
replace_what = {"default:torch","default:sand","default:desert_sand","default:cobble","default:dirt","default:dirt_with_glass","default:dirt_with_dry_grass","default:wood","default:stone","default:sandstone"}, self._snowtimer = 0
replace_with = "air", return
replace_offset = -1, end
self._snowtimer = self._snowtimer + dtime
if self.health > 0 and self._snowtimer > snow_trail_frequency then
self._snowtimer = 0
local pos = self.object:getpos()
local below = {x=pos.x, y=pos.y-1, z=pos.z}
local def = minetest.registered_nodes[minetest.get_node(pos).name]
-- Node at snow golem's position must be replacable
if def and def.buildable_to then
-- Node below must be walkable
-- and a full cube (this prevents oddities like top snow on top snow, lower slabs, etc.)
local belowdef = minetest.registered_nodes[minetest.get_node(below).name]
if belowdef and belowdef.walkable and (belowdef.node_box == nil or belowdef.node_box.type == "regular") then
-- Place top snow
minetest.set_node(pos, {name = mobs_mc.items.top_snow})
end
end
end
end,
-- Remove pumpkin if using shears
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if self.gotten ~= true and item:get_name() == mobs_mc.items.shears then
-- Remove pumpkin
self.gotten = true
self.object:set_properties({
textures = {"mobs_mc_snowman.png"},
})
local pos = self.object:getpos()
minetest.sound_play("shears", {pos = pos})
-- Wear out
if not minetest.settings:get_bool("creative_mode") then
item:add_wear(mobs_mc.misc.shears_wear)
clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item)
end
end
end,
}) })
-- This is to be called when a pumpkin or jack'o lantern has been placed. Recommended: In the on_construct function
-- of the node.
-- This summons a snow golen when pos is next to a row of two snow blocks.
mobs_mc.tools.check_snow_golem_summon = function(pos)
local checks = {
-- These are the possible placement patterns
-- { snow block pos. 1, snow block pos. 2, snow golem spawn position }
{ {x=pos.x, y=pos.y-1, z=pos.z}, {x=pos.x, y=pos.y-2, z=pos.z}, {x=pos.x, y=pos.y-2.5, z=pos.z} },
{ {x=pos.x, y=pos.y+1, z=pos.z}, {x=pos.x, y=pos.y+2, z=pos.z}, {x=pos.x, y=pos.y-0.5, z=pos.z} },
{ {x=pos.x-1, y=pos.y, z=pos.z}, {x=pos.x-2, y=pos.y, z=pos.z}, {x=pos.x-2, y=pos.y-0.5, z=pos.z} },
{ {x=pos.x+1, y=pos.y, z=pos.z}, {x=pos.x+2, y=pos.y, z=pos.z}, {x=pos.x+2, y=pos.y-0.5, z=pos.z} },
{ {x=pos.x, y=pos.y, z=pos.z-1}, {x=pos.x, y=pos.y, z=pos.z-2}, {x=pos.x, y=pos.y-0.5, z=pos.z-2} },
{ {x=pos.x, y=pos.y, z=pos.z+1}, {x=pos.x, y=pos.y, z=pos.z+2}, {x=pos.x, y=pos.y-0.5, z=pos.z+2} },
}
-- spawn eggs for c=1, #checks do
mobs:register_egg("mobs_mc:snowman", "Snow Golem", "mobs_mc_spawn_icon_snowman.png", 0) local b1 = checks[c][1]
local b2 = checks[c][2]
local place = checks[c][3]
local b1n = minetest.get_node(b1)
local b2n = minetest.get_node(b2)
if b1n.name == mobs_mc.items.snow_block and b2n.name == mobs_mc.items.snow_block then
-- Remove the pumpkin and both snow blocks and summon the snow golem
minetest.remove_node(pos)
minetest.remove_node(b1)
minetest.remove_node(b2)
core.check_for_falling(pos)
core.check_for_falling(b1)
core.check_for_falling(b2)
minetest.add_entity(place, "mobs_mc:snowman")
break
end
end
end
-- Spawn egg
mobs:register_egg("mobs_mc:snowman", S("Snow Golem"), "mobs_mc_spawn_icon_snowman.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Enderman loaded") minetest.log("action", "MC Snow Golem loaded")
end end

BIN
sounds/mobs_mc_cow.ogg Normal file

Binary file not shown.

BIN
sounds/mobs_mc_llama.ogg Normal file

Binary file not shown.

Binary file not shown.

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -73,7 +76,7 @@ cave_spider.walk_velocity = 4.1
mobs:register_mob("mobs_mc:cave_spider", cave_spider) mobs:register_mob("mobs_mc:cave_spider", cave_spider)
mobs:register_spawn("mobs_mc:spider", mobs_mc.spawn.solid, 7, 0, 9500, 2, 3000) mobs:register_spawn("mobs_mc:spider", mobs_mc.spawn.solid, 7, 0, 19500, 2, 3000)
-- compatibility -- compatibility
@ -81,8 +84,8 @@ mobs:alias_mob("mobs:spider", "mobs_mc:spider")
mobs:alias_mob("esmobs:spider", "mobs_mc:spider") mobs:alias_mob("esmobs:spider", "mobs_mc:spider")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:spider", "Spider", "mobs_mc_spawn_icon_spider.png", 0) mobs:register_egg("mobs_mc:spider", S("Spider"), "mobs_mc_spawn_icon_spider.png", 0)
mobs:register_egg("mobs_mc:cave_spider", "Cave Spider", "mobs_mc_spawn_icon_cave_spider.png", 0) mobs:register_egg("mobs_mc:cave_spider", S("Cave Spider"), "mobs_mc_spawn_icon_cave_spider.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Spiders loaded") minetest.log("action", "MC Spiders loaded")

View File

@ -4,7 +4,9 @@
--################### SQUID --################### SQUID
--################### --###################
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:squid", { mobs:register_mob("mobs_mc:squid", {
type = "animal", type = "animal",
@ -66,4 +68,4 @@ mobs:spawn_specific("mobs_mc:squid", mobs_mc.spawn.water, {mobs_mc.items.water_s
mobs:alias_mob("mobs:squid", "mobs_mc:squid") mobs:alias_mob("mobs:squid", "mobs_mc:squid")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:squid", "Squid", "mobs_mc_spawn_icon_squid.png", 0) mobs:register_egg("mobs_mc:squid", S("Squid"), "mobs_mc_spawn_icon_squid.png", 0)

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

View File

@ -3,6 +3,10 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
--################### --###################
@ -84,7 +88,7 @@ mobs:register_mob("mobs_mc:vex", {
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:vex", "Vex", "mobs_mc_spawn_icon_vex.png", 0) mobs:register_egg("mobs_mc:vex", S("Vex"), "mobs_mc_spawn_icon_vex.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
--################### --###################
@ -170,7 +173,7 @@ mobs:register_spawn("mobs_mc:villager", {"mg_villages:road"}, minetest.LIGHT_MAX
mobs:alias_mob("mobs:villager", "mobs_mc:villager") mobs:alias_mob("mobs:villager", "mobs_mc:villager")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:villager", "Villager", "mobs_mc_spawn_icon_villager.png", 0) mobs:register_egg("mobs_mc:villager", S("Villager"), "mobs_mc_spawn_icon_villager.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC mobs loaded") minetest.log("action", "MC mobs loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
--################### --###################
@ -85,7 +88,7 @@ mobs:register_mob("mobs_mc:evoker", {
}) })
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:evoker", "Evoker", "mobs_mc_spawn_icon_evoker.png", 0) mobs:register_egg("mobs_mc:evoker", S("Evoker"), "mobs_mc_spawn_icon_evoker.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then

View File

@ -3,6 +3,10 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:illusioner", { mobs:register_mob("mobs_mc:illusioner", {
type = "monster", type = "monster",
attack_type = "shoot", attack_type = "shoot",
@ -43,7 +47,7 @@ mobs:register_mob("mobs_mc:illusioner", {
lava_damage = 4, lava_damage = 4,
}) })
mobs:register_egg("mobs_mc:illusioner", "Illusioner", "mobs_mc_spawn_icon_illusioner.png", 0) mobs:register_egg("mobs_mc:illusioner", S("Illusioner"), "mobs_mc_spawn_icon_illusioner.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Illusioner loaded") minetest.log("action", "MC Illusioner loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
--################### --###################
@ -69,7 +72,7 @@ mobs:register_mob("mobs_mc:vindicator", {
}) })
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:vindicator", "Vindicator", "mobs_mc_spawn_icon_vindicator.png", 0) mobs:register_egg("mobs_mc:vindicator", S("Vindicator"), "mobs_mc_spawn_icon_vindicator.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC vindicator loaded") minetest.log("action", "MC vindicator loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -18,7 +21,7 @@ mobs:register_mob("mobs_mc:villager_zombie", {
armor = 90, armor = 90,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_villager_zombie.b3d", mesh = "mobs_mc_zvillager.b3d",
textures = { textures = {
{"mobs_mc_zombie_butcher.png"}, {"mobs_mc_zombie_butcher.png"},
{"mobs_mc_zombie_farmer.png"}, {"mobs_mc_zombie_farmer.png"},
@ -85,7 +88,7 @@ mobs:register_spawn("mobs_mc:villager_zombie", {"mg_villages:road"}, 7, -1, 4090
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:villager_zombie", "Zombie Villager", "mobs_mc_spawn_icon_zombie_villager.png", 0) mobs:register_egg("mobs_mc:villager_zombie", S("Zombie Villager"), "mobs_mc_spawn_icon_zombie_villager.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC mobs Zombie Villager loaded") minetest.log("action", "MC mobs Zombie Villager loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -109,7 +112,7 @@ mobs:register_arrow(":mobs:potion_arrow", {
mobs:spawn_specific("mobs_mc:witch", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, 1, 30) mobs:spawn_specific("mobs_mc:witch", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, 1, 30)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:witch", "Witch", "mobs_mc_spawn_icon_witch.png", 0) mobs:register_egg("mobs_mc:witch", S("Witch"), "mobs_mc_spawn_icon_witch.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC mobs loaded") minetest.log("action", "MC mobs loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -32,8 +35,8 @@ mobs:register_mob("mobs_mc:wither", {
run_velocity = 4, run_velocity = 4,
stepheight = 1.2, stepheight = 1.2,
sounds = { sounds = {
shoot_attack = "mesed", shoot_attack = "mobs_mc_ender_dragon_shoot",
attack = "mese_dragon", attack = "mobs_mc_ender_dragon_attack",
distance = 60, distance = 60,
}, },
jump = true, jump = true,
@ -45,10 +48,10 @@ mobs:register_mob("mobs_mc:wither", {
attack_animals = true, attack_animals = true,
floats=1, floats=1,
drops = { drops = {
{name = mobs_mc.items.emerald, {name = mobs_mc.items.nether_star,
chance = 1, chance = 1,
min = 18, min = 1,
max = 21}, max = 1},
}, },
water_damage = 0, water_damage = 0,
lava_damage = 0, lava_damage = 0,
@ -149,7 +152,7 @@ mobs:register_arrow(":mobs_mc:fireball", {
end end
}) })
--Spawn egg --Spawn egg
mobs:register_egg("mobs_mc:wither", "Wither", "mobs_mc_spawn_icon_wither.png", 0) mobs:register_egg("mobs_mc:wither", S("Wither"), "mobs_mc_spawn_icon_wither.png", 0)
--Compatibility --Compatibility
mobs:alias_mob("nssm:mese_dragon", "mobs_mc:wither") mobs:alias_mob("nssm:mese_dragon", "mobs_mc:wither")

View File

@ -1,5 +1,9 @@
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local default_walk_chance = 50 local default_walk_chance = 50
local pr = PseudoRandom(os.time()*10) local pr = PseudoRandom(os.time()*10)
@ -186,7 +190,7 @@ mobs:alias_mob("mobs:dog", "mobs_mc:dog")
mobs:alias_mob("esmobs:wolf", "mobs_mc:wolf") mobs:alias_mob("esmobs:wolf", "mobs_mc:wolf")
mobs:alias_mob("esmobs:dog", "mobs_mc:dog") mobs:alias_mob("esmobs:dog", "mobs_mc:dog")
mobs:register_egg("mobs_mc:wolf", "Wolf", "mobs_mc_spawn_icon_wolf.png", 0) mobs:register_egg("mobs_mc:wolf", S("Wolf"), "mobs_mc_spawn_icon_wolf.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Wolf loaded") minetest.log("action", "MC Wolf loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
@ -121,8 +124,8 @@ mobs:register_spawn("mobs_mc:baby_husk", mobs_mc.spawn.desert, 7, 0, 65000, 4, 3
mobs:alias_mob("mobs:zombie", "mobs_mc:zombie") mobs:alias_mob("mobs:zombie", "mobs_mc:zombie")
-- Spawn eggs -- Spawn eggs
mobs:register_egg("mobs_mc:husk", "Husk", "spawn_egg_husk.png", 0) -- TODO: Replace spawn icon mobs:register_egg("mobs_mc:husk", S("Husk"), "spawn_egg_husk.png", 0) -- TODO: Replace spawn icon
mobs:register_egg("mobs_mc:zombie", "Zombie", "mobs_mc_spawn_icon_zombie.png", 0) mobs:register_egg("mobs_mc:zombie", S("Zombie"), "mobs_mc_spawn_icon_zombie.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Zombie loaded") minetest.log("action", "MC Zombie loaded")

View File

@ -3,6 +3,9 @@
--made for MC like Survival game --made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes --License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua") --dofile(minetest.get_modpath("mobs").."/api.lua")
--################### --###################
@ -99,7 +102,7 @@ mobs:spawn_specific("mobs_mc:pigman", mobs_mc.spawn.nether_portal, {"air", "mcl_
mobs:alias_mob("mobs:pigman", "mobs_mc:pigman") mobs:alias_mob("mobs:pigman", "mobs_mc:pigman")
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:pigman", "Zombie Pigman", "mobs_mc_spawn_icon_zombie_pigman.png", 0) mobs:register_egg("mobs_mc:pigman", S("Zombie Pigman"), "mobs_mc_spawn_icon_zombie_pigman.png", 0)
if minetest.settings:get_bool("log_mods") then if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Pigmen loaded") minetest.log("action", "MC Pigmen loaded")