---- Replace the Entity#a(AxisAlignedBB) method with this public void a(AxisAlignedBB axisalignedbb) { // Changes start - block invalid bounding boxes // Fix: Do not allocate if not required. double a = axisalignedbb.a, b = axisalignedbb.b, c = axisalignedbb.c, d = axisalignedbb.d, e = axisalignedbb.e, f = axisalignedbb.f; if (d - a > 64 || d - a < 0 || e - b > 64 || e - b < 0 || f - c > 64 || f - c < 0) { // This should rarely happen! assignFixedAABB(a, b, c, d, e, f); } else { this.boundingBox = axisalignedbb; } // Changes end } // Changes start - block invalid bounding boxes private void assignFixedAABB(double a, double b, double c, double d, double e, double f) { d = clamp(d, a, a + 64); e = clamp(e, b, b+64); f = clamp(f, c, c+64); this.boundingBox = new AxisAlignedBB(a, b, c, d, e, f); } private double clamp(double d, double min, double max) { if (d < min) return min; if (d > max) return max; return d; } // Changes end