Compare commits
3 commits
master
...
feat/timin
Author | SHA1 | Date | |
---|---|---|---|
|
2a810b77f0 | ||
|
c250671fda | ||
|
38e61d072f |
121 changed files with 470 additions and 757 deletions
|
@ -3,8 +3,6 @@ From: Aikar <aikar@aikar.co>
|
|||
Date: Mon, 29 Feb 2016 18:48:17 -0600
|
||||
Subject: [PATCH] Timings v2
|
||||
|
||||
TODO: Add #isStopping to FullServerTickHandler#stopTiming in patch 191
|
||||
expose isRunning
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
|
||||
new file mode 100644
|
||||
|
@ -274,10 +272,10 @@ index 0000000000000000000000000000000000000000..a3ad690691eb5537a565d7ba684354ac
|
|||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2ca7c44f0
|
||||
index 0000000000000000000000000000000000000000..421be8a6f9a65596ac8eab071e6ee57533d02718
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/Timing.java
|
||||
@@ -0,0 +1,86 @@
|
||||
@@ -0,0 +1,94 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
|
@ -319,14 +317,17 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2
|
|||
+ * @return Timing
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Timing startTiming();
|
||||
+ default Timing startTiming() {
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
|
||||
+ *
|
||||
+ * Will automatically be called when this Timing is used with try-with-resources
|
||||
+ */
|
||||
+ void stopTiming();
|
||||
+ default void stopTiming() {
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Starts timing the execution until {@link #stopTiming()} is called.
|
||||
|
@ -336,7 +337,9 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2
|
|||
+ * @return Timing
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Timing startTimingIfSync();
|
||||
+ default Timing startTimingIfSync() {
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
|
||||
|
@ -345,13 +348,15 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2
|
|||
+ *
|
||||
+ * But only if we are on the primary thread.
|
||||
+ */
|
||||
+ void stopTimingIfSync();
|
||||
+ default void stopTimingIfSync() {
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @deprecated Doesn't do anything - Removed
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ void abort();
|
||||
+ default void abort() {
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Used internally to get the actual backing Handler in the case of delegated Handlers
|
||||
|
@ -362,7 +367,8 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2
|
|||
+ TimingHandler getTimingHandler();
|
||||
+
|
||||
+ @Override
|
||||
+ void close();
|
||||
+ default void close() {
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
|
||||
new file mode 100644
|
||||
|
|
|
@ -699,20 +699,6 @@ index 0000000000000000000000000000000000000000..2f0d9b953802dee821cfde82d22b0567
|
|||
+ return Timings.ofSafe(((PrimaryLevelData) worldserver.getLevelData()).getLevelName() + " - Scheduled " + timingsType);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
index f7197f1347251a37dd0f6d9ffa2f09bc3a4e1233..d0d36a57ec4896bcb74970f8fb24d8f3e17db133 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
@@ -31,7 +31,8 @@ public class PacketUtils {
|
||||
engine.executeIfPossible(() -> {
|
||||
if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
|
||||
if (listener.shouldHandleMessage(packet)) {
|
||||
- try {
|
||||
+ co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
|
||||
+ try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
|
||||
packet.handle(listener);
|
||||
} catch (Exception exception) {
|
||||
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 5a4cdbc4b92a48c614564e4e421f05a9eb5b072b..d76dae9ce9022308b316080ac48b7030d674cc6b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
|
@ -892,133 +878,35 @@ index 5a4cdbc4b92a48c614564e4e421f05a9eb5b072b..d76dae9ce9022308b316080ac48b7030
|
|||
this.profiler.popPush("send chunks");
|
||||
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
|
||||
index d38ecbc208c34509eaf77751ac45d9ef51a5dce8..b51c3f8c485496734ea58c15377a1215a334c765 100644
|
||||
index d38ecbc208c34509eaf77751ac45d9ef51a5dce8..ddf07cb09b97a8e781739991040816eb5e59c607 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -65,10 +65,11 @@ import org.apache.logging.log4j.Level;
|
||||
@@ -65,7 +65,6 @@ import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.io.IoBuilder;
|
||||
import org.bukkit.command.CommandSender;
|
||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
+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.craftbukkit.util.Waitable; // Paper
|
||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -439,7 +440,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -439,7 +438,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public void handleConsoleInputs() {
|
||||
- SpigotTimings.serverCommandTimer.startTiming(); // Spigot
|
||||
+ MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
|
||||
while (!this.consoleInput.isEmpty()) {
|
||||
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
||||
|
||||
@@ -454,7 +455,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -454,7 +452,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
- SpigotTimings.serverCommandTimer.stopTiming(); // Spigot
|
||||
+ MinecraftTimings.serverCommandTimer.stopTiming(); // Spigot
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -712,7 +713,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public String runCommand(RconConsoleSource rconConsoleSource, String s) {
|
||||
+ Waitable[] waitableArray = new Waitable[1]; // Paper
|
||||
rconConsoleSource.prepareForCommand();
|
||||
+ final java.util.concurrent.atomic.AtomicReference<String> command = new java.util.concurrent.atomic.AtomicReference<>(s); // Paper
|
||||
this.executeBlocking(() -> {
|
||||
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
|
||||
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
|
||||
@@ -720,9 +723,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
+ // Paper start
|
||||
+ command.set(event.getCommand());
|
||||
+ if (event.getCommand().toLowerCase(java.util.Locale.ROOT).startsWith("timings") && event.getCommand().toLowerCase(java.util.Locale.ROOT).matches("timings (report|paste|get|merged|seperate)")) {
|
||||
+ org.bukkit.command.BufferedCommandSender sender = new org.bukkit.command.BufferedCommandSender();
|
||||
+ Waitable<String> waitable = new Waitable<>() {
|
||||
+ @Override
|
||||
+ protected String evaluate() {
|
||||
+ return sender.getBuffer();
|
||||
+ }
|
||||
+ };
|
||||
+ waitableArray[0] = waitable;
|
||||
+ co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable));
|
||||
+ } else {
|
||||
+ // Paper end
|
||||
ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
|
||||
this.server.dispatchServerCommand(event.getSender(), serverCommand);
|
||||
+ } // Paper
|
||||
});
|
||||
+ // Paper start
|
||||
+ if (waitableArray[0] != null) {
|
||||
+ //noinspection unchecked
|
||||
+ Waitable<String> waitable = waitableArray[0];
|
||||
+ try {
|
||||
+ return waitable.get();
|
||||
+ } catch (java.util.concurrent.ExecutionException e) {
|
||||
+ throw new RuntimeException("Exception processing rcon command " + command.get(), e.getCause());
|
||||
+ } catch (InterruptedException e) {
|
||||
+ Thread.currentThread().interrupt(); // Maintain interrupted state
|
||||
+ throw new RuntimeException("Interrupted processing rcon command " + command.get(), e);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ // Paper end
|
||||
return rconConsoleSource.getCommandResponse();
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 449608e60f3900778247101581ff598f1637499b..bb5115b3593c314f5edfb5947a3c35a489bf71af 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1,8 +1,10 @@
|
||||
package net.minecraft.server.level;
|
||||
|
||||
+import co.aikar.timings.Timing; // Paper
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableList.Builder;
|
||||
import com.google.common.collect.Iterables;
|
||||
+import com.google.common.collect.ComparisonChain; // Paper
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Queues;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1296,6 +1298,7 @@ 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();
|
||||
+ level.timings.tracker1.startTiming(); // Paper
|
||||
|
||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
||||
|
||||
@@ -1320,14 +1323,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
||||
}
|
||||
}
|
||||
+ level.timings.tracker1.stopTiming(); // Paper
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
objectiterator = this.entityMap.values().iterator();
|
||||
|
||||
+ level.timings.tracker2.startTiming(); // Paper
|
||||
while (objectiterator.hasNext()) {
|
||||
playerchunkmap_entitytracker = (ChunkMap.TrackedEntity) objectiterator.next();
|
||||
playerchunkmap_entitytracker.updatePlayers(list);
|
||||
}
|
||||
+ level.timings.tracker2.stopTiming(); // Paper
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175..e0c8b89767087cba34fc3c3809db4c386dacb193 100644
|
||||
index cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175..e48452401358996ff558a4788ebee51a1ec3ea13 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -195,13 +195,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
@ -1039,49 +927,17 @@ index cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175..e0c8b89767087cba34fc3c3809db4c38
|
|||
ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
|
||||
ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
|
||||
|
||||
@@ -366,7 +368,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
public void save(boolean flush) {
|
||||
this.runDistanceManagerUpdates();
|
||||
+ try (co.aikar.timings.Timing timed = level.timings.chunkSaveData.startTiming()) { // Paper - Timings
|
||||
this.chunkMap.saveAllChunks(flush);
|
||||
+ } // Paper - Timings
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -408,10 +412,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
||||
@@ -409,9 +411,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.level.getProfiler().popPush("chunks");
|
||||
if (tickChunks) {
|
||||
+ this.level.timings.chunks.startTiming(); // Paper - timings
|
||||
this.tickChunks();
|
||||
- this.level.timings.tracker.startTiming(); // Spigot
|
||||
+ this.level.timings.chunks.stopTiming(); // Paper - timings
|
||||
this.chunkMap.tick();
|
||||
- this.level.timings.tracker.stopTiming(); // Spigot
|
||||
}
|
||||
|
||||
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
||||
@@ -434,6 +438,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
gameprofilerfiller.push("filteringLoadedChunks");
|
||||
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
|
||||
Iterator iterator = this.chunkMap.getChunks().iterator();
|
||||
+ if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
||||
@@ -446,8 +451,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
if (this.level.tickRateManager().runsNormally()) {
|
||||
gameprofilerfiller.popPush("naturalSpawnCount");
|
||||
+ this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
||||
NaturalSpawner.SpawnState spawnercreature_d = NaturalSpawner.createState(k, this.level.getAllEntities(), this::getFullChunk, new LocalMobCapCalculator(this.chunkMap));
|
||||
+ this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
|
||||
this.lastSpawnState = spawnercreature_d;
|
||||
gameprofilerfiller.popPush("spawnAndTick");
|
||||
@@ -470,22 +477,25 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -470,9 +470,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
|
||||
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
||||
|
@ -1091,38 +947,11 @@ index cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175..e0c8b89767087cba34fc3c3809db4c38
|
|||
}
|
||||
}
|
||||
}
|
||||
+ this.level.timings.chunkTicks.stopTiming(); // Paper
|
||||
|
||||
gameprofilerfiller.popPush("customSpawners");
|
||||
if (flag) {
|
||||
+ try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings
|
||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||
+ } // Paper - timings
|
||||
}
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("broadcast");
|
||||
list.forEach((chunkproviderserver_a1) -> {
|
||||
+ this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing
|
||||
chunkproviderserver_a1.holder.broadcastChanges(chunkproviderserver_a1.chunk);
|
||||
+ this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
|
||||
});
|
||||
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
|
||||
index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57a04e0c51 100644
|
||||
index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..b8b7db1d067c657a6412e376f804947c015dde6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.minecraft.server.level;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
+import co.aikar.timings.TimingHistory; // Paper
|
||||
+import co.aikar.timings.Timings; // Paper
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
@@ -173,7 +175,6 @@ import net.minecraft.world.ticks.LevelTicks;
|
||||
@@ -173,7 +173,6 @@ import net.minecraft.world.ticks.LevelTicks;
|
||||
import org.slf4j.Logger;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.WeatherType;
|
||||
|
@ -1130,106 +959,40 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
||||
import org.bukkit.craftbukkit.util.WorldUUID;
|
||||
@@ -478,7 +479,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -478,7 +477,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("tickPending");
|
||||
- this.timings.doTickPending.startTiming(); // Spigot
|
||||
+ this.timings.scheduledBlocks.startTiming(); // Paper
|
||||
if (!this.isDebug() && flag) {
|
||||
j = this.getGameTime();
|
||||
gameprofilerfiller.push("blockTicks");
|
||||
@@ -487,15 +488,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -487,7 +485,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
- this.timings.doTickPending.stopTiming(); // Spigot
|
||||
+ this.timings.scheduledBlocks.stopTiming(); // Paper
|
||||
|
||||
gameprofilerfiller.popPush("raid");
|
||||
if (flag) {
|
||||
+ this.timings.raids.startTiming(); // Paper - timings
|
||||
this.raids.tick();
|
||||
+ this.timings.raids.stopTiming(); // Paper - timings
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("chunkSource");
|
||||
+ this.timings.chunkProviderTick.startTiming(); // Paper - timings
|
||||
this.getChunkSource().tick(shouldKeepTicking, true);
|
||||
+ this.timings.chunkProviderTick.stopTiming(); // Paper - timings
|
||||
gameprofilerfiller.popPush("blockEvents");
|
||||
if (flag) {
|
||||
this.timings.doSounds.startTiming(); // Spigot
|
||||
@@ -648,6 +653,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("tickBlocks");
|
||||
+ timings.chunkTicksBlocks.startTiming(); // Paper
|
||||
if (randomTickSpeed > 0) {
|
||||
LevelChunkSection[] achunksection = chunk.getSections();
|
||||
|
||||
@@ -680,6 +686,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
+ timings.chunkTicksBlocks.stopTiming(); // Paper
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
|
||||
@@ -956,14 +963,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void tickNonPassenger(Entity entity) {
|
||||
+ ++TimingHistory.entityTicks; // Paper - timings
|
||||
// Spigot start
|
||||
+ co.aikar.timings.Timing timer; // Paper
|
||||
if (!org.spigotmc.ActivationRange.checkIfActive(entity)) {
|
||||
entity.tickCount++;
|
||||
+ timer = entity.getType().inactiveTickTimer.startTiming(); try { // Paper - timings
|
||||
entity.inactiveTick();
|
||||
+ } finally { timer.stopTiming(); } // Paper
|
||||
@@ -963,7 +960,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return;
|
||||
}
|
||||
// Spigot end
|
||||
- entity.tickTimer.startTiming(); // Spigot
|
||||
+ // Paper start- timings
|
||||
+ TimingHistory.activatedEntityTicks++;
|
||||
+ timer = entity.getVehicle() != null ? entity.getType().passengerTickTimer.startTiming() : entity.getType().tickTimer.startTiming();
|
||||
+ try {
|
||||
+ // Paper end - timings
|
||||
entity.setOldPosAndRot();
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
@@ -982,7 +997,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -982,7 +978,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.tickPassenger(entity, entity1);
|
||||
}
|
||||
- entity.tickTimer.stopTiming(); // Spigot
|
||||
+ } finally { timer.stopTiming(); } // Paper - timings
|
||||
|
||||
}
|
||||
|
||||
@@ -1024,6 +1039,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
if (!savingDisabled) {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
|
||||
+ try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
|
||||
if (progressListener != null) {
|
||||
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||
}
|
||||
@@ -1033,7 +1049,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
||||
}
|
||||
|
||||
+ timings.worldSaveChunks.startTiming(); // Paper
|
||||
chunkproviderserver.save(flush);
|
||||
+ timings.worldSaveChunks.stopTiming(); // Paper
|
||||
+ }// Paper
|
||||
if (flush) {
|
||||
this.entityManager.saveAll();
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 556d8f23ee2de77cea71abcc0e56718e60b20b05..47e1640cafc8087d94d0b88b8b3117591f9f238e 100644
|
||||
index 556d8f23ee2de77cea71abcc0e56718e60b20b05..eee2d397b1de010552e5d194a7896598d63ec4a6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -330,7 +330,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -1248,54 +1011,40 @@ index 556d8f23ee2de77cea71abcc0e56718e60b20b05..47e1640cafc8087d94d0b88b8b311759
|
|||
|
||||
}
|
||||
|
||||
@@ -2103,7 +2101,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2103,7 +2101,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
private void handleCommand(String s) {
|
||||
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
|
||||
+ co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
@@ -2113,7 +2111,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2113,7 +2110,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
|
||||
+ co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2126,7 +2124,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2125,8 +2121,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;
|
||||
} finally {
|
||||
- } finally {
|
||||
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
|
||||
+ co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
|
||||
}
|
||||
}
|
||||
// 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 9dcfcea63f57f45a5584bb80c34fe445d65849e8..765c412cd0c5cd410c224b4bc55dbf431fd6617b 100644
|
||||
index 9dcfcea63f57f45a5584bb80c34fe445d65849e8..0166d594cb8b4aeabc1fcdb850cd3305216b680a 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.server.players;
|
||||
|
||||
+import co.aikar.timings.MinecraftTimings;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1007,10 +1008,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
||||
+ MinecraftTimings.savePlayers.startTiming(); // Paper
|
||||
@@ -1010,7 +1010,6 @@ public abstract class PlayerList {
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
this.save((ServerPlayer) this.players.get(i));
|
||||
}
|
||||
-
|
||||
+ MinecraftTimings.savePlayers.stopTiming(); // Paper
|
||||
}
|
||||
|
||||
public UserWhiteList getWhiteList() {
|
||||
|
|
|
@ -563,10 +563,10 @@ index e9d56d75b7c648f04d3a56942b2866090c570129..57ec168bac3727feb734e28cebc68032
|
|||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index b51c3f8c485496734ea58c15377a1215a334c765..48107f8eb50483430053b990496862d71c9f8a3e 100644
|
||||
index ddf07cb09b97a8e781739991040816eb5e59c607..6e68ae77f519b229743e1c44a1efa9a0c1cbc6ee 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -218,6 +218,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -216,6 +216,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index eb98bb1bd76869fd76b34885223c8e57a04e0c51..754045e71f180862fa57fd1c97e5d7deb1d788e6 100644
|
||||
index b8b7db1d067c657a6412e376f804947c015dde6c..5a16de470423bc89e5fc59fcce70892726726c88 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2141,6 +2141,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2117,6 +2117,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
entity.valid = true; // CraftBukkit
|
||||
|
@ -25,7 +25,7 @@ index eb98bb1bd76869fd76b34885223c8e57a04e0c51..754045e71f180862fa57fd1c97e5d7de
|
|||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 63f45a77c8511e05954030cf117c5e4cda0a518f..dbe5239b1a1769ef9f2ef66c32b1a68cd684428e 100644
|
||||
index 0a3ed94165430774c7037e78fd7bffc205c6f72f..66df9b75349b2fb20a13c12392d4771603521291 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -328,7 +328,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 754045e71f180862fa57fd1c97e5d7deb1d788e6..aca595551c90d5515309c9c82ad6ffcfa1d680c8 100644
|
||||
index 5a16de470423bc89e5fc59fcce70892726726c88..71d988f5976d3dfee7889ccb14052ed9b71e00d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -616,7 +616,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -608,7 +608,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
gameprofilerfiller.push("thunder");
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index aca595551c90d5515309c9c82ad6ffcfa1d680c8..6d89dc22e28a9c3557d9972be0935d75719e7f7d 100644
|
||||
index 71d988f5976d3dfee7889ccb14052ed9b71e00d4..502089e5ad5cbdfc3d6450dcb62595b6feb95891 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -646,11 +646,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -638,11 +638,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
gameprofilerfiller.popPush("iceandsnow");
|
||||
|
||||
|
@ -21,4 +21,4 @@ index aca595551c90d5515309c9c82ad6ffcfa1d680c8..6d89dc22e28a9c3557d9972be0935d75
|
|||
+ } // Paper - Option to disable ice and snow
|
||||
|
||||
gameprofilerfiller.popPush("tickBlocks");
|
||||
timings.chunkTicksBlocks.startTiming(); // Paper
|
||||
if (randomTickSpeed > 0) {
|
||||
|
|
|
@ -7,10 +7,10 @@ Subject: [PATCH] Fix spawn location event changing location
|
|||
public net.minecraft.world.entity.Entity setRot(FF)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 765c412cd0c5cd410c224b4bc55dbf431fd6617b..8a91a44e46a2d49e2f4b9e9970c2b77f2e87767e 100644
|
||||
index 0166d594cb8b4aeabc1fcdb850cd3305216b680a..d12b75f0080a763799fd77b1a35a4ee7779cf4e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -234,7 +234,10 @@ public abstract class PlayerList {
|
||||
@@ -233,7 +233,10 @@ public abstract class PlayerList {
|
||||
|
||||
player.spawnIn(worldserver1);
|
||||
player.gameMode.setLevel((ServerLevel) player.level());
|
||||
|
|
|
@ -17,7 +17,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|||
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 47e1640cafc8087d94d0b88b8b3117591f9f238e..64db7e017b41bffcaac202ee4ecfd7df46d69331 100644
|
||||
index eee2d397b1de010552e5d194a7896598d63ec4a6..7b9e613d68f5765207bc60aa9b82bfc8e9da49bf 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2013,7 +2013,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -36,9 +36,9 @@ index 47e1640cafc8087d94d0b88b8b3117591f9f238e..64db7e017b41bffcaac202ee4ecfd7df
|
|||
- private void handleCommand(String s) {
|
||||
+ public void handleCommand(String s) { // Paper - private -> public
|
||||
+ org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher
|
||||
co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2a36e562967ec6174efe456e489c50ca10ba47e5..b0371c51645da361b63dea02bf7633ae6191560f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 6d89dc22e28a9c3557d9972be0935d75719e7f7d..de1708e5d39561115d2825eea4a5f6e1f1f4e5b8 100644
|
||||
index 502089e5ad5cbdfc3d6450dcb62595b6feb95891..2e53c7466215564634294c72334d556506858e7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -621,7 +621,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -613,7 +613,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||
|
|
|
@ -18,10 +18,10 @@ index 4f1204661e345462c08cc66e3a8851033f186268..a37f11633663e07652274707b29a849e
|
|||
this.profiler.push(() -> {
|
||||
String s = String.valueOf(worldserver);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index de1708e5d39561115d2825eea4a5f6e1f1f4e5b8..1e5b42fc3903b14537d232c8adbbaf79078d8d8e 100644
|
||||
index 2e53c7466215564634294c72334d556506858e7f..a2528b9b4ebcfc39c3127581bafb01e0dd2eca4e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -227,6 +227,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -225,6 +225,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
|
@ -30,7 +30,7 @@ index de1708e5d39561115d2825eea4a5f6e1f1f4e5b8..1e5b42fc3903b14537d232c8adbbaf79
|
|||
public LevelChunk getChunkIfLoaded(int x, int z) {
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index eae1d6eedeed09b3f49913c2bb205b80442bbfe3..622ecc1aeb9140d5c0d181fa472d123c42e5c5f4 100644
|
||||
index dfb349ed8a0fb981b3234baf040bd3297a555ebf..024da1029baecae639d7c05b5f7c30dbaa67b006 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -491,7 +491,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1e5b42fc3903b14537d232c8adbbaf79078d8d8e..e6cf145fa7a2968c70e9e467e3927fd38e199e06 100644
|
||||
index a2528b9b4ebcfc39c3127581bafb01e0dd2eca4e..12268a0691c0af96e4815f79949582c3491a23b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2153,6 +2153,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2129,6 +2129,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||
}
|
||||
// Paper end - Entity origin API
|
||||
|
@ -16,7 +16,7 @@ index 1e5b42fc3903b14537d232c8adbbaf79078d8d8e..e6cf145fa7a2968c70e9e467e3927fd3
|
|||
}
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
@@ -2223,6 +2224,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2199,6 +2200,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
|
|
@ -28,10 +28,10 @@ index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5
|
|||
+ // Paper end - PlayerUseUnknownEntityEvent
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 64db7e017b41bffcaac202ee4ecfd7df46d69331..14a821bfc6b20475889d3138b8da9e6bfaf1787c 100644
|
||||
index 7b9e613d68f5765207bc60aa9b82bfc8e9da49bf..6763ac2a23fd961012fb0e450f1a46c4e036fe11 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2493,7 +2493,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2489,7 +2489,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e6cf145fa7a2968c70e9e467e3927fd38e199e06..223f8d9be5d73e296f5815db7123b95c3b345162 100644
|
||||
index 12268a0691c0af96e4815f79949582c3491a23b6..ae8b81a51050fbba75a0e71afc838f86a0eee583 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1389,6 +1389,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1365,6 +1365,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
||||
|
|
|
@ -43,10 +43,10 @@ index a37f11633663e07652274707b29a849e518511c5..6dec7884fdd15eb8f32e8831ed0f3a92
|
|||
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
|
||||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 8a91a44e46a2d49e2f4b9e9970c2b77f2e87767e..98862db2334508ee1a783aeabfb146751552a4d9 100644
|
||||
index d12b75f0080a763799fd77b1a35a4ee7779cf4e5..e88426555ee112104e51f60cfd2002409e78d5ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -159,6 +159,7 @@ public abstract class PlayerList {
|
||||
@@ -158,6 +158,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
private CraftServer cserver;
|
||||
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
|
||||
|
@ -54,7 +54,7 @@ index 8a91a44e46a2d49e2f4b9e9970c2b77f2e87767e..98862db2334508ee1a783aeabfb14675
|
|||
|
||||
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
||||
@@ -390,6 +391,13 @@ public abstract class PlayerList {
|
||||
@@ -389,6 +390,13 @@ public abstract class PlayerList {
|
||||
|
||||
player.initInventoryMenu();
|
||||
// CraftBukkit - Moved from above, added world
|
||||
|
@ -68,7 +68,7 @@ index 8a91a44e46a2d49e2f4b9e9970c2b77f2e87767e..98862db2334508ee1a783aeabfb14675
|
|||
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
||||
}
|
||||
|
||||
@@ -512,6 +520,16 @@ public abstract class PlayerList {
|
||||
@@ -511,6 +519,16 @@ public abstract class PlayerList {
|
||||
entityplayer.doTick(); // SPIGOT-924
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -85,7 +85,7 @@ index 8a91a44e46a2d49e2f4b9e9970c2b77f2e87767e..98862db2334508ee1a783aeabfb14675
|
|||
this.save(entityplayer);
|
||||
if (entityplayer.isPassenger()) {
|
||||
Entity entity = entityplayer.getRootVehicle();
|
||||
@@ -1129,6 +1147,13 @@ public abstract class PlayerList {
|
||||
@@ -1126,6 +1144,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ index d8f2fe077e35fd6c70e0ba50945006819f50586f..d566d64c6c3bd97ac4b4f80bdf1b1bd5
|
|||
// Spigot end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 48107f8eb50483430053b990496862d71c9f8a3e..c1f41dcf49c75c3d69485c0e1ec821205438ed1e 100644
|
||||
index 6e68ae77f519b229743e1c44a1efa9a0c1cbc6ee..e75559e2f07f24a3a4298f90400f1d6d4f9a2537 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -270,7 +270,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -268,7 +268,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
if (this.convertOldUsers()) {
|
||||
|
|
|
@ -11,10 +11,10 @@ Co-authored-by: lexikiq <noellekiq@gmail.com>
|
|||
Co-authored-by: Aikar <aikar@aikar.co>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 223f8d9be5d73e296f5815db7123b95c3b345162..d728afbe1d6882f1ace4ead9d87f4b7d2af43ba2 100644
|
||||
index ae8b81a51050fbba75a0e71afc838f86a0eee583..198a35cad942e4677c5abf3093b7f0ef58754755 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1322,7 +1322,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1298,7 +1298,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add setting for proxy online mode status
|
|||
TODO: Add isProxyOnlineMode check to Metrics
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index c1f41dcf49c75c3d69485c0e1ec821205438ed1e..c466ec011d059b9960606ef2ee51ea3a3a65f8d0 100644
|
||||
index e75559e2f07f24a3a4298f90400f1d6d4f9a2537..d5aa5415b561b2102a0f7ca3cd8d6a5e93355dfb 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -593,7 +593,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -589,7 +589,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
public boolean enforceSecureProfile() {
|
||||
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
||||
|
||||
|
|
|
@ -7,20 +7,18 @@ Saving players async is extremely dangerous. This will force it to main
|
|||
the same way we handle async chunk loads.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 98862db2334508ee1a783aeabfb146751552a4d9..e17f4f3882ae77a67e8bfad04646f02c2bbb6669 100644
|
||||
index e88426555ee112104e51f60cfd2002409e78d5ce..3ae821761c602344b7853150a00c3e0fa00691d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1029,11 +1029,13 @@ public abstract class PlayerList {
|
||||
@@ -1028,9 +1028,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
||||
+ io.papermc.paper.util.MCUtil.ensureMain("Save Players" , () -> { // Paper - Ensure main
|
||||
MinecraftTimings.savePlayers.startTiming(); // Paper
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
- this.save((ServerPlayer) this.players.get(i));
|
||||
+ this.save(this.players.get(i));
|
||||
}
|
||||
MinecraftTimings.savePlayers.stopTiming(); // Paper
|
||||
+ return null; }); // Paper - ensure main
|
||||
}
|
||||
|
||||
|
|
|
@ -64,10 +64,10 @@ index d566d64c6c3bd97ac4b4f80bdf1b1bd5a381ef55..e464349a46eab23eb5b8d4d31f577d78
|
|||
if (waitForShutdown) {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index e17f4f3882ae77a67e8bfad04646f02c2bbb6669..d5f17d7e3b56ca87ec9070b69265ce098de61f69 100644
|
||||
index 3ae821761c602344b7853150a00c3e0fa00691d1..2e5c759a8c5e77f93f4b1fea4dbe9fc4fc7fe467 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1143,8 +1143,15 @@ public abstract class PlayerList {
|
||||
@@ -1140,8 +1140,15 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void removeAll() {
|
||||
|
|
|
@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
|
|||
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 34aeb823950fac8eaef3f38b302c1585a45f7498..44cc60d92c6e83ecfa2c232b59986968d0161672 100644
|
||||
index fbdd5b0169d7e05ea9500ead67285c24ea373d37..461d475d97da76591eaa8fb1c7fca528cbb69442 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2259,6 +2259,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2255,6 +2255,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
switch (packet.getAction()) {
|
||||
case PRESS_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(true);
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index d5f17d7e3b56ca87ec9070b69265ce098de61f69..768a5c6ebc4466aae4108a79e1564b2bfc93463a 100644
|
||||
index 2e5c759a8c5e77f93f4b1fea4dbe9fc4fc7fe467..73b36f044ae7d6294a623df7620a1f7a016455f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -624,9 +624,9 @@ public abstract class PlayerList {
|
||||
@@ -623,9 +623,9 @@ public abstract class PlayerList {
|
||||
|
||||
// return chatmessage;
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
||||
|
@ -21,7 +21,7 @@ index d5f17d7e3b56ca87ec9070b69265ce098de61f69..768a5c6ebc4466aae4108a79e1564b2b
|
|||
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||
|
||||
@@ -993,7 +993,24 @@ public abstract class PlayerList {
|
||||
@@ -992,7 +992,24 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean isWhiteListed(GameProfile profile) {
|
||||
|
|
|
@ -9,10 +9,10 @@ from triggering monster spawns on a server.
|
|||
Also a highly more effecient way to blanket block spawns in a world
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index d60c70d59d0a6ef21224c597c9015cb3f51dabb8..63bcd7698fdb86366441dacedbb616771f6b1a3d 100644
|
||||
index 449608e60f3900778247101581ff598f1637499b..66260a49dce714be2226f5205247137c7df7f052 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1037,7 +1037,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1035,7 +1035,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange;
|
||||
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
|
||||
|
||||
|
@ -23,7 +23,7 @@ index d60c70d59d0a6ef21224c597c9015cb3f51dabb8..63bcd7698fdb86366441dacedbb61677
|
|||
// Spigot end
|
||||
if (!this.distanceManager.hasPlayersNearby(chunkcoordintpair.toLong())) {
|
||||
return false;
|
||||
@@ -1052,6 +1054,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1050,6 +1052,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
entityplayer = (ServerPlayer) iterator.next();
|
||||
|
@ -40,10 +40,10 @@ index d60c70d59d0a6ef21224c597c9015cb3f51dabb8..63bcd7698fdb86366441dacedbb61677
|
|||
|
||||
return true;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index e0c8b89767087cba34fc3c3809db4c386dacb193..a939bad7da9c852827a2d67d9ace5d0df4911a31 100644
|
||||
index e48452401358996ff558a4788ebee51a1ec3ea13..aaf5a1683e414437355c990552ebf94e4f8196df 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -461,6 +461,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -454,6 +454,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
|
||||
Util.shuffle(list, this.level.random);
|
||||
|
|
|
@ -9,7 +9,7 @@ This can be useful for changing name or skins after a player has logged in.
|
|||
public-f net.minecraft.world.entity.player.Player gameProfile
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ec80a9138260497d0deccf3ade3f44fc849de1d5..72edfb965aca81c2d2442b794b42baa04ec713b3 100644
|
||||
index d64c3e66340d005e04ad99282c7ec4d731b9d919..4d3855749cc49414a3077005fd161bc04b018106 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1472,7 +1472,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -40,10 +40,10 @@ index 2d9db1ac80216a509a7590254e422b3c4792e3ec..b31f00f2f0b7cec59301afe36c9dd7cd
|
|||
playerName = gameprofile.getName();
|
||||
uniqueId = gameprofile.getId();
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 768a5c6ebc4466aae4108a79e1564b2bfc93463a..26cee48ea3650aaf87fd2ba9c70d4ca9a88e2d87 100644
|
||||
index 73b36f044ae7d6294a623df7620a1f7a016455f9..c4d083a970417e5052a80abd7bdebc2b8c119dd2 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -831,10 +831,16 @@ public abstract class PlayerList {
|
||||
@@ -830,10 +830,16 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void sendPlayerPermissionLevel(ServerPlayer player) {
|
||||
|
|
|
@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
|
|||
public net.minecraft.world.entity.projectile.Projectile ownerUUID
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index d728afbe1d6882f1ace4ead9d87f4b7d2af43ba2..7c6b094de5e29cb2663e8a7072a27d7adbceb4b2 100644
|
||||
index 198a35cad942e4677c5abf3093b7f0ef58754755..90fcaaa50aa75bb51b0ea49e69f5e4954f25681f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2111,6 +2111,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2087,6 +2087,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTickingEnd(Entity entity) {
|
||||
ServerLevel.this.entityTickList.remove(entity);
|
||||
|
|
|
@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
|
|||
This adds a new Builder API which is much friendlier to use.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 7c6b094de5e29cb2663e8a7072a27d7adbceb4b2..1fac100819e59d00f50e530d3a4157b56d966dba 100644
|
||||
index 90fcaaa50aa75bb51b0ea49e69f5e4954f25681f..70768c59ed939f7a157a9b152085a2c158c215a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1508,12 +1508,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1484,12 +1484,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
|
|
|
@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
|||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1fac100819e59d00f50e530d3a4157b56d966dba..4f777c9d8c3052f68bc0465c8a7386b8fb486c83 100644
|
||||
index 70768c59ed939f7a157a9b152085a2c158c215a9..2f8c85cdcab370bd4247018b1a3f3b73bc99f7d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1239,7 +1239,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1215,7 +1215,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
|
||||
|
@ -19,7 +19,7 @@ index 1fac100819e59d00f50e530d3a4157b56d966dba..4f777c9d8c3052f68bc0465c8a7386b8
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -2196,7 +2196,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2172,7 +2172,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
|
||||
|
@ -75,10 +75,10 @@ index db72318d822b876eb937f0f0f7f2b2139fb77df7..a3a1450949703851625bbb257e92b3be
|
|||
this.doCloseContainer();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 72edfb965aca81c2d2442b794b42baa04ec713b3..a954d3b0ff0917d857002dba70c54b3fcdf77943 100644
|
||||
index 4d3855749cc49414a3077005fd161bc04b018106..88b643bb0b46d9aec86863ace8a5311b8efad2de 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2619,10 +2619,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2615,10 +2615,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleContainerClose(ServerboundContainerClosePacket packet) {
|
||||
|
@ -96,10 +96,10 @@ index 72edfb965aca81c2d2442b794b42baa04ec713b3..a954d3b0ff0917d857002dba70c54b3f
|
|||
this.player.doCloseContainer();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 9019e25f61d4fdb7c5d12ea7630b0bc23827ab6e..38cf3cf1cc7ebae4b6ca8a89dc026b5b4f0b4c2b 100644
|
||||
index c4d083a970417e5052a80abd7bdebc2b8c119dd2..adbab61f924e03ea9dd5334d1fae1790e07a350c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -510,7 +510,7 @@ public abstract class PlayerList {
|
||||
@@ -509,7 +509,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
|
||||
// See SPIGOT-5799, SPIGOT-6145
|
||||
if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
|
||||
|
|
|
@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
|
|||
cancelled to avoid this problem.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a954d3b0ff0917d857002dba70c54b3fcdf77943..087e87976d738426db9a850926463900b0c1e8ca 100644
|
||||
index 88b643bb0b46d9aec86863ace8a5311b8efad2de..5fa185c257edad5fc45117c90f0dd0a6b616fd2d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2496,6 +2496,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2492,6 +2492,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 63bcd7698fdb86366441dacedbb616771f6b1a3d..a58a68220e077ce23c20cf61d63f51183df1dfc9 100644
|
||||
index 66260a49dce714be2226f5205247137c7df7f052..8c64ea9f10902a6cd2a82c0e45786e1901d3d4ff 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1254,6 +1254,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1252,6 +1252,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
} else {
|
||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas());
|
||||
|
||||
|
@ -16,7 +16,7 @@ index 63bcd7698fdb86366441dacedbb616771f6b1a3d..a58a68220e077ce23c20cf61d63f5118
|
|||
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
|
||||
playerchunkmap_entitytracker.updatePlayers(this.level.players());
|
||||
if (entity instanceof ServerPlayer) {
|
||||
@@ -1294,7 +1295,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1292,7 +1293,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (playerchunkmap_entitytracker1 != null) {
|
||||
playerchunkmap_entitytracker1.broadcastRemoved();
|
||||
}
|
||||
|
@ -26,10 +26,10 @@ index 63bcd7698fdb86366441dacedbb616771f6b1a3d..a58a68220e077ce23c20cf61d63f5118
|
|||
|
||||
protected void tick() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 4f777c9d8c3052f68bc0465c8a7386b8fb486c83..e9d08662c065d04a67918f0aa2cd4fde5798f2a6 100644
|
||||
index 2f8c85cdcab370bd4247018b1a3f3b73bc99f7d7..db8596ebc38ea16f26df335b83002be18b4f36a0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1201,6 +1201,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1177,6 +1177,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
||||
|
@ -43,7 +43,7 @@ index 4f777c9d8c3052f68bc0465c8a7386b8fb486c83..e9d08662c065d04a67918f0aa2cd4fde
|
|||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f431c5a17bfc3bdf2a464470af4ec5e226b0d13e..131eda47e7a9f90a4057607870acbcb8fecfbf0b 100644
|
||||
index 7fd1a75ba0068ee3ca6c29a550a9a1b33c5cacc5..d4b1122fcf9c35f492764d0a7b8b4c41e46aa90a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -250,6 +250,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
|
|
@ -21,10 +21,10 @@ index 7f4c9ba88c2d33c2cc23e406a616f9eb35d738ce..5d429b707383e6620a0d83f23d7a8694
|
|||
// Paper start - further improve server tick loop
|
||||
long tickSection = Util.getNanos();
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index c466ec011d059b9960606ef2ee51ea3a3a65f8d0..baf93b5d5883d0a5c360f1a475949804b7907636 100644
|
||||
index d5aa5415b561b2102a0f7ca3cd8d6a5e93355dfb..67dfd019a39287930bea2ff992f9c684dacffb3b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -216,6 +216,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -214,6 +214,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
|
|
|
@ -23,10 +23,10 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s
|
|||
The point of this is readability, but does have a side-benefit of a small microptimization
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 38cf3cf1cc7ebae4b6ca8a89dc026b5b4f0b4c2b..c5ca2d8feed71cdd4dce851941654768c1e5d648 100644
|
||||
index adbab61f924e03ea9dd5334d1fae1790e07a350c..44ac8d893ee2e18900f00747fd8391b3de7aca70 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -627,7 +627,7 @@ public abstract class PlayerList {
|
||||
@@ -626,7 +626,7 @@ public abstract class PlayerList {
|
||||
} else if (!this.isWhiteListed(gameprofile, event)) { // Paper - ProfileWhitelistVerifyEvent
|
||||
//ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
|
||||
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use a Queue for Queueing Commands
|
|||
Lists are bad as Queues mmmkay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index baf93b5d5883d0a5c360f1a475949804b7907636..b15cee6f21ff300b596922a8eed35a5f8a89fe22 100644
|
||||
index 67dfd019a39287930bea2ff992f9c684dacffb3b..ef6324dbb7e311ac16c64f937dee64c777f4b54e 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -78,7 +78,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -76,7 +76,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
static final Logger LOGGER = LogUtils.getLogger();
|
||||
private static final int CONVERSION_RETRY_DELAY_MS = 5000;
|
||||
private static final int CONVERSION_RETRIES = 2;
|
||||
|
@ -18,7 +18,7 @@ index baf93b5d5883d0a5c360f1a475949804b7907636..b15cee6f21ff300b596922a8eed35a5f
|
|||
@Nullable
|
||||
private QueryThreadGs4 queryThreadGs4;
|
||||
// private final RemoteControlCommandListener rconConsoleSource; // CraftBukkit - remove field
|
||||
@@ -438,13 +438,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -436,12 +436,14 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public void handleConsoleInput(String command, CommandSourceStack commandSource) {
|
||||
|
@ -27,7 +27,6 @@ index baf93b5d5883d0a5c360f1a475949804b7907636..b15cee6f21ff300b596922a8eed35a5f
|
|||
}
|
||||
|
||||
public void handleConsoleInputs() {
|
||||
MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
|
||||
- while (!this.consoleInput.isEmpty()) {
|
||||
- ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
||||
+ // Paper start - Perf: use proper queue
|
||||
|
|
|
@ -28,10 +28,10 @@ index b4947ee9615b1b2108046b9ab87b65b53dbb23f6..dbdc6b4065acc363c128580fdffe9049
|
|||
public boolean queueHealthUpdatePacket;
|
||||
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index c5ca2d8feed71cdd4dce851941654768c1e5d648..9e8938627bfd1c45a2546e221f819e20c483a9e2 100644
|
||||
index 44ac8d893ee2e18900f00747fd8391b3de7aca70..13c7d9256e2913e0d0906359eb9eedc1bb43a473 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -182,6 +182,7 @@ public abstract class PlayerList {
|
||||
@@ -181,6 +181,7 @@ public abstract class PlayerList {
|
||||
|
||||
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
|
||||
player.isRealPlayer = true; // Paper
|
||||
|
|
|
@ -22,7 +22,7 @@ it only impacts data sent from the client.
|
|||
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 29678ddb0cb53fae9ae497614690f9d855f9eb86..86cb92b7cf18272ee4b46c292ed4a7192119ce1a 100644
|
||||
index 12ce3d0e35bbdf8407c210925ea4edc1395651da..36604b777bb8a32374358af05b873beb4cd081b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -33,7 +33,7 @@ index 29678ddb0cb53fae9ae497614690f9d855f9eb86..86cb92b7cf18272ee4b46c292ed4a719
|
|||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
|
||||
super(server, connection, clientData, player); // CraftBukkit
|
||||
@@ -3151,7 +3152,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3147,7 +3148,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index cdd1d8222ad1796abd0858b9ed0e2ddc9be83c93..2f1d075b8dbcf173c51f3e6396ccbc61b64f75df 100644
|
||||
index 13c7d9256e2913e0d0906359eb9eedc1bb43a473..29512882bc53d7e364a6ce29a57876b51d45782a 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1127,6 +1127,7 @@ public abstract class PlayerList {
|
||||
@@ -1124,6 +1124,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void setUsingWhiteList(boolean whitelistEnabled) {
|
||||
|
|
|
@ -26,10 +26,10 @@ index bf72cf288ade52ee8cc41ca978f368b3ad575951..798999be50d26be357ef3c6d5b9383ce
|
|||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e9d08662c065d04a67918f0aa2cd4fde5798f2a6..a6a21def1ae0d35fa106da6242c49a0928e4eda5 100644
|
||||
index db8596ebc38ea16f26df335b83002be18b4f36a0..6351a5560975803fb0b0e915493702f4a837660c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1207,6 +1207,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1183,6 +1183,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return true;
|
||||
}
|
||||
// Paper end - extra debug info
|
||||
|
@ -38,10 +38,10 @@ index e9d08662c065d04a67918f0aa2cd4fde5798f2a6..a6a21def1ae0d35fa106da6242c49a09
|
|||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 00c43d7b846e97e2cc2105c93be5ce918fafd775..8f90e8cd36348089799097807ead774e186c2604 100644
|
||||
index 29512882bc53d7e364a6ce29a57876b51d45782a..018c5d1783f0384c460778a6014af946285e1274 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -223,6 +223,11 @@ public abstract class PlayerList {
|
||||
@@ -222,6 +222,11 @@ public abstract class PlayerList {
|
||||
worldserver1 = worldserver;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ index 00c43d7b846e97e2cc2105c93be5ce918fafd775..8f90e8cd36348089799097807ead774e
|
|||
player.setServerLevel(worldserver1);
|
||||
String s1 = connection.getLoggableAddress(this.server.logIPs());
|
||||
|
||||
@@ -348,7 +353,7 @@ public abstract class PlayerList {
|
||||
@@ -347,7 +352,7 @@ public abstract class PlayerList {
|
||||
CompoundTag nbttagcompound = ((CompoundTag) optional.get()).getCompound("RootVehicle");
|
||||
ServerLevel finalWorldServer = worldserver1; // CraftBukkit - decompile error
|
||||
Entity entity = EntityType.loadEntityRecursive(nbttagcompound.getCompound("Entity"), worldserver1, (entity1) -> {
|
||||
|
@ -63,7 +63,7 @@ index 00c43d7b846e97e2cc2105c93be5ce918fafd775..8f90e8cd36348089799097807ead774e
|
|||
|
||||
if (entity != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2e376b0b2bf2d49ad0669b6e6fd287628a72ea64..869cd3723c6704e7512f4637682476b8af9f0264 100644
|
||||
index 026af10f7de0267c7335385fea53a823f3898e8b..80c4b60ddd68f2c9343d0f11db9e4242147915f1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -247,6 +247,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerPostRespawnEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 8f90e8cd36348089799097807ead774e186c2604..f0cc34002e260567322d7acaf803f43a8b92e563 100644
|
||||
index 018c5d1783f0384c460778a6014af946285e1274..f1e932c987616c529ec3957b3f4070927c8c24c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -738,6 +738,10 @@ public abstract class PlayerList {
|
||||
@@ -737,6 +737,10 @@ public abstract class PlayerList {
|
||||
|
||||
entityplayer1.addTag(s);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ index 8f90e8cd36348089799097807ead774e186c2604..f0cc34002e260567322d7acaf803f43a
|
|||
|
||||
// CraftBukkit start - fire PlayerRespawnEvent
|
||||
DimensionTransition dimensiontransition;
|
||||
@@ -745,6 +749,7 @@ public abstract class PlayerList {
|
||||
@@ -744,6 +748,7 @@ public abstract class PlayerList {
|
||||
dimensiontransition = entityplayer.findRespawnPositionAndUseSpawnBlock(flag, DimensionTransition.DO_NOTHING, reason);
|
||||
|
||||
if (!flag) entityplayer.reset(); // SPIGOT-4785
|
||||
|
@ -27,7 +27,7 @@ index 8f90e8cd36348089799097807ead774e186c2604..f0cc34002e260567322d7acaf803f43a
|
|||
} else {
|
||||
dimensiontransition = new DimensionTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3.ZERO, location.getYaw(), location.getPitch(), DimensionTransition.DO_NOTHING);
|
||||
}
|
||||
@@ -795,6 +800,11 @@ public abstract class PlayerList {
|
||||
@@ -794,6 +799,11 @@ public abstract class PlayerList {
|
||||
if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
|
||||
entityplayer1.connection.send(new ClientboundSoundPacket(SoundEvents.RESPAWN_ANCHOR_DEPLETE, SoundSource.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F, worldserver.getRandom().nextLong()));
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ index 8f90e8cd36348089799097807ead774e186c2604..f0cc34002e260567322d7acaf803f43a
|
|||
}
|
||||
// Added from changeDimension
|
||||
this.sendAllPlayerInfo(entityplayer); // Update health, etc...
|
||||
@@ -816,6 +826,13 @@ public abstract class PlayerList {
|
||||
@@ -815,6 +825,13 @@ public abstract class PlayerList {
|
||||
if (entityplayer.connection.isDisconnected()) {
|
||||
this.save(entityplayer);
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
|
|||
Use the PlayerList map instead of iterating over all players
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index a6a21def1ae0d35fa106da6242c49a0928e4eda5..c85d5b941b5cb1c37cd2619d419006c5956f6eaf 100644
|
||||
index 6351a5560975803fb0b0e915493702f4a837660c..1efc5554e422d4c4c4df3aae768920e06bfd6674 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -330,6 +330,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -328,6 +328,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
|
|||
Also ignores Enderdragon, defaulting it to Mojang's setting
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index a58a68220e077ce23c20cf61d63f51183df1dfc9..6159ab8831a233c21aad48c64ef76b06c1955bb0 100644
|
||||
index 8c64ea9f10902a6cd2a82c0e45786e1901d3d4ff..741f7edafb79934c05710ebeb36f93b1d6339770 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1546,6 +1546,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1540,6 +1540,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
int j = entity.getType().clientTrackingRange() * 16;
|
||||
|
|
|
@ -302,7 +302,7 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 1049452baaf0381ffbf15b30da956c2a1994da35..60f678c26fb5144386d8697ddfd5b6d841563b6f 100644
|
||||
index cfdc91f4b5b7e387c701831da2fbca5e79b6de24..43bee0018fac84e05d4c63dc703cdd09938f0002 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -206,6 +206,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
@ -314,10 +314,10 @@ index 1049452baaf0381ffbf15b30da956c2a1994da35..60f678c26fb5144386d8697ddfd5b6d8
|
|||
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
||||
this.level.timings.syncChunkLoad.stopTiming(); // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c85d5b941b5cb1c37cd2619d419006c5956f6eaf..f1fa4cb11f69e248dd55b8aa69f5d07268f182a1 100644
|
||||
index 1efc5554e422d4c4c4df3aae768920e06bfd6674..d173b6192b843c4ecad72d93824cca523b3fa80d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -422,6 +422,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -420,6 +420,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
|
|||
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index b15cee6f21ff300b596922a8eed35a5f8a89fe22..d6dc8c983d26ce89f17a990be4284fdc78ad164b 100644
|
||||
index ef6324dbb7e311ac16c64f937dee64c777f4b54e..1c8959a80ac76dc2fcb5fdaf8dbe064e592645e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -416,11 +416,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -414,11 +414,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
if (this.rconThread != null) {
|
||||
|
|
|
@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
|
|||
Stack will identify any causer of this and warn instead of crashing.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 6159ab8831a233c21aad48c64ef76b06c1955bb0..ee3a5b2f2f1591f68bbacea01b8eafed65c29356 100644
|
||||
index 741f7edafb79934c05710ebeb36f93b1d6339770..13c3d7fd782a945cd52a2c190b12ab38982983d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1241,6 +1241,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1239,6 +1239,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
public void addEntity(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
|
||||
|
@ -25,10 +25,10 @@ index 6159ab8831a233c21aad48c64ef76b06c1955bb0..ee3a5b2f2f1591f68bbacea01b8eafed
|
|||
EntityType<?> entitytypes = entity.getType();
|
||||
int i = entitytypes.clientTrackingRange() * 16;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index f1fa4cb11f69e248dd55b8aa69f5d07268f182a1..89e05d9316b012a5c8103682ff9dbeae757f4f57 100644
|
||||
index d173b6192b843c4ecad72d93824cca523b3fa80d..10c2ae20078895f9079f2a5cb825505176ff11c6 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2149,7 +2149,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2125,7 +2125,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTrackingStart(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
||||
|
@ -37,7 +37,7 @@ index f1fa4cb11f69e248dd55b8aa69f5d07268f182a1..89e05d9316b012a5c8103682ff9dbeae
|
|||
if (entity instanceof ServerPlayer entityplayer) {
|
||||
ServerLevel.this.players.add(entityplayer);
|
||||
ServerLevel.this.updateSleepingPlayerList();
|
||||
@@ -2179,6 +2179,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2155,6 +2155,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
entity.valid = true; // CraftBukkit
|
||||
|
|
|
@ -35,10 +35,10 @@ index 613eefeb44beb35181243b570bad631f15802918..9b6887f40dea57d4b5e2f08d7645b1ed
|
|||
this.gameMode.setLevel((ServerLevel) world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index f0cc34002e260567322d7acaf803f43a8b92e563..8b0c098c795c5a57fce96ad5d98ac8436024cda9 100644
|
||||
index f1e932c987616c529ec3957b3f4070927c8c24c0..2138bc59ba47f6d3570dcacabc5e4eae08c7e9a7 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -226,6 +226,7 @@ public abstract class PlayerList {
|
||||
@@ -225,6 +225,7 @@ public abstract class PlayerList {
|
||||
// Paper start - Entity#getEntitySpawnReason
|
||||
if (optional.isEmpty()) {
|
||||
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
|
||||
|
|
|
@ -31,10 +31,10 @@ delays anymore.
|
|||
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index ee3a5b2f2f1591f68bbacea01b8eafed65c29356..bac8e53cab360142f224965e68d8f9e6ae0c15f6 100644
|
||||
index 13c3d7fd782a945cd52a2c190b12ab38982983d5..1964737c16ffcc1b1d751172f9a1dcd7caf7c812 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1248,6 +1248,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1246,6 +1246,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return;
|
||||
}
|
||||
// Paper end - ignore and warn about illegal addEntity calls instead of crashing server
|
||||
|
@ -55,10 +55,10 @@ index a794131746c6cfdcbeeb64b31fb122a38be085c1..f0103bcfb29b9fed41c7642620d78fe7
|
|||
// CraftBukkit end
|
||||
public boolean isRealPlayer; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 8b0c098c795c5a57fce96ad5d98ac8436024cda9..ed0ffff1cfc25f66e1947e40008c6c7259b17019 100644
|
||||
index 2138bc59ba47f6d3570dcacabc5e4eae08c7e9a7..dfc957d73ed966e1fc20586c978467267606d371 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -297,6 +297,12 @@ public abstract class PlayerList {
|
||||
@@ -296,6 +296,12 @@ public abstract class PlayerList {
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
|
||||
|
||||
|
@ -71,7 +71,7 @@ index 8b0c098c795c5a57fce96ad5d98ac8436024cda9..ed0ffff1cfc25f66e1947e40008c6c72
|
|||
// CraftBukkit start
|
||||
CraftPlayer bukkitPlayer = player.getBukkitEntity();
|
||||
|
||||
@@ -335,6 +341,8 @@ public abstract class PlayerList {
|
||||
@@ -334,6 +340,8 @@ public abstract class PlayerList {
|
||||
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
|
||||
}
|
||||
player.sentListPacket = true;
|
||||
|
@ -80,7 +80,7 @@ index 8b0c098c795c5a57fce96ad5d98ac8436024cda9..ed0ffff1cfc25f66e1947e40008c6c72
|
|||
// CraftBukkit end
|
||||
|
||||
player.refreshEntityData(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
@@ -350,6 +358,11 @@ public abstract class PlayerList {
|
||||
@@ -349,6 +357,11 @@ public abstract class PlayerList {
|
||||
worldserver1 = player.serverLevel(); // CraftBukkit - Update in case join event changed it
|
||||
// CraftBukkit end
|
||||
this.sendActivePlayerEffects(player);
|
||||
|
@ -92,7 +92,7 @@ index 8b0c098c795c5a57fce96ad5d98ac8436024cda9..ed0ffff1cfc25f66e1947e40008c6c72
|
|||
if (optional.isPresent() && ((CompoundTag) optional.get()).contains("RootVehicle", 10)) {
|
||||
CompoundTag nbttagcompound = ((CompoundTag) optional.get()).getCompound("RootVehicle");
|
||||
ServerLevel finalWorldServer = worldserver1; // CraftBukkit - decompile error
|
||||
@@ -396,6 +409,10 @@ public abstract class PlayerList {
|
||||
@@ -395,6 +408,10 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ Co-authored-by: Wyatt Childers <wchilders@nearce.com>
|
|||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index ed0ffff1cfc25f66e1947e40008c6c7259b17019..51426da5f3e7b9f8631880a04cef0a58b00233df 100644
|
||||
index dfc957d73ed966e1fc20586c978467267606d371..976fcf4f3f06805aeb9705b1f08f5621d32ac7a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -197,6 +197,7 @@ public abstract class PlayerList {
|
||||
@@ -196,6 +196,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
Optional<CompoundTag> optional = this.load(player); // CraftBukkit - decompile error
|
||||
|
@ -21,7 +21,7 @@ index ed0ffff1cfc25f66e1947e40008c6c7259b17019..51426da5f3e7b9f8631880a04cef0a58
|
|||
// CraftBukkit start - Better rename detection
|
||||
if (optional.isPresent()) {
|
||||
CompoundTag nbttagcompound = optional.get();
|
||||
@@ -206,19 +207,47 @@ public abstract class PlayerList {
|
||||
@@ -205,19 +206,47 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -72,7 +72,7 @@ index ed0ffff1cfc25f66e1947e40008c6c7259b17019..51426da5f3e7b9f8631880a04cef0a58
|
|||
} else {
|
||||
worldserver1 = worldserver;
|
||||
}
|
||||
@@ -226,6 +255,10 @@ public abstract class PlayerList {
|
||||
@@ -225,6 +254,10 @@ public abstract class PlayerList {
|
||||
// Paper start - Entity#getEntitySpawnReason
|
||||
if (optional.isEmpty()) {
|
||||
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
|
||||
|
@ -84,7 +84,7 @@ index ed0ffff1cfc25f66e1947e40008c6c7259b17019..51426da5f3e7b9f8631880a04cef0a58
|
|||
}
|
||||
// Paper end - Entity#getEntitySpawnReason
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 981b4d28f5f8c614b623f1482551d0f9281807f6..61ae5553a22adc84acbe2962632b8f564ed80d88 100644
|
||||
index 46ebb4158728311c6812485bc5080dadbd63585e..e61c92d4d510eeb93ad0d72f779f6ac9c3a722f1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2386,27 +2386,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 151f078ab6081637189d3d532718dac0ec5e46df..090b42aba7353d232a210d67936d024d00388047 100644
|
||||
index 6109ff50349a9054f319faf7bb28ee55dd40ee71..fef2cc3c5f1516792784820cff627e0fbb80236b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3058,16 +3058,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3054,16 +3054,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
if (!this.player.containerMenu.stillValid(this.player)) {
|
||||
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
|
||||
} else {
|
||||
|
|
|
@ -63,10 +63,10 @@ index 997a96a21440ae72696d68f8031ece4ba487d3ef..3d8584929cee000ae7df10c5bd94f358
|
|||
return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
|
||||
}, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index d6dc8c983d26ce89f17a990be4284fdc78ad164b..2b1d7a2360a9ee7bca9d93a2dc8c61d1648a8348 100644
|
||||
index 1c8959a80ac76dc2fcb5fdaf8dbe064e592645e7..dc7be5f98913fc61c6ab83d9575bbb1f5c1ff893 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -350,7 +350,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -348,7 +348,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public void forceDifficulty() {
|
||||
|
@ -76,10 +76,10 @@ index d6dc8c983d26ce89f17a990be4284fdc78ad164b..2b1d7a2360a9ee7bca9d93a2dc8c61d1
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 01def06cf90faaf67421b6e5a87f4c47dd4c1142..9f28c9f2e8f8323aa374c2ac5e7610b825890b18 100644
|
||||
index 569600def358c67cd6671d51af769f7dd00ade74..e5d8fed29d06ac9eb5b750eed9c5c50f86f3d774 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3261,7 +3261,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3257,7 +3257,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9f28c9f2e8f8323aa374c2ac5e7610b825890b18..762998180eb7b10151f390ee79690c68d66622f2 100644
|
||||
index e5d8fed29d06ac9eb5b750eed9c5c50f86f3d774..edeea9ec3f83c46fd7b42f9817a6a97c20adf875 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3253,6 +3253,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3249,6 +3249,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@Override
|
||||
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 89e05d9316b012a5c8103682ff9dbeae757f4f57..9114ba1742a4fc8683848d431fa92046a85fe871 100644
|
||||
index 10c2ae20078895f9079f2a5cb825505176ff11c6..f9ed66aa106029acc28fe2cb0ad4199f5ee15d9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1666,7 +1666,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1642,7 +1642,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
float f1 = this.levelData.getSpawnAngle();
|
||||
|
||||
if (!blockposition1.equals(pos) || f1 != angle) {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 9114ba1742a4fc8683848d431fa92046a85fe871..c60967b7833a23cff0305219b02b308d92448109 100644
|
||||
index f9ed66aa106029acc28fe2cb0ad4199f5ee15d9d..ec524ff64659de67781bb92bab9bb847c672e5ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1228,6 +1228,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1204,6 +1204,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -52,10 +52,10 @@ index a3c67bdc2c08b3550534f37d15b0db90b479e34f..24bf661e76fb421a8be565d9ea68edf7
|
|||
this.connection.disconnect(disconnectiondetails);
|
||||
}));
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 51426da5f3e7b9f8631880a04cef0a58b00233df..ec080eb8e3930b6c5cc08c3061535b379a99a7d1 100644
|
||||
index 976fcf4f3f06805aeb9705b1f08f5621d32ac7a9..f09052503fc17e651b8da7ea7dad9ef3eab43032 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -570,7 +570,7 @@ public abstract class PlayerList {
|
||||
@@ -569,7 +569,7 @@ public abstract class PlayerList {
|
||||
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper - Inventory close reason
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7a743d81c387179218c519a7e27702605069caeb..a0bac2fe6222964b098cfaf9470f09c43328fcf5 100644
|
||||
index eed1f126921f25b15cbb66734f38909ae5d7a69a..9229e9e7eee12806c3929b55243d5ea66ce7e6a1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -266,6 +266,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -24,7 +24,7 @@ index 7a743d81c387179218c519a7e27702605069caeb..a0bac2fe6222964b098cfaf9470f09c4
|
|||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -3070,6 +3072,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3066,6 +3068,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
||||
|
|
|
@ -11,7 +11,7 @@ Subject: [PATCH] Fix interact event not being called sometimes
|
|||
Co-authored-by: Moulberry <james.jenour@protonmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a0bac2fe6222964b098cfaf9470f09c43328fcf5..09e40d6e50b7c1ddd1451981d05ecbbef43cfed2 100644
|
||||
index 9229e9e7eee12806c3929b55243d5ea66ce7e6a1..e005d1cff2d2bfef78843062390fce5dc32689f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1771,7 +1771,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -23,7 +23,7 @@ index a0bac2fe6222964b098cfaf9470f09c43328fcf5..09e40d6e50b7c1ddd1451981d05ecbbe
|
|||
this.player.swing(enumhand, true);
|
||||
}
|
||||
}
|
||||
@@ -2392,13 +2392,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2388,13 +2388,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
double d3 = Math.max(this.player.blockInteractionRange(), this.player.entityInteractionRange());
|
||||
// SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time
|
||||
// SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c60967b7833a23cff0305219b02b308d92448109..373560fc82e491e6c8b755fecfe78d49a2fc3e2f 100644
|
||||
index ec524ff64659de67781bb92bab9bb847c672e5ec..b6f2f9c05b15d0d8f66208da47d3e265747f3103 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1741,6 +1741,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1717,6 +1717,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
});
|
||||
optional1.ifPresent((holder) -> {
|
||||
this.getServer().execute(() -> {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index ec080eb8e3930b6c5cc08c3061535b379a99a7d1..846132dad557b04a3d52184cfb1c0dd35673f8c6 100644
|
||||
index f09052503fc17e651b8da7ea7dad9ef3eab43032..c0db13dfe63841819e62962e8328369914a0ea2d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -595,6 +595,14 @@ public abstract class PlayerList {
|
||||
@@ -594,6 +594,14 @@ public abstract class PlayerList {
|
||||
PlayerList.LOGGER.debug("Removing player mount");
|
||||
entityplayer.stopRiding();
|
||||
entity.getPassengersAndSelf().forEach((entity1) -> {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 846132dad557b04a3d52184cfb1c0dd35673f8c6..5100b2d00452f97849239ca32164eed4345e4024 100644
|
||||
index c0db13dfe63841819e62962e8328369914a0ea2d..42acf1c7a16725def4f721149c64cc4a93e5110a 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1062,6 +1062,11 @@ public abstract class PlayerList {
|
||||
@@ -1061,6 +1061,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) {
|
||||
|
@ -20,7 +20,7 @@ index 846132dad557b04a3d52184cfb1c0dd35673f8c6..5100b2d00452f97849239ca32164eed4
|
|||
if (player.connection != null) {
|
||||
byte b0;
|
||||
|
||||
@@ -1076,8 +1081,10 @@ public abstract class PlayerList {
|
||||
@@ -1075,8 +1080,10 @@ public abstract class PlayerList {
|
||||
player.connection.send(new ClientboundEntityEventPacket(player, b0));
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ index 846132dad557b04a3d52184cfb1c0dd35673f8c6..5100b2d00452f97849239ca32164eed4
|
|||
|
||||
public boolean isWhiteListed(GameProfile profile) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 766242aa6930b37630be77e421b4b5675c5feb0d..7652da85170cd5a64d1b443430b85c388e2939a9 100644
|
||||
index a3b1a19fb28dfba93ae04ea0859f744ede1579f6..963ae66acc25602e15134d30d3e496802b17dc41 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -677,6 +677,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -17,10 +17,10 @@ index 84028b8ad189407f89fbdd63d3e185c86335b596..d38cc3e642eb33759175227fbf86ed25
|
|||
this.profiler.push(() -> {
|
||||
String s = String.valueOf(worldserver);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 373560fc82e491e6c8b755fecfe78d49a2fc3e2f..644341b8bc3079c6f092226acd11667f64bd55a1 100644
|
||||
index b6f2f9c05b15d0d8f66208da47d3e265747f3103..421e38846465dc8cc3487206f26661fa88ef7e7b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -228,6 +228,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -226,6 +226,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper - BlockPhysicsEvent
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 644341b8bc3079c6f092226acd11667f64bd55a1..1fe013b94cf1b5332f1e4645dd35df01e11fe0d9 100644
|
||||
index 421e38846465dc8cc3487206f26661fa88ef7e7b..9c54d611b41a5ee3c86f181bae1219452b93b0a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1374,6 +1374,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1350,6 +1350,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.getChunkSource().blockChanged(pos);
|
||||
this.pathTypesByPosCache.invalidate(pos);
|
||||
|
@ -16,7 +16,7 @@ index 644341b8bc3079c6f092226acd11667f64bd55a1..1fe013b94cf1b5332f1e4645dd35df01
|
|||
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
||||
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
|
||||
|
||||
@@ -1415,6 +1416,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1391,6 +1392,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ index 929f59bce01c8e6ed4b0b551744d42e131b8fc80..22c4f8dea99f92a1eb3da2baf0a15bf9
|
|||
this.saveUserBanList();
|
||||
this.loadIpBanList();
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 2b1d7a2360a9ee7bca9d93a2dc8c61d1648a8348..d5153f804cfcfd1a70c46975e3fb1e50c8a82999 100644
|
||||
index dc7be5f98913fc61c6ab83d9575bbb1f5c1ff893..9294d7e9d3056e1680de65385df1ed89b5c2b77a 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -216,6 +216,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -214,6 +214,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
|
@ -37,7 +37,7 @@ index 2b1d7a2360a9ee7bca9d93a2dc8c61d1648a8348..d5153f804cfcfd1a70c46975e3fb1e50
|
|||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
@@ -270,9 +276,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -268,9 +274,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
}
|
||||
|
||||
|
@ -48,10 +48,10 @@ index 2b1d7a2360a9ee7bca9d93a2dc8c61d1648a8348..d5153f804cfcfd1a70c46975e3fb1e50
|
|||
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 5100b2d00452f97849239ca32164eed4345e4024..6ef0e5c607c1b7ef9ba6a9f5c7bc452ce9a84250 100644
|
||||
index 42acf1c7a16725def4f721149c64cc4a93e5110a..ba7994c074f9a44940024964f138aadaabc36e26 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -179,6 +179,7 @@ public abstract class PlayerList {
|
||||
@@ -178,6 +178,7 @@ public abstract class PlayerList {
|
||||
this.maxPlayers = maxPlayers;
|
||||
this.playerIo = saveHandler;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
|
|||
Closes #5036
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 6ef0e5c607c1b7ef9ba6a9f5c7bc452ce9a84250..7ef760cb1c88f557947e9b88409a2935666f86f0 100644
|
||||
index ba7994c074f9a44940024964f138aadaabc36e26..8221db7d0440e0f30208a5bc9245b14b0509a654 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -588,6 +588,14 @@ public abstract class PlayerList {
|
||||
@@ -587,6 +587,14 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end - Configurable player collision
|
||||
|
||||
|
|
|
@ -208,10 +208,10 @@ index 0000000000000000000000000000000000000000..dd9d77d7c7f1a5a130a1f4c15e5b1e68
|
|||
+ public void setErrorIndex(final int errorIndex) {}
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index d5153f804cfcfd1a70c46975e3fb1e50c8a82999..764395fe8e49d811294ca82887fee91ca6cd01fc 100644
|
||||
index 9294d7e9d3056e1680de65385df1ed89b5c2b77a..c8e88e83063bbd9d0b4e6facdf76faf67affb0bd 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -190,7 +190,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -188,7 +188,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
thread.setDaemon(true);
|
||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
|
||||
|
@ -220,7 +220,7 @@ index d5153f804cfcfd1a70c46975e3fb1e50c8a82999..764395fe8e49d811294ca82887fee91c
|
|||
DedicatedServer.LOGGER.info("Starting minecraft server version {}", SharedConstants.getCurrentVersion().getName());
|
||||
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
|
||||
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
@@ -223,6 +223,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -221,6 +221,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.getPlayerList().loadAndSaveFiles(); // Must be after convertNames
|
||||
// Paper end - fix converting txt to json file
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
|
||||
|
|
|
@ -42,10 +42,10 @@ index 0000000000000000000000000000000000000000..dd6012b6a097575b2d1471be5069ecce
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 764395fe8e49d811294ca82887fee91ca6cd01fc..4057ade698a227b4f6efd3aa30b16d78c777be83 100644
|
||||
index c8e88e83063bbd9d0b4e6facdf76faf67affb0bd..7fe509f14b39ac6f52ae2a9267921aead2d9af73 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -227,6 +227,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -225,6 +225,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
|
|
|
@ -134,10 +134,10 @@ index 5de472df78940d1b8320f73d18b2edf3a796227e..073cf184a0e7af41048ae67a9b17b4cd
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 699658bd80eb88907041efb01d31e4051edb91de..58e5acbd00c4f8c0fcafa4f2c21b6a9f4dcc4151 100644
|
||||
index 0437a0ab7525671cfae26c5bf981fdecd5da0cc7..f171e4441033ab8d81b45e8c1fd7a0d6ca89e268 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2732,7 +2732,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2728,7 +2728,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.player = this.server.getPlayerList().respawn(this.player, false, Entity.RemovalReason.KILLED, RespawnReason.DEATH); // CraftBukkit
|
||||
if (this.server.isHardcore()) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Unix domain socket support
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 4057ade698a227b4f6efd3aa30b16d78c777be83..adbd61c41cc30afa89c6ee3544c562b351304a01 100644
|
||||
index 7fe509f14b39ac6f52ae2a9267921aead2d9af73..6e895a0458031f0ad18615fe49368d34af70ad27 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -236,6 +236,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -234,6 +234,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.setEnforceWhitelist(dedicatedserverproperties.enforceWhitelist);
|
||||
// this.worldData.setGameType(dedicatedserverproperties.gamemode); // CraftBukkit - moved to world loading
|
||||
DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode);
|
||||
|
@ -29,7 +29,7 @@ index 4057ade698a227b4f6efd3aa30b16d78c777be83..adbd61c41cc30afa89c6ee3544c562b3
|
|||
InetAddress inetaddress = null;
|
||||
|
||||
if (!this.getLocalIp().isEmpty()) {
|
||||
@@ -245,12 +259,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -243,12 +257,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
if (this.getPort() < 0) {
|
||||
this.setPort(dedicatedserverproperties.serverPort);
|
||||
}
|
||||
|
@ -87,10 +87,10 @@ index d6d7f1c446ba5507f67038ff27775ba75156f4a7..c63c194c44646e6bc1a5942655278701
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e713a2abca824e92a4922c34fca8c1f0bfdcdf68..ada5016ee354e799a8241a0706ea04e236efd1eb 100644
|
||||
index 96e7cd653bd9655f4fe70d4ca7f396aae6c603fa..ce0b0e1483f4c142d3316ba8c2899f6ed85f4b75 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2551,6 +2551,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2547,6 +2547,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Spigot Start
|
||||
public SocketAddress getRawAddress()
|
||||
{
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1fe013b94cf1b5332f1e4645dd35df01e11fe0d9..055650b315d53b56798ded7af2054c3e8e3ee319 100644
|
||||
index 9c54d611b41a5ee3c86f181bae1219452b93b0a3..7d8b3673ad03396a10e272edcae57227451cbbb5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -441,8 +441,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -439,8 +439,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.serverLevelData.setClearWeatherTime(clearDuration);
|
||||
this.serverLevelData.setRainTime(rainDuration);
|
||||
this.serverLevelData.setThunderTime(rainDuration);
|
||||
|
@ -19,7 +19,7 @@ index 1fe013b94cf1b5332f1e4645dd35df01e11fe0d9..055650b315d53b56798ded7af2054c3e
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -875,8 +875,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -865,8 +865,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.serverLevelData.setThunderTime(j);
|
||||
this.serverLevelData.setRainTime(k);
|
||||
this.serverLevelData.setClearWeatherTime(i);
|
||||
|
@ -30,7 +30,7 @@ index 1fe013b94cf1b5332f1e4645dd35df01e11fe0d9..055650b315d53b56798ded7af2054c3e
|
|||
}
|
||||
|
||||
this.oThunderLevel = this.thunderLevel;
|
||||
@@ -943,14 +943,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -933,14 +933,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@VisibleForTesting
|
||||
public void resetWeatherCycle() {
|
||||
// CraftBukkit start
|
||||
|
|
|
@ -218,7 +218,7 @@ index 24bf661e76fb421a8be565d9ea68edf7205254d2..feb529adf2168025c785ab92d95a3246
|
|||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8fba97228 100644
|
||||
index ce0b0e1483f4c142d3316ba8c2899f6ed85f4b75..851440862e29e3666e4270577287edcc43fb56a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -349,7 +349,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -355,7 +355,7 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
}
|
||||
|
||||
return optional;
|
||||
@@ -2363,7 +2363,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2359,7 +2359,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// this.chatSpamTickCount += 20;
|
||||
if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) {
|
||||
// CraftBukkit end
|
||||
|
@ -364,7 +364,7 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
}
|
||||
|
||||
}
|
||||
@@ -2375,7 +2375,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2371,7 +2371,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
synchronized (this.lastSeenMessages) {
|
||||
if (!this.lastSeenMessages.applyOffset(packet.offset())) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
|
||||
|
@ -373,7 +373,7 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
}
|
||||
|
||||
}
|
||||
@@ -2523,7 +2523,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2519,7 +2519,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
if (i > 4096) {
|
||||
|
@ -382,7 +382,7 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
}
|
||||
|
||||
}
|
||||
@@ -2581,7 +2581,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2577,7 +2577,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Spigot Start
|
||||
if ( entity == this.player && !this.player.isSpectator() )
|
||||
{
|
||||
|
@ -391,7 +391,7 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
return;
|
||||
}
|
||||
// Spigot End
|
||||
@@ -2695,7 +2695,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2691,7 +2691,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
|
||||
}
|
||||
});
|
||||
@@ -3092,7 +3092,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3088,7 +3088,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Paper start - auto recipe limit
|
||||
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
||||
|
@ -409,7 +409,7 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
return;
|
||||
}
|
||||
}
|
||||
@@ -3334,7 +3334,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3330,7 +3330,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
if (!Objects.equals(profilepublickey_a, profilepublickey_a1)) {
|
||||
if (profilepublickey_a != null && profilepublickey_a1.expiresAt().isBefore(profilepublickey_a.expiresAt())) {
|
||||
|
@ -418,7 +418,7 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
} else {
|
||||
try {
|
||||
SignatureValidator signaturevalidator = this.server.getProfileKeySignatureValidator();
|
||||
@@ -3347,7 +3347,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3343,7 +3343,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
|
||||
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage());
|
||||
|
@ -428,10 +428,10 @@ index ada5016ee354e799a8241a0706ea04e236efd1eb..70b215dfbe53bd475192ca1d021032c8
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 0cbd4e6bc9b3695fd2ff0b943a69b8fd393e0f36..46f46685081c3c164bd4ba306dfb1220a4e13e52 100644
|
||||
index 8221db7d0440e0f30208a5bc9245b14b0509a654..b4161803c5513927ae222027e5a49b6201c17659 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -675,7 +675,7 @@ public abstract class PlayerList {
|
||||
@@ -674,7 +674,7 @@ public abstract class PlayerList {
|
||||
while (iterator.hasNext()) {
|
||||
entityplayer = (ServerPlayer) iterator.next();
|
||||
this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
|
||||
|
@ -440,7 +440,7 @@ index 0cbd4e6bc9b3695fd2ff0b943a69b8fd393e0f36..46f46685081c3c164bd4ba306dfb1220
|
|||
}
|
||||
|
||||
// Instead of kicking then returning, we need to store the kick reason
|
||||
@@ -1273,7 +1273,7 @@ public abstract class PlayerList {
|
||||
@@ -1270,7 +1270,7 @@ public abstract class PlayerList {
|
||||
// Paper end
|
||||
// CraftBukkit start - disconnect safely
|
||||
for (ServerPlayer player : this.players) {
|
||||
|
|
|
@ -8,10 +8,10 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
|
|||
load in that case).
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 055650b315d53b56798ded7af2054c3e8e3ee319..c72687fb23e8d01639cce7d79e3f97805d51e01f 100644
|
||||
index 7d8b3673ad03396a10e272edcae57227451cbbb5..e18d21d910d1ef285d55fca98ee55899db29c36a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -231,7 +231,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -229,7 +229,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public boolean hasEntityMoveEvent; // Paper - Add EntityMoveEvent
|
||||
|
||||
public LevelChunk getChunkIfLoaded(int x, int z) {
|
||||
|
@ -21,7 +21,7 @@ index 055650b315d53b56798ded7af2054c3e8e3ee319..c72687fb23e8d01639cce7d79e3f9780
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index cfd5d3e50197b38d0ffef6debbb7f5b4b208382a..ed1fc466151ebebf7c3ac135c6893f4ea9a55a52 100644
|
||||
index 144d243e0d6ba3ae3f0b0bf457fa516e2b4f416f..20a14b4163807b806bf2ce5a88d3c35098bed929 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -180,6 +180,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerArmSwingEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 70b215dfbe53bd475192ca1d021032c8fba97228..0a5cad166e852888208125a80b5e2d5e7e9a3a82 100644
|
||||
index 851440862e29e3666e4270577287edcc43fb56a8..60e37011a6dcf9a2942b3e66016b00e64fcb309b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2413,7 +2413,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2409,7 +2409,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
} // Paper end - Call interact event
|
||||
|
||||
// Arm swing animation
|
||||
|
|
|
@ -55,7 +55,7 @@ index feb529adf2168025c785ab92d95a3246e73c0236..b43f87ff4b9853b5d4bbea5ff9686d64
|
|||
MinecraftServer minecraftserver = this.server;
|
||||
Connection networkmanager = this.connection;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0a5cad166e852888208125a80b5e2d5e7e9a3a82..dd728c297335581ad69c94f768ec5201b7879264 100644
|
||||
index 60e37011a6dcf9a2942b3e66016b00e64fcb309b..efa60d1b6e16e53e0d490f82aa53a126ff75024e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1895,6 +1895,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -101,10 +101,10 @@ index 0a5cad166e852888208125a80b5e2d5e7e9a3a82..dd728c297335581ad69c94f768ec5201
|
|||
this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 0474b88416e0d016da38909196d32fe992b37d00..5b449dd681390eb7aee229a3b6366dcbb96ce2d7 100644
|
||||
index b4161803c5513927ae222027e5a49b6201c17659..68efe36118e95c84c469a92f069e1ec8624cbc14 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -561,6 +561,11 @@ public abstract class PlayerList {
|
||||
@@ -560,6 +560,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // CraftBukkit - return string // Paper - return Component
|
||||
|
|
|
@ -154,10 +154,10 @@ index e9eec0e4e2e533e4ddc7f52a16a1b2b1ce21d6da..db4bdce4eae9a91babe95c28cb0f6c96
|
|||
|
||||
public SectionPos getLastSectionPos() {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 5b449dd681390eb7aee229a3b6366dcbb96ce2d7..2eced5d3b539dfd072b8b4eafb34f21f849b1bd5 100644
|
||||
index 68efe36118e95c84c469a92f069e1ec8624cbc14..e2dd64e0b3e24c30869efb438287930c1d595f9e 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -841,7 +841,7 @@ public abstract class PlayerList {
|
||||
@@ -840,7 +840,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit end
|
||||
if (dimensiontransition.missingRespawnBlock()) {
|
||||
entityplayer1.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
|
||||
|
|
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
|
|||
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c72687fb23e8d01639cce7d79e3f97805d51e01f..778d3f3ea2247be5bd6edd382b872f6de5bc359c 100644
|
||||
index e18d21d910d1ef285d55fca98ee55899db29c36a..d9677c4306f7efe302388f10289751f37b2e82b5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -764,6 +764,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -754,6 +754,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
protected BlockPos findLightningTargetAround(BlockPos pos) {
|
||||
|
@ -22,7 +22,7 @@ index c72687fb23e8d01639cce7d79e3f97805d51e01f..778d3f3ea2247be5bd6edd382b872f6d
|
|||
BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos);
|
||||
Optional<BlockPos> optional = this.findLightningRod(blockposition1);
|
||||
|
||||
@@ -778,6 +783,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -768,6 +773,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (!list.isEmpty()) {
|
||||
return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition();
|
||||
} else {
|
||||
|
|
|
@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/
|
|||
state desync POV because the TE is getting unloaded anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 778d3f3ea2247be5bd6edd382b872f6de5bc359c..de154106419d57a6b6c410fedc29cec1dbe532de 100644
|
||||
index d9677c4306f7efe302388f10289751f37b2e82b5..7eb5d2163a98e2b622bdceea04b0fd8a5b129377 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1274,9 +1274,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1250,9 +1250,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
|
|
|
@ -7,10 +7,10 @@ Reference2BooleanOpenHashMap is going to have
|
|||
better lookups than HashMap.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index bac8e53cab360142f224965e68d8f9e6ae0c15f6..b953def299faf1a13e1893d17a476f36e2d6337a 100644
|
||||
index 1964737c16ffcc1b1d751172f9a1dcd7caf7c812..a7056adac02027c2892b02702020a227f05e43d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1462,7 +1462,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1456,7 +1456,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
final Entity entity;
|
||||
private final int range;
|
||||
SectionPos lastSectionPos;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index de154106419d57a6b6c410fedc29cec1dbe532de..3c947dc0aea06d66a00aeca51355ea41e8d98f88 100644
|
||||
index 7eb5d2163a98e2b622bdceea04b0fd8a5b129377..e849b92133ec4832bc476bfaf15e97febecc128d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2245,6 +2245,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2221,6 +2221,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot end
|
||||
// Spigot Start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||
|
|
|
@ -40,10 +40,10 @@ index 0000000000000000000000000000000000000000..68098dfe716e93aafcca4d8d5b5a81d8
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index adbd61c41cc30afa89c6ee3544c562b351304a01..585d3e51b4af87327fc2bc64a49f09732a8c61ab 100644
|
||||
index 6e895a0458031f0ad18615fe49368d34af70ad27..a4f52e4efcf4d169a690b12a1a6d610bffca4adb 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -196,6 +196,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -194,6 +194,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,10 @@ index baedae23865ea80c6546d1f6f439e1d7712258b9..e9cd90b6bb2f57d605323add43f12962
|
|||
GameProfile gameprofile = this.server.getSingleplayerProfile();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 2eced5d3b539dfd072b8b4eafb34f21f849b1bd5..97257e44163ed565b5f1152f0738649b1adbeb07 100644
|
||||
index e2dd64e0b3e24c30869efb438287930c1d595f9e..95a02b081d60f9ea45cc49faa0b0da8d5d88c0e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -670,7 +670,7 @@ public abstract class PlayerList {
|
||||
@@ -669,7 +669,7 @@ public abstract class PlayerList {
|
||||
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
entityplayer = (ServerPlayer) this.players.get(i);
|
||||
|
|
|
@ -10,10 +10,10 @@ so we do not need that. The client only needs the chunk it is currently in to
|
|||
be loaded to close the loading screen, so we just send an empty one.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 97257e44163ed565b5f1152f0738649b1adbeb07..d21d9a66ab7197ea4fa324a9af64a1457d8e602b 100644
|
||||
index 95a02b081d60f9ea45cc49faa0b0da8d5d88c0e6..6c75c2baab97ed58dbda3143bf06f7366b72bebe 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -394,6 +394,16 @@ public abstract class PlayerList {
|
||||
@@ -393,6 +393,16 @@ public abstract class PlayerList {
|
||||
this.sendActivePlayerEffects(player);
|
||||
// Paper start - Fire PlayerJoinEvent when Player is actually ready; move vehicle into method so it can be called above - short circuit around that code
|
||||
this.onPlayerJoinFinish(player, worldserver1, s1);
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f26d092e50e5f1e320ba2e3a264573ad862aca26..c87e243744166fb736ca8db65ac268072e353e16 100644
|
||||
index adbadcf844835a80c03dcdda6595adf52c127fbf..5a154059bcb60f3567c71f2afcd9a8130e8566a6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3202,7 +3202,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3198,7 +3198,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
BlockPos blockposition = BlockEntity.getPosFromTag(customdata.getUnsafe());
|
||||
|
||||
if (this.player.level().isLoaded(blockposition)) {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 2916328a5b94783e68688756b5ad7685f180e27f..b0a1f6cf2cc96a2ddc8232f929c134501d99411e 100644
|
||||
index 6c75c2baab97ed58dbda3143bf06f7366b72bebe..ceb1cb12f179790dfb1d42c0e585ad39d98df6ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1389,7 +1389,7 @@ public abstract class PlayerList {
|
||||
@@ -1386,7 +1386,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
|
||||
ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
|
||||
|
|
|
@ -23,10 +23,10 @@ index 67fcba634f8183bb33834ac3b2c3dcfb8d87129e..777b789fdcdf297309cfb36fc7f77e3f
|
|||
}
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3c947dc0aea06d66a00aeca51355ea41e8d98f88..ec2996d306d3466867e94bb6e4707f2b5fe13af2 100644
|
||||
index e849b92133ec4832bc476bfaf15e97febecc128d..1b1f36e8d94861ee69e1461947fef65e7cb725dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2160,6 +2160,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2136,6 +2136,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void onTickingStart(Entity entity) {
|
||||
|
|
|
@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
|
|||
Just simply prevent them from being added to the world instead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ec2996d306d3466867e94bb6e4707f2b5fe13af2..43d54a7fab4b5d46bf4ca319519a39fda1fc264f 100644
|
||||
index 1b1f36e8d94861ee69e1461947fef65e7cb725dd..3e3dbb2cea4a5cf832ad1708cde1a56b22970833 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1235,6 +1235,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1211,6 +1211,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c87e243744166fb736ca8db65ac268072e353e16..8f65943161a6621f8f7926c48322e26a854ae139 100644
|
||||
index 5a154059bcb60f3567c71f2afcd9a8130e8566a6..dcf8be9abf4d7c2f58a28b8a64a02aff4661a599 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2384,7 +2384,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2380,7 +2380,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// Spigot end
|
||||
// this.chatSpamTickCount += 20;
|
||||
|
|
|
@ -106,10 +106,10 @@ index 0000000000000000000000000000000000000000..1b797955357612a4319452de7461ba04
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 585d3e51b4af87327fc2bc64a49f09732a8c61ab..aa39bdb0a4ba8fedf5052ea9700afa7d4d2a4300 100644
|
||||
index a4f52e4efcf4d169a690b12a1a6d610bffca4adb..13ca70fe330d5e48d38c2035ea346b34e6bd3ea1 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -291,13 +291,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -289,13 +289,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.STARTUP);
|
||||
// CraftBukkit end
|
||||
|
||||
|
|
|
@ -85,10 +85,10 @@ index 6854ca4d4fec2b4fa541c3fabf63787665572609..e7b444a10b244828827b3c66c5346520
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index b953def299faf1a13e1893d17a476f36e2d6337a..d409791325771909faaef0dffb0f7f02d1bf71af 100644
|
||||
index a7056adac02027c2892b02702020a227f05e43d7..8c68b17299dd301e98c4141081d3df9299d22cc4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1027,7 +1027,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1025,7 +1025,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
|
@ -98,10 +98,10 @@ index b953def299faf1a13e1893d17a476f36e2d6337a..d409791325771909faaef0dffb0f7f02
|
|||
return this.anyPlayerCloseEnoughForSpawning(pos, false);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 43d54a7fab4b5d46bf4ca319519a39fda1fc264f..4924e19c3fdafb3bb3f0550b16f8acf08e436c67 100644
|
||||
index 3e3dbb2cea4a5cf832ad1708cde1a56b22970833..5dbb1abf11b107bd71f9637faa8e22308e0bcf03 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -777,7 +777,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -767,7 +767,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
} else {
|
||||
AABB axisalignedbb = AABB.encapsulatingFullBlocks(blockposition1, new BlockPos(blockposition1.atY(this.getMaxBuildHeight()))).inflate(3.0D);
|
||||
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
|
||||
|
@ -124,10 +124,10 @@ index 6abecaac8407b992d208a9108e11fd4954a4106f..03d89f326d320c5d778c3d1e2db7d6b8
|
|||
this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit
|
||||
this.level.updateSleepingPlayerList();
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index d430e6c08bae0a630e71c11c9eae26bef85bde36..a929b8f1c452db08a64e4be53b488cf2676e0a94 100644
|
||||
index ceb1cb12f179790dfb1d42c0e585ad39d98df6ad..add3db3bbe908d564c7fbad1750a74660cb71502 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -260,7 +260,7 @@ public abstract class PlayerList {
|
||||
@@ -259,7 +259,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
if (optional.isEmpty() || invalidPlayerWorld[0]) {
|
||||
// Paper end - reset to main world spawn if first spawn or invalid world
|
||||
|
@ -136,7 +136,7 @@ index d430e6c08bae0a630e71c11c9eae26bef85bde36..a929b8f1c452db08a64e4be53b488cf2
|
|||
}
|
||||
// Paper end - Entity#getEntitySpawnReason
|
||||
player.setServerLevel(worldserver1);
|
||||
@@ -703,8 +703,10 @@ public abstract class PlayerList {
|
||||
@@ -702,8 +702,10 @@ public abstract class PlayerList {
|
||||
Player player = entity.getBukkitEntity();
|
||||
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress());
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 4924e19c3fdafb3bb3f0550b16f8acf08e436c67..66f795168d3e120506aafa3cade78e6e8dcd8619 100644
|
||||
index 5dbb1abf11b107bd71f9637faa8e22308e0bcf03..bd808b87c9bd780a046f1d1395028c9f50bbf358 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2184,7 +2184,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2160,7 +2160,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
if (entity instanceof Mob entityinsentient) {
|
||||
|
@ -17,7 +17,7 @@ index 4924e19c3fdafb3bb3f0550b16f8acf08e436c67..66f795168d3e120506aafa3cade78e6e
|
|||
String s = "onTrackingStart called during navigation iteration";
|
||||
|
||||
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
|
||||
@@ -2264,7 +2264,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2240,7 +2240,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
if (entity instanceof Mob entityinsentient) {
|
||||
|
|
|
@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player
|
|||
instead of just checking players in their world.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 66f795168d3e120506aafa3cade78e6e8dcd8619..cff225eab588248f1e6487a4a33da006672b3ba4 100644
|
||||
index bd808b87c9bd780a046f1d1395028c9f50bbf358..84c441051a224b7c39ba85b03376dbefdff9c74f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2300,4 +2300,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2276,4 +2276,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index d409791325771909faaef0dffb0f7f02d1bf71af..ca98b4c405afc2d86085759ba50d02eba75784a7 100644
|
||||
index 8c68b17299dd301e98c4141081d3df9299d22cc4..cd67227df14124c2edeab28725c626cbf35e7e8c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1534,7 +1534,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1528,7 +1528,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// CraftBukkit end
|
||||
if (flag) {
|
||||
if (this.seenBy.add(player.connection)) {
|
||||
|
@ -21,7 +21,7 @@ index d409791325771909faaef0dffb0f7f02d1bf71af..ca98b4c405afc2d86085759ba50d02eb
|
|||
} else if (this.seenBy.remove(player.connection)) {
|
||||
this.serverEntity.removePairing(player);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 82531bd4ada8373d3c255758382d5850309913e2..f52d394c90bc326c2a58c4f623df632235e0c599 100644
|
||||
index f73eca786ca0dde5254c5941cf37739dc65ad81c..fe70fec5d2d422ea9be18e6d5af377f13090ff73 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3869,7 +3869,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
|
|
@ -40,10 +40,10 @@ index 3255578c8c37d977bb6e89d27194a4dbff822014..2172e23b22b411fe79e930128bd43ac0
|
|||
|
||||
while (iterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index aa39bdb0a4ba8fedf5052ea9700afa7d4d2a4300..b4af03c4bdd1ce0861f36c3b75fc7e89d701c46a 100644
|
||||
index 13ca70fe330d5e48d38c2035ea346b34e6bd3ea1..1c94b78cb23e44762fc99bb916484c1b334b6b10 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -282,6 +282,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -280,6 +280,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
|
||||
DedicatedServer.LOGGER.warn("The exception was: {}", ioexception.toString());
|
||||
DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
|
||||
|
@ -52,10 +52,10 @@ index aa39bdb0a4ba8fedf5052ea9700afa7d4d2a4300..b4af03c4bdd1ce0861f36c3b75fc7e89
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3b1e231c637750821a756c877c9c6b7150b184b8..e5b466f71d4c65eb31210ccad05a9fb603d53098 100644
|
||||
index 5c3682fb662ac19750a00de24d74e3ebe73f2982..f9402016da77ebb01ce457f6c3486eb7c234c136 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3400,7 +3400,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3396,7 +3396,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
|
||||
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1b486d09bd1a84835183a6c8181933fcabb3373f..62b022a72954eeecfa141f4ec93ccb44d955e54b 100644
|
||||
index d20cbb46bdbaed693007d4928b41efa95e68f70a..deacb39405beeb68b945c7ee53db2a2728d12a51 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3438,7 +3438,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3434,7 +3434,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
|
||||
this.chatMessageChain.append(() -> {
|
||||
this.player.setChatSession(session);
|
||||
|
@ -18,10 +18,10 @@ index 1b486d09bd1a84835183a6c8181933fcabb3373f..62b022a72954eeecfa141f4ec93ccb44
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index a929b8f1c452db08a64e4be53b488cf2676e0a94..2ea29c9491186d7a25ed3eed99ee4a488bcaa272 100644
|
||||
index add3db3bbe908d564c7fbad1750a74660cb71502..cf09aa30744d78425c43ae84e68e4d217e94aab8 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -361,6 +361,7 @@ public abstract class PlayerList {
|
||||
@@ -360,6 +360,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start - sendAll above replaced with this loop
|
||||
ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player));
|
||||
|
||||
|
@ -29,7 +29,7 @@ index a929b8f1c452db08a64e4be53b488cf2676e0a94..2ea29c9491186d7a25ed3eed99ee4a48
|
|||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i);
|
||||
|
||||
@@ -368,12 +369,17 @@ public abstract class PlayerList {
|
||||
@@ -367,12 +368,17 @@ public abstract class PlayerList {
|
||||
entityplayer1.connection.send(packet);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ index 68c062cbaa030d62d97c9c003651f8fc17a00a6b..6247a21c9c391abf1f6db3482c659593
|
|||
UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())),
|
||||
UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())),
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 664d9cfacb87b1d9193376261f7102b64c906ddc..977af8887ac331576a1c4441fcfad681f69a9929 100644
|
||||
index 064cda8a10cfcd4036dcdbd9f2e9f599cf982da8..05fb7f13c23c49465fe1bf71bdb9c656f390a03e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -51,7 +51,7 @@ index 664d9cfacb87b1d9193376261f7102b64c906ddc..977af8887ac331576a1c4441fcfad681
|
|||
}
|
||||
|
||||
private int getMaximumFlyingTicks(Entity vehicle) {
|
||||
@@ -3436,6 +3444,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3432,6 +3440,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
private void resetPlayerChatState(RemoteChatSession session) {
|
||||
this.chatSession = session;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index cff225eab588248f1e6487a4a33da006672b3ba4..a27fd023e4f9b6ee113f6b3ed21b4c5aeb7ce15d 100644
|
||||
index 84c441051a224b7c39ba85b03376dbefdff9c74f..a86fbb9e5c4f4f89efc0e910535ccb4e181a3be6 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1372,6 +1372,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1348,6 +1348,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void gameEvent(Holder<GameEvent> event, Vec3 emitterPos, GameEvent.Context emitter) {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 977af8887ac331576a1c4441fcfad681f69a9929..46bb2031141b88416f2df1fb8bca76638ef66dae 100644
|
||||
index 05fb7f13c23c49465fe1bf71bdb9c656f390a03e..3ec809e2a8da71da646ab80f9aefcc7f1829963b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1261,8 +1261,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
@ -91,7 +91,7 @@ index 977af8887ac331576a1c4441fcfad681f69a9929..46bb2031141b88416f2df1fb8bca7663
|
|||
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
|
||||
} else {
|
||||
@@ -3467,4 +3497,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3463,4 +3493,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
|
||||
}
|
||||
|
|
|
@ -1173,10 +1173,10 @@ index a72b278826be1d0da79ca619ea9a9a437fa9c54b..2dfa9c4c0c2ef489649944eed89d8c77
|
|||
this.profiler.push("commandFunctions");
|
||||
MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 2ea29c9491186d7a25ed3eed99ee4a488bcaa272..de96d7df65713f2fa7b8f2dd068856bb5fa45a45 100644
|
||||
index cf09aa30744d78425c43ae84e68e4d217e94aab8..962fa2281fa7a52a2f7b3fd8f1d7d49f243698f5 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -640,6 +640,7 @@ public abstract class PlayerList {
|
||||
@@ -639,6 +639,7 @@ public abstract class PlayerList {
|
||||
|
||||
entityplayer.unRide();
|
||||
worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
|
||||
|
@ -1185,7 +1185,7 @@ index 2ea29c9491186d7a25ed3eed99ee4a488bcaa272..de96d7df65713f2fa7b8f2dd068856bb
|
|||
this.players.remove(entityplayer);
|
||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1d5d477b0b689167742c2f2edff263be40a991c8..aebe9cb97776bb833221a0f11285696c266b752b 100644
|
||||
index b3123e363bca10fa225acf365b1f48d935f14a20..d2ef0e7a977aae9a5a7cf138f8fc6ff6314dac3f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -255,11 +255,23 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
@ -1251,7 +1251,7 @@ index 1d5d477b0b689167742c2f2edff263be40a991c8..aebe9cb97776bb833221a0f11285696c
|
|||
public void setLevelCallback(EntityInLevelCallback changeListener) {
|
||||
this.levelCallback = changeListener;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7197cbf15ff9382cbc59c4a58e2f189c8cacbaaa..6d373fb254225aa92a10181d8dd21e2dd7fb063a 100644
|
||||
index ed6210d2490f8584c21537eaa380d990fb73e03d..3e78a420ea183f4044873bb1fd89e9b9749032b8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -310,6 +310,76 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] API for updating recipes on clients
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index f9dcbf7d51680e8dfdda1350e0632dec675f3d44..1b83d8f723410c405746faa59783e6ba7a66fd56 100644
|
||||
index 962fa2281fa7a52a2f7b3fd8f1d7d49f243698f5..bb4547bc73318289561390bc9fc291fe3fc1f837 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1485,6 +1485,13 @@ public abstract class PlayerList {
|
||||
@@ -1482,6 +1482,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void reloadResources() {
|
||||
|
@ -22,7 +22,7 @@ index f9dcbf7d51680e8dfdda1350e0632dec675f3d44..1b83d8f723410c405746faa59783e6ba
|
|||
// CraftBukkit start
|
||||
/*Iterator iterator = this.advancements.values().iterator();
|
||||
|
||||
@@ -1500,7 +1507,15 @@ public abstract class PlayerList {
|
||||
@@ -1497,7 +1504,15 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable entity tracking range by Y coordinate
|
|||
Options to configure entity tracking by Y coordinate, also for each entity category.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index ca98b4c405afc2d86085759ba50d02eba75784a7..51c6f20a7402ff3809c8b7690fa4651eee0304cd 100644
|
||||
index cd67227df14124c2edeab28725c626cbf35e7e8c..235a49ff7e6e7f1f839fee9110a2c5d5ce7ca2a5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1526,6 +1526,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1520,6 +1520,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
double d1 = vec3d.x * vec3d.x + vec3d.z * vec3d.z;
|
||||
double d2 = d0 * d0;
|
||||
boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
|
||||
|
|
|
@ -82,10 +82,10 @@ index 6247a21c9c391abf1f6db3482c659593e4f29355..9ccca41bf23efadba5329cc584bbcdca
|
|||
|
||||
static class EntryBuilder {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index be6bf7afa3cea4ed48f363e89ccd079062edc8d9..9b1a6d8351fb473eec75a2fd08fb892b770e3586 100644
|
||||
index bb4547bc73318289561390bc9fc291fe3fc1f837..d607859d1e4150e1d70ef6201b3c82e81c82e7d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -359,14 +359,22 @@ public abstract class PlayerList {
|
||||
@@ -358,14 +358,22 @@ public abstract class PlayerList {
|
||||
// CraftBukkit end
|
||||
|
||||
// CraftBukkit start - sendAll above replaced with this loop
|
||||
|
@ -109,7 +109,7 @@ index be6bf7afa3cea4ed48f363e89ccd079062edc8d9..9b1a6d8351fb473eec75a2fd08fb892b
|
|||
}
|
||||
|
||||
if (entityplayer1 == player || !bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) { // Paper - Use single player info update packet on join; Don't include joining player
|
||||
@@ -377,7 +385,7 @@ public abstract class PlayerList {
|
||||
@@ -376,7 +384,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper start - Use single player info update packet on join
|
||||
if (!onlinePlayers.isEmpty()) {
|
||||
|
@ -119,7 +119,7 @@ index be6bf7afa3cea4ed48f363e89ccd079062edc8d9..9b1a6d8351fb473eec75a2fd08fb892b
|
|||
// Paper end - Use single player info update packet on join
|
||||
player.sentListPacket = true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index cb41fad4b94c4da64a699dc1b0848fc08ff2c456..c80cbc9dece765091b2ad9281bdc061df8b491dc 100644
|
||||
index 9cf67deacf9d01e3835705260a358513987fc3ba..78dcc656807cafa52707ef4139fe6176f6f16021 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -201,6 +201,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add slot sanity checks in container clicks
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0ed03a8ec85d8491d96c7b3ac3feff805a773539..5d7b443173c3f11fc402e96db109e4382466d182 100644
|
||||
index 9187410ddc39273a393946f2f18626b30dd8f870..649a3cd9db7748df1831397709ab2e43d57399b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2987,6 +2987,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2983,6 +2983,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
break;
|
||||
case SWAP:
|
||||
if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) {
|
||||
|
|
|
@ -7,10 +7,10 @@ Subject: [PATCH] Fix missing map initialize event call
|
|||
public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index a27fd023e4f9b6ee113f6b3ed21b4c5aeb7ce15d..c5e404dcdab14dc0b972aa3286b05e21d9ea67e0 100644
|
||||
index a86fbb9e5c4f4f89efc0e910535ccb4e181a3be6..045b0fbe9ff1db13ece18723d2ff0e9b7d950209 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1662,13 +1662,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1638,13 +1638,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@Nullable
|
||||
@Override
|
||||
public MapItemSavedData getMapData(MapId id) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't check if we can see non-visible entities
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 51c6f20a7402ff3809c8b7690fa4651eee0304cd..d4cc6d189cda03ea8e5d44af0608f914078f7e6e 100644
|
||||
index 235a49ff7e6e7f1f839fee9110a2c5d5ce7ca2a5..3b2d5fdc8cafbc12fa863a26af0bbeb0cf42e662 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1537,7 +1537,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1531,7 +1531,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Paper end - Configurable entity tracking range by Y
|
||||
|
||||
// CraftBukkit start - respect vanish API
|
||||
|
|
|
@ -19,10 +19,10 @@ where generation happened directly to a ServerLevel and the
|
|||
entity still has the flag set.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c5e404dcdab14dc0b972aa3286b05e21d9ea67e0..aaaf5b91402a1562311dfdc287193a1aefbaf9a7 100644
|
||||
index 045b0fbe9ff1db13ece18723d2ff0e9b7d950209..7a2877ca23573a62327af212bfac236c7bb8b582 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1224,6 +1224,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1200,6 +1200,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
||||
|
@ -31,7 +31,7 @@ index c5e404dcdab14dc0b972aa3286b05e21d9ea67e0..aaaf5b91402a1562311dfdc287193a1a
|
|||
if (entity.valid) {
|
||||
MinecraftServer.LOGGER.error("Attempted Double World add on {}", entity, new Throwable());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 23442e0f887cec3c3a65b3dd3d0f4f40db0e54b1..24aacf9997c9ea0bd68ef3803f4a3ee4a920ab44 100644
|
||||
index 94b2844adeeca9694dafe7ae79d6c751ac06e794..c199de89f5a3a54684800a3aa9043c0f2a511c8f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -625,7 +625,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
|
|
@ -18,10 +18,10 @@ index a043ac10834562d357ef0b5aded2e916e2a0d056..74276c368016fcc4dbf9579b2ecbadc9
|
|||
@VisibleForTesting
|
||||
static long encode(double value) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index d4cc6d189cda03ea8e5d44af0608f914078f7e6e..7f287127faf1d3a6b4b0f77800964b327ca9123f 100644
|
||||
index 3b2d5fdc8cafbc12fa863a26af0bbeb0cf42e662..8f4112bf0db3e60a20d8eb0041957423fc5b51c8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1520,10 +1520,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1514,10 +1514,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public void updatePlayer(ServerPlayer player) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot
|
||||
if (player != this.entity) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue