fixed bugs, memory leaks, etc

This commit is contained in:
bbldrizzy committed 2026-10-23 08:36:42 +01:00
1 parent aa4f6b6ddc
commit c3f8f23c1d
124 files changed
+1060 -420

No files matched your search

@@ -73,6 +73,10 @@ public class ExplosionDamageCalculator implements MinecraftAccess {
}
public double getCrystalDamage(LivingEntity target, Vec3d crystalPos, boolean predictMotion, BlockPos obsidianPos, boolean ignoreTerrain) {
if (mc.world == null || mc.player == null || mc.getNetworkHandler() == null) {
return 0.0;
}
long worldTime = mc.world.getTime();
if (worldTime != this.cacheTime) {
this.damageCache.clear();
@@ -305,6 +309,10 @@ public class ExplosionDamageCalculator implements MinecraftAccess {
}
private double getExposureWithOffset(Vec3d source, Entity entity, Vec3d boxOffset, RaycastContext context, BlockPos obsidianPos, boolean ignoreTerrain, BlockPos airPos, BlockPos placedBlockPos, BlockState placedBlockState) {
if (context == null) {
context = this.raycastContext = new RaycastContext(null, null, ShapeType.COLLIDER, FluidHandling.ANY, mc.player);
}
Box box = entity.getBoundingBox();
if (boxOffset != null) {
box = box.offset(boxOffset.x, boxOffset.y, boxOffset.z);