From 24ae2e25a2aa262d6153c5e9df5a8215284771ac Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 27 May 2023 19:29:33 +0100 Subject: [PATCH] proper positioning of grown sheep --- sheep.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sheep.lua b/sheep.lua index b0a5431..25a74e7 100644 --- a/sheep.lua +++ b/sheep.lua @@ -212,6 +212,15 @@ for _, col in ipairs(all_colours) do self.object:set_properties({textures = {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, on_rightclick = function(self, clicker)