From c12f32f637ebebfbf8ce4bc69f3fd9e844f17b69 Mon Sep 17 00:00:00 2001 From: MatthewBeshay <92357869+MatthewBeshay@users.noreply.github.com> Date: Sat, 28 Mar 2026 20:29:12 +1100 Subject: [PATCH] fix: restore ghast reach checks and fire collision bounds after AABB refactor --- Minecraft.World/Entities/Entity.cpp | 4 ++-- Minecraft.World/Entities/Mobs/Ghast.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Minecraft.World/Entities/Entity.cpp b/Minecraft.World/Entities/Entity.cpp index 216e49beb..007d82209 100644 --- a/Minecraft.World/Entities/Entity.cpp +++ b/Minecraft.World/Entities/Entity.cpp @@ -885,8 +885,8 @@ void Entity::move(double xa, double ya, double za, checkInsideTiles(); bool water = isInWaterOrRain(); - const AABB& shrunk = bb.shrink(0.001, 0.001, 0.001); - if (level->containsFireTile(&bb)) { + AABB shrunk = bb.shrink(0.001, 0.001, 0.001); + if (level->containsFireTile(&shrunk)) { burn(1); if (!water) { onFire++; diff --git a/Minecraft.World/Entities/Mobs/Ghast.cpp b/Minecraft.World/Entities/Mobs/Ghast.cpp index e6a36730c..7808df292 100644 --- a/Minecraft.World/Entities/Mobs/Ghast.cpp +++ b/Minecraft.World/Entities/Mobs/Ghast.cpp @@ -169,10 +169,11 @@ bool Ghast::canReach(double xt, double yt, double zt, double dist) { double xd = (xTarget - x) / dist; double yd = (yTarget - y) / dist; double zd = (zTarget - z) / dist; + AABB probe = bb; for (int d = 1; d < dist; d++) { - bb.move(xd, yd, zd); - if (!level->getCubes(shared_from_this(), &bb)->empty()) return false; + probe = probe.move(xd, yd, zd); + if (!level->getCubes(shared_from_this(), &probe)->empty()) return false; } return true;