|
|
@ -9355,10 +9355,10 @@ index 0000000000000000000000000000000000000000..cf9b66afc1762dbe2c625f09f9e804ca
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+}
|
|
|
|
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
|
|
|
index e6c7f62ed379a78645933670299e4fcda8540ed1..c81a2a013457741302fe406ea9d1f9460bf0f48a 100644
|
|
|
|
index 59d7e8a3d83d3ab7aa28606401bb129ccaeff240..164202089b4ad0ab832a444e818ffd39aa966e70 100644
|
|
|
|
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
|
|
|
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
|
|
|
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
|
|
|
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
|
|
|
@@ -68,7 +68,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
|
|
|
@@ -67,7 +67,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
|
|
|
public boolean bypassSelectorPermissions = false; // Paper - add bypass for selector permissions
|
|
|
|
public boolean bypassSelectorPermissions = false; // Paper - add bypass for selector permissions
|
|
|
|
|
|
|
|
|
|
|
|
public CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity) {
|
|
|
|
public CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity) {
|
|
|
@ -9368,7 +9368,7 @@ index e6c7f62ed379a78645933670299e4fcda8540ed1..c81a2a013457741302fe406ea9d1f946
|
|
|
|
|
|
|
|
|
|
|
|
protected CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity, boolean silent, CommandResultCallback resultStorer, EntityAnchorArgument.Anchor entityAnchor, CommandSigningContext signedArguments, TaskChainer messageChainTaskQueue) {
|
|
|
|
protected CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity, boolean silent, CommandResultCallback resultStorer, EntityAnchorArgument.Anchor entityAnchor, CommandSigningContext signedArguments, TaskChainer messageChainTaskQueue) {
|
|
|
|
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
|
|
|
index aa2fca6917fb67fe0e9ba067d11487c3a274f675..e53dba6d265007d556d85f6007643b26ba77083b 100644
|
|
|
|
index 24086a82e1687cb1925398218b18c2384fa8f6e3..5e5a0fea0612d9d4521f818faf7c9bd77351d379 100644
|
|
|
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
|
|
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
|
|
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
|
|
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
|
|
|
@@ -160,13 +160,13 @@ public class Commands {
|
|
|
|
@@ -160,13 +160,13 @@ public class Commands {
|
|
|
@ -9463,7 +9463,7 @@ index aa2fca6917fb67fe0e9ba067d11487c3a274f675..e53dba6d265007d556d85f6007643b26
|
|
|
|
SaveOffCommand.register(this.dispatcher);
|
|
|
|
SaveOffCommand.register(this.dispatcher);
|
|
|
|
SaveOnCommand.register(this.dispatcher);
|
|
|
|
SaveOnCommand.register(this.dispatcher);
|
|
|
|
SetPlayerIdleTimeoutCommand.register(this.dispatcher);
|
|
|
|
SetPlayerIdleTimeoutCommand.register(this.dispatcher);
|
|
|
|
@@ -493,9 +493,12 @@ public class Commands {
|
|
|
|
@@ -506,9 +506,12 @@ public class Commands {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Paper start - Perf: Async command map building
|
|
|
|
// Paper start - Perf: Async command map building
|
|
|
|
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper - Brigadier API
|
|
|
|
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper - Brigadier API
|
|
|
@ -10070,10 +10070,10 @@ index 57e76b53e5e314c3e6b8856010f7a84188121582..9f07a1a5e2c082d16de068de6f47bf8f
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b403c2cb1ca 100644
|
|
|
|
index dbc86b8d4d2af6e5f7e678f2bb77fd39b85c04c5..cd63ccf69ce701079d780afaff0d784ec0e4f535 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
|
|
|
|
@@ -207,7 +207,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -204,7 +204,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
private static final int OVERLOADED_TICKS_THRESHOLD = 20;
|
|
|
|
private static final int OVERLOADED_TICKS_THRESHOLD = 20;
|
|
|
|
private static final long OVERLOADED_WARNING_INTERVAL_NANOS = 10L * TimeUtil.NANOSECONDS_PER_SECOND;
|
|
|
|
private static final long OVERLOADED_WARNING_INTERVAL_NANOS = 10L * TimeUtil.NANOSECONDS_PER_SECOND;
|
|
|
|
private static final int OVERLOADED_TICKS_WARNING_INTERVAL = 100;
|
|
|
|
private static final int OVERLOADED_TICKS_WARNING_INTERVAL = 100;
|
|
|
@ -10082,7 +10082,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
private static final long PREPARE_LEVELS_DEFAULT_DELAY_NANOS = 10L * TimeUtil.NANOSECONDS_PER_MILLISECOND;
|
|
|
|
private static final long PREPARE_LEVELS_DEFAULT_DELAY_NANOS = 10L * TimeUtil.NANOSECONDS_PER_MILLISECOND;
|
|
|
|
private static final int MAX_STATUS_PLAYER_SAMPLE = 12;
|
|
|
|
private static final int MAX_STATUS_PLAYER_SAMPLE = 12;
|
|
|
|
private static final int SPAWN_POSITION_SEARCH_RADIUS = 5;
|
|
|
|
private static final int SPAWN_POSITION_SEARCH_RADIUS = 5;
|
|
|
|
@@ -244,8 +244,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -241,8 +241,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
private volatile boolean running;
|
|
|
|
private volatile boolean running;
|
|
|
|
private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
|
|
|
private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
|
|
|
private boolean stopped;
|
|
|
|
private boolean stopped;
|
|
|
@ -10092,7 +10092,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
protected final Proxy proxy;
|
|
|
|
protected final Proxy proxy;
|
|
|
|
private boolean onlineMode;
|
|
|
|
private boolean onlineMode;
|
|
|
|
private boolean preventProxyConnections;
|
|
|
|
private boolean preventProxyConnections;
|
|
|
|
@@ -299,7 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -296,7 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
public org.bukkit.craftbukkit.CraftServer server;
|
|
|
|
public org.bukkit.craftbukkit.CraftServer server;
|
|
|
|
public OptionSet options;
|
|
|
|
public OptionSet options;
|
|
|
|
public org.bukkit.command.ConsoleCommandSender console;
|
|
|
|
public org.bukkit.command.ConsoleCommandSender console;
|
|
|
@ -10100,8 +10100,8 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
+ //public static int currentTick; // Paper - improve tick loop // Folia - region threading
|
|
|
|
+ //public static int currentTick; // Paper - improve tick loop // Folia - region threading
|
|
|
|
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
|
|
|
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
|
|
|
public int autosavePeriod;
|
|
|
|
public int autosavePeriod;
|
|
|
|
public Commands vanillaCommandDispatcher;
|
|
|
|
// Paper - don't store the vanilla dispatcher
|
|
|
|
@@ -313,13 +312,41 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -310,13 +309,41 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
public final double[] recentTps = new double[ 3 ];
|
|
|
|
public final double[] recentTps = new double[ 3 ];
|
|
|
|
// Spigot end
|
|
|
|
// Spigot end
|
|
|
|
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
|
|
|
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
|
|
@ -10144,7 +10144,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
|
|
|
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
|
|
|
AtomicReference<S> atomicreference = new AtomicReference();
|
|
|
|
AtomicReference<S> atomicreference = new AtomicReference();
|
|
|
|
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
|
|
|
|
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
|
|
|
|
@@ -355,7 +382,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -352,7 +379,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
this.port = -1;
|
|
|
|
this.port = -1;
|
|
|
|
this.levels = Maps.newLinkedHashMap();
|
|
|
|
this.levels = Maps.newLinkedHashMap();
|
|
|
|
this.running = true;
|
|
|
|
this.running = true;
|
|
|
@ -10153,7 +10153,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
this.tickTimesNanos = new long[100];
|
|
|
|
this.tickTimesNanos = new long[100];
|
|
|
|
this.aggregatedTickTimesNanos = 0L;
|
|
|
|
this.aggregatedTickTimesNanos = 0L;
|
|
|
|
this.lastTickNanos = Util.getNanos();
|
|
|
|
this.lastTickNanos = Util.getNanos();
|
|
|
|
@@ -649,7 +676,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -645,7 +672,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
|
|
|
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
|
|
|
this.addLevel(world); // Paper - Put world into worldlist before initing the world; move up
|
|
|
|
this.addLevel(world); // Paper - Put world into worldlist before initing the world; move up
|
|
|
@ -10176,7 +10176,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
|
|
|
|
|
|
|
|
// Paper - Put world into worldlist before initing the world; move up
|
|
|
|
// Paper - Put world into worldlist before initing the world; move up
|
|
|
|
this.getPlayerList().addWorldborderListener(world);
|
|
|
|
this.getPlayerList().addWorldborderListener(world);
|
|
|
|
@@ -661,6 +702,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -657,6 +698,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
this.forceDifficulty();
|
|
|
|
this.forceDifficulty();
|
|
|
|
for (ServerLevel worldserver : this.getAllLevels()) {
|
|
|
|
for (ServerLevel worldserver : this.getAllLevels()) {
|
|
|
|
this.prepareLevels(worldserver.getChunkSource().chunkMap.progressListener, worldserver);
|
|
|
|
this.prepareLevels(worldserver.getChunkSource().chunkMap.progressListener, worldserver);
|
|
|
@ -10184,7 +10184,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
//worldserver.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system, not required to "tick" anything
|
|
|
|
//worldserver.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system, not required to "tick" anything
|
|
|
|
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
|
|
|
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -725,7 +767,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -724,7 +766,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
worldProperties.setSpawn(BlockPos.ZERO.above(80), 0.0F);
|
|
|
|
worldProperties.setSpawn(BlockPos.ZERO.above(80), 0.0F);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ServerChunkCache chunkproviderserver = world.getChunkSource();
|
|
|
|
ServerChunkCache chunkproviderserver = world.getChunkSource();
|
|
|
@ -10193,7 +10193,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
// CraftBukkit start
|
|
|
|
// CraftBukkit start
|
|
|
|
if (world.generator != null) {
|
|
|
|
if (world.generator != null) {
|
|
|
|
Random rand = new Random(world.getSeed());
|
|
|
|
Random rand = new Random(world.getSeed());
|
|
|
|
@@ -746,6 +788,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -745,6 +787,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
if (i < world.getMinBuildHeight()) {
|
|
|
|
if (i < world.getMinBuildHeight()) {
|
|
|
|
BlockPos blockposition = chunkcoordintpair.getWorldPosition();
|
|
|
|
BlockPos blockposition = chunkcoordintpair.getWorldPosition();
|
|
|
|
|
|
|
|
|
|
|
@ -10201,7 +10201,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
i = world.getHeight(Heightmap.Types.WORLD_SURFACE, blockposition.getX() + 8, blockposition.getZ() + 8);
|
|
|
|
i = world.getHeight(Heightmap.Types.WORLD_SURFACE, blockposition.getX() + 8, blockposition.getZ() + 8);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -816,14 +859,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -815,14 +858,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
int i = worldserver.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS); // CraftBukkit - per-world
|
|
|
|
int i = worldserver.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS); // CraftBukkit - per-world
|
|
|
|
int j = i > 0 ? Mth.square(ChunkProgressListener.calculateDiameter(i)) : 0;
|
|
|
|
int j = i > 0 ? Mth.square(ChunkProgressListener.calculateDiameter(i)) : 0;
|
|
|
|
|
|
|
|
|
|
|
@ -10218,7 +10218,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
// Iterator iterator = this.levels.values().iterator();
|
|
|
|
// Iterator iterator = this.levels.values().iterator();
|
|
|
|
|
|
|
|
|
|
|
|
if (true) {
|
|
|
|
if (true) {
|
|
|
|
@@ -845,7 +884,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -844,7 +883,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
// CraftBukkit start
|
|
|
|
// CraftBukkit start
|
|
|
|
// this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
|
|
|
|
// this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
|
|
|
@ -10227,7 +10227,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
// CraftBukkit end
|
|
|
|
// CraftBukkit end
|
|
|
|
worldloadlistener.stop();
|
|
|
|
worldloadlistener.stop();
|
|
|
|
// CraftBukkit start
|
|
|
|
// CraftBukkit start
|
|
|
|
@@ -949,7 +988,37 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -948,7 +987,37 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
// CraftBukkit end
|
|
|
|
|
|
|
|
|
|
|
@ -10265,7 +10265,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
// CraftBukkit start - prevent double stopping on multiple threads
|
|
|
|
// CraftBukkit start - prevent double stopping on multiple threads
|
|
|
|
synchronized(this.stopLock) {
|
|
|
|
synchronized(this.stopLock) {
|
|
|
|
if (this.hasStopped) return;
|
|
|
|
if (this.hasStopped) return;
|
|
|
|
@@ -959,7 +1028,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -958,7 +1027,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
// Paper start - kill main thread, and kill it hard
|
|
|
|
// Paper start - kill main thread, and kill it hard
|
|
|
|
shutdownThread = Thread.currentThread();
|
|
|
|
shutdownThread = Thread.currentThread();
|
|
|
|
org.spigotmc.WatchdogThread.doStop(); // Paper
|
|
|
|
org.spigotmc.WatchdogThread.doStop(); // Paper
|
|
|
@ -10274,7 +10274,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER)");
|
|
|
|
MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER)");
|
|
|
|
while (this.getRunningThread().isAlive()) {
|
|
|
|
while (this.getRunningThread().isAlive()) {
|
|
|
|
this.getRunningThread().stop();
|
|
|
|
this.getRunningThread().stop();
|
|
|
|
@@ -987,12 +1056,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -986,12 +1055,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
this.getConnection().stop();
|
|
|
|
this.getConnection().stop();
|
|
|
|
this.isSaving = true;
|
|
|
|
this.isSaving = true;
|
|
|
|
if (this.playerList != null) {
|
|
|
|
if (this.playerList != null) {
|
|
|
@ -10296,7 +10296,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
MinecraftServer.LOGGER.info("Saving worlds");
|
|
|
|
MinecraftServer.LOGGER.info("Saving worlds");
|
|
|
|
Iterator iterator = this.getAllLevels().iterator();
|
|
|
|
Iterator iterator = this.getAllLevels().iterator();
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1008,6 +1084,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1007,6 +1083,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
this.saveAllChunks(false, true, false, true); // Paper - rewrite chunk system - move closing into here
|
|
|
|
this.saveAllChunks(false, true, false, true); // Paper - rewrite chunk system - move closing into here
|
|
|
|
|
|
|
|
|
|
|
|
this.isSaving = false;
|
|
|
|
this.isSaving = false;
|
|
|
@ -10308,7 +10308,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
this.resources.close();
|
|
|
|
this.resources.close();
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
@@ -1064,6 +1145,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1063,6 +1144,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
|
|
|
|
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
|
|
|
|
// Paper end
|
|
|
|
// Paper end
|
|
|
|
this.running = false;
|
|
|
|
this.running = false;
|
|
|
@ -10316,7 +10316,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
if (waitForShutdown) {
|
|
|
|
if (waitForShutdown) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
this.serverThread.join();
|
|
|
|
this.serverThread.join();
|
|
|
|
@@ -1145,10 +1227,23 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1144,10 +1226,23 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
this.statusIcon = (ServerStatus.Favicon) this.loadStatusIcon().orElse(null); // CraftBukkit - decompile error
|
|
|
|
this.statusIcon = (ServerStatus.Favicon) this.loadStatusIcon().orElse(null); // CraftBukkit - decompile error
|
|
|
|
this.status = this.buildServerStatus();
|
|
|
|
this.status = this.buildServerStatus();
|
|
|
|
|
|
|
|
|
|
|
@ -10341,7 +10341,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
// this is going to be the first thing the tick process does anyways, so move done and run it after
|
|
|
|
// this is going to be the first thing the tick process does anyways, so move done and run it after
|
|
|
|
// everything is init before watchdog tick.
|
|
|
|
// everything is init before watchdog tick.
|
|
|
|
// anything at 3+ won't be caught here but also will trip watchdog....
|
|
|
|
// anything at 3+ won't be caught here but also will trip watchdog....
|
|
|
|
@@ -1201,10 +1296,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1200,10 +1295,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Spigot start
|
|
|
|
// Spigot start
|
|
|
@ -10354,7 +10354,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
final long diff = currentTime - tickSection;
|
|
|
|
final long diff = currentTime - tickSection;
|
|
|
|
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
|
|
|
|
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
|
|
|
|
tps1.add(currentTps, diff);
|
|
|
|
tps1.add(currentTps, diff);
|
|
|
|
@@ -1224,7 +1319,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1223,7 +1318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
if (this.debugCommandProfilerDelayStart) {
|
|
|
|
if (this.debugCommandProfilerDelayStart) {
|
|
|
|
this.debugCommandProfilerDelayStart = false;
|
|
|
|
this.debugCommandProfilerDelayStart = false;
|
|
|
@ -10363,7 +10363,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
|
|
|
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
|
|
|
@@ -1232,9 +1327,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1231,9 +1326,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
this.nextTickTimeNanos += i;
|
|
|
|
this.nextTickTimeNanos += i;
|
|
|
|
this.startMetricsRecordingTick();
|
|
|
|
this.startMetricsRecordingTick();
|
|
|
|
this.profiler.push("tick");
|
|
|
|
this.profiler.push("tick");
|
|
|
@ -10374,7 +10374,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
this.profiler.popPush("nextTickWait");
|
|
|
|
this.profiler.popPush("nextTickWait");
|
|
|
|
this.mayHaveDelayedTasks = true;
|
|
|
|
this.mayHaveDelayedTasks = true;
|
|
|
|
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
|
|
|
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
|
|
|
@@ -1397,21 +1490,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1396,21 +1489,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public TickTask wrapRunnable(Runnable runnable) {
|
|
|
|
public TickTask wrapRunnable(Runnable runnable) {
|
|
|
@ -10399,7 +10399,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
boolean flag = this.pollTaskInternal();
|
|
|
|
boolean flag = this.pollTaskInternal();
|
|
|
|
|
|
|
|
|
|
|
|
this.mayHaveDelayedTasks = flag;
|
|
|
|
this.mayHaveDelayedTasks = flag;
|
|
|
|
@@ -1424,33 +1512,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1423,33 +1511,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
static final long TASK_EXECUTION_FAILURE_BACKOFF = 5L * 1000L; // 5us
|
|
|
|
static final long TASK_EXECUTION_FAILURE_BACKOFF = 5L * 1000L; // 5us
|
|
|
|
|
|
|
|
|
|
|
@ -10441,7 +10441,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
// it's shown to be bad to constantly hit the queue (chunk loads slow to a crawl), even if no tasks are executed.
|
|
|
|
// it's shown to be bad to constantly hit the queue (chunk loads slow to a crawl), even if no tasks are executed.
|
|
|
|
// so, backoff to prevent this
|
|
|
|
// so, backoff to prevent this
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
@@ -1459,13 +1534,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1458,13 +1533,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
co.aikar.timings.MinecraftTimings.midTickChunkTasks.startTiming();
|
|
|
|
co.aikar.timings.MinecraftTimings.midTickChunkTasks.startTiming();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
for (;;) {
|
|
|
|
for (;;) {
|
|
|
@ -10457,7 +10457,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// note: negative values reduce the time
|
|
|
|
// note: negative values reduce the time
|
|
|
|
@@ -1478,7 +1553,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1477,7 +1552,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
double overuseCount = (double)overuse/(double)MAX_CHUNK_EXEC_TIME;
|
|
|
|
double overuseCount = (double)overuse/(double)MAX_CHUNK_EXEC_TIME;
|
|
|
|
long extraSleep = (long)Math.round(overuseCount*CHUNK_TASK_QUEUE_BACKOFF_MIN_TIME);
|
|
|
|
long extraSleep = (long)Math.round(overuseCount*CHUNK_TASK_QUEUE_BACKOFF_MIN_TIME);
|
|
|
|
|
|
|
|
|
|
|
@ -10466,7 +10466,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1489,6 +1564,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1488,6 +1563,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
// Paper end - execute chunk tasks mid tick
|
|
|
|
// Paper end - execute chunk tasks mid tick
|
|
|
|
|
|
|
|
|
|
|
|
private boolean pollTaskInternal() {
|
|
|
|
private boolean pollTaskInternal() {
|
|
|
@ -10474,7 +10474,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
if (super.pollTask()) {
|
|
|
|
if (super.pollTask()) {
|
|
|
|
this.executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
|
|
|
this.executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
@@ -1511,6 +1587,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1510,6 +1586,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
|
|
|
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
|
|
@ -10482,7 +10482,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
this.getProfiler().incrementCounter("runTask");
|
|
|
|
this.getProfiler().incrementCounter("runTask");
|
|
|
|
super.doRunTask(ticktask);
|
|
|
|
super.doRunTask(ticktask);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1557,43 +1634,83 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1556,43 +1633,83 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -10577,7 +10577,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
@@ -1603,29 +1720,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1602,29 +1719,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
// Paper end - Incremental chunk and player saving
|
|
|
|
// Paper end - Incremental chunk and player saving
|
|
|
|
io.papermc.paper.util.CachedLists.reset(); // Paper
|
|
|
|
io.papermc.paper.util.CachedLists.reset(); // Paper
|
|
|
|
// Paper start - move executeAll() into full server tick timing
|
|
|
|
// Paper start - move executeAll() into full server tick timing
|
|
|
@ -10611,7 +10611,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
this.profiler.pop();
|
|
|
|
this.profiler.pop();
|
|
|
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
|
|
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
|
|
|
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
|
|
|
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
|
|
|
@@ -1638,28 +1743,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1637,28 +1742,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -10642,7 +10642,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1667,6 +1754,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1666,6 +1753,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
public abstract boolean isTickTimeLoggingEnabled();
|
|
|
|
public abstract boolean isTickTimeLoggingEnabled();
|
|
|
|
|
|
|
|
|
|
|
@ -10655,7 +10655,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
private ServerStatus buildServerStatus() {
|
|
|
|
private ServerStatus buildServerStatus() {
|
|
|
|
ServerStatus.Players serverping_serverpingplayersample = this.buildPlayerStatus();
|
|
|
|
ServerStatus.Players serverping_serverpingplayersample = this.buildPlayerStatus();
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1674,7 +1767,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1673,7 +1766,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private ServerStatus.Players buildPlayerStatus() {
|
|
|
|
private ServerStatus.Players buildPlayerStatus() {
|
|
|
@ -10664,7 +10664,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
int i = this.getMaxPlayers();
|
|
|
|
int i = this.getMaxPlayers();
|
|
|
|
|
|
|
|
|
|
|
|
if (this.hidesOnlinePlayers()) {
|
|
|
|
if (this.hidesOnlinePlayers()) {
|
|
|
|
@@ -1695,31 +1788,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1694,31 +1787,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -10702,7 +10702,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
|
|
|
this.profiler.popPush("levels");
|
|
|
|
this.profiler.popPush("levels");
|
|
|
|
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
|
|
|
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
|
|
|
@@ -1727,7 +1807,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1726,7 +1806,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
// CraftBukkit start
|
|
|
|
// CraftBukkit start
|
|
|
|
// Run tasks that are waiting on processing
|
|
|
|
// Run tasks that are waiting on processing
|
|
|
|
MinecraftTimings.processQueueTimer.startTiming(); // Spigot
|
|
|
|
MinecraftTimings.processQueueTimer.startTiming(); // Spigot
|
|
|
@ -10711,7 +10711,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
this.processQueue.remove().run();
|
|
|
|
this.processQueue.remove().run();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
|
|
|
|
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
|
|
|
|
@@ -1735,13 +1815,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1734,13 +1814,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
|
|
|
// 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.
|
|
|
|
// Paper start - Perf: Optimize time updates
|
|
|
|
// Paper start - Perf: Optimize time updates
|
|
|
@ -10728,7 +10728,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
|
|
|
|
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
|
|
|
|
@@ -1754,14 +1834,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1753,14 +1833,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
// Paper end - Perf: Optimize time updates
|
|
|
|
// Paper end - Perf: Optimize time updates
|
|
|
|
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
|
|
|
|
|
|
|
|
|
|
@ -10746,7 +10746,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
|
|
|
|
|
|
|
|
this.profiler.push(() -> {
|
|
|
|
this.profiler.push(() -> {
|
|
|
|
String s = String.valueOf(worldserver);
|
|
|
|
String s = String.valueOf(worldserver);
|
|
|
|
@@ -1780,7 +1857,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1779,7 +1856,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
worldserver.timings.doTick.startTiming(); // Spigot
|
|
|
|
worldserver.timings.doTick.startTiming(); // Spigot
|
|
|
@ -10755,7 +10755,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
// Paper start
|
|
|
|
// Paper start
|
|
|
|
for (final io.papermc.paper.chunk.SingleThreadChunkRegionManager regionManager : worldserver.getChunkSource().chunkMap.regionManagers) {
|
|
|
|
for (final io.papermc.paper.chunk.SingleThreadChunkRegionManager regionManager : worldserver.getChunkSource().chunkMap.regionManagers) {
|
|
|
|
regionManager.recalculateRegions();
|
|
|
|
regionManager.recalculateRegions();
|
|
|
|
@@ -1796,17 +1873,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1795,17 +1872,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
this.profiler.pop();
|
|
|
|
this.profiler.pop();
|
|
|
|
this.profiler.pop();
|
|
|
|
this.profiler.pop();
|
|
|
@ -10778,7 +10778,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
|
|
|
if (SharedConstants.IS_RUNNING_IN_IDE && this.tickRateManager.runsNormally()) {
|
|
|
|
if (SharedConstants.IS_RUNNING_IN_IDE && this.tickRateManager.runsNormally()) {
|
|
|
|
GameTestTicker.SINGLETON.tick();
|
|
|
|
GameTestTicker.SINGLETON.tick();
|
|
|
|
@@ -1815,7 +1893,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1814,7 +1892,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
this.profiler.popPush("server gui refresh");
|
|
|
|
this.profiler.popPush("server gui refresh");
|
|
|
|
|
|
|
|
|
|
|
|
MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
|
|
@ -10787,7 +10787,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
((Runnable) this.tickables.get(i)).run();
|
|
|
|
((Runnable) this.tickables.get(i)).run();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
|
|
|
MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
|
|
|
@@ -1823,7 +1901,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -1822,7 +1900,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
this.profiler.popPush("send chunks");
|
|
|
|
this.profiler.popPush("send chunks");
|
|
|
|
iterator = this.playerList.getPlayers().iterator();
|
|
|
|
iterator = this.playerList.getPlayers().iterator();
|
|
|
|
|
|
|
|
|
|
|
@ -10796,7 +10796,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
|
|
|
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
|
|
|
|
|
|
|
|
|
|
|
entityplayer.connection.chunkSender.sendNextChunks(entityplayer);
|
|
|
|
entityplayer.connection.chunkSender.sendNextChunks(entityplayer);
|
|
|
|
@@ -2168,7 +2246,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -2167,7 +2245,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int getTickCount() {
|
|
|
|
public int getTickCount() {
|
|
|
@ -10805,7 +10805,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int getSpawnProtectionRadius() {
|
|
|
|
public int getSpawnProtectionRadius() {
|
|
|
|
@@ -2223,6 +2301,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -2222,6 +2300,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void invalidateStatus() {
|
|
|
|
public void invalidateStatus() {
|
|
|
@ -10821,7 +10821,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
this.lastServerStatus = 0L;
|
|
|
|
this.lastServerStatus = 0L;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -2237,6 +2324,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -2236,6 +2323,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void executeIfPossible(Runnable runnable) {
|
|
|
|
public void executeIfPossible(Runnable runnable) {
|
|
|
@ -10829,7 +10829,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
if (this.isStopped()) {
|
|
|
|
if (this.isStopped()) {
|
|
|
|
throw new io.papermc.paper.util.ServerStopRejectedExecutionException("Server already shutting down"); // Paper - do not prematurely disconnect players on stop
|
|
|
|
throw new io.papermc.paper.util.ServerStopRejectedExecutionException("Server already shutting down"); // Paper - do not prematurely disconnect players on stop
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@@ -2532,7 +2620,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -2540,7 +2628,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public long getAverageTickTimeNanos() {
|
|
|
|
public long getAverageTickTimeNanos() {
|
|
|
@ -10843,7 +10843,7 @@ index 5e5eeb5c954de1db5fa8ee57d456cf46cfebfd75..240ab19712f35b6860b8a4a963a85b40
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public long[] getTickTimesNanos() {
|
|
|
|
public long[] getTickTimesNanos() {
|
|
|
|
@@ -2900,14 +2993,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@@ -2908,14 +3001,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ProfileResults stopTimeProfiler() {
|
|
|
|
public ProfileResults stopTimeProfiler() {
|
|
|
@ -12160,10 +12160,10 @@ index 812f2adc6fc20aa126e629284fe594a923b24540..0a5e6961fb37e9a53cd39b1bd233e020
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 eb4fc900164d1fb3a78653ae8bc42ea30323f5b7..05bc06fcf508e74c717a7f71a2c7ed7c568e846a 100644
|
|
|
|
index 2eb9c584cc77237f1c82d880a51a3f8b51008d73..bd333ffb44798069e180cad67c07d86425253024 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
|
|
|
|
@@ -464,9 +464,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
|
|
@@ -463,9 +463,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -12176,7 +12176,7 @@ index eb4fc900164d1fb3a78653ae8bc42ea30323f5b7..05bc06fcf508e74c717a7f71a2c7ed7c
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@@ -788,7 +788,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
|
|
@@ -787,7 +787,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
|
|
Waitable[] waitableArray = new Waitable[1]; // Paper
|
|
|
|
Waitable[] waitableArray = new Waitable[1]; // Paper
|
|
|
|
rconConsoleSource.prepareForCommand();
|
|
|
|
rconConsoleSource.prepareForCommand();
|
|
|
|
final java.util.concurrent.atomic.AtomicReference<String> command = new java.util.concurrent.atomic.AtomicReference<>(s); // Paper
|
|
|
|
final java.util.concurrent.atomic.AtomicReference<String> command = new java.util.concurrent.atomic.AtomicReference<>(s); // Paper
|
|
|
@ -12185,7 +12185,7 @@ index eb4fc900164d1fb3a78653ae8bc42ea30323f5b7..05bc06fcf508e74c717a7f71a2c7ed7c
|
|
|
|
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
|
|
|
|
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
|
|
|
|
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
|
|
|
|
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
|
|
|
|
this.server.getPluginManager().callEvent(event);
|
|
|
|
this.server.getPluginManager().callEvent(event);
|
|
|
|
@@ -812,7 +812,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
|
|
@@ -811,7 +811,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
|
|
ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
|
|
|
|
ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
|
|
|
|
this.server.dispatchServerCommand(event.getSender(), serverCommand);
|
|
|
|
this.server.dispatchServerCommand(event.getSender(), serverCommand);
|
|
|
|
} // Paper
|
|
|
|
} // Paper
|
|
|
@ -14293,7 +14293,7 @@ index ca56a0b596976448da6bb2a0e82b3d5cd4133e12..559b6d0e3611b506ff10e5ae7c42b35f
|
|
|
|
for (ServerPlayer player : ServerLevel.this.players) {
|
|
|
|
for (ServerPlayer player : ServerLevel.this.players) {
|
|
|
|
player.getBukkitEntity().onEntityRemove(entity);
|
|
|
|
player.getBukkitEntity().onEntityRemove(entity);
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
index 8437316888c6056060a2780652147590b6fe7443..ea396c3b2a7d738ec4331d332b5cff550c9d9ffb 100644
|
|
|
|
index c10401e587a710d49c4af481c1e531b4bf51f755..080c0128e4fab68bcf9739737a44c736e1f87bc0 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
@@ -199,7 +199,7 @@ import org.bukkit.inventory.MainHand;
|
|
|
|
@@ -199,7 +199,7 @@ import org.bukkit.inventory.MainHand;
|
|
|
@ -15039,7 +15039,7 @@ index 1351423a12c19a01f602a202832372a399e6a867..888cf5257fba032b9edd95a89e71ca8b
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
|
|
index 8ac5d8ccf731100a1be690cb2ed1be82cadba8ed..e25918c403ddcca87dd64d36b06f7466e2c99bd8 100644
|
|
|
|
index 308aef9c4933b2bcdd622a34b68efab4a220fe4d..f907dbb55369395058091dd75ae435d2025d94dd 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
|
|
@@ -107,6 +107,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
|
|
|
@@ -107,6 +107,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
|
|
@ -15221,7 +15221,7 @@ index 8aff5129f85ab5729b3da2e465871be62d15bdf2..8044271ff01dfc6808f5a3b60be74f6d
|
|
|
|
Collections.shuffle( this.connections );
|
|
|
|
Collections.shuffle( this.connections );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 5e9202bc7fc649764568b55d66ba0d684118c00c..29e2a74dfbece35cd4b5c4f6476848664b046221 100644
|
|
|
|
index b9b3277c8ed94e0cd30b20b9c00a33eaad48e5ac..b4c4e72ddd09231747f82962a9d2883c6415ce30 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
|
|
|
|
@@ -300,7 +300,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
@@ -300,7 +300,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
@ -15553,7 +15553,7 @@ index 5e9202bc7fc649764568b55d66ba0d684118c00c..29e2a74dfbece35cd4b5c4f647684866
|
|
|
|
// Evil plugins still listening to deprecated event
|
|
|
|
// Evil plugins still listening to deprecated event
|
|
|
|
final PlayerChatEvent queueEvent = new PlayerChatEvent(player, event.getMessage(), event.getFormat(), event.getRecipients());
|
|
|
|
final PlayerChatEvent queueEvent = new PlayerChatEvent(player, event.getMessage(), event.getFormat(), event.getRecipients());
|
|
|
|
queueEvent.setCancelled(event.isCancelled());
|
|
|
|
queueEvent.setCancelled(event.isCancelled());
|
|
|
|
@@ -2506,6 +2558,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
@@ -2493,6 +2545,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
if (s.isEmpty()) {
|
|
|
|
if (s.isEmpty()) {
|
|
|
|
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send an empty message");
|
|
|
|
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send an empty message");
|
|
|
|
} else if (this.getCraftPlayer().isConversing()) {
|
|
|
|
} else if (this.getCraftPlayer().isConversing()) {
|
|
|
@ -15561,7 +15561,7 @@ index 5e9202bc7fc649764568b55d66ba0d684118c00c..29e2a74dfbece35cd4b5c4f647684866
|
|
|
|
final String conversationInput = s;
|
|
|
|
final String conversationInput = s;
|
|
|
|
this.server.processQueue.add(new Runnable() {
|
|
|
|
this.server.processQueue.add(new Runnable() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@@ -2741,8 +2794,25 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
@@ -2724,8 +2777,25 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
// Spigot End
|
|
|
|
// Spigot End
|
|
|
|
|
|
|
|
|
|
|
|
public void switchToConfig() {
|
|
|
|
public void switchToConfig() {
|
|
|
@ -15588,7 +15588,7 @@ index 5e9202bc7fc649764568b55d66ba0d684118c00c..29e2a74dfbece35cd4b5c4f647684866
|
|
|
|
this.send(ClientboundStartConfigurationPacket.INSTANCE);
|
|
|
|
this.send(ClientboundStartConfigurationPacket.INSTANCE);
|
|
|
|
this.connection.setupOutboundProtocol(ConfigurationProtocols.CLIENTBOUND);
|
|
|
|
this.connection.setupOutboundProtocol(ConfigurationProtocols.CLIENTBOUND);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -2768,7 +2838,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
@@ -2751,7 +2821,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
|
|
|
|
|
|
|
|
this.player.resetLastActionTime();
|
|
|
|
this.player.resetLastActionTime();
|
|
|
|
this.player.setShiftKeyDown(packet.isUsingSecondaryAction());
|
|
|
|
this.player.setShiftKeyDown(packet.isUsingSecondaryAction());
|
|
|
@ -15597,7 +15597,7 @@ index 5e9202bc7fc649764568b55d66ba0d684118c00c..29e2a74dfbece35cd4b5c4f647684866
|
|
|
|
if (!worldserver.getWorldBorder().isWithinBounds(entity.blockPosition())) {
|
|
|
|
if (!worldserver.getWorldBorder().isWithinBounds(entity.blockPosition())) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -2912,6 +2982,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
@@ -2895,6 +2965,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
switch (packetplayinclientcommand_enumclientcommand) {
|
|
|
|
switch (packetplayinclientcommand_enumclientcommand) {
|
|
|
|
case PERFORM_RESPAWN:
|
|
|
|
case PERFORM_RESPAWN:
|
|
|
|
if (this.player.wonGame) {
|
|
|
|
if (this.player.wonGame) {
|
|
|
@ -15610,7 +15610,7 @@ index 5e9202bc7fc649764568b55d66ba0d684118c00c..29e2a74dfbece35cd4b5c4f647684866
|
|
|
|
this.player.wonGame = false;
|
|
|
|
this.player.wonGame = false;
|
|
|
|
this.player = this.server.getPlayerList().respawn(this.player, this.server.getLevel(this.player.getRespawnDimension()), true, null, true, RespawnReason.END_PORTAL, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag.END_PORTAL); // Paper - Expand PlayerRespawnEvent
|
|
|
|
this.player = this.server.getPlayerList().respawn(this.player, this.server.getLevel(this.player.getRespawnDimension()), true, null, true, RespawnReason.END_PORTAL, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag.END_PORTAL); // Paper - Expand PlayerRespawnEvent
|
|
|
|
CriteriaTriggers.CHANGED_DIMENSION.trigger(this.player, Level.END, Level.OVERWORLD);
|
|
|
|
CriteriaTriggers.CHANGED_DIMENSION.trigger(this.player, Level.END, Level.OVERWORLD);
|
|
|
|
@@ -2920,6 +2996,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
@@ -2903,6 +2979,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -15629,7 +15629,7 @@ index 5e9202bc7fc649764568b55d66ba0d684118c00c..29e2a74dfbece35cd4b5c4f647684866
|
|
|
|
this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
|
|
|
|
this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
|
|
|
|
if (this.server.isHardcore()) {
|
|
|
|
if (this.server.isHardcore()) {
|
|
|
|
this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper - Expand PlayerGameModeChangeEvent
|
|
|
|
this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper - Expand PlayerGameModeChangeEvent
|
|
|
|
@@ -3291,7 +3379,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
@@ -3274,7 +3362,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
// Paper start - auto recipe limit
|
|
|
|
// Paper start - auto recipe limit
|
|
|
|
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
|
|
|
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
|
|
|
if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
|
|
|
if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
|
|
@ -15638,7 +15638,7 @@ index 5e9202bc7fc649764568b55d66ba0d684118c00c..29e2a74dfbece35cd4b5c4f647684866
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -3460,7 +3548,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
@@ -3443,7 +3531,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
|
|
|
|
|
|
|
|
|
|
this.filterTextPacket(list).thenAcceptAsync((list1) -> {
|
|
|
|
this.filterTextPacket(list).thenAcceptAsync((list1) -> {
|
|
|
|
this.updateSignText(packet, list1);
|
|
|
|
this.updateSignText(packet, list1);
|
|
|
@ -16397,10 +16397,10 @@ index 99a7e9eb75231c15bd8bb24fbb4e296bc9fdedff..695f5b452d0abc4e474e8e55134a122d
|
|
|
|
|
|
|
|
|
|
|
|
public Component getDeathMessage() {
|
|
|
|
public Component getDeathMessage() {
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
|
|
|
index 359a2f0492a9b938a4f015c546e100e0092ae1d4..6f13f96bcc401673be45c8ed62e62ca2b43ce36c 100644
|
|
|
|
index dd9638bdb228a53e72820e0e7cf6fe6fcc08fe4b..0fa04cab50f885f0e03215859c4919c843521d59 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
|
|
|
--- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
|
|
|
@@ -157,13 +157,13 @@ public class DamageSource {
|
|
|
|
@@ -173,13 +173,13 @@ public class DamageSource {
|
|
|
|
LivingEntity entityliving1 = killed.getKillCredit();
|
|
|
|
LivingEntity entityliving1 = killed.getKillCredit();
|
|
|
|
String s1 = s + ".player";
|
|
|
|
String s1 = s + ".player";
|
|
|
|
|
|
|
|
|
|
|
@ -17437,7 +17437,7 @@ index 2bc85351e6e52f90da5fdb29d8d042a06132d742..8d3737dc1381cb0c179912c7cb215e15
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Invoked only when the entity is truly removed from the server, never to be added to any world.
|
|
|
|
* Invoked only when the entity is truly removed from the server, never to be added to any world.
|
|
|
|
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 6e043457a29a890bcefd27fc5bb07c1a7e4e30f7..ed1aa10948897780aefa9a2b4034abb4c7efbb17 100644
|
|
|
|
index 517e10c3d8b1549cd30fd0e7cf2bcb35e88eb8ed..533ecd7e2666c2735483953e5a0426939e928ec5 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
|
|
|
|
@@ -256,7 +256,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
|
|
@@ -256,7 +256,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
|
@ -18634,10 +18634,10 @@ index 5b32364f1452e1b395b91921d045060fd94881b8..51f2ec6dd466c12282a68d07b46b8478
|
|
|
|
boolean flag = false;
|
|
|
|
boolean flag = false;
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
|
|
|
index 1fb1e729d6879568d8b4943071fa940325b2e5b0..0c4b158d574ad0e9e257532ac3b9a3a34497216f 100644
|
|
|
|
index 519755b7f8bc7e8bb9fab135fc5bf7de3a9419f9..b3b7c61db5e640acdc9f4aa70ebf1d8b8e3ec272 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
|
|
|
|
@@ -46,6 +46,78 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
|
|
|
@@ -45,6 +45,78 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
|
|
|
entityHitResult.getEntity().hurt(this.damageSources().thrown(this, this.getOwner()), 0.0F);
|
|
|
|
entityHitResult.getEntity().hurt(this.damageSources().thrown(this, this.getOwner()), 0.0F);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -18716,7 +18716,7 @@ index 1fb1e729d6879568d8b4943071fa940325b2e5b0..0c4b158d574ad0e9e257532ac3b9a3a3
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onHit(HitResult hitResult) {
|
|
|
|
protected void onHit(HitResult hitResult) {
|
|
|
|
super.onHit(hitResult);
|
|
|
|
super.onHit(hitResult);
|
|
|
|
@@ -55,6 +127,20 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
|
|
|
@@ -54,6 +126,20 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.level().isClientSide && !this.isRemoved()) {
|
|
|
|
if (!this.level().isClientSide && !this.isRemoved()) {
|
|
|
@ -18737,7 +18737,7 @@ index 1fb1e729d6879568d8b4943071fa940325b2e5b0..0c4b158d574ad0e9e257532ac3b9a3a3
|
|
|
|
Entity entity = this.getOwner();
|
|
|
|
Entity entity = this.getOwner();
|
|
|
|
|
|
|
|
|
|
|
|
if (entity instanceof ServerPlayer) {
|
|
|
|
if (entity instanceof ServerPlayer) {
|
|
|
|
@@ -113,6 +199,14 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
|
|
|
@@ -112,6 +198,14 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -19327,7 +19327,7 @@ index ea0aee88c7d901034427db201c1b2430f8a1d522..2a147a839e78b1d7bfb5eea869754025
|
|
|
|
return player;
|
|
|
|
return player;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
|
|
index dc88014c4d9f172cc54e5d77b488128f9ffbc73d..1234203335675df14aadc029792ce56ba61dbc51 100644
|
|
|
|
index 082b804f4793f72e76361f5427f0358273454b3d..f079fc7ada73dbf5cf21ae78ec4aaebdaa116b1a 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
|
|
@@ -878,17 +878,18 @@ public class Explosion {
|
|
|
|
@@ -878,17 +878,18 @@ public class Explosion {
|
|
|
@ -19904,7 +19904,7 @@ index 54972cce2314eff774250101df43a9b7074e9604..0c4942895a83ce1392dd1e71a00ab6d0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
|
|
|
index 4459685d1fb655f93a523ae50b62d6b97785ed90..318e4939591cc51c0a72f82d51084d140b9d12c4 100644
|
|
|
|
index 85d598c3354ee62f0fd1b26e485e0084967c0380..8492c8fd3ff448d559b33f27b549180918aedeea 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
|
|
|
@@ -365,7 +365,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
|
|
|
|
@@ -365,7 +365,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
|
|
|
@ -21823,10 +21823,10 @@ index 7a69564572357a7acc043e35b9c113beeb738951..f71661ef4250d3b668fffeea7cd74a28
|
|
|
|
LevelChunkTicks<T> levelChunkTicks = this.allContainers.get(l);
|
|
|
|
LevelChunkTicks<T> levelChunkTicks = this.allContainers.get(l);
|
|
|
|
if (levelChunkTicks == null) {
|
|
|
|
if (levelChunkTicks == null) {
|
|
|
|
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 d50b1f84dfb6e30fd0d0dd2ee66f874681ad6b78..e4015835ebaa5fb96cbe90f7f9640fe5b5cb713e 100644
|
|
|
|
index 2fa5507aa2153a05208077f9547c165a1099b5bb..08e374191b474a1300a70096f2b0138b309e4b80 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
|
|
|
|
@@ -311,7 +311,7 @@ public final class CraftServer implements Server {
|
|
|
|
@@ -307,7 +307,7 @@ public final class CraftServer implements Server {
|
|
|
|
private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer; // Paper - Custom Potion Mixes
|
|
|
|
private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer; // Paper - Custom Potion Mixes
|
|
|
|
|
|
|
|
|
|
|
|
// Paper start - Folia region threading API
|
|
|
|
// Paper start - Folia region threading API
|
|
|
@ -21835,7 +21835,7 @@ index d50b1f84dfb6e30fd0d0dd2ee66f874681ad6b78..e4015835ebaa5fb96cbe90f7f9640fe5
|
|
|
|
private final io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler asyncScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler();
|
|
|
|
private final io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler asyncScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler();
|
|
|
|
private final io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler globalRegionScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler();
|
|
|
|
private final io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler globalRegionScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler();
|
|
|
|
|
|
|
|
|
|
|
|
@@ -379,6 +379,12 @@ public final class CraftServer implements Server {
|
|
|
|
@@ -375,6 +375,12 @@ public final class CraftServer implements Server {
|
|
|
|
return io.papermc.paper.util.TickThread.isTickThreadFor(((org.bukkit.craftbukkit.entity.CraftEntity) entity).getHandleRaw());
|
|
|
|
return io.papermc.paper.util.TickThread.isTickThreadFor(((org.bukkit.craftbukkit.entity.CraftEntity) entity).getHandleRaw());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Paper end - Folia reagion threading API
|
|
|
|
// Paper end - Folia reagion threading API
|
|
|
@ -21848,7 +21848,7 @@ index d50b1f84dfb6e30fd0d0dd2ee66f874681ad6b78..e4015835ebaa5fb96cbe90f7f9640fe5
|
|
|
|
|
|
|
|
|
|
|
|
static {
|
|
|
|
static {
|
|
|
|
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
|
|
|
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
|
|
|
@@ -971,6 +977,9 @@ public final class CraftServer implements Server {
|
|
|
|
@@ -936,6 +942,9 @@ public final class CraftServer implements Server {
|
|
|
|
|
|
|
|
|
|
|
|
// NOTE: Should only be called from DedicatedServer.ah()
|
|
|
|
// NOTE: Should only be called from DedicatedServer.ah()
|
|
|
|
public boolean dispatchServerCommand(CommandSender sender, ConsoleInput serverCommand) {
|
|
|
|
public boolean dispatchServerCommand(CommandSender sender, ConsoleInput serverCommand) {
|
|
|
@ -21858,7 +21858,7 @@ index d50b1f84dfb6e30fd0d0dd2ee66f874681ad6b78..e4015835ebaa5fb96cbe90f7f9640fe5
|
|
|
|
if (sender instanceof Conversable) {
|
|
|
|
if (sender instanceof Conversable) {
|
|
|
|
Conversable conversable = (Conversable) sender;
|
|
|
|
Conversable conversable = (Conversable) sender;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -990,12 +999,46 @@ public final class CraftServer implements Server {
|
|
|
|
@@ -955,12 +964,46 @@ public final class CraftServer implements Server {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -21905,7 +21905,7 @@ index d50b1f84dfb6e30fd0d0dd2ee66f874681ad6b78..e4015835ebaa5fb96cbe90f7f9640fe5
|
|
|
|
if (this.commandMap.dispatch(sender, commandLine)) {
|
|
|
|
if (this.commandMap.dispatch(sender, commandLine)) {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -3254,7 +3297,7 @@ public final class CraftServer implements Server {
|
|
|
|
@@ -3240,7 +3283,7 @@ public final class CraftServer implements Server {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int getCurrentTick() {
|
|
|
|
public int getCurrentTick() {
|
|
|
@ -22706,7 +22706,7 @@ index a2d336ceb52b63db5c03432ee7bc94dc6a742b82..cf9282a46534319308e9ccf69f332a5c
|
|
|
|
// Paper end - more teleport API / async chunk API
|
|
|
|
// Paper end - more teleport API / async chunk API
|
|
|
|
|
|
|
|
|
|
|
|
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 5f896948d158651cd9837364759dbfbcce6b7d21..81f442d23582049757353d9aba02d612e6058299 100644
|
|
|
|
index 7e6116963d835d4606ef3d93b69d3e44b61288e1..c03015738313ba802436ed8a047623c02e94a06e 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
|
|
|
|
@@ -647,7 +647,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
|
|
@@ -647,7 +647,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
|
@ -22749,7 +22749,7 @@ index 5f896948d158651cd9837364759dbfbcce6b7d21..81f442d23582049757353d9aba02d612
|
|
|
|
entry.updatePlayer(this.getHandle());
|
|
|
|
entry.updatePlayer(this.getHandle());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
|
|
index 547ab158cd0cbf51da06ea97740cfce34bca651b..570fb9e4c6750666c8a498e896520bd4bdb3610e 100644
|
|
|
|
index 34b91eff3190848bae38b20e1d956ece497b1473..9aa832a851b78197759c6d8d5c5159f33e3870f8 100644
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
|
|
@@ -942,7 +942,7 @@ public class CraftEventFactory {
|
|
|
|
@@ -942,7 +942,7 @@ public class CraftEventFactory {
|
|
|
@ -22770,7 +22770,7 @@ index 547ab158cd0cbf51da06ea97740cfce34bca651b..570fb9e4c6750666c8a498e896520bd4
|
|
|
|
Bukkit.getPluginManager().callEvent(event);
|
|
|
|
Bukkit.getPluginManager().callEvent(event);
|
|
|
|
|
|
|
|
|
|
|
|
if (!event.isCancelled()) {
|
|
|
|
if (!event.isCancelled()) {
|
|
|
|
@@ -2143,7 +2143,7 @@ public class CraftEventFactory {
|
|
|
|
@@ -2140,7 +2140,7 @@ public class CraftEventFactory {
|
|
|
|
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemStack.copyWithCount(1));
|
|
|
|
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemStack.copyWithCount(1));
|
|
|
|
|
|
|
|
|
|
|
|
org.bukkit.event.block.BlockDispenseEvent event = new org.bukkit.event.block.BlockDispenseEvent(bukkitBlock, craftItem.clone(), CraftVector.toBukkit(to));
|
|
|
|
org.bukkit.event.block.BlockDispenseEvent event = new org.bukkit.event.block.BlockDispenseEvent(bukkitBlock, craftItem.clone(), CraftVector.toBukkit(to));
|
|
|
@ -22792,10 +22792,10 @@ index e85b9bb3f9c225d289a4959921970b9963881199..b00e3b9b628f3d2a2fdbf1d2c7790496
|
|
|
|
if (!this.isAsyncScheduler && !task.isSync()) {
|
|
|
|
if (!this.isAsyncScheduler && !task.isSync()) {
|
|
|
|
this.asyncScheduler.handle(task, delay);
|
|
|
|
this.asyncScheduler.handle(task, delay);
|
|
|
|
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 a1c9989df460d7ae3666fffe7968750832a30b85..521b9c19e3d50a0ecc59cdcce0a7d7d79544085b 100644
|
|
|
|
index 5a382907285a288f2a223189e690d3dbdf45594c..8248cd6c908c82b6b7a18df7410a9a4a46a91959 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
|
|
|
|
@@ -383,6 +383,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
|
|
@@ -387,6 +387,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
|
|
throw new InvalidPluginException("Unsupported API version " + pdf.getAPIVersion());
|
|
|
|
throw new InvalidPluginException("Unsupported API version " + pdf.getAPIVersion());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|