Patches
This commit is contained in:
parent
4fbe8d0b9b
commit
4d6f28bab3
4 changed files with 263 additions and 440 deletions
File diff suppressed because it is too large
Load diff
|
@ -547,10 +547,10 @@ index 0000000000000000000000000000000000000000..ae60bd96b5284d54676d8e7e4dd5d170
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 08ae7a96e93c0d8547f560b3f753804525621c6b..8f29bb843fc456384f7b4e216afca5018fb7f794 100644
|
index 1fe07773cf9664164b29164caba22800e5a6bdae..cb6f192c11cda6230ec365e6cefb44a37416236d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -191,6 +191,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -186,6 +186,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
// Paper start
|
// Paper start
|
||||||
paperConfigurations.initializeGlobalConfiguration();
|
paperConfigurations.initializeGlobalConfiguration();
|
||||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||||
|
@ -559,10 +559,10 @@ index 08ae7a96e93c0d8547f560b3f753804525621c6b..8f29bb843fc456384f7b4e216afca501
|
||||||
|
|
||||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 6139a06453e370865889f47644a6840fce2934f2..295318717fc603b3adc58fbda39bd65e97462b88 100644
|
index 26ae612c1314258f382d1fb28c07285b0f4cd780..f1acded917678d69fe9de2bdcab5f9f747a53d78 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -896,6 +896,7 @@ public final class CraftServer implements Server {
|
@@ -909,6 +909,7 @@ public final class CraftServer implements Server {
|
||||||
this.commandMap.clearCommands();
|
this.commandMap.clearCommands();
|
||||||
this.reloadData();
|
this.reloadData();
|
||||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||||
|
@ -570,7 +570,7 @@ index 6139a06453e370865889f47644a6840fce2934f2..295318717fc603b3adc58fbda39bd65e
|
||||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||||
|
|
||||||
@@ -2411,6 +2412,34 @@ public final class CraftServer implements Server {
|
@@ -2435,6 +2436,34 @@ public final class CraftServer implements Server {
|
||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
|
@ -690,10 +690,10 @@ index 0000000000000000000000000000000000000000..5a19e30a9b7e65a70f68a429b8ca741f
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 8f29bb843fc456384f7b4e216afca5018fb7f794..f4a6a6addbba65b3415320977048aeba0eadba63 100644
|
index cb6f192c11cda6230ec365e6cefb44a37416236d..11006df8797334da69801cdb9aa34b0f941cf90d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -192,6 +192,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -187,6 +187,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
paperConfigurations.initializeGlobalConfiguration();
|
paperConfigurations.initializeGlobalConfiguration();
|
||||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||||
io.papermc.paper.command.PaperCommands.registerCommands(this);
|
io.papermc.paper.command.PaperCommands.registerCommands(this);
|
||||||
|
@ -702,7 +702,7 @@ index 8f29bb843fc456384f7b4e216afca5018fb7f794..f4a6a6addbba65b3415320977048aeba
|
||||||
|
|
||||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index ed8ae212fc0ca781438fa9667f3f5cccc0af4cee..051d7c7fc5796ad056ae1ba5e5e630fde8794108 100644
|
index 83eabc34d952bbb13ec4b4bdcf34f647189c0b46..0a0aa6de31a94a701074cc5f43c94be7515a185c 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
@@ -83,6 +83,7 @@ public class SpigotConfig
|
@@ -83,6 +83,7 @@ public class SpigotConfig
|
|
@ -729,10 +729,10 @@ index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
if (listener.shouldPropagateHandlingExceptions()) {
|
if (listener.shouldPropagateHandlingExceptions()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a38c774549 100644
|
index fce3826745cf753247e0a7df02f3c73cf49dac06..ea35461400b55243a46989f1bbd57b428298e7a1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -177,7 +177,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent;
|
@@ -189,7 +189,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent;
|
||||||
import org.bukkit.event.server.ServerLoadEvent;
|
import org.bukkit.event.server.ServerLoadEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
@ -741,7 +741,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
|
|
||||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
||||||
|
|
||||||
@@ -854,6 +854,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -862,6 +862,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
MinecraftServer.LOGGER.info("Stopping server");
|
MinecraftServer.LOGGER.info("Stopping server");
|
||||||
|
@ -749,7 +749,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this.server != null) {
|
if (this.server != null) {
|
||||||
this.server.disablePlugins();
|
this.server.disablePlugins();
|
||||||
@@ -1095,9 +1096,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1102,9 +1103,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
private boolean haveTime() {
|
private boolean haveTime() {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
@ -771,7 +771,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
private void executeModerately() {
|
private void executeModerately() {
|
||||||
this.runAllTasks();
|
this.runAllTasks();
|
||||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||||
@@ -1105,9 +1118,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1112,9 +1125,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
protected void waitUntilNextTick() {
|
protected void waitUntilNextTick() {
|
||||||
|
@ -783,7 +783,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1193,9 +1206,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1200,9 +1213,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public void onServerExit() {}
|
public void onServerExit() {}
|
||||||
|
|
||||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||||
|
@ -802,7 +802,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
++this.tickCount;
|
++this.tickCount;
|
||||||
this.tickChildren(shouldKeepTicking);
|
this.tickChildren(shouldKeepTicking);
|
||||||
if (i - this.lastServerStatus >= 5000000000L) {
|
if (i - this.lastServerStatus >= 5000000000L) {
|
||||||
@@ -1221,15 +1242,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1228,15 +1249,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
|
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
|
||||||
|
@ -823,7 +823,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
this.profiler.push("tallying");
|
this.profiler.push("tallying");
|
||||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||||
|
|
||||||
@@ -1239,30 +1263,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1246,30 +1270,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.frameTimer.logFrameDuration(i1 - i);
|
this.frameTimer.logFrameDuration(i1 - i);
|
||||||
this.profiler.pop();
|
this.profiler.pop();
|
||||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||||
|
@ -862,7 +862,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||||
if (this.tickCount % 20 == 0) {
|
if (this.tickCount % 20 == 0) {
|
||||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||||
@@ -1270,7 +1293,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1277,7 +1300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -871,7 +871,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||||
@@ -1316,24 +1339,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1323,24 +1346,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
this.profiler.popPush("connection");
|
this.profiler.popPush("connection");
|
||||||
|
@ -903,7 +903,7 @@ index 77cb412656e741fdb7e002011e3a99ac304118cb..2b2b71f3963e66fa0d2683b10581b1a3
|
||||||
this.profiler.pop();
|
this.profiler.pop();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||||
index b7a06306614087dfab4d4dcf83797b5a92c376c5..00a50196f6a4768d84acfbbeec79a0753308f091 100644
|
index f20320a5278ebf647e2b05a6165d87705c57f9cd..6483a1d461904a0584b6808b2f86ac7329bba963 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||||
@@ -88,7 +88,7 @@ public class ServerFunctionManager {
|
@@ -88,7 +88,7 @@ public class ServerFunctionManager {
|
||||||
|
@ -916,10 +916,10 @@ index b7a06306614087dfab4d4dcf83797b5a92c376c5..00a50196f6a4768d84acfbbeec79a075
|
||||||
i = this.context.runTopCommand(function, source);
|
i = this.context.runTopCommand(function, source);
|
||||||
} finally {
|
} finally {
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index f4a6a6addbba65b3415320977048aeba0eadba63..c905602d23cdf3af1de7ab4419f11856b07da2ba 100644
|
index 11006df8797334da69801cdb9aa34b0f941cf90d..5e5c4de89784db702256ee765091e929066116e4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -63,8 +63,9 @@ import org.apache.logging.log4j.Level;
|
@@ -58,8 +58,9 @@ import org.apache.logging.log4j.Level;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.io.IoBuilder;
|
import org.apache.logging.log4j.io.IoBuilder;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -930,7 +930,7 @@ index f4a6a6addbba65b3415320977048aeba0eadba63..c905602d23cdf3af1de7ab4419f11856
|
||||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -410,7 +411,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -404,7 +405,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleConsoleInputs() {
|
public void handleConsoleInputs() {
|
||||||
|
@ -939,7 +939,7 @@ index f4a6a6addbba65b3415320977048aeba0eadba63..c905602d23cdf3af1de7ab4419f11856
|
||||||
while (!this.consoleInput.isEmpty()) {
|
while (!this.consoleInput.isEmpty()) {
|
||||||
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
||||||
|
|
||||||
@@ -425,7 +426,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -419,7 +420,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -948,7 +948,7 @@ index f4a6a6addbba65b3415320977048aeba0eadba63..c905602d23cdf3af1de7ab4419f11856
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -676,6 +677,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -665,6 +666,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String runCommand(String command) {
|
public String runCommand(String command) {
|
||||||
|
@ -956,7 +956,7 @@ index f4a6a6addbba65b3415320977048aeba0eadba63..c905602d23cdf3af1de7ab4419f11856
|
||||||
this.rconConsoleSource.prepareForCommand();
|
this.rconConsoleSource.prepareForCommand();
|
||||||
this.executeBlocking(() -> {
|
this.executeBlocking(() -> {
|
||||||
// CraftBukkit start - fire RemoteServerCommandEvent
|
// CraftBukkit start - fire RemoteServerCommandEvent
|
||||||
@@ -684,10 +686,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -673,10 +675,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -997,7 +997,7 @@ index f4a6a6addbba65b3415320977048aeba0eadba63..c905602d23cdf3af1de7ab4419f11856
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 8c6ca0acde4cb266a844a1670296ac327e3382dc..44f12777f115ca4d465bc603e1e23932e102efb2 100644
|
index 77ff6d46a4361ae1b377fa3cb269c75467a45f01..fc5965f8f2ac21a8465285e5933d8490b015568d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -1,8 +1,10 @@
|
@@ -1,8 +1,10 @@
|
||||||
|
@ -1011,7 +1011,7 @@ index 8c6ca0acde4cb266a844a1670296ac327e3382dc..44f12777f115ca4d465bc603e1e23932
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Queues;
|
import com.google.common.collect.Queues;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
@@ -852,6 +854,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -864,6 +866,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
ChunkStatus chunkstatus = ChunkHolder.getStatus(chunkHolder.getTicketLevel());
|
ChunkStatus chunkstatus = ChunkHolder.getStatus(chunkHolder.getTicketLevel());
|
||||||
|
|
||||||
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
|
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
|
||||||
|
@ -1019,7 +1019,7 @@ index 8c6ca0acde4cb266a844a1670296ac327e3382dc..44f12777f115ca4d465bc603e1e23932
|
||||||
ChunkPos chunkcoordintpair = chunkHolder.getPos();
|
ChunkPos chunkcoordintpair = chunkHolder.getPos();
|
||||||
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
|
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
|
||||||
LevelChunk chunk;
|
LevelChunk chunk;
|
||||||
@@ -876,6 +879,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -888,6 +891,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
return chunk;
|
return chunk;
|
||||||
|
@ -1027,7 +1027,7 @@ index 8c6ca0acde4cb266a844a1670296ac327e3382dc..44f12777f115ca4d465bc603e1e23932
|
||||||
});
|
});
|
||||||
}, (runnable) -> {
|
}, (runnable) -> {
|
||||||
ProcessorHandle mailbox = this.mainThreadMailbox;
|
ProcessorHandle mailbox = this.mainThreadMailbox;
|
||||||
@@ -1428,6 +1432,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1440,6 +1444,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
List<ServerPlayer> list = Lists.newArrayList();
|
List<ServerPlayer> list = Lists.newArrayList();
|
||||||
List<ServerPlayer> list1 = this.level.players();
|
List<ServerPlayer> list1 = this.level.players();
|
||||||
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
||||||
|
@ -1035,7 +1035,7 @@ index 8c6ca0acde4cb266a844a1670296ac327e3382dc..44f12777f115ca4d465bc603e1e23932
|
||||||
|
|
||||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
||||||
|
|
||||||
@@ -1452,14 +1457,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1464,14 +1469,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1054,10 +1054,10 @@ index 8c6ca0acde4cb266a844a1670296ac327e3382dc..44f12777f115ca4d465bc603e1e23932
|
||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index 85238e1bcb2a7ac8f824f10409ee5a4bc7e6c002..0bf02ffba51e0dda6d01972c3f8c834c42d72512 100644
|
index 794ad2dbaea2555d4557124e9d942d3e6919ea09..28c8a3ba1caddf0ea334a6ef43cae25f982743e4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -414,13 +414,15 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -415,13 +415,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
|
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
|
||||||
|
@ -1075,7 +1075,7 @@ index 85238e1bcb2a7ac8f824f10409ee5a4bc7e6c002..0bf02ffba51e0dda6d01972c3f8c834c
|
||||||
ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||||
return ichunkaccess1;
|
return ichunkaccess1;
|
||||||
}, (playerchunk_failure) -> {
|
}, (playerchunk_failure) -> {
|
||||||
@@ -618,7 +620,9 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -619,7 +621,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
public void save(boolean flush) {
|
public void save(boolean flush) {
|
||||||
this.runDistanceManagerUpdates();
|
this.runDistanceManagerUpdates();
|
||||||
|
@ -1085,7 +1085,7 @@ index 85238e1bcb2a7ac8f824f10409ee5a4bc7e6c002..0bf02ffba51e0dda6d01972c3f8c834c
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -657,7 +661,9 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -658,7 +662,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
||||||
this.level.getProfiler().popPush("chunks");
|
this.level.getProfiler().popPush("chunks");
|
||||||
if (tickChunks) {
|
if (tickChunks) {
|
||||||
|
@ -1095,7 +1095,7 @@ index 85238e1bcb2a7ac8f824f10409ee5a4bc7e6c002..0bf02ffba51e0dda6d01972c3f8c834c
|
||||||
}
|
}
|
||||||
|
|
||||||
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
||||||
@@ -686,13 +692,16 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -687,13 +693,16 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||||
|
|
||||||
gameprofilerfiller.push("naturalSpawnCount");
|
gameprofilerfiller.push("naturalSpawnCount");
|
||||||
|
@ -1112,7 +1112,7 @@ index 85238e1bcb2a7ac8f824f10409ee5a4bc7e6c002..0bf02ffba51e0dda6d01972c3f8c834c
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
||||||
@@ -721,27 +730,27 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -722,27 +731,27 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
||||||
|
@ -1146,7 +1146,7 @@ index 85238e1bcb2a7ac8f824f10409ee5a4bc7e6c002..0bf02ffba51e0dda6d01972c3f8c834c
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fae052d1b6 100644
|
index 017e0ae318c15cfce72ed389b250345418e7b876..a6387b7dcc51cdf5d2646162cb24c1ba7f84795b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1,6 +1,8 @@
|
@@ -1,6 +1,8 @@
|
||||||
|
@ -1158,7 +1158,7 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.mojang.datafixers.DataFixer;
|
import com.mojang.datafixers.DataFixer;
|
||||||
import com.mojang.datafixers.util.Pair;
|
import com.mojang.datafixers.util.Pair;
|
||||||
@@ -157,7 +159,6 @@ import org.slf4j.Logger;
|
@@ -160,7 +162,6 @@ import org.slf4j.Logger;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.WeatherType;
|
import org.bukkit.WeatherType;
|
||||||
|
@ -1166,7 +1166,7 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||||
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
||||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||||
@@ -449,7 +450,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -452,7 +453,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.updateSkyBrightness();
|
this.updateSkyBrightness();
|
||||||
this.tickTime();
|
this.tickTime();
|
||||||
gameprofilerfiller.popPush("tickPending");
|
gameprofilerfiller.popPush("tickPending");
|
||||||
|
@ -1175,7 +1175,7 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
if (!this.isDebug()) {
|
if (!this.isDebug()) {
|
||||||
j = this.getGameTime();
|
j = this.getGameTime();
|
||||||
gameprofilerfiller.push("blockTicks");
|
gameprofilerfiller.push("blockTicks");
|
||||||
@@ -458,12 +459,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -461,12 +462,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
}
|
}
|
||||||
|
@ -1193,15 +1193,15 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
gameprofilerfiller.popPush("blockEvents");
|
gameprofilerfiller.popPush("blockEvents");
|
||||||
timings.doSounds.startTiming(); // Spigot
|
timings.doSounds.startTiming(); // Spigot
|
||||||
this.runBlockEvents();
|
this.runBlockEvents();
|
||||||
@@ -630,6 +635,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -651,6 +656,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.popPush("tickBlocks");
|
gameprofilerfiller.popPush("tickBlocks");
|
||||||
+ timings.chunkTicksBlocks.startTiming(); // Paper
|
+ timings.chunkTicksBlocks.startTiming(); // Paper
|
||||||
if (randomTickSpeed > 0) {
|
if (randomTickSpeed > 0) {
|
||||||
LevelChunkSection[] achunksection = chunk.getSections();
|
LevelChunkSection[] achunksection = chunk.getSections();
|
||||||
int l = achunksection.length;
|
int j1 = achunksection.length;
|
||||||
@@ -662,6 +668,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -683,6 +689,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1209,7 +1209,7 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -896,14 +903,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -917,14 +924,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tickNonPassenger(Entity entity) {
|
public void tickNonPassenger(Entity entity) {
|
||||||
|
@ -1233,7 +1233,7 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
entity.setOldPosAndRot();
|
entity.setOldPosAndRot();
|
||||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||||
|
|
||||||
@@ -922,7 +937,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -943,7 +958,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
this.tickPassenger(entity, entity1);
|
this.tickPassenger(entity, entity1);
|
||||||
}
|
}
|
||||||
|
@ -1242,7 +1242,7 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -964,6 +979,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -985,6 +1000,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
if (!savingDisabled) {
|
if (!savingDisabled) {
|
||||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
|
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
|
||||||
|
@ -1250,7 +1250,7 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
if (progressListener != null) {
|
if (progressListener != null) {
|
||||||
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||||
}
|
}
|
||||||
@@ -973,7 +989,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -994,7 +1010,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1262,10 +1262,10 @@ index f5ed23104c781098e64850b32963d13c1a611b96..3049d732ce3df71a4755ee9160d4f3fa
|
||||||
this.entityManager.saveAll();
|
this.entityManager.saveAll();
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index f1441c9fde9d736d4c053073a88a7a79222f5c5c..2f2d92bfda1713c7454e73cb2d2e77f69184a2d4 100644
|
index 340e7da85506b79be154bfea1445c6d2b4feefcc..45c12d663330f166000db326c8a145b6af9e2c46 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -342,7 +342,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -335,7 +335,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
|
@ -1273,15 +1273,15 @@ index f1441c9fde9d736d4c053073a88a7a79222f5c5c..2f2d92bfda1713c7454e73cb2d2e77f6
|
||||||
if (this.ackBlockChangesUpTo > -1) {
|
if (this.ackBlockChangesUpTo > -1) {
|
||||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||||
this.ackBlockChangesUpTo = -1;
|
this.ackBlockChangesUpTo = -1;
|
||||||
@@ -423,7 +422,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -416,7 +415,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
||||||
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
|
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
|
||||||
}
|
}
|
||||||
- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot
|
- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot
|
||||||
|
|
||||||
this.chatPreviewThrottler.tick();
|
|
||||||
}
|
}
|
||||||
@@ -2154,7 +2152,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
||||||
|
@@ -2143,7 +2141,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleCommand(String s) {
|
private void handleCommand(String s) {
|
||||||
|
@ -1290,7 +1290,7 @@ index f1441c9fde9d736d4c053073a88a7a79222f5c5c..2f2d92bfda1713c7454e73cb2d2e77f6
|
||||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||||
|
|
||||||
@@ -2164,7 +2162,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2153,7 +2151,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
this.cserver.getPluginManager().callEvent(event);
|
this.cserver.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
|
@ -1299,7 +1299,7 @@ index f1441c9fde9d736d4c053073a88a7a79222f5c5c..2f2d92bfda1713c7454e73cb2d2e77f6
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2177,7 +2175,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2166,7 +2164,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1309,7 +1309,7 @@ index f1441c9fde9d736d4c053073a88a7a79222f5c5c..2f2d92bfda1713c7454e73cb2d2e77f6
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 8246a78e4e01ee24db88660351bc0f27a6f320aa..5f85d48fbd0ce34c21acec4849ad3efcc73c7210 100644
|
index 5481a029a4a710eb20a4689633d5a4ec509d49d8..b1cd261b42a2c2de5f5a1aa844ecabc986afe00d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -1319,7 +1319,7 @@ index 8246a78e4e01ee24db88660351bc0f27a6f320aa..5f85d48fbd0ce34c21acec4849ad3efc
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
@@ -1019,10 +1020,11 @@ public abstract class PlayerList {
|
@@ -1029,10 +1030,11 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveAll() {
|
public void saveAll() {
|
||||||
|
@ -1333,7 +1333,7 @@ index 8246a78e4e01ee24db88660351bc0f27a6f320aa..5f85d48fbd0ce34c21acec4849ad3efc
|
||||||
|
|
||||||
public UserWhiteList getWhiteList() {
|
public UserWhiteList getWhiteList() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 18d56618a1e8ff5ba408523f620333dbdf48a257..1a44c98b69398ba5dcb4115f0e8fdcf3f62fd920 100644
|
index 742897a534dac2bbbacaca0f6c8196e8d2bc03dd..23b22543c3d164e3fdf2f262f3e0124636b32fce 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -132,7 +132,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
@@ -132,7 +132,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||||
|
@ -1369,40 +1369,26 @@ index 18d56618a1e8ff5ba408523f620333dbdf48a257..1a44c98b69398ba5dcb4115f0e8fdcf3
|
||||||
|
|
||||||
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
|
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
index cdf8020194f2ec1fe7b65b22c8e1f5b1c23eaefa..2db27f5e3e3c1bb0502c055f78c4a81eb00fcf1b 100644
|
index 0c464516b7168ebee69c46e89677cae5e19ef659..2e392630d3b4b08ff8ab82b7f8b32b7fbf21570d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
@@ -305,7 +305,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
@@ -315,6 +315,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
return Registry.ENTITY_TYPE.getOptional(ResourceLocation.tryParse(id));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - add id
|
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, FeatureFlagSet requiredFeatures) {
|
||||||
+ public final String id;
|
+ // Paper start
|
||||||
+
|
+ this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, maxTrackDistance, trackTickInterval, requiredFeatures, "custom");
|
||||||
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval) {
|
|
||||||
+ this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, maxTrackDistance, trackTickInterval, "custom");
|
|
||||||
+ }
|
+ }
|
||||||
+ public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, String id) {
|
+ public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, FeatureFlagSet requiredFeatures, String id) {
|
||||||
+ // Paper end
|
|
||||||
this.builtInRegistryHolder = Registry.ENTITY_TYPE.createIntrusiveHolder(this);
|
|
||||||
this.factory = factory;
|
|
||||||
this.category = spawnGroup;
|
|
||||||
@@ -317,6 +324,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
|
||||||
this.dimensions = dimensions;
|
|
||||||
this.clientTrackingRange = maxTrackDistance;
|
|
||||||
this.updateInterval = trackTickInterval;
|
|
||||||
+
|
|
||||||
+ // Paper start - timings
|
|
||||||
+ this.id = id;
|
|
||||||
+ this.tickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "tick");
|
+ this.tickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "tick");
|
||||||
+ this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick");
|
+ this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick");
|
||||||
+ this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick");
|
+ this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick");
|
||||||
+ this.passengerInactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerInactiveTick");
|
+ this.passengerInactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerInactiveTick");
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
|
||||||
|
this.factory = factory;
|
||||||
@Nullable
|
this.category = spawnGroup;
|
||||||
@@ -567,6 +582,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
@@ -635,6 +644,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
return this.updateInterval;
|
return this.updateInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1415,20 +1401,11 @@ index cdf8020194f2ec1fe7b65b22c8e1f5b1c23eaefa..2db27f5e3e3c1bb0502c055f78c4a81e
|
||||||
public boolean trackDeltas() {
|
public boolean trackDeltas() {
|
||||||
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
||||||
}
|
}
|
||||||
@@ -665,7 +686,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
|
||||||
Util.fetchChoiceType(References.ENTITY_TREE, id);
|
|
||||||
}
|
|
||||||
|
|
||||||
- return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions, this.clientTrackingRange, this.updateInterval);
|
|
||||||
+ return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions, this.clientTrackingRange, this.updateInterval, id); // Paper - add id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f106ddf00e1 100644
|
index f29b109fdef494927f5f894ac962c50c33b1f0b6..c6ce813f7ea6c4dcbd45e9d8c55f56c29dc3ea53 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -140,7 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
@@ -141,7 +141,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
@ -1437,7 +1414,7 @@ index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f10
|
||||||
|
|
||||||
public abstract class LivingEntity extends Entity {
|
public abstract class LivingEntity extends Entity {
|
||||||
|
|
||||||
@@ -2820,7 +2820,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -2837,7 +2837,6 @@ public abstract class LivingEntity extends Entity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
|
@ -1445,7 +1422,7 @@ index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f10
|
||||||
super.tick();
|
super.tick();
|
||||||
this.updatingUsingItem();
|
this.updatingUsingItem();
|
||||||
this.updateSwimAmount();
|
this.updateSwimAmount();
|
||||||
@@ -2862,9 +2861,7 @@ public abstract class LivingEntity extends Entity {
|
@@ -2879,9 +2878,7 @@ public abstract class LivingEntity extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isRemoved()) {
|
if (!this.isRemoved()) {
|
||||||
|
@ -1455,7 +1432,7 @@ index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f10
|
||||||
}
|
}
|
||||||
|
|
||||||
double d0 = this.getX() - this.xo;
|
double d0 = this.getX() - this.xo;
|
||||||
@@ -2946,8 +2943,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -2963,8 +2960,6 @@ public abstract class LivingEntity extends Entity {
|
||||||
if (this.isSleeping()) {
|
if (this.isSleeping()) {
|
||||||
this.setXRot(0.0F);
|
this.setXRot(0.0F);
|
||||||
}
|
}
|
||||||
|
@ -1464,7 +1441,7 @@ index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f10
|
||||||
}
|
}
|
||||||
|
|
||||||
public void detectEquipmentUpdates() {
|
public void detectEquipmentUpdates() {
|
||||||
@@ -3129,7 +3124,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -3150,7 +3145,6 @@ public abstract class LivingEntity extends Entity {
|
||||||
|
|
||||||
this.setDeltaMovement(d4, d5, d6);
|
this.setDeltaMovement(d4, d5, d6);
|
||||||
this.level.getProfiler().push("ai");
|
this.level.getProfiler().push("ai");
|
||||||
|
@ -1472,7 +1449,7 @@ index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f10
|
||||||
if (this.isImmobile()) {
|
if (this.isImmobile()) {
|
||||||
this.jumping = false;
|
this.jumping = false;
|
||||||
this.xxa = 0.0F;
|
this.xxa = 0.0F;
|
||||||
@@ -3139,7 +3133,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -3160,7 +3154,6 @@ public abstract class LivingEntity extends Entity {
|
||||||
this.serverAiStep();
|
this.serverAiStep();
|
||||||
this.level.getProfiler().pop();
|
this.level.getProfiler().pop();
|
||||||
}
|
}
|
||||||
|
@ -1480,7 +1457,7 @@ index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f10
|
||||||
|
|
||||||
this.level.getProfiler().pop();
|
this.level.getProfiler().pop();
|
||||||
this.level.getProfiler().push("jump");
|
this.level.getProfiler().push("jump");
|
||||||
@@ -3174,9 +3167,9 @@ public abstract class LivingEntity extends Entity {
|
@@ -3195,9 +3188,9 @@ public abstract class LivingEntity extends Entity {
|
||||||
this.updateFallFlying();
|
this.updateFallFlying();
|
||||||
AABB axisalignedbb = this.getBoundingBox();
|
AABB axisalignedbb = this.getBoundingBox();
|
||||||
|
|
||||||
|
@ -1492,7 +1469,7 @@ index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f10
|
||||||
this.level.getProfiler().pop();
|
this.level.getProfiler().pop();
|
||||||
this.level.getProfiler().push("freezing");
|
this.level.getProfiler().push("freezing");
|
||||||
boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES);
|
boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES);
|
||||||
@@ -3205,9 +3198,7 @@ public abstract class LivingEntity extends Entity {
|
@@ -3226,9 +3219,7 @@ public abstract class LivingEntity extends Entity {
|
||||||
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1503,10 +1480,10 @@ index d2958d4c897d93f81ab4faea2c67783c2f0de37f..4cbd068bbb19eec3a702bc9067ac4f10
|
||||||
if (!this.level.isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
|
if (!this.level.isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
|
||||||
this.hurt(DamageSource.DROWN, 1.0F);
|
this.hurt(DamageSource.DROWN, 1.0F);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 0fa91ed5ed41c944f7398a88f9352742f34d4af5..39d64f3aeb998df5452699e098148d86fdd48c98 100644
|
index 3bf5b8429a25b0f1347cc287f919dec7a66d9b6c..0640df782cff1aec27e1915f726c89275edeec69 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -83,7 +83,6 @@ import org.bukkit.Bukkit;
|
@@ -86,7 +86,6 @@ import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
@ -1514,7 +1491,7 @@ index 0fa91ed5ed41c944f7398a88f9352742f34d4af5..39d64f3aeb998df5452699e098148d86
|
||||||
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
||||||
import org.bukkit.craftbukkit.block.CraftBlockState;
|
import org.bukkit.craftbukkit.block.CraftBlockState;
|
||||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||||
@@ -157,7 +156,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -160,7 +159,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
|
@ -1523,7 +1500,7 @@ index 0fa91ed5ed41c944f7398a88f9352742f34d4af5..39d64f3aeb998df5452699e098148d86
|
||||||
public static BlockPos lastPhysicsProblem; // Spigot
|
public static BlockPos lastPhysicsProblem; // Spigot
|
||||||
private org.spigotmc.TickLimiter entityLimiter;
|
private org.spigotmc.TickLimiter entityLimiter;
|
||||||
private org.spigotmc.TickLimiter tileLimiter;
|
private org.spigotmc.TickLimiter tileLimiter;
|
||||||
@@ -253,7 +252,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -256,7 +255,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
|
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
|
||||||
});
|
});
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -1532,7 +1509,7 @@ index 0fa91ed5ed41c944f7398a88f9352742f34d4af5..39d64f3aeb998df5452699e098148d86
|
||||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||||
}
|
}
|
||||||
@@ -689,15 +688,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -714,15 +713,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
timings.tileEntityTick.stopTiming(); // Spigot
|
timings.tileEntityTick.stopTiming(); // Spigot
|
||||||
this.tickingBlockEntities = false;
|
this.tickingBlockEntities = false;
|
||||||
|
@ -1550,10 +1527,10 @@ index 0fa91ed5ed41c944f7398a88f9352742f34d4af5..39d64f3aeb998df5452699e098148d86
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
|
||||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
|
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
index d0dca357cfd7e563fc7deb4f6048cf466605938f..4b3dc4648709abbdd6ac0972c298a64a875e5f6c 100644
|
index 5c54e38f75e0e2d84c06fccc14641254d6fd5678..6b22de4b22aeec101076199f1e20376dd4b31f4d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
@@ -91,6 +91,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
@@ -89,6 +89,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||||
public static final int UPDATE_LIMIT = 512;
|
public static final int UPDATE_LIMIT = 512;
|
||||||
protected final StateDefinition<Block, BlockState> stateDefinition;
|
protected final StateDefinition<Block, BlockState> stateDefinition;
|
||||||
private BlockState defaultBlockState;
|
private BlockState defaultBlockState;
|
||||||
|
@ -1570,7 +1547,7 @@ index d0dca357cfd7e563fc7deb4f6048cf466605938f..4b3dc4648709abbdd6ac0972c298a64a
|
||||||
private String descriptionId;
|
private String descriptionId;
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
index dec38e58e30c84887e9d29436c0f76c70c0a627d..be08224c8107aab3e9a3645a20977dd14bfff782 100644
|
index c02fa35cefc9194d1838abbe4f2dc2b226a41e41..b300d12e9e00519028b53aca9c3fb01f589eaa91 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
@@ -22,10 +22,12 @@ import org.bukkit.inventory.InventoryHolder;
|
@@ -22,10 +22,12 @@ import org.bukkit.inventory.InventoryHolder;
|
||||||
|
@ -1588,7 +1565,7 @@ index dec38e58e30c84887e9d29436c0f76c70c0a627d..be08224c8107aab3e9a3645a20977dd1
|
||||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||||
public CraftPersistentDataContainer persistentDataContainer;
|
public CraftPersistentDataContainer persistentDataContainer;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 41dda06ac8d9adc263936bc417d35b62a8801565..1c6f51c227a0b6da81eeb817f996789645a547db 100644
|
index 272203f71dc9bb525a91f835fd73ca1d03aa982e..49f091183111958ebd3fb56964fc5d728c16755c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -680,6 +680,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -680,6 +680,7 @@ public class LevelChunk extends ChunkAccess {
|
||||||
|
@ -1608,10 +1585,10 @@ index 41dda06ac8d9adc263936bc417d35b62a8801565..1c6f51c227a0b6da81eeb817f9967896
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
index e1558691dc23ad812358e3890020fdc7d6d7c28b..6c844a826892c5f31d5afb9ead56d4cff3ab5968 100644
|
index cf496b430bf3d7aab0b8e86c11e015583c1411a7..6fdd5c92ab069896e3921faa042cbdb3c29d0538 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
@@ -507,13 +507,10 @@ public class ChunkSerializer {
|
@@ -513,13 +513,10 @@ public class ChunkSerializer {
|
||||||
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
|
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
|
||||||
|
|
||||||
return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
|
return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
|
||||||
|
@ -1625,7 +1602,7 @@ index e1558691dc23ad812358e3890020fdc7d6d7c28b..6c844a826892c5f31d5afb9ead56d4cf
|
||||||
if (nbttaglist1 != null) {
|
if (nbttaglist1 != null) {
|
||||||
for (int i = 0; i < nbttaglist1.size(); ++i) {
|
for (int i = 0; i < nbttaglist1.size(); ++i) {
|
||||||
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
|
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
|
||||||
@@ -531,7 +528,6 @@ public class ChunkSerializer {
|
@@ -537,7 +534,6 @@ public class ChunkSerializer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1634,10 +1611,10 @@ index e1558691dc23ad812358e3890020fdc7d6d7c28b..6c844a826892c5f31d5afb9ead56d4cf
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 295318717fc603b3adc58fbda39bd65e97462b88..eb5c7e15366ee5902d8c754a1e9daec50d26fb17 100644
|
index f1acded917678d69fe9de2bdcab5f9f747a53d78..dc39c51ac4417857a75faeae5e28bc1b4f8b4d78 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2379,12 +2379,31 @@ public final class CraftServer implements Server {
|
@@ -2403,12 +2403,31 @@ public final class CraftServer implements Server {
|
||||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1839,10 +1816,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
|
||||||
- }
|
- }
|
||||||
-}
|
-}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 10a9a108448509ceb7d40a4bddb067384c4c9f26..d5e6123622f6bbc4c3b8b91be7f9ba8e5c1c22d8 100644
|
index bcfa8474413a5c149c126f53a446422b4fa540fa..a41b9663c2ec5a5ec9fc593531141edc7c48751e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -2319,6 +2319,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2321,6 +2321,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
|
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
|
||||||
}
|
}
|
||||||
|
@ -2035,10 +2012,10 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index ede9c2d8e98fd42a936045e82b3e2c174f7bac0b..a3b303c2593b3f06b40ec827592a349431d0aaf9 100644
|
index 92cf1be3a9e188307e6d4e8e710fa67af2bafa9d..c25f893ef1215a22c8bfa575e4711b9c92a25f0b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -222,6 +222,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -221,6 +221,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
@ -2051,8 +2028,8 @@ index ede9c2d8e98fd42a936045e82b3e2c174f7bac0b..a3b303c2593b3f06b40ec827592a3494
|
||||||
|
|
||||||
public static byte toLegacyData(BlockState data) {
|
public static byte toLegacyData(BlockState data) {
|
||||||
return CraftLegacy.toLegacyData(data);
|
return CraftLegacy.toLegacyData(data);
|
||||||
@@ -415,6 +421,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -413,6 +419,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return CraftCreativeCategory.fromNMS(category);
|
return CreativeCategory.BUILDING_BLOCKS; // TODO: Figure out what to do with this
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
Loading…
Reference in a new issue