Merge branch 'master' of https://github.com/maikerumine/mobs_mc into help

master
Wuzzy 2017-07-05 00:22:21 +02:00
commit ab682d3eed
304 changed files with 306 additions and 7342 deletions

View File

@ -52,6 +52,8 @@ mobs_mc.items = {
totem = "mobs_mc:totem",
rotten_flesh = "mobs_mc:rotten_flesh",
nether_star = "mobs_mc:nether_star",
bone = "mobs_mc:bone",
slimeball = "mobs_mc:slimeball",
arrow = "mobs_mc:arrow",
bow = "mobs_mc:bow_wood",
@ -111,8 +113,11 @@ mobs_mc.items = {
salmon_raw = "fishing:carp_raw",
clownfish_raw = "fishing:clownfish_raw",
pufferfish_raw = "fishing:pike_raw",
bone = "bonemeal:bone",
slimeball = "mesecons_materials:glue",
cookie = "farming:cookie",
-- TODO: Add actual ender pearl
ender_pearl = "farorb:farorb",
@ -147,8 +152,9 @@ mobs_mc.items = {
mobs_mc.follow = {
sheep = { mobs_mc.items.wheat },
cow = { mobs_mc.items.wheat },
chicken = { "farming:seed_wheat", "farming:seed_cotton" },
horse = { mobs_mc.items.apple, mobs_mc.items.sugar, mobs_mc.items.wheat, mobs_mc.items.hay_bale, mobs_mc.items.golden_apple, mobs_mc.items.golden_carrot }, -- TODO
chicken = { "farming:seed_wheat", "farming:seed_cotton" }, -- seeds in general
parrot = { "farming:seed_wheat", "farming:seed_cotton" }, -- seeds in general
horse = { mobs_mc.items.apple, mobs_mc.items.sugar, mobs_mc.items.wheat, mobs_mc.items.hay_bale, mobs_mc.items.golden_apple, mobs_mc.items.golden_carrot },
pig = { mobs_mc.items.potato, mobs_mc.items.carrot, mobs_mc.items.carrot_on_a_stick,
mobs_mc.items.apple, -- Minetest Game extra
},

View File

@ -489,6 +489,20 @@ if c("magma_cream") then
})
end
-- Slime
if c("slimeball") then
minetest.register_craftitem("mobs_mc:slimeball", {
description = S("Slimeball"),
inventory_image = "mcl_mobitems_slimeball.png"
})
if minetest.get_modpath("mesecons_materials") then
minetest.register_craft({
output = "mesecons_materials:glue",
recipe = {{ "mobs_mc:slimeball" }},
})
end
end
-- Spider
if c("spider_eye") then
minetest.register_craftitem("mobs_mc:spider_eye", {
@ -534,6 +548,7 @@ if c("rotten_flesh") then
})
end
-- Misc.
if c("nether_star") then
minetest.register_craftitem("mobs_mc:nether_star", {
description = S("Nether Star"),
@ -562,3 +577,16 @@ if c("snowball") and minetest.get_modpath("default") then
wield_image = "",
})
end
if c("bone") then
minetest.register_craftitem("mobs_mc:bone", {
description = S("Bone"),
inventory_image = "mcl_mobitems_bone.png"
})
if minetest.get_modpath("bones") then
minetest.register_craft({
output = "mobs_mc:bone 3",
recipe = {{ "bones:bones" }},
})
end
end

View File

@ -34,7 +34,7 @@ minetest.register_node("mobs_mc:arrow_box", {
{7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17},
}
},
tiles = {"throwing_arrow.png", "throwing_arrow.png", "throwing_arrow_back.png", "throwing_arrow_front.png", "throwing_arrow_2.png", "throwing_arrow.png"},
tiles = {"mcl_throwing_arrow.png^[transformFX", "mcl_throwing_arrow.png^[transformFX", "mcl_throwing_arrow_back.png", "mcl_throwing_arrow_front.png", "mcl_throwing_arrow.png", "mcl_throwing_arrow.png^[transformFX"},
groups = {not_in_creative_inventory=1},
})
@ -136,7 +136,7 @@ if c("arrow") then
description = S("Arrow"),
_doc_items_longdesc = S("Arrows are ammunition for bows."),
_doc_items_usagehelp = S("To use arrows as ammunition for a bow, put them in the inventory slot following the bow. Slots are counted left to right, top to bottom."),
inventory_image = "throwing_arrow_2.png",
inventory_image = "mcl_throwing_arrow_inv.png",
})
end
@ -156,7 +156,7 @@ if c("bow") then
description = S("Bow"),
_doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes."),
_doc_items_usagehelp = S("To use the bow, you first need to have at least one arrow in slot following the bow. Leftclick to shoot. Each hit deals 3 damage."),
inventory_image = "mobs_mc_bow.png",
inventory_image = "mcl_throwing_bow.png",
on_use = function(itemstack, user, pointed_thing)
if throwing_shoot_arrow(itemstack, user, pointed_thing) then
if not minetest.settings:get_bool("creative_mode") then
@ -321,7 +321,6 @@ if c("snowball") then
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

