geforkt von Mirrors/Paper
Apply timings
Dieser Commit ist enthalten in:
Ursprung
598a1cb947
Commit
ffccfd5488
@ -700,10 +700,10 @@ index 0000000000000000000000000000000000000000..2f0d9b953802dee821cfde82d22b0567
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||||
index c8134e605e2dd58c2af1cbefc5e20e91b6414d2a..b7ffab0284b0bccd79775b8d03c8b2e088f91d1d 100644
|
index 73e7bb59596600df1b1953175f6da17bee54a65c..e161ad0f53a21a68e8c78575ba5d3cdbdb11fca0 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||||
@@ -29,7 +29,8 @@ public class PacketUtils {
|
@@ -30,7 +30,8 @@ public class PacketUtils {
|
||||||
engine.executeIfPossible(() -> {
|
engine.executeIfPossible(() -> {
|
||||||
if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
|
if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
|
||||||
if (listener.shouldHandleMessage(packet)) {
|
if (listener.shouldHandleMessage(packet)) {
|
||||||
@ -712,12 +712,12 @@ index c8134e605e2dd58c2af1cbefc5e20e91b6414d2a..b7ffab0284b0bccd79775b8d03c8b2e0
|
|||||||
+ try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
|
+ try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
|
||||||
packet.handle(listener);
|
packet.handle(listener);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
label25:
|
if (exception instanceof ReportedException) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcbad156382 100644
|
index e021ac312127e0544606ab466cab781915e027d2..7ae4d4feb5c9281fa62a3f35c39eefdff1b684d8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -186,7 +186,7 @@ import org.bukkit.craftbukkit.Main;
|
@@ -190,7 +190,7 @@ import org.bukkit.craftbukkit.Main;
|
||||||
import org.bukkit.event.server.ServerLoadEvent;
|
import org.bukkit.event.server.ServerLoadEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -726,7 +726,7 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
|
|
||||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
|
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
|
||||||
|
|
||||||
@@ -891,6 +891,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -905,6 +905,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
MinecraftServer.LOGGER.info("Stopping server");
|
MinecraftServer.LOGGER.info("Stopping server");
|
||||||
@ -734,7 +734,7 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this.server != null) {
|
if (this.server != null) {
|
||||||
this.server.disablePlugins();
|
this.server.disablePlugins();
|
||||||
@@ -1138,9 +1139,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1182,9 +1183,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
private boolean haveTime() {
|
private boolean haveTime() {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -756,7 +756,7 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
private void executeModerately() {
|
private void executeModerately() {
|
||||||
this.runAllTasks();
|
this.runAllTasks();
|
||||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||||
@@ -1148,9 +1161,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1192,9 +1205,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void waitUntilNextTick() {
|
protected void waitUntilNextTick() {
|
||||||
@ -768,7 +768,7 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1239,9 +1252,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1295,9 +1308,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||||
@ -787,7 +787,7 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
++this.tickCount;
|
++this.tickCount;
|
||||||
this.tickRateManager.tick();
|
this.tickRateManager.tick();
|
||||||
this.tickChildren(shouldKeepTicking);
|
this.tickChildren(shouldKeepTicking);
|
||||||
@@ -1255,15 +1276,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1311,15 +1332,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
if (this.autosavePeriod > 0 && this.ticksUntilAutosave <= 0) {
|
if (this.autosavePeriod > 0 && this.ticksUntilAutosave <= 0) {
|
||||||
this.ticksUntilAutosave = this.autosavePeriod;
|
this.ticksUntilAutosave = this.autosavePeriod;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -808,8 +808,8 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
this.profiler.push("tallying");
|
this.profiler.push("tallying");
|
||||||
long j = Util.getNanos() - i;
|
long j = Util.getNanos() - i;
|
||||||
int k = this.tickCount % 100;
|
int k = this.tickCount % 100;
|
||||||
@@ -1277,8 +1301,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1331,8 +1355,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.logTickTime(l - i);
|
this.logTickMethodTime(i);
|
||||||
this.profiler.pop();
|
this.profiler.pop();
|
||||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||||
- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
|
- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
|
||||||
@ -817,8 +817,8 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
private int computeNextAutosaveInterval() {
|
private void logTickMethodTime(long tickStartTime) {
|
||||||
@@ -1340,26 +1363,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1403,26 +1426,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
||||||
entityplayer.connection.suspendFlushing();
|
entityplayer.connection.suspendFlushing();
|
||||||
});
|
});
|
||||||
@ -852,7 +852,7 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||||
if (this.tickCount % 20 == 0) {
|
if (this.tickCount % 20 == 0) {
|
||||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||||
@@ -1367,7 +1390,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1430,7 +1453,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.level().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.level().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -861,7 +861,7 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||||
@@ -1406,24 +1429,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1471,24 +1494,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
this.profiler.popPush("connection");
|
this.profiler.popPush("connection");
|
||||||
@ -893,21 +893,23 @@ index 00a1806720e67eb747061e0a6c2ea334dd4453ce..2be50609ccf90d3db6e572377ba63bcb
|
|||||||
this.profiler.popPush("send chunks");
|
this.profiler.popPush("send chunks");
|
||||||
iterator = this.playerList.getPlayers().iterator();
|
iterator = this.playerList.getPlayers().iterator();
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 4917aa64505870a0521bc09ce4d4d3e37c03eaae..65dbd05fa904eb8f0f0ef5d3fc3c1e885771f953 100644
|
index 98cba55466d6798e5de33d8dcbf03e205e5199d8..bbe2fabc9251838f232480a04f0a2cf2b49f2812 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -58,8 +58,9 @@ import org.apache.logging.log4j.Level;
|
@@ -63,10 +63,11 @@ import org.apache.logging.log4j.Level;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.io.IoBuilder;
|
import org.apache.logging.log4j.io.IoBuilder;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||||
|
import org.bukkit.craftbukkit.util.TerminalCompletionHandler;
|
||||||
|
import org.bukkit.craftbukkit.util.TerminalConsoleWriterThread;
|
||||||
import org.bukkit.event.server.ServerCommandEvent;
|
import org.bukkit.event.server.ServerCommandEvent;
|
||||||
+import org.bukkit.craftbukkit.util.Waitable; // Paper
|
+import org.bukkit.craftbukkit.util.Waitable; // Paper
|
||||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -403,7 +404,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -435,7 +436,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleConsoleInputs() {
|
public void handleConsoleInputs() {
|
||||||
@ -916,7 +918,7 @@ index 4917aa64505870a0521bc09ce4d4d3e37c03eaae..65dbd05fa904eb8f0f0ef5d3fc3c1e88
|
|||||||
while (!this.consoleInput.isEmpty()) {
|
while (!this.consoleInput.isEmpty()) {
|
||||||
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
||||||
|
|
||||||
@@ -418,7 +419,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -450,7 +451,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -925,7 +927,7 @@ index 4917aa64505870a0521bc09ce4d4d3e37c03eaae..65dbd05fa904eb8f0f0ef5d3fc3c1e88
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -676,7 +677,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -708,7 +709,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
public String runCommand(RconConsoleSource rconConsoleSource, String s) {
|
public String runCommand(RconConsoleSource rconConsoleSource, String s) {
|
||||||
@ -935,7 +937,7 @@ index 4917aa64505870a0521bc09ce4d4d3e37c03eaae..65dbd05fa904eb8f0f0ef5d3fc3c1e88
|
|||||||
this.executeBlocking(() -> {
|
this.executeBlocking(() -> {
|
||||||
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
|
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
|
||||||
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
|
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
|
||||||
@@ -684,9 +687,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -716,9 +719,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -976,7 +978,7 @@ index 4917aa64505870a0521bc09ce4d4d3e37c03eaae..65dbd05fa904eb8f0f0ef5d3fc3c1e88
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 8908511590adab6025ff02928591aa3cce4e480e..97bb0fc7e890273f2f975f137ec1194a1a83fde7 100644
|
index 3eb7dfd79cdf2824b2155d02d1b4c91bab3c7b33..eaa1584a70ff79e22f7b400fb04ab37786a47467 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -1,8 +1,10 @@
|
@@ -1,8 +1,10 @@
|
||||||
@ -990,23 +992,7 @@ index 8908511590adab6025ff02928591aa3cce4e480e..97bb0fc7e890273f2f975f137ec1194a
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Queues;
|
import com.google.common.collect.Queues;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
@@ -892,6 +894,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1482,6 +1484,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
ChunkStatus chunkstatus = ChunkLevel.generationStatus(chunkHolder.getTicketLevel());
|
|
||||||
|
|
||||||
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
|
|
||||||
+ try (Timing ignored = level.timings.chunkPostLoad.startTimingIfSync()) { // Paper
|
|
||||||
ChunkPos chunkcoordintpair = chunkHolder.getPos();
|
|
||||||
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
|
|
||||||
LevelChunk chunk;
|
|
||||||
@@ -916,6 +919,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
||||||
}
|
|
||||||
|
|
||||||
return chunk;
|
|
||||||
+ } // Paper
|
|
||||||
});
|
|
||||||
}, (runnable) -> {
|
|
||||||
ProcessorHandle mailbox = this.mainThreadMailbox;
|
|
||||||
@@ -1467,6 +1471,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
||||||
List<ServerPlayer> list = Lists.newArrayList();
|
List<ServerPlayer> list = Lists.newArrayList();
|
||||||
List<ServerPlayer> list1 = this.level.players();
|
List<ServerPlayer> list1 = this.level.players();
|
||||||
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
||||||
@ -1014,7 +1000,7 @@ index 8908511590adab6025ff02928591aa3cce4e480e..97bb0fc7e890273f2f975f137ec1194a
|
|||||||
|
|
||||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
||||||
|
|
||||||
@@ -1491,14 +1496,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1506,14 +1509,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1033,15 +1019,15 @@ index 8908511590adab6025ff02928591aa3cce4e480e..97bb0fc7e890273f2f975f137ec1194a
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0382561d4 100644
|
index 23c39b78486b018e222af489c8edbf4e749abff6..3f60a3289ec58d5eb3c0c5634ca62ef2fa287ce7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -271,13 +271,15 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -268,13 +268,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
|
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
|
||||||
- this.level.timings.syncChunkLoadTimer.startTiming(); // Spigot
|
- this.level.timings.syncChunkLoadTimer.startTiming(); // Spigot
|
||||||
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create);
|
CompletableFuture<ChunkResult<ChunkAccess>> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create);
|
||||||
ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
|
ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
|
||||||
|
|
||||||
Objects.requireNonNull(completablefuture);
|
Objects.requireNonNull(completablefuture);
|
||||||
@ -1051,10 +1037,10 @@ index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0
|
|||||||
- this.level.timings.syncChunkLoadTimer.stopTiming(); // Spigot
|
- this.level.timings.syncChunkLoadTimer.stopTiming(); // Spigot
|
||||||
+ this.level.timings.syncChunkLoad.stopTiming(); // Paper
|
+ this.level.timings.syncChunkLoad.stopTiming(); // Paper
|
||||||
+ } // Paper
|
+ } // Paper
|
||||||
ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
|
||||||
return ichunkaccess1;
|
ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
|
||||||
}, (playerchunk_failure) -> {
|
|
||||||
@@ -476,7 +478,9 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -463,7 +465,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
public void save(boolean flush) {
|
public void save(boolean flush) {
|
||||||
this.runDistanceManagerUpdates();
|
this.runDistanceManagerUpdates();
|
||||||
@ -1064,7 +1050,7 @@ index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -515,10 +519,10 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -505,10 +509,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
||||||
this.level.getProfiler().popPush("chunks");
|
this.level.getProfiler().popPush("chunks");
|
||||||
if (tickChunks) {
|
if (tickChunks) {
|
||||||
@ -1077,7 +1063,7 @@ index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
||||||
@@ -541,6 +545,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -531,6 +535,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
gameprofilerfiller.push("filteringLoadedChunks");
|
gameprofilerfiller.push("filteringLoadedChunks");
|
||||||
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
|
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
|
||||||
Iterator iterator = this.chunkMap.getChunks().iterator();
|
Iterator iterator = this.chunkMap.getChunks().iterator();
|
||||||
@ -1085,9 +1071,9 @@ index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0
|
|||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
||||||
@@ -553,8 +558,10 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -543,8 +548,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
if (this.level.getServer().tickRateManager().runsNormally()) {
|
if (this.level.tickRateManager().runsNormally()) {
|
||||||
gameprofilerfiller.popPush("naturalSpawnCount");
|
gameprofilerfiller.popPush("naturalSpawnCount");
|
||||||
+ this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
+ this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||||
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
||||||
@ -1096,7 +1082,7 @@ index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0
|
|||||||
|
|
||||||
this.lastSpawnState = spawnercreature_d;
|
this.lastSpawnState = spawnercreature_d;
|
||||||
gameprofilerfiller.popPush("spawnAndTick");
|
gameprofilerfiller.popPush("spawnAndTick");
|
||||||
@@ -577,22 +584,25 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -567,22 +574,25 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
||||||
@ -1125,7 +1111,7 @@ index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0
|
|||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b04611c95 100644
|
index 2567f0d6060c29c75ba8d4331ec51ad0f3a51883..bbc55b349c338d07646e1449804170799bfa434b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1,6 +1,8 @@
|
@@ -1,6 +1,8 @@
|
||||||
@ -1137,15 +1123,15 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.mojang.datafixers.DataFixer;
|
import com.mojang.datafixers.DataFixer;
|
||||||
import com.mojang.datafixers.util.Pair;
|
import com.mojang.datafixers.util.Pair;
|
||||||
@@ -167,7 +169,6 @@ import org.slf4j.Logger;
|
@@ -172,7 +174,6 @@ import net.minecraft.world.ticks.LevelTicks;
|
||||||
|
import org.slf4j.Logger;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.WeatherType;
|
import org.bukkit.WeatherType;
|
||||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||||
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
||||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
import org.bukkit.craftbukkit.util.WorldUUID;
|
||||||
@@ -471,7 +472,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -477,7 +478,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.popPush("tickPending");
|
gameprofilerfiller.popPush("tickPending");
|
||||||
@ -1154,7 +1140,7 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
if (!this.isDebug() && flag) {
|
if (!this.isDebug() && flag) {
|
||||||
j = this.getGameTime();
|
j = this.getGameTime();
|
||||||
gameprofilerfiller.push("blockTicks");
|
gameprofilerfiller.push("blockTicks");
|
||||||
@@ -480,15 +481,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -486,15 +487,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
}
|
}
|
||||||
@ -1175,7 +1161,7 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
gameprofilerfiller.popPush("blockEvents");
|
gameprofilerfiller.popPush("blockEvents");
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.timings.doSounds.startTiming(); // Spigot
|
this.timings.doSounds.startTiming(); // Spigot
|
||||||
@@ -641,6 +646,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -647,6 +652,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.popPush("tickBlocks");
|
gameprofilerfiller.popPush("tickBlocks");
|
||||||
@ -1183,7 +1169,7 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
if (randomTickSpeed > 0) {
|
if (randomTickSpeed > 0) {
|
||||||
LevelChunkSection[] achunksection = chunk.getSections();
|
LevelChunkSection[] achunksection = chunk.getSections();
|
||||||
|
|
||||||
@@ -673,6 +679,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -679,6 +685,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1191,7 +1177,7 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -949,14 +956,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -955,14 +962,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tickNonPassenger(Entity entity) {
|
public void tickNonPassenger(Entity entity) {
|
||||||
@ -1215,7 +1201,7 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
entity.setOldPosAndRot();
|
entity.setOldPosAndRot();
|
||||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||||
|
|
||||||
@@ -975,7 +990,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -981,7 +996,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
this.tickPassenger(entity, entity1);
|
this.tickPassenger(entity, entity1);
|
||||||
}
|
}
|
||||||
@ -1224,7 +1210,7 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1017,6 +1032,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1023,6 +1038,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
if (!savingDisabled) {
|
if (!savingDisabled) {
|
||||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
|
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
|
||||||
@ -1232,7 +1218,7 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
if (progressListener != null) {
|
if (progressListener != null) {
|
||||||
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||||
}
|
}
|
||||||
@@ -1026,7 +1042,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1032,7 +1048,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1244,10 +1230,10 @@ index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b
|
|||||||
this.entityManager.saveAll();
|
this.entityManager.saveAll();
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index c51e38bb683d239d6116075b5a613b5ef709056a..0b09b4adefdaba43949b1a83dc8f89af147924e9 100644
|
index ad965076a31b947afc65fdf3a03972f407235e92..4a37313ea0f2253f377ea5d0d2c2d7b66c599ffe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -322,7 +322,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -336,7 +336,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
@ -1255,7 +1241,7 @@ index c51e38bb683d239d6116075b5a613b5ef709056a..0b09b4adefdaba43949b1a83dc8f89af
|
|||||||
if (this.ackBlockChangesUpTo > -1) {
|
if (this.ackBlockChangesUpTo > -1) {
|
||||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||||
this.ackBlockChangesUpTo = -1;
|
this.ackBlockChangesUpTo = -1;
|
||||||
@@ -389,7 +388,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -403,7 +402,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
||||||
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
|
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
|
||||||
}
|
}
|
||||||
@ -1263,7 +1249,7 @@ index c51e38bb683d239d6116075b5a613b5ef709056a..0b09b4adefdaba43949b1a83dc8f89af
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2020,7 +2018,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2092,7 +2090,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleCommand(String s) {
|
private void handleCommand(String s) {
|
||||||
@ -1272,7 +1258,7 @@ index c51e38bb683d239d6116075b5a613b5ef709056a..0b09b4adefdaba43949b1a83dc8f89af
|
|||||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||||
|
|
||||||
@@ -2030,7 +2028,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2102,7 +2100,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
this.cserver.getPluginManager().callEvent(event);
|
this.cserver.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
@ -1281,7 +1267,7 @@ index c51e38bb683d239d6116075b5a613b5ef709056a..0b09b4adefdaba43949b1a83dc8f89af
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2043,7 +2041,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2115,7 +2113,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
@ -1291,7 +1277,7 @@ index c51e38bb683d239d6116075b5a613b5ef709056a..0b09b4adefdaba43949b1a83dc8f89af
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 5e00df1cd2b8a6691b2f9490b1f4c3ed4d6a988a..72488b0d499e4e0d0ccba38622cc5a3f88a9e3fa 100644
|
index dbb5b333930ce401d36f7d18880d103c9ef2f98e..e8377a2301e0e6c560a304ecd93dc1f90ee474eb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -1301,7 +1287,7 @@ index 5e00df1cd2b8a6691b2f9490b1f4c3ed4d6a988a..72488b0d499e4e0d0ccba38622cc5a3f
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
@@ -1040,10 +1041,11 @@ public abstract class PlayerList {
|
@@ -1038,10 +1039,11 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveAll() {
|
public void saveAll() {
|
||||||
@ -1315,10 +1301,10 @@ index 5e00df1cd2b8a6691b2f9490b1f4c3ed4d6a988a..72488b0d499e4e0d0ccba38622cc5a3f
|
|||||||
|
|
||||||
public UserWhiteList getWhiteList() {
|
public UserWhiteList getWhiteList() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 17e489c4650ba421a993c863426f1a2084d44fb0..360e322ee298048bd280160a49f000384d930c3a 100644
|
index 9c54bc3897d1fa3c88a5a7d55224eb4cc97f4e79..09ce9511f52f7f8643fedc325c49580eba4e4645 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -135,7 +135,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
@@ -138,7 +138,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||||
import org.bukkit.entity.Hanging;
|
import org.bukkit.entity.Hanging;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Vehicle;
|
import org.bukkit.entity.Vehicle;
|
||||||
@ -1326,7 +1312,7 @@ index 17e489c4650ba421a993c863426f1a2084d44fb0..360e322ee298048bd280160a49f00038
|
|||||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||||
@@ -315,7 +314,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -317,7 +316,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
// Marks an entity, that it was removed by a plugin via Entity#remove
|
// Marks an entity, that it was removed by a plugin via Entity#remove
|
||||||
// Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
|
// Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
|
||||||
public boolean pluginRemoved = false;
|
public boolean pluginRemoved = false;
|
||||||
@ -1334,7 +1320,7 @@ index 17e489c4650ba421a993c863426f1a2084d44fb0..360e322ee298048bd280160a49f00038
|
|||||||
// Spigot start
|
// Spigot start
|
||||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||||
public final boolean defaultActivationState;
|
public final boolean defaultActivationState;
|
||||||
@@ -823,7 +821,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -834,7 +832,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
public void move(MoverType movementType, Vec3 movement) {
|
public void move(MoverType movementType, Vec3 movement) {
|
||||||
@ -1342,7 +1328,7 @@ index 17e489c4650ba421a993c863426f1a2084d44fb0..360e322ee298048bd280160a49f00038
|
|||||||
if (this.noPhysics) {
|
if (this.noPhysics) {
|
||||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||||
} else {
|
} else {
|
||||||
@@ -984,7 +981,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -995,7 +992,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
this.level().getProfiler().pop();
|
this.level().getProfiler().pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1351,17 +1337,17 @@ index 17e489c4650ba421a993c863426f1a2084d44fb0..360e322ee298048bd280160a49f00038
|
|||||||
|
|
||||||
private boolean isStateClimbable(BlockState state) {
|
private boolean isStateClimbable(BlockState state) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
index c4bc491eed487c0a7e30538b0fb46fde91cd7b31..382b55167dede435b034866bd394455f0f6f2a00 100644
|
index 4bdd6529dfc7f51c8e58e93cf140025ed8a4e44f..5e31d2799c299e5c3d4c02871f785179a2422323 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
@@ -327,6 +327,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -339,6 +339,15 @@ 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) {
|
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, FeatureFlagSet requiredFeatures) {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, maxTrackDistance, trackTickInterval, requiredFeatures, "custom");
|
+ this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, spawnBoxScale, maxTrackDistance, trackTickInterval, requiredFeatures, "custom");
|
||||||
+ }
|
+ }
|
||||||
+ 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, String id) {
|
+ public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, FeatureFlagSet requiredFeatures, String id) {
|
||||||
+ this.tickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "tick");
|
+ this.tickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "tick");
|
||||||
+ this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick");
|
+ this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick");
|
||||||
+ this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick");
|
+ this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick");
|
||||||
@ -1370,7 +1356,7 @@ index c4bc491eed487c0a7e30538b0fb46fde91cd7b31..382b55167dede435b034866bd394455f
|
|||||||
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
|
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
|
||||||
this.factory = factory;
|
this.factory = factory;
|
||||||
this.category = spawnGroup;
|
this.category = spawnGroup;
|
||||||
@@ -648,6 +657,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -654,6 +663,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
return this.updateInterval;
|
return this.updateInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1383,20 +1369,20 @@ index c4bc491eed487c0a7e30538b0fb46fde91cd7b31..382b55167dede435b034866bd394455f
|
|||||||
public boolean trackDeltas() {
|
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;
|
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;
|
||||||
}
|
}
|
||||||
@@ -757,7 +772,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -823,7 +838,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
Util.fetchChoiceType(References.ENTITY_TREE, id);
|
Util.fetchChoiceType(References.ENTITY_TREE, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
- return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions, this.clientTrackingRange, this.updateInterval, this.requiredFeatures);
|
- return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions.withAttachments(this.attachments), this.spawnDimensionsScale, this.clientTrackingRange, this.updateInterval, this.requiredFeatures);
|
||||||
+ return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions, this.clientTrackingRange, this.updateInterval, this.requiredFeatures, id); // Paper - add id
|
+ return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions.withAttachments(this.attachments), this.spawnDimensionsScale, this.clientTrackingRange, this.updateInterval, this.requiredFeatures, id); // Paper - add id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad97b4db765 100644
|
index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd036c8f7c2d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -142,7 +142,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
@@ -149,7 +149,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -1405,7 +1391,7 @@ index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad9
|
|||||||
|
|
||||||
public abstract class LivingEntity extends Entity implements Attackable {
|
public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
@@ -2887,7 +2887,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -2945,7 +2945,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
@ -1413,7 +1399,7 @@ index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad9
|
|||||||
super.tick();
|
super.tick();
|
||||||
this.updatingUsingItem();
|
this.updatingUsingItem();
|
||||||
this.updateSwimAmount();
|
this.updateSwimAmount();
|
||||||
@@ -2929,9 +2928,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -2987,9 +2986,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isRemoved()) {
|
if (!this.isRemoved()) {
|
||||||
@ -1423,15 +1409,15 @@ index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad9
|
|||||||
}
|
}
|
||||||
|
|
||||||
double d0 = this.getX() - this.xo;
|
double d0 = this.getX() - this.xo;
|
||||||
@@ -3015,7 +3012,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3080,7 +3077,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
this.refreshDimensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.refreshDirtyAttributes();
|
|
||||||
- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
|
- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
public void detectEquipmentUpdatesPublic() { // CraftBukkit
|
public void detectEquipmentUpdatesPublic() { // CraftBukkit
|
||||||
@@ -3190,7 +3186,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3279,7 +3275,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
this.setDeltaMovement(d0, d1, d2);
|
this.setDeltaMovement(d0, d1, d2);
|
||||||
this.level().getProfiler().push("ai");
|
this.level().getProfiler().push("ai");
|
||||||
@ -1439,7 +1425,7 @@ index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad9
|
|||||||
if (this.isImmobile()) {
|
if (this.isImmobile()) {
|
||||||
this.jumping = false;
|
this.jumping = false;
|
||||||
this.xxa = 0.0F;
|
this.xxa = 0.0F;
|
||||||
@@ -3200,7 +3195,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3289,7 +3284,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.serverAiStep();
|
this.serverAiStep();
|
||||||
this.level().getProfiler().pop();
|
this.level().getProfiler().pop();
|
||||||
}
|
}
|
||||||
@ -1447,7 +1433,7 @@ index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad9
|
|||||||
|
|
||||||
this.level().getProfiler().pop();
|
this.level().getProfiler().pop();
|
||||||
this.level().getProfiler().push("jump");
|
this.level().getProfiler().push("jump");
|
||||||
@@ -3240,7 +3234,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3329,7 +3323,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.resetFallDistance();
|
this.resetFallDistance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1455,7 +1441,7 @@ index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad9
|
|||||||
label104:
|
label104:
|
||||||
{
|
{
|
||||||
LivingEntity entityliving = this.getControllingPassenger();
|
LivingEntity entityliving = this.getControllingPassenger();
|
||||||
@@ -3256,7 +3249,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3343,7 +3336,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
this.travel(vec3d1);
|
this.travel(vec3d1);
|
||||||
}
|
}
|
||||||
@ -1463,7 +1449,7 @@ index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad9
|
|||||||
|
|
||||||
this.level().getProfiler().pop();
|
this.level().getProfiler().pop();
|
||||||
this.level().getProfiler().push("freezing");
|
this.level().getProfiler().push("freezing");
|
||||||
@@ -3283,9 +3275,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3370,9 +3362,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1474,18 +1460,18 @@ index cdac785c54e150c0886046b8d50657c0ca958438..13e8502640abad928282e4b1596f2ad9
|
|||||||
if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
|
if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
|
||||||
this.hurt(this.damageSources().drown(), 1.0F);
|
this.hurt(this.damageSources().drown(), 1.0F);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index bede1a64e4f04aa8e87ddb44f2cc4a1ab46a3b81..d02cc220c8bd59a1289f34fd9fb70a00b0fbc07a 100644
|
index 68715d9fd69addad07384efa10eeb09bc78c1e28..5f881af95bd5ee94daadfd9e5d64ee6d411255c4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -91,7 +91,6 @@ import org.bukkit.Bukkit;
|
@@ -92,7 +92,6 @@ import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePa
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
||||||
import org.bukkit.craftbukkit.block.CraftBlockState;
|
import org.bukkit.craftbukkit.block.CraftBlockState;
|
||||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||||
@@ -166,7 +165,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -163,7 +162,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
}
|
}
|
||||||
// Paper end - add paper world config
|
// Paper end - add paper world config
|
||||||
|
|
||||||
@ -1494,7 +1480,7 @@ index bede1a64e4f04aa8e87ddb44f2cc4a1ab46a3b81..d02cc220c8bd59a1289f34fd9fb70a00
|
|||||||
public static BlockPos lastPhysicsProblem; // Spigot
|
public static BlockPos lastPhysicsProblem; // Spigot
|
||||||
private org.spigotmc.TickLimiter entityLimiter;
|
private org.spigotmc.TickLimiter entityLimiter;
|
||||||
private org.spigotmc.TickLimiter tileLimiter;
|
private org.spigotmc.TickLimiter tileLimiter;
|
||||||
@@ -264,7 +263,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -258,7 +257,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
|
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
|
||||||
});
|
});
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -1503,7 +1489,7 @@ index bede1a64e4f04aa8e87ddb44f2cc4a1ab46a3b81..d02cc220c8bd59a1289f34fd9fb70a00
|
|||||||
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
|
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
|
||||||
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
|
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
|
||||||
}
|
}
|
||||||
@@ -726,15 +725,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -718,15 +717,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
this.timings.tileEntityTick.stopTiming(); // Spigot
|
this.timings.tileEntityTick.stopTiming(); // Spigot
|
||||||
this.tickingBlockEntities = false;
|
this.tickingBlockEntities = false;
|
||||||
@ -1521,7 +1507,7 @@ index bede1a64e4f04aa8e87ddb44f2cc4a1ab46a3b81..d02cc220c8bd59a1289f34fd9fb70a00
|
|||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
|
||||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
|
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
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 74f380afac8a91cd1d2bbd3cd679f0eaee53fdee..756a8ae14ffc46d6ebe0a858a03fb2e89b8e118a 100644
|
index 991ebf07bc0608df0a12f1f26e581cc93255ae01..946001c57c326f2d2f0677bca954e8558f1c851b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
@@ -89,6 +89,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
@@ -89,6 +89,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||||
@ -1541,10 +1527,10 @@ index 74f380afac8a91cd1d2bbd3cd679f0eaee53fdee..756a8ae14ffc46d6ebe0a858a03fb2e8
|
|||||||
private String descriptionId;
|
private String descriptionId;
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
index c02fa35cefc9194d1838abbe4f2dc2b226a41e41..b300d12e9e00519028b53aca9c3fb01f589eaa91 100644
|
index 09ae9c3398e77ee575636a4ebe9e31b447c9fb8e..6eef8da8ead8a044aac757693d719ceea431515e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
@@ -22,10 +22,12 @@ import org.bukkit.inventory.InventoryHolder;
|
@@ -33,10 +33,12 @@ import org.bukkit.inventory.InventoryHolder;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
import org.spigotmc.CustomTimingsHandler; // Spigot
|
import org.spigotmc.CustomTimingsHandler; // Spigot
|
||||||
@ -1559,7 +1545,7 @@ index c02fa35cefc9194d1838abbe4f2dc2b226a41e41..b300d12e9e00519028b53aca9c3fb01f
|
|||||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||||
public CraftPersistentDataContainer persistentDataContainer;
|
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
|
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 409007f6e6940e5ea92e3cbaa74e55cdee50325b..c2179ea2a16ae0fac0b59d81a57abf13f563843f 100644
|
index bb0f16aef406bdc627e1263859dd4637bec90c63..55b24bf21dce3ab00c19a73b3af797ac1fd2ccc7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -698,6 +698,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -698,6 +698,7 @@ public class LevelChunk extends ChunkAccess {
|
||||||
@ -1579,10 +1565,10 @@ index 409007f6e6940e5ea92e3cbaa74e55cdee50325b..c2179ea2a16ae0fac0b59d81a57abf13
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
index fff1a2f2b8b5235c0c56c68264db0a914f6cb15d..ba7a816bd9dd4aec79e2560f0968374dbb28442c 100644
|
index 8199fd0a50e0f7d2e1f2a14ac525bc6bd9feeac4..b0518725a2e145d29bd5bc0aa7e6998a47dcb511 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
@@ -483,13 +483,10 @@ public class ChunkSerializer {
|
@@ -471,13 +471,10 @@ public class ChunkSerializer {
|
||||||
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
|
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
|
||||||
|
|
||||||
return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
|
return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
|
||||||
@ -1596,7 +1582,7 @@ index fff1a2f2b8b5235c0c56c68264db0a914f6cb15d..ba7a816bd9dd4aec79e2560f0968374d
|
|||||||
if (nbttaglist1 != null) {
|
if (nbttaglist1 != null) {
|
||||||
for (int i = 0; i < nbttaglist1.size(); ++i) {
|
for (int i = 0; i < nbttaglist1.size(); ++i) {
|
||||||
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
|
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
|
||||||
@@ -507,7 +504,6 @@ public class ChunkSerializer {
|
@@ -495,7 +492,6 @@ public class ChunkSerializer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1605,7 +1591,7 @@ index fff1a2f2b8b5235c0c56c68264db0a914f6cb15d..ba7a816bd9dd4aec79e2560f0968374d
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 7bd9abe9166df3d120fe6580407a04f68279c55f..13b33785e13d5f9cc659dc48e5fea6451ca778fc 100644
|
index 6573e72d041714ccc2bf0e3c8734bc212caf534e..7d2bb67867836e8f74b0583d36aed3966be8ed7d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -370,7 +370,7 @@ public final class CraftServer implements Server {
|
@@ -370,7 +370,7 @@ public final class CraftServer implements Server {
|
||||||
@ -1617,7 +1603,7 @@ index 7bd9abe9166df3d120fe6580407a04f68279c55f..13b33785e13d5f9cc659dc48e5fea645
|
|||||||
this.overrideSpawnLimits();
|
this.overrideSpawnLimits();
|
||||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||||
@@ -2557,12 +2557,31 @@ public final class CraftServer implements Server {
|
@@ -2580,12 +2580,31 @@ public final class CraftServer implements Server {
|
||||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1819,10 +1805,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
|
|||||||
- }
|
- }
|
||||||
-}
|
-}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index e87f36d8aa86b9ac9ccc234f7b51a4a51bff2426..2da161b901189c3dcf90c95a074b8c2cbf30f282 100644
|
index 906b2a900977026389ce783968d2de8709cf3b97..14f86623be9f27b4c2507a33e0bddce50c7eccf4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -2701,6 +2701,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2769,6 +2769,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
|
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
|
||||||
}
|
}
|
||||||
@ -2019,10 +2005,10 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222
|
|||||||
+ } // Paper
|
+ } // Paper
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index ea994c34e1ca725eae4d05223fc09fc1308b0730..d72e6ebc8b7b002279ba61c30b5a42f8cd5b3b7b 100644
|
index 29698be6e4990769cbe1c00088dfb9cfc73d966a..b1c07c945758e4cf4af86caa1dda47688feba849 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -214,6 +214,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -213,6 +213,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
@ -2035,7 +2021,7 @@ index ea994c34e1ca725eae4d05223fc09fc1308b0730..d72e6ebc8b7b002279ba61c30b5a42f8
|
|||||||
|
|
||||||
public static byte toLegacyData(BlockState data) {
|
public static byte toLegacyData(BlockState data) {
|
||||||
return CraftLegacy.toLegacyData(data);
|
return CraftLegacy.toLegacyData(data);
|
||||||
@@ -462,6 +468,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -459,6 +465,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
|
public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
|
||||||
return new CraftDamageSourceBuilder(damageType);
|
return new CraftDamageSourceBuilder(damageType);
|
||||||
}
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren