From 4d13eddcd6b2ee5321a42d1fe46e241fa7cfc631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Sat, 8 May 2021 19:59:48 +0200 Subject: [PATCH] Adjust explosion entity damage hitbox In mcl_explosions the hitbox used for calculating the damage of an entity is its collisionbox multiplied by two. This commit removes the multiplication by two because that makes explosion damage behave weirdly in some circumstances. It was most likely implemented that way because of a misinterpretation of the Minecraft wiki. --- mods/CORE/mcl_explosions/init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/CORE/mcl_explosions/init.lua b/mods/CORE/mcl_explosions/init.lua index d3fb882ce0..dfae884cd5 100644 --- a/mods/CORE/mcl_explosions/init.lua +++ b/mods/CORE/mcl_explosions/init.lua @@ -258,12 +258,12 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc if collisionbox then -- Create rays from random points in the collision box - local x1 = collisionbox[1] * 2 - local y1 = collisionbox[2] * 2 - local z1 = collisionbox[3] * 2 - local x2 = collisionbox[4] * 2 - local y2 = collisionbox[5] * 2 - local z2 = collisionbox[6] * 2 + local x1 = collisionbox[1] + local y1 = collisionbox[2] + local z1 = collisionbox[3] + local x2 = collisionbox[4] + local y2 = collisionbox[5] + local z2 = collisionbox[6] local x_len = math.abs(x2 - x1) local y_len = math.abs(y2 - y1) local z_len = math.abs(z2 - z1)