mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@5e73c55 [ci skip] Add more identifying patch comments PaperMC/Paper@3e20d3a [ci skip] Add more identifying patch comments PaperMC/Paper@f61ebdc Fix issue with kick event causes being passed improperly PaperMC/Paper@106c67a [ci skip] Add more identifying patch comments PaperMC/Paper@cc693ce [ci skip] Add more identifying patch comments, merge related patches PaperMC/Paper@eeb6afc [ci skip] Add more identifying patch comments, merge related patches PaperMC/Paper@1c956ab [ci skip] Add more identifying patch comments, merge related patches PaperMC/Paper@42e88a8 [ci skip] Add more identifying patch comments PaperMC/Paper@8e41ef4 Add visual blockdata api for primed tnt (#10146) PaperMC/Paper@68c3297 [ci skip] Add more identifying patch comments PaperMC/Paper@4a98986 Add back Reduce allocation of Vec3D by entity tracker patch (#10179) PaperMC/Paper@b48d737 Async world data IO saving (#10171) PaperMC/Paper@8d94596 [ci skip] Add more identifying patch comments PaperMC/Paper@f7dd304 [ci skip] Add more identifying patch comments PaperMC/Paper@98e6d20 [ci skip] Add more identifying patch comments PaperMC/Paper@e9e0bc1 [ci skip] Add more identifying patch comments PaperMC/Paper@d9df6bc [ci skip] Add more patch identifying comments, cleanup PaperMC/Paper@27cabc1 [ci skip] Add more patch identifying comments Pufferfish Changes: pufferfish-gg/Pufferfish@8e208d3 Fix Async World Saving attribution
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Remove Mojang Profiler
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index d3646cfc4d694d216dccb41f540a76e44050320a..9c370e3ad78f016c49b62488c9d0c861c4ad31e6 100644
|
||||
index 7e266a126180000dcad4b3bd8606349bdc95c30b..819f2cba19e3a0c2a6a8087f2346ebe4782aeb8c 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -165,7 +165,7 @@ public class Commands {
|
||||
@@ -89,7 +89,7 @@ index 821dc4aeaf48460000682604fba51b340b9738e7..3aa2ce6a2a3d3cdfc372a60419a09f49
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5a7f1e27b9e4d36789a0a835fd81ef117c6802c1..9424785e55c8f31bd6c6029e2d3a6f9fa5e571df 100644
|
||||
index 1818e844e94522c9239b9a5cad812c09adeba636..c6403274658ccaa2ed27e586cc35d13c760f2040 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -344,13 +344,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -123,7 +123,7 @@ index 5a7f1e27b9e4d36789a0a835fd81ef117c6802c1..9424785e55c8f31bd6c6029e2d3a6f9f
|
||||
+ }*/ // Purpur
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Shutdown and don't bother finishing
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -1222,20 +1222,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
boolean flag = i == 0L;
|
||||
@@ -185,13 +185,13 @@ index 5a7f1e27b9e4d36789a0a835fd81ef117c6802c1..9424785e55c8f31bd6c6029e2d3a6f9f
|
||||
}
|
||||
- this.profiler.pop();
|
||||
+ //this.profiler.pop(); // Purpur
|
||||
// Paper end
|
||||
// Paper end - Incremental chunk and player saving
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
// Paper start - move executeAll() into full server tick timing
|
||||
@@ -1583,7 +1583,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||
// Paper end
|
||||
// Paper end - Server Tick Events
|
||||
- this.profiler.push("tallying");
|
||||
+ //this.profiler.push("tallying"); // Purpur
|
||||
long j = Util.getNanos() - i;
|
||||
@@ -199,7 +199,7 @@ index 5a7f1e27b9e4d36789a0a835fd81ef117c6802c1..9424785e55c8f31bd6c6029e2d3a6f9f
|
||||
|
||||
@@ -1599,7 +1599,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
tickTimes60s.add(this.tickCount, j);
|
||||
// Paper end
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
this.logTickTime(l - i);
|
||||
- this.profiler.pop();
|
||||
+ //this.profiler.pop(); // Purpur
|
||||
@@ -217,11 +217,11 @@ index 5a7f1e27b9e4d36789a0a835fd81ef117c6802c1..9424785e55c8f31bd6c6029e2d3a6f9f
|
||||
//MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
- this.profiler.popPush("levels");
|
||||
+ //this.profiler.popPush("levels"); // Purpur
|
||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - moved down
|
||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1728,18 +1728,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
|
||||
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
||||
|
||||
- this.profiler.push(() -> {
|
||||
@@ -254,7 +254,7 @@ index 5a7f1e27b9e4d36789a0a835fd81ef117c6802c1..9424785e55c8f31bd6c6029e2d3a6f9f
|
||||
+ //this.profiler.pop(); // Purpur
|
||||
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
||||
}
|
||||
this.isIteratingOverLevels = false; // Paper
|
||||
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
|
||||
- this.profiler.popPush("connection");
|
||||
+ //this.profiler.popPush("connection"); // Purpur
|
||||
@@ -448,7 +448,7 @@ index df0c15f6b5b2224d53e4f8fad42b9a1e5f33dc25..5dd0dcb47211cec69189115bf4eab1df
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 87bbf12563d035b2b63a4d36095dc1cd8b624671..172c7b94830c13835e48d68a039bd66e7e7622b0 100644
|
||||
index a9f933cf827f7973e6b881b071108050b99f80f3..6e7e71c7962d43f2d4fbd218f2017557ddd53eb2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -545,20 +545,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -477,7 +477,7 @@ index 87bbf12563d035b2b63a4d36095dc1cd8b624671..172c7b94830c13835e48d68a039bd66e
|
||||
|
||||
public boolean hasWork() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae4b2c1d26 100644
|
||||
index e828f3d14af21318a716b9eba4b9bf80e377b073..a5067485fb6683e3255681a9c5a6df86c90ce0fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -73,7 +73,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -492,7 +492,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
@@ -277,16 +277,16 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return ifLoaded;
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Perf: Optimise getChunkAt calls for loaded chunks
|
||||
- ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||
+ //ProfilerFiller gameprofilerfiller = this.level.getProfiler(); // Purpur
|
||||
|
||||
@@ -509,7 +509,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create, true); // Paper
|
||||
ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
|
||||
|
||||
@@ -475,24 +475,24 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -482,24 +482,24 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// CraftBukkit start - modelled on below
|
||||
public void purgeUnload() {
|
||||
if (true) return; // Paper - tickets will be removed later, this behavior isn't really well accounted for by the chunk system
|
||||
@@ -539,7 +539,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
if (tickChunks) {
|
||||
//this.level.timings.chunks.startTiming(); // Paper - timings // Purpur
|
||||
this.chunkMap.level.playerChunkLoader.tick(); // Paper - replace player chunk loader - this is mostly required to account for view distance changes
|
||||
@@ -502,10 +502,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -509,10 +509,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
|
||||
//this.level.timings.doChunkUnload.startTiming(); // Spigot // Purpur
|
||||
@@ -552,7 +552,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
this.clearCache();
|
||||
}
|
||||
|
||||
@@ -515,10 +515,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -522,10 +522,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
this.lastInhabitedUpdate = i;
|
||||
if (!this.level.isDebug()) {
|
||||
@@ -566,7 +566,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
// Paper - optimise chunk tick iteration
|
||||
//if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
|
||||
|
||||
@@ -526,7 +526,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -533,7 +533,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
this.level.resetIceAndSnowTick(); // Pufferfish - reset ice & snow tick random
|
||||
if (this.level.getServer().tickRateManager().runsNormally()) {
|
||||
@@ -574,8 +574,8 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
+ // gameprofilerfiller.popPush("naturalSpawnCount"); // Purpur
|
||||
//this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
|
||||
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
||||
// Paper start - per player mob spawning
|
||||
@@ -560,7 +560,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// Paper start - Optional per player mob spawns
|
||||
@@ -567,7 +567,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
|
||||
|
||||
// this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
|
||||
@@ -584,7 +584,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
|
||||
// Paper start - optimise chunk tick iteration
|
||||
@@ -668,7 +668,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -675,7 +675,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// Paper end - optimise chunk tick iteration
|
||||
// this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur
|
||||
|
||||
@@ -593,7 +593,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
if (flag) {
|
||||
//try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur
|
||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||
@@ -676,7 +676,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -683,7 +683,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
// Paper - optimise chunk tick iteration
|
||||
//this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Purpur
|
||||
// Paper start - optimise chunk tick iteration
|
||||
@@ -694,10 +694,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -701,10 +701,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// Paper end - optimise chunk tick iteration
|
||||
//this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Purpur
|
||||
// Paper - optimise chunk tick iteration
|
||||
@@ -616,7 +616,7 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
// Pufferfish start - optimize mob spawning
|
||||
if (gg.pufferfish.pufferfish.PufferfishConfig.enableAsyncMobSpawning) {
|
||||
for (ServerPlayer player : this.level.players) {
|
||||
@@ -901,7 +901,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -908,7 +908,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
@Override
|
||||
protected void doRunTask(Runnable task) {
|
||||
@@ -626,10 +626,10 @@ index 9f438b41b61ee1174d8f23bcb7d93380ad932e9c..c3c47857515a7f75d69c718f352d8bae
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29ef1da3a01 100644
|
||||
index 0fe2457de7a6f3842ff80512dac1bd2d3bbc04aa..65a60983be85707883bd330e79a8c1f03428f2c9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -829,16 +829,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -824,16 +824,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void tick(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -649,7 +649,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
this.advanceWeatherCycle();
|
||||
}
|
||||
|
||||
@@ -870,30 +870,30 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -865,30 +865,30 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.tickTime();
|
||||
}
|
||||
|
||||
@@ -687,7 +687,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
if (flag) {
|
||||
// this.timings.doSounds.startTiming(); // Spigot // Purpur
|
||||
this.runBlockEvents();
|
||||
@@ -901,7 +901,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -896,7 +896,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
this.handlingTick = false;
|
||||
@@ -696,7 +696,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
boolean flag1 = true || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
|
||||
|
||||
if (flag1) {
|
||||
@@ -909,12 +909,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -904,12 +904,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
if (flag1 || this.emptyTime++ < 300) {
|
||||
@@ -712,7 +712,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
}
|
||||
|
||||
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
||||
@@ -925,9 +925,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -920,9 +920,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
|
||||
entity.discard();
|
||||
} else if (!tickratemanager.isEntityFrozen(entity)) {
|
||||
@@ -724,7 +724,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - now always true if in the ticking list
|
||||
Entity entity1 = entity.getVehicle();
|
||||
|
||||
@@ -939,7 +939,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -934,7 +934,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.stopRiding();
|
||||
}
|
||||
|
||||
@@ -733,7 +733,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
// Pufferfish start - copied from this.guardEntityTick
|
||||
try {
|
||||
this.tickNonPassenger(entity); // Pufferfish - changed
|
||||
@@ -954,20 +954,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -949,20 +949,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Paper end
|
||||
}
|
||||
// Pufferfish end
|
||||
@@ -757,7 +757,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1049,9 +1048,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1044,9 +1043,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
boolean flag = this.isRaining();
|
||||
int j = chunkcoordintpair.getMinBlockX();
|
||||
int k = chunkcoordintpair.getMinBlockZ();
|
||||
@@ -769,7 +769,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||
|
||||
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && /*this.random.nextInt(this.spigotConfig.thunderChance) == 0 &&*/ chunk.shouldDoLightning(this.random)) { // Spigot // Paper - disable thunder // Pufferfish - replace random with shouldDoLightning
|
||||
@@ -1090,7 +1089,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1085,7 +1084,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -778,7 +778,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
|
||||
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper
|
||||
for (int l = 0; l < randomTickSpeed; ++l) {
|
||||
@@ -1103,7 +1102,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1098,7 +1097,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
} // Paper
|
||||
|
||||
@@ -787,7 +787,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
//timings.chunkTicksBlocks.startTiming(); // Paper // Purpur
|
||||
if (randomTickSpeed > 0) {
|
||||
// Paper start - optimize random block ticking
|
||||
@@ -1139,7 +1138,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1134,7 +1133,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Paper end - optimise random block ticking
|
||||
|
||||
//timings.chunkTicksBlocks.stopTiming(); // Paper // Purpur
|
||||
@@ -796,7 +796,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -1486,19 +1485,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1481,19 +1480,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
//try { // Purpur
|
||||
// Paper end - timings
|
||||
entity.setOldPosAndRot();
|
||||
@@ -821,7 +821,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
//} finally { timer.stopTiming(); } // Paper - timings // Purpur
|
||||
Iterator iterator = entity.getPassengers().iterator();
|
||||
|
||||
@@ -1527,12 +1526,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1522,12 +1521,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Paper end
|
||||
passenger.setOldPosAndRot();
|
||||
++passenger.tickCount;
|
||||
@@ -838,7 +838,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
// Paper start - EAR 2
|
||||
if (isActive) {
|
||||
passenger.rideTick();
|
||||
@@ -1544,7 +1543,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1539,7 +1538,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
vehicle.positionRider(passenger);
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
@@ -848,7 +848,7 @@ index 3a06bf55d48ed96556ad9d389ab5ebaefeb078d9..1309c9e63095a0484ee0fa119a41c29e
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 5ca339100cb311faa87b978b3c8df36d24fea112..97fa5c65bb6fe53bada4c42d54a9f7c22dbfca38 100644
|
||||
index 52d0c1e6ae4891bccd08cbd34a36e7fb6afd09d6..516ff3e5141df57938c43adee902a48e07048302 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1240,7 +1240,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -881,7 +881,7 @@ index 5ca339100cb311faa87b978b3c8df36d24fea112..97fa5c65bb6fe53bada4c42d54a9f7c2
|
||||
this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities()));
|
||||
playerlist.sendLevelInfo(this, worldserver);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index 97914d9c0d8f9ad58fbc79db2afd9cba57bf93b6..da499e0b21eba40d24d95047e3a9220567d4bae7 100644
|
||||
index 4ff11fa980b89c8721f792139a5bea0cc31907c2..fa5107deb090a779ddc2fdd0fd6de05e1fcf85b9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -222,7 +222,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -890,7 +890,7 @@ index 97914d9c0d8f9ad58fbc79db2afd9cba57bf93b6..da499e0b21eba40d24d95047e3a92205
|
||||
protected void keepConnectionAlive() {
|
||||
- this.server.getProfiler().push("keepAlive");
|
||||
+ //this.server.getProfiler().push("keepAlive"); // Purpur
|
||||
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||
// Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
|
||||
long currentTime = Util.getMillis();
|
||||
@@ -258,7 +258,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -1107,19 +1107,19 @@ index 2e6e8eac987c4ef6b2dcd3de592d8a51d2b29792..863343a87fe34d72f04af89d75268b47
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e466bb75e 100644
|
||||
index 376acce7e0fd5dedfdf10fa94ced41bc473b7815..805991ef816ad5ae82ed26781ec265173a8f192c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -852,7 +852,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -851,7 +851,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// CraftBukkit end
|
||||
|
||||
public void baseTick() {
|
||||
- this.level().getProfiler().push("entityBaseTick");
|
||||
+ //this.level().getProfiler().push("entityBaseTick"); // Purpur
|
||||
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
||||
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
|
||||
this.feetBlockState = null;
|
||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||
@@ -913,7 +913,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -912,7 +912,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
this.firstTick = false;
|
||||
@@ -1128,7 +1128,7 @@ index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e
|
||||
}
|
||||
|
||||
public void setSharedFlagOnFire(boolean onFire) {
|
||||
@@ -1132,7 +1132,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1131,7 +1131,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1137,7 +1137,7 @@ index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e
|
||||
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
||||
movement = movement.multiply(this.stuckSpeedMultiplier);
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
@@ -1141,7 +1141,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1140,7 +1140,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// Paper start - ignore movement changes while inactive.
|
||||
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
||||
setDeltaMovement(Vec3.ZERO);
|
||||
@@ -1146,7 +1146,7 @@ index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
@@ -1162,8 +1162,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1161,8 +1161,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
||||
}
|
||||
|
||||
@@ -1157,7 +1157,7 @@ index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e
|
||||
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
||||
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
||||
|
||||
@@ -1182,7 +1182,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1181,7 +1181,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition);
|
||||
if (this.isRemoved()) {
|
||||
@@ -1166,7 +1166,7 @@ index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e
|
||||
} else {
|
||||
if (this.horizontalCollision) {
|
||||
Vec3 vec3d2 = this.getDeltaMovement();
|
||||
@@ -1320,7 +1320,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1319,7 +1319,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
||||
}
|
||||
|
||||
@@ -1175,27 +1175,27 @@ index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e
|
||||
}
|
||||
}
|
||||
// Paper start - detailed watchdog information
|
||||
@@ -3191,7 +3191,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3190,7 +3190,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
|
||||
|
||||
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
||||
- this.level().getProfiler().push("portal");
|
||||
+ //this.level().getProfiler().push("portal"); // Purpur
|
||||
this.portalTime = i;
|
||||
// Paper start
|
||||
// Paper start - Add EntityPortalReadyEvent
|
||||
io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
|
||||
@@ -3209,7 +3209,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3208,7 +3208,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
} // Paper
|
||||
} // Paper - Add EntityPortalReadyEvent
|
||||
// CraftBukkit end
|
||||
- this.level().getProfiler().pop();
|
||||
+ //this.level().getProfiler().pop(); // Purpur
|
||||
}
|
||||
|
||||
this.isInsidePortal = false;
|
||||
@@ -3684,14 +3684,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3683,14 +3683,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Fix item duplication and teleport issues
|
||||
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
|
||||
- this.level().getProfiler().push("changeDimension");
|
||||
+ //this.level().getProfiler().push("changeDimension"); // Purpur
|
||||
@@ -1210,16 +1210,16 @@ index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e
|
||||
PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit
|
||||
|
||||
if (shapedetectorshape == null) {
|
||||
@@ -3730,7 +3730,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3729,7 +3729,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.unRide();
|
||||
// CraftBukkit end
|
||||
|
||||
- this.level().getProfiler().popPush("reloading");
|
||||
+ //this.level().getProfiler().popPush("reloading"); // Purpur
|
||||
// Paper start - Change lead drop timing to prevent dupe
|
||||
// Paper start - Fix item duplication and teleport issues
|
||||
if (this instanceof Mob) {
|
||||
((Mob) this).dropLeash(true, true); // Paper drop lead
|
||||
@@ -3757,10 +3757,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3756,10 +3756,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
this.removeAfterChangingDimensions();
|
||||
@@ -1233,7 +1233,7 @@ index d5f60a9e2557f687d3c1218559601526f349ecbe..ed7bc379d55b7fd8be1d18e388356a7e
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4c75007bc1b700b9c4b79dce0b63c21fec6a742e..46230c0fbcfd565163abca17313a6f0ea5e63249 100644
|
||||
index b6422365998bb6008f2efbae209171da4455e8cf..830998da41f38ab799db863ea088e0476b9fad5c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -409,7 +409,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1340,11 +1340,11 @@ index 4c75007bc1b700b9c4b79dce0b63c21fec6a742e..46230c0fbcfd565163abca17313a6f0e
|
||||
this.pushEntities();
|
||||
- this.level().getProfiler().pop();
|
||||
+ //this.level().getProfiler().pop(); // Purpur
|
||||
// Paper start
|
||||
// Paper start - Add EntityMoveEvent
|
||||
// Purpur start
|
||||
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 9caee3db19fa76e8e311ead8f892d0f8bebfe6b2..4c0d710d20e074ad4a0fdd1cd4c0c3d3383b68a5 100644
|
||||
index c029752141efbc48005dae0e3c1a071ba039b3a7..faff4cbeaacf0beaae1ec488f6f233326f415975 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -367,13 +367,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@@ -1501,7 +1501,7 @@ index 1635818fc4b1788c0d397085239df6dd75b210ab..02978315bc2b828cc603ce7478408f3f
|
||||
|
||||
public Set<WrappedGoal> getAvailableGoals() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
index b37415d45dda8e658c8995a4519e552dc378bb41..0e36e3e672de4c806e2d534b437489a3a349a722 100644
|
||||
index a9922074b6aa6a9898615385bb11d2a758662970..9ffbe784a0d45b494f29ab1555841b4be9f58128 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
@@ -172,12 +172,12 @@ public abstract class PathNavigation {
|
||||
@@ -1558,7 +1558,7 @@ index 09f796ec491f21520e1fcc454249e4696dad3b1b..9bf06cf7b3706f8883e1a0ceac8b1aeb
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
index b7eaa9e99688ae300c2e9176991c29828d1cc800..e4d529825e681bbc656113b1fd44894338e23d21 100644
|
||||
index e73d7b47327da59dbf49c2160acd0b3ebb2a4232..472b76d6ec721fa46857097589aa879f237e3e0d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
@@ -315,13 +315,13 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
|
||||
@@ -1580,7 +1580,7 @@ index b7eaa9e99688ae300c2e9176991c29828d1cc800..e4d529825e681bbc656113b1fd448943
|
||||
Optional<Integer> optional = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 30b19b64fdc9b03f15341831235492f4cdd9823a..b46942c5fafe216039426531a4dbb19bda02c084 100644
|
||||
index d1ada87d222e5b35c2df5a0e7b0075ec3413fa66..fb50a3f3665cca4bb2e586fbd73c580a5d691f69 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -158,13 +158,13 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
@@ -1645,7 +1645,7 @@ index 3103df74b7ae5a5ed841bf97794284cd43ad59de..14135dac80dec4224715e21cef6556d2
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
index fba00cab2c4b234dd2e85b5f4dcd0db34183c1a2..806b207e5246db7daa03bebabd7aa574d8b0dab7 100644
|
||||
index f7730ec3a6c8818baf2a7a738e5a49a56d17c0e8..566f117ba6742ba17ffb8a2673a8c320c39549f7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
@@ -226,13 +226,13 @@ public class Goat extends Animal {
|
||||
@@ -1667,7 +1667,7 @@ index fba00cab2c4b234dd2e85b5f4dcd0db34183c1a2..806b207e5246db7daa03bebabd7aa574
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 42bfc59462f320e95c13075c8541c4c4c98a6879..dcb10e2ea1e0c7d0479adae5bc2ff57ece172aad 100644
|
||||
index 4d1071546f523c63b9c981e90a09393e9e4400fa..5e7d76dcdc170b809ab82f6e2259c9b4d3d741be 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -517,11 +517,11 @@ public class Sniffer extends Animal {
|
||||
@@ -1721,7 +1721,7 @@ index ab183a7d94a27d5235ff33ce7784c92d66d40b89..94431d5c789a9f558c16c0d1fc8f1f74
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
index e326e753cc6bca1bd00287d16c9796b9f3dd4d14..9d6c4f13c4a444c6c815c6c4f2114142f166b9bb 100644
|
||||
index 510ee1aee1dd106b5129c375ebb59c7950b8b989..5c160d6aa4e3d51c1161f82e92e5e8c1e809a574 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
@@ -168,10 +168,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
||||
@@ -1738,7 +1738,7 @@ index e326e753cc6bca1bd00287d16c9796b9f3dd4d14..9d6c4f13c4a444c6c815c6c4f2114142
|
||||
if (this.isConverting()) {
|
||||
++this.timeInOverworld;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
index 9ca1618ab945ad834c5fc221ada49058f806e79c..8e829d522a6012f409161ad5a9a06721a942d7e4 100644
|
||||
index 141fa7d4e1b81e90f4d63a3459c9a72bc595d30b..1422c0f4ff6a3e61f229574cd7b50971bdbd8451 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
@@ -335,10 +335,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||
@@ -1772,7 +1772,7 @@ index 61e8f2d030fc50840c3f80dfb6fc810797ec440f..856e6e02c9424a6c06e310262cb4f5bd
|
||||
PiglinBruteAi.maybePlayActivitySound(this);
|
||||
super.customServerAiStep();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index 63e4688d8055cf4a8883477f7943bf63520c0693..22263f219ce9e9f014abb76c43297c528acb36eb 100644
|
||||
index 384e7b29215cadfa40af07a183a9c9c6a5b4a80a..bf7ef72a7d92db8f11789a69583270644de0dac7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -302,10 +302,10 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@@ -1789,7 +1789,7 @@ index 63e4688d8055cf4a8883477f7943bf63520c0693..22263f219ce9e9f014abb76c43297c52
|
||||
if ((this.tickCount + this.getId()) % 120 == 0) {
|
||||
Warden.applyDarknessAround(worldserver, this.position(), this, 20);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index fb8fe6b74bf8c392192c846e05c109dbb364c0a9..27ebfda79d9c4463f157b99c2c56e256839b3a31 100644
|
||||
index c8aa886f7f7457ba160b9e29528f9f5d18ed005a..c137f8f1a2566690f2b2e82b16e7186eaa711f38 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -342,7 +342,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -1811,7 +1811,7 @@ index fb8fe6b74bf8c392192c846e05c109dbb364c0a9..27ebfda79d9c4463f157b99c2c56e256
|
||||
this.assignProfessionWhenSpawned = false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 210b6d71207b99e66ba014b176b2c1445053b1d1..82a58ca092371866566bac5f1efcca4964e59e60 100644
|
||||
index 1fa02130dcb65b3109fde0cb612b538b1c4cd4cb..353ee2d2ea86ba98052acb2edb5d0b3d9393f3ca 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -659,7 +659,7 @@ public class Explosion {
|
||||
@@ -1833,10 +1833,10 @@ index 210b6d71207b99e66ba014b176b2c1445053b1d1..82a58ca092371866566bac5f1efcca49
|
||||
|
||||
if (this.fire) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index fd0a9350e4b08daff437d4d054803d72aec5c950..b58402221840a9e72b30a31d884b0fb2d86883fd 100644
|
||||
index 81dcd8d608ff1b882817e3992c8c93b56dff325f..f638224f8ae018030fa00962cd3c75fc31ab2488 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1315,9 +1315,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1314,9 +1314,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
protected void tickBlockEntities() {
|
||||
@@ -1848,7 +1848,7 @@ index fd0a9350e4b08daff437d4d054803d72aec5c950..b58402221840a9e72b30a31d884b0fb2
|
||||
//this.timings.tileEntityPending.startTiming(); // Spigot // Purpur
|
||||
this.tickingBlockEntities = true;
|
||||
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
||||
@@ -1358,7 +1358,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1357,7 +1357,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
//this.timings.tileEntityTick.stopTiming(); // Spigot // Purpur
|
||||
this.tickingBlockEntities = false;
|
||||
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
|
||||
@@ -1857,7 +1857,7 @@ index fd0a9350e4b08daff437d4d054803d72aec5c950..b58402221840a9e72b30a31d884b0fb2
|
||||
this.spigotConfig.currentPrimedTnt = 0; // Spigot
|
||||
}
|
||||
|
||||
@@ -1568,7 +1568,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1567,7 +1567,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
||||
@@ -1866,7 +1866,7 @@ index fd0a9350e4b08daff437d4d054803d72aec5c950..b58402221840a9e72b30a31d884b0fb2
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call
|
||||
return list;
|
||||
@@ -1587,7 +1587,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1586,7 +1586,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate, List<? super T> result, int limit) {
|
||||
@@ -1875,7 +1875,7 @@ index fd0a9350e4b08daff437d4d054803d72aec5c950..b58402221840a9e72b30a31d884b0fb2
|
||||
// Paper start - optimise this call
|
||||
//TODO use limit
|
||||
if (filter instanceof net.minecraft.world.entity.EntityType entityTypeTest) {
|
||||
@@ -1846,7 +1846,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1845,7 +1845,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -1885,7 +1885,7 @@ index fd0a9350e4b08daff437d4d054803d72aec5c950..b58402221840a9e72b30a31d884b0fb2
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 9a0a16d09a4cda3c2303dabe70db6c3018f3dd08..5a31e0e13a49faa96c0a8927aebb131cb30dacbc 100644
|
||||
index 4e786cd3bc65d762c122f61ccb450bcd0887a745..de48cdb665a43f1df94bfbe740d32b4e3609eec8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -132,7 +132,7 @@ public final class NaturalSpawner {
|
||||
@@ -1905,9 +1905,9 @@ index 9a0a16d09a4cda3c2303dabe70db6c3018f3dd08..5a31e0e13a49faa96c0a8927aebb131c
|
||||
+ //world.getProfiler().pop(); // Purpur
|
||||
}
|
||||
|
||||
// Paper start
|
||||
// Paper start - Add mobcaps commands
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 757dc4292d371e697f336c4665427b3b4a3aa73b..c37aa33134b8602caae5ecff00439ad5e0005d18 100644
|
||||
index 134d2d56af71aceb1ca33d7bb708124655c5d319..f782fee9243129d0990777dcd2d74735ceb5e64e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -457,11 +457,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1947,12 +1947,12 @@ index 757dc4292d371e697f336c4665427b3b4a3aa73b..c37aa33134b8602caae5ecff00439ad5
|
||||
if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
index d23481453717f715124156b5d83f6448f720d049..a8af51a25b0f99c3a64d9150fdfcd6b818aa7581 100644
|
||||
index eb18494bd7257fa5eb00dea16cf4d5667b796f2b..f039d6109ee6f55542adc8f30476ba9a9e4974bf 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
@@ -53,8 +53,8 @@ public class PathFinder {
|
||||
@Nullable
|
||||
// Paper start - optimize collection
|
||||
// Paper start - Perf: remove streams and optimize collection
|
||||
private Path findPath(ProfilerFiller profiler, Node startNode, List<Map.Entry<Target, BlockPos>> positions, float followRange, int distance, float rangeMultiplier) {
|
||||
- profiler.push("find_path");
|
||||
- profiler.markForCharting(MetricCategory.PATH_FINDING);
|
||||
|
||||
Reference in New Issue
Block a user