View File

@ -9,7 +9,7 @@ The following media licenses are used:
* [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)
* [MIT License](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.
@ -22,14 +22,14 @@ 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.)
## Textures
* 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
* Most mob and item textures from [Pixel Perfection](https://www.planetminecraft.com/texture_pack/131pixel-perfection/), a texture pack for Minecraft.
* Author: [XSSheep](https://www.planetminecraft.com/member/xssheep/)
* License: CC BY-SA 4.0
* “Spawn egg” textures (`mobs_mc_spawn_icon_*`) by 22i
* Mob head textures: **UNKNOWN!**
* `throwing_*`: Jeija (CC0)
* Anything else: **UNKNOWN!**
* Any other texture not mentioned here are licensed under the MIT License
## Sounds

198
README.md
View File

@ -8,6 +8,7 @@ This mod adds mobs which closely resemble the mobs from the game Minecraft, vers
* [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
* [XSSheep](https://www.planetminecraft.com/member/xssheep/): Mob and item textures (from [Pixel Perfection](https://www.planetminecraft.com/texture_pack/131pixel-perfection/)
* See `LICENSE_media.md` for detailed credits about each file
## Licensing
@ -26,141 +27,62 @@ Want to include this mod in your subgame? Read `gameconfig.md`.
* [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">
Blaze
<img src="http://i.imgur.com/Dy5kBOG.png">
Ocelot
<img src="http://i.imgur.com/YVcE6Y6.png">
Chicken
<img src="http://i.imgur.com/zvGBYsv.png">
Mooshroom
<img src="http://i.imgur.com/OzjxrTu.png">
Cow
<img src="http://i.imgur.com/fFT81H5.png">
Creeper
<img src="http://i.imgur.com/kPo9syY.png">
Magmacube
<img src="http://i.imgur.com/gxubcHM.png">
Slime
<img src="http://i.imgur.com/R8z1H7M.png">
Ender dragon
<img src="http://i.imgur.com/VjBb13j.png">
Enderman
<img src="http://i.imgur.com/v4QCDxn.png">
Endermite
<img src="http://i.imgur.com/7R2pwBw.png">
Ghast
<img src="http://i.imgur.com/bOj1opZ.png">
Guardian
<img src="http://i.imgur.com/fZ2r66l.png">
Horse
<img src="http://i.imgur.com/MIIVFyn.png">
Iron golem
<img src="http://i.imgur.com/sbwG042.png">
Llama
<img src="http://i.imgur.com/2EvdYiI.png">
Pig
<img src="http://i.imgur.com/k3bLbHk.png">
Zombie
<img src="http://i.imgur.com/ZOgPRz6.png">
Rabbit
<img src="http://i.imgur.com/YDu8XGC.png">
Sheep
<img src="http://i.imgur.com/MU8qCaZ.png">
Silverfish
<img src="http://i.imgur.com/YY2I8g6.png">
Snowman
<img src="http://i.imgur.com/qhiqfBd.png">
Spider
<img src="http://i.imgur.com/OIXdFBW.png">
Squid
<img src="http://i.imgur.com/LHpRD6p.png">
Vex
<img src="http://i.imgur.com/1vyZ8Wq.png">
Villager
<img src="http://i.imgur.com/FnMLwOV.png">
Villager zombie
<img src="http://i.imgur.com/Gw1pVhB.png">
Witch
<img src="http://i.imgur.com/1Ei2yAn.png">
Wither
<img src="http://i.imgur.com/uRbCgIY.png">
Wolf
<img src="http://i.imgur.com/IwI4aRc.png">
Wither skeleton
<img src="http://i.imgur.com/aQC92qw.png">
Stray skeleton
<img src="http://i.imgur.com/61TLenX.png">
Skeleton
<img src="http://i.imgur.com/NkZZudF.png">
Zombie pigman
## List of mobs
**Note**: Many of these are incomplete.
### Monsters
* Zombie
* Husk
* Skeleton
* Stray
* Creeper
* Slime
* Spider
* Cave Spider
* Enderman
* Zombie Villager
* Zombie Pigman
* Wither Skeleton
* Magma Cube
* Blaze
* Ghast
* Evoker
* Vex
* Vindicator
* Witch
* Guardian
* Silverfish
* Endermite
* Shulker
* Ender Dragon
* Wither
* Elder Guardian
### Peaceful mobs
* Chicken
* Cow
* Pig
* Rabbit
* Sheep
* Squid
* Polar Bear
* Bat
* Mooshroom
* Horse
* Donkey
* Llama
* Mule
* Skeleton Horse
* Zombie Horse
### Helpful mobs
* Wolf
* Villager
* Iron golem
* Snow golem
* Ocelot/Cat
* Parrot

View File

@ -63,10 +63,9 @@ mobs:register_mob("mobs_mc:chicken", {
fear_height = 4,
on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 8, true, true) then return end
if mobs:feed_tame(self, clicker, 1, true, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 30, 50, 80, false, nil) then return end
if mobs:capture_mob(self, clicker, 0, 60, 5, false, nil) then return end
end,
do_custom = function(self, dtime)

View File

@ -45,9 +45,13 @@ local cow_def = {
},
follow = mobs_mc.follow.cow,
on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 1, true, true) then return end
if mobs:protect(self, clicker) then return end
if self.child then
return
end
local item = clicker:get_wielded_item()
if item:get_name() == mobs_mc.items.bucket and clicker:get_inventory() then
local inv = clicker:get_inventory()
@ -60,6 +64,7 @@ local cow_def = {
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs_mc.items.milk})
end
return
end
mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
end,
@ -73,9 +78,12 @@ mobs:register_mob("mobs_mc:cow", cow_def)
-- Mooshroom
local mooshroom_def = table.copy(cow_def)
mooshroom_def.mesh = "mobs_mc_mooshroom.b3d"
mooshroom_def.textures = { {"mobs_mc_mooshroom.png"}, }
mooshroom_def.mesh = "mobs_mc_cow.b3d"
mooshroom_def.textures = { {"mobs_mc_mooshroom.png^mobs_mc_mooshroom_mooshroom.png"}, }
mooshroom_def.on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 1, true, true) then return end
if mobs:protect(self, clicker) then return end
if self.child then
return
end

View File

@ -4,6 +4,8 @@ tnt?
mcl_throwing?
throwing?
fishing?
bones?
mesecons_materials?
mobs_mc_gameconfig?
intllib?
doc_items?

View File

@ -178,5 +178,5 @@ mobs:register_arrow(":mobs_mc:fireball2", {
end
})
mobs:register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "mobs_mc_spawn_icon_enderdragon.png", 0)
mobs:register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "mobs_mc_spawn_icon_dragon.png", 0)

View File

@ -33,9 +33,6 @@ mobs:register_mob("mobs_mc:endermite", {
fear_height = 4,
view_range = 16,
damage = 2,
on_rightclick = function(self, clicker)
mobs:capture_mob(self, clicker, 25, 80, 0, true, nil)
end,
blood_amount = 0,
})

View File

@ -83,7 +83,7 @@ mobs:spawn_specific("mobs_mc:ghast", mobs_mc.spawn.nether, {"air"},0, minetest.L
mobs:register_arrow(":mobs_monster:fireball", {
visual = "sprite",
visual_size = {x = 0.5, y = 0.5},
textures = {"mcl_mobitems_fireball.png"},
textures = {"mcl_mobitems_fire_charge.png"},
velocity = 6,
-- direct hit, no fire... just plenty of pain

View File

@ -40,6 +40,9 @@ end
local can_equip_chest = function(entity_id)
return entity_id == "mobs_mc:mule" or entity_id == "mobs_mc:donkey"
end
local can_breed = function(entity_id)
return entity_id == "mobs_mc:horse" or "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. ]]
@ -94,6 +97,8 @@ local horse = {
lava_damage = 4,
water_damage = 1,
makes_footstep_sound = true,
jump = true,
jump_height = 5.75, -- can clear 2.5 blocks
drops = {
{name = mobs_mc.items.leather,
chance = 1,
@ -158,10 +163,15 @@ local horse = {
return
end
-- feed, tame or heal horse
if mobs:feed_tame(self, clicker, 1, true, true) then
return
local item = clicker:get_wielded_item()
if can_breed(self.name) and (item:get_name() == mobs_mc.items.golden_apple or item:get_name() == mobs_mc.items.golden_carrot) then
-- Breed horse with golden apple or golden carrot
if mobs:feed_tame(self, clicker, 1, true, false) then return end
end
-- Feed/tame with anything else
-- TODO: Different health bonus for feeding
if mobs:feed_tame(self, clicker, 1, false, true) then return end
if mobs:protect(self, clicker) then return end
-- Make sure tamed horse is mature and being clicked by owner only
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
@ -234,9 +244,9 @@ local horse = {
self.object:set_properties({stepheight = 1.1})
mobs.attach(self, clicker)
-- Used to capture horse with magic lasso
-- Used to capture horse
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, 5, 60, false, nil)
end
end
end
@ -282,7 +292,7 @@ mobs:register_mob("mobs_mc:zombie_horse", zombie_horse)
-- Donkey
local d = 0.86 -- donkey scale
local donkey = table.copy(horse)
donkey.textures = {{"mobs_mc_horse_creamy.png"}}
donkey.textures = {{"mobs_mc_donkey.png"}}
donkey.animation = {
speed_normal = 25,
stand_start = 0, stand_end = 0,
@ -297,6 +307,9 @@ donkey.collisionbox = {
horse.collisionbox[5] * d,
horse.collisionbox[6] * d,
}
donkey.jump = true
donkey.jump_height = 3.75 -- can clear 1 block height
mobs:register_mob("mobs_mc:donkey", donkey)
-- Mule

View File

@ -94,8 +94,7 @@ dofile(path .. "/snowman.lua")
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 .. "/silverfish.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
dofile(path .. "/skeleton.lua") -- Mesh by Morn76 Animation by Pavel_S
dofile(path .. "/skeleton_stray.lua") -- Mesh by Morn76 Animation by Pavel_S
dofile(path .. "/skeleton+stray.lua") -- Mesh by Morn76 Animation by Pavel_S
dofile(path .. "/skeleton_wither.lua") -- Mesh by Morn76 Animation by Pavel_S
dofile(path .. "/zombie.lua") -- Mesh by Morn76 Animation by Pavel_S
dofile(path .. "/zombiepig.lua") -- Mesh by Morn76 Animation by Pavel_S

View File

@ -103,10 +103,15 @@ mobs:register_mob("mobs_mc:llama", {
return
end
-- Feed, tame or heal llama
if mobs:feed_tame(self, clicker, 1, true, true) then
return
local item = clicker:get_wielded_item()
if item:get_name() == mobs_mc.items.hay_bale then
-- Breed with hay bale
if mobs:feed_tame(self, clicker, 1, true, false) then return end
else
-- Feed with anything else
if mobs:feed_tame(self, clicker, 1, false, true) then return end
end
if mobs:protect(self, clicker) then return end
-- Make sure tamed llama is mature and being clicked by owner only
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
@ -125,9 +130,9 @@ mobs:register_mob("mobs_mc:llama", {
mobs.attach(self, clicker)
end
-- Used to capture llama with lasso
-- Used to capture llama
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, 5, 60, false, nil)
end
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -66,10 +66,8 @@ local ocelot = {
attack_animals = true,
specific_attack = { "mobs_mc:chicken" },
on_rightclick = function(self, clicker)
if self.child then
return
end
-- Try to tame ocelot
if self.child then return end
-- Try to tame ocelot (mobs:feed_tame is intentionally NOT used)
local item = clicker:get_wielded_item()
if is_food(item:get_name()) then
if not minetest.settings:get_bool("creative_mode") then
@ -85,11 +83,10 @@ local ocelot = {
ent.owner = clicker:get_player_name()
ent.tamed = true
self.object:remove()
return
end
end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 30, 50, 80, false, nil) then return end
end,
}
@ -106,12 +103,11 @@ cat.runaway = false
-- Automatically teleport cat to owner
cat.do_custom = mobs_mc.make_owner_teleport_function(12)
cat.on_rightclick = function(self, clicker)
if self.child then
return
end
if mobs:feed_tame(self, clicker, 1, true, false) then
return
end
if mobs:feed_tame(self, clicker, 1, true, false) then return end
if mobs:capture_mob(self, clicker, 0, 60, 5, false, nil) then return end
if mobs:protect(self, clicker) then return end
if self.child then return end
-- Toggle sitting order
@ -132,7 +128,6 @@ cat.on_rightclick = function(self, clicker)
self.jump = false
end
if mobs:protect(self, clicker) then return end
end
mobs:register_mob("mobs_mc:cat", cat)

View File

@ -62,9 +62,26 @@ mobs:register_mob("mobs_mc:parrot", {
fly_in = {"air"},
fear_height = 4,
view_range = 16,
follow = mobs_mc.follow.parrot,
on_rightclick = function(self, clicker)
mobs:capture_mob(self, clicker, 0, 50, 80, false, nil)
if self._doomed then return end
local item = clicker:get_wielded_item()
-- Kill parrot if fed with cookie
if item:get_name() == mobs_mc.items.cookie then
self.health = 0
-- Doomed to die
self._doomed = true
if not minetest.settings:get_bool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
return
end
-- Feed to tame, but not breed
if mobs:feed_tame(self, clicker, 1, false, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 0, 50, 80, false, nil) then return end
end,
})

View File

@ -95,10 +95,9 @@ mobs:register_mob("mobs_mc:pig", {
local wielditem = clicker:get_wielded_item()
-- Feed pig
if wielditem:get_name() ~= mobs_mc.items.carrot_on_a_stick then
if mobs:feed_tame(self, clicker, 1, true, true) then
return
end
if mobs:feed_tame(self, clicker, 1, true, true) then return end
end
if mobs:protect(self, clicker) then return end
if self.child then
return
@ -162,9 +161,9 @@ mobs:register_mob("mobs_mc:pig", {
end
return
-- Capture pig with lasso
-- Capture pig
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, 5, 60, false, nil)
end
end,
})

View File

@ -53,13 +53,10 @@ local rabbit = {
replace_rate = 10,
replace_what = mobs_mc.replace.rabbit,
on_rightclick = function(self, clicker)
-- feed or tame
if mobs:feed_tame(self, clicker, 4, true, true) then
return
end
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
-- Feed, tame protect or capture
if mobs:feed_tame(self, clicker, 1, true, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 0, 50, 80, false, nil) then return end
end,
do_custom = function(self)
-- Easter egg: Change texture if rabbit is named “Toast”

127
sheep.lua
View File

@ -4,35 +4,35 @@
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua")
--###################
--################### SHEEP
--###################
local colors = {
-- group = { wool, textures }
unicolor_white = { mobs_mc.items.wool_white, { "mobs_mc_sheep_white.png" } },
unicolor_dark_orange = { mobs_mc.items.wool_brown, { "mobs_mc_sheep_brown.png" } },
unicolor_grey = { mobs_mc.items.wool_light_grey, { "mobs_mc_sheep_grey.png" } },
unicolor_darkgrey = { mobs_mc.items.wool_grey, { "mobs_mc_sheep_dark_grey.png" } },
unicolor_blue = { mobs_mc.items.wool_blue, { "mobs_mc_sheep_blue.png" } },
unicolor_dark_green = { mobs_mc.items.wool_green, { "mobs_mc_sheep_dark_green.png" } },
unicolor_green = { mobs_mc.items.wool_lime, { "mobs_mc_sheep_green.png" } },
unicolor_violet = { mobs_mc.items.wool_purple , { "mobs_mc_sheep_violet.png" } },
unicolor_light_red = { mobs_mc.items.wool_pink, { "mobs_mc_sheep_pink.png" } },
unicolor_yellow = { mobs_mc.items.wool_yellow, { "mobs_mc_sheep_yellow.png" } },
unicolor_orange = { mobs_mc.items.wool_orange, { "mobs_mc_sheep_orange.png" } },
unicolor_red = { mobs_mc.items.wool_red, { "mobs_mc_sheep_red.png" } },
unicolor_cyan = { mobs_mc.items.wool_cyan, { "mobs_mc_sheep_cyan.png" } },
unicolor_red_violet = { mobs_mc.items.wool_magenta, { "mobs_mc_sheep_magenta.png" } },
unicolor_black = { mobs_mc.items.wool_black, { "mobs_mc_sheep_black.png" } },
unicolor_white = { mobs_mc.items.wool_white, "#FFFFFF00" },
unicolor_dark_orange = { mobs_mc.items.wool_brown, "#502A00D0" },
unicolor_grey = { mobs_mc.items.wool_light_grey, "#5B5B5BD0" },
unicolor_darkgrey = { mobs_mc.items.wool_grey, "#303030D0" },
unicolor_blue = { mobs_mc.items.wool_blue, "#0000CCD0" },
unicolor_dark_green = { mobs_mc.items.wool_green, "#005000D0" },
unicolor_green = { mobs_mc.items.wool_lime, "#50CC00D0" },
unicolor_violet = { mobs_mc.items.wool_purple , "#5000CCD0" },
unicolor_light_red = { mobs_mc.items.wool_pink, "#FF5050D0" },
unicolor_yellow = { mobs_mc.items.wool_yellow, "#CCCC00D0" },
unicolor_orange = { mobs_mc.items.wool_orange, "#CC5000D0" },
unicolor_red = { mobs_mc.items.wool_red, "#CC0000D0" },
unicolor_cyan = { mobs_mc.items.wool_cyan, "#00CCCCD0" },
unicolor_red_violet = { mobs_mc.items.wool_magenta, "#CC0050D0" },
unicolor_black = { mobs_mc.items.wool_black, "#000000D0" },
}
if minetest.get_modpath("mcl_wool") ~= nil then
colors["unicolor_light_blue"] = { mobs_mc.items.wool_light_blue, { "mobs_mc_sheep_light_blue.png" } }
colors["unicolor_light_blue"] = { mobs_mc.items.wool_light_blue, "#5050FFD0" }
end
local sheep_texture = function(color_group)
return {"mobs_mc_sheep.png^(mobs_mc_sheep_fur.png^[colorize:"..colors[color_group][2]..")"}
end
--mcsheep
@ -44,13 +44,11 @@ mobs:register_mob("mobs_mc:sheep", {
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.29, 0.45},
visual = "mesh",
visual_size = {x=0.65, y=0.65},
-- TODO: Switch to AMC sheep mesh
mesh = "mobs_sheep.x",
textures = {
{"mobs_mc_sheep_white.png"},--was sheep
},
gotten_texture = "mobs_mc_sheep_sheared.png",
visual_size = {x=3, y=3},
mesh = "mobs_mc_sheepfur.b3d",
gotten_mesh = "mobs_mc_sheepnaked.b3d",
textures = { sheep_texture("unicolor_white") },
color = "unicolor_white",
makes_footstep_sound = true,
walk_velocity = 1,
drops = {
@ -74,19 +72,10 @@ mobs:register_mob("mobs_mc:sheep", {
distance = 16,
},
animation = {
speed_normal = 24,
stand_start = 0,
stand_end = 23,
walk_start = 24,
walk_end = 49,
hurt_start = 118,
hurt_end = 154,
death_start = 154,
death_end = 179,
eat_start = 49,
eat_end = 78,
look_start = 78,
look_end = 108,
speed_normal = 25, speed_run = 50,
stand_start = 40, stand_end = 80,
walk_start = 0, walk_end = 40,
run_start = 0, run_end = 40,
},
follow = mobs_mc.follow.sheep,
view_range = 12,
@ -94,6 +83,23 @@ mobs:register_mob("mobs_mc:sheep", {
-- Eat grass
replace_rate = 20,
replace_what = mobs_mc.replace.sheep,
-- Properly regrow wool after eating grass
on_replace = function(self, pos, oldnode, newnode)
self.gotten = false
self.drops = {
{name = mobs_mc.items.mutton_raw,
chance = 1,
min = 1,
max = 2,},
{name = colors[self.color][1],
chance = 1,
min = 1,
max = 1,},
}
self.object:set_properties({
mesh = "mobs_mc_sheepfur.b3d",
})
end,
-- Set random color on spawn
do_custom = function(self)
@ -119,7 +125,7 @@ mobs:register_mob("mobs_mc:sheep", {
-- 0.164%
self.color = "unicolor_light_red"
end
self.base_texture = colors[self.color][2]
self.base_texture = sheep_texture(self.color)
self.object:set_properties({ textures = self.base_texture })
self.drops = {
{name = mobs_mc.items.mutton_raw,
@ -137,30 +143,10 @@ mobs:register_mob("mobs_mc:sheep", {
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if item:get_name() == mobs_mc.items.wheat then
if not self.tamed then
if not minetest.settings:get_bool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.tamed = true
elseif self.gotten then
if not minetest.settings:get_bool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.food = (self.food or 0) + 1
if self.food >= 4 then
self.food = 0
self.gotten = false
self.base_texture = colors[self.color][2]
self.object:set_properties({
textures = self.base_texture, --was sheep.png
})
end
end
return
end
if mobs:feed_tame(self, clicker, 1, true, true) then return end
if mobs:protect(self, clicker) then return end
if item:get_name() == mobs_mc.items.shears and not self.gotten then
self.gotten = true
local pos = self.object:getpos()
@ -170,12 +156,8 @@ mobs:register_mob("mobs_mc:sheep", {
self.color = "unicolor_white"
end
minetest.add_item(pos, ItemStack(colors[self.color][1].." "..math.random(1,3)))
-- FIXME: This is a workaround for the fact that Mobs Redo does not have on_replace
self.color = "unicolor_white"
-- TODO: Use new mesh for sheared sheep (AMC)
self.base_texture = {"mobs_mc_sheep_sheared.png"}
self.object:set_properties({
textures = self.base_texture,
mesh = "mobs_mc_sheepnaked.b3d",
})
if not minetest.settings:get_bool("creative_mode") then
item:add_wear(mobs_mc.misc.shears_wear)
@ -187,13 +169,14 @@ mobs:register_mob("mobs_mc:sheep", {
min = 1,
max = 2,},
}
return
end
-- Dye sheep
if minetest.get_item_group(item:get_name(), "dye") == 1 and not self.gotten then
minetest.log("verbose", "[mobs_mc] " ..item:get_name() .. " " .. minetest.get_item_group(item:get_name(), "dye"))
for group, colordata in pairs(colors) do
if minetest.get_item_group(item:get_name(), group) == 1 then
self.base_texture = colordata[2]
self.base_texture = sheep_texture(group)
self.object:set_properties({
textures = self.base_texture,
})
@ -211,7 +194,9 @@ mobs:register_mob("mobs_mc:sheep", {
break
end
end
return
end
if mobs:capture_mob(self, clicker, 0, 5, 70, false, nil) then return end
end,
})
mobs:register_spawn("mobs_mc:sheep", mobs_mc.spawn.grassland, minetest.LIGHT_MAX+1, 0, 15000, 3, 31000)

View File

@ -28,7 +28,7 @@ mobs:register_mob("mobs_mc:shulker", {
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.99, 0.5},
visual = "mesh",
mesh = "mobs_mc_shulker.b3d",
textures = { "mobs_mc_shulker_purple.png", },
textures = { "mobs_mc_endergolem.png", },
-- TODO: Make shulker dye-able
visual_size = {x=3, y=3},
walk_chance = 0,

View File

@ -16,7 +16,7 @@ local S, NS = dofile(MP.."/intllib.lua")
mobs:register_mob("mobs_mc:skeleton", {
local skeleton = {
type = "monster",
hp_min = 20,
hp_max = 20,
@ -26,7 +26,7 @@ mobs:register_mob("mobs_mc:skeleton", {
visual = "mesh",
mesh = "mobs_mc_skeleton.b3d",
textures = {
{"mobs_mc_skeleton.png"},
{"mobs_mc_skeleton.png^mobs_mc_skeleton_bow.png"},
},
visual_size = {x=3, y=3},
makes_footstep_sound = true,
@ -86,17 +86,44 @@ mobs:register_mob("mobs_mc:skeleton", {
dogshoot_switch = 1,
dogshoot_count_max =1.8,
blood_amount = 0,
}
mobs:register_mob("mobs_mc:skeleton", skeleton)
--###################
--################### STRAY
--###################
local stray = table.copy(skeleton)
stray.mesh = "mobs_mc_stray.b3d"
stray.textures = {
{"mobs_mc_stray.png"},
}
-- TODO: different sound (w/ echo)
-- TODO: stray's arrow inflicts slowness status
table.insert(stray.drops, {
-- Chance to drop additional arrow.
-- TODO: Should be tipped arrow of slowness
name = mobs_mc.items.arrow,
chance = 2,
min = 1,
max = 1,
})
mobs:register_mob("mobs_mc:stray", stray)
-- compatibility
mobs:alias_mob("mobs:skeleton", "mobs_mc:skeleton")
--spawn
mobs:spawn_specific("mobs_mc:skeleton", mobs_mc.spawn.solid,{"air"},0, 7, 20, 17000, 2, -110, 31000)
mobs:spawn_specific("mobs_mc:skeleton", mobs_mc.spawn.solid,{"air"}, 0, 7, 20, 17000, 2, -110, 31000)
-- TODO: Spawn directly under the sky
mobs:spawn_specific("mobs_mc:stray", mobs_mc.spawn.snow, {"air"}, 0, 7, 20, 19000, 2, -110, 31000)
-- spawn eggs
mobs:register_egg("mobs_mc:skeleton", S("Skeleton"), "mobs_mc_spawn_icon_skeleton.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
minetest.log("action", "MC Skeleton loaded")

View File

@ -26,7 +26,7 @@ mobs:register_mob("mobs_mc:stray", {
visual = "mesh",
mesh = "mobs_mc_stray.b3d",
textures = {
{"mobs_mc_stray.png"},
{"mobs_mc_stray.png^mobs_mc_stray_bow.png"},
},
visual_size = {x=3, y=3},
makes_footstep_sound = true,

View File

@ -26,7 +26,7 @@ mobs:register_mob("mobs_mc:witherskeleton", {
visual = "mesh",
mesh = "mobs_mc_witherskeleton.b3d",
textures = {
{"mobs_mc_witherskeleton.png"},
{"mobs_mc_wither_skeleton.png^mobs_mc_wither_skeleton_sword.png"},
},
visual_size = {x=3.6, y=3.6},
makes_footstep_sound = true,

View File

@ -16,7 +16,7 @@ local slime_big = {
textures = {{"mobs_mc_slime.png"}},
visual = "mesh",
mesh = "mobs_mc_slime.b3d",
blood_texture ="green_slime_blood.png",
blood_texture ="mobs_mc_slime_blood.png",
makes_footstep_sound = true,
sounds = {
jump = "green_slime_jump",
@ -134,7 +134,7 @@ local magma_cube_big = {
textures = {{ "mobs_mc_magmacube.png" }},
visual = "mesh",
mesh = "mobs_mc_magmacube.b3d",
blood_texture = "lava_slime_blood.png",
blood_texture = "mobs_mc_magmacube_blood.png",
makes_footstep_sound = true,
sounds = {
jump = "green_slime_jump",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 B

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 782 B

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Some files were not shown because too many files have changed in this diff Show More