From 4834b01091b44ef256466c59563ab9e46e20fc8e Mon Sep 17 00:00:00 2001 From: epCode <64379263+epCode@users.noreply.github.com> Date: Mon, 17 Oct 2022 12:38:51 -0700 Subject: [PATCH] fix punching ghast not getting velocity --- mods/ENTITIES/mcl_mobs/api.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 962f1340f..535bea0d1 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -3459,6 +3459,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) dir = dir or {x = 0, y = 0, z = 0} local v = self.object:get_velocity() + if not v then return end local r = 1.4 - min(punch_interval, 1.4) local kb = r * (abs(v.x)+abs(v.z)) local up = 2