Merge branch 'master' into nalc-1.2

This commit is contained in:
Sys Quatre 2019-05-10 00:53:43 +02:00
commit ad864bd1c8
26 changed files with 115 additions and 3117 deletions

View File

@ -15,6 +15,8 @@ mobs:register_mob("mobs_animal:bee", {
textures = {
{"mobs_bee.png"},
},
blood_texture = "mobs_bee_inv.png",
blood_amount = 1,
makes_footstep_sound = false,
sounds = {
random = "mobs_bee",
@ -24,7 +26,7 @@ mobs:register_mob("mobs_animal:bee", {
drops = {
{name = "mobs:honey", chance = 2, min = 1, max = 2},
},
water_damage = 2,
water_damage = 1,
lava_damage = 2,
light_damage = 0,
fall_damage = 0,

View File

@ -33,7 +33,7 @@ stepheight = 0.6,
{name = "mobs:rabbit_raw", chance = 1, min = 1, max = 1},
{name = "mobs:rabbit_hide", chance = 1, min = 0, max = 1},
},
water_damage = 1,
water_damage = 0,
lava_damage = 4,
light_damage = 0,
fear_height = 2,

View File

@ -2,7 +2,7 @@
local S = mobs.intllib
-- Chicken by JK Murray
-- Chicken by JK Murray and Sirrobzeroone
mobs:register_mob("mobs_animal:chicken", {
stepheight = 0.6,
@ -13,17 +13,14 @@ stepheight = 0.6,
armor = 200,
collisionbox = {-0.3, -0.75, -0.3, 0.3, 0.1, 0.3},
visual = "mesh",
mesh = "mobs_chicken.x",
-- seems a lot of textures but this fixes the problem with the model
mesh = "mobs_chicken.b3d",
textures = {
{"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png",
"mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png", "mobs_chicken.png"},
{"mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png",
"mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png", "mobs_chicken_black.png"},
{"mobs_chicken.png"}, -- white
{"mobs_chicken_brown.png"},
{"mobs_chicken_black.png"},
},
child_texture = {
{"mobs_chick.png", "mobs_chick.png", "mobs_chick.png", "mobs_chick.png",
"mobs_chick.png", "mobs_chick.png", "mobs_chick.png", "mobs_chick.png", "mobs_chick.png"},
{"mobs_chick.png"},
},
makes_footstep_sound = true,
sounds = {
@ -45,10 +42,18 @@ stepheight = 0.6,
fear_height = 5,
animation = {
speed_normal = 15,
stand_start = 0,
stand_end = 1, -- 20
walk_start = 20,
walk_end = 40,
stand_start = 1,
stand_end = 30,
stand_speed = 28,
stand1_start = 31,
stand1_end = 70,
stand1_speed = 32,
walk_start = 71,
walk_end = 90,
walk_speed = 24,
run_start = 91,
run_end = 110,
run_speed = 24,
},
follow = {"farming:seed_wheat", "farming:seed_cotton"},
view_range = 5,

58
cow.lua
View File

@ -35,7 +35,7 @@ mobs:register_mob("mobs_animal:cow", {
{name = "mobs:leather", chance = 1, min = 0, max = 2},
{name = "maptools:silver_coin", chance = 10, min = 0, max = 1,},
},
water_damage = 1,
water_damage = 0,
lava_damage = 5,
light_damage = 0,
animation = {
@ -50,20 +50,27 @@ mobs:register_mob("mobs_animal:cow", {
punch_start = 70,
punch_end = 100,
},
follow = "farming:wheat",
follow = {"farming:wheat", "default:grass_1"},
view_range = 8,
replace_rate = 10,
-- replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_what = {
{"group:grass", "mobs:dung", 0},
{"default:dirt_with_grass", "default:dirt", -1}
},
-- replace_with = "air",
fear_height = 2,
on_rightclick = function(self, clicker)
-- feed or tame
if mobs:feed_tame(self, clicker, 8, true, true) then return end
if mobs:feed_tame(self, clicker, 8, true, true) then
-- if fed 7x wheat or grass then cow can be milked again
if self.food and self.food > 6 then
self.gotten = false
end
return
end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) then return end
@ -102,6 +109,16 @@ mobs:register_mob("mobs_animal:cow", {
return
end
end,
on_replace = function(self, pos, oldnode, newnode)
self.food = (self.food or 0) + 1
-- if cow replaces 8x grass then it can be milked again
if self.food >= 8 then
self.food = 0
self.gotten = false
end
end,
})
@ -133,6 +150,37 @@ minetest.register_craftitem(":mobs:bucket_milk", {
groups = {food_milk = 1, flammable = 3},
})
-- glass of milk
minetest.register_craftitem(":mobs:glass_milk", {
description = S("Glass of Milk"),
inventory_image = "mobs_glass_milk.png",
on_use = minetest.item_eat(2, 'vessels:drinking_glass'),
groups = {food_milk_glass = 1, flammable = 3, vessel = 1},
})
minetest.register_craft({
type = "shapeless",
output = "mobs:glass_milk 4",
recipe = {
'vessels:drinking_glass', 'vessels:drinking_glass',
'vessels:drinking_glass', 'vessels:drinking_glass',
'mobs:bucket_milk'
},
replacements = { {"mobs:bucket_milk", "bucket:bucket_empty"} }
})
minetest.register_craft({
type = "shapeless",
output = "mobs:bucket_milk",
recipe = {
'mobs:glass_milk', 'mobs:glass_milk',
'mobs:glass_milk', 'mobs:glass_milk',
'bucket:bucket_empty'
},
replacements = { {"mobs:glass_milk", "vessels:drinking_glass 4"} }
})
-- butter
minetest.register_craftitem(":mobs:butter", {
description = S("Butter"),

View File

@ -39,7 +39,7 @@ reach = 1,
drops = {
{name = "farming:string", chance = 1, min = 0, max = 1},
},
water_damage = 1,
water_damage = 0,
lava_damage = 5,
fear_height = 3,
animation = {

View File

@ -19,3 +19,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Chicken sounds from freesounds.org under CC0
Mutton, Pork and Rabbit meat textures by Piezo_ under CC0

View File

@ -16,6 +16,11 @@ if minetest.get_modpath("lucky_block") then
{"spw", "mobs:kitten", 2},
{"exp"},
{"dro", {"mobs:hairball"}, 3},
{"dro", {"mobs:chicken_raw", "mobs:chicken_cooked"}, 10},
{"dro", {"mobs:pork_raw", "mobs:pork_cooked"}, 10},
{"dro", {"mobs:mutton_raw", "mobs:mutton_cooked"}, 10},
{"dro", {"mobs:meat_raw", "mobs:meat"}, 10},
{"dro", {"mobs:glass_milk"}, 5},
})
if minetest.registered_nodes["default:nyancat"] then

BIN
models/mobs_chicken.b3d Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@ stepheight = 0.6,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 2},
},
water_damage = 1,
water_damage = 0,
lava_damage = 5,
light_damage = 0,
fear_height = 6,

View File

@ -42,4 +42,4 @@ These monochrome cuties spawn in Ethereal's bamboo biome and can be tamed with b
---
*Note: After breeding, animals need to rest for 4 minutes and baby animals take 4 minutes to grow up, also feeding them helps them grow quicker...*
#### Lucky Blocks: 15
#### Lucky Blocks: 20

View File

@ -1,7 +1,6 @@
local S = mobs.intllib
local all_colours = {
{"black", S("Black"), "#000000b0"},
{"blue", S("Blue"), "#015dbb70"},
@ -26,7 +25,8 @@ local all_colours = {
for _, col in ipairs(all_colours) do
mobs:register_mob("mobs_animal:sheep_"..col[1], {
stepheight = 0.6,
stay_near = {"farming:straw", 10},
stepheight = 0.6,
type = "animal",
passive = true,
hp_min = 8,
@ -54,7 +54,7 @@ stepheight = 0.6,
{name = "mobs:mutton_raw", chance = 1, min = 1, max = 2},
{name = "wool:"..col[1], chance = 1, min = 1, max = 1},
},
water_damage = 1,
water_damage = 0,
lava_damage = 5,
light_damage = 0,
animation = {
@ -65,25 +65,39 @@ stepheight = 0.6,
walk_start = 81,
walk_end = 100,
},
follow = {"farming:wheat", "default:grass_5"},
follow = {"farming:wheat", "default:grass_1"},
view_range = 8,
replace_rate = 10,
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_with = "air",
replace_offset = -1,
replace_what = {
{"group:grass", "air", -1},
{"default:dirt_with_grass", "default:dirt", -2}
},
fear_height = 3,
--[[
on_replace = function(self, pos, oldnode, newnode)
print ("---- replaced") ; return false -- false to keep node, true to replace
self.food = (self.food or 0) + 1
-- if sheep replaces 8x grass then it regrows wool
if self.food >= 8 then
self.food = 0
self.gotten = false
self.object:set_properties({
textures = {"mobs_sheep_base.png^(mobs_sheep_wool.png^[colorize:" .. col[3] .. ")"},
mesh = "mobs_sheep.b3d",
})
end
end,
]]
on_rightclick = function(self, clicker)
--are we feeding?
if mobs:feed_tame(self, clicker, 8, true, true) then
--if full grow fuzz
if self.gotten == false then
--if fed 7x grass or wheat then sheep regrows wool
if self.food and self.food > 6 then
self.gotten = false
self.object:set_properties({
textures = {"mobs_sheep_base.png^(mobs_sheep_wool.png^[colorize:" .. col[3] .. ")"},

BIN
sounds/mobs_chicken.1.ogg Normal file

Binary file not shown.

BIN
sounds/mobs_chicken.2.ogg Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 489 B

View File

@ -5,7 +5,7 @@ local S = mobs.intllib
-- Warthog by KrupnoPavel
mobs:register_mob("mobs_animal:pumba", {
stepheight = 0.6,
stepheight = 0.6,
type = "animal",
passive = false,
attack_type = "dogfight",
@ -39,7 +39,7 @@ stepheight = 0.6,
{name = "mobs:pork_raw", chance = 1, min = 1, max = 3},
{name = "maptools:silver_coin", chance = 10, min = 0, max = 1,},
},
water_damage = 1,
water_damage = 0,
lava_damage = 5,
light_damage = 0,
fear_height = 2,