diff --git a/gradle.properties b/gradle.properties index c9c7086d..43d53194 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use # or better: https://modmuss50.me/fabric.html - minecraft_version=22w03a + minecraft_version=22w05a loader_version=0.12.12 fabric_version=0.46.2+1.18 diff --git a/src/main/java/carpet/helpers/OptimizedExplosion.java b/src/main/java/carpet/helpers/OptimizedExplosion.java index c21dd8a5..21068ecb 100644 --- a/src/main/java/carpet/helpers/OptimizedExplosion.java +++ b/src/main/java/carpet/helpers/OptimizedExplosion.java @@ -508,7 +508,7 @@ public class OptimizedExplosion private static void blastCalc(Explosion e){ ExplosionAccessor eAccess = (ExplosionAccessor) e; - if(blastChanceLocation == null || blastChanceLocation.distSqr(eAccess.getX(), eAccess.getY(), eAccess.getZ(), false) > 200) return; + if(blastChanceLocation == null || blastChanceLocation.distToLowCornerSqr(eAccess.getX(), eAccess.getY(), eAccess.getZ()) > 200) return; chances.clear(); for (int j = 0; j < 16; ++j) { for (int k = 0; k < 16; ++k) { diff --git a/src/main/java/carpet/script/utils/WorldTools.java b/src/main/java/carpet/script/utils/WorldTools.java index 18a14fc5..ebeb05cd 100644 --- a/src/main/java/carpet/script/utils/WorldTools.java +++ b/src/main/java/carpet/script/utils/WorldTools.java @@ -142,7 +142,7 @@ public class WorldTools { int vd = world.getServer().getPlayerList().getViewDistance() * 16; int vvd = vd * vd; - List nearbyPlayers = world.getPlayers(p -> pos.distSqr(p.getX(), pos.getY(), p.getZ(), true) < vvd); + List nearbyPlayers = world.getPlayers(p -> pos.distToCenterSqr(p.getX(), pos.getY(), p.getZ()) < vvd); if (!nearbyPlayers.isEmpty()) { ClientboundLevelChunkWithLightPacket packet = new ClientboundLevelChunkWithLightPacket(worldChunk, world.getLightEngine(), null, null, false); // false seems to update neighbours as well.