|
|
|
|
@@ -5,10 +5,10 @@ Subject: [PATCH] Remove vanilla profiler callers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
|
index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c44874a4cf 100644
|
|
|
|
|
index 05c5c4454a1a10ffad5e9335868f2feb4defc225..42f103efef76d061efe72a586ab5ae66c769da6b 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
|
@@ -618,9 +618,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -626,9 +626,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
return ifLoaded;
|
|
|
|
|
}
|
|
|
|
|
// Paper end
|
|
|
|
|
@@ -20,7 +20,7 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
long k = ChunkCoordIntPair.pair(i, j);
|
|
|
|
|
|
|
|
|
|
IChunkAccess ichunkaccess;
|
|
|
|
|
@@ -634,7 +634,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -642,7 +642,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -29,8 +29,8 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag, true); // Paper
|
|
|
|
|
|
|
|
|
|
if (!completablefuture.isDone()) { // Paper
|
|
|
|
|
@@ -705,12 +705,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair);
|
|
|
|
|
@@ -718,12 +718,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
this.chunkMapDistance.addTicketAtLevel(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Tuinity - prevent plugin unloads from removing our ticket
|
|
|
|
|
if (isUrgent) this.chunkMapDistance.markUrgent(chunkcoordintpair); // Paper
|
|
|
|
|
if (this.a(playerchunk, l)) {
|
|
|
|
|
- GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
|
|
|
|
|
@@ -43,9 +43,9 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
- gameprofilerfiller.exit();
|
|
|
|
|
+ //gameprofilerfiller.exit(); // Akarin - remove caller
|
|
|
|
|
if (this.a(playerchunk, l)) {
|
|
|
|
|
this.chunkMapDistance.removeTicketAtLevel(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Tuinity
|
|
|
|
|
throw (IllegalStateException) SystemUtils.c(new IllegalStateException("No chunk holder after ticket has been added"));
|
|
|
|
|
}
|
|
|
|
|
@@ -864,33 +864,33 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -886,33 +886,33 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
|
|
|
|
|
// CraftBukkit start - modelled on below
|
|
|
|
|
public void purgeUnload() {
|
|
|
|
|
@@ -86,7 +86,7 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
this.clearCache();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -944,7 +944,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -966,7 +966,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
player.lastEntitySpawnRadiusSquared = (double)((range << 4) * (range << 4)); // used in isOutsideRange
|
|
|
|
|
}
|
|
|
|
|
// Paper end - optimize isOutisdeRange
|
|
|
|
|
@@ -95,7 +95,7 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
|
|
|
|
|
BlockPosition blockposition = this.world.getSpawn();
|
|
|
|
|
// CraftBukkit start - Other mob type spawn tick rate
|
|
|
|
|
@@ -955,7 +955,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -977,7 +977,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
boolean flag2 = spawnAnimalThisTick;
|
|
|
|
|
// CraftBukkit end
|
|
|
|
|
|
|
|
|
|
@@ -104,7 +104,7 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
|
|
|
|
int l = this.chunkMapDistance.b();
|
|
|
|
|
EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values();
|
|
|
|
|
@@ -977,7 +977,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -999,7 +999,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
|
|
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
|
|
|
|
@@ -113,7 +113,7 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
// Paper - replaced by above
|
|
|
|
|
// Tuinity start - optimise chunk tick iteration
|
|
|
|
|
this.isTickingChunks = true;
|
|
|
|
|
@@ -986,18 +986,18 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -1008,18 +1008,18 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
if (playerchunk != null) { // make sure load event has been called along with the load logic we put there
|
|
|
|
|
// Tuinity end - optimise chunk tick iteration
|
|
|
|
|
|
|
|
|
|
@@ -135,7 +135,7 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
this.world.timings.mobSpawn.startTiming(); // Spigot
|
|
|
|
|
EnumCreatureType[] aenumcreaturetype1 = aenumcreaturetype;
|
|
|
|
|
int i1 = aenumcreaturetype.length;
|
|
|
|
|
@@ -1057,7 +1057,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -1079,7 +1079,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.world.timings.mobSpawn.stopTiming(); // Spigot
|
|
|
|
|
@@ -144,7 +144,7 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
|
|
|
|
|
@@ -1083,15 +1083,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -1105,15 +1105,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Tuinity end - optimise chunk tick iteration
|
|
|
|
|
@@ -163,7 +163,7 @@ index 3bb4e478bfd6c3096d0280509d6f6fff221c7da9..448758cc81f7672d9b2b3ea24d8006c4
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Tuinity start - controlled flush for entity tracker packets
|
|
|
|
|
@@ -1235,7 +1235,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
@@ -1257,7 +1257,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void executeTask(Runnable runnable) {
|
|
|
|
|
@@ -559,10 +559,10 @@ index a245cfab67835d7978b310d510d029d713460a3b..85c3dc662653c7aa7aba5913864f5f74
|
|
|
|
|
|
|
|
|
|
private void n() {
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
|
index c88177b77607519453bb349a8e960d22d73e9f8e..35e1dad15a58ddc0b06283bdc89bce9cc1ccbbad 100644
|
|
|
|
|
index 4ed4ad6bc3b4ab6702ca500dc26e889dca6ed2d7..065602dad55d2b83e27e619c83ca86ece22994e0 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
|
@@ -839,7 +839,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
@@ -846,7 +846,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
double d3 = 8.0D;
|
|
|
|
|
float f2 = f1;
|
|
|
|
|
|
|
|
|
|
@@ -571,7 +571,7 @@ index c88177b77607519453bb349a8e960d22d73e9f8e..35e1dad15a58ddc0b06283bdc89bce9c
|
|
|
|
|
if (worldserver1 == null) { } else // CraftBukkit - empty to fall through to null to event
|
|
|
|
|
if (dimensionmanager1 == DimensionManager.OVERWORLD && dimensionmanager == DimensionManager.NETHER) {
|
|
|
|
|
this.cr = this.getPositionVector();
|
|
|
|
|
@@ -880,8 +880,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
@@ -887,8 +887,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
// CraftBukkit end
|
|
|
|
|
|
|
|
|
|
// this.setPositionRotation(d0, d1, d2, f1, f); // CraftBukkit - PlayerTeleportEvent handles position changes
|
|
|
|
|
@@ -582,7 +582,7 @@ index c88177b77607519453bb349a8e960d22d73e9f8e..35e1dad15a58ddc0b06283bdc89bce9c
|
|
|
|
|
// Spigot start - SPIGOT-5677, MC-114796: Fix portals generating outside world border
|
|
|
|
|
double d4 = Math.max(-2.9999872E7D, worldserver1.getWorldBorder().c() + 16.0D);
|
|
|
|
|
double d5 = Math.max(-2.9999872E7D, worldserver1.getWorldBorder().d() + 16.0D);
|
|
|
|
|
@@ -954,7 +954,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
@@ -961,7 +961,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
|
// CraftBukkit end
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -630,10 +630,10 @@ index 2552f860ff7a25f74e9a0600e58cefe064fac484..00b70d7447e0db11c09f3b751e089ea0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
|
index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93d8f25632 100644
|
|
|
|
|
index 2cb12e02e836f34ed80e93d4426bd994146e26c8..c07be72c6fc3f5acf1ac984a31f67ee170493e41 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
|
@@ -962,15 +962,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -965,15 +965,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
this.methodProfiler.d().d();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -654,7 +654,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
this.hasTicked = true;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
@@ -1177,7 +1177,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1180,7 +1180,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void c(TickTask ticktask) {
|
|
|
|
|
@@ -663,7 +663,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
super.executeTask(ticktask);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1251,7 +1251,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1254,7 +1254,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
//if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit // Paper - move down
|
|
|
|
|
//MinecraftServer.LOGGER.debug("Autosave started"); // Paper
|
|
|
|
|
serverAutoSave = (autosavePeriod > 0 && this.ticks % autosavePeriod == 0); // Paper
|
|
|
|
|
@@ -672,7 +672,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // Paper
|
|
|
|
|
this.playerList.savePlayers();
|
|
|
|
|
}// Paper
|
|
|
|
|
@@ -1267,11 +1267,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1270,11 +1270,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
}
|
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
|
|
@@ -686,7 +686,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
// Akarin - Disable Snooper
|
|
|
|
|
/*
|
|
|
|
|
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
|
|
|
|
@@ -1283,7 +1283,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1286,7 +1286,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@@ -695,7 +695,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
|
|
|
|
|
// Paper start - move executeAll() into full server tick timing
|
|
|
|
|
try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
|
|
|
|
|
@@ -1299,7 +1299,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1302,7 +1302,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.ticks, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
|
|
@@ -704,7 +704,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
long l = this.f[this.ticks % 100] = SystemUtils.getMonotonicNanos() - i;
|
|
|
|
|
|
|
|
|
|
this.av = this.av * 0.8F + (float) l / 1000000.0F * 0.19999999F;
|
|
|
|
|
@@ -1312,7 +1312,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1315,7 +1315,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
|
|
this.circularTimer.a(i1 - i);
|
|
|
|
|
@@ -713,7 +713,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
|
|
|
|
this.slackActivityAccountant.tickEnded(l); // Spigot
|
|
|
|
|
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
|
|
|
|
@@ -1324,12 +1324,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1327,12 +1327,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
this.server.getScheduler().mainThreadHeartbeat(this.ticks); // CraftBukkit
|
|
|
|
|
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
|
|
|
|
// Tuinity - replace logic
|
|
|
|
|
@@ -728,7 +728,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
Iterator iterator = this.getWorlds().iterator();
|
|
|
|
|
|
|
|
|
|
// CraftBukkit start
|
|
|
|
|
@@ -1368,18 +1368,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1371,18 +1371,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
|
|
|
|
TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
|
|
|
|
if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit
|
|
|
|
|
@@ -751,7 +751,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
// Tuinity - replace logic
|
|
|
|
|
@@ -1401,17 +1399,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1405,17 +1403,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
throw new ReportedException(crashreport);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -773,7 +773,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
|
|
|
|
this.playerList.tick();
|
|
|
|
|
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
|
|
|
|
@@ -1419,7 +1417,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1423,7 +1421,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
GameTestHarnessTicker.a.b();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -782,7 +782,7 @@ index accd147272a531abeac28eb02cd054dcc9e03a88..7c157199c74b8da503e0cd99bc90ca93
|
|
|
|
|
|
|
|
|
|
MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
|
|
|
|
for (int i = 0; i < this.tickables.size(); ++i) {
|
|
|
|
|
@@ -1427,7 +1425,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
@@ -1431,7 +1429,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
|
|
|
}
|
|
|
|
|
MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
|
|
|
|
|
|
|
|
|
@@ -857,7 +857,7 @@ index a68fc11ec668576d1453459666caeacf5fbc49b8..f49fc9c8f24e0b1f0dc11a213605a3e9
|
|
|
|
|
|
|
|
|
|
public Stream<PathfinderGoalWrapped> getExecutingGoals() {return c();} // Paper - OBFHELPER
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
|
|
|
index be09053fa162ffadf758728d1fecdc3e34a0e957..fc98a006276e4510d7f3991edb517dd747a24340 100644
|
|
|
|
|
index 13f5857aedc1d47a014ff020a31ce7a84ddeffc5..fe94394239b97e534d1899afdfb6f68bbb96923e 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
|
|
|
@@ -873,20 +873,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
|
|
|
@@ -894,7 +894,7 @@ index be09053fa162ffadf758728d1fecdc3e34a0e957..fc98a006276e4510d7f3991edb517dd7
|
|
|
|
|
if (ioThrowable != null) {
|
|
|
|
|
com.destroystokyo.paper.io.IOUtil.rethrow(ioThrowable);
|
|
|
|
|
}
|
|
|
|
|
@@ -1412,7 +1412,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
|
|
|
@@ -1415,7 +1415,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // Paper
|
|
|
|
|
@@ -904,7 +904,7 @@ index be09053fa162ffadf758728d1fecdc3e34a0e957..fc98a006276e4510d7f3991edb517dd7
|
|
|
|
|
nbttagcompound = ChunkRegionLoader.saveChunk(this.world, ichunkaccess);
|
|
|
|
|
} // Paper
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
|
index 455dd1de07cf4ed2b7f41b45e0dec0c86092bc69..beaa3b104856cdf5dd71e7e151728bfa06035612 100644
|
|
|
|
|
index f09b85390745379ddffcfd11501881cf66352ce7..affc380bd4092654d2674e9aa084dfb920718271 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
|
@@ -195,7 +195,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
|
|
|
|
@@ -957,10 +957,10 @@ index 3f1aa5ced697490b5481ba992cf5af5dc98b8166..af705e6c650b529c18bdd8f0c063a71c
|
|
|
|
|
this.h.clear();
|
|
|
|
|
this.g.clear();
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
|
|
|
index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d395c9b23 100644
|
|
|
|
|
index 655e0b5e52e22a1ac1ff3718ad5ab3ab61ef7e41..fbde4fd656e8da0dccabca3872f96c7c2257bdb6 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
|
|
|
@@ -392,9 +392,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -411,9 +411,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
IBlockData iblockdata2 = this.getType(blockposition);
|
|
|
|
|
|
|
|
|
|
if (iblockdata2 != iblockdata1 && (iblockdata2.b((IBlockAccess) this, blockposition) != iblockdata1.b((IBlockAccess) this, blockposition) || iblockdata2.h() != iblockdata1.h() || iblockdata2.g() || iblockdata1.g())) {
|
|
|
|
|
@@ -972,7 +972,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@@ -762,9 +762,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -781,9 +781,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void tickBlockEntities() {
|
|
|
|
|
@@ -984,7 +984,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
timings.tileEntityTick.startTiming(); // Spigot
|
|
|
|
|
if (!this.tileEntityListUnload.isEmpty()) {
|
|
|
|
|
// Paper start - Use alternate implementation with faster contains
|
|
|
|
|
@@ -797,9 +797,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -816,9 +816,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
if (this.chunkProvider.a(blockposition) && this.getWorldBorder().a(blockposition)) {
|
|
|
|
|
try {
|
|
|
|
|
@@ -995,7 +995,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
tileentity.tickTimer.startTiming(); // Spigot
|
|
|
|
|
if (tileentity.getTileType().isValidBlock(this.getType(blockposition).getBlock())) {
|
|
|
|
|
((ITickable) tileentity).tick();
|
|
|
|
|
@@ -807,7 +805,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -826,7 +824,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
tileentity.v();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1004,7 +1004,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
} catch (Throwable throwable) {
|
|
|
|
|
if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
|
|
|
|
// Paper start - Prevent tile entity and entity crashes
|
|
|
|
|
@@ -844,7 +842,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -863,7 +861,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
timings.tileEntityTick.stopTiming(); // Spigot
|
|
|
|
|
timings.tileEntityPending.startTiming(); // Spigot
|
|
|
|
|
this.tickingTileEntities = false;
|
|
|
|
|
@@ -1013,7 +1013,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
if (!this.tileEntityListPending.isEmpty()) {
|
|
|
|
|
for (int i = 0; i < this.tileEntityListPending.size(); ++i) {
|
|
|
|
|
TileEntity tileentity1 = (TileEntity) this.tileEntityListPending.get(i);
|
|
|
|
|
@@ -877,7 +875,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -896,7 +894,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
timings.tileEntityPending.stopTiming(); // Spigot
|
|
|
|
|
co.aikar.timings.TimingHistory.tileEntityTicks += this.tileEntityListTick.size(); // Paper
|
|
|
|
|
@@ -1022,7 +1022,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
spigotConfig.currentPrimedTnt = 0; // Spigot
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1234,7 +1232,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -1254,7 +1252,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
}
|
|
|
|
|
public List<Entity> getEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, @Nullable Predicate<? super Entity> predicate, List<Entity> list) {
|
|
|
|
|
// Tuinity end - add list parameter
|
|
|
|
|
@@ -1031,7 +1031,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
|
|
|
|
|
int j = MathHelper.floor((axisalignedbb.maxX + 2.0D) / 16.0D);
|
|
|
|
|
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
|
|
|
|
|
@@ -1254,7 +1252,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -1274,7 +1272,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public <T extends Entity> List<T> a(@Nullable EntityTypes<T> entitytypes, AxisAlignedBB axisalignedbb, Predicate<? super T> predicate) {
|
|
|
|
|
@@ -1040,7 +1040,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
|
|
|
|
|
int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D);
|
|
|
|
|
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
|
|
|
|
|
@@ -1276,7 +1274,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -1296,7 +1294,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
public <T extends Entity> List<T> getEntities(Class<? extends T> oclass, AxisAlignedBB axisalignedbb, @Nullable Predicate<? super T> predicate) { return a(oclass, axisalignedbb, predicate); } // Paper - OBFHELPER
|
|
|
|
|
@Override public <T extends Entity> List<T> a(Class<? extends T> oclass, AxisAlignedBB axisalignedbb, @Nullable Predicate<? super T> predicate) {
|
|
|
|
|
@@ -1049,7 +1049,7 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
|
|
|
|
|
int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D);
|
|
|
|
|
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
|
|
|
|
|
@@ -1299,7 +1297,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
@@ -1319,7 +1317,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public <T extends Entity> List<T> b(Class<? extends T> oclass, AxisAlignedBB axisalignedbb, @Nullable Predicate<? super T> predicate) {
|
|
|
|
|
@@ -1059,10 +1059,10 @@ index 4a43653cdee98a73a4e36710588df2ad205ef3d4..b061134322600315b71a3fbf8f57a51d
|
|
|
|
|
int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D);
|
|
|
|
|
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
|
index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecbe8dd9851 100644
|
|
|
|
|
index c6509ad99d26f718b2e1fc89d874d4b0536d1781..a89426cb36b446c762b2f11143ed51356bddb633 100644
|
|
|
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
|
@@ -726,12 +726,12 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -727,12 +727,12 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void doTick(BooleanSupplier booleansupplier) {
|
|
|
|
|
@@ -1078,7 +1078,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
boolean flag = this.isRaining();
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
@@ -870,11 +870,11 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -871,11 +871,11 @@ public class WorldServer extends World {
|
|
|
|
|
|
|
|
|
|
this.N();
|
|
|
|
|
this.a();
|
|
|
|
|
@@ -1092,7 +1092,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
timings.scheduledBlocks.startTiming(); // Spigot
|
|
|
|
|
if (this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES) {
|
|
|
|
|
this.nextTickListBlock.b();
|
|
|
|
|
@@ -883,7 +883,7 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -884,7 +884,7 @@ public class WorldServer extends World {
|
|
|
|
|
timings.scheduledBlocks.stopTiming(); // Spigot
|
|
|
|
|
|
|
|
|
|
// Tuinity - replace logic
|
|
|
|
|
@@ -1101,7 +1101,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
this.timings.raids.startTiming(); // Paper - timings
|
|
|
|
|
this.persistentRaid.a();
|
|
|
|
|
if (this.mobSpawnerTrader != null) {
|
|
|
|
|
@@ -891,13 +891,13 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -892,13 +892,13 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
this.timings.raids.stopTiming(); // Paper - timings
|
|
|
|
|
|
|
|
|
|
@@ -1117,7 +1117,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
|
|
|
|
|
|
|
|
|
|
if (flag3) {
|
|
|
|
|
@@ -907,7 +907,7 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -908,7 +908,7 @@ public class WorldServer extends World {
|
|
|
|
|
if (flag3 || this.emptyTime++ < 300) {
|
|
|
|
|
timings.tickEntities.startTiming(); // Spigot
|
|
|
|
|
this.worldProvider.j();
|
|
|
|
|
@@ -1126,14 +1126,14 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
|
|
|
|
|
Entity entity;
|
|
|
|
|
|
|
|
|
|
@@ -927,7 +927,7 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -928,7 +928,7 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- gameprofilerfiller.exitEnter("regular");
|
|
|
|
|
+ //gameprofilerfiller.exitEnter("regular"); // Akarin - remove caller
|
|
|
|
|
this.tickingEntities = true;
|
|
|
|
|
ObjectIterator objectiterator = this.entitiesById.int2ObjectEntrySet().iterator();
|
|
|
|
|
com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Entity> objectiterator = this.entitiesForIteration.iterator(); // Tuinity
|
|
|
|
|
|
|
|
|
|
@@ -949,12 +949,12 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
@@ -1166,7 +1166,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
+ //gameprofilerfiller.enter("remove"); // Akarin - remove caller
|
|
|
|
|
if (entity1.dead) {
|
|
|
|
|
this.removeEntityFromChunk(entity1);
|
|
|
|
|
objectiterator.remove();
|
|
|
|
|
this.entitiesById.remove(entity1.getId()); // Tuinity
|
|
|
|
|
this.unregisterEntity(entity1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1175,7 +1175,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
}
|
|
|
|
|
timings.entityTick.stopTiming(); // Spigot
|
|
|
|
|
|
|
|
|
|
@@ -1000,13 +1000,13 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1001,13 +1001,13 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
} // Paper - timings
|
|
|
|
|
|
|
|
|
|
@@ -1191,7 +1191,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void wakeupPlayers() {
|
|
|
|
|
@@ -1025,9 +1025,9 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1026,9 +1026,9 @@ public class WorldServer extends World {
|
|
|
|
|
boolean flag = this.isRaining();
|
|
|
|
|
int j = chunkcoordintpair.d();
|
|
|
|
|
int k = chunkcoordintpair.e();
|
|
|
|
|
@@ -1203,7 +1203,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
|
|
|
|
|
|
|
|
|
if (!this.paperConfig.disableThunder && flag && this.U() && this.randomTickRandom.nextInt(100000) == 0) { // Paper - Disable thunder // Paper - optimise random ticking
|
|
|
|
|
@@ -1049,7 +1049,7 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1050,7 +1050,7 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1212,7 +1212,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
if (!this.paperConfig.disableIceAndSnow && this.randomTickRandom.nextInt(16) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking
|
|
|
|
|
// Paper start - optimise chunk ticking
|
|
|
|
|
this.getRandomBlockPosition(j, 0, k, 15, blockposition);
|
|
|
|
|
@@ -1080,9 +1080,9 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1081,9 +1081,9 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Paper start - optimise random block ticking
|
|
|
|
|
@@ -1224,7 +1224,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
timings.chunkTicksBlocks.startTiming(); // Paper
|
|
|
|
|
|
|
|
|
|
ChunkSection[] sections = chunk.getSections();
|
|
|
|
|
@@ -1119,7 +1119,7 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1120,7 +1120,7 @@ public class WorldServer extends World {
|
|
|
|
|
// TODO CHECK ON UPDATE
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -1233,7 +1233,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
timings.chunkTicksBlocks.stopTiming(); // Paper
|
|
|
|
|
// Paper end
|
|
|
|
|
}
|
|
|
|
|
@@ -1253,15 +1253,13 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1254,15 +1254,13 @@ public class WorldServer extends World {
|
|
|
|
|
entity.lastPitch = entity.pitch;
|
|
|
|
|
if (entity.inChunk) {
|
|
|
|
|
++entity.ticksLived;
|
|
|
|
|
@@ -1253,7 +1253,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.chunkCheck(entity);
|
|
|
|
|
@@ -1294,14 +1292,12 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1295,14 +1293,12 @@ public class WorldServer extends World {
|
|
|
|
|
entity1.lastPitch = entity1.pitch;
|
|
|
|
|
if (entity1.inChunk) {
|
|
|
|
|
++entity1.ticksLived;
|
|
|
|
|
@@ -1272,7 +1272,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.chunkCheck(entity1);
|
|
|
|
|
@@ -1322,7 +1318,7 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1323,7 +1319,7 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void chunkCheck(Entity entity) {
|
|
|
|
|
@@ -1281,7 +1281,7 @@ index 9338e090cbad73f3a72ab5e1d26026bbb334e2fe..7958393a9c4c934ba36dc4b3cd55eecb
|
|
|
|
|
int i = MathHelper.floor(entity.locX() / 16.0D);
|
|
|
|
|
int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior;
|
|
|
|
|
int k = MathHelper.floor(entity.locZ() / 16.0D);
|
|
|
|
|
@@ -1342,7 +1338,7 @@ public class WorldServer extends World {
|
|
|
|
|
@@ -1343,7 +1339,7 @@ public class WorldServer extends World {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|