1
0
mirror of https://codeberg.org/tenplus1/mobs_animal.git synced 2024-12-22 17:00:26 +01:00

proper positioning of grown sheep

This commit is contained in:
tenplus1 2023-05-27 19:29:33 +01:00
parent f8ed1c08b6
commit 24ae2e25a2

View File

@ -212,6 +212,15 @@ for _, col in ipairs(all_colours) do
self.object:set_properties({textures = {textures}}) self.object:set_properties({textures = {textures}})
self.base_texture = {textures} self.base_texture = {textures}
local pos = self.object:get_pos()
pos.y = pos.y + (self.collisionbox[2] * -1) - 0.4
self.object:set_pos(pos)
-- jump slightly when fully grown so as not to fall into ground
self.object:set_velocity({x = 0, y = 2, z = 0 })
end, end,
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)