22w05a
This commit is contained in:
1 parent
1432f06438
commit
ac7da0c2ca
3 files changed
+3
-3
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -142,7 +142,7 @@ public class WorldTools
|
||||
{
|
||||
int vd = world.getServer().getPlayerList().getViewDistance() * 16;
|
||||
int vvd = vd * vd;
|
||||
List<ServerPlayer> nearbyPlayers = world.getPlayers(p -> pos.distSqr(p.getX(), pos.getY(), p.getZ(), true) < vvd);
|
||||
List<ServerPlayer> 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.
|
||||
|
||||
Reference in new issue
Block a user