mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-04 15:41:40 +00:00
1.20.2
This commit is contained in:
@@ -7,10 +7,10 @@ Completely remove the Timings, since it wastes too much performance. Use Spark i
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
deleted file mode 100644
|
||||
index 112029cb275d45dced60807820f1bfe9f394496d..0000000000000000000000000000000000000000
|
||||
index e6452bb4f29bf32600dbf8654365826600189bb5..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||
+++ /dev/null
|
||||
@@ -1,181 +0,0 @@
|
||||
@@ -1,182 +0,0 @@
|
||||
-package co.aikar.timings;
|
||||
-
|
||||
-import com.google.common.collect.MapMaker;
|
||||
@@ -59,8 +59,9 @@ index 112029cb275d45dced60807820f1bfe9f394496d..00000000000000000000000000000000
|
||||
-
|
||||
- public static final Timing antiXrayUpdateTimer = Timings.ofSafe("anti-xray - update");
|
||||
- public static final Timing antiXrayObfuscateTimer = Timings.ofSafe("anti-xray - obfuscate");
|
||||
- public static final Timing distanceManagerTick = Timings.ofSafe("Distance Manager Tick"); // Paper - add timings for distance manager
|
||||
- public static final Timing scoreboardScoreSearch = Timings.ofSafe("Scoreboard score search"); // Paper - add timings for scoreboard search
|
||||
- public static final Timing distanceManagerTick = Timings.ofSafe("Distance Manager Tick"); // Paper - add timings for distance manager
|
||||
-
|
||||
-
|
||||
- public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks");
|
||||
-
|
||||
@@ -812,7 +813,7 @@ index abd0217cf0bff183c8e262edc173a53403797c1a..8e52ebe8d12f5da3d877b0e4ff372322
|
||||
|
||||
private static final ThreadLocal<List<ChunkProgressionTask>> CURRENT_TICKET_UPDATE_SCHEDULING = new ThreadLocal<>();
|
||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
||||
index 51304c5cf4b0ac7646693ef97ef4a3847d3342b5..27e0fa7d032dc34a379e6a6a0855546c50917658 100644
|
||||
index b66a7d4aab887309579154815a0d4abf9de506b0..78cb9d7da9bb025ea362028fdc9d0317de95959e 100644
|
||||
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
||||
@@ -1779,7 +1779,6 @@ public final class NewChunkHolder {
|
||||
@@ -832,7 +833,7 @@ index 51304c5cf4b0ac7646693ef97ef4a3847d3342b5..27e0fa7d032dc34a379e6a6a0855546c
|
||||
return executedUnloadTask | canSaveChunk | canSaveEntities | canSavePOI ? new SaveStat(executedUnloadTask || canSaveChunk, canSaveEntities, canSavePOI): null;
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index 3810cae80cb2dcb721ed25d566b1fe3fb87db4c2..26d2e3efdc6f5a59cea30807bbd1f87573f2cef7 100644
|
||||
index 5013dd1d875f7ca56ac36ef5f5505227018cb1f2..d375d0bc4aab326ad26f7a18c040f5a6c7dbf705 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -1,6 +1,5 @@
|
||||
@@ -922,10 +923,10 @@ index dab211c458311869c61779305580a1c7da830f71..0ddcf3652a2cc9e0cc28f672f103ec7e
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandFunction.java b/src/main/java/net/minecraft/commands/CommandFunction.java
|
||||
index 8273ee1c5e513f02c9743ee38c9b7cf700e2ecad..3ceeddf4c2898172d24db9ee1bab8d6b17e36128 100644
|
||||
index 956cddf5d975b91619316b9b6779cf51575cfc0a..0e460de37ac2ae8accbd0d3da73faac6cd7df8e0 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandFunction.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandFunction.java
|
||||
@@ -16,15 +16,6 @@ import net.minecraft.server.ServerFunctionManager;
|
||||
@@ -32,15 +32,6 @@ import net.minecraft.server.ServerFunctionManager;
|
||||
public class CommandFunction {
|
||||
private final CommandFunction.Entry[] entries;
|
||||
final ResourceLocation id;
|
||||
@@ -942,33 +943,34 @@ index 8273ee1c5e513f02c9743ee38c9b7cf700e2ecad..3ceeddf4c2898172d24db9ee1bab8d6b
|
||||
public CommandFunction(ResourceLocation id, CommandFunction.Entry[] elements) {
|
||||
this.id = id;
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
index d2f0a0755317f5fa9a1ccf7db346aa77fd287d80..0d9a8743fda49994fd0e162848a6dde1ab7dd30a 100644
|
||||
index 9a49f5271ec1d9de17632bfffe8309cb1ba0d8b1..1bf374d482acba25614ae303d1fa72ed686a3072 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
@@ -46,8 +46,7 @@ public class PacketUtils {
|
||||
@@ -48,8 +48,8 @@ public class PacketUtils {
|
||||
try { // Paper - detailed watchdog information
|
||||
if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerGamePacketListenerImpl && ((ServerGamePacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590
|
||||
if (listener.isAcceptingMessages()) {
|
||||
if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590
|
||||
if (listener.shouldHandleMessage(packet)) {
|
||||
- co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
|
||||
- try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
|
||||
+
|
||||
+ try {
|
||||
packet.handle(listener);
|
||||
} catch (Exception exception) {
|
||||
if (listener.shouldPropagateHandlingExceptions()) {
|
||||
if (exception instanceof ReportedException) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872e2effbbb 100644
|
||||
index b22ac919761c54b5f466bd35740710445ce3dd8f..07ea151777da3c233177642c56fb47adfe3feac1 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -183,8 +183,6 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent;
|
||||
@@ -179,8 +179,6 @@ import org.bukkit.craftbukkit.Main;
|
||||
import org.bukkit.event.server.ServerLoadEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
-import co.aikar.timings.MinecraftTimings; // Paper
|
||||
-
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
|
||||
|
||||
public static final int SERVER_THREAD_PRIORITY = Integer.getInteger("gale.thread.priority.server", -1); // Gale - server thread priority environment variable
|
||||
@@ -928,7 +926,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -916,7 +914,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Shutdown and don't bother finishing
|
||||
@@ -976,8 +978,8 @@ index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872
|
||||
// Purpur start
|
||||
if (upnp) {
|
||||
if (dev.omega24.upnp4j.UPnP4J.close(this.getPort(), dev.omega24.upnp4j.util.Protocol.TCP)) {
|
||||
@@ -1294,7 +1291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
@@ -1280,7 +1277,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
protected void waitUntilNextTick() {
|
||||
- //this.executeAll(); // Paper - move this into the tick method for timings
|
||||
@@ -985,7 +987,7 @@ index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872
|
||||
long tickOversleepStart = System.nanoTime(); // Gale - YAPFA - last tick time
|
||||
this.managedBlock(() -> {
|
||||
return !this.canSleepForTickNoOversleep(); // Paper - move oversleep into full server tick
|
||||
@@ -1390,15 +1387,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1376,15 +1373,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public void onServerExit() {}
|
||||
|
||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -1003,7 +1005,7 @@ index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872
|
||||
// Paper end
|
||||
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper
|
||||
|
||||
@@ -1430,11 +1426,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1416,11 +1412,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Paper end
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
@@ -1015,25 +1017,25 @@ index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872
|
||||
// Paper start
|
||||
long endTime = System.nanoTime();
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
@@ -1452,7 +1443,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1438,7 +1429,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end
|
||||
this.frameTimer.logFrameDuration(k - i);
|
||||
this.logTickTime(k - i);
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
- co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTimingFullServerTick(); // Paper // Gale - final timings calls
|
||||
}
|
||||
|
||||
private ServerStatus buildServerStatus() {
|
||||
@@ -1484,9 +1474,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void tickChildren(BooleanSupplier shouldKeepTicking) {
|
||||
protected void logTickTime(long nanos) {}
|
||||
@@ -1475,9 +1465,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
||||
entityplayer.connection.suspendFlushing();
|
||||
});
|
||||
- MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
||||
- MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
||||
// Paper start - Folia scheduler API
|
||||
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
|
||||
getAllLevels().forEach(level -> {
|
||||
@@ -1502,20 +1490,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1493,20 +1481,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
// Paper end - Folia scheduler API
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
@@ -1054,7 +1056,7 @@ index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
// Paper start - optimize time updates
|
||||
for (final ServerLevel level : this.getAllLevels()) {
|
||||
@@ -1535,7 +1518,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1526,7 +1509,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
@@ -1062,7 +1064,7 @@ index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872
|
||||
|
||||
this.isIteratingOverLevels = true; // Paper
|
||||
net.minecraft.network.FriendlyByteBuf.hasItemSerializeEvent = org.purpurmc.purpur.event.packet.NetworkItemSerializeEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
||||
@@ -1554,14 +1536,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1546,14 +1528,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end */
|
||||
|
||||
try {
|
||||
@@ -1077,7 +1079,7 @@ index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872
|
||||
} catch (Throwable throwable) {
|
||||
// Spigot Start
|
||||
CrashReport crashreport;
|
||||
@@ -1581,21 +1561,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1573,21 +1553,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
this.isIteratingOverLevels = false; // Paper
|
||||
|
||||
@@ -1096,41 +1098,51 @@ index 3328eb0715dab1786a677029bf6356d9118059b9..d6f41a95d1fe6891cbfdb6e3c7fc7872
|
||||
((Runnable) this.tickables.get(i)).run();
|
||||
}
|
||||
- MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
||||
|
||||
iterator = this.playerList.getPlayers().iterator();
|
||||
|
||||
@@ -1597,7 +1571,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.chunkSender.sendNextChunks(entityplayer);
|
||||
entityplayer.connection.resumeFlushing();
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
private void synchronizeTime(ServerLevel world) {
|
||||
@@ -2660,7 +2634,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2663,8 +2636,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return;
|
||||
}
|
||||
|
||||
- co.aikar.timings.MinecraftTimings.midTickChunkTasks.startTiming();
|
||||
try {
|
||||
- try {
|
||||
for (;;) {
|
||||
boolean moreTasks = this.tickMidTickTasks();
|
||||
@@ -2687,7 +2660,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long currTime = System.nanoTime();
|
||||
@@ -2689,9 +2660,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
- } finally {
|
||||
- co.aikar.timings.MinecraftTimings.midTickChunkTasks.stopTiming();
|
||||
+ // Dreeam - should remove this ?
|
||||
}
|
||||
- }
|
||||
}
|
||||
// Paper end - execute chunk tasks mid tick
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
index e49e1f2afdade4dc16aa5239d60c0dcfc39cfeff..eb76473c24e150bc5b010f052a133f610ec2ee48 100644
|
||||
index 0d1d4d2b1ed46a9f4ee383112ea20ac68295f026..662ad3887cc4a6fe3084ba63895e3f0c6bd73c44 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
@@ -83,7 +83,7 @@ public class ServerFunctionManager {
|
||||
@@ -91,7 +91,7 @@ public class ServerFunctionManager {
|
||||
} else {
|
||||
int i;
|
||||
|
||||
- try (co.aikar.timings.Timing timing = function.getTiming().startTiming()) { // Paper
|
||||
+ try {
|
||||
this.context = new ServerFunctionManager.ExecutionContext(tracer);
|
||||
i = this.context.runTopCommand(function, source);
|
||||
i = this.context.runTopCommand(customfunction1, source);
|
||||
} finally {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 505386640a12219dd19e27e58691701b74b55a28..a572776603817fa4745b188651e3af61a9f4345e 100644
|
||||
index 7b703cd286b3819eb67b6ee95605d95ef9c44af4..2d9bf21bc0e947d221ab237da24d730560591a10 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -57,7 +57,6 @@ import org.apache.logging.log4j.Level;
|
||||
@@ -1158,7 +1170,7 @@ index 505386640a12219dd19e27e58691701b74b55a28..a572776603817fa4745b188651e3af61
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -814,23 +810,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -819,23 +815,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1183,7 +1195,7 @@ index 505386640a12219dd19e27e58691701b74b55a28..a572776603817fa4745b188651e3af61
|
||||
// Paper start
|
||||
if (waitableArray[0] != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 63bb216b13a7d9af34895005f699e897fe25d7ba..d6c089722bc4b40b9042607c465fe8e7e0a6683f 100644
|
||||
index e7ba192bd8493e273afb36f8c7da374147c337cd..f86a41811e588b3b34a5c7d227ab384d07d62ff7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1,6 +1,5 @@
|
||||
@@ -1193,7 +1205,7 @@ index 63bb216b13a7d9af34895005f699e897fe25d7ba..d6c089722bc4b40b9042607c465fe8e7
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableList.Builder;
|
||||
import com.google.common.collect.Iterables;
|
||||
@@ -640,13 +639,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -466,13 +465,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
protected void tick(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -1207,33 +1219,7 @@ index 63bb216b13a7d9af34895005f699e897fe25d7ba..d6c089722bc4b40b9042607c465fe8e7
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1266,25 +1261,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
// Paper start - optimised tracker
|
||||
private final void processTrackQueue() {
|
||||
- this.level.timings.tracker1.startTiming();
|
||||
- try {
|
||||
for (TrackedEntity tracker : this.entityMap.values()) {
|
||||
// update tracker entry
|
||||
tracker.updatePlayers(tracker.entity.getPlayersInTrackRange());
|
||||
}
|
||||
- } finally {
|
||||
- this.level.timings.tracker1.stopTiming();
|
||||
- }
|
||||
-
|
||||
|
||||
- this.level.timings.tracker2.startTiming();
|
||||
- try {
|
||||
for (TrackedEntity tracker : this.entityMap.values()) {
|
||||
tracker.serverEntity.sendChanges();
|
||||
}
|
||||
- } finally {
|
||||
- this.level.timings.tracker2.stopTiming();
|
||||
- }
|
||||
}
|
||||
// Paper end - optimised tracker
|
||||
|
||||
@@ -1298,7 +1282,6 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1084,7 +1079,6 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
List<ServerPlayer> list = Lists.newArrayList();
|
||||
List<ServerPlayer> list1 = this.level.players();
|
||||
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
||||
@@ -1241,7 +1227,7 @@ index 63bb216b13a7d9af34895005f699e897fe25d7ba..d6c089722bc4b40b9042607c465fe8e7
|
||||
|
||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
||||
|
||||
@@ -1323,17 +1306,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1109,17 +1103,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
||||
}
|
||||
}
|
||||
@@ -1260,10 +1246,10 @@ index 63bb216b13a7d9af34895005f699e897fe25d7ba..d6c089722bc4b40b9042607c465fe8e7
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index cb7f88e37b6bd3a0a78f80ef6062e65818ab180c..30b243ca777a5b362b50dd4ad1ea22545c038162 100644
|
||||
index f5584de85ca4b95be9b107df562ebf3963ad1b5a..acaa1575a2d7164174d9514d750696d7f844f065 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -294,10 +294,8 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -293,10 +293,8 @@ public class ServerChunkCache extends ChunkSource {
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system
|
||||
// Paper end
|
||||
com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x1, z1); // Paper - sync load info
|
||||
@@ -1274,7 +1260,7 @@ index cb7f88e37b6bd3a0a78f80ef6062e65818ab180c..30b243ca777a5b362b50dd4ad1ea2254
|
||||
} // Paper
|
||||
ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
return ichunkaccess1;
|
||||
@@ -446,17 +444,13 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -445,17 +443,13 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
public void save(boolean flush) {
|
||||
this.runDistanceManagerUpdates();
|
||||
@@ -1292,7 +1278,7 @@ index cb7f88e37b6bd3a0a78f80ef6062e65818ab180c..30b243ca777a5b362b50dd4ad1ea2254
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -482,20 +476,14 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -481,20 +475,14 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
@Override
|
||||
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
|
||||
@@ -1313,33 +1299,33 @@ index cb7f88e37b6bd3a0a78f80ef6062e65818ab180c..30b243ca777a5b362b50dd4ad1ea2254
|
||||
this.clearCache();
|
||||
}
|
||||
|
||||
@@ -552,7 +540,6 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -520,7 +508,6 @@ public class ServerChunkCache extends ChunkSource {
|
||||
boolean flag2AndHasNaturalSpawn = flag2 && this.anySpawnCategoryIsSpawnedThisTick();
|
||||
if (flag2AndHasNaturalSpawn) {
|
||||
// Gale end - MultiPaper - skip unnecessary mob spawning computations
|
||||
- this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
||||
// Paper start - per player mob spawning
|
||||
if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't count mobs when animals and monsters are disabled
|
||||
@@ -582,7 +569,6 @@ public class ServerChunkCache extends ChunkSource {
|
||||
if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled
|
||||
@@ -550,7 +537,6 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// Pufferfish end
|
||||
}
|
||||
// Paper end
|
||||
- this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
|
||||
//this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
|
||||
// Gale start - MultiPaper - skip unnecessary mob spawning computations
|
||||
@@ -590,9 +576,6 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// Paper - optimise chunk tick iteration
|
||||
@@ -560,9 +546,6 @@ public class ServerChunkCache extends ChunkSource {
|
||||
spawnercreature_d = null;
|
||||
}
|
||||
// Gale end - MultiPaper - skip unnecessary mob spawning computations
|
||||
- // Paper - moved down
|
||||
- this.level.timings.chunkTicks.startTiming(); // Paper
|
||||
-
|
||||
// Paper - moved down
|
||||
- // Paper - optimise chunk tick iteration
|
||||
|
||||
// Paper - only shuffle if per-player mob spawning is disabled
|
||||
@@ -643,14 +626,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// Paper start - optimise chunk tick iteration
|
||||
ChunkMap playerChunkMap = this.chunkMap;
|
||||
@@ -663,15 +646,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
}
|
||||
// Paper end - optimise chunk tick iteration
|
||||
@@ -1349,21 +1335,22 @@ index cb7f88e37b6bd3a0a78f80ef6062e65818ab180c..30b243ca777a5b362b50dd4ad1ea2254
|
||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||
- } // Paper - timings
|
||||
}
|
||||
// Paper start - use set of chunks requiring updates, rather than iterating every single one loaded
|
||||
- this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing
|
||||
|
||||
- // Paper - optimise chunk tick iteration
|
||||
- this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing
|
||||
// Paper start - optimise chunk tick iteration
|
||||
if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) {
|
||||
ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
|
||||
this.chunkMap.needsChangeBroadcasting.clear();
|
||||
@@ -662,7 +641,6 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
|
||||
@@ -685,7 +663,6 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
}
|
||||
- this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
|
||||
// Paper end - use set of chunks requiring updates, rather than iterating every single one loaded
|
||||
// Paper start - controlled flush for entity tracker packets
|
||||
List<net.minecraft.network.Connection> disabledFlushes = new java.util.ArrayList<>(this.level.players.size());
|
||||
// Paper end - optimise chunk tick iteration
|
||||
- this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
|
||||
// Paper - optimise chunk tick iteration
|
||||
this.chunkMap.tick();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47ce6905439 100644
|
||||
index a3ab2f88c0fdfab8e03911df6d6f4b2cdd30542b..260a69194c92257a917b17fcb13045c8541270a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,7 +1,6 @@
|
||||
@@ -1374,7 +1361,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
@@ -824,23 +823,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -852,23 +851,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.updateSkyBrightness();
|
||||
this.tickTime();
|
||||
@@ -1398,7 +1385,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
this.handlingTick = false;
|
||||
boolean flag = true || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
|
||||
|
||||
@@ -849,13 +840,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -877,13 +868,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
if (flag || this.emptyTime++ < 300) {
|
||||
@@ -1412,7 +1399,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
this.entityTickList.forEach((entity) -> {
|
||||
entity.activatedPriorityReset = false; // Pufferfish - DAB
|
||||
if (!entity.isRemoved()) {
|
||||
@@ -892,8 +881,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -920,8 +909,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1421,23 +1408,24 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
this.tickBlockEntities();
|
||||
}
|
||||
|
||||
@@ -1067,7 +1054,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
@@ -1054,7 +1041,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
} // Paper
|
||||
|
||||
// Paper start - optimise random block ticking
|
||||
- timings.chunkTicksBlocks.startTiming(); // Paper
|
||||
if (randomTickSpeed > 0) {
|
||||
LevelChunkSection[] sections = chunk.getSections();
|
||||
int minSection = io.papermc.paper.util.WorldUtil.getMinSection(this);
|
||||
@@ -1101,7 +1087,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
final int minSection = io.papermc.paper.util.WorldUtil.getMinSection(this);
|
||||
@@ -1086,8 +1072,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
// Paper end - optimise random block ticking
|
||||
-
|
||||
- timings.chunkTicksBlocks.stopTiming(); // Paper
|
||||
}
|
||||
|
||||
public Optional<BlockPos> findLightningRod(BlockPos pos) {
|
||||
@@ -1380,31 +1365,21 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
private void tickIceAndSnow(boolean raining, BlockPos.MutableBlockPos blockposition1, final LevelChunk chunk) { // Paper - optimise chunk ticking
|
||||
@@ -1411,31 +1395,21 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
currentlyTickingEntity.lazySet(entity);
|
||||
}
|
||||
// Paper end - log detailed entity tick information
|
||||
@@ -1469,7 +1457,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
Iterator iterator = entity.getPassengers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1412,7 +1387,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1443,7 +1417,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.tickPassenger(entity, entity1);
|
||||
}
|
||||
@@ -1477,7 +1465,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
// Paper start - log detailed entity tick information
|
||||
} finally {
|
||||
if (currentlyTickingEntity.get() == entity) {
|
||||
@@ -1427,9 +1401,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1458,9 +1431,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
|
||||
// Paper - EAR 2
|
||||
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger);
|
||||
@@ -1487,7 +1475,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
passenger.setOldPosAndRot();
|
||||
++passenger.tickCount;
|
||||
// Paper start - EAR 2
|
||||
@@ -1450,8 +1421,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1481,8 +1451,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.tickPassenger(passenger, entity2);
|
||||
}
|
||||
@@ -1496,7 +1484,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
}
|
||||
} else {
|
||||
passenger.stopRiding();
|
||||
@@ -1471,14 +1440,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1502,14 +1470,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld()));
|
||||
}
|
||||
|
||||
@@ -1511,7 +1499,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
|
||||
// Copied from save()
|
||||
// CraftBukkit start - moved from MinecraftServer.saveChunks
|
||||
@@ -1490,7 +1456,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1521,7 +1486,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData());
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1519,7 +1507,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -1504,7 +1469,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1535,7 +1499,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
if (!savingDisabled) {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
|
||||
@@ -1527,7 +1515,7 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
if (progressListener != null) {
|
||||
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||
}
|
||||
@@ -1514,11 +1478,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1545,11 +1508,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
||||
}
|
||||
|
||||
@@ -1540,10 +1528,10 @@ index b77a84a5ab85839e37aee24da0f4356be3f478e2..be7c1ecd78a169d2dc9f642fcddbf47c
|
||||
|
||||
} else if (close) { chunkproviderserver.close(false); } // Paper - rewrite chunk system
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 52fd7d53a26c37cc7ad768f0d35cd82667a4dba1..89d40b2e1fbd0f0de03b90922c71e33db9efd3ae 100644
|
||||
index c82a310bd69abf30b39e4b96d1ef2b43283ecdbe..ef84bdb881160bbe7b2ceb97f0ea9f35d50f96f1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2652,7 +2652,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2480,7 +2480,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
public void handleCommand(String s) { // Paper - private -> public
|
||||
org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher
|
||||
@@ -1551,7 +1539,7 @@ index 52fd7d53a26c37cc7ad768f0d35cd82667a4dba1..89d40b2e1fbd0f0de03b90922c71e33d
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
@@ -2662,7 +2661,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2490,7 +2489,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -1559,7 +1547,7 @@ index 52fd7d53a26c37cc7ad768f0d35cd82667a4dba1..89d40b2e1fbd0f0de03b90922c71e33d
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2674,8 +2672,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2502,8 +2500,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
player.sendMessage(org.bukkit.ChatColor.RED + "An internal error occurred while attempting to perform this command");
|
||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
@@ -1569,7 +1557,7 @@ index 52fd7d53a26c37cc7ad768f0d35cd82667a4dba1..89d40b2e1fbd0f0de03b90922c71e33d
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 3f60073c5ced65abf67f6fe175f9032c7bf49cfa..e3d1e030063a8746dbdaea14c6de7d900bc1ad0f 100644
|
||||
index b1a327b0208a30bc44e97dfd5c5e38014aafc197..20c061849cbb424fee66a47d9339cfd8a1920660 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1,6 +1,5 @@
|
||||
@@ -1579,7 +1567,7 @@ index 3f60073c5ced65abf67f6fe175f9032c7bf49cfa..e3d1e030063a8746dbdaea14c6de7d90
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1321,7 +1320,6 @@ public abstract class PlayerList {
|
||||
@@ -1313,7 +1312,6 @@ public abstract class PlayerList {
|
||||
|
||||
public void saveAll(int interval) {
|
||||
io.papermc.paper.util.MCUtil.ensureMain("Save Players" , () -> { // Paper - Ensure main
|
||||
@@ -1587,7 +1575,7 @@ index 3f60073c5ced65abf67f6fe175f9032c7bf49cfa..e3d1e030063a8746dbdaea14c6de7d90
|
||||
int numSaved = 0;
|
||||
long now = MinecraftServer.currentTick;
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
@@ -1332,7 +1330,6 @@ public abstract class PlayerList {
|
||||
@@ -1324,7 +1322,6 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
@@ -1596,10 +1584,10 @@ index 3f60073c5ced65abf67f6fe175f9032c7bf49cfa..e3d1e030063a8746dbdaea14c6de7d90
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index a8ffa403ac48041e17aa4ce057be0539e5468fd4..f4640a8a6c3ac5055c6017d61b037d43f205e6fa 100644
|
||||
index 5930e45bae5aa86b3cedb811c4c9bb92099bc1b5..540bafec1e973e7461c6c09228d801d4303b0e56 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -335,15 +335,6 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -336,15 +336,6 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
}
|
||||
|
||||
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, FeatureFlagSet requiredFeatures) {
|
||||
@@ -1615,7 +1603,7 @@ index a8ffa403ac48041e17aa4ce057be0539e5468fd4..f4640a8a6c3ac5055c6017d61b037d43
|
||||
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
|
||||
this.factory = factory;
|
||||
this.category = spawnGroup;
|
||||
@@ -713,12 +704,6 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -714,12 +705,6 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
return this.updateInterval;
|
||||
}
|
||||
|
||||
@@ -1628,7 +1616,7 @@ index a8ffa403ac48041e17aa4ce057be0539e5468fd4..f4640a8a6c3ac5055c6017d61b037d43
|
||||
public boolean trackDeltas() {
|
||||
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
||||
}
|
||||
@@ -824,7 +809,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -829,7 +814,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
Util.fetchChoiceType(References.ENTITY_TREE, id);
|
||||
}
|
||||
|
||||
@@ -1735,7 +1723,7 @@ index fcdb9bde8e1605e30dde3e580491522d4b62cdc0..4de18d00cc464313b777874430da3f55
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 405fb93496113836b0d8328d631fdd07d6b14be7..78f2bea7ae34be7a2152d7c31e90a524eac1ddfe 100644
|
||||
index 5e233fc3c9cf7d2dfc9de02d7543dce52570c355..ed2bfe717406741583b9c261c6ba18cd4a47f67b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -176,7 +176,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1746,7 +1734,7 @@ index 405fb93496113836b0d8328d631fdd07d6b14be7..78f2bea7ae34be7a2152d7c31e90a524
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
@@ -418,7 +417,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -355,7 +354,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
|
||||
});
|
||||
// CraftBukkit end
|
||||
@@ -1754,7 +1742,7 @@ index 405fb93496113836b0d8328d631fdd07d6b14be7..78f2bea7ae34be7a2152d7c31e90a524
|
||||
this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
@@ -1011,15 +1009,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1316,15 +1314,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
protected void tickBlockEntities() {
|
||||
@@ -1770,7 +1758,7 @@ index 405fb93496113836b0d8328d631fdd07d6b14be7..78f2bea7ae34be7a2152d7c31e90a524
|
||||
// Spigot start
|
||||
// Iterator iterator = this.blockEntityTickers.iterator();
|
||||
int tilesThisCycle = 0;
|
||||
@@ -1052,9 +1047,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1357,9 +1352,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
this.blockEntityTickers.removeAll(toRemove);
|
||||
|
||||
@@ -1781,7 +1769,7 @@ index 405fb93496113836b0d8328d631fdd07d6b14be7..78f2bea7ae34be7a2152d7c31e90a524
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index cc41a921d3d3b07267317ac75f7aba33c39562a4..8126bd60d5075e344df77add0a38f73c53b3bdd1 100644
|
||||
index 530c5e3500bd735bbd41d6c973d7470c43aed404..ec6afe51fd204e4c0764850dcc4535f7f8c159ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -132,7 +132,6 @@ public final class NaturalSpawner {
|
||||
@@ -1792,7 +1780,7 @@ index cc41a921d3d3b07267317ac75f7aba33c39562a4..8126bd60d5075e344df77add0a38f73c
|
||||
MobCategory[] aenumcreaturetype = NaturalSpawner.SPAWNING_CATEGORIES;
|
||||
int i = aenumcreaturetype.length;
|
||||
|
||||
@@ -186,8 +185,6 @@ public final class NaturalSpawner {
|
||||
@@ -184,8 +183,6 @@ public final class NaturalSpawner {
|
||||
// Paper end
|
||||
}
|
||||
}
|
||||
@@ -1802,10 +1790,10 @@ index cc41a921d3d3b07267317ac75f7aba33c39562a4..8126bd60d5075e344df77add0a38f73c
|
||||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 15868cef6d7037a9c914244bc975fef238c6ff30..8e85c86685fba43d318c7ec6efa92564dd1e55c7 100644
|
||||
index bcc15bae4d737f54781779d46635c0d498ac81be..50258f03dd8d310bae707afad9d0df5ead28ab99 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -115,13 +115,6 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -112,13 +112,6 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
this != Blocks.STRUCTURE_BLOCK &&
|
||||
this != Blocks.JIGSAW;
|
||||
}
|
||||
@@ -1839,10 +1827,10 @@ index 3431f1a00ae2918b91a6b7a449e613e6e12ff6d4..cad0931ebd4b0ee8fab4fbbf111bb3cf
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
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 6530e172527ad4c42a65f03ce8d4847facf43b38..b0016f7ccc6225257f2bc893ffb1565c6c2da2f1 100644
|
||||
index 648481ad582e855e348dee28fa1cdd752ff6761b..f7958733a2321b34fbcb660e9c29fc14869e4a70 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -888,7 +888,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -797,7 +797,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
this.chunkHolder.getEntityChunk().callEntitiesLoadEvent(); // Paper - rewrite chunk system
|
||||
|
||||
if (this.needsDecoration) {
|
||||
@@ -1850,7 +1838,7 @@ index 6530e172527ad4c42a65f03ce8d4847facf43b38..b0016f7ccc6225257f2bc893ffb1565c
|
||||
this.needsDecoration = false;
|
||||
java.util.Random random = new java.util.Random();
|
||||
random.setSeed(this.level.getSeed());
|
||||
@@ -908,7 +907,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -817,7 +816,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
}
|
||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
||||
@@ -1858,7 +1846,7 @@ index 6530e172527ad4c42a65f03ce8d4847facf43b38..b0016f7ccc6225257f2bc893ffb1565c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1263,7 +1261,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1172,7 +1170,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
if (LevelChunk.this.isTicking(blockposition)) {
|
||||
try {
|
||||
@@ -1866,7 +1854,7 @@ index 6530e172527ad4c42a65f03ce8d4847facf43b38..b0016f7ccc6225257f2bc893ffb1565c
|
||||
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
||||
|
||||
if (this.blockEntity.getType().isValid(iblockdata)) {
|
||||
@@ -1281,10 +1278,6 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1190,14 +1187,9 @@ public class LevelChunk extends ChunkAccess {
|
||||
net.minecraft.world.level.chunk.LevelChunk.this.level.getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new ServerInternalException(msg, throwable)));
|
||||
LevelChunk.this.removeBlockEntity(this.getPos());
|
||||
// Paper end
|
||||
@@ -1877,11 +1865,15 @@ index 6530e172527ad4c42a65f03ce8d4847facf43b38..b0016f7ccc6225257f2bc893ffb1565c
|
||||
}
|
||||
}
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index dfedd645cb6a521d6871f09a61371b0342a7e761..62e4e6e840dd1d5dcbab14d2f5708839a08a8d4d 100644
|
||||
index 47794e6f0fed60b361bb330dff411af0e93becdf..0a27a839d33c95d89aa352f374aa1877fb99acca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -473,7 +473,6 @@ public final class CraftServer implements Server {
|
||||
@@ -475,7 +475,6 @@ public final class CraftServer implements Server {
|
||||
this.saveCommandsConfig();
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
@@ -1890,10 +1882,10 @@ index dfedd645cb6a521d6871f09a61371b0342a7e761..62e4e6e840dd1d5dcbab14d2f5708839
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index a0c9fb55dfe29e62550ea80c8556aeb08d0c4f3b..ad58286ff6c82acdb611d94570eb3c54bb4058b1 100644
|
||||
index 05f6d24ff60809e270e3c2300e2f2aa38176ae41..6d6e5ff97cb6a0cd1897c7c32341f67364f5693d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -377,8 +377,6 @@ public class Main {
|
||||
@@ -371,8 +371,6 @@ public class Main {
|
||||
tryPreloadClass("org.jline.terminal.impl.MouseSupport");
|
||||
tryPreloadClass("org.jline.terminal.impl.MouseSupport$1");
|
||||
tryPreloadClass("org.jline.terminal.Terminal$MouseTracking");
|
||||
@@ -2022,10 +2014,10 @@ index 3f45bab0e9f7b3697e6d9d1092a1e6e579f7066f..dc785cb249e0d6c556e404bc77fb8c5e
|
||||
|
||||
long getCreatedAt() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||
index 500f2eb0df5a07637cd278c263e95592b0037eb6..2309645342a527f6b3cd28ad15c7409a7fc5e232 100644
|
||||
index 7a2f46579352870cfbb32c343d7c68919758ffe3..16676b8be6ad1614ee261edd6bf4c0f91ff9801c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||
@@ -113,18 +113,10 @@ public final class CraftScoreboardManager implements ScoreboardManager {
|
||||
@@ -113,18 +113,12 @@ public final class CraftScoreboardManager implements ScoreboardManager {
|
||||
|
||||
// CraftBukkit method
|
||||
public void getScoreboardScores(ObjectiveCriteria criteria, String name, Consumer<Score> consumer) {
|
||||
@@ -2033,7 +2025,7 @@ index 500f2eb0df5a07637cd278c263e95592b0037eb6..2309645342a527f6b3cd28ad15c7409a
|
||||
// plugins leaking scoreboards will make this very expensive, let server owners debug it easily
|
||||
- co.aikar.timings.MinecraftTimings.scoreboardScoreSearch.startTimingIfSync();
|
||||
- try {
|
||||
- // Paper end - add timings for scoreboard search
|
||||
// Paper end - add timings for scoreboard search
|
||||
for (CraftScoreboard scoreboard : this.scoreboards) {
|
||||
Scoreboard board = scoreboard.board;
|
||||
board.forAllObjectives(criteria, name, (score) -> consumer.accept(score));
|
||||
@@ -2041,14 +2033,14 @@ index 500f2eb0df5a07637cd278c263e95592b0037eb6..2309645342a527f6b3cd28ad15c7409a
|
||||
- } finally { // Paper start - add timings for scoreboard search
|
||||
- co.aikar.timings.MinecraftTimings.scoreboardScoreSearch.stopTimingIfSync();
|
||||
- }
|
||||
- // Paper end - add timings for scoreboard search
|
||||
// Paper end - add timings for scoreboard search
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 4cb83b8ae5f1e1769d620d92b700986014456963..25f95d97e71fd534df0343ecf7f28abf30447c1b 100644
|
||||
index 7f4e0a4bff74bcb56f455f3ea76bb1d96d71e1ad..e0d631c2e692fa61e252a418a5eebf78aa79617d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -224,12 +224,6 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -206,12 +206,6 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
}
|
||||
// Paper end
|
||||
// ========================================================================
|
||||
@@ -2061,7 +2053,7 @@ index 4cb83b8ae5f1e1769d620d92b700986014456963..25f95d97e71fd534df0343ecf7f28abf
|
||||
|
||||
public static byte toLegacyData(BlockState data) {
|
||||
return CraftLegacy.toLegacyData(data);
|
||||
@@ -463,10 +457,6 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -445,10 +439,6 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -2145,10 +2137,10 @@ index 579c2e69d8f6ce8398eb1297d1d1ead98c9068a5..00000000000000000000000000000000
|
||||
-}
|
||||
diff --git a/src/main/java/org/galemc/gale/configuration/timingsexport/VanillaServerPropertiesTimingsExport.java b/src/main/java/org/galemc/gale/configuration/timingsexport/VanillaServerPropertiesTimingsExport.java
|
||||
deleted file mode 100644
|
||||
index 9d9ee3f38f04cfc4fcab00b8ff5558e75674da11..0000000000000000000000000000000000000000
|
||||
index 139d946346594d2a59a8b2930c4eae794c880dbc..0000000000000000000000000000000000000000
|
||||
--- a/src/main/java/org/galemc/gale/configuration/timingsexport/VanillaServerPropertiesTimingsExport.java
|
||||
+++ /dev/null
|
||||
@@ -1,128 +0,0 @@
|
||||
@@ -1,129 +0,0 @@
|
||||
-// Gale - include server.properties in timings
|
||||
-
|
||||
-package org.galemc.gale.configuration.timingsexport;
|
||||
@@ -2219,6 +2211,7 @@ index 9d9ee3f38f04cfc4fcab00b8ff5558e75674da11..00000000000000000000000000000000
|
||||
-// json.put("level-seed", String.valueOf(properties.levelSeed));
|
||||
-// }
|
||||
- Optional.ofNullable(properties.worldDimensionData).ifPresent(worldDimensionData -> json.put("level-type", String.valueOf(worldDimensionData.levelType())));
|
||||
- json.put("log-ips", String.valueOf(properties.logIPs));
|
||||
- json.put("max-chained-neighbor-updates", String.valueOf(properties.maxChainedNeighborUpdates));
|
||||
- json.put("max-players", String.valueOf(properties.maxPlayers));
|
||||
- json.put("max-tick-time", String.valueOf(properties.maxTickTime));
|
||||
@@ -2278,7 +2271,7 @@ index 9d9ee3f38f04cfc4fcab00b8ff5558e75674da11..00000000000000000000000000000000
|
||||
-
|
||||
-}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index c89a95801439bb0ab570bc33ded3f270451de9f2..9f1d131f1fc9e827beb050f115c4a9b6cc14f876 100644
|
||||
index 4490f1240304ac8c4600ca1182bfa363c2aae69c..1c5a23890b5f0daa96951b0f7d5c4e2d704f2869 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -35,7 +35,6 @@ import net.minecraft.world.entity.projectile.FireworkRocketEntity;
|
||||
@@ -2297,7 +2290,7 @@ index c89a95801439bb0ab570bc33ded3f270451de9f2..9f1d131f1fc9e827beb050f115c4a9b6
|
||||
final int miscActivationRange = world.spigotConfig.miscActivationRange;
|
||||
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
|
||||
final int animalActivationRange = world.spigotConfig.animalActivationRange;
|
||||
@@ -259,7 +257,6 @@ public class ActivationRange
|
||||
@@ -264,7 +262,6 @@ public class ActivationRange
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user