mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-21 11:55:11 +01:00
Update to latest paper 1.19
This commit is contained in:
parent
ca3b7adee2
commit
308d1ca5dc
@ -2,7 +2,7 @@ group=dev.folia
|
|||||||
|
|
||||||
version=1.19.4-R0.1-SNAPSHOT
|
version=1.19.4-R0.1-SNAPSHOT
|
||||||
mcVersion=1.19.4
|
mcVersion=1.19.4
|
||||||
paperRef=cbcdfd03e7d4042a8812d70d3e20fc216bdc5e02
|
paperRef=bc4a6647c99ae98c52c1c81597834be8fec6aa0d
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
@ -485,10 +485,10 @@ index 0000000000000000000000000000000000000000..a6b50c9d8af589cc4747e14d343d2045
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index a6bdd42b38454fe481f9210e1a0f5f94023a0543..aa2d0af0b0a783000e993fa622dd14e32b1914e3 100644
|
index b0bc2df41506770e2854a287813f1c53f003eda1..dc94b729179b0590fe53658a7c98030933993082 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -2459,6 +2459,44 @@ public final class Bukkit {
|
@@ -2478,6 +2478,44 @@ public final class Bukkit {
|
||||||
return server.getPotionBrewer();
|
return server.getPotionBrewer();
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@ -534,10 +534,10 @@ index a6bdd42b38454fe481f9210e1a0f5f94023a0543..aa2d0af0b0a783000e993fa622dd14e3
|
|||||||
@NotNull
|
@NotNull
|
||||||
public static Server.Spigot spigot() {
|
public static Server.Spigot spigot() {
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index ce2ef5cff6ad10b64791e67f6d3cff328c2cf7dc..2f1d1edbe802f66962e2763d49a025fbc657c99f 100644
|
index 1d1a1d087dabc9794e0062a064da2cced4062309..33426325abc9d63cc473b0e017044a3b72356069 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -2139,4 +2139,36 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -2162,4 +2162,36 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
*/
|
*/
|
||||||
@NotNull org.bukkit.potion.PotionBrewer getPotionBrewer();
|
@NotNull org.bukkit.potion.PotionBrewer getPotionBrewer();
|
||||||
// Paper end
|
// Paper end
|
||||||
@ -575,10 +575,10 @@ index ce2ef5cff6ad10b64791e67f6d3cff328c2cf7dc..2f1d1edbe802f66962e2763d49a025fb
|
|||||||
+ // Folia end - region threading API
|
+ // Folia end - region threading API
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
index 8c58018b155c52a7b2a139f784abceb6aa00a268..d8c447b4c01e82efab6f68b0c668fc10404ef202 100644
|
index a2a423d4e4c2702ba5967223cab0432dd7d04732..de51553f7a03b367388aa37532f849c688447acb 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
@@ -953,4 +953,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
@@ -954,4 +954,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||||
*/
|
*/
|
||||||
boolean wouldCollideUsing(@NotNull BoundingBox boundingBox);
|
boolean wouldCollideUsing(@NotNull BoundingBox boundingBox);
|
||||||
// Paper End - Collision API
|
// Paper End - Collision API
|
||||||
@ -593,7 +593,7 @@ index 8c58018b155c52a7b2a139f784abceb6aa00a268..d8c447b4c01e82efab6f68b0c668fc10
|
|||||||
+ // Folia end - region threading API
|
+ // Folia end - region threading API
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||||
index 2b8308989fce7f8a16907f8711b362e671fdbfb6..800f954161886ca4f6332f8e0cbc4d4e8f9cbb74 100644
|
index fc2dae69165776d08274e34a69962cc70445f411..06149045a44148bf0af5f52952ff0092fe2c70cb 100644
|
||||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||||
@@ -544,9 +544,9 @@ public final class SimplePluginManager implements PluginManager {
|
@@ -544,9 +544,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||||
|
@ -11,10 +11,10 @@ the schedulers depending on the result of the ownership
|
|||||||
check.
|
check.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index aa2d0af0b0a783000e993fa622dd14e32b1914e3..92678097e5255a8c7ff7b6b302ccb99f13c6f2e6 100644
|
index dc94b729179b0590fe53658a7c98030933993082..dc27f6be4e89be464bc100eb849ffe063464ebdc 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -2496,6 +2496,107 @@ public final class Bukkit {
|
@@ -2515,6 +2515,107 @@ public final class Bukkit {
|
||||||
public static @NotNull io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler getGlobalRegionScheduler() {
|
public static @NotNull io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler getGlobalRegionScheduler() {
|
||||||
return server.getGlobalRegionScheduler();
|
return server.getGlobalRegionScheduler();
|
||||||
}
|
}
|
||||||
@ -123,10 +123,10 @@ index aa2d0af0b0a783000e993fa622dd14e32b1914e3..92678097e5255a8c7ff7b6b302ccb99f
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 2f1d1edbe802f66962e2763d49a025fbc657c99f..717635388aa449fd2e24692b14ceccc8a0f762c1 100644
|
index 33426325abc9d63cc473b0e017044a3b72356069..5e427d5c5ce58927eb87b4f4f2466a27e70bc7c1 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -2170,5 +2170,90 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -2193,5 +2193,90 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
* @return the global region scheduler
|
* @return the global region scheduler
|
||||||
*/
|
*/
|
||||||
public @NotNull io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler getGlobalRegionScheduler();
|
public @NotNull io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler getGlobalRegionScheduler();
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Emily <emilia.lopezf.1999@gmail.com>
|
|
||||||
Date: Sun, 14 May 2023 11:32:38 -0700
|
|
||||||
Subject: [PATCH] Undo making JavaPlugin#logger field public
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
|
||||||
index 6d31f3a2569ae9c522a5e6cddd38ac8f252f1bfe..2139377f7370a8352d36f2d10d2a726d528e1a47 100644
|
|
||||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
|
||||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
|
||||||
@@ -44,7 +44,7 @@ public abstract class JavaPlugin extends PluginBase {
|
|
||||||
private boolean naggable = true;
|
|
||||||
private FileConfiguration newConfig = null;
|
|
||||||
private File configFile = null;
|
|
||||||
- public Logger logger = null; // Paper - PluginLogger -> Logger, public
|
|
||||||
+ private Logger logger = null; // Paper - PluginLogger -> Logger
|
|
||||||
|
|
||||||
public JavaPlugin() {
|
|
||||||
// Paper start
|
|
||||||
@@ -289,10 +289,10 @@ public abstract class JavaPlugin extends PluginBase {
|
|
||||||
.orElseThrow();
|
|
||||||
}
|
|
||||||
public final void init(@NotNull PluginLoader loader, @NotNull Server server, @NotNull PluginDescriptionFile description, @NotNull File dataFolder, @NotNull File file, @NotNull ClassLoader classLoader) {
|
|
||||||
- init(server, description, dataFolder, file, classLoader, description);
|
|
||||||
+ init(server, description, dataFolder, file, classLoader, description, com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(description));
|
|
||||||
this.pluginMeta = description;
|
|
||||||
}
|
|
||||||
- public final void init(@NotNull Server server, @NotNull PluginDescriptionFile description, @NotNull File dataFolder, @NotNull File file, @NotNull ClassLoader classLoader, @Nullable io.papermc.paper.plugin.configuration.PluginMeta configuration) {
|
|
||||||
+ public final void init(@NotNull Server server, @NotNull PluginDescriptionFile description, @NotNull File dataFolder, @NotNull File file, @NotNull ClassLoader classLoader, @Nullable io.papermc.paper.plugin.configuration.PluginMeta configuration, @NotNull Logger logger) {
|
|
||||||
// Paper end
|
|
||||||
this.loader = DummyPluginLoaderImplHolder.INSTANCE; // Paper
|
|
||||||
this.server = server;
|
|
||||||
@@ -302,11 +302,7 @@ public abstract class JavaPlugin extends PluginBase {
|
|
||||||
this.classLoader = classLoader;
|
|
||||||
this.configFile = new File(dataFolder, "config.yml");
|
|
||||||
this.pluginMeta = configuration; // Paper
|
|
||||||
- // Paper start
|
|
||||||
- if (this.logger == null) {
|
|
||||||
- this.logger = com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(this.description);
|
|
||||||
- }
|
|
||||||
- // Paper end
|
|
||||||
+ this.logger = logger; // Paper
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
|
||||||
index 1758e8a89c85eea8c2161ddcb5b0e745151a1f5e..13da387d3b59bc67c0d73e3fbd3a4034b1281527 100644
|
|
||||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
|
||||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
|
||||||
@@ -270,8 +270,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
|
||||||
pluginState = new IllegalStateException("Initial initialization");
|
|
||||||
this.pluginInit = javaPlugin;
|
|
||||||
|
|
||||||
- javaPlugin.logger = this.logger; // Paper - set logger
|
|
||||||
- javaPlugin.init(null, org.bukkit.Bukkit.getServer(), description, dataFolder, file, this); // Paper
|
|
||||||
+ javaPlugin.init(org.bukkit.Bukkit.getServer(), description, dataFolder, file, this, description, this.logger); // Paper
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paper start
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Build changes
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 9cf389defdaeb887e9cad4f0fed3f3b95667b238..dd53b1ffaff8dbaea0cf21c489a90162a496a026 100644
|
index 4f2fa65ade89c5703451dad4f80eeef162b277d1..ec4ce20c9f3dfb488cbd0874b79cb612a12def6a 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -7,8 +7,12 @@ plugins {
|
@@ -7,8 +7,12 @@ plugins {
|
||||||
@ -64,7 +64,7 @@ index 4b002e8b75d117b726b0de274a76d3596fce015b..58dc84b7b3b04c2d0b00fc5fac5303d3
|
|||||||
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
||||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
index bf42969859545a8a520923ef1836ffa4a5cc24a0..2ce29b6ccb9a3b520b8c1edf53aae2e9769ba252 100644
|
index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..e2f704c115fd6e00960bb56bb0779f1100c89c17 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
@@ -31,8 +31,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
@@ -31,8 +31,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||||
@ -101,10 +101,10 @@ index 9f15d9dbdfa74a0640b1a2b4ff695609d4758a4c..3219482b96cab8262e393a790c88d903
|
|||||||
|
|
||||||
public SystemReport fillSystemReport(SystemReport details) {
|
public SystemReport fillSystemReport(SystemReport details) {
|
||||||
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 f9a9d2bb7b6d1bf4a0931438de4d8c7ee0757479..e0b6c737f9de2b6e692d6813d8dea4c35f038573 100644
|
index 9f2536d9a73bdb15b5b3004d4da79ca32cee205b..91c301275fa7b6a2fc16e3bdbf61b6a46eed6ef4 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
|
||||||
@@ -256,7 +256,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -262,7 +262,7 @@ import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
|
@ -1398,7 +1398,7 @@ index 0000000000000000000000000000000000000000..63c69c4da5fcbd5901c9fc3427f69626
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
index e5d9c6f2cbe11c2ded6d8ad111fa6a8b2086dfba..c6d20bc2f0eab737338db6b88dacb63f0decb66c 100644
|
index ad3560284ae79b9c6bbc8752be7d9d14b18e226e..cb12c31ffe014e17eb9f901ab0a273802e3e0245 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -1408,7 +1408,7 @@ index e5d9c6f2cbe11c2ded6d8ad111fa6a8b2086dfba..c6d20bc2f0eab737338db6b88dacb63f
|
|||||||
import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
|
import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
|
||||||
import ca.spottedleaf.concurrentutil.map.SWMRLong2ObjectHashTable;
|
import ca.spottedleaf.concurrentutil.map.SWMRLong2ObjectHashTable;
|
||||||
import co.aikar.timings.Timing;
|
import co.aikar.timings.Timing;
|
||||||
@@ -493,6 +494,21 @@ public final class ChunkHolderManager {
|
@@ -500,6 +501,21 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1430,7 +1430,7 @@ index e5d9c6f2cbe11c2ded6d8ad111fa6a8b2086dfba..c6d20bc2f0eab737338db6b88dacb63f
|
|||||||
public <T> void removeAllTicketsFor(final TicketType<T> ticketType, final int ticketLevel, final T ticketIdentifier) {
|
public <T> void removeAllTicketsFor(final TicketType<T> ticketType, final int ticketLevel, final T ticketIdentifier) {
|
||||||
if (ticketLevel > MAX_TICKET_LEVEL) {
|
if (ticketLevel > MAX_TICKET_LEVEL) {
|
||||||
return;
|
return;
|
||||||
@@ -900,6 +916,142 @@ public final class ChunkHolderManager {
|
@@ -907,6 +923,142 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1573,7 +1573,7 @@ index e5d9c6f2cbe11c2ded6d8ad111fa6a8b2086dfba..c6d20bc2f0eab737338db6b88dacb63f
|
|||||||
private final ThreadLocal<Boolean> BLOCK_TICKET_UPDATES = ThreadLocal.withInitial(() -> {
|
private final ThreadLocal<Boolean> BLOCK_TICKET_UPDATES = ThreadLocal.withInitial(() -> {
|
||||||
return Boolean.FALSE;
|
return Boolean.FALSE;
|
||||||
});
|
});
|
||||||
@@ -948,6 +1100,8 @@ public final class ChunkHolderManager {
|
@@ -955,6 +1107,8 @@ public final class ChunkHolderManager {
|
||||||
|
|
||||||
this.ticketLock.lock();
|
this.ticketLock.lock();
|
||||||
try {
|
try {
|
||||||
@ -2021,7 +2021,7 @@ index ca84eddbdb1e198b899750e5f6b3eafd25ce970f..5c7b8041e96ede9e662dfdb5285539bf
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
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 5a5ff40df37db9cbd53c584ed26a3ce4888b29c0..bf1a77cf9bbea4e2104b2a8c61309e740f28d51b 100644
|
index 45804711255f04110e9509df8d60900314aa10b7..7b7e2edbcb6c8eb45029e6cbf4fc9d2e9052b668 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
|
||||||
@@ -521,6 +521,48 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -521,6 +521,48 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
@ -2074,10 +2074,10 @@ index 5a5ff40df37db9cbd53c584ed26a3ce4888b29c0..bf1a77cf9bbea4e2104b2a8c61309e74
|
|||||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||||
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
|
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
|
||||||
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 1d4d02f26391ac55c7631817f09d05e2769b0d29..4231c3fe14a621d237bdc3d56c593f0adc0a7bc6 100644
|
index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..37dfb5f2e56d8d7bf114dac6be82ccf0fbfc8a09 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
|
||||||
@@ -276,6 +276,48 @@ public class ServerPlayer extends Player {
|
@@ -278,6 +278,48 @@ public class ServerPlayer extends Player {
|
||||||
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||||
public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event
|
public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event
|
||||||
|
|
||||||
@ -2127,10 +2127,10 @@ index 1d4d02f26391ac55c7631817f09d05e2769b0d29..4231c3fe14a621d237bdc3d56c593f0a
|
|||||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
||||||
this.chatVisibility = ChatVisiblity.FULL;
|
this.chatVisibility = ChatVisiblity.FULL;
|
||||||
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 c0c14766adaac855112f85a203a6163b8adfdded..0dbe182fbae5ce5ba182176eb5d5e3f1897e77f2 100644
|
index 92e758a286a5db079c32d53cc52c8a422457daef..7679fa8c905e6cee1906814a82f8ab4ab925b0fc 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
|
||||||
@@ -271,7 +271,7 @@ public abstract class PlayerList {
|
@@ -278,7 +278,7 @@ public abstract class PlayerList {
|
||||||
boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO);
|
boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO);
|
||||||
|
|
||||||
// Spigot - view distance
|
// Spigot - view distance
|
||||||
@ -2139,7 +2139,7 @@ index c0c14766adaac855112f85a203a6163b8adfdded..0dbe182fbae5ce5ba182176eb5d5e3f1
|
|||||||
player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
|
player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
|
||||||
playerconnection.send(new ClientboundUpdateEnabledFeaturesPacket(FeatureFlags.REGISTRY.toNames(worldserver1.enabledFeatures())));
|
playerconnection.send(new ClientboundUpdateEnabledFeaturesPacket(FeatureFlags.REGISTRY.toNames(worldserver1.enabledFeatures())));
|
||||||
playerconnection.send(new ClientboundCustomPayloadPacket(ClientboundCustomPayloadPacket.BRAND, (new FriendlyByteBuf(Unpooled.buffer())).writeUtf(this.getServer().getServerModName())));
|
playerconnection.send(new ClientboundCustomPayloadPacket(ClientboundCustomPayloadPacket.BRAND, (new FriendlyByteBuf(Unpooled.buffer())).writeUtf(this.getServer().getServerModName())));
|
||||||
@@ -905,8 +905,8 @@ public abstract class PlayerList {
|
@@ -912,8 +912,8 @@ public abstract class PlayerList {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
LevelData worlddata = worldserver1.getLevelData();
|
LevelData worlddata = worldserver1.getLevelData();
|
||||||
entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation()));
|
entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation()));
|
||||||
@ -2149,7 +2149,7 @@ index c0c14766adaac855112f85a203a6163b8adfdded..0dbe182fbae5ce5ba182176eb5d5e3f1
|
|||||||
+ entityplayer1.connection.send(new ClientboundSetSimulationDistancePacket(worldserver1.getWorld().getSimulationDistance())); // Spigot // Paper - replace old player chunk management
|
+ entityplayer1.connection.send(new ClientboundSetSimulationDistancePacket(worldserver1.getWorld().getSimulationDistance())); // Spigot // Paper - replace old player chunk management
|
||||||
entityplayer1.spawnIn(worldserver1);
|
entityplayer1.spawnIn(worldserver1);
|
||||||
entityplayer1.unsetRemoved();
|
entityplayer1.unsetRemoved();
|
||||||
entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot()));
|
entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot()));
|
||||||
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 973ecd50f9cb6b86c353586e84d15dcb118ccb60..944da18bcc993ab0488a34cbbe9df134c355301a 100644
|
index 973ecd50f9cb6b86c353586e84d15dcb118ccb60..944da18bcc993ab0488a34cbbe9df134c355301a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@ -2164,10 +2164,10 @@ index 973ecd50f9cb6b86c353586e84d15dcb118ccb60..944da18bcc993ab0488a34cbbe9df134
|
|||||||
// Paper end - per player view distance
|
// Paper end - per player view distance
|
||||||
}
|
}
|
||||||
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 206dc04086a218b510930739a6c573f2653ab0fa..9599af33c683ec47e28b1c8e4dc965d30d9081a7 100644
|
index d190bad5d287766ed4165ed827d9901a9d878687..6143607ad1485c552309ac3df37b3ba9adb7c07c 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
|
||||||
@@ -184,43 +184,6 @@ public class LevelChunk extends ChunkAccess {
|
@@ -177,43 +177,6 @@ public class LevelChunk extends ChunkAccess {
|
||||||
|
|
||||||
protected void onNeighbourChange(final long bitsetBefore, final long bitsetAfter) {
|
protected void onNeighbourChange(final long bitsetBefore, final long bitsetAfter) {
|
||||||
|
|
||||||
@ -2211,7 +2211,7 @@ index 206dc04086a218b510930739a6c573f2653ab0fa..9599af33c683ec47e28b1c8e4dc965d3
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isAnyNeighborsLoaded() {
|
public final boolean isAnyNeighborsLoaded() {
|
||||||
@@ -906,7 +869,6 @@ public class LevelChunk extends ChunkAccess {
|
@@ -899,7 +862,6 @@ public class LevelChunk extends ChunkAccess {
|
||||||
// Paper - rewrite chunk system - move into separate callback
|
// Paper - rewrite chunk system - move into separate callback
|
||||||
org.bukkit.Server server = this.level.getCraftServer();
|
org.bukkit.Server server = this.level.getCraftServer();
|
||||||
// Paper - rewrite chunk system - move into separate callback
|
// Paper - rewrite chunk system - move into separate callback
|
||||||
@ -2219,7 +2219,7 @@ index 206dc04086a218b510930739a6c573f2653ab0fa..9599af33c683ec47e28b1c8e4dc965d3
|
|||||||
if (server != null) {
|
if (server != null) {
|
||||||
/*
|
/*
|
||||||
* If it's a new world, the first few chunks are generated inside
|
* If it's a new world, the first few chunks are generated inside
|
||||||
@@ -1086,6 +1048,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -1081,6 +1043,7 @@ public class LevelChunk extends ChunkAccess {
|
||||||
BlockState iblockdata1 = Block.updateFromNeighbourShapes(iblockdata, this.level, blockposition);
|
BlockState iblockdata1 = Block.updateFromNeighbourShapes(iblockdata, this.level, blockposition);
|
||||||
|
|
||||||
this.level.setBlock(blockposition, iblockdata1, 20);
|
this.level.setBlock(blockposition, iblockdata1, 20);
|
||||||
@ -2227,7 +2227,7 @@ index 206dc04086a218b510930739a6c573f2653ab0fa..9599af33c683ec47e28b1c8e4dc965d3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1105,7 +1068,6 @@ public class LevelChunk extends ChunkAccess {
|
@@ -1100,7 +1063,6 @@ public class LevelChunk extends ChunkAccess {
|
||||||
this.upgradeData.upgrade(this);
|
this.upgradeData.upgrade(this);
|
||||||
} finally { // Paper start - replace chunk loader system
|
} finally { // Paper start - replace chunk loader system
|
||||||
this.isPostProcessingDone = true;
|
this.isPostProcessingDone = true;
|
||||||
@ -2236,10 +2236,10 @@ index 206dc04086a218b510930739a6c573f2653ab0fa..9599af33c683ec47e28b1c8e4dc965d3
|
|||||||
// Paper end - replace chunk loader system
|
// Paper end - replace chunk loader system
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 5e9055fdf411029ea2fed91acd6b981f79156418..ff6559bf563f2fdcc0f2843d4f4aa24d7ddfb6db 100644
|
index 8f0234296397ca2d4a607dcea6093c6c606dc7d2..4f0ca1621e4f1fc16d4a6601c858d74ed4d5a788 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -2273,12 +2273,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -2309,12 +2309,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
// Spigot start
|
// Spigot start
|
||||||
@Override
|
@Override
|
||||||
public int getViewDistance() {
|
public int getViewDistance() {
|
||||||
@ -2254,7 +2254,7 @@ index 5e9055fdf411029ea2fed91acd6b981f79156418..ff6559bf563f2fdcc0f2843d4f4aa24d
|
|||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
// Paper start - view distance api
|
// Paper start - view distance api
|
||||||
@@ -2312,12 +2312,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -2348,12 +2348,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSendViewDistance() {
|
public int getSendViewDistance() {
|
||||||
@ -2270,10 +2270,10 @@ index 5e9055fdf411029ea2fed91acd6b981f79156418..ff6559bf563f2fdcc0f2843d4f4aa24d
|
|||||||
// Paper end - view distance api
|
// Paper end - view distance 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 0ae1fce0c1a2e3bfbbab756a088fc76545e263fa..fec408416aa63e1022802a644bb95131601f0c3b 100644
|
index be64633c8bcee96f2ad5247525cac965b7b031b1..e88d7a6b4835bdac1a247545b49e4161ade148cb 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
|
||||||
@@ -189,44 +189,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -195,44 +195,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
// Paper start - implement view distances
|
// Paper start - implement view distances
|
||||||
@Override
|
@Override
|
||||||
public int getViewDistance() {
|
public int getViewDistance() {
|
||||||
@ -2322,7 +2322,7 @@ index 0ae1fce0c1a2e3bfbbab756a088fc76545e263fa..fec408416aa63e1022802a644bb95131
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -241,23 +219,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -247,23 +225,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSendViewDistance() {
|
public int getSendViewDistance() {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -177,10 +177,10 @@ index 0b7a2b0ead4f3bc07bfd9a38c2b7cf024bd140c6..36e93fefdfbebddce4c153974c7cd81a
|
|||||||
final int chunkX = CoordinateUtils.getChunkX(coordinate);
|
final int chunkX = CoordinateUtils.getChunkX(coordinate);
|
||||||
final int chunkZ = CoordinateUtils.getChunkZ(coordinate);
|
final int chunkZ = CoordinateUtils.getChunkZ(coordinate);
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
index 9ac75b6c9d9698c6369978c4b004a82aa2b747f4..aa6dad3a41077b187ef0702cb27ca03f6d9596fb 100644
|
index 1e5df2593b21b8ee7636f5df28541f9b04afa1e6..db18f2947ef9d2863e3a029f0500343920cba1db 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
@@ -1339,17 +1339,23 @@ public final class ChunkHolderManager {
|
@@ -1346,17 +1346,23 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean tryDrainTicketUpdates() {
|
public Boolean tryDrainTicketUpdates() {
|
||||||
|
@ -19,10 +19,10 @@ index 2e96377d628b3a07fb565020074d665f594f32e8..75b1877f8c3e4da3183437f327ef3376
|
|||||||
} // Folia - region threading - remove delayed accept
|
} // Folia - region threading - remove delayed accept
|
||||||
|
|
||||||
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 c6cfc5853869d0a356947b5cb83157a937acd91c..6af3e57e72caa0cf25b970fb08939fdde3be2fd3 100644
|
index 7d99233f4b36d699aae81be554e78313909c9a7d..7416d8eed50ef7156db158c05c89d6062193bf2e 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
|
||||||
@@ -177,6 +177,17 @@ public abstract class PlayerList {
|
@@ -180,6 +180,17 @@ public abstract class PlayerList {
|
||||||
conflictingId = this.connectionById.get(byId);
|
conflictingId = this.connectionById.get(byId);
|
||||||
|
|
||||||
if (conflictingName == null && conflictingId == null) {
|
if (conflictingName == null && conflictingId == null) {
|
||||||
|
@ -51,10 +51,10 @@ index d9687722e02dfd4088c7030abbf5008eb0a092c8..62484ebf4550b05182f693a3180bbac5
|
|||||||
TickThread.ensureTickThread(thisEntity, "May not tick entity scheduler asynchronously");
|
TickThread.ensureTickThread(thisEntity, "May not tick entity scheduler asynchronously");
|
||||||
final List<ScheduledTask> toRun;
|
final List<ScheduledTask> toRun;
|
||||||
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 c659a574195f465ec3316f4c014621569e099cfc..08e61a8940c142c68ed93359084ea46c7fd52310 100644
|
index e8e6743ec078d9dd95d3583ff24cb6791abddf19..885805170e84ce6f26b2789e39c5b5b453c026f0 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
|
||||||
@@ -2767,6 +2767,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2769,6 +2769,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
com.google.common.base.Preconditions.checkState(!entity.passengers.contains(this), "Circular entity riding! %s %s", this, entity);
|
com.google.common.base.Preconditions.checkState(!entity.passengers.contains(this), "Circular entity riding! %s %s", this, entity);
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ index c659a574195f465ec3316f4c014621569e099cfc..08e61a8940c142c68ed93359084ea46c
|
|||||||
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
||||||
Entity orig = craft == null ? null : craft.getHandle();
|
Entity orig = craft == null ? null : craft.getHandle();
|
||||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||||
@@ -2794,6 +2795,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2796,6 +2797,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ index c659a574195f465ec3316f4c014621569e099cfc..08e61a8940c142c68ed93359084ea46c
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
if (this.passengers.isEmpty()) {
|
if (this.passengers.isEmpty()) {
|
||||||
this.passengers = ImmutableList.of(entity);
|
this.passengers = ImmutableList.of(entity);
|
||||||
@@ -2822,6 +2824,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2824,6 +2826,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||||
} else {
|
} else {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -78,7 +78,7 @@ index c659a574195f465ec3316f4c014621569e099cfc..08e61a8940c142c68ed93359084ea46c
|
|||||||
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
||||||
Entity orig = craft == null ? null : craft.getHandle();
|
Entity orig = craft == null ? null : craft.getHandle();
|
||||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||||
@@ -2849,6 +2852,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2851,6 +2854,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ index c659a574195f465ec3316f4c014621569e099cfc..08e61a8940c142c68ed93359084ea46c
|
|||||||
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
|
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
|
||||||
this.passengers = ImmutableList.of();
|
this.passengers = ImmutableList.of();
|
||||||
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 27445d7bcfaaa34a60e65e8d339f15367d7b3b6e..788ac73125620ceaaec390a6498451b65d16d325 100644
|
index c43248f5a8e4fe514cfcc1dcf3003baedd950904..0fa6d701f4a16b3a74b55bdd660accb000f06565 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
|
||||||
@@ -369,7 +369,7 @@ public final class CraftServer implements Server {
|
@@ -376,7 +376,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean isOwnedByCurrentRegion(Entity entity) {
|
public final boolean isOwnedByCurrentRegion(Entity entity) {
|
||||||
@ -100,7 +100,7 @@ index 27445d7bcfaaa34a60e65e8d339f15367d7b3b6e..788ac73125620ceaaec390a6498451b6
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||||
index 1c8d63e462f3ed3d5286659ae0d1ec04d8b55177..116341b777f898a8080cc348499159c0f01b7329 100644
|
index 5e82b2d57833fea1adb342f5c8d25f55491945cb..2c46527dfe832919b055579a0876a043c06d8b67 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -131,7 +131,7 @@ index 1c8d63e462f3ed3d5286659ae0d1ec04d8b55177..116341b777f898a8080cc348499159c0
|
|||||||
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
||||||
return (net.minecraft.world.entity.projectile.Projectile) entity;
|
return (net.minecraft.world.entity.projectile.Projectile) entity;
|
||||||
}
|
}
|
||||||
// Paper end
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||||||
index 299ab868252c8f326e3a56e878c9ee230c9635dc..e0f2104154f1499ef7cd388d24ffc3983aef7f42 100644
|
index 299ab868252c8f326e3a56e878c9ee230c9635dc..e0f2104154f1499ef7cd388d24ffc3983aef7f42 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||||||
@ -218,10 +218,10 @@ index f6d9ccc993a067e554d6a7ef98c5fff1392efaef..69118f8ff00755ba1c31845a2704dd95
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
||||||
index a0fed289f1f6b6addd60ccbd1344ad2c1202c78b..e7bd0ab46da08facea06ae86e8d21b288fe2e117 100644
|
index debccfa7cb5517a877c06b13468db57534ace77e..18044b45cc001739406f8151c54f06b5d70d17e0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
||||||
@@ -16,8 +16,16 @@ public class CraftAllay extends CraftCreature implements org.bukkit.entity.Allay
|
@@ -17,8 +17,16 @@ public class CraftAllay extends CraftCreature implements org.bukkit.entity.Allay
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,10 +323,10 @@ index 17d08d2c90047ebfc4098b087be091b83111a40f..f678c151938ddd3e5277a05d6d8884c1
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
||||||
index 40ae8e43f40f9bf457d2917ac4f131b21e4f8dd2..bd473c255e13420f8d31b417ee53ff357424ce6d 100644
|
index d53e1dc949359e9157e92c75d8655a1619bba568..16c55774a622b3325af091c9e7cc657cf7717d95 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
|
||||||
@@ -158,8 +158,16 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow {
|
@@ -145,8 +145,16 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow {
|
||||||
this.getHandle().setShotFromCrossbow(shotFromCrossbow);
|
this.getHandle().setShotFromCrossbow(shotFromCrossbow);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -386,10 +386,10 @@ index 8f25bb253c2b22e1964afeae705901e926432ef0..ebadeb928d405564d3b029246ac4f2c6
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
|
||||||
index 1ae8d6e819cd9d195e1bd31ccf55d2893ba00e2a..eb0d022f50b31ae54aed72153b29b94f92f14174 100644
|
index e222a6ab6afbc43a3d358a79855a818b0e481fdb..1e636646e3baa7a77c008d9109e0dccfbc497d6e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
|
||||||
@@ -13,8 +13,16 @@ public class CraftBee extends CraftAnimals implements Bee {
|
@@ -14,8 +14,16 @@ public class CraftBee extends CraftAnimals implements Bee {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -701,7 +701,7 @@ index 63a8188010f045d5c17a1ecb63e8081ec86c2960..24c6c26f0930940f88bdd0353d660ff3
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
|
||||||
index 864fbfef94373d7252f0e7eff4023330fa73c145..d1e7f24344ebc21fc9050e726ccf7657090451f8 100644
|
index 2f7bf9963c3adfc9d2475a86e53a7dcf9f386bfe..e5ffc16d4d5595a7065119c97293f5b419b5a274 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
|
||||||
@@ -13,8 +13,16 @@ public class CraftDisplay extends CraftEntity implements Display {
|
@@ -13,8 +13,16 @@ public class CraftDisplay extends CraftEntity implements Display {
|
||||||
@ -785,10 +785,10 @@ index 6ac40fab0155f3b54a8ab7f492f42c952ee2377c..c439ab4e1db346d01c5de4ad9f2ce48e
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
|
||||||
index 2dbc6bf56f3462028dd3c9cbc4a939c53e573c76..1c5a2168c150d6d819e238db3d7986f2bbd5a820 100644
|
index 4c7f074a1f7aa43af6fe331bbd5d23929780ab25..d07b70f42c87a92fe662fc27a2eefa474db87bcc 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
|
||||||
@@ -39,8 +39,16 @@ public class CraftEnderCrystal extends CraftEntity implements EnderCrystal {
|
@@ -40,8 +40,16 @@ public class CraftEnderCrystal extends CraftEntity implements EnderCrystal {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -869,7 +869,7 @@ index 21d5d8d4becee2709295d45b4b4fd2d1edbd3910..0cc66673866bd20ef74437866765134b
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
|
||||||
index 86a5b59c2987a4faa5d29eebd978b4fb0b6cd424..26ba9f73504fc652f76b5a19baf19e3d42c4d0ac 100644
|
index e3688e941d9b63b5319faf9370b8f75e0e5828ae..631dce2beaa9c8d72d45349a436d72c5417e8de7 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
|
||||||
@@ -16,8 +16,16 @@ public class CraftEnderSignal extends CraftEntity implements EnderSignal {
|
@@ -16,8 +16,16 @@ public class CraftEnderSignal extends CraftEntity implements EnderSignal {
|
||||||
@ -932,7 +932,7 @@ index 75c7645fb5732c43d1da15181cf5c7ee4c3ecd6c..6d3325436a77153438bc40aa86819562
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index 652c28a66d45680479a38463525afcf191c55ab4..c6c31416fb21e180f5c05baca93630c5d14e0abb 100644
|
index fa762f490fea59e2ec21cfb1c050c4adc30d9998..e4b85cab0d5e0a6d6214e7d57ab2c741439618b4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -827,7 +827,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -827,7 +827,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
@ -1023,10 +1023,10 @@ index 84899284703baeb04bfc79251941265d52ac07e8..5b8333e342c639f33acf62e5f8eb72d0
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||||
index 87c413c2f3b59ae9ef36e5becc10b29a81348022..a1f7daf932a26add3fb0881223205d6574185955 100644
|
index 05778023c3b2809c52c148efdfc8677dcc087a7b..92998b85df126725f376941c13dee3dfd407e96a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||||
@@ -14,8 +14,16 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
|
@@ -15,8 +15,16 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1044,10 +1044,10 @@ index 87c413c2f3b59ae9ef36e5becc10b29a81348022..a1f7daf932a26add3fb0881223205d65
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
||||||
index 2358e0c8a4a135d6deb47100c490a9c145f44827..00ba49ef13709d7216dcfab898356342e2f3b9d4 100644
|
index 2dd2149e8af5cb47027ab24159b48e1d67b45f19..d5ce8c22474c90300ed843bf3e5021f38a4d5751 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
||||||
@@ -60,8 +60,16 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
|
@@ -47,8 +47,16 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
|
||||||
update(); // SPIGOT-6579
|
update(); // SPIGOT-6579
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1107,10 +1107,10 @@ index 3c64461119391ec2e987fc936104e21ef0a95ce4..d702e34f65de28df677a9d3616f38b2c
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
||||||
index 5e0c2c5094e1578162d1a50d50701fbd25e6d961..307cb2b812cef199f36ee14cf7419d48ecc693c4 100644
|
index f4591dfe799538ba8aea104793ceb9995dad0bb6..f74f4932a177ce38dc6339d9b16fca02db481444 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
|
||||||
@@ -17,8 +17,16 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
|
@@ -16,8 +16,16 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1317,10 +1317,10 @@ index 79d2395b4a5efb042b80a315cc8e32d9c2521306..1ab70f244ed31eea22cc2614788072db
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
|
||||||
index c3ddc2e87425f571ec38013fd8ce91e923a3b4bd..c038772fe58bc54e0bb0d028e29c48b1626c6d2b 100644
|
index 2977939c0e66fbb3976e8526db82af2ecc6ffee9..1280dd6ecc53d681bbb311b6099817b517bc50db 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
|
||||||
@@ -11,8 +11,16 @@ public class CraftGuardian extends CraftMonster implements Guardian {
|
@@ -14,8 +14,16 @@ public class CraftGuardian extends CraftMonster implements Guardian {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1401,10 +1401,10 @@ index 1f474ef8f9e86da383206bd50ba00c7ed8352c5d..4dd82aef0d4e37336c076f74fe01cbd4
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
index c8cccfcf4d572a9e65fce09621aeed2a7045003c..1fe7d7eb632adfb050e11138b2e775f6d9c1a970 100644
|
index 1b008e5217c5bbf566a213abb92e1c7c43a3a7c2..139f4e7fb1e9fa9b21b0eddbffb05a35d54cf5cf 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
@@ -292,8 +292,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@@ -293,8 +293,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1611,7 +1611,7 @@ index e515e819774bfb31ec03f05a5502921e66f2b0e2..80cac5d7362577e53ef5ca215ab32618
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index aec588b41f19b2147a4e7267bafa417fbcf7abc0..bd115a08512e6f4c13bc30ce2b05c7378754754f 100644
|
index d43859f8aa7beed82dd3a146bb1086982cd0cda7..3bc0bda187d0702694ad9d98b07aa62f5c44df8b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -419,8 +419,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -419,8 +419,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
@ -1653,7 +1653,7 @@ index 4d7a2c4c1001aefe9fcd4be8dbcb414f721bfff9..bcb06f550033e346923026141dc96b03
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
|
||||||
index dd4c67f42217b5e746c4b0cf5c44116cacb321f6..69d67f0fea885aa1708c0c0e27482fefe5ad8f78 100644
|
index 9b92efb9bb6905032cee43299d0fdb226dd0e598..ce153695ce561664fa5e184bad0ca8895f0344f3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
|
||||||
@@ -11,8 +11,16 @@ public class CraftLlamaSpit extends AbstractProjectile implements LlamaSpit {
|
@@ -11,8 +11,16 @@ public class CraftLlamaSpit extends AbstractProjectile implements LlamaSpit {
|
||||||
@ -1822,14 +1822,13 @@ index 67fe56cc4c2af24f6bd883c6e14851019b0b9523..31665297fc24f6d2e86e206ef1ddf46d
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
|
||||||
index 5e3f0180accf633aa28ae87fe07464edfde50bff..1ad6c76dd5c45b2865dfe752891906a545e920b2 100644
|
index e5cad4d149af18104266a6ccff55787891d31f0b..dce230dc9dc44040e925e9ab5ab95529561ba464 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
|
||||||
@@ -20,8 +20,17 @@ public final class CraftMinecartTNT extends CraftMinecart implements ExplosiveMi
|
@@ -43,8 +43,16 @@ public final class CraftMinecartTNT extends CraftMinecart implements ExplosiveMi
|
||||||
return EntityType.MINECART_TNT;
|
this.getHandle().explode(power);
|
||||||
}
|
}
|
||||||
// Paper start
|
|
||||||
+
|
|
||||||
+ // Folia start - region threading
|
+ // Folia start - region threading
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public net.minecraft.world.entity.vehicle.MinecartTNT getHandleRaw() {
|
+ public net.minecraft.world.entity.vehicle.MinecartTNT getHandleRaw() {
|
||||||
@ -1838,13 +1837,13 @@ index 5e3f0180accf633aa28ae87fe07464edfde50bff..1ad6c76dd5c45b2865dfe752891906a5
|
|||||||
+ // Folia end - region threading
|
+ // Folia end - region threading
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
public net.minecraft.world.entity.vehicle.MinecartTNT getHandle() {
|
public MinecartTNT getHandle() {
|
||||||
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
||||||
return (net.minecraft.world.entity.vehicle.MinecartTNT) entity;
|
return (MinecartTNT) super.getHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||||
index 620d918e302a00d5a6640648e3096988d15535a0..0d65567fd7f862eb9d89a90b8bbd87c3ce57c793 100644
|
index 18b9b0dc70f6872a9d71c120bcd2edca531b0ac4..148d0393b093a326f76fc34c035768f4758f3f1b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||||
@@ -55,8 +55,16 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
@@ -55,8 +55,16 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||||
@ -2147,10 +2146,10 @@ index beea227855f0b978e655efc298024120df8f4945..e1b7922ed298b6b3068c3f5fbe3b4030
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 c6e6ce4a077550e8e86995f18a4deda4b7b369eb..545a7c3ba18c983681eb5489ff6c6da41ee18988 100644
|
index b0d9ab8088ee8b894fbee4c4b88bf081a419cb1f..a381e6a83762af08ed2005383d188313c12612ff 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
|
||||||
@@ -584,7 +584,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -593,7 +593,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void kick(net.kyori.adventure.text.Component message, org.bukkit.event.player.PlayerKickEvent.Cause cause) {
|
public void kick(net.kyori.adventure.text.Component message, org.bukkit.event.player.PlayerKickEvent.Cause cause) {
|
||||||
@ -2159,7 +2158,7 @@ index c6e6ce4a077550e8e86995f18a4deda4b7b369eb..545a7c3ba18c983681eb5489ff6c6da4
|
|||||||
final ServerGamePacketListenerImpl connection = this.getHandle().connection;
|
final ServerGamePacketListenerImpl connection = this.getHandle().connection;
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message, cause);
|
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message, cause);
|
||||||
@@ -1978,9 +1978,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2017,9 +2017,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2177,11 +2176,11 @@ index c6e6ce4a077550e8e86995f18a4deda4b7b369eb..545a7c3ba18c983681eb5489ff6c6da4
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setHandle(final ServerPlayer entity) {
|
public void setHandle(final ServerPlayer entity) {
|
||||||
@@ -3006,7 +3013,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -3028,7 +3035,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
{
|
{
|
||||||
if ( CraftPlayer.this.getHealth() <= 0 && CraftPlayer.this.isOnline() )
|
if ( CraftPlayer.this.getHealth() <= 0 && CraftPlayer.this.isOnline() )
|
||||||
{
|
{
|
||||||
- server.getServer().getPlayerList().respawn( CraftPlayer.this.getHandle(), false );
|
- server.getServer().getPlayerList().respawn( CraftPlayer.this.getHandle(), false, RespawnReason.PLUGIN );
|
||||||
+ CraftPlayer.this.getHandle().respawn(null); // Folia - region threading
|
+ CraftPlayer.this.getHandle().respawn(null); // Folia - region threading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2209,12 +2208,12 @@ index 30a0eac179c86b0fe94a2a40b5bfcd3eee01e53b..23364bbd534a147954d72986a96aee83
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
|
||||||
index 9a68f4ef68870d0baab5b6464d6c0a82a8fd105d..e651bc940b0c92d3c3f5194e8642d74274dce343 100644
|
index fd5beb956f643532e08613366ebd380d7999e79f..1521ad3c160062f22e6e17d2dacde5d8db5ccc00 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
|
||||||
@@ -25,8 +25,16 @@ public abstract class CraftProjectile extends AbstractProjectile implements Proj
|
@@ -12,8 +12,16 @@ public abstract class CraftProjectile extends AbstractProjectile implements Proj
|
||||||
this.getHandle().projectileSource = shooter;
|
|
||||||
}
|
// Paper - moved to AbstractProjectile
|
||||||
|
|
||||||
+ // Folia start - region threading
|
+ // Folia start - region threading
|
||||||
+ @Override
|
+ @Override
|
||||||
@ -2272,10 +2271,10 @@ index 3cb4860fea30bfaf2147b4f29a34336b6e417d6c..5d852e0a34004b877555157dd45020e5
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
|
||||||
index e24eec79402843105a13de2bb8554260908057cc..f1730c569e0810688f4f5b5aabed8978177d923c 100644
|
index ad10ba1dbaf81e767441aa8e1babed1d3e654121..55113e60883e2d74f46ffd2b7d273a517baa7584 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
|
||||||
@@ -15,8 +15,16 @@ public abstract class CraftRaider extends CraftMonster implements Raider {
|
@@ -14,8 +14,16 @@ public abstract class CraftRaider extends CraftMonster implements Raider {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2377,10 +2376,10 @@ index 8113650fda221538d14b53664db2d0cf81f13476..ccf7fd9be8baeda0b47b7abf090f2558
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
|
||||||
index ca8a9b2773d70a8800b2179b164ce33d7e2bdc5e..d869091a0c38a53004a7742a9b8e245b5c35b7b4 100644
|
index 43f52716c82863382cb0eb08cc0e174a19ffebdf..2435b081eb0587d155d8c4ffb8d67b7529965d85 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
|
||||||
@@ -84,8 +84,16 @@ public class CraftShulkerBullet extends AbstractProjectile implements ShulkerBul
|
@@ -71,8 +71,16 @@ public class CraftShulkerBullet extends AbstractProjectile implements ShulkerBul
|
||||||
return EntityType.SHULKER_BULLET;
|
return EntityType.SHULKER_BULLET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2524,10 +2523,10 @@ index d8b4df1300791aaf310465ec1577b1b8c202901a..17b83eb8563586f1ddf252f438d52d55
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
||||||
index 5fde54aa18cc3e474e5ea252efed91a7e1809929..a1dfa6c6368311e78b76c8c30227461ccb3eea9e 100644
|
index d9b40521e0597f4e2236a34c25cc4625552be66f..1517b557a62fe5f68217d343953ac0cb44531e01 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
||||||
@@ -16,8 +16,16 @@ public class CraftSniffer extends CraftAnimals implements Sniffer {
|
@@ -17,8 +17,16 @@ public class CraftSniffer extends CraftAnimals implements Sniffer {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2755,7 +2754,7 @@ index 428437970cac144be53cd0e30af7af0cd1ce603b..dc09e141ba2b12f1955bec521f2170d2
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
|
||||||
index 2d04443a9efd6e4b5eb1e360a727d8492323724b..47ba133c7a4100892e95d8c9c1a1773088c48e55 100644
|
index 99096c1e3f045e4a99335faedfb8e77e99690299..616848bf66273048dfde1f8802582fb871f8a5bb 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
|
||||||
@@ -14,8 +14,16 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
|
@@ -14,8 +14,16 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
|
||||||
@ -2945,10 +2944,10 @@ index a14d0a688b9054988b5c86c94738e4aaca9f9cfd..dd5b95c809e2bbdac17981af0010f554
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
||||||
index 634a5099fb6faea03615783f57e643ad0083fa30..84c3c5e0bc55e92f136e3ca3ac2aa8b973e1793d 100644
|
index bcfca66c7b99b9d514fe850d6cc6abd7e36ccaf7..90c295ff95bbee4f51fda1be2f58312d281925e5 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
||||||
@@ -13,8 +13,16 @@ public class CraftVex extends CraftMonster implements Vex {
|
@@ -14,8 +14,16 @@ public class CraftVex extends CraftMonster implements Vex {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2966,10 +2965,10 @@ index 634a5099fb6faea03615783f57e643ad0083fa30..84c3c5e0bc55e92f136e3ca3ac2aa8b9
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||||
index a1a8ac55e572156671e47317ba061855be79e5ac..7a542e8353ebc2167c8235cd0ae85807a65f54d2 100644
|
index 4e880409b06086568627f3e930159f1abb979984..db774dac486fd0a4b49a45c8248b594f877b141e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||||
@@ -30,8 +30,16 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
@@ -31,8 +31,16 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3113,7 +3112,7 @@ index 9039db1a72009342063d4db08e18e6aee18836e8..c2bceaeabf13d37506eea540cb153d10
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
||||||
index 4cf3a374c9ee7c7bcf82e778aa094eb4f8463595..e6d5b392ca9e13c2c61c2711892eaea806d525f4 100644
|
index 1a21d30620f13a48976da5ead7edab201ea68b21..6eb758bed0d0e5394adfee3294aec2bf53daf3ed 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
||||||
@@ -22,8 +22,16 @@ public class CraftWither extends CraftMonster implements Wither, com.destroystok
|
@@ -22,8 +22,16 @@ public class CraftWither extends CraftMonster implements Wither, com.destroystok
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Throw UnsupportedOperationException() for broken APIs
|
|||||||
|
|
||||||
|
|
||||||
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 788ac73125620ceaaec390a6498451b65d16d325..32c9b38036052649b7b5fb25d7c4a49fdd1ca972 100644
|
index 0fa6d701f4a16b3a74b55bdd660accb000f06565..fc3980d122eac0f1830375c113429135dc6d644c 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
|
||||||
@@ -1245,6 +1245,7 @@ public final class CraftServer implements Server {
|
@@ -1264,6 +1264,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public World createWorld(WorldCreator creator) {
|
public World createWorld(WorldCreator creator) {
|
||||||
@ -16,7 +16,7 @@ index 788ac73125620ceaaec390a6498451b65d16d325..32c9b38036052649b7b5fb25d7c4a49f
|
|||||||
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
|
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
|
||||||
//Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot create a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes.
|
//Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot create a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes.
|
||||||
Validate.notNull(creator, "Creator may not be null");
|
Validate.notNull(creator, "Creator may not be null");
|
||||||
@@ -1385,6 +1386,7 @@ public final class CraftServer implements Server {
|
@@ -1404,6 +1405,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean unloadWorld(World world, boolean save) {
|
public boolean unloadWorld(World world, boolean save) {
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Work around https://github.com/PaperMC/paperweight/issues/194
|
|||||||
|
|
||||||
|
|
||||||
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 870a4a6c2a1fa0a3ae438c5ae1360cf312de6277..4963e87adf11c9df90f0dd4b60d360a137c07bc9 100644
|
index e1e5573b31ca071eac727383b21a085aead4d3eb..cebfc29c50c631d0f2636f600b1839b2c5515ba1 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
|
||||||
@@ -494,7 +494,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -504,7 +504,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s), cause);
|
this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s), cause);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,18 +5,18 @@ Subject: [PATCH] Require plugins to be explicitly marked as Folia supported
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java
|
diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java
|
||||||
index 7605efe37ac4a63cb95c8c64c576e93c0e676cc0..bf4da696710026febea85ffcc559621d1ea33e45 100644
|
index 45bd29b70782e29eb11c36eaca0f940aee49799b..b930bd722caf6ecc6e2d584535cdd7a8924d9e08 100644
|
||||||
--- a/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java
|
--- a/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java
|
||||||
+++ b/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java
|
+++ b/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java
|
||||||
@@ -62,6 +62,7 @@ public class PaperPluginMeta implements PluginMeta {
|
@@ -60,6 +60,7 @@ public class PaperPluginMeta implements PluginMeta {
|
||||||
@Required
|
@Required
|
||||||
@PluginConfigConstraints.PluginVersion
|
@PluginConfigConstraints.PluginVersion
|
||||||
private String apiVersion;
|
private String apiVersion;
|
||||||
+ private boolean foliaSupported = false; // Folia
|
+ private boolean foliaSupported = false; // Folia
|
||||||
|
|
||||||
private transient String displayName;
|
private Map<PluginDependencyLifeCycle, Map<String, DependencyConfiguration>> dependencies = new EnumMap<>(PluginDependencyLifeCycle.class);
|
||||||
|
|
||||||
@@ -204,6 +205,13 @@ public class PaperPluginMeta implements PluginMeta {
|
@@ -228,6 +229,13 @@ public class PaperPluginMeta implements PluginMeta {
|
||||||
return this.apiVersion;
|
return this.apiVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
||||||
Date: Mon, 3 Apr 2023 21:14:19 -0700
|
|
||||||
Subject: [PATCH] Fix destroying beehive without any players nearby throwing an
|
|
||||||
exception
|
|
||||||
|
|
||||||
If the player moves out of range by the time the block is destroyed,
|
|
||||||
then the exception would throw and remove the player from the world
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
|
||||||
index 7867333757c300cd52110c2cf5d0a5bb19f9505d..f28d5fd2510424f2ed5232a4f16b2c4d55b8ecf3 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
|
||||||
@@ -98,6 +98,11 @@ public class BeehiveBlock extends BaseEntityBlock {
|
|
||||||
|
|
||||||
if (!list.isEmpty()) {
|
|
||||||
List<Player> list1 = world.getEntitiesOfClass(Player.class, (new AABB(pos)).inflate(8.0D, 6.0D, 8.0D));
|
|
||||||
+ // Folia start - if there are no players nearby, then nextInt() will throw
|
|
||||||
+ if (list1.isEmpty()) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ // Folia end - if there are no players nearby, then nextInt() will throw
|
|
||||||
int i = list1.size();
|
|
||||||
Iterator iterator = list.iterator();
|
|
||||||
|
|
@ -9,10 +9,10 @@ data deserialization and is racey even in Vanilla. But in Folia,
|
|||||||
some accesses may throw and as such we need to fix this directly.
|
some accesses may throw and as such we need to fix this directly.
|
||||||
|
|
||||||
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 7ed0787319341573416d1152e54a6b98fca86e92..ef9d900821c19588579839049879098403e2797a 100644
|
index c4970eefb48baf24cc51ba3cb27997984be872db..987ccd4ccdc50241e70aae681de7de2a7a6edc19 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
|
||||||
@@ -570,7 +570,7 @@ public class ServerPlayer extends Player {
|
@@ -572,7 +572,7 @@ public class ServerPlayer extends Player {
|
||||||
this.getBukkitEntity().readExtraData(nbt); // CraftBukkit
|
this.getBukkitEntity().readExtraData(nbt); // CraftBukkit
|
||||||
|
|
||||||
if (this.isSleeping()) {
|
if (this.isSleeping()) {
|
@ -1,40 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
||||||
Date: Mon, 1 May 2023 18:21:32 -0700
|
|
||||||
Subject: [PATCH] Break redstone on top of trap doors early
|
|
||||||
|
|
||||||
This logic hooks into the neighbour update which should be invoked
|
|
||||||
as a result of redstone powering the trap door.
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
||||||
index 89ae0fa000b5950f4c0d23b7e9f959989b9e9a84..4bddb91e289bbfbc75d532e63f935d585e41fc43 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
|
||||||
@@ -125,7 +125,26 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
|
|
||||||
flag1 = eventRedstone.getNewCurrent() > 0;
|
|
||||||
}
|
|
||||||
// CraftBukkit end
|
|
||||||
- if ((Boolean) state.getValue(TrapDoorBlock.OPEN) != flag1) {
|
|
||||||
+ boolean open = (Boolean) state.getValue(TrapDoorBlock.OPEN) != flag1; // Folia - break redstone on trapdoors early
|
|
||||||
+ // Folia start - break redstone on trapdoors early
|
|
||||||
+ // note: this must run before any state for this block/its neighborus are written to the world
|
|
||||||
+ // we allow the redstone event to fire so that plugins can block
|
|
||||||
+ if (flag1 && open) { // if we are now powered and it caused the trap door to open
|
|
||||||
+ // in this case, first check for the redstone on top first
|
|
||||||
+ BlockPos abovePos = pos.above();
|
|
||||||
+ BlockState above = world.getBlockState(abovePos);
|
|
||||||
+ if (above.getBlock() instanceof RedStoneWireBlock) {
|
|
||||||
+ world.setBlock(abovePos, Blocks.AIR.defaultBlockState(), Block.UPDATE_CLIENTS | Block.UPDATE_NEIGHBORS);
|
|
||||||
+ Block.popResource(world, abovePos, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.REDSTONE));
|
|
||||||
+ // now check that this didn't change our state
|
|
||||||
+ if (world.getBlockState(pos) != state) {
|
|
||||||
+ // our state was changed, so we cannot propagate this update
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ // Folia end - break redstone on trapdoors early
|
|
||||||
+ if (open) { // Folia - break redstone on trapdoors early
|
|
||||||
state = (BlockState) state.setValue(TrapDoorBlock.OPEN, flag1);
|
|
||||||
this.playSound((Player) null, world, pos, flag1);
|
|
||||||
}
|
|
@ -851,7 +851,7 @@ index 0000000000000000000000000000000000000000..64b5803d002b2968841a5ddee987f98b
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09f3403a04 100644
|
index db18f2947ef9d2863e3a029f0500343920cba1db..8580ddfeb9cab5ba3d7c5cea836bdb67e49bab50 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
@@ -76,10 +76,50 @@ public final class ChunkHolderManager {
|
@@ -76,10 +76,50 @@ public final class ChunkHolderManager {
|
||||||
@ -1039,7 +1039,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<ChunkHolder> getOldChunkHolders() {
|
public List<ChunkHolder> getOldChunkHolders() {
|
||||||
@@ -452,22 +415,65 @@ public final class ChunkHolderManager {
|
@@ -459,22 +422,65 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1116,7 +1116,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
// function for converting between ticket levels and propagator levels and vice versa
|
// function for converting between ticket levels and propagator levels and vice versa
|
||||||
// the problem is the ticket level propagator will propagate from a set source down to zero, whereas mojang expects
|
// the problem is the ticket level propagator will propagate from a set source down to zero, whereas mojang expects
|
||||||
// levels to propagate from a set value up to a maximum value. so we need to convert the levels we put into the propagator
|
// levels to propagate from a set value up to a maximum value. so we need to convert the levels we put into the propagator
|
||||||
@@ -482,46 +488,72 @@ public final class ChunkHolderManager {
|
@@ -489,46 +495,72 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTicketDebugString(final long coordinate) {
|
public String getTicketDebugString(final long coordinate) {
|
||||||
@ -1211,7 +1211,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
// Folia end - region threading
|
// Folia end - region threading
|
||||||
|
|
||||||
if (tickets == null) {
|
if (tickets == null) {
|
||||||
@@ -535,21 +567,19 @@ public final class ChunkHolderManager {
|
@@ -542,21 +574,19 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@ -1237,7 +1237,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -567,45 +597,66 @@ public final class ChunkHolderManager {
|
@@ -574,45 +604,66 @@ public final class ChunkHolderManager {
|
||||||
return this.addTicketAtLevel(type, CoordinateUtils.getChunkKey(chunkX, chunkZ), level, identifier);
|
return this.addTicketAtLevel(type, CoordinateUtils.getChunkKey(chunkX, chunkZ), level, identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1333,7 +1333,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
return SortedArraySet.create(4);
|
return SortedArraySet.create(4);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -614,30 +665,20 @@ public final class ChunkHolderManager {
|
@@ -621,30 +672,20 @@ public final class ChunkHolderManager {
|
||||||
final int levelAfter = getTicketLevelAt(ticketsAtChunk);
|
final int levelAfter = getTicketLevelAt(ticketsAtChunk);
|
||||||
|
|
||||||
if (current != ticket) {
|
if (current != ticket) {
|
||||||
@ -1375,7 +1375,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -646,13 +687,13 @@ public final class ChunkHolderManager {
|
@@ -653,13 +694,13 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
return current == ticket;
|
return current == ticket;
|
||||||
@ -1395,7 +1395,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,117 +706,104 @@ public final class ChunkHolderManager {
|
@@ -672,117 +713,104 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> boolean removeTicketAtLevel(final TicketType<T> type, final long chunk, final int level, final T identifier) {
|
public <T> boolean removeTicketAtLevel(final TicketType<T> type, final long chunk, final int level, final T identifier) {
|
||||||
@ -1560,7 +1560,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -784,58 +812,122 @@ public final class ChunkHolderManager {
|
@@ -791,58 +819,122 @@ public final class ChunkHolderManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1718,7 +1718,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.processTicketUpdates();
|
this.processTicketUpdates();
|
||||||
@@ -887,10 +979,11 @@ public final class ChunkHolderManager {
|
@@ -894,10 +986,11 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private NewChunkHolder getOrCreateChunkHolder(final long position) {
|
private NewChunkHolder getOrCreateChunkHolder(final long position) {
|
||||||
@ -1732,7 +1732,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
throw new IllegalStateException("Must hold scheduler lock!!");
|
throw new IllegalStateException("Must hold scheduler lock!!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,12 +996,14 @@ public final class ChunkHolderManager {
|
@@ -910,12 +1003,14 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
current = this.createChunkHolder(position);
|
current = this.createChunkHolder(position);
|
||||||
@ -1748,7 +1748,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
|
|
||||||
public ChunkEntitySlices getOrCreateEntityChunk(final int chunkX, final int chunkZ, final boolean transientChunk) {
|
public ChunkEntitySlices getOrCreateEntityChunk(final int chunkX, final int chunkZ, final boolean transientChunk) {
|
||||||
TickThread.ensureTickThread(this.world, chunkX, chunkZ, "Cannot create entity chunk off-main");
|
TickThread.ensureTickThread(this.world, chunkX, chunkZ, "Cannot create entity chunk off-main");
|
||||||
@@ -921,13 +1016,13 @@ public final class ChunkHolderManager {
|
@@ -928,13 +1023,13 @@ public final class ChunkHolderManager {
|
||||||
|
|
||||||
final AtomicBoolean isCompleted = new AtomicBoolean();
|
final AtomicBoolean isCompleted = new AtomicBoolean();
|
||||||
final Thread waiter = Thread.currentThread();
|
final Thread waiter = Thread.currentThread();
|
||||||
@ -1766,7 +1766,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
try {
|
try {
|
||||||
current = this.getOrCreateChunkHolder(chunkX, chunkZ);
|
current = this.getOrCreateChunkHolder(chunkX, chunkZ);
|
||||||
if ((ret = current.getEntityChunk()) != null && (transientChunk || !ret.isTransient())) {
|
if ((ret = current.getEntityChunk()) != null && (transientChunk || !ret.isTransient())) {
|
||||||
@@ -951,10 +1046,10 @@ public final class ChunkHolderManager {
|
@@ -958,10 +1053,10 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@ -1779,7 +1779,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (loadTask != null) {
|
if (loadTask != null) {
|
||||||
@@ -996,7 +1091,7 @@ public final class ChunkHolderManager {
|
@@ -1003,7 +1098,7 @@ public final class ChunkHolderManager {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1788,7 +1788,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
|
|
||||||
public PoiChunk loadPoiChunk(final int chunkX, final int chunkZ) {
|
public PoiChunk loadPoiChunk(final int chunkX, final int chunkZ) {
|
||||||
TickThread.ensureTickThread(this.world, chunkX, chunkZ, "Cannot create poi chunk off-main");
|
TickThread.ensureTickThread(this.world, chunkX, chunkZ, "Cannot create poi chunk off-main");
|
||||||
@@ -1013,13 +1108,13 @@ public final class ChunkHolderManager {
|
@@ -1020,13 +1115,13 @@ public final class ChunkHolderManager {
|
||||||
final AtomicReference<PoiChunk> completed = new AtomicReference<>();
|
final AtomicReference<PoiChunk> completed = new AtomicReference<>();
|
||||||
final AtomicBoolean isCompleted = new AtomicBoolean();
|
final AtomicBoolean isCompleted = new AtomicBoolean();
|
||||||
final Thread waiter = Thread.currentThread();
|
final Thread waiter = Thread.currentThread();
|
||||||
@ -1806,7 +1806,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
try {
|
try {
|
||||||
current = this.getOrCreateChunkHolder(chunkX, chunkZ);
|
current = this.getOrCreateChunkHolder(chunkX, chunkZ);
|
||||||
if (current.isPoiChunkLoaded()) {
|
if (current.isPoiChunkLoaded()) {
|
||||||
@@ -1038,10 +1133,10 @@ public final class ChunkHolderManager {
|
@@ -1045,10 +1140,10 @@ public final class ChunkHolderManager {
|
||||||
poiLoad.raisePriority(PrioritisedExecutor.Priority.BLOCKING);
|
poiLoad.raisePriority(PrioritisedExecutor.Priority.BLOCKING);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@ -1819,7 +1819,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (loadTask != null) {
|
if (loadTask != null) {
|
||||||
@@ -1122,7 +1217,9 @@ public final class ChunkHolderManager {
|
@@ -1129,7 +1224,9 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1830,7 +1830,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Note: Only called on chunk holders that the current ticking region owns
|
* Note: Only called on chunk holders that the current ticking region owns
|
||||||
@@ -1133,7 +1230,9 @@ public final class ChunkHolderManager {
|
@@ -1140,7 +1237,9 @@ public final class ChunkHolderManager {
|
||||||
// Folia - region threading
|
// Folia - region threading
|
||||||
ChunkSystem.onChunkHolderDelete(this.world, holder.vanillaChunkHolder);
|
ChunkSystem.onChunkHolderDelete(this.world, holder.vanillaChunkHolder);
|
||||||
this.getCurrentRegionData().autoSaveQueue.remove(holder); // Folia - region threading
|
this.getCurrentRegionData().autoSaveQueue.remove(holder); // Folia - region threading
|
||||||
@ -1840,7 +1840,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
|
|
||||||
// note: never call while inside the chunk system, this will absolutely break everything
|
// note: never call while inside the chunk system, this will absolutely break everything
|
||||||
@@ -1143,100 +1242,150 @@ public final class ChunkHolderManager {
|
@@ -1150,100 +1249,150 @@ public final class ChunkHolderManager {
|
||||||
if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) {
|
if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) {
|
||||||
throw new IllegalStateException("Cannot unload chunks recursively");
|
throw new IllegalStateException("Cannot unload chunks recursively");
|
||||||
}
|
}
|
||||||
@ -2063,7 +2063,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1298,88 +1447,71 @@ public final class ChunkHolderManager {
|
@@ -1305,88 +1454,71 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2198,7 +2198,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final ThreadLocal<Boolean> BLOCK_TICKET_UPDATES = ThreadLocal.withInitial(() -> {
|
private final ThreadLocal<Boolean> BLOCK_TICKET_UPDATES = ThreadLocal.withInitial(() -> {
|
||||||
@@ -1413,12 +1545,7 @@ public final class ChunkHolderManager {
|
@@ -1420,12 +1552,7 @@ public final class ChunkHolderManager {
|
||||||
if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) {
|
if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) {
|
||||||
throw new IllegalStateException("Cannot update ticket level while unloading chunks or updating entity manager");
|
throw new IllegalStateException("Cannot update ticket level while unloading chunks or updating entity manager");
|
||||||
}
|
}
|
||||||
@ -2212,7 +2212,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
|
|
||||||
List<NewChunkHolder> changedFullStatus = null;
|
List<NewChunkHolder> changedFullStatus = null;
|
||||||
|
|
||||||
@@ -1428,94 +1555,19 @@ public final class ChunkHolderManager {
|
@@ -1435,94 +1562,19 @@ public final class ChunkHolderManager {
|
||||||
final boolean canProcessFullUpdates = processFullUpdates & isTickThread;
|
final boolean canProcessFullUpdates = processFullUpdates & isTickThread;
|
||||||
final boolean canProcessScheduling = scheduledTasks == null;
|
final boolean canProcessScheduling = scheduledTasks == null;
|
||||||
|
|
||||||
@ -2317,7 +2317,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
|
|
||||||
if (changedFullStatus != null) {
|
if (changedFullStatus != null) {
|
||||||
this.addChangedStatuses(changedFullStatus);
|
this.addChangedStatuses(changedFullStatus);
|
||||||
@@ -1561,43 +1613,7 @@ public final class ChunkHolderManager {
|
@@ -1568,43 +1620,7 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public JsonObject getDebugJsonForWatchdog() {
|
public JsonObject getDebugJsonForWatchdog() {
|
||||||
@ -2362,7 +2362,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
|
|
||||||
private JsonObject getDebugJsonNoLock() {
|
private JsonObject getDebugJsonNoLock() {
|
||||||
@@ -1606,12 +1622,31 @@ public final class ChunkHolderManager {
|
@@ -1613,12 +1629,31 @@ public final class ChunkHolderManager {
|
||||||
|
|
||||||
final JsonArray unloadQueue = new JsonArray();
|
final JsonArray unloadQueue = new JsonArray();
|
||||||
ret.add("unload_queue", unloadQueue);
|
ret.add("unload_queue", unloadQueue);
|
||||||
@ -2399,7 +2399,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
}
|
}
|
||||||
|
|
||||||
final JsonArray holders = new JsonArray();
|
final JsonArray holders = new JsonArray();
|
||||||
@@ -1621,71 +1656,77 @@ public final class ChunkHolderManager {
|
@@ -1628,71 +1663,77 @@ public final class ChunkHolderManager {
|
||||||
holders.add(holder.getDebugJson());
|
holders.add(holder.getDebugJson());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2525,7 +2525,7 @@ index aa6dad3a41077b187ef0702cb27ca03f6d9596fb..eba309c8614eb099d55db9c9ebfe6b09
|
|||||||
});
|
});
|
||||||
// Folia end - region threading
|
// Folia end - region threading
|
||||||
|
|
||||||
@@ -1693,27 +1734,6 @@ public final class ChunkHolderManager {
|
@@ -1700,27 +1741,6 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public JsonObject getDebugJson() {
|
public JsonObject getDebugJson() {
|
@ -1,20 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Emily <emilia.lopezf.1999@gmail.com>
|
|
||||||
Date: Sun, 14 May 2023 11:33:01 -0700
|
|
||||||
Subject: [PATCH] Undo making JavaPlugin#logger field public
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperPluginClassLoader.java b/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperPluginClassLoader.java
|
|
||||||
index 79995ab1b624d7c7aaaa467a86255ad97385cf72..82487d656acaf41afe3af9c05a3dbf122bdf19c1 100644
|
|
||||||
--- a/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperPluginClassLoader.java
|
|
||||||
+++ b/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperPluginClassLoader.java
|
|
||||||
@@ -171,8 +171,7 @@ public class PaperPluginClassLoader extends PaperSimplePluginClassLoader impleme
|
|
||||||
|
|
||||||
File dataFolder = new File(Bukkit.getPluginsFolder(), pluginDescriptionFile.getName());
|
|
||||||
|
|
||||||
- plugin.init(Bukkit.getServer(), pluginDescriptionFile, dataFolder, this.source.toFile(), this, config);
|
|
||||||
- plugin.logger = this.logger;
|
|
||||||
+ plugin.init(Bukkit.getServer(), pluginDescriptionFile, dataFolder, this.source.toFile(), this, config, this.logger);
|
|
||||||
|
|
||||||
this.loadedJavaPlugin = plugin;
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
||||||
Date: Mon, 15 May 2023 00:20:59 -0700
|
|
||||||
Subject: [PATCH] Fix concurrenct access to lookups field in RegistryOps
|
|
||||||
|
|
||||||
The concurrent access occurs on the Netty IO threads when
|
|
||||||
serializing packets. Thus, it seems it was an oversight of
|
|
||||||
the implementator of this function as there are typically
|
|
||||||
more than one Netty IO thread.
|
|
||||||
|
|
||||||
Fixes https://github.com/PaperMC/Folia/issues/11
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/resources/RegistryOps.java b/src/main/java/net/minecraft/resources/RegistryOps.java
|
|
||||||
index 7709eeac907c4895a264cec0a3d453aa8b194c18..4495802efec958095bcfd41487b30c3c799d7b36 100644
|
|
||||||
--- a/src/main/java/net/minecraft/resources/RegistryOps.java
|
|
||||||
+++ b/src/main/java/net/minecraft/resources/RegistryOps.java
|
|
||||||
@@ -19,11 +19,11 @@ public class RegistryOps<T> extends DelegatingOps<T> {
|
|
||||||
|
|
||||||
private static RegistryOps.RegistryInfoLookup memoizeLookup(final RegistryOps.RegistryInfoLookup registryInfoGetter) {
|
|
||||||
return new RegistryOps.RegistryInfoLookup() {
|
|
||||||
- private final Map<ResourceKey<? extends Registry<?>>, Optional<? extends RegistryOps.RegistryInfo<?>>> lookups = new HashMap<>();
|
|
||||||
+ private final Map<ResourceKey<? extends Registry<?>>, Optional<? extends RegistryOps.RegistryInfo<?>>> lookups = new java.util.concurrent.ConcurrentHashMap<>(); // Folia - fix concurrent access to lookups field
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> Optional<RegistryOps.RegistryInfo<T>> lookup(ResourceKey<? extends Registry<? extends T>> registryRef) {
|
|
||||||
- return this.lookups.computeIfAbsent(registryRef, registryInfoGetter::lookup);
|
|
||||||
+ return (Optional<RegistryOps.RegistryInfo<T>>)this.lookups.computeIfAbsent(registryRef, registryInfoGetter::lookup); // Folia - fix concurrent access to lookups field
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
||||||
Date: Mon, 15 May 2023 20:25:26 -0700
|
|
||||||
Subject: [PATCH] Optimise recalcBlockCounts() for empty sections
|
|
||||||
|
|
||||||
In 1.18, every chunk section is initialised to a non-null value
|
|
||||||
and recalcBlockCounts() is invoked for each section.
|
|
||||||
However, in a standard world, most sections are empty. In such cases,
|
|
||||||
recalcBlockCounts() would iterate over ever position - even though
|
|
||||||
the block data would all be air. To avoid this, we skip
|
|
||||||
searching the section unless the palette indicates there _could_ be
|
|
||||||
a non-air block state or non-empty fluid state.
|
|
||||||
|
|
||||||
Chunk loading initially showed that recalcBlockCounts() over
|
|
||||||
sections with a ZeroBitStorage data to to take ~20% of the process,
|
|
||||||
now it takes <1%.
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
|
||||||
index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..cf2c053a0e82928c7a7cf99abe1bbd1eb7824507 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
|
||||||
@@ -244,6 +244,7 @@ public class LevelChunkSection {
|
|
||||||
this.nonEmptyBlockCount = 0;
|
|
||||||
this.tickingBlockCount = 0;
|
|
||||||
this.tickingFluidCount = 0;
|
|
||||||
+ if (this.maybeHas((BlockState state) -> !state.isAir() || !state.getFluidState().isEmpty())) { // Folia - do not run forEachLocation on clearly empty sections
|
|
||||||
this.states.forEachLocation((BlockState iblockdata, int i) -> {
|
|
||||||
FluidState fluid = iblockdata.getFluidState();
|
|
||||||
|
|
||||||
@@ -263,6 +264,7 @@ public class LevelChunkSection {
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
+ } // Folia - do not run forEachLocation on clearly empty sections
|
|
||||||
// Paper end
|
|
||||||
this.initBlockCollisionData(); // Paper
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user