mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-21 11:55:11 +01:00
Update to 1.19.4
Patches applied, but not yet checked compile.
This commit is contained in:
parent
e3a299c5ce
commit
c7fbdd87d2
@ -1,10 +1,10 @@
|
|||||||
import io.papermc.paperweight.patcher.tasks.SimpleRebuildGitPatches
|
import io.papermc.paperweight.tasks.RebuildGitPatches
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
|
id("com.github.johnrengelman.shadow") version "8.1.0" apply false
|
||||||
id("io.papermc.paperweight.patcher") version "1.4.0"
|
id("io.papermc.paperweight.patcher") version "1.5.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
||||||
@ -18,8 +18,8 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
|
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
|
||||||
decompiler("net.minecraftforge:forgeflower:2.0.605.1")
|
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
||||||
paperclip("io.papermc:paperclip:3.0.2")
|
paperclip("io.papermc:paperclip:3.0.3")
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
@ -113,6 +113,6 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.withType<SimpleRebuildGitPatches> {
|
tasks.withType<RebuildGitPatches> {
|
||||||
filterPatches.set(false)
|
filterPatches.set(false)
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
group=dev.folia
|
group=dev.folia
|
||||||
version=1.19.3-R0.1-SNAPSHOT
|
|
||||||
|
|
||||||
mcVersion=1.19.3
|
version=1.19.4-R0.1-SNAPSHOT
|
||||||
paperRef=4da844f1e3e375a24a0e518b0787ae909fa0e247
|
mcVersion=1.19.4
|
||||||
|
paperRef=e8b82590d0c3dd57ac1728b236117d2fcd531c4f
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
4
gradlew
vendored
4
gradlew
vendored
@ -144,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
@ -152,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
|
@ -509,10 +509,10 @@ index 2204336d8800311b65e894739ab1b27273e7c6f2..ea4d93680066295de9fd447eda58b930
|
|||||||
+ // 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 cdbc7329cf5f67d66e31eb31e83b9e7997040f72..90451ed12b2c95bb372ac2e3cbb57b8b83cc6a82 100644
|
index 365350d38b2eee00d22bad09ab95c6054f11d536..86a86ad5555c5f9f6ed1938615f1cae9149b2805 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
|
||||||
@@ -970,4 +970,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
@@ -953,4 +953,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
|
||||||
@ -527,10 +527,10 @@ index cdbc7329cf5f67d66e31eb31e83b9e7997040f72..90451ed12b2c95bb372ac2e3cbb57b8b
|
|||||||
+ // 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 b012ce40d82389c29d1b841ff685425ac10a7f9e..057fa5dc78734520224af5031250b6be101ce3cb 100644
|
index 2b8308989fce7f8a16907f8711b362e671fdbfb6..800f954161886ca4f6332f8e0cbc4d4e8f9cbb74 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
|
||||||
@@ -585,9 +585,9 @@ public final class SimplePluginManager implements PluginManager {
|
@@ -544,9 +544,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -14,45 +14,60 @@ more helpful than some random error log caused by
|
|||||||
a breakage.
|
a breakage.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||||
index 0c9f4d1e9104fa6951114c1f9ec954dfcc749196..fc11577083672f127335613459436167d339efa4 100644
|
index 028805bcdb1d2bb0d11387db165b7376579e5f60..51bc04571f75a4ccf05c3d080531a29fe35817d1 100644
|
||||||
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||||
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||||
@@ -254,6 +254,17 @@ public final class PluginDescriptionFile {
|
@@ -255,6 +255,20 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
|
||||||
private Set<PluginAwareness> awareness = ImmutableSet.of();
|
private Set<PluginAwareness> awareness = ImmutableSet.of();
|
||||||
private String apiVersion = null;
|
private String apiVersion = null;
|
||||||
private List<String> libraries = ImmutableList.of();
|
private List<String> libraries = ImmutableList.of();
|
||||||
|
+
|
||||||
+ // Folia start - block plugins not marked as supported
|
+ // Folia start - block plugins not marked as supported
|
||||||
+ private boolean foliaSupported;
|
+ private String foliaSupported;
|
||||||
|
+ private static final String FOLIA_SUPPORTED_KEY = "folia-supported";
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Returns whether the plugin has been marked to be compatible with regionised threading as provided
|
+ * Returns whether the plugin has been marked to be compatible with regionised threading as provided
|
||||||
+ * by Folia
|
+ * by Folia
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isFoliaSupported() {
|
+ public boolean isFoliaSupported() {
|
||||||
+ return foliaSupported;
|
+ return this.foliaSupported != null && this.foliaSupported.equalsIgnoreCase("true");
|
||||||
+ }
|
+ }
|
||||||
+ // Folia end - block plugins not marked as supported
|
+ // Folia end - block plugins not marked as supported
|
||||||
|
+
|
||||||
public PluginDescriptionFile(@NotNull final InputStream stream) throws InvalidDescriptionException {
|
// Paper start - oh my goddddd
|
||||||
loadMap(asMap(YAML.get().load(stream)));
|
/**
|
||||||
@@ -1173,6 +1184,11 @@ public final class PluginDescriptionFile {
|
* Don't use this.
|
||||||
|
@@ -1238,6 +1252,11 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
|
||||||
if (map.get("prefix") != null) {
|
if (map.get("prefix") != null) {
|
||||||
prefix = map.get("prefix").toString();
|
prefix = map.get("prefix").toString();
|
||||||
}
|
}
|
||||||
+ // Folia start - block plugins not marked as supported
|
+ // Folia start - block plugins not marked as supported
|
||||||
+ if (map.get("folia-supported") != null) {
|
+ if (map.get(FOLIA_SUPPORTED_KEY) != null) {
|
||||||
+ foliaSupported = map.get("folia-supported").toString().equalsIgnoreCase("true");
|
+ foliaSupported = map.get(FOLIA_SUPPORTED_KEY).toString();
|
||||||
+ }
|
+ }
|
||||||
+ // Folia end - block plugins not marked as supported
|
+ // Folia end - block plugins not marked as supported
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@@ -1314,6 +1333,11 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
|
||||||
|
if (prefix != null) {
|
||||||
|
map.put("prefix", prefix);
|
||||||
|
}
|
||||||
|
+ // Folia start - block plugins not marked as supported
|
||||||
|
+ if (foliaSupported != null) {
|
||||||
|
+ map.put(FOLIA_SUPPORTED_KEY, foliaSupported);
|
||||||
|
+ }
|
||||||
|
+ // Folia end - block plugins not marked as supported
|
||||||
|
|
||||||
|
return map;
|
||||||
|
}
|
||||||
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 057fa5dc78734520224af5031250b6be101ce3cb..ec838d1c7850f0d07980b051dff7c88db0aa6dbf 100644
|
index 800f954161886ca4f6332f8e0cbc4d4e8f9cbb74..e0026c938aa369d6d9797852324437456d3c4ed9 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
|
||||||
@@ -163,6 +163,12 @@ public final class SimplePluginManager implements PluginManager {
|
@@ -173,6 +173,12 @@ public final class SimplePluginManager implements PluginManager {
|
||||||
server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "': uses the space-character (0x20) in its name"); // Paper
|
server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "': uses the space-character (0x20) in its name");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
+ // Folia start - block plugins not marked as supported
|
+ // Folia start - block plugins not marked as supported
|
||||||
@ -62,5 +77,5 @@ index 057fa5dc78734520224af5031250b6be101ce3cb..ec838d1c7850f0d07980b051dff7c88d
|
|||||||
+ }
|
+ }
|
||||||
+ // Folia end - block plugins not marked as supported
|
+ // Folia end - block plugins not marked as supported
|
||||||
} catch (InvalidDescriptionException ex) {
|
} catch (InvalidDescriptionException ex) {
|
||||||
server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
|
server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'", ex);
|
||||||
continue;
|
continue;
|
||||||
|
@ -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 781609605d25283009e5f3e61649ecde9ea9a4cb..b0542179837067492334ceccc20286db2bd8727a 100644
|
index 9cf389defdaeb887e9cad4f0fed3f3b95667b238..dd53b1ffaff8dbaea0cf21c489a90162a496a026 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 {
|
||||||
@ -23,7 +23,7 @@ index 781609605d25283009e5f3e61649ecde9ea9a4cb..b0542179837067492334ceccc20286db
|
|||||||
// Paper start
|
// Paper start
|
||||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||||
@@ -61,7 +65,7 @@ tasks.jar {
|
@@ -62,7 +66,7 @@ tasks.jar {
|
||||||
attributes(
|
attributes(
|
||||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||||
"Implementation-Title" to "CraftBukkit",
|
"Implementation-Title" to "CraftBukkit",
|
||||||
@ -32,7 +32,7 @@ index 781609605d25283009e5f3e61649ecde9ea9a4cb..b0542179837067492334ceccc20286db
|
|||||||
"Implementation-Vendor" to date, // Paper
|
"Implementation-Vendor" to date, // Paper
|
||||||
"Specification-Title" to "Bukkit",
|
"Specification-Title" to "Bukkit",
|
||||||
"Specification-Version" to project.version,
|
"Specification-Version" to project.version,
|
||||||
@@ -133,7 +137,7 @@ fun TaskContainer.registerRunTask(
|
@@ -134,7 +138,7 @@ fun TaskContainer.registerRunTask(
|
||||||
name: String,
|
name: String,
|
||||||
block: JavaExec.() -> Unit
|
block: JavaExec.() -> Unit
|
||||||
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
||||||
@ -57,10 +57,10 @@ index bf42969859545a8a520923ef1836ffa4a5cc24a0..719b0e318a85d4a1fb8f616deeb31193
|
|||||||
|
|
||||||
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 710ca7d3a5659953f64bc6dccdd93b43300961cc..2ee4e5e8d17a3a1e6a342c74b13135df030ffef6 100644
|
index 4450d825a5474da211f0e83f845d8c7129fa08aa..8ccc92836bfda8e00eea649430174dcd5664af70 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1654,7 +1654,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1681,7 +1681,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
@ -70,10 +70,10 @@ index 710ca7d3a5659953f64bc6dccdd93b43300961cc..2ee4e5e8d17a3a1e6a342c74b13135df
|
|||||||
|
|
||||||
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 bfc4ee36befb925ab4eb6b96f5c1aa6c76bf711f..2ea3778ee1348e5d06b15a2c5dc5d9bd4136dbe3 100644
|
index f9a9d2bb7b6d1bf4a0931438de4d8c7ee0757479..e0b6c737f9de2b6e692d6813d8dea4c35f038573 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
|
||||||
@@ -261,7 +261,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -256,7 +256,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 {
|
||||||
|
@ -1663,10 +1663,10 @@ index cea9c098ade00ee87b8efc8164ab72f5279758f0..197224e31175252d8438a8df585bbb65
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
index d1a59c2af0557a816c094983ec60097fb4de060c..6898c704e60d89d53c8ed114e5e12f73ed63605a 100644
|
index 6efb8b10f17c70b05128039376d254e6beda3841..c856a9a0d085b278da416c59996fc131811f790c 100644
|
||||||
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
@@ -602,8 +602,8 @@ public final class MCUtil {
|
@@ -607,8 +607,8 @@ public final class MCUtil {
|
||||||
|
|
||||||
worldData.addProperty("is-loaded", loadedWorlds.contains(bukkitWorld));
|
worldData.addProperty("is-loaded", loadedWorlds.contains(bukkitWorld));
|
||||||
worldData.addProperty("name", world.getWorld().getName());
|
worldData.addProperty("name", world.getWorld().getName());
|
||||||
@ -1678,7 +1678,7 @@ index d1a59c2af0557a816c094983ec60097fb4de060c..6898c704e60d89d53c8ed114e5e12f73
|
|||||||
worldData.addProperty("keep-spawn-loaded-range", world.paperConfig().spawn.keepSpawnLoadedRange * 16);
|
worldData.addProperty("keep-spawn-loaded-range", world.paperConfig().spawn.keepSpawnLoadedRange * 16);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index bc46479fd0622a90fd98ac88f92b2840a22a2d04..0b9cb85c063f913ad9245bafb8587d2f06c0ac6e 100644
|
index 904fcdeb7937d36208cc9a8d5eca9ef3a5b2cd9e..6fce2a9bce051e21eba8f331007a9752607f69f2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -128,6 +128,26 @@ public class ChunkHolder {
|
@@ -128,6 +128,26 @@ public class ChunkHolder {
|
||||||
@ -1777,10 +1777,10 @@ index bc46479fd0622a90fd98ac88f92b2840a22a2d04..0b9cb85c063f913ad9245bafb8587d2f
|
|||||||
|
|
||||||
// Paper - rewrite chunk system
|
// Paper - rewrite chunk system
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 2212f9f48636357265d8e44aba415ea4f09f1fe7..870f4d6fae8c14502b4653f246a2df9e345ccca3 100644
|
index fbe209a66c77c47935ad026dd3e45e682af91fd8..2d133ae656f7420d6ceec14bc591721cff815479 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -196,7 +196,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -199,7 +199,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
// Paper end - use distance map to optimise tracker
|
// Paper end - use distance map to optimise tracker
|
||||||
|
|
||||||
void addPlayerToDistanceMaps(ServerPlayer player) {
|
void addPlayerToDistanceMaps(ServerPlayer player) {
|
||||||
@ -1789,7 +1789,7 @@ index 2212f9f48636357265d8e44aba415ea4f09f1fe7..870f4d6fae8c14502b4653f246a2df9e
|
|||||||
int chunkX = MCUtil.getChunkCoordinate(player.getX());
|
int chunkX = MCUtil.getChunkCoordinate(player.getX());
|
||||||
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
||||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||||
@@ -218,7 +218,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -221,7 +221,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
||||||
@ -1798,7 +1798,7 @@ index 2212f9f48636357265d8e44aba415ea4f09f1fe7..870f4d6fae8c14502b4653f246a2df9e
|
|||||||
|
|
||||||
// Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
// Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
this.playerMobSpawnMap.remove(player);
|
this.playerMobSpawnMap.remove(player);
|
||||||
@@ -241,7 +241,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -244,7 +244,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
int chunkX = MCUtil.getChunkCoordinate(player.getX());
|
int chunkX = MCUtil.getChunkCoordinate(player.getX());
|
||||||
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
||||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||||
@ -1807,7 +1807,7 @@ index 2212f9f48636357265d8e44aba415ea4f09f1fe7..870f4d6fae8c14502b4653f246a2df9e
|
|||||||
this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
if (this.playerMobDistanceMap != null) {
|
if (this.playerMobDistanceMap != null) {
|
||||||
@@ -813,7 +813,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -816,7 +816,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
|
|
||||||
// Paper start - replace player loader system
|
// Paper start - replace player loader system
|
||||||
public void setTickViewDistance(int distance) {
|
public void setTickViewDistance(int distance) {
|
||||||
@ -1820,7 +1820,7 @@ index 2212f9f48636357265d8e44aba415ea4f09f1fe7..870f4d6fae8c14502b4653f246a2df9e
|
|||||||
}
|
}
|
||||||
// Paper end - replace player loader system
|
// Paper end - replace player loader system
|
||||||
public void setViewDistance(int watchDistance) {
|
public void setViewDistance(int watchDistance) {
|
||||||
@@ -823,20 +827,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -826,20 +830,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
int k = this.viewDistance;
|
int k = this.viewDistance;
|
||||||
|
|
||||||
this.viewDistance = j;
|
this.viewDistance = j;
|
||||||
@ -1845,7 +1845,7 @@ index 2212f9f48636357265d8e44aba415ea4f09f1fe7..870f4d6fae8c14502b4653f246a2df9e
|
|||||||
this.playerLoadedChunk(player, packet, chunk);
|
this.playerLoadedChunk(player, packet, chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -845,6 +851,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -848,6 +854,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!newWithinViewDistance && oldWithinViewDistance) {
|
if (!newWithinViewDistance && oldWithinViewDistance) {
|
||||||
@ -1857,7 +1857,7 @@ index 2212f9f48636357265d8e44aba415ea4f09f1fe7..870f4d6fae8c14502b4653f246a2df9e
|
|||||||
player.untrackChunk(pos);
|
player.untrackChunk(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1148,34 +1159,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1151,34 +1162,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
// Paper - replaced by PlayerChunkLoader
|
// Paper - replaced by PlayerChunkLoader
|
||||||
|
|
||||||
this.updateMaps(player); // Paper - distance maps
|
this.updateMaps(player); // Paper - distance maps
|
||||||
@ -1897,7 +1897,7 @@ index 2212f9f48636357265d8e44aba415ea4f09f1fe7..870f4d6fae8c14502b4653f246a2df9e
|
|||||||
// Paper end - per player view distance
|
// Paper end - per player view distance
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1599,7 +1594,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1612,7 +1607,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
double vec3d_dx = player.getX() - this.entity.getX();
|
double vec3d_dx = player.getX() - this.entity.getX();
|
||||||
double vec3d_dz = player.getZ() - this.entity.getZ();
|
double vec3d_dz = player.getZ() - this.entity.getZ();
|
||||||
// Paper end - remove allocation of Vec3D here
|
// Paper end - remove allocation of Vec3D here
|
||||||
@ -1954,10 +1954,10 @@ index ca84eddbdb1e198b899750e5f6b3eafd25ce970f..736f37979c882e41e7571202df38eb6a
|
|||||||
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 54c2b7fba83d6f06dba95b1bb5b487a02048d6e6..714637cdd9dcdbffa344b19e77944fb3c7541ff7 100644
|
index 5a5ff40df37db9cbd53c584ed26a3ce4888b29c0..e57cf6a74a129ea0919a4ad5e84b615cd5aa141e 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
|
||||||
@@ -523,6 +523,48 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -521,6 +521,48 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
// Paper end - optimise get nearest players for entity AI
|
// Paper end - optimise get nearest players for entity AI
|
||||||
|
|
||||||
@ -2005,12 +2005,12 @@ index 54c2b7fba83d6f06dba95b1bb5b487a02048d6e6..714637cdd9dcdbffa344b19e77944fb3
|
|||||||
+
|
+
|
||||||
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||||
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) {
|
||||||
// Holder holder = worlddimension.type(); // 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 7d6d3c8556033d289fdadc489e73fba478fce41a..869daafbc236b3ff63f878e5fe28427fde75afe5 100644
|
index ca5291a9573a62cb5c19539cf5c7aceff11f9829..8a80b222456c2e4818cada3a9248ab2f9b76a983 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
|
||||||
@@ -269,6 +269,48 @@ public class ServerPlayer extends Player {
|
@@ -275,6 +275,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
|
||||||
|
|
||||||
@ -2060,10 +2060,10 @@ index 7d6d3c8556033d289fdadc489e73fba478fce41a..869daafbc236b3ff63f878e5fe28427f
|
|||||||
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 4b754f6eae683248d7fe11d6d6cb168d5dd696a2..3c9d08c37a44a60bc70387d8d0dbd0a39ea98a26 100644
|
index c0c14766adaac855112f85a203a6163b8adfdded..0dbe182fbae5ce5ba182176eb5d5e3f1897e77f2 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
|
||||||
@@ -270,7 +270,7 @@ public abstract class PlayerList {
|
@@ -271,7 +271,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
|
||||||
@ -2072,7 +2072,7 @@ index 4b754f6eae683248d7fe11d6d6cb168d5dd696a2..3c9d08c37a44a60bc70387d8d0dbd0a3
|
|||||||
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())));
|
||||||
@@ -898,8 +898,8 @@ public abstract class PlayerList {
|
@@ -905,8 +905,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()));
|
||||||
@ -2084,10 +2084,10 @@ index 4b754f6eae683248d7fe11d6d6cb168d5dd696a2..3c9d08c37a44a60bc70387d8d0dbd0a3
|
|||||||
entityplayer1.unsetRemoved();
|
entityplayer1.unsetRemoved();
|
||||||
entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot()));
|
entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), 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 3cbf801b2e5420c0e870f73788deb550e49ad54d..60003ff929f7ac6b34f9230c53ccbd54dc9e176b 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
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -627,7 +627,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -635,7 +635,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i);
|
this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i);
|
||||||
// Paper start - per player view distance - allow block updates for non-ticking chunks in player view distance
|
// Paper start - per player view distance - allow block updates for non-ticking chunks in player view distance
|
||||||
// if copied from above
|
// if copied from above
|
||||||
@ -2097,7 +2097,7 @@ index 3cbf801b2e5420c0e870f73788deb550e49ad54d..60003ff929f7ac6b34f9230c53ccbd54
|
|||||||
// 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 28e4b302284f955a73e75d0f4276d55fb51826f5..e776eb8afef978938da084f9ae29d611181b43fe 100644
|
index 206dc04086a218b510930739a6c573f2653ab0fa..9599af33c683ec47e28b1c8e4dc965d30d9081a7 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 {
|
@@ -184,43 +184,6 @@ public class LevelChunk extends ChunkAccess {
|
||||||
@ -2152,7 +2152,7 @@ index 28e4b302284f955a73e75d0f4276d55fb51826f5..e776eb8afef978938da084f9ae29d611
|
|||||||
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
|
||||||
@@ -1074,6 +1036,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -1086,6 +1048,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);
|
||||||
@ -2160,7 +2160,7 @@ index 28e4b302284f955a73e75d0f4276d55fb51826f5..e776eb8afef978938da084f9ae29d611
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1093,7 +1056,6 @@ public class LevelChunk extends ChunkAccess {
|
@@ -1105,7 +1068,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;
|
||||||
@ -2169,10 +2169,10 @@ index 28e4b302284f955a73e75d0f4276d55fb51826f5..e776eb8afef978938da084f9ae29d611
|
|||||||
// 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 4cb0307935aa63d44aac55c80ee50be074d7913c..d33476ffa49d7f6388bb227f8a57cf115a74698f 100644
|
index 5e9055fdf411029ea2fed91acd6b981f79156418..ff6559bf563f2fdcc0f2843d4f4aa24d7ddfb6db 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
|
||||||
@@ -2257,12 +2257,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -2273,12 +2273,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
// Spigot start
|
// Spigot start
|
||||||
@Override
|
@Override
|
||||||
public int getViewDistance() {
|
public int getViewDistance() {
|
||||||
@ -2187,7 +2187,7 @@ index 4cb0307935aa63d44aac55c80ee50be074d7913c..d33476ffa49d7f6388bb227f8a57cf11
|
|||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
// Paper start - view distance api
|
// Paper start - view distance api
|
||||||
@@ -2296,12 +2296,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -2312,12 +2312,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSendViewDistance() {
|
public int getSendViewDistance() {
|
||||||
@ -2203,10 +2203,10 @@ index 4cb0307935aa63d44aac55c80ee50be074d7913c..d33476ffa49d7f6388bb227f8a57cf11
|
|||||||
// 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 7c43de6ad6bd7259c6bcb2a55e312e8abfcf546b..0351eb67bac6ce257f820af60aa3bba9f45da687 100644
|
index 1bada55af5d16437da4d16f9ded55f88a6121eb4..100f057f98b2f15972afe32fade22a7a320cf300 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
|
||||||
@@ -188,44 +188,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -189,44 +189,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() {
|
||||||
@ -2255,7 +2255,7 @@ index 7c43de6ad6bd7259c6bcb2a55e312e8abfcf546b..0351eb67bac6ce257f820af60aa3bba9
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -240,23 +218,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -241,23 +219,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSendViewDistance() {
|
public int getSendViewDistance() {
|
||||||
|
@ -70,7 +70,7 @@ index fb42d776f15f735fb59e972e00e2b512c23a8387..300700477ee34bc22b31315825c0e40f
|
|||||||
chunk = wrappedFull.getWrapped();
|
chunk = wrappedFull.getWrapped();
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java
|
||||||
index 3df793f7e6bb67f40e7387a72fdafb912a7b1373..31657c387156f789d5c04ad3413d049bc32f1359 100644
|
index be6f3f6a57668a9bd50d0ea5f2dd2335355b69d6..d52f68d0302d581b9bbe30fe0680fb8108e3da85 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java
|
||||||
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
|
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
|
||||||
@ -330,7 +330,7 @@ index 8950b220b9a3512cd4667beb7bdec0e82e07edc6..9be85eb0abec02bc0e0eded71c34ab1c
|
|||||||
|
|
||||||
public void checkConsistencyWithBlocks(ChunkPos chunkPos, LevelChunkSection chunkSection) {
|
public void checkConsistencyWithBlocks(ChunkPos chunkPos, LevelChunkSection chunkSection) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
index d4c4d37bcef14e392739d9aae9e20b7d69b05c12..256642f2e2aa66f7e8c00cae91a75060a8817c9c 100644
|
index 0ec80b83a99bfdb1f985045d98a81905a8a5a3ac..9d6f4749ed72fe319754ccea28f20fa97286527d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||||
@@ -122,13 +122,11 @@ public class ChunkSerializer {
|
@@ -122,13 +122,11 @@ public class ChunkSerializer {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ Subject: [PATCH] Max pending logins
|
|||||||
Should help the floodgates on launch
|
Should help the floodgates on launch
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 626d99c785d2886bce605ba468ee24ce1710beb2..7b529beed6c68c5bf81eca1c53b5afe916430724 100644
|
index 48223b78dd7ea2f065a259ad071f101398f40cfd..30fae97d5fed9de036cc4131a09d404468c69dd4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -85,7 +85,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -85,7 +85,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
@ -19,10 +19,10 @@ index 626d99c785d2886bce605ba468ee24ce1710beb2..7b529beed6c68c5bf81eca1c53b5afe9
|
|||||||
} // 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 f60feb0b9101afa24363c438949e1d60ccab0272..5d205856037032ceb9ea753ff12c3aac01583c2d 100644
|
index e49e9cc31a9e05422fd1f48616c5a452011d66e1..132e1e055a8898beb4683dbec821b1f6e4dbf1a2 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
|
||||||
@@ -176,6 +176,17 @@ public abstract class PlayerList {
|
@@ -177,6 +177,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 58d39268a2608901a14696d36f3c59d8d6ac06e7..021177d19384ef898667b8a374cd3838f6bd311c 100644
|
index 0f958731923c7ac7093b47c11ceb1eda7c79e0de..8343830ffc6f9847cba0217ae2c13377fcf90490 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
|
||||||
@@ -2756,6 +2756,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2767,6 +2767,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 58d39268a2608901a14696d36f3c59d8d6ac06e7..021177d19384ef898667b8a374cd3838
|
|||||||
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) {
|
||||||
@@ -2783,6 +2784,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2794,6 +2795,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ index 58d39268a2608901a14696d36f3c59d8d6ac06e7..021177d19384ef898667b8a374cd3838
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
if (this.passengers.isEmpty()) {
|
if (this.passengers.isEmpty()) {
|
||||||
this.passengers = ImmutableList.of(entity);
|
this.passengers = ImmutableList.of(entity);
|
||||||
@@ -2810,6 +2812,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2822,6 +2824,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 58d39268a2608901a14696d36f3c59d8d6ac06e7..021177d19384ef898667b8a374cd3838
|
|||||||
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) {
|
||||||
@@ -2837,6 +2840,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2849,6 +2852,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ index 58d39268a2608901a14696d36f3c59d8d6ac06e7..021177d19384ef898667b8a374cd3838
|
|||||||
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 34dd05b737ee02200c5973ad21a600b2e2434d07..306cc8fe9a90091dadac6a9f2d984342ff798218 100644
|
index 5fa6b219b90bcf3f583eb64cf5eecf09bc56a406..45afdd01af2fdc819beab648227fdd500dc33c62 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
|
||||||
@@ -378,7 +378,7 @@ public final class CraftServer implements Server {
|
@@ -374,7 +374,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 34dd05b737ee02200c5973ad21a600b2e2434d07..306cc8fe9a90091dadac6a9f2d984342
|
|||||||
// Folia end - region threading API
|
// Folia end - region threading API
|
||||||
|
|
||||||
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 825fdc6162797ade8e76e1ca3a863ed5fb48f936..f812ad4a4d6c640c3f3f2d5766ee2b5882583cc5 100644
|
index 1c8d63e462f3ed3d5286659ae0d1ec04d8b55177..116341b777f898a8080cc348499159c0f01b7329 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 @@
|
||||||
@ -110,16 +110,22 @@ index 825fdc6162797ade8e76e1ca3a863ed5fb48f936..f812ad4a4d6c640c3f3f2d5766ee2b58
|
|||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
|
|
||||||
@@ -42,8 +43,15 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti
|
@@ -42,6 +43,13 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti
|
||||||
this.getHandle().hasBeenShot = beenShot;
|
this.getHandle().hasBeenShot = beenShot;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Folia start - region threading
|
+ // Folia start - region threading
|
||||||
|
+ @Override
|
||||||
+ public net.minecraft.world.entity.projectile.Projectile getHandleRaw() {
|
+ public net.minecraft.world.entity.projectile.Projectile getHandleRaw() {
|
||||||
+ return (net.minecraft.world.entity.projectile.Projectile)this.entity;
|
+ return (net.minecraft.world.entity.projectile.Projectile)this.entity;
|
||||||
+ }
|
+ }
|
||||||
+ // Folia end - region threading
|
+ // Folia end - region threading
|
||||||
+
|
+
|
||||||
|
@Override
|
||||||
|
public boolean canHitEntity(org.bukkit.entity.Entity entity) {
|
||||||
|
return this.getHandle().canHitEntity(((CraftEntity) entity).getHandle());
|
||||||
|
@@ -59,6 +67,7 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public net.minecraft.world.entity.projectile.Projectile getHandle() {
|
public net.minecraft.world.entity.projectile.Projectile 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
|
||||||
@ -212,7 +218,7 @@ 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 6dfb0b47bd77fa4584744b3a54267879521b540a..d1054b93f652138a581a12a8eced66864e9c1003 100644
|
index a0fed289f1f6b6addd60ccbd1344ad2c1202c78b..e7bd0ab46da08facea06ae86e8d21b288fe2e117 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
|
@@ -16,8 +16,16 @@ public class CraftAllay extends CraftCreature implements org.bukkit.entity.Allay
|
||||||
@ -296,7 +302,7 @@ index fec308cbc8fb27036301fe27a1169ac7368f9732..9ef569fad87838171198ff444538a401
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||||
index f80cafe3544c7e6c3c29073ba6539783adf6666c..39d3a848e139da0b6e536089b99c63967667b125 100644
|
index 17d08d2c90047ebfc4098b087be091b83111a40f..f678c151938ddd3e5277a05d6d8884c12b114336 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||||
@@ -26,8 +26,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
@@ -26,8 +26,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
||||||
@ -421,8 +427,29 @@ index 84cd915955188492696e5948fbb1c4eca0cca039..7dfbf7f7a94eae0c62d6830d459c3478
|
|||||||
return (net.minecraft.world.entity.monster.Blaze) entity;
|
return (net.minecraft.world.entity.monster.Blaze) entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockDisplay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockDisplay.java
|
||||||
|
index 2592a838b1b1fe4db98b95327dfd4f9774a0390b..29ac4ef7d2ed35e10df539b055db087f741fe4b6 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockDisplay.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockDisplay.java
|
||||||
|
@@ -13,8 +13,16 @@ public class CraftBlockDisplay extends CraftDisplay implements BlockDisplay {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Folia start - region threading
|
||||||
|
+ @Override
|
||||||
|
+ public net.minecraft.world.entity.Display.BlockDisplay getHandleRaw() {
|
||||||
|
+ return (net.minecraft.world.entity.Display.BlockDisplay)this.entity;
|
||||||
|
+ }
|
||||||
|
+ // Folia end - region threading
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public net.minecraft.world.entity.Display.BlockDisplay getHandle() {
|
||||||
|
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
||||||
|
return (net.minecraft.world.entity.Display.BlockDisplay) super.getHandle();
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
|
||||||
index e5b16e930e12557a9a9052866cf0f431e3a5310d..4084b43ce21bab35088b9e5d5f466c7e7f3b40a4 100644
|
index dd7076938b04d4b36e3360a883bae81ced455fda..6671a86496394a786034cab7defa8126b55e8d5e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
|
||||||
@@ -92,8 +92,16 @@ public class CraftBoat extends CraftVehicle implements Boat {
|
@@ -92,8 +92,16 @@ public class CraftBoat extends CraftVehicle implements Boat {
|
||||||
@ -443,10 +470,10 @@ index e5b16e930e12557a9a9052866cf0f431e3a5310d..4084b43ce21bab35088b9e5d5f466c7e
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
|
||||||
index f49789ba5e04441bc1d5fda343bd08627d398a8e..a1ccfd214240f6747fad168cf18346dd6d890551 100644
|
index 509232424f6596d0ac43ba0d59b24e2bbdcbed0f..17dc189187e343db0e91f642a2edc782c6419ab9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
|
||||||
@@ -11,8 +11,16 @@ public class CraftCamel extends CraftAbstractHorse implements Camel {
|
@@ -12,8 +12,16 @@ public class CraftCamel extends CraftAbstractHorse implements Camel {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -673,6 +700,27 @@ index 63a8188010f045d5c17a1ecb63e8081ec86c2960..24c6c26f0930940f88bdd0353d660ff3
|
|||||||
return (net.minecraft.world.entity.monster.Creeper) entity;
|
return (net.minecraft.world.entity.monster.Creeper) entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
--- a/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 {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Folia start - region threading
|
||||||
|
+ @Override
|
||||||
|
+ public net.minecraft.world.entity.Display getHandleRaw() {
|
||||||
|
+ return (net.minecraft.world.entity.Display)this.entity;
|
||||||
|
+ }
|
||||||
|
+ // Folia end - region threading
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public net.minecraft.world.entity.Display getHandle() {
|
||||||
|
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
||||||
|
return (net.minecraft.world.entity.Display) super.getHandle();
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
|
||||||
index c1db88ceb65eb81c542171fc5465224ef613ce3b..108e0bbe345075a92e133c58df0d1009fc06009d 100644
|
index c1db88ceb65eb81c542171fc5465224ef613ce3b..108e0bbe345075a92e133c58df0d1009fc06009d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
|
||||||
@ -758,7 +806,7 @@ index 2dbc6bf56f3462028dd3c9cbc4a939c53e573c76..1c5a2168c150d6d819e238db3d7986f2
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
||||||
index 4326dae90e70d0f2029c43b878d19c3a1ba90d8a..5af88d11290434457c3b376e3f6f33a46fcd949d 100644
|
index 92bcc01b3b28062aa966a7aaca199d7a3be832f4..10b827cb126d937548cc29a1b052d5acfa244f67 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
|
||||||
@@ -31,8 +31,16 @@ public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnem
|
@@ -31,8 +31,16 @@ public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnem
|
||||||
@ -821,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 13c1188639e00cd96e00b179c4e353582bf66e64..4cc5fd45e194568fd7a4215a2a7f895e3f9dce13 100644
|
index 86a5b59c2987a4faa5d29eebd978b4fb0b6cd424..26ba9f73504fc652f76b5a19baf19e3d42c4d0ac 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 {
|
||||||
@ -884,10 +932,10 @@ 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 91a11cfa430c63455e2d54125d6e1bd407f822ac..0ea759602a541480b4535569358d98353a7ad4dd 100644
|
index 3f46d9398add0e97a2b8b072f66b48b0e056d023..59986e24adea4cecc4eb82a84eeab5755e689bf6 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
|
||||||
@@ -813,7 +813,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -827,7 +827,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UUID getUniqueId() {
|
public UUID getUniqueId() {
|
||||||
@ -896,7 +944,7 @@ index 91a11cfa430c63455e2d54125d6e1bd407f822ac..0ea759602a541480b4535569358d9835
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -829,7 +829,14 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -843,7 +843,14 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
this.getHandle().tickCount = value;
|
this.getHandle().tickCount = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1353,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 ed22e6f17f48db71cc283afc8b71d85682cd7d3a..53fd705f6351980d93881f1e9f504a589126d52a 100644
|
index c8cccfcf4d572a9e65fce09621aeed2a7045003c..1fe7d7eb632adfb050e11138b2e775f6d9c1a970 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
|
||||||
@@ -285,8 +285,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@@ -292,8 +292,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1415,6 +1463,27 @@ index bbf7189a0fc9921e7a6007494f91229d9fba0846..3ab7929aa11584ec0f86ff8ad441f2b9
|
|||||||
return (net.minecraft.world.entity.monster.Illusioner) super.getHandle();
|
return (net.minecraft.world.entity.monster.Illusioner) super.getHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftInteraction.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftInteraction.java
|
||||||
|
index cb7183b5d72e505762cfaf5c8694406a5ef2dd3b..7b7074a9418bbcd87c18217ea78efdbc7d01528a 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftInteraction.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftInteraction.java
|
||||||
|
@@ -13,8 +13,16 @@ public class CraftInteraction extends CraftEntity implements Interaction {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Folia start - region threading
|
||||||
|
+ @Override
|
||||||
|
+ public net.minecraft.world.entity.Interaction getHandleRaw() {
|
||||||
|
+ return (net.minecraft.world.entity.Interaction)this.entity;
|
||||||
|
+ }
|
||||||
|
+ // Folia end - region threading
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public net.minecraft.world.entity.Interaction getHandle() {
|
||||||
|
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
||||||
|
return (net.minecraft.world.entity.Interaction) super.getHandle();
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java
|
||||||
index 2966d4d466f44751b2f02afda2273a708c12b251..8c3818e8024ee25c29929368750dc346261db5d6 100644
|
index 2966d4d466f44751b2f02afda2273a708c12b251..8c3818e8024ee25c29929368750dc346261db5d6 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java
|
||||||
@ -1436,6 +1505,27 @@ index 2966d4d466f44751b2f02afda2273a708c12b251..8c3818e8024ee25c29929368750dc346
|
|||||||
return (net.minecraft.world.entity.animal.IronGolem) entity;
|
return (net.minecraft.world.entity.animal.IronGolem) entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDisplay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDisplay.java
|
||||||
|
index 9b7b98e21e757ab2caca68de20d0191d0011bc9d..06e2580653db00110b0f0a05cfda9d0e9baecdfa 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDisplay.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDisplay.java
|
||||||
|
@@ -14,8 +14,16 @@ public class CraftItemDisplay extends CraftDisplay implements ItemDisplay {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Folia start - region threading
|
||||||
|
+ @Override
|
||||||
|
+ public net.minecraft.world.entity.Display.ItemDisplay getHandleRaw() {
|
||||||
|
+ return (net.minecraft.world.entity.Display.ItemDisplay)this.entity;
|
||||||
|
+ }
|
||||||
|
+ // Folia end - region threading
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public net.minecraft.world.entity.Display.ItemDisplay getHandle() {
|
||||||
|
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
||||||
|
return (net.minecraft.world.entity.Display.ItemDisplay) super.getHandle();
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
|
||||||
index 2a297adc49129729751317817d959c2d2566fc3e..7352909a3f2b2f1dc0f96e452869014fa328fc1c 100644
|
index 2a297adc49129729751317817d959c2d2566fc3e..7352909a3f2b2f1dc0f96e452869014fa328fc1c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
|
||||||
@ -1521,10 +1611,10 @@ 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 09da9d3c85e36c2a78663f58a97963dbc795a367..0557872b7fe0c17cd8f706f156c704a93cd0dd22 100644
|
index aec588b41f19b2147a4e7267bafa417fbcf7abc0..bd115a08512e6f4c13bc30ce2b05c7378754754f 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
|
||||||
@@ -413,8 +413,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -419,8 +419,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
this.getHandle().invulnerableTime = ticks;
|
this.getHandle().invulnerableTime = ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1710,7 +1800,7 @@ index b8378d5f3c2a08ab565dcb8cb200822b581c7dba..e7c303a0f8b4e2ca26cf28b4661b7bdf
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
|
||||||
index 569763b3c9e92a4071884f139fb1263201f80e43..41cddff04ee6ce47c429e8ddddd08087a0e81a94 100644
|
index 67fe56cc4c2af24f6bd883c6e14851019b0b9523..31665297fc24f6d2e86e206ef1ddf46ded51782f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
|
||||||
@@ -40,8 +40,17 @@ public final class CraftMinecartHopper extends CraftMinecartContainer implements
|
@@ -40,8 +40,17 @@ public final class CraftMinecartHopper extends CraftMinecartContainer implements
|
||||||
@ -1732,7 +1822,7 @@ index 569763b3c9e92a4071884f139fb1263201f80e43..41cddff04ee6ce47c429e8ddddd08087
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 dfd0b5e018194343ca40629db6f70c6020c2d567..6097ccf0abbcaffe178cde18b05048a99511d253 100644
|
index 5e3f0180accf633aa28ae87fe07464edfde50bff..1ad6c76dd5c45b2865dfe752891906a545e920b2 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
|
@@ -20,8 +20,17 @@ public final class CraftMinecartTNT extends CraftMinecart implements ExplosiveMi
|
||||||
@ -1805,10 +1895,10 @@ index 11b23670cd80a643f266c59542a380b42b17dfbd..d3b655ab5adacd60f04f912187662c57
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
||||||
index 20eaa3424428b8b30fd15591b660983cb7fc4375..495b3e8b1fa0f3da98e2e2d978329edd1742bdbe 100644
|
index 4a6aae106de5eeeb80c078c5a167ef0484b13929..f3016d316c1dcee3f5d7c7221668280c7bd9a76e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
||||||
@@ -11,8 +11,16 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow {
|
@@ -11,8 +11,16 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow, io.paperm
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1931,7 +2021,7 @@ index 9a3734c670972ee91a0d44a1b1fa8493de854a9c..e1ae90699fdc13f6f2bb9ebf227b3803
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
|
||||||
index 377099c83a47837749589429657a82a9f92a2aa0..f0d128164f9acc32b4401c54618987566e90def8 100644
|
index 61613f38b39dfd4512e2d9caadaa3bb6b37d4e55..f94b45ba171fcbae718b50ab2ff60d38248e622c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
|
||||||
@@ -56,8 +56,16 @@ public class CraftPig extends CraftAnimals implements Pig {
|
@@ -56,8 +56,16 @@ public class CraftPig extends CraftAnimals implements Pig {
|
||||||
@ -2057,10 +2147,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 7b29843302d7aba8e64a2533a4b2203e9f30ecca..2c1406a956a2154f04cd12a72cbb96925efc3290 100644
|
index 9ee05436a26c73f99bb5e0eae43831d7bd385975..559e1fa14dcb046dcc00422db4e3c3a818b6c348 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
|
||||||
@@ -583,7 +583,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -584,7 +584,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) {
|
||||||
@ -2069,7 +2159,7 @@ index 7b29843302d7aba8e64a2533a4b2203e9f30ecca..2c1406a956a2154f04cd12a72cbb9692
|
|||||||
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);
|
||||||
@@ -1843,9 +1843,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1963,9 +1963,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2087,7 +2177,7 @@ index 7b29843302d7aba8e64a2533a4b2203e9f30ecca..2c1406a956a2154f04cd12a72cbb9692
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setHandle(final ServerPlayer entity) {
|
public void setHandle(final ServerPlayer entity) {
|
||||||
@@ -2871,7 +2878,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2991,7 +2998,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
{
|
{
|
||||||
if ( CraftPlayer.this.getHealth() <= 0 && CraftPlayer.this.isOnline() )
|
if ( CraftPlayer.this.getHealth() <= 0 && CraftPlayer.this.isOnline() )
|
||||||
{
|
{
|
||||||
@ -2245,10 +2335,10 @@ index c888415f9b4f19db69667525e37279ab8be794f6..3951fa2f21932dc1b4948fab08998afa
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
|
||||||
index ca8e35fbf04a54d60c3612f74be0b5fbf2ab7a56..cc97cab69405882bf03efacaba2a244b73dcf792 100644
|
index 81ccb4bde315c42409a0c04883f5cb4551398308..e3c6a74d267ea0a10be375fc83428415ad575fc2 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
|
||||||
@@ -30,8 +30,16 @@ public class CraftSheep extends CraftAnimals implements Sheep {
|
@@ -30,8 +30,16 @@ public class CraftSheep extends CraftAnimals implements Sheep, io.papermc.paper.
|
||||||
this.getHandle().setSheared(flag);
|
this.getHandle().setSheared(flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2433,6 +2523,27 @@ index d8b4df1300791aaf310465ec1577b1b8c202901a..17b83eb8563586f1ddf252f438d52d55
|
|||||||
return (net.minecraft.world.entity.projectile.SmallFireball) entity;
|
return (net.minecraft.world.entity.projectile.SmallFireball) entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
||||||
|
index 92d1c7943c7ddb5d29b657f8da74e29dfe051c2b..5dc45789f92a49ce461db06b322d14e897d2f951 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
|
||||||
|
@@ -10,8 +10,16 @@ public class CraftSniffer extends CraftAnimals implements Sniffer {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Folia start - region threading
|
||||||
|
+ @Override
|
||||||
|
+ public net.minecraft.world.entity.animal.sniffer.Sniffer getHandleRaw() {
|
||||||
|
+ return (net.minecraft.world.entity.animal.sniffer.Sniffer)this.entity;
|
||||||
|
+ }
|
||||||
|
+ // Folia end - region threading
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public net.minecraft.world.entity.animal.sniffer.Sniffer getHandle() {
|
||||||
|
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
||||||
|
return (net.minecraft.world.entity.animal.sniffer.Sniffer) super.getHandle();
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
|
||||||
index b747aa0fb5821988ea851273559182997abf9931..117cdf4b1315f2de32aa13844f0f4c46f21cc96d 100644
|
index b747aa0fb5821988ea851273559182997abf9931..117cdf4b1315f2de32aa13844f0f4c46f21cc96d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
|
||||||
@ -2455,7 +2566,7 @@ index b747aa0fb5821988ea851273559182997abf9931..117cdf4b1315f2de32aa13844f0f4c46
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
||||||
index 659e2959c5330e4764ea1edc7f8de9f464f9ff52..e336ee895fced776f5857005eefc336c231f0a83 100644
|
index 42b7058d93fab8cbee49dba130734e1df9910096..00907c925fdb0d709ff421cdc8a1742282ad372f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
||||||
@@ -20,8 +20,16 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok
|
@@ -20,8 +20,16 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok
|
||||||
@ -2560,7 +2671,7 @@ index 3c0faedaac8cb8d70c0c0767361ebc563a3f0581..10875cdf36b426de512c52ae60ac7e2c
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
|
||||||
index 61bdfa1d50b228c27b7c719938a09e7715d303c3..aa851b01d3cfe456eef9fc6a8d2527ab61ef7d01 100644
|
index af5344b0edd1f8126d36a79d7497ca52112ce6d1..89cd22b73c38773961d6955d429564e816b8183a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
|
||||||
@@ -66,8 +66,16 @@ public class CraftStrider extends CraftAnimals implements Strider {
|
@@ -66,8 +66,16 @@ public class CraftStrider extends CraftAnimals implements Strider {
|
||||||
@ -2643,6 +2754,27 @@ index 428437970cac144be53cd0e30af7af0cd1ce603b..dc09e141ba2b12f1955bec521f2170d2
|
|||||||
return (TamableAnimal) super.getHandle();
|
return (TamableAnimal) super.getHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
--- a/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 {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Folia start - region threading
|
||||||
|
+ @Override
|
||||||
|
+ public net.minecraft.world.entity.Display.TextDisplay getHandleRaw() {
|
||||||
|
+ return (net.minecraft.world.entity.Display.TextDisplay)this.entity;
|
||||||
|
+ }
|
||||||
|
+ // Folia end - region threading
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public net.minecraft.world.entity.Display.TextDisplay getHandle() {
|
||||||
|
+ io.papermc.paper.util.TickThread.ensureTickThread(this.entity, "Accessing entity state off owning region's thread"); // Folia - region threading
|
||||||
|
return (net.minecraft.world.entity.Display.TextDisplay) super.getHandle();
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java
|
||||||
index 989c5c499a52ad0777abecd14a1a9d5803ce1aaf..8e66e9ac17a8a06130d6b039f27868d42554f337 100644
|
index 989c5c499a52ad0777abecd14a1a9d5803ce1aaf..8e66e9ac17a8a06130d6b039f27868d42554f337 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java
|
||||||
@ -2918,7 +3050,7 @@ index ecf0c4a7d1ce2b254d91b3276fa24c149329737a..fadc797d3c298c6ad4b2e6abc70b59e5
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
|
||||||
index 963928fc8e29b8abc2026c0b0183ebb07f0de4d1..7ac95b6290a86177ca2a649e0d38ffc13f6ec5ab 100644
|
index 6ecdc4bf1f6b8f0363e667135ba463433be5c0fb..a4ede0f5973d18ed6b8ae3ee425c4445f39e86c4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
|
||||||
@@ -16,8 +16,16 @@ public class CraftWarden extends CraftMonster implements org.bukkit.entity.Warde
|
@@ -16,8 +16,16 @@ public class CraftWarden extends CraftMonster implements org.bukkit.entity.Warde
|
||||||
|
@ -10,10 +10,10 @@ the impact from scaling the region threads, but is not a fix
|
|||||||
to the underlying issue.
|
to the underlying issue.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index fb2f7cde13ef96334a42448798a4902e8c1e06a3..d43202f7de86e8d0c74abc0b7ff23baa69da7c87 100644
|
index 58eee2965ce3e92b0f90eb7e908c6eee40052670..81767d54db0109b78c7da2161d544537c6237d27 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -2873,6 +2873,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2906,6 +2906,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void executeMidTickTasks() {
|
public final void executeMidTickTasks() {
|
||||||
|
@ -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 306cc8fe9a90091dadac6a9f2d984342ff798218..e149cec9deb1bd34c5a687ffed7f698c7f980875 100644
|
index 45afdd01af2fdc819beab648227fdd500dc33c62..5558650ddae454ba2eecd66b6ee68247a7b981f9 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
|
||||||
@@ -1266,6 +1266,7 @@ public final class CraftServer implements Server {
|
@@ -1244,6 +1244,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public World createWorld(WorldCreator creator) {
|
public World createWorld(WorldCreator creator) {
|
||||||
@ -16,7 +16,7 @@ index 306cc8fe9a90091dadac6a9f2d984342ff798218..e149cec9deb1bd34c5a687ffed7f698c
|
|||||||
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");
|
||||||
@@ -1406,6 +1407,7 @@ public final class CraftServer implements Server {
|
@@ -1384,6 +1385,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean unloadWorld(World world, boolean save) {
|
public boolean unloadWorld(World world, boolean save) {
|
||||||
|
Loading…
Reference in New Issue
Block a user