mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 08:57:35 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 5b680f0b Note maximum objective score length in documentation CraftBukkit Changes:5932f8a7
Load default world spawn areas in consistent order3a5dc78f
Fix confusing migration message appearing on fresh server516a408f
Remove redundant CraftBukkit change for secondary world data73a2c749
Process conversation input on the main thread.100c3f07
Cap Objective Score Length6e842759
Cross World Entity Teleportation7deba1c6
Check for blank OfflinePlayer Namesf2746a5e
Descriptive kick reasons instead of Nope!b0212308
Cap Channel Registrationsa610dcd8
Identify CraftScheduler threads with useful names Spigot Changes: 19c3c5a5 Rebuild patches
This commit is contained in:
parent
b9badbf2bc
commit
f4e3b4e439
@ -1,9 +1,29 @@
|
||||
From 646ec56566f565a905815eed2e67eeeae9bac57b Mon Sep 17 00:00:00 2001
|
||||
From 236cd22b5c0bffc0d883deb468f857eaf72540a3 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||
Subject: [PATCH] MC Utils
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java b/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java
|
||||
new file mode 100644
|
||||
index 000000000..e58509675
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java
|
||||
@@ -0,0 +1,14 @@
|
||||
+package com.destroystokyo.paper.util;
|
||||
+
|
||||
+public class SneakyThrow {
|
||||
+
|
||||
+ public static void sneaky(Throwable exception) {
|
||||
+ SneakyThrow.<RuntimeException>throwSneaky(exception);
|
||||
+ }
|
||||
+
|
||||
+ @SuppressWarnings("unchecked")
|
||||
+ private static <T extends Throwable> void throwSneaky(Throwable exception) throws T {
|
||||
+ throw (T) exception;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/AttributeInstance.java b/src/main/java/net/minecraft/server/AttributeInstance.java
|
||||
index be179ba21..c53bc8230 100644
|
||||
--- a/src/main/java/net/minecraft/server/AttributeInstance.java
|
||||
@ -20,7 +40,7 @@ index be179ba21..c53bc8230 100644
|
||||
|
||||
void b(UUID uuid);
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 186fd5121..75a0f1386 100644
|
||||
index 330f5d0c1..37f9037a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -45,6 +45,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@ -277,7 +297,7 @@ index b8abd6363..a07ee150c 100644
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index d55f52fe9..27705106b 100644
|
||||
index 53511f0cc..00e230037 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -578,6 +578,17 @@ public final class ItemStack {
|
||||
@ -734,7 +754,7 @@ index 395215bbd..f2159bc2d 100644
|
||||
int j = 0;
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index bb7ef0518..e35f17843 100644
|
||||
index d627f975b..08d1b859d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3305cca437fb506e78cd2a486e9d2ed24786d7d0 Mon Sep 17 00:00:00 2001
|
||||
From 01da9c4f93a7c0d86e678edce549d640c557582e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
||||
Subject: [PATCH] Timings v2
|
||||
@ -485,7 +485,7 @@ index f28f4f3cd..6b417be1d 100644
|
||||
int j = 0;
|
||||
CustomFunction.c[] acustomfunction_c = customfunction.b();
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 197d116c6..0ebada490 100644
|
||||
index ad9c00bc8..4e9ef43b4 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -29,7 +29,7 @@ import org.apache.logging.log4j.Level;
|
||||
@ -515,7 +515,7 @@ index 197d116c6..0ebada490 100644
|
||||
}
|
||||
|
||||
public boolean Q() {
|
||||
@@ -719,7 +719,20 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@@ -718,7 +718,20 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
return remoteControlCommandListener.getMessages();
|
||||
}
|
||||
};
|
||||
@ -538,7 +538,7 @@ index 197d116c6..0ebada490 100644
|
||||
return waitable.get();
|
||||
} catch (java.util.concurrent.ExecutionException e) {
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 48ec5e047..f36ab639f 100644
|
||||
index 8412af434..dc0e4a999 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -27,7 +27,8 @@ import org.bukkit.command.CommandSender;
|
||||
@ -684,7 +684,7 @@ index cd462f7df..45ab33d1a 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 963c7e777..edb1748fd 100644
|
||||
index 72de40434..7e89d7158 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -704,7 +704,7 @@ index 963c7e777..edb1748fd 100644
|
||||
|
||||
public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStatistics, ICommandListener, Runnable {
|
||||
|
||||
@@ -615,6 +616,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -616,6 +617,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
// CraftBukkit end
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
@ -712,7 +712,7 @@ index 963c7e777..edb1748fd 100644
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@@ -816,7 +818,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -817,7 +819,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
public void t() {}
|
||||
|
||||
protected void a(BooleanSupplier booleansupplier) {
|
||||
@ -721,7 +721,7 @@ index 963c7e777..edb1748fd 100644
|
||||
this.slackActivityAccountant.tickStarted(); // Spigot
|
||||
long i = SystemUtils.getMonotonicNanos();
|
||||
|
||||
@@ -843,7 +845,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -844,7 +846,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
|
||||
@ -729,7 +729,7 @@ index 963c7e777..edb1748fd 100644
|
||||
this.methodProfiler.enter("save");
|
||||
this.playerList.savePlayers();
|
||||
// Spigot Start
|
||||
@@ -858,7 +859,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -859,7 +860,6 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
// this.saveChunks(true);
|
||||
// Spigot End
|
||||
this.methodProfiler.exit();
|
||||
@ -737,7 +737,7 @@ index 963c7e777..edb1748fd 100644
|
||||
}
|
||||
|
||||
this.methodProfiler.enter("snooper");
|
||||
@@ -879,14 +879,14 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -880,14 +880,14 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.methodProfiler.exit();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
this.slackActivityAccountant.tickEnded(l); // Spigot
|
||||
@ -756,7 +756,7 @@ index 963c7e777..edb1748fd 100644
|
||||
this.methodProfiler.enter("jobs");
|
||||
|
||||
FutureTask futuretask;
|
||||
@@ -894,26 +894,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -895,26 +895,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
while ((futuretask = (FutureTask) this.f.poll()) != null) {
|
||||
SystemUtils.a(futuretask, MinecraftServer.LOGGER);
|
||||
}
|
||||
@ -791,7 +791,7 @@ index 963c7e777..edb1748fd 100644
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
if (this.ticks % 20 == 0) {
|
||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||
@@ -921,7 +922,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -922,7 +923,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
|
||||
}
|
||||
}
|
||||
@ -800,7 +800,7 @@ index 963c7e777..edb1748fd 100644
|
||||
|
||||
// WorldServer worldserver; // CraftBukkit - dropped down
|
||||
long i;
|
||||
@@ -980,29 +981,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -981,29 +982,27 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.enter("tracker");
|
||||
@ -929,7 +929,7 @@ index c24f4a8fe..e01222ad2 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index f0e87416e..723fce204 100644
|
||||
index 08d1b859d..13453bd5e 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
@ -956,7 +956,7 @@ index f0e87416e..723fce204 100644
|
||||
|
||||
}
|
||||
|
||||
@@ -1622,7 +1621,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1617,7 +1616,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
// CraftBukkit end
|
||||
|
||||
private void handleCommand(String s) {
|
||||
@ -965,7 +965,7 @@ index f0e87416e..723fce204 100644
|
||||
// CraftBukkit start - whole method
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
|
||||
@@ -1633,7 +1632,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1628,7 +1627,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -974,7 +974,7 @@ index f0e87416e..723fce204 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1646,7 +1645,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1641,7 +1640,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
@ -1212,7 +1212,7 @@ index 5531f5205..209091a9c 100644
|
||||
|
||||
public boolean a(@Nullable Entity entity, VoxelShape voxelshape) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 0a32a767e..60939cc33 100644
|
||||
index a7ae16681..5a7087c75 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -1305,7 +1305,7 @@ index 0a32a767e..60939cc33 100644
|
||||
this.checkSession();
|
||||
Iterator iterator = this.server.getWorlds().iterator();
|
||||
|
||||
@@ -914,6 +922,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -908,6 +916,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.worldData.c(this.server.getBossBattleCustomData().c());
|
||||
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t());
|
||||
this.h().a();
|
||||
@ -1314,7 +1314,7 @@ index 0a32a767e..60939cc33 100644
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a3c07fbac..da57751f7 100644
|
||||
index f31b18dd2..1a2473541 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1945,12 +1945,31 @@ public final class CraftServer implements Server {
|
||||
@ -1565,7 +1565,7 @@ index 413dd35f0..52a8c48fa 100644
|
||||
|
||||
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 51f7cc31c..704acf738 100644
|
||||
index 753704c87..ca3393ef8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1695,6 +1695,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -1584,10 +1584,10 @@ index 51f7cc31c..704acf738 100644
|
||||
|
||||
public Player.Spigot spigot()
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 2f5d7a2a6..311c4f5ca 100644
|
||||
index 646128f16..d75cc42e1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -15,6 +15,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
@@ -16,6 +16,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@ -1595,7 +1595,7 @@ index 2f5d7a2a6..311c4f5ca 100644
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.plugin.IllegalPluginAccessException;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@@ -246,7 +247,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -247,7 +248,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -1604,7 +1604,7 @@ index 2f5d7a2a6..311c4f5ca 100644
|
||||
handle(task, 0L);
|
||||
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
|
||||
if (taskPending == task) {
|
||||
@@ -280,7 +281,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -281,7 +282,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1613,7 +1613,7 @@ index 2f5d7a2a6..311c4f5ca 100644
|
||||
handle(task, 0L);
|
||||
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
|
||||
if (taskPending == task) {
|
||||
@@ -387,9 +388,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -388,9 +389,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
if (task.isSync()) {
|
||||
currentTask = task;
|
||||
try {
|
||||
@ -1623,7 +1623,7 @@ index 2f5d7a2a6..311c4f5ca 100644
|
||||
} catch (final Throwable throwable) {
|
||||
task.getOwner().getLogger().log(
|
||||
Level.WARNING,
|
||||
@@ -416,8 +415,10 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -417,8 +416,10 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
runners.remove(task.getTaskId());
|
||||
}
|
||||
}
|
||||
@ -1634,7 +1634,7 @@ index 2f5d7a2a6..311c4f5ca 100644
|
||||
debugHead = debugHead.getNextHead(currentTick);
|
||||
}
|
||||
|
||||
@@ -450,6 +451,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -451,6 +452,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
}
|
||||
|
||||
private void parsePending() {
|
||||
@ -1642,7 +1642,7 @@ index 2f5d7a2a6..311c4f5ca 100644
|
||||
CraftTask head = this.head;
|
||||
CraftTask task = head.getNext();
|
||||
CraftTask lastTask = head;
|
||||
@@ -468,6 +470,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -469,6 +471,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
task.setNext(null);
|
||||
}
|
||||
this.head = lastTask;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fbb55750ab525c22cc9d0971daae118e62f75a17 Mon Sep 17 00:00:00 2001
|
||||
From 43b2ca579231f7a5b3d818e3c7c432c21961a3a2 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 14:32:43 -0600
|
||||
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
@ -19,10 +19,10 @@ index 220ca7bca..e13e17bdd 100644
|
||||
EULA.a.warn("Failed to save {}", this.b, exception);
|
||||
} finally {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index edb1748fd..b5f30b2b2 100644
|
||||
index 7e89d7158..df85f35f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1208,7 +1208,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1209,7 +1209,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
@ -32,7 +32,7 @@ index edb1748fd..b5f30b2b2 100644
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index da57751f7..ed0221f0d 100644
|
||||
index 1a2473541..bfe713aca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -162,7 +162,7 @@ import org.bukkit.event.server.TabCompleteEvent;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e990ffd965e20df1b41e07f7861db7bf2584fb8c Mon Sep 17 00:00:00 2001
|
||||
From ac69fd8917339ada124d808ba27d05a40cd19fe6 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 1 Mar 2016 23:09:29 -0600
|
||||
Subject: [PATCH] Further improve server tick loop
|
||||
@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
|
||||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b5f30b2b2..b12d9fbe8 100644
|
||||
index df85f35f3..7ca7b9f3a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -141,7 +141,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@ -33,7 +33,7 @@ index b5f30b2b2..b12d9fbe8 100644
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
@@ -684,7 +684,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -685,7 +685,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
private boolean canSleepForTick() {
|
||||
@ -42,7 +42,7 @@ index b5f30b2b2..b12d9fbe8 100644
|
||||
}
|
||||
|
||||
// Spigot Start
|
||||
@@ -692,6 +692,57 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -693,6 +693,57 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
{
|
||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
}
|
||||
@ -100,7 +100,7 @@ index b5f30b2b2..b12d9fbe8 100644
|
||||
// Spigot End
|
||||
|
||||
public void run() {
|
||||
@@ -704,29 +755,47 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -705,29 +756,47 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
// Spigot start
|
||||
Arrays.fill( recentTps, 20 );
|
||||
@ -161,7 +161,7 @@ index b5f30b2b2..b12d9fbe8 100644
|
||||
this.nextTick += 50L;
|
||||
// Spigot end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ed0221f0d..212e3cd4a 100644
|
||||
index bfe713aca..a85d2a3c2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1942,6 +1942,17 @@ public final class CraftServer implements Server {
|
||||
|
@ -1,11 +1,11 @@
|
||||
From fcc79c8edbb43bcd014c6d87d2b2edd1460744f3 Mon Sep 17 00:00:00 2001
|
||||
From af9f39d585bc18e5f8208883bc376f74609ca528 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
||||
Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 4baf5750e..ca5212f20 100644
|
||||
index dbbe43220..75d63b4e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -118,10 +118,10 @@ index dab1be9b6..59b1f9043 100644
|
||||
flag = true;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 153efb9b9..df7c77e9a 100644
|
||||
index 82dfca321..be37eed11 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -802,4 +802,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -800,4 +800,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -1,4 +1,4 @@
|
||||
From faff1c8fca7561b10f61a8ab6edbb9610e027cac Mon Sep 17 00:00:00 2001
|
||||
From 4ed9141e99766cbb2b618d73156f34a48726cb7f Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 2 Mar 2016 00:52:31 -0600
|
||||
Subject: [PATCH] Lighting Queue
|
||||
@ -138,10 +138,10 @@ index eb83e20d5..c2ecc034e 100644
|
||||
// Update neighbor counts
|
||||
for (int x = -2; x < 3; x++) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b12d9fbe8..f547a6ad7 100644
|
||||
index 7ca7b9f3a..00f1c36e9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -889,7 +889,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -890,7 +890,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
protected void a(BooleanSupplier booleansupplier) {
|
||||
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
|
||||
this.slackActivityAccountant.tickStarted(); // Spigot
|
||||
@ -150,7 +150,7 @@ index b12d9fbe8..f547a6ad7 100644
|
||||
|
||||
++this.ticks;
|
||||
if (this.S) {
|
||||
@@ -947,6 +947,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -948,6 +948,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.exit();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6ae47c32adde3d935976cbc9b200e1e068c6ea0a Mon Sep 17 00:00:00 2001
|
||||
From ec23a52d0e17927fc4da5330bdc546ea4c936ac5 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Wed, 2 Mar 2016 11:59:48 -0600
|
||||
Subject: [PATCH] Optimize explosions
|
||||
@ -124,10 +124,10 @@ index c4db6367e..3e44b2d54 100644
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f547a6ad7..7a2f128d3 100644
|
||||
index 00f1c36e9..f488c37f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1054,6 +1054,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1055,6 +1055,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
worldserver.getTracker().updatePlayers();
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.exit();
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6fbda7d7dcd7dfc3d3bcc02e918bbe9bfdc277d3 Mon Sep 17 00:00:00 2001
|
||||
From 74984e1c1136d6da89344b1efa368d8c6c70a9c8 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 01:17:12 -0600
|
||||
Subject: [PATCH] Ensure commands are not ran async
|
||||
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
|
||||
that it is happening so that plugin authors can fix their code to stop executing commands async.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 723fce204..f543532f8 100644
|
||||
index 13453bd5e..72719ea02 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1553,6 +1553,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1548,6 +1548,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
|
||||
if (!async && s.startsWith("/")) {
|
||||
@ -48,7 +48,7 @@ index 723fce204..f543532f8 100644
|
||||
} else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 212e3cd4a..6700ce84c 100644
|
||||
index a85d2a3c2..d8558e42f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -699,6 +699,29 @@ public final class CraftServer implements Server {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4940a8baeda8ba8af4dd674cd62ed6cf41e3cb07 Mon Sep 17 00:00:00 2001
|
||||
From 9557c1eec471d177f001aaa3c37951c07cf48b4d Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 03:15:41 -0600
|
||||
Subject: [PATCH] Add exception reporting event
|
||||
@ -289,10 +289,10 @@ index 478bf4997..8d51af286 100644
|
||||
throw throwable1;
|
||||
} finally {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 311c4f5ca..e76882b8e 100644
|
||||
index d75cc42e1..0e9d5fe3a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -16,6 +16,9 @@ import java.util.function.Consumer;
|
||||
@@ -17,6 +17,9 @@ import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@ -302,7 +302,7 @@ index 311c4f5ca..e76882b8e 100644
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.plugin.IllegalPluginAccessException;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@@ -390,20 +393,26 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -391,20 +394,26 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
try {
|
||||
task.run();
|
||||
} catch (final Throwable throwable) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0d32d723ff3531d21f727f3b075ae01d98d2f989 Mon Sep 17 00:00:00 2001
|
||||
From facce6d5a58636fb7f89dab9b1481bf3a815212d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 4 Mar 2013 23:46:10 -0500
|
||||
Subject: [PATCH] Chunk Save Reattempt
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Chunk Save Reattempt
|
||||
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
index 5b48bb0b7..9299ab56a 100644
|
||||
index 5b48bb0b7..ecb9c4e0f 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
@@ -238,8 +238,7 @@ public class RegionFile {
|
||||
@ -15,7 +15,7 @@ index 5b48bb0b7..9299ab56a 100644
|
||||
} catch (IOException ioexception) {
|
||||
- ioexception.printStackTrace();
|
||||
- ServerInternalException.reportInternalException(ioexception); // Paper
|
||||
+ org.spigotmc.SneakyThrow.sneaky(ioexception); // Paper - we want the upper try/catch to retry this
|
||||
+ com.destroystokyo.paper.util.SneakyThrow.sneaky(ioexception); // Paper - we want the upper try/catch to retry this
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1b1366ebf7437bc03164354f888adc45d89604b1 Mon Sep 17 00:00:00 2001
|
||||
From 148c72f9905f9f4da80689899d2dbdd25d667ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Sat, 2 Apr 2016 05:09:16 -0400
|
||||
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
|
||||
@ -18,10 +18,10 @@ index 77440ac81..8711462e1 100644
|
||||
private Vec3D c;
|
||||
private EnumHand d;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 91eb73b73..f35714fa1 100644
|
||||
index 4fca15968..44474a7d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1893,6 +1893,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1888,6 +1888,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 759df70cabfe26f1770dc4a86679fb3f8ad0d45d Mon Sep 17 00:00:00 2001
|
||||
From 04378504bd22fb7b9ec880a1556cdc9db4ff71da Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 13 Sep 2014 23:14:43 -0400
|
||||
Subject: [PATCH] Configurable Keep Spawn Loaded range per world
|
||||
@ -21,10 +21,10 @@ index 058cd8cc8..276dd98fd 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7a2f128d3..c21ebd466 100644
|
||||
index f488c37f7..e53e25626 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -485,13 +485,21 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -486,13 +486,21 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
List<ChunkCoordIntPair> list = Lists.newArrayList();
|
||||
Set<ChunkCoordIntPair> set = Sets.newConcurrentHashSet();
|
||||
|
||||
@ -48,7 +48,7 @@ index 7a2f128d3..c21ebd466 100644
|
||||
});
|
||||
|
||||
while (!completablefuture.isDone()) {
|
||||
@@ -506,11 +514,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -507,11 +515,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
throw new RuntimeException(executionexception.getCause());
|
||||
} catch (TimeoutException timeoutexception) {
|
||||
@ -78,7 +78,7 @@ index 907681cdf..5aea44cd8 100644
|
||||
|
||||
public LongSet ag() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index acd54067e..c655d51ac 100644
|
||||
index c8263868b..58909ea7a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1004,7 +1004,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f62a99088d8de9b94f645e5309a996409238f9c9 Mon Sep 17 00:00:00 2001
|
||||
From 302be0291f7c03f6d2c9749946213c3d9c9a2685 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Wed, 6 Apr 2016 01:04:23 -0500
|
||||
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
|
||||
@ -26,10 +26,10 @@ index 276dd98fd..973ea8bca 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index f35714fa1..0ff0dff28 100644
|
||||
index 44474a7d6..97e39050a 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1631,7 +1631,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1626,7 +1626,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ index f35714fa1..0ff0dff28 100644
|
||||
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
|
||||
for (Object recipient : minecraftServer.getPlayerList().players) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 452619f2f..194149eb6 100644
|
||||
index 6e62ea90d..523694899 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -176,7 +176,7 @@ public abstract class PlayerList {
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 719b9b1643a33cf1def7c539971a09b602bd81e4 Mon Sep 17 00:00:00 2001
|
||||
From 52851c88a5df872998f8f90dbe63f63e0fc9d504 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 13 Apr 2016 02:10:49 -0400
|
||||
Subject: [PATCH] Configurable Player Collision
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 0778f53e2a..30fcf4a728 100644
|
||||
index 0778f53e2..30fcf4a72 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -233,4 +233,9 @@ public class PaperConfig {
|
||||
@ -19,10 +19,10 @@ index 0778f53e2a..30fcf4a728 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c21ebd4668..862c5d66b7 100644
|
||||
index e53e25626..6841fc2bd 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -420,6 +420,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -421,6 +421,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.a(this.getWorldServer(DimensionManager.OVERWORLD).worldMaps);
|
||||
// CraftBukkit end
|
||||
|
||||
@ -43,7 +43,7 @@ index c21ebd4668..862c5d66b7 100644
|
||||
|
||||
protected void a(File file, WorldData worlddata) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||
index a6aed2531f..575e3762b2 100644
|
||||
index a6aed2531..575e3762b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||
@@ -94,7 +94,7 @@ public class PacketPlayOutScoreboardTeam implements Packet<PacketListenerPlayOut
|
||||
@ -56,7 +56,7 @@ index a6aed2531f..575e3762b2 100644
|
||||
packetdataserializer.a(this.c);
|
||||
packetdataserializer.a(this.d);
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 5236948990..79641a73a8 100644
|
||||
index 523694899..79641a73a 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -73,6 +73,7 @@ public abstract class PlayerList {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9d07418be4c69b977e9a3b2e2b1651f5821c50b2 Mon Sep 17 00:00:00 2001
|
||||
From 90af54dc5fdbc87a6926de923a351e5d2bb8d48c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 28 Apr 2016 00:57:27 -0400
|
||||
Subject: [PATCH] remove null possibility for getServer singleton
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
||||
to stop IDE complaining about potential NPE
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 862c5d66b..3ff271869 100644
|
||||
index 6841fc2bd..d54a112e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -68,6 +68,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@ -26,7 +26,7 @@ index 862c5d66b..3ff271869 100644
|
||||
this.ac = new ResourceManager(EnumResourcePackType.SERVER_DATA);
|
||||
this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new);
|
||||
this.ag = new CraftingManager();
|
||||
@@ -1823,7 +1826,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1824,7 +1827,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
// CraftBukkit start
|
||||
@Deprecated
|
||||
public static MinecraftServer getServer() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f7f5a84a18d147fe939616f32507e91ee572ac68 Mon Sep 17 00:00:00 2001
|
||||
From b3c07afca7589a742cdd93a0af236002272be328 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 16 May 2016 20:47:41 -0400
|
||||
Subject: [PATCH] Optimize UserCache / Thread Safe
|
||||
@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase
|
||||
the user never changed the default setting for Spigot's save on stop only.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3ff271869..7710962ce 100644
|
||||
index d54a112e5..7e1711b2f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -686,7 +686,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -687,7 +687,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
// Spigot start
|
||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||
LOGGER.info("Saving usercache.json");
|
||||
|
@ -1,14 +1,14 @@
|
||||
From bef8ebead74f5a70f28d5415fe77bb061b0cb775 Mon Sep 17 00:00:00 2001
|
||||
From 35b4f32684ff97962ae89e7ee33ffcd2fe337996 Mon Sep 17 00:00:00 2001
|
||||
From: Brokkonaut <hannos17@gmx.de>
|
||||
Date: Sun, 4 Sep 2016 16:35:43 -0500
|
||||
Subject: [PATCH] Fix AIOOBE in inventory handling
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 6c0d105db..5874098c9 100644
|
||||
index e7e7b41c0..3409ae720 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2086,7 +2086,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -2081,7 +2081,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
case CLONE:
|
||||
if (packetplayinwindowclick.d() == 2) {
|
||||
click = ClickType.MIDDLE;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From daf61104fe9b89e99ced6b25f724fcaff2409ed6 Mon Sep 17 00:00:00 2001
|
||||
From c566e08769d6f447d3fa5e17095b6d9d3038f8c7 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 19 Sep 2016 23:16:39 -0400
|
||||
Subject: [PATCH] Auto Save Improvements
|
||||
@ -121,7 +121,7 @@ index 749e41aed..97714be6d 100644
|
||||
public final MinecraftServer server;
|
||||
public final PlayerInteractManager playerInteractManager;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7710962ce..f09d358e2 100644
|
||||
index 7e1711b2f..a5047084e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -143,6 +143,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@ -132,7 +132,7 @@ index 7710962ce..f09d358e2 100644
|
||||
public final Thread primaryThread;
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
@@ -937,22 +938,30 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -938,22 +939,30 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.m.b().a(agameprofile);
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ index 79641a73a..fe6649224 100644
|
||||
public WhiteList getWhitelist() {
|
||||
return this.whitelist;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index fa7466d64..48d70624c 100644
|
||||
index 1d46b8967..1e7e503eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -856,8 +856,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e795fb2b638a522bc6efeb69217eed8dc043b7f9 Mon Sep 17 00:00:00 2001
|
||||
From 4f9dbd3826230f993a06c40767d034469e6f62e7 Mon Sep 17 00:00:00 2001
|
||||
From: Alfie Cleveland <alfeh@me.com>
|
||||
Date: Tue, 27 Dec 2016 01:57:57 +0000
|
||||
Subject: [PATCH] Properly fix item duplication bug
|
||||
@ -19,10 +19,10 @@ index a37af03d2..cd488d37f 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 0134fb871..d74b3c44b 100644
|
||||
index 1fcd2ab0e..2048ef89f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2504,7 +2504,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -2499,7 +2499,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
|
||||
public final boolean isDisconnected() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9656eb24104944d9832febd4350401ee4178bfc6 Mon Sep 17 00:00:00 2001
|
||||
From 6423b00e10d13cca4c4e7b337143ddddae821be2 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 5 Feb 2017 00:04:04 -0500
|
||||
Subject: [PATCH] Remove CraftScheduler Async Task Debugger
|
||||
@ -9,21 +9,10 @@ One report of a suspected memory leak with the system.
|
||||
This adds additional overhead to asynchronous task dispatching
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index e76882b8e..8963168ed 100644
|
||||
index 0e9d5fe3a..3ef79e3e9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -85,8 +85,8 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
private volatile CraftTask currentTask = null;
|
||||
private volatile int currentTick = -1;
|
||||
private final Executor executor = Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %1$d").build()); // Spigot
|
||||
- private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}};
|
||||
- private CraftAsyncDebugger debugTail = debugHead;
|
||||
+ //private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}}; // Paper
|
||||
+ //private CraftAsyncDebugger debugTail = debugHead; // Paper
|
||||
private static final int RECENT_TICKS;
|
||||
|
||||
static {
|
||||
@@ -411,7 +411,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -412,7 +412,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
}
|
||||
parsePending();
|
||||
} else {
|
||||
@ -32,7 +21,7 @@ index e76882b8e..8963168ed 100644
|
||||
executor.execute(new ServerSchedulerReportingWrapper(task)); // Paper
|
||||
// We don't need to parse pending
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
@@ -428,7 +428,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -429,7 +429,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
pending.addAll(temp);
|
||||
temp.clear();
|
||||
MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming();
|
||||
@ -41,7 +30,7 @@ index e76882b8e..8963168ed 100644
|
||||
}
|
||||
|
||||
private void addTask(final CraftTask task) {
|
||||
@@ -488,10 +488,15 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -489,10 +489,15 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -58,5 +47,5 @@ index e76882b8e..8963168ed 100644
|
||||
|
||||
@Deprecated
|
||||
--
|
||||
2.20.0
|
||||
2.20.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8ee9cf07c510a72ea8e005a9d38df4724ea36b95 Mon Sep 17 00:00:00 2001
|
||||
From f9866f40c00cb70dd6987b0e82b4cb30b89dbc8c Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Fri, 12 May 2017 23:34:11 -0500
|
||||
Subject: [PATCH] Properly handle async calls to restart the server
|
||||
@ -30,18 +30,18 @@ will have plugins and worlds saving to the disk has a high potential to result
|
||||
in corruption/dataloss.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f09d358e29..f2c172ff18 100644
|
||||
index a5047084e..dd910b16d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -85,6 +85,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
public final Map<DimensionManager, WorldServer> worldServer = Maps.newIdentityHashMap();
|
||||
public final Map<DimensionManager, WorldServer> worldServer = Maps.newLinkedHashMap(); // CraftBukkit - keep order, k+v already use identity methods
|
||||
private PlayerList playerList;
|
||||
private boolean isRunning = true;
|
||||
+ private boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
||||
private boolean isStopped;
|
||||
private int ticks;
|
||||
protected final Proxy c;
|
||||
@@ -654,7 +655,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -655,7 +656,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
if (this.playerList != null) {
|
||||
MinecraftServer.LOGGER.info("Saving players");
|
||||
this.playerList.savePlayers();
|
||||
@ -50,7 +50,7 @@ index f09d358e29..f2c172ff18 100644
|
||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
|
||||
@@ -704,9 +705,16 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -705,9 +706,16 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
return this.isRunning;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ index f09d358e29..f2c172ff18 100644
|
||||
private boolean canSleepForTick() {
|
||||
return System.nanoTime() - lastTick + catchupTime < TICK_TIME; // Paper - improved "are we lagging" check to match our own
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 9570a8800b..9d44dcb3b2 100644
|
||||
index 9570a8800..9d44dcb3b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1336,10 +1336,15 @@ public abstract class PlayerList {
|
||||
@ -97,7 +97,7 @@ index 9570a8800b..9d44dcb3b2 100644
|
||||
// CraftBukkit start
|
||||
public void sendMessage(IChatBaseComponent[] iChatBaseComponents) {
|
||||
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
|
||||
index 944151d140..061cbe7fcf 100644
|
||||
index 944151d14..061cbe7fc 100644
|
||||
--- a/src/main/java/org/spigotmc/RestartCommand.java
|
||||
+++ b/src/main/java/org/spigotmc/RestartCommand.java
|
||||
@@ -46,86 +46,123 @@ public class RestartCommand extends Command
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 20d2500c75bd049b9dc6787bdc24e193115e09f1 Mon Sep 17 00:00:00 2001
|
||||
From fae17dd3704f78651bf125cf4229ea077c07f658 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 16 May 2017 21:29:08 -0500
|
||||
Subject: [PATCH] Add option to make parrots stay on shoulders despite movement
|
||||
@ -26,7 +26,7 @@ index e49eb0caf..aefb0ce97 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index f1314831f..651133eb9 100644
|
||||
index d356c1760..7f0501794 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -465,7 +465,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -39,10 +39,10 @@ index f1314831f..651133eb9 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 1491de7e7..877598a54 100644
|
||||
index 7555fc3f7..ff5eb0b3d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1756,6 +1756,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1751,6 +1751,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
switch (packetplayinentityaction.c()) {
|
||||
case START_SNEAKING:
|
||||
this.player.setSneaking(true);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 13a089dda417c02ad24a9f7beb9fe49e224c1738 Mon Sep 17 00:00:00 2001
|
||||
From 24bc29559bef951a0595aa26db08a6c62130ed0d Mon Sep 17 00:00:00 2001
|
||||
From: Minecrell <minecrell@minecrell.net>
|
||||
Date: Fri, 9 Jun 2017 19:03:43 +0200
|
||||
Subject: [PATCH] Use TerminalConsoleAppender for console improvements
|
||||
@ -143,7 +143,7 @@ index 000000000..685deaa0e
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 0ebada490..be7030d56 100644
|
||||
index 4e9ef43b4..5bb1ea880 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -79,6 +79,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@ -185,7 +185,7 @@ index 0ebada490..be7030d56 100644
|
||||
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
|
||||
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f2c172ff1..3b918da4d 100644
|
||||
index dd910b16d..e046c2e33 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -56,7 +56,6 @@ import org.apache.commons.lang3.Validate;
|
||||
@ -224,7 +224,7 @@ index f2c172ff1..3b918da4d 100644
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
|
||||
this.serverThread = primaryThread = new Thread(this, "Server thread"); // Moved from main
|
||||
@@ -872,7 +875,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -873,7 +876,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
} finally {
|
||||
// CraftBukkit start - Restore terminal to original settings
|
||||
try {
|
||||
@ -233,7 +233,7 @@ index f2c172ff1..3b918da4d 100644
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1360,7 +1363,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1361,7 +1364,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
|
||||
@ -257,7 +257,7 @@ index 9d44dcb3b..8bb3fef21 100644
|
||||
|
||||
this.k = new GameProfileBanList(PlayerList.a);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 457dec91a..4a9af9ac1 100644
|
||||
index 471da648f..7430c27bc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -144,8 +144,8 @@ import java.nio.ByteBuffer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ecd540041475b9ae3053da3f2369e68e2d6eaf22 Mon Sep 17 00:00:00 2001
|
||||
From 8ab00ebdbffdb6ffc278a616981ca70c981125ee Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 15 Jan 2018 22:11:48 -0500
|
||||
Subject: [PATCH] Basic PlayerProfile API
|
||||
@ -429,10 +429,10 @@ index e1af5c488..0ef5ad116 100644
|
||||
* Calculates distance between 2 entities
|
||||
* @param e1
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3b918da4d..d8e82a83c 100644
|
||||
index e046c2e33..f5ad783c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1184,7 +1184,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1185,7 +1185,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
*/ // CraftBukkit end
|
||||
|
||||
String s1 = "."; // PAIL?
|
||||
@ -441,7 +441,7 @@ index 3b918da4d..d8e82a83c 100644
|
||||
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
|
||||
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
|
||||
UserCache usercache = new UserCache(gameprofilerepository, new File(s1, MinecraftServer.a.getName()));
|
||||
@@ -1633,6 +1633,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1634,6 +1634,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.G = i;
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ index 9bf2521be..059665836 100644
|
||||
|
||||
private UserCacheEntry(GameProfile gameprofile, Date date) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e08da05d4..b5d0886df 100644
|
||||
index 19ac5fdca..d4109898e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -162,6 +162,10 @@ import org.bukkit.event.server.ServerLoadEvent;
|
||||
|
@ -1,11 +1,11 @@
|
||||
From bdcc7ab68ac909dae02fa27d4590110abf4ab73a Mon Sep 17 00:00:00 2001
|
||||
From 70628488385eecbef6b1292f7d89b5eb811a9526 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 18 Jun 2017 18:17:05 -0500
|
||||
Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index b613d3d15..139207f33 100644
|
||||
index e80e7936a..58fffcaca 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -182,6 +182,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -49,10 +49,10 @@ index ce43b4bc5..98065d6b0 100644
|
||||
if ( entity.world.spigotConfig.nerfSpawnerMobs )
|
||||
{
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 2858f11ee..5689f8390 100644
|
||||
index c3096d87e..8b0f530ba 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -841,5 +841,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -839,5 +839,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
Location origin = getHandle().origin;
|
||||
return origin == null ? null : origin.clone();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d7412aafd5f494f209d87fa9c316b395cc3d86e6 Mon Sep 17 00:00:00 2001
|
||||
From f02f659c78850bc1e3aa17c5a8d315c20e238de0 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Thu, 5 Oct 2017 01:54:07 +0100
|
||||
Subject: [PATCH] handle PacketPlayInKeepAlive async
|
||||
@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
|
||||
random disconnections for clients.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 8cd898a94..a781ca166 100644
|
||||
index 427cba63c..00d1e77e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2470,14 +2470,18 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -2465,14 +2465,18 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
|
||||
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8126973d504b4841430b8c737eb0d76fe14a557e Mon Sep 17 00:00:00 2001
|
||||
From 929f9ec6f37275914c15fc6ba21f9b3304dba68f Mon Sep 17 00:00:00 2001
|
||||
From: Minecrell <minecrell@minecrell.net>
|
||||
Date: Wed, 11 Oct 2017 15:56:26 +0200
|
||||
Subject: [PATCH] Implement extended PaperServerListPingEvent
|
||||
@ -177,7 +177,7 @@ index 000000000..26e3031d2
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d8e82a83c..a55ab0fd9 100644
|
||||
index f5ad783c5..c562ba546 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -188,7 +188,7 @@ index d8e82a83c..a55ab0fd9 100644
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
@@ -938,7 +939,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -939,7 +940,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
if (i - this.Y >= 5000000000L) {
|
||||
this.Y = i;
|
||||
this.m.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount()));
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ac5e264a067c2fd8b4a762a6e6ec31f09e2d35eb Mon Sep 17 00:00:00 2001
|
||||
From 69b9dc4bb89f52b2eda30c40b552efced841414f Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 16 Mar 2018 22:59:43 -0400
|
||||
Subject: [PATCH] Improved Async Task Scheduler
|
||||
@ -159,10 +159,10 @@ index 000000000..3c1992e21
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 8963168ed..05285cf0b 100644
|
||||
index 3ef79e3e9..3acfc0766 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -16,7 +16,6 @@ import java.util.function.Consumer;
|
||||
@@ -17,7 +17,6 @@ import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@ -170,7 +170,7 @@ index 8963168ed..05285cf0b 100644
|
||||
import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||
import com.destroystokyo.paper.exception.ServerSchedulerException;
|
||||
import org.apache.commons.lang.Validate;
|
||||
@@ -62,7 +61,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -63,7 +62,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
/**
|
||||
* Main thread logic only
|
||||
*/
|
||||
@ -179,7 +179,7 @@ index 8963168ed..05285cf0b 100644
|
||||
new Comparator<CraftTask>() {
|
||||
public int compare(final CraftTask o1, final CraftTask o2) {
|
||||
int value = Long.compare(o1.getNextRun(), o2.getNextRun());
|
||||
@@ -78,13 +77,13 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -79,21 +78,38 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
/**
|
||||
* These are tasks that are currently active. It's provided for 'viewing' the current state.
|
||||
*/
|
||||
@ -190,13 +190,16 @@ index 8963168ed..05285cf0b 100644
|
||||
*/
|
||||
private volatile CraftTask currentTask = null;
|
||||
- private volatile int currentTick = -1;
|
||||
- private final Executor executor = Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %1$d").build()); // Spigot
|
||||
- private final Executor executor = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %d").build());
|
||||
- private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}};
|
||||
- private CraftAsyncDebugger debugTail = debugHead;
|
||||
+ volatile int currentTick = -1; // Paper
|
||||
+ //private final Executor executor = Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %1$d").build()); // Spigot // Paper - moved to AsyncScheduler
|
||||
//private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}}; // Paper
|
||||
//private CraftAsyncDebugger debugTail = debugHead; // Paper
|
||||
+ //private final Executor executor = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %d").build()); // Paper - moved to AsyncScheduler
|
||||
+ //private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}}; // Paper
|
||||
+ //private CraftAsyncDebugger debugTail = debugHead; // Paper
|
||||
private static final int RECENT_TICKS;
|
||||
@@ -93,6 +92,23 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
|
||||
static {
|
||||
RECENT_TICKS = 30;
|
||||
}
|
||||
|
||||
@ -220,7 +223,7 @@ index 8963168ed..05285cf0b 100644
|
||||
@Override
|
||||
public int scheduleSyncDelayedTask(final Plugin plugin, final Runnable task) {
|
||||
return this.scheduleSyncDelayedTask(plugin, task, 0L);
|
||||
@@ -209,7 +225,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -210,7 +226,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
} else if (period < CraftTask.NO_REPEATING) {
|
||||
period = CraftTask.NO_REPEATING;
|
||||
}
|
||||
@ -229,7 +232,7 @@ index 8963168ed..05285cf0b 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -225,6 +241,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -226,6 +242,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
if (taskId <= 0) {
|
||||
return;
|
||||
}
|
||||
@ -241,7 +244,7 @@ index 8963168ed..05285cf0b 100644
|
||||
CraftTask task = runners.get(taskId);
|
||||
if (task != null) {
|
||||
task.cancel0();
|
||||
@@ -265,6 +286,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -266,6 +287,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@Override
|
||||
public void cancelTasks(final Plugin plugin) {
|
||||
Validate.notNull(plugin, "Cannot cancel tasks of null plugin");
|
||||
@ -253,7 +256,7 @@ index 8963168ed..05285cf0b 100644
|
||||
final CraftTask task = new CraftTask(
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
@@ -303,6 +329,13 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -304,6 +330,13 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
|
||||
@Override
|
||||
public boolean isCurrentlyRunning(final int taskId) {
|
||||
@ -267,7 +270,7 @@ index 8963168ed..05285cf0b 100644
|
||||
final CraftTask task = runners.get(taskId);
|
||||
if (task == null) {
|
||||
return false;
|
||||
@@ -321,6 +354,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -322,6 +355,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
if (taskId <= 0) {
|
||||
return false;
|
||||
}
|
||||
@ -279,7 +282,7 @@ index 8963168ed..05285cf0b 100644
|
||||
for (CraftTask task = head.getNext(); task != null; task = task.getNext()) {
|
||||
if (task.getTaskId() == taskId) {
|
||||
return task.getPeriod() >= CraftTask.NO_REPEATING; // The task will run
|
||||
@@ -332,6 +370,12 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -333,6 +371,12 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
|
||||
@Override
|
||||
public List<BukkitWorker> getActiveWorkers() {
|
||||
@ -292,7 +295,7 @@ index 8963168ed..05285cf0b 100644
|
||||
final ArrayList<BukkitWorker> workers = new ArrayList<BukkitWorker>();
|
||||
for (final CraftTask taskObj : runners.values()) {
|
||||
// Iterator will be a best-effort (may fail to grab very new values) if called from an async thread
|
||||
@@ -369,6 +413,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -370,6 +414,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
pending.add(task);
|
||||
}
|
||||
}
|
||||
@ -304,7 +307,7 @@ index 8963168ed..05285cf0b 100644
|
||||
return pending;
|
||||
}
|
||||
|
||||
@@ -376,6 +425,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -377,6 +426,11 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
* This method is designed to never block or wait for locks; an immediate execution of all current tasks.
|
||||
*/
|
||||
public void mainThreadHeartbeat(final int currentTick) {
|
||||
@ -316,7 +319,7 @@ index 8963168ed..05285cf0b 100644
|
||||
this.currentTick = currentTick;
|
||||
final List<CraftTask> temp = this.temp;
|
||||
parsePending();
|
||||
@@ -412,7 +466,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -413,7 +467,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
parsePending();
|
||||
} else {
|
||||
//debugTail = debugTail.setNext(new CraftAsyncDebugger(currentTick + RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
|
||||
@ -325,7 +328,7 @@ index 8963168ed..05285cf0b 100644
|
||||
// We don't need to parse pending
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
}
|
||||
@@ -431,7 +485,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -432,7 +486,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
//debugHead = debugHead.getNextHead(currentTick); // Paper
|
||||
}
|
||||
|
||||
@ -334,7 +337,7 @@ index 8963168ed..05285cf0b 100644
|
||||
final AtomicReference<CraftTask> tail = this.tail;
|
||||
CraftTask tailTask = tail.get();
|
||||
while (!tail.compareAndSet(tailTask, task)) {
|
||||
@@ -440,7 +494,13 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -441,7 +495,13 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
tailTask.setNext(task);
|
||||
}
|
||||
|
||||
@ -349,7 +352,7 @@ index 8963168ed..05285cf0b 100644
|
||||
task.setNextRun(currentTick + delay);
|
||||
addTask(task);
|
||||
return task;
|
||||
@@ -459,8 +519,8 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -460,8 +520,8 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
return ids.incrementAndGet();
|
||||
}
|
||||
|
||||
@ -360,7 +363,7 @@ index 8963168ed..05285cf0b 100644
|
||||
CraftTask head = this.head;
|
||||
CraftTask task = head.getNext();
|
||||
CraftTask lastTask = head;
|
||||
@@ -479,7 +539,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -480,7 +540,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
task.setNext(null);
|
||||
}
|
||||
this.head = lastTask;
|
||||
@ -370,5 +373,5 @@ index 8963168ed..05285cf0b 100644
|
||||
|
||||
private boolean isReady(final int currentTick) {
|
||||
--
|
||||
2.20.0
|
||||
2.20.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 787d4f401e6ff2e55413dcf8920b14c49ca3586c Mon Sep 17 00:00:00 2001
|
||||
From 31443c27ba1f2d3c990ac68ba75539433f774c43 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 31 Mar 2018 17:04:26 +0100
|
||||
Subject: [PATCH] Flag to disable the channel limit
|
||||
@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
|
||||
provide an optional flag to disable this check, at your own risk.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 4f849ab1a1..412ac16dcb 100644
|
||||
index 59f74abaf..0753a0f26 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -131,6 +131,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -24,8 +24,8 @@ index 4f849ab1a1..412ac16dcb 100644
|
||||
}
|
||||
|
||||
public void addChannel(String channel) {
|
||||
- com.google.common.base.Preconditions.checkState( channels.size() < 128, "Too many channels registered" ); // Spigot
|
||||
+ com.google.common.base.Preconditions.checkState( DISABLE_CHANNEL_LIMIT || channels.size() < 128, "Too many channels registered" ); // Spigot // Paper - flag to disable channel limit
|
||||
- Preconditions.checkState(channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel);
|
||||
+ Preconditions.checkState(DISABLE_CHANNEL_LIMIT || channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel); // Paper - flag to disable channel limit
|
||||
channel = StandardMessenger.validateAndCorrectChannel(channel);
|
||||
if (channels.add(channel)) {
|
||||
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
|
||||
|
@ -1,14 +1,14 @@
|
||||
From f873cffebca4f0b1919d9c2f17ce0700200582b4 Mon Sep 17 00:00:00 2001
|
||||
From ddbd51c7f39aecd2b7732403850ef496098421b3 Mon Sep 17 00:00:00 2001
|
||||
From: 0x22 <0x22@futureclient.net>
|
||||
Date: Thu, 26 Apr 2018 04:41:11 -0400
|
||||
Subject: [PATCH] Fix exploit that allowed colored signs to be created
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 21570ceb7..dfd64d1f5 100644
|
||||
index 886d66edd..d4a1e7b22 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2483,7 +2483,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -2478,7 +2478,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
String[] lines = new String[4];
|
||||
|
||||
for (int i = 0; i < astring.length; ++i) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 43819e2b05eb9c6001e91e7895223842e997af52 Mon Sep 17 00:00:00 2001
|
||||
From e27d17d03ec3969445e890a1fb1b2f6c4c9369ef Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 15 Aug 2017 22:29:12 -0400
|
||||
Subject: [PATCH] Expand World.spawnParticle API and add Builder
|
||||
@ -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/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 44b003325..ed833ffd6 100644
|
||||
index e5ac50e88..2920a276c 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1190,12 +1190,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1184,12 +1184,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
}
|
||||
|
||||
public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ab5a860741bd1befed79f88e1314c120dc62d65d Mon Sep 17 00:00:00 2001
|
||||
From 23465974e577d60e2d1a9cd5a17a92482937de18 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 10 Jun 2018 20:04:42 -0400
|
||||
Subject: [PATCH] Properly remove entities on dimension teleport
|
||||
@ -22,7 +22,7 @@ requirement, but plugins (such as my own) use this method to
|
||||
trigger a "reload" of the entity on the client.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 139207f33..df7a1a47e 100644
|
||||
index 58fffcaca..469fea837 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2592,7 +2592,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -35,10 +35,10 @@ index 139207f33..df7a1a47e 100644
|
||||
this.world.methodProfiler.enter("reposition");
|
||||
/* CraftBukkit start - Handled in calculateTarget
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index ed833ffd6..8082de88f 100644
|
||||
index 2920a276c..a30b8e2cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1004,6 +1004,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -998,6 +998,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
}
|
||||
|
||||
protected void c(Entity entity) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a4e93bbdfd4204957151b71f41263ce137b0f1ea Mon Sep 17 00:00:00 2001
|
||||
From a8aaa82fc8fca58ee9cab877c23dbb674f02d44b Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 10 Jun 2018 20:20:15 -0400
|
||||
Subject: [PATCH] Fix CraftEntity hashCode
|
||||
@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle()
|
||||
However, replaced it too to make it clearer of intent.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 5689f8390..9aa9882e5 100644
|
||||
index 8b0f530ba..633cf7b30 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -544,14 +544,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -542,14 +542,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return false;
|
||||
}
|
||||
final CraftEntity other = (CraftEntity) obj;
|
||||
@ -45,5 +45,5 @@ index 5689f8390..9aa9882e5 100644
|
||||
|
||||
public void setMetadata(String metadataKey, MetadataValue newMetadataValue) {
|
||||
--
|
||||
2.20.0
|
||||
2.20.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c12ce1eba38dd8d3e267c2ef474428a7bff54d41 Mon Sep 17 00:00:00 2001
|
||||
From 59103d640f5ab2db103c203180429a3c45417476 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 3 Jul 2018 21:56:23 -0400
|
||||
Subject: [PATCH] InventoryCloseEvent Reason API
|
||||
@ -7,7 +7,7 @@ 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/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 6150b56e0e..3ca579e381 100644
|
||||
index 6150b56e0..3ca579e38 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -943,7 +943,7 @@ public class Chunk implements IChunkAccess {
|
||||
@ -29,7 +29,7 @@ index 6150b56e0e..3ca579e381 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index d9ee36faf3..cdf5eb62e7 100644
|
||||
index d9ee36faf..cdf5eb62e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -158,7 +158,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -56,7 +56,7 @@ index d9ee36faf3..cdf5eb62e7 100644
|
||||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index cd488d37f2..1054367d0e 100644
|
||||
index cd488d37f..1054367d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -344,7 +344,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -110,10 +110,10 @@ index cd488d37f2..1054367d0e 100644
|
||||
this.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index dfd64d1f58..3c9cfad9c5 100644
|
||||
index d4a1e7b22..153c02818 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2019,7 +2019,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -2014,7 +2014,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer());
|
||||
|
||||
if (this.player.isFrozen()) return; // CraftBukkit
|
||||
@ -123,7 +123,7 @@ index dfd64d1f58..3c9cfad9c5 100644
|
||||
this.player.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 96eff10ffa..ddaa73e83d 100644
|
||||
index 96eff10ff..ddaa73e83 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -422,7 +422,7 @@ public abstract class PlayerList {
|
||||
@ -136,7 +136,7 @@ index 96eff10ffa..ddaa73e83d 100644
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
||||
cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index b82aa903ca..a2bf6b0460 100644
|
||||
index b82aa903c..a2bf6b046 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -513,8 +513,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@ -155,7 +155,7 @@ index b82aa903ca..a2bf6b0460 100644
|
||||
public boolean isBlocking() {
|
||||
return getHandle().isBlocking();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 412ac16dcb..261bc223e1 100644
|
||||
index 0753a0f26..ce58cfc11 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -738,7 +738,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -168,7 +168,7 @@ index 412ac16dcb..261bc223e1 100644
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 6c105ef742..83f7116f4a 100644
|
||||
index 6c105ef74..83f7116f4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1099,8 +1099,19 @@ public class CraftEventFactory {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fe70b467258a4cf6619c3c2df43f70f7dd74b319 Mon Sep 17 00:00:00 2001
|
||||
From 964250b1664b2cc7b6f0e3e9ef6dcc27e7f53002 Mon Sep 17 00:00:00 2001
|
||||
From: Minecrell <minecrell@minecrell.net>
|
||||
Date: Fri, 13 Jul 2018 14:54:43 +0200
|
||||
Subject: [PATCH] Refresh player inventory when cancelling
|
||||
@ -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/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 3c9cfad9c..5aca8d1f2 100644
|
||||
index 153c02818..4e707b854 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1934,6 +1934,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -1929,6 +1929,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ff239ddd9650abfd150fdbad1be84f0df823f04e Mon Sep 17 00:00:00 2001
|
||||
From cb8325e11e171ac89a60cac088300ac085687172 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 19 Jul 2018 01:08:05 -0400
|
||||
Subject: [PATCH] Re-add vanilla entity warnings for duplicates
|
||||
@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data...
|
||||
We should kind of know about these things you know.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 8082de88f..702a5d9d6 100644
|
||||
index a30b8e2cb..ac8c7e6c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -970,7 +970,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -964,7 +964,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.g.remove(entity1);
|
||||
} else {
|
||||
if (!(entity instanceof EntityHuman)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8c270b75c708abd1ce8b5cfe1c04e7be8f75e95b Mon Sep 17 00:00:00 2001
|
||||
From cdaad3be415687f19b4ccaab36655985e943c5a0 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 08:25:40 -0400
|
||||
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
||||
Add -Ddebug.entities=true to your JVM flags to gain more information
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 969e43ed1..8bab03bd0 100644
|
||||
index d98bb4c6d..aee88f718 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -30,7 +30,7 @@ index 84efc1cc3..601fe77c5 100644
|
||||
public boolean captureBlockStates = false;
|
||||
public boolean captureTreeGeneration = false;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 702a5d9d6..be475288e 100644
|
||||
index ac8c7e6c4..a4895bd55 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -51,6 +51,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@ -43,7 +43,7 @@ index 702a5d9d6..be475288e 100644
|
||||
|
||||
// Add env and gen to constructor
|
||||
public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, PersistentCollection persistentcollection, WorldData worlddata, DimensionManager dimensionmanager, MethodProfiler methodprofiler, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
|
||||
@@ -958,7 +961,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -952,7 +955,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
|
||||
private boolean j(Entity entity) {
|
||||
if (entity.dead) {
|
||||
@ -57,7 +57,7 @@ index 702a5d9d6..be475288e 100644
|
||||
return false;
|
||||
} else {
|
||||
UUID uuid = entity.getUniqueID();
|
||||
@@ -970,8 +978,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -964,8 +972,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.g.remove(entity1);
|
||||
} else {
|
||||
if (!(entity instanceof EntityHuman)) {
|
||||
@ -75,7 +75,7 @@ index 702a5d9d6..be475288e 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -988,7 +1003,25 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -982,7 +997,25 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
protected void b(Entity entity) {
|
||||
super.b(entity);
|
||||
this.entitiesById.a(entity.getId(), entity);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 14e444b2fe2042407cbc1c10dd4a4d6d9caba4b8 Mon Sep 17 00:00:00 2001
|
||||
From 6ffac86b5ce51590fc9886bcfaf65c4ba78b7f78 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
||||
Subject: [PATCH] Duplicate UUID Resolve Option
|
||||
@ -163,7 +163,7 @@ index 1c1f39524..edae53b82 100644
|
||||
// CraftBukkit start
|
||||
List<Entity> toRemove = new LinkedList<>();
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 8bab03bd0..3e6a36af6 100644
|
||||
index aee88f718..1b5663e52 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2720,6 +2720,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -188,7 +188,7 @@ index 601fe77c5..4df291f0d 100644
|
||||
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
|
||||
private final List<TileEntity> c = Lists.newArrayList();
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index be475288e..e7dbd730c 100644
|
||||
index a4895bd55..a896f8fe4 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -37,7 +37,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@ -200,7 +200,7 @@ index be475288e..e7dbd730c 100644
|
||||
public boolean savingDisabled;
|
||||
private boolean J;
|
||||
private int emptyTime;
|
||||
@@ -978,7 +978,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -972,7 +972,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.g.remove(entity1);
|
||||
} else {
|
||||
if (!(entity instanceof EntityHuman)) {
|
||||
@ -209,7 +209,7 @@ index be475288e..e7dbd730c 100644
|
||||
WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper
|
||||
WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper
|
||||
|
||||
@@ -1009,7 +1009,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1003,7 +1003,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
}
|
||||
|
||||
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3e31184a36f550f8b89aba7879c6d92fd8871624 Mon Sep 17 00:00:00 2001
|
||||
From d9812faa701cf379d733e98cf420a0603cdebfc7 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 29 Jul 2018 15:48:50 -0400
|
||||
Subject: [PATCH] Provide option to use a versioned world folder for testing
|
||||
@ -59,7 +59,7 @@ index 48b0a742a..f0b87972d 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 485bce987..829cc9ed8 100644
|
||||
index 485bce987..60143ff63 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -58,8 +58,55 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@ -88,7 +88,7 @@ index 485bce987..829cc9ed8 100644
|
||||
+ } catch (IOException e1) {
|
||||
+ LogManager.getLogger().error("Error copying " + template + " to " + actual, e1);
|
||||
+ MinecraftServer.getServer().safeShutdown();
|
||||
+ org.spigotmc.SneakyThrow.sneaky(e1);
|
||||
+ com.destroystokyo.paper.util.SneakyThrow.sneaky(e1);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
@ -161,7 +161,7 @@ index d07222239..8c8b7cbab 100644
|
||||
|
||||
public static synchronized void a() {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
index 577ba1b5f..31119ba69 100644
|
||||
index 577ba1b5f..9be0e994e 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||
@@ -32,6 +32,58 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
|
||||
@ -215,7 +215,7 @@ index 577ba1b5f..31119ba69 100644
|
||||
+ }
|
||||
+ } catch (IOException e) {
|
||||
+ LogManager.getLogger().error("Error copying versioned world data for " + origBaseDir + " to " + baseDir, e);
|
||||
+ org.spigotmc.SneakyThrow.sneaky(e);
|
||||
+ com.destroystokyo.paper.util.SneakyThrow.sneaky(e);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5f6398c14a4543338fd3755149367528da13c794 Mon Sep 17 00:00:00 2001
|
||||
From 4bec88c9c9d3934730f7c9ef94b409a04c8bcc66 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 3 Aug 2018 22:47:46 -0400
|
||||
Subject: [PATCH] Entity add to world fixes
|
||||
@ -79,10 +79,10 @@ index 0d112016f..187506b57 100644
|
||||
this.b(entity);
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index e7dbd730c..bd17e4cec 100644
|
||||
index a896f8fe4..609be457a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -974,7 +974,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -968,7 +968,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
if (this.entitiesByUUID.containsKey(uuid)) {
|
||||
Entity entity1 = (Entity) this.entitiesByUUID.get(uuid);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4da27fde3890046491fa34b977216fef33796a7d Mon Sep 17 00:00:00 2001
|
||||
From 778ab79ec584b375233848669b420c2cf97a1d43 Mon Sep 17 00:00:00 2001
|
||||
From: miclebrick <miclebrick@outlook.com>
|
||||
Date: Wed, 8 Aug 2018 15:30:52 -0400
|
||||
Subject: [PATCH] Add Early Warning Feature to WatchDog
|
||||
@ -36,10 +36,10 @@ index a92914576..f3f2a0b69 100644
|
||||
public static int tabSpamLimit = 500;
|
||||
private static void tabSpamLimiters() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a55ab0fd9..5a0dbcb42 100644
|
||||
index c562ba546..e993b4da6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -791,6 +791,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -792,6 +792,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.a(this.m);
|
||||
|
||||
// Spigot start
|
||||
@ -48,7 +48,7 @@ index a55ab0fd9..5a0dbcb42 100644
|
||||
long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ec197ef51..392cd0e3d 100644
|
||||
index 20c78e207..5372e9d54 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -750,6 +750,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -1,11 +1,11 @@
|
||||
From cbe420b306d65b21de3f18e40655a1151d69dde4 Mon Sep 17 00:00:00 2001
|
||||
From b653e9300499fcf6392f38e8505dab6517d08ebe Mon Sep 17 00:00:00 2001
|
||||
From: Mystiflow <mystiflow@gmail.com>
|
||||
Date: Fri, 6 Jul 2018 13:21:30 +0100
|
||||
Subject: [PATCH] Send nearby packets from world player list not server list
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index a00ce829f..fee3b68d1 100644
|
||||
index ddaa73e83..ec760325b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1201,8 +1201,25 @@ public abstract class PlayerList {
|
||||
@ -95,10 +95,10 @@ index b4225b58e..0ba0eb661 100644
|
||||
if (entityplayer != null && entityplayer.world == this.world && entityplayer.getId() != i) {
|
||||
double d0 = (double) blockposition.getX() - entityplayer.locX;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index bd17e4cec..0a1ffd009 100644
|
||||
index 609be457a..a9fffa544 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1071,7 +1071,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1065,7 +1065,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (super.strikeLightning(entity)) {
|
||||
@ -107,7 +107,7 @@ index bd17e4cec..0a1ffd009 100644
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -1131,8 +1131,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1125,8 +1125,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
BlockActionData blockactiondata = (BlockActionData) this.d.removeFirst();
|
||||
|
||||
if (this.a(blockactiondata)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1568726fe1d7c95968a9cf75e665b673bf734dc9 Mon Sep 17 00:00:00 2001
|
||||
From cfcab7a04827487d90952a733d878d4eaa6a8a28 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 27 Apr 2016 22:09:52 -0400
|
||||
Subject: [PATCH] Optimize Hoppers
|
||||
@ -31,7 +31,7 @@ index 10efe6b3d..6feea98b6 100644
|
||||
private void disableSprintInterruptionOnAttack() {
|
||||
disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index e0091358a..99dab7a47 100644
|
||||
index 76f80e7eb..3451ea3da 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -464,8 +464,9 @@ public final class ItemStack {
|
||||
@ -47,10 +47,10 @@ index e0091358a..99dab7a47 100644
|
||||
itemstack.d(this.B());
|
||||
if (this.tag != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5a0dbcb42..59a71e5b0 100644
|
||||
index e993b4da6..41c9dccab 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1045,7 +1045,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1046,7 +1046,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
// CraftBukkit - dropTickTime
|
||||
for (Iterator iterator = this.getWorlds().iterator(); iterator.hasNext();) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a281a85e72ed953207551867a9fd58f4c040306a Mon Sep 17 00:00:00 2001
|
||||
From 3b4942bc3e766dae5126d7dede1e187b42437635 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 16 Sep 2018 00:00:16 -0400
|
||||
Subject: [PATCH] Optimize and Fix ExpiringMap Issues
|
||||
@ -290,7 +290,7 @@ index bd3636479..bf6095137 100644
|
||||
+ */ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 59a71e5b0..7b24f6e24 100644
|
||||
index 41c9dccab..6138c14ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -150,6 +150,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@ -301,7 +301,7 @@ index 59a71e5b0..7b24f6e24 100644
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
@@ -994,6 +995,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -995,6 +996,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
this.methodProfiler.exit();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
PaperLightingQueue.processQueue(startTime); // Paper
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3c1a965bd7670ddf173313ffb16dfe8a28b42817 Mon Sep 17 00:00:00 2001
|
||||
From 291b93b50bc17be89a1b494314c2bde27839f1b4 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 17 Sep 2018 23:37:31 -0400
|
||||
Subject: [PATCH] Optimize Server World Map
|
||||
@ -217,19 +217,19 @@ index 000000000..af9e4455c
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 11510640a..d0be8d2fb 100644
|
||||
index 5393a11db..68743a6b7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -82,7 +82,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
public final DataFixer dataConverterManager;
|
||||
private String serverIp;
|
||||
private int q = -1;
|
||||
- public final Map<DimensionManager, WorldServer> worldServer = Maps.newIdentityHashMap();
|
||||
+ public final Map<DimensionManager, WorldServer> worldServer = new com.destroystokyo.paper.PaperWorldMap(); // Paper
|
||||
- public final Map<DimensionManager, WorldServer> worldServer = Maps.newLinkedHashMap(); // CraftBukkit - keep order, k+v already use identity methods
|
||||
+ public final Map<DimensionManager, WorldServer> worldServer = new com.destroystokyo.paper.PaperWorldMap(); // Paper;
|
||||
private PlayerList playerList;
|
||||
private boolean isRunning = true;
|
||||
private boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
||||
@@ -545,7 +545,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -546,7 +546,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 275e0ccf901515a273c3014d29fa86a2191dfbc9 Mon Sep 17 00:00:00 2001
|
||||
From 75a29b394a7a772620d850fa0422a2627afb5209 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 16:55:04 -0400
|
||||
Subject: [PATCH] Async Chunk Loading and Generation
|
||||
@ -712,7 +712,7 @@ index 186cfda7e..9cdeb3bfc 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 18c06d3c8..5e00ca869 100644
|
||||
index d938eb374..51df075b4 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -119,7 +119,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@ -933,7 +933,7 @@ index f5a6387f2..f45685099 100644
|
||||
private final MinecraftServer d;
|
||||
private final java.nio.file.Path e;
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 11d5c2655..80e395b1a 100644
|
||||
index cb8125c13..5807ef8a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -207,7 +207,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -980,10 +980,10 @@ index 8bb2593aa..67bb28954 100644
|
||||
f %= 360.0F;
|
||||
if (f >= 180.0F) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d0be8d2fb..84d588122 100644
|
||||
index 68743a6b7..1dbb03a9a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -498,6 +498,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -499,6 +499,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
// CraftBukkit start - fire WorldLoadEvent and handle whether or not to keep the spawn in memory
|
||||
Stopwatch stopwatch = Stopwatch.createStarted();
|
||||
@ -991,7 +991,7 @@ index d0be8d2fb..84d588122 100644
|
||||
for (WorldServer worldserver : this.getWorlds()) {
|
||||
MinecraftServer.LOGGER.info("Preparing start region for level " + worldserver.dimension + " (Seed: " + worldserver.getSeed() + ")");
|
||||
if (!worldserver.getWorld().getKeepSpawnInMemory()) {
|
||||
@@ -505,29 +506,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -506,29 +507,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
BlockPosition blockposition = worldserver.getSpawn();
|
||||
@ -1030,7 +1030,7 @@ index d0be8d2fb..84d588122 100644
|
||||
} catch (InterruptedException interruptedexception) {
|
||||
throw new RuntimeException(interruptedexception);
|
||||
} catch (ExecutionException executionexception) {
|
||||
@@ -537,11 +533,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -538,11 +534,11 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
throw new RuntimeException(executionexception.getCause());
|
||||
} catch (TimeoutException timeoutexception) {
|
||||
@ -1044,7 +1044,7 @@ index d0be8d2fb..84d588122 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,6 +641,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -646,6 +642,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
if (hasStopped) return;
|
||||
hasStopped = true;
|
||||
}
|
||||
@ -1052,7 +1052,7 @@ index d0be8d2fb..84d588122 100644
|
||||
// CraftBukkit end
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
MinecraftTimings.stopServer(); // Paper
|
||||
@@ -1012,6 +1009,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1013,6 +1010,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
while ((futuretask = (FutureTask) this.f.poll()) != null) {
|
||||
SystemUtils.a(futuretask, MinecraftServer.LOGGER);
|
||||
}
|
||||
@ -1060,7 +1060,7 @@ index d0be8d2fb..84d588122 100644
|
||||
MinecraftTimings.minecraftSchedulerTimer.stopTiming(); // Paper
|
||||
|
||||
this.methodProfiler.exitEnter("commandFunctions");
|
||||
@@ -1048,6 +1046,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1049,6 +1047,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
// CraftBukkit - dropTickTime
|
||||
for (Iterator iterator = this.getWorlds().iterator(); iterator.hasNext();) {
|
||||
WorldServer worldserver = (WorldServer) iterator.next();
|
||||
@ -2302,7 +2302,7 @@ index 69d8a25bd..d0eaa9e9f 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 0a1ffd009..82cfd694a 100644
|
||||
index a9fffa544..19ce77c4a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -715,7 +715,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@ -2315,7 +2315,7 @@ index 0a1ffd009..82cfd694a 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a0f255ff1..eb4b3c7a2 100644
|
||||
index 4dabd31d9..007cc6438 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1019,8 +1019,12 @@ public final class CraftServer implements Server {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8d9ddb839749ad2de242ca3ff21cf60d90fdde4a Mon Sep 17 00:00:00 2001
|
||||
From 19d69edcb1c593fee7bad9621ee962348a263945 Mon Sep 17 00:00:00 2001
|
||||
From: Trigary <trigary0@gmail.com>
|
||||
Date: Fri, 14 Sep 2018 17:42:08 +0200
|
||||
Subject: [PATCH] Limit lightning strike effect distance
|
||||
@ -69,10 +69,10 @@ index 7781babf5..50f620009 100644
|
||||
|
||||
--this.lifeTicks;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 82cfd694a..078399aa0 100644
|
||||
index 19ce77c4a..8e23d060d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1071,7 +1071,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1065,7 +1065,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (super.strikeLightning(entity)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9b72bdc36ddec893ff85f47c381a911f906e130e Mon Sep 17 00:00:00 2001
|
||||
From 73b95e741441136bd840b8242fdf0dc56b405046 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 2 Nov 2018 23:11:51 -0400
|
||||
Subject: [PATCH] Optimize World Time Updates
|
||||
@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
|
||||
object for every player unless they have per-player time enabled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 84d588122..f3f7d2aa1 100644
|
||||
index 1dbb03a9a..4e648ee73 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1032,12 +1032,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@@ -1033,12 +1033,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 79f6ba259c9cd7f19c33befe611f2d5bbbe6d75b
|
||||
Subproject commit 5b680f0b3229afd88011315696d19fc1c04d32e6
|
@ -1 +1 @@
|
||||
Subproject commit 7560d3b5ab2e8f09d1415d9945b9a3cdded08352
|
||||
Subproject commit 5932f8a7dae0fbf852592579edfa277ab260752a
|
@ -1 +1 @@
|
||||
Subproject commit 8173d06f799b09d24010fdeeac19f6e376101cab
|
||||
Subproject commit 19c3c5a51d345122f722bc1edf2a703dc40cee3c
|
Loading…
Reference in New Issue
Block a user