From e53a193c4fe61e88e6501a2a863e22d533132ae4 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Thu, 15 Apr 2021 11:25:55 -0400 Subject: [PATCH] Fix get_velocity (mobs internal) --- mods/ENTITIES/mcl_mobs/api.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 4d3b2af4ad..f02d5b4336 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -261,8 +261,11 @@ end local get_velocity = function(self) local v = self.object:get_velocity() + + v.y = 0 + if v then - return (v.x * v.x + v.z * v.z) ^ 0.5 + return vector_length(v) end return 0