Make baby sheep have big heads

This commit is contained in:
parent 85ca6e867a
commit 6bbf3bc80c
6 changed files with 31 additions and 12 deletions

View File

@ -417,7 +417,7 @@ function mobs:register_mob(name, def)
--on_breed = def.on_breed, --on_breed = def.on_breed,
--on_grown = def.on_grown, on_grown = def.on_grown,
--on_detach_child = mob_detach_child, --on_detach_child = mob_detach_child,

View File

@ -146,11 +146,12 @@ end
--make the baby grow up --make the baby grow up
mobs.baby_grow_up = function(self) mobs.baby_grow_up = function(self)
self.baby = nil self.baby = nil
self.visual_size = self.backup_visual_size self.visual_size = self.backup_visual_size
self.collisionbox = self.backup_collisionbox self.collisionbox = self.backup_collisionbox
self.selectionbox = self.backup_selectionbox self.selectionbox = self.backup_selectionbox
self.object:set_properties(self) self.object:set_properties(self)
if self.on_grown then self.on_grown(self) end
end end
--makes the baby grow up faster with diminishing returns --makes the baby grow up faster with diminishing returns

Binary file not shown.

View File

@ -82,16 +82,16 @@ mobs:register_mob("mobs_mc:sheep", {
--head code --head code
has_head = true, has_head = true,
head_bone = {"hea1", "hea2",}, head_bone = "head",
swap_y_with_x = false, swap_y_with_x = false,
reverse_head_yaw = false, reverse_head_yaw = false,
head_bone_pos_y = 3.6, head_bone_pos_y = 0,
head_bone_pos_z = -0.6, head_bone_pos_z = 0,
head_height_offset = 1.0525, head_height_offset = 1.2,
head_direction_offset = 0.5, head_direction_offset = 0,
head_pitch_modifier = 0, head_pitch_modifier = 0,
--end head code --end head code
@ -117,7 +117,7 @@ mobs:register_mob("mobs_mc:sheep", {
}, },
animation = { animation = {
speed_normal = 25, run_speed = 65, speed_normal = 25, run_speed = 65,
stand_start = 40, stand_end = 80, 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,
}, },
@ -330,6 +330,24 @@ mobs:register_mob("mobs_mc:sheep", {
return false return false
end end
end, end,
on_spawn = function(self)
if self.baby then
self.animation = table.copy(self.animation)
self.animation.stand_start = 81
self.animation.stand_end = 81
self.animation.walk_start = 81
self.animation.walk_end = 121
self.animation.run_start = 81
self.animation.run_end = 121
end
return true
end,
on_grown = function(self)
self.animation = nil
local anim = self.current_animation
self.current_animation = nil -- Mobs Redo does nothing otherwise
mobs.set_mob_animation(self, anim)
end
}) })
mobs:spawn_specific( mobs:spawn_specific(
"mobs_mc:sheep", "mobs_mc:sheep",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB