forked from mtcontrib/mobs_animal
Compare commits
23 Commits
8ef65e2292
...
86987aadde
Author | SHA1 | Date | |
---|---|---|---|
86987aadde | |||
cd2b2609a2 | |||
5293673547 | |||
54f6de148b | |||
0873ef4119 | |||
f2b1b752a7 | |||
db59194f88 | |||
733ab61820 | |||
498b3fbf10 | |||
8bfa177190 | |||
01bdea97c7 | |||
a1bbcb26ec | |||
620bdfe33d | |||
77ed774de5 | |||
061cbb10b7 | |||
c22c556b5f | |||
ba305db9ca | |||
7de71d8724 | |||
6a74a05836 | |||
e3ca168e7e | |||
9c7e537f52 | |||
66be327567 | |||
96f41785b5 |
@ -161,7 +161,7 @@ minetest.register_craft({
|
||||
minetest.register_craftitem(":mobs:rabbit_hide", {
|
||||
description = S("Rabbit Hide"),
|
||||
inventory_image = "mobs_rabbit_hide.png",
|
||||
groups = {flammable = 2},
|
||||
groups = {flammable = 2, pelt = 1},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
@ -81,7 +81,7 @@ stepheight = 0.6,
|
||||
return
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
local pos = self.object:get_pos() ; if not pos then return end
|
||||
|
||||
minetest.add_item(pos, "mobs:egg")
|
||||
|
||||
@ -138,7 +138,7 @@ mobs:register_arrow("mobs_animal:egg_entity", {
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 1},
|
||||
}, nil)
|
||||
@ -213,6 +213,7 @@ local mobs_shoot_egg = function (item, player, pointed_thing)
|
||||
|
||||
ent.velocity = egg_VELOCITY -- needed for api internal timing
|
||||
ent.switch = 1 -- needed so that egg doesn't despawn straight away
|
||||
ent._is_arrow = true -- tell advanced mob protection this is an arrow
|
||||
|
||||
obj:setvelocity({
|
||||
x = dir.x * egg_VELOCITY,
|
||||
@ -302,7 +303,7 @@ minetest.register_craft({
|
||||
minetest.register_craftitem(":mobs:chicken_feather", {
|
||||
description = S("Feather"),
|
||||
inventory_image = "mobs_chicken_feather.png",
|
||||
groups = {flammable = 2},
|
||||
groups = {flammable = 2, feather = 1},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
16
cow.lua
16
cow.lua
@ -189,11 +189,13 @@ minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mobs:bucket_milk",
|
||||
recipe = {
|
||||
"mobs:glass_milk", "mobs:glass_milk",
|
||||
"mobs:glass_milk", "mobs:glass_milk",
|
||||
"group:food_milk_glass", "group:food_milk_glass",
|
||||
"group:food_milk_glass", "group:food_milk_glass",
|
||||
"bucket:bucket_empty"
|
||||
},
|
||||
replacements = { {"mobs:glass_milk", "vessels:drinking_glass 4"} }
|
||||
replacements = {
|
||||
{"group:food_milk_glass", "vessels:drinking_glass 4"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -242,16 +244,16 @@ minetest.register_node(":mobs:cheeseblock", {
|
||||
description = S("Cheese Block"),
|
||||
tiles = {"mobs_cheeseblock.png"},
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 3},
|
||||
groups = {oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_dirt_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:cheeseblock",
|
||||
recipe = {
|
||||
{"mobs:cheese", "mobs:cheese", "mobs:cheese"},
|
||||
{"mobs:cheese", "mobs:cheese", "mobs:cheese"},
|
||||
{"mobs:cheese", "mobs:cheese", "mobs:cheese"},
|
||||
{"group:food_cheese", "group:food_cheese", "group:food_cheese"},
|
||||
{"group:food_cheese", "group:food_cheese", "group:food_cheese"},
|
||||
{"group:food_cheese", "group:food_cheese", "group:food_cheese"},
|
||||
}
|
||||
})
|
||||
|
||||
|
16
kitten.lua
16
kitten.lua
@ -53,17 +53,8 @@ stepheight = 1.1,
|
||||
stoodup_end = 0,
|
||||
},
|
||||
follow = {
|
||||
"mobs_animal:rat",
|
||||
"ethereal:fish_raw",
|
||||
"mobs_fish:clownfish",
|
||||
"mobs_fish:tropical",
|
||||
"fishing:clownfish_raw",
|
||||
"fishing:bluewhite_raw",
|
||||
"fishing:exoticfish_raw",
|
||||
"fishing:carp_raw",
|
||||
"fishing:perch_raw",
|
||||
"fishing:catfish_raw",
|
||||
"xocean:fish_edible",
|
||||
"mobs:rat", "group:food_fish_raw", "mobs_fish:tropical", "xocean:fish_edible",
|
||||
"group:fishraw" -- NALC: Group from fishing mod
|
||||
},
|
||||
view_range = 8,
|
||||
|
||||
@ -165,7 +156,8 @@ minetest.register_craftitem(":mobs:hairball", {
|
||||
local newpos = {x = pos.x + dir.x, y = pos.y + dir.y + 1.5, z = pos.z + dir.z}
|
||||
local item = hairball_items[math.random(1, #hairball_items)]
|
||||
|
||||
if item ~= "" then
|
||||
if item ~= ""
|
||||
and minetest.registered_items[item] then
|
||||
minetest.add_item(newpos, {name = item})
|
||||
end
|
||||
|
||||
|
3
mod.conf
3
mod.conf
@ -1 +1,4 @@
|
||||
name = mobs_animal
|
||||
depends = default, mobs
|
||||
optional_depends = lucky_block, intllib
|
||||
description = Adds farm animals.
|
||||
|
14
penguin.lua
14
penguin.lua
@ -46,17 +46,9 @@ stepheight = 0.6,
|
||||
fly_in = {"default:water_source", "default:water_flowing"},
|
||||
floats = 0,
|
||||
follow = {
|
||||
"ethereal:fish_raw",
|
||||
"mobs_fish:clownfish_set", "mobs_fish:clownfish",
|
||||
"mobs_fish:tropical_set", "mobs_fish:tropical",
|
||||
"fishing:fish_raw",
|
||||
"fishing:clownfish_raw",
|
||||
"fishing:bluewhite_raw",
|
||||
"fishing:exoticfish_raw",
|
||||
"fishing:carp_raw",
|
||||
"fishing:perch_raw",
|
||||
"fishing:catfish_raw",
|
||||
"xocean:fish_edible",
|
||||
"group:food_fish_raw", "mobs_fish:clownfish", "mobs_fish:tropical",
|
||||
"mobs_fish:clownfish_set", "mobs_fish:tropical_set", "xocean:fish_edible",
|
||||
"group:fishraw" -- Edit from NALC: Group from fishing mod
|
||||
},
|
||||
view_range = 5,
|
||||
|
||||
|
@ -64,6 +64,12 @@ for _, col in ipairs(all_colours) do
|
||||
stand_end = 80,
|
||||
walk_start = 81,
|
||||
walk_end = 100,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
follow = {
|
||||
"farming:wheat", "default:grass_1", "farming:barley",
|
||||
@ -97,7 +103,7 @@ for _, col in ipairs(all_colours) do
|
||||
--are we feeding?
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||
|
||||
--if fed 7x grass or wheat then sheep regrows wool
|
||||
--if fed 7 times then sheep regrows wool
|
||||
if self.food and self.food > 6 then
|
||||
|
||||
self.gotten = false
|
||||
|
@ -51,6 +51,12 @@ mobs:register_mob("mobs_animal:pumba", {
|
||||
walk_end = 100,
|
||||
punch_start = 70,
|
||||
punch_end = 100,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
|
Reference in New Issue
Block a user