Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-14 18:40:10 +01:00
Initial 1.18 update
Dieser Commit ist enthalten in:
Ursprung
30cb7d0407
Commit
c2e2281f29
@ -56,7 +56,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
paramMappings("net.fabricmc:yarn:1.18.1+build.22:mergedv2")
|
||||
paramMappings("net.fabricmc:yarn:1.18.2+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.1:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:1.5.498.22")
|
||||
paperclip("io.papermc:paperclip:3.0.2")
|
||||
|
@ -1,7 +1,7 @@
|
||||
group=io.papermc.paper
|
||||
version=1.18.1-R0.1-SNAPSHOT
|
||||
version=1.18.2-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.18.1
|
||||
mcVersion=1.18.2
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
@ -27,7 +27,7 @@ index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f21
|
||||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca625273a14
|
||||
index 0000000000000000000000000000000000000000..bf1f5a8151ac0a4b25370142fef37145033140ef
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,66 @@
|
||||
@ -45,7 +45,7 @@ index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca6
|
||||
+ // api dependencies are listed transitively to API consumers
|
||||
+ api("commons-lang:commons-lang:2.6")
|
||||
+ api("com.google.guava:guava:31.0.1-jre")
|
||||
+ api("com.google.code.gson:gson:2.8.8")
|
||||
+ api("com.google.code.gson:gson:2.8.9")
|
||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||
+ api("org.yaml:snakeyaml:1.30")
|
||||
+
|
||||
@ -99,7 +99,7 @@ index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca6
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 2bd4a47e18c0fb798d52d204a4315a889b0e64b4..0000000000000000000000000000000000000000
|
||||
index 7a34ef5514a30bcb61e657970bf087bdf9c2db90..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,263 +0,0 @@
|
||||
@ -110,7 +110,7 @@ index 2bd4a47e18c0fb798d52d204a4315a889b0e64b4..00000000000000000000000000000000
|
||||
-
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
- <version>1.18.1-R0.1-SNAPSHOT</version>
|
||||
- <version>1.18.2-R0.1-SNAPSHOT</version>
|
||||
- <packaging>jar</packaging>
|
||||
-
|
||||
- <name>Spigot-API</name>
|
||||
@ -153,7 +153,7 @@ index 2bd4a47e18c0fb798d52d204a4315a889b0e64b4..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>com.google.code.gson</groupId>
|
||||
- <artifactId>gson</artifactId>
|
||||
- <version>2.8.8</version>
|
||||
- <version>2.8.9</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
|
@ -5,11 +5,11 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index c76bfbcfbe034700bdbd9396643cfca625273a14..1f680baffba17265e8ce38b3516624bffd034075 100644
|
||||
index bf1f5a8151ac0a4b25370142fef37145033140ef..709f9c3a562729970813f47b531bfc51ba192f55 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -15,15 +15,27 @@ dependencies {
|
||||
api("com.google.code.gson:gson:2.8.8")
|
||||
api("com.google.code.gson:gson:2.8.9")
|
||||
api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||
api("org.yaml:snakeyaml:1.30")
|
||||
+ // Paper start
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Added Vanilla Entity Tags
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
|
||||
index 34d23f53acf00620223731c4fdacffde9cff41a8..ddd195a834d1756c903644fc1faffe7ebcb238ed 100644
|
||||
index 42d0f31c2be2d39c4481f98c0756c4f1ae337717..20f033b9eda656cf0bdc91c3cf046f90a4be87fd 100644
|
||||
--- a/src/main/java/org/bukkit/Tag.java
|
||||
+++ b/src/main/java/org/bukkit/Tag.java
|
||||
@@ -698,6 +698,44 @@ public interface Tag<T extends Keyed> extends Keyed {
|
||||
@@ -702,6 +702,44 @@ public interface Tag<T extends Keyed> extends Keyed {
|
||||
* Vanilla tag representing entities extra susceptible to freezing.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_FREEZE_HURTS_EXTRA_TYPES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("freeze_hurts_extra_types"), EntityType.class);
|
||||
|
@ -34,27 +34,3 @@ index 6242336de18fdd708cc3d7b745cbbace13140bc0..661d424c609a01ad9bee837b4069d9e4
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/StructureType.java b/src/main/java/org/bukkit/StructureType.java
|
||||
index 8acb2b9de398ab5f4b18c46e9ab9eb964df8be3f..5558daa9512212a4b05f174b64c4c998ebbccfcc 100644
|
||||
--- a/src/main/java/org/bukkit/StructureType.java
|
||||
+++ b/src/main/java/org/bukkit/StructureType.java
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* The registration of new {@link StructureType}s is case-sensitive.
|
||||
*/
|
||||
// Order is retrieved from WorldGenFactory
|
||||
-public final class StructureType {
|
||||
+public final class StructureType implements Keyed { // Paper - implement keyed
|
||||
|
||||
private static final Map<String, StructureType> structureTypeMap = new HashMap<>();
|
||||
|
||||
@@ -244,4 +244,10 @@ public final class StructureType {
|
||||
public static Map<String, StructureType> getStructureTypes() {
|
||||
return ImmutableMap.copyOf(structureTypeMap);
|
||||
}
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public @NotNull NamespacedKey getKey() {
|
||||
+ return NamespacedKey.minecraft(this.name);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add GameEvent tags
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
|
||||
index ddd195a834d1756c903644fc1faffe7ebcb238ed..43ab88bb3721ed499549a9d328be352d6f639871 100644
|
||||
index 20f033b9eda656cf0bdc91c3cf046f90a4be87fd..fbe2da7aa0d135a35eab3a81599d5df1b709b8ac 100644
|
||||
--- a/src/main/java/org/bukkit/Tag.java
|
||||
+++ b/src/main/java/org/bukkit/Tag.java
|
||||
@@ -735,6 +735,18 @@ public interface Tag<T extends Keyed> extends Keyed {
|
||||
@@ -739,6 +739,18 @@ public interface Tag<T extends Keyed> extends Keyed {
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
Tag<EntityType> SKELETONS = ENTITY_TYPES_SKELETONS;
|
||||
|
@ -28,7 +28,7 @@ index 67fb370cad6924895a6b27052dbd5c1767e3f0c9..bb338269c9e3bef4c274157c490d8b8f
|
||||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ce1c653cac81f0d681547a68704a41bbb700f148
|
||||
index 0000000000000000000000000000000000000000..be24f2f1c72ffcb033fe99bd9197af2c0bed4e69
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,141 @@
|
||||
@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..ce1c653cac81f0d681547a68704a41bb
|
||||
+dependencies {
|
||||
+ implementation(project(":paper-api"))
|
||||
+ implementation("jline:jline:2.12.1")
|
||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.14.1") {
|
||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.17.0") {
|
||||
+ exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
+ }
|
||||
+ implementation("org.ow2.asm:asm:9.2")
|
||||
@ -175,17 +175,17 @@ index 0000000000000000000000000000000000000000..ce1c653cac81f0d681547a68704a41bb
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 5d1e2c51c814281bf50c352f7fa9f99465100068..0000000000000000000000000000000000000000
|
||||
index ac2dbe041d8a286ed7a34bf20c88464693f32a25..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,540 +0,0 @@
|
||||
@@ -1,546 +0,0 @@
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
- <modelVersion>4.0.0</modelVersion>
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot</artifactId>
|
||||
- <packaging>jar</packaging>
|
||||
- <version>1.18.1-R0.1-SNAPSHOT</version>
|
||||
- <version>1.18.2-R0.1-SNAPSHOT</version>
|
||||
- <name>Spigot</name>
|
||||
- <url>https://www.spigotmc.org/</url>
|
||||
-
|
||||
@ -201,7 +201,7 @@ index 5d1e2c51c814281bf50c352f7fa9f99465100068..00000000000000000000000000000000
|
||||
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
- <api.version>unknown</api.version>
|
||||
- <bt.name>git</bt.name>
|
||||
- <minecraft_version>1_18_R1</minecraft_version>
|
||||
- <minecraft_version>1_18_R2</minecraft_version>
|
||||
- <maven.compiler.source>16</maven.compiler.source>
|
||||
- <maven.compiler.target>16</maven.compiler.target>
|
||||
- </properties>
|
||||
@ -236,7 +236,7 @@ index 5d1e2c51c814281bf50c352f7fa9f99465100068..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.apache.logging.log4j</groupId>
|
||||
- <artifactId>log4j-iostreams</artifactId>
|
||||
- <version>2.14.1</version>
|
||||
- <version>2.17.0</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
@ -249,13 +249,13 @@ index 5d1e2c51c814281bf50c352f7fa9f99465100068..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>com.github.oshi</groupId>
|
||||
- <artifactId>oshi-core</artifactId>
|
||||
- <version>5.8.2</version>
|
||||
- <version>5.8.5</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>com.mojang</groupId>
|
||||
- <artifactId>authlib</artifactId>
|
||||
- <version>3.2.38</version>
|
||||
- <version>3.3.39</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
@ -267,7 +267,7 @@ index 5d1e2c51c814281bf50c352f7fa9f99465100068..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>com.mojang</groupId>
|
||||
- <artifactId>datafixerupper</artifactId>
|
||||
- <version>4.0.26</version>
|
||||
- <version>4.1.27</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
@ -277,6 +277,12 @@ index 5d1e2c51c814281bf50c352f7fa9f99465100068..00000000000000000000000000000000
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>com.mojang</groupId>
|
||||
- <artifactId>logging</artifactId>
|
||||
- <version>1.0.0</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>commons-io</groupId>
|
||||
- <artifactId>commons-io</artifactId>
|
||||
- <version>2.11.0</version>
|
||||
@ -309,13 +315,13 @@ index 5d1e2c51c814281bf50c352f7fa9f99465100068..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.apache.logging.log4j</groupId>
|
||||
- <artifactId>log4j-core</artifactId>
|
||||
- <version>2.14.1</version>
|
||||
- <version>2.17.0</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.apache.logging.log4j</groupId>
|
||||
- <artifactId>log4j-slf4j18-impl</artifactId>
|
||||
- <version>2.14.1</version>
|
||||
- <version>2.17.0</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Remap fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index a492a3ff23a6e4bd1a47bdfbe295163ac3ef66c9..dc88152a1458dadd102989d4fc5ffd5bbc7eb523 100644
|
||||
index 885445d353b7abc87f4ff863da357dfe480d9ada..8aecabe25510a58041194b0b798236bd652991dc 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -270,9 +270,11 @@ public class BlockPos extends Vec3i {
|
||||
@ -78,10 +78,10 @@ index 88258cc1971c0764912d2f3cbfcd426d8f26cd62..e51a78e52969ec687956d16566494fc5
|
||||
entityliving1 = entityliving2;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
index e235729577a80475eaf6e33487363822691d2dce..28d35bde3207b1c06bd97e7c1cdc3f687a28bbf6 100644
|
||||
index babb59497fcd9b5e20d8b3b13ceb9a7856edbb63..92650d816113a0f1c2b589691895ebba3424d661 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
@@ -175,7 +175,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
||||
@@ -174,7 +174,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
||||
Builder<ResourceLocation, Recipe<?>> builder = ImmutableMap.builder();
|
||||
|
||||
recipes.forEach((irecipe) -> {
|
||||
|
@ -5,17 +5,17 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index dc8f0a7ac3387323428f71139ac07ec98cd33ed8..4db0cc3f8505747e77d314320545eb71904b4eac 100644
|
||||
index be24f2f1c72ffcb033fe99bd9197af2c0bed4e69..c1f97f5bb806e3c92a2b4633142d3214e11f7074 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -13,10 +13,9 @@ repositories {
|
||||
dependencies {
|
||||
implementation(project(":paper-api"))
|
||||
implementation("jline:jline:2.12.1")
|
||||
- implementation("org.apache.logging.log4j:log4j-iostreams:2.14.1") {
|
||||
- implementation("org.apache.logging.log4j:log4j-iostreams:2.17.0") {
|
||||
- exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
- }
|
||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.14.1") // Paper
|
||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
||||
implementation("org.ow2.asm:asm:9.2")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
@ -39,7 +39,7 @@ index dc8f0a7ac3387323428f71139ac07ec98cd33ed8..4db0cc3f8505747e77d314320545eb71
|
||||
for (tld in setOf("net", "com", "org")) {
|
||||
attributes("$tld/bukkit", "Sealed" to true)
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 38851269bc9eff80f5593e63b61a4b25c328a3cc..0607f13dd2a568e368f96768259e8cba9c25e9c1 100644
|
||||
index 3067833570c62e4d135b11b8637b52b8167ab269..b698d6a8d6b59eefd721639b62bfd8bcffcf5c6f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -190,7 +190,7 @@ public class Main {
|
||||
@ -50,7 +50,7 @@ index 38851269bc9eff80f5593e63b61a4b25c328a3cc..0607f13dd2a568e368f96768259e8cba
|
||||
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
|
@ -591,10 +591,10 @@ index 0000000000000000000000000000000000000000..4adf44026fc6269934dfa4513f06a7f8
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 82d04f803201e39b48cd514cd8d9e2b90b28c1d4..156fa293626119caf0cf414505fdf0e96eaa08b7 100644
|
||||
index 9e4cca119722c2edc478fdd1a34af4370649aa5c..b49528d8a2c577def4f74ee694ffd53b481acb32 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -106,6 +106,12 @@ public class Main {
|
||||
@@ -109,6 +109,12 @@ public class Main {
|
||||
DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(optionset); // CraftBukkit - CLI argument support
|
||||
|
||||
dedicatedserversettings.forceSave();
|
||||
@ -607,7 +607,7 @@ index 82d04f803201e39b48cd514cd8d9e2b90b28c1d4..156fa293626119caf0cf414505fdf0e9
|
||||
Path path1 = Paths.get("eula.txt");
|
||||
Eula eula = new Eula(path1);
|
||||
|
||||
@@ -261,6 +267,20 @@ public class Main {
|
||||
@@ -284,6 +290,20 @@ public class Main {
|
||||
|
||||
}
|
||||
|
||||
@ -629,10 +629,10 @@ index 82d04f803201e39b48cd514cd8d9e2b90b28c1d4..156fa293626119caf0cf414505fdf0e9
|
||||
Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
|
||||
WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d75a598576d87644a4226216dcfd685c25b29f12..b3c1373f281adfdd9fa513b597941b60b71bb06c 100644
|
||||
index 2a7a6a21d22bec6457845ec972f12321f534800f..8754e5899067bc5e8e83a6264c6fcc38846f6baa 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -602,6 +602,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -603,6 +603,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
this.forceDifficulty();
|
||||
for (ServerLevel worldserver : this.getAllLevels()) {
|
||||
@ -641,10 +641,10 @@ index d75a598576d87644a4226216dcfd685c25b29f12..b3c1373f281adfdd9fa513b597941b60
|
||||
worldserver.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API
|
||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 2599fbabd5e5c0d10d0c915016f7cc982bda0e20..4dd57007af218ba1c0e666117a49939c5884f2c6 100644
|
||||
index 882fe0e84c0607c69ad729aa7732f41554975c82..ebd94265f56ecc946ff1834ec0d45673e010453e 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -192,6 +192,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -195,6 +195,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings"));
|
||||
org.spigotmc.SpigotConfig.registerCommands();
|
||||
// Spigot end
|
||||
@ -661,10 +661,10 @@ index 2599fbabd5e5c0d10d0c915016f7cc982bda0e20..4dd57007af218ba1c0e666117a49939c
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 183cb57fa8d31bd5d96b0ccef6e79b3d7b9e6c73..0d23c92af7aa381976c45d36e07d965819f19707 100644
|
||||
index b1a9ac4bb5f5f7b55a722b60994672c6a2f3406d..2015e527044db26bed960b2915b5422a7d7ad0e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -337,6 +337,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -334,6 +334,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
}
|
||||
|
||||
@ -678,10 +678,10 @@ index 183cb57fa8d31bd5d96b0ccef6e79b3d7b9e6c73..0d23c92af7aa381976c45d36e07d9658
|
||||
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 1bee6fc5b9fa70adf2f7cac792778f5ed203d291..e688949fc2f3031dc9c9817bc59554e9f5a436af 100644
|
||||
index ec57266d48998ed0c656006834c82342236ea4c9..d790c37753f019b682fe00bea392359ba18bf204 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -664,4 +664,10 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -674,4 +674,10 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
|
||||
T create(EntityType<T> type, Level world);
|
||||
}
|
||||
@ -693,10 +693,10 @@ index 1bee6fc5b9fa70adf2f7cac792778f5ed203d291..e688949fc2f3031dc9c9817bc59554e9
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index c3afe1e60535241bf5f643034d1858de53e3a422..8de437c79e105331165efaf1b154287e16e1b8ef 100644
|
||||
index 3dce5044332ee4a8f685ab1cde02cd4c72a85b63..6ded806628f2f3fd5b357eed41990abd7e06a372 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -146,6 +146,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -144,6 +144,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean populating;
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
|
||||
@ -705,19 +705,19 @@ index c3afe1e60535241bf5f643034d1858de53e3a422..8de437c79e105331165efaf1b154287e
|
||||
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
@@ -164,6 +166,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -162,6 +164,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, final DimensionType dimensionmanager, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
+ this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), this.spigotConfig); // Paper
|
||||
this.generator = gen;
|
||||
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 269f5dd75cc51549af1b50e6ec2dd066ca0dbdf6..355a6af98163079bc60c77d6fb88cd7023264a1b 100644
|
||||
index d27dac2620a1b0700db76a1498ed8267c5b5828c..eac877cda0cd37d8717c770b86b590213ee0567e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -869,6 +869,7 @@ public final class CraftServer implements Server {
|
||||
@@ -865,6 +865,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
@ -725,7 +725,7 @@ index 269f5dd75cc51549af1b50e6ec2dd066ca0dbdf6..355a6af98163079bc60c77d6fb88cd70
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
world.serverLevelData.setDifficulty(config.difficulty);
|
||||
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -884,12 +885,14 @@ public final class CraftServer implements Server {
|
||||
@@ -880,12 +881,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
world.spigotConfig.init(); // Spigot
|
||||
@ -740,7 +740,7 @@ index 269f5dd75cc51549af1b50e6ec2dd066ca0dbdf6..355a6af98163079bc60c77d6fb88cd70
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2316,4 +2319,35 @@ public final class CraftServer implements Server {
|
||||
@@ -2308,4 +2311,35 @@ public final class CraftServer implements Server {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -777,7 +777,7 @@ index 269f5dd75cc51549af1b50e6ec2dd066ca0dbdf6..355a6af98163079bc60c77d6fb88cd70
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 0607f13dd2a568e368f96768259e8cba9c25e9c1..399e878210606e9addb535e4efed0ddb424160e8 100644
|
||||
index b698d6a8d6b59eefd721639b62bfd8bcffcf5c6f..70aa37fe043f56ef1b2f722ca946c4ac2cf4a98b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -129,6 +129,14 @@ public class Main {
|
||||
@ -796,7 +796,7 @@ index 0607f13dd2a568e368f96768259e8cba9c25e9c1..399e878210606e9addb535e4efed0ddb
|
||||
};
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 4520eda5308575aa02ef059bb2efd776f56e352b..1d802f0e81b3880e9bb7799ecd46826f4bdcee03 100644
|
||||
index a04da0a7d690fe3fcf10810b4e8c92a8ae027b86..feef74e3a6d50344245c4a61ece5b2194af1072f 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -58,8 +58,14 @@ public class SpigotWorldConfig
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] MC Dev fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index 820ba0832fb2a7afe37f461a126e90613d775ff4..1851b36f978330651627f902f1c123337cdf9075 100644
|
||||
index de0f7cee98ae376ebcb1a48aed5ab5375681f53b..ddef1810b4ffe4623b46157ed0505ff97648867d 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -354,7 +354,7 @@ public class Util {
|
||||
@@ -352,7 +352,7 @@ public class Util {
|
||||
}
|
||||
|
||||
public static <K> Strategy<K> identityStrategy() {
|
||||
@ -16,9 +16,9 @@ index 820ba0832fb2a7afe37f461a126e90613d775ff4..1851b36f978330651627f902f1c12333
|
||||
+ return (Strategy<K>) Util.IdentityStrategy.INSTANCE; // Paper - decompile fix
|
||||
}
|
||||
|
||||
public static <V> CompletableFuture<List<V>> sequence(List<? extends CompletableFuture<? extends V>> futures) {
|
||||
public static <V> CompletableFuture<List<V>> sequence(List<? extends CompletableFuture<V>> futures) {
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index dc88152a1458dadd102989d4fc5ffd5bbc7eb523..53f438b3747ff20dd18bc757b5b672aaa9db7b81 100644
|
||||
index 8aecabe25510a58041194b0b798236bd652991dc..c656633870c99cc383d95fadcc0ec7b0f18a3682 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -375,12 +375,12 @@ public class BlockPos extends Vec3i {
|
||||
@ -39,21 +39,6 @@ index dc88152a1458dadd102989d4fc5ffd5bbc7eb523..53f438b3747ff20dd18bc757b5b672aa
|
||||
}
|
||||
}
|
||||
};
|
||||
diff --git a/src/main/java/net/minecraft/core/MappedRegistry.java b/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||
index ed7c3ab78516056bf50a6d885b98ba5c8d8ae0cf..25a6d195c5d6ee456258d2167f8acc5eb717e187 100644
|
||||
--- a/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||
+++ b/src/main/java/net/minecraft/core/MappedRegistry.java
|
||||
@@ -249,10 +249,5 @@ public class MappedRegistry<T> extends WritableRegistry<T> {
|
||||
}
|
||||
|
||||
static record RegistryEntry<T>(ResourceKey<T> key, int id, T value) {
|
||||
- RegistryEntry(ResourceKey<T> key, int rawId, T entry) {
|
||||
- this.key = key;
|
||||
- this.id = rawId;
|
||||
- this.value = entry;
|
||||
- }
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/nbt/ListTag.java b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
index 8c37ed1d70c5874bb1bd96fe33b087d4ddc2d68e..ea68b26e506e48d8238b7ee4266e61b211d52bd2 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
@ -80,10 +65,10 @@ index 8c37ed1d70c5874bb1bd96fe33b087d4ddc2d68e..ea68b26e506e48d8238b7ee4266e61b2
|
||||
private byte type;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/ConnectionProtocol.java b/src/main/java/net/minecraft/network/ConnectionProtocol.java
|
||||
index 1f70fdaf08541ad57b2046e85e156be9446b372d..ea69f11e3cd9775998679baaccdaf980ee8fd498 100644
|
||||
index f10ea89e64aac2c11ed442ac7f2ffd15b793ac76..5df72f16e6b954ecee23a6f8daa29de0d3d991fe 100644
|
||||
--- a/src/main/java/net/minecraft/network/ConnectionProtocol.java
|
||||
+++ b/src/main/java/net/minecraft/network/ConnectionProtocol.java
|
||||
@@ -15,6 +15,7 @@ import javax.annotation.Nullable;
|
||||
@@ -16,6 +16,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.PacketFlow;
|
||||
@ -91,7 +76,7 @@ index 1f70fdaf08541ad57b2046e85e156be9446b372d..ea69f11e3cd9775998679baaccdaf980
|
||||
import net.minecraft.network.protocol.game.ClientboundAddEntityPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundAddExperienceOrbPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundAddMobPacket;
|
||||
@@ -117,6 +118,7 @@ import net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket;
|
||||
@@ -118,6 +119,7 @@ import net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundUpdateMobEffectPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundUpdateRecipesPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundUpdateTagsPacket;
|
||||
@ -99,7 +84,7 @@ index 1f70fdaf08541ad57b2046e85e156be9446b372d..ea69f11e3cd9775998679baaccdaf980
|
||||
import net.minecraft.network.protocol.game.ServerboundAcceptTeleportationPacket;
|
||||
import net.minecraft.network.protocol.game.ServerboundBlockEntityTagQuery;
|
||||
import net.minecraft.network.protocol.game.ServerboundChangeDifficultyPacket;
|
||||
@@ -163,26 +165,33 @@ import net.minecraft.network.protocol.game.ServerboundTeleportToEntityPacket;
|
||||
@@ -164,26 +166,33 @@ import net.minecraft.network.protocol.game.ServerboundTeleportToEntityPacket;
|
||||
import net.minecraft.network.protocol.game.ServerboundUseItemOnPacket;
|
||||
import net.minecraft.network.protocol.game.ServerboundUseItemPacket;
|
||||
import net.minecraft.network.protocol.handshake.ClientIntentionPacket;
|
||||
@ -121,7 +106,7 @@ index 1f70fdaf08541ad57b2046e85e156be9446b372d..ea69f11e3cd9775998679baaccdaf980
|
||||
import net.minecraft.network.protocol.status.ServerboundPingRequestPacket;
|
||||
import net.minecraft.network.protocol.status.ServerboundStatusRequestPacket;
|
||||
import net.minecraft.util.VisibleForDebug;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public enum ConnectionProtocol {
|
||||
- HANDSHAKING(-1, protocol().addFlow(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet()).addPacket(ClientIntentionPacket.class, ClientIntentionPacket::new))),
|
||||
@ -138,21 +123,21 @@ index 1f70fdaf08541ad57b2046e85e156be9446b372d..ea69f11e3cd9775998679baaccdaf980
|
||||
private static final int MIN_PROTOCOL_ID = -1;
|
||||
private static final int MAX_PROTOCOL_ID = 2;
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLoginPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLoginPacket.java
|
||||
index 11d3d7d1a42f342bcbdc313fd39b379ceec3c0eb..f6e043810e654db6497be6720a9fbfb93aff12f6 100644
|
||||
index 2a6969baca7c07c52223672de58886dd05c032eb..a620e53021e02da1663b8d8b68d429b22814567f 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLoginPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLoginPacket.java
|
||||
@@ -19,25 +19,6 @@ public record ClientboundLoginPacket(int playerId, boolean hardcore, GameType ga
|
||||
}), buf.readWithCodec(RegistryAccess.RegistryHolder.NETWORK_CODEC), buf.readWithCodec(DimensionType.CODEC).get(), ResourceKey.create(Registry.DIMENSION_REGISTRY, buf.readResourceLocation()), buf.readLong(), buf.readVarInt(), buf.readVarInt(), buf.readVarInt(), buf.readBoolean(), buf.readBoolean(), buf.readBoolean(), buf.readBoolean());
|
||||
@@ -20,25 +20,6 @@ public record ClientboundLoginPacket(int playerId, boolean hardcore, GameType ga
|
||||
}), buf.readWithCodec(RegistryAccess.NETWORK_CODEC).freeze(), buf.readWithCodec(DimensionType.CODEC), ResourceKey.create(Registry.DIMENSION_REGISTRY, buf.readResourceLocation()), buf.readLong(), buf.readVarInt(), buf.readVarInt(), buf.readVarInt(), buf.readBoolean(), buf.readBoolean(), buf.readBoolean(), buf.readBoolean());
|
||||
}
|
||||
|
||||
- public ClientboundLoginPacket(int playerEntityId, boolean bl, GameType previousGameMode, @Nullable GameType gameType, Set<ResourceKey<Level>> set, RegistryAccess.RegistryHolder registryHolder, DimensionType dimensionType, ResourceKey<Level> resourceKey, long l, int maxPlayers, int chunkLoadDistance, int i, boolean bl2, boolean bl3, boolean bl4, boolean bl5) {
|
||||
- public ClientboundLoginPacket(int playerEntityId, boolean bl, GameType previousGameMode, @Nullable GameType gameType, Set<ResourceKey<Level>> set, RegistryAccess.Frozen frozen, Holder<DimensionType> holder, ResourceKey<Level> resourceKey, long l, int maxPlayers, int chunkLoadDistance, int i, boolean bl2, boolean bl3, boolean bl4, boolean bl5) {
|
||||
- this.playerId = playerEntityId;
|
||||
- this.hardcore = bl;
|
||||
- this.gameType = previousGameMode;
|
||||
- this.previousGameType = gameType;
|
||||
- this.levels = set;
|
||||
- this.registryHolder = registryHolder;
|
||||
- this.dimensionType = dimensionType;
|
||||
- this.registryHolder = frozen;
|
||||
- this.dimensionType = holder;
|
||||
- this.dimension = resourceKey;
|
||||
- this.seed = l;
|
||||
- this.maxPlayers = maxPlayers;
|
||||
@ -168,18 +153,18 @@ index 11d3d7d1a42f342bcbdc313fd39b379ceec3c0eb..f6e043810e654db6497be6720a9fbfb9
|
||||
public void write(FriendlyByteBuf buf) {
|
||||
buf.writeInt(this.playerId);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b3629065ebbe601802703b8671b24c7156f12d03..4d13345f3caa0c8ec55de465fc486d50b43d1e24 100644
|
||||
index 8754e5899067bc5e8e83a6264c6fcc38846f6baa..425fe208a1bf5490421d4256a8c47c16e47362d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1728,7 +1728,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1778,7 +1778,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
PackRepository resourcepackrepository = this.packRepository;
|
||||
|
||||
Objects.requireNonNull(this.packRepository);
|
||||
- return stream.map(resourcepackrepository::getPack).filter(Objects::nonNull).map(Pack::open).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error
|
||||
+ return stream.<Pack>map(resourcepackrepository::getPack).filter(Objects::nonNull).map(Pack::open).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error // Paper - decompile error // todo: is this needed anymore?
|
||||
}, this).thenCompose((immutablelist) -> {
|
||||
return ServerResources.loadResources(immutablelist, this.registryHolder, this.isDedicatedServer() ? Commands.CommandSelection.DEDICATED : Commands.CommandSelection.INTEGRATED, this.getFunctionCompilationLevel(), this.executor, this);
|
||||
}).thenAcceptAsync((datapackresources) -> {
|
||||
MultiPackResourceManager resourcemanager = new MultiPackResourceManager(PackType.SERVER_DATA, immutablelist);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/Ticket.java b/src/main/java/net/minecraft/server/level/Ticket.java
|
||||
index 062da1bddd9704f5fbc46e974e13e60cd500bbe2..ffc43e5d3d0563c9e9c171064511b2c65ddf67e1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/Ticket.java
|
||||
@ -207,7 +192,7 @@ index d0f6eb3981a171c0f34870cb0472599d6cca9642..d1b2ba24ef54e01c6249c3b2ca16e80f
|
||||
|
||||
public static <T> SortedArraySet<T> create(Comparator<T> comparator) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
index 93d9b14eb8793b8ee2193f7525306a5e4f1900f6..63f283f32bdad02299d4a16c305a28c3bfbce9a8 100644
|
||||
index 3d0b05a9ac049cf751dad0b0df46b5152b0cc9a5..3959eeb9090e8e4c999d89ec32fac8c46d5cdc75 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
@@ -30,7 +30,7 @@ public class PoiSection {
|
||||
@ -220,10 +205,10 @@ index 93d9b14eb8793b8ee2193f7525306a5e4f1900f6..63f283f32bdad02299d4a16c305a28c3
|
||||
return poiSet.isValid;
|
||||
}), PoiRecord.codec(updateListener).listOf().fieldOf("Records").forGetter((poiSet) -> {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
index 8daab331dd33c7095ddd9582b091310551003fd7..ef7bde78c134ec4ad464b5b6516626109c362989 100644
|
||||
index 92650d816113a0f1c2b589691895ebba3424d661..7ef0075cc16613709e145714204a728d8d8dd82b 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
@@ -77,7 +77,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
||||
@@ -76,7 +76,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
||||
}
|
||||
|
||||
this.recipes = (Map) map1.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry1) -> {
|
||||
@ -233,13 +218,13 @@ index 8daab331dd33c7095ddd9582b091310551003fd7..ef7bde78c134ec4ad464b5b651662610
|
||||
this.byName = Maps.newHashMap(builder.build()); // CraftBukkit
|
||||
RecipeManager.LOGGER.info("Loaded {} recipes", map1.size());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
index 0f7950458dc2dfac51ed0d56f1790395f0b03bc2..fa4544541b9c5f163b633596e73a5197cd081eb8 100644
|
||||
index 0422d787593cc65aadcae9f7517ec67a52f1f72b..95bbc1b6964614f3cf520034156e97a0ef32af40 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
@@ -39,8 +39,32 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -35,8 +35,32 @@ import net.minecraft.world.level.material.FluidState;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
public final class Biome {
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
- public static final Codec<Biome> DIRECT_CODEC;
|
||||
- public static final Codec<Biome> NETWORK_CODEC;
|
||||
+ // Paper start - decompile fix: move up verbatim from static block
|
||||
@ -256,23 +241,23 @@ index 0f7950458dc2dfac51ed0d56f1790395f0b03bc2..fa4544541b9c5f163b633596e73a5197
|
||||
+ return biome.mobSettings;
|
||||
+ })).apply(instance, Biome::new);
|
||||
+ });
|
||||
+ public static final Codec<Biome> NETWORK_CODEC = RecordCodecBuilder.create((instance) -> {
|
||||
+ public static final Codec<Biome> NETWORK_CODE = RecordCodecBuilder.create((instance) -> {
|
||||
+ return instance.group(Biome.ClimateSettings.CODEC.forGetter((biome) -> {
|
||||
+ return biome.climateSettings;
|
||||
+ }), Biome.BiomeCategory.CODEC.fieldOf("category").forGetter((biome) -> {
|
||||
+ return biome.biomeCategory;
|
||||
+ }), BiomeSpecialEffects.CODEC.fieldOf("effects").forGetter((biome) -> {
|
||||
+ return biome.specialEffects;
|
||||
+ })).apply(instance, (climateSettings, biomeCategory, biomeSpecialEffects) -> {
|
||||
+ return new Biome(climateSettings, biomeCategory, biomeSpecialEffects, BiomeGenerationSettings.EMPTY, MobSpawnSettings.EMPTY);
|
||||
+ })).apply(instance, (weather, category, effects) -> {
|
||||
+ return new Biome(weather, category, effects, BiomeGenerationSettings.EMPTY, MobSpawnSettings.EMPTY);
|
||||
+ });
|
||||
+ });
|
||||
+ // Paper end
|
||||
public static final Codec<Supplier<Biome>> CODEC = RegistryFileCodec.create(Registry.BIOME_REGISTRY, DIRECT_CODEC);
|
||||
public static final Codec<List<Supplier<Biome>>> LIST_CODEC = RegistryFileCodec.homogeneousList(Registry.BIOME_REGISTRY, DIRECT_CODEC);
|
||||
public static final Codec<Holder<Biome>> CODEC = RegistryFileCodec.create(Registry.BIOME_REGISTRY, DIRECT_CODEC);
|
||||
public static final Codec<HolderSet<Biome>> LIST_CODEC = RegistryCodecs.homogeneousList(Registry.BIOME_REGISTRY, DIRECT_CODEC);
|
||||
private static final PerlinSimplexNoise TEMPERATURE_NOISE = new PerlinSimplexNoise(new WorldgenRandom(new LegacyRandomSource(1234L)), ImmutableList.of(0));
|
||||
@@ -257,33 +281,6 @@ public final class Biome {
|
||||
return resourceLocation == null ? super.toString() : resourceLocation.toString();
|
||||
@@ -253,33 +277,6 @@ public final class Biome {
|
||||
return biomeEntry.value().getBiomeCategory();
|
||||
}
|
||||
|
||||
- static {
|
||||
@ -296,8 +281,8 @@ index 0f7950458dc2dfac51ed0d56f1790395f0b03bc2..fa4544541b9c5f163b633596e73a5197
|
||||
- return biome.biomeCategory;
|
||||
- }), BiomeSpecialEffects.CODEC.fieldOf("effects").forGetter((biome) -> {
|
||||
- return biome.specialEffects;
|
||||
- })).apply(instance, (climateSettings, biomeCategory, biomeSpecialEffects) -> {
|
||||
- return new Biome(climateSettings, biomeCategory, biomeSpecialEffects, BiomeGenerationSettings.EMPTY, MobSpawnSettings.EMPTY);
|
||||
- })).apply(instance, (weather, category, effects) -> {
|
||||
- return new Biome(weather, category, effects, BiomeGenerationSettings.EMPTY, MobSpawnSettings.EMPTY);
|
||||
- });
|
||||
- });
|
||||
- }
|
||||
|
@ -4414,10 +4414,10 @@ index 0000000000000000000000000000000000000000..4d3dc8fba51bf5c0dceb06744781d1df
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index 0b73c98a880d535b615f89d47f4bc3a22348a195..2a06617cd484f378e87660b11a5eb78052348f39 100644
|
||||
index ddef1810b4ffe4623b46157ed0505ff97648867d..90d22b75fd33d8355e59b6bab79757c5b436c9d7 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -107,7 +107,7 @@ public class Util {
|
||||
@@ -105,7 +105,7 @@ public class Util {
|
||||
}
|
||||
|
||||
public static long getNanos() {
|
||||
@ -4427,7 +4427,7 @@ index 0b73c98a880d535b615f89d47f4bc3a22348a195..2a06617cd484f378e87660b11a5eb780
|
||||
|
||||
public static long getEpochMillis() {
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index 53f438b3747ff20dd18bc757b5b672aaa9db7b81..5f23b9ab6540530acac623d2cd8e9ec5d0064f39 100644
|
||||
index c656633870c99cc383d95fadcc0ec7b0f18a3682..85bdeafd92aff5d694c4b5dff0b5796f3467a886 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -531,6 +531,7 @@ public class BlockPos extends Vec3i {
|
||||
@ -4471,14 +4471,14 @@ index cbe273a012bedc3914b8cf1f5ad1fee1dfee6a7e..d0b523387a194d1649469e8d861b0b78
|
||||
return NbtUtils.loadUUID(this.get(key));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
index 4ea6c2f0ac4703a5d67137073a5da0c39d77bdce..b964121f19e6a28df7675e65441c551a55316753 100644
|
||||
index 207f1c1fc9d4451d27047bb8362bded8cd53e32f..021a26a6b1c258deffc26c035ab52a4ea027d9a1 100644
|
||||
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
@@ -48,7 +48,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
@@ -45,7 +45,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
JvmProfiler.INSTANCE.onPacketSent(k, integer, channelHandlerContext.channel().remoteAddress(), j);
|
||||
}
|
||||
} catch (Throwable var10) {
|
||||
- LOGGER.error(var10);
|
||||
- LOGGER.error("Error receiving packet {}", integer, var10);
|
||||
+ LOGGER.error("Packet encoding of packet ID {} threw (skippable? {})", integer, packet.isSkippable(), var10); // Paper - Give proper error message
|
||||
if (packet.isSkippable()) {
|
||||
throw new SkipPacketException(var10);
|
||||
@ -5001,10 +5001,10 @@ index 0000000000000000000000000000000000000000..9f292deee1b793d52b5774304318e940
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2b76a87213ea8880ede32a6f3bb91f59ed54e681..8c2b1d1a1e7f2716ee27aa10165b94550dccd19a 100644
|
||||
index 425fe208a1bf5490421d4256a8c47c16e47362d0..32dbb6e7add72ca8068e431e607a9ff570157ff8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -296,6 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
@ -5012,7 +5012,7 @@ index 2b76a87213ea8880ede32a6f3bb91f59ed54e681..8c2b1d1a1e7f2716ee27aa10165b9455
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -949,6 +950,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -967,6 +968,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
|
||||
}
|
||||
// Spigot start
|
||||
@ -5022,7 +5022,7 @@ index 2b76a87213ea8880ede32a6f3bb91f59ed54e681..8c2b1d1a1e7f2716ee27aa10165b9455
|
||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||
this.getProfileCache().save();
|
||||
@@ -1011,6 +1015,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1029,6 +1033,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.lastOverloadWarning = this.nextTickTime;
|
||||
}
|
||||
|
||||
@ -5030,7 +5030,7 @@ index 2b76a87213ea8880ede32a6f3bb91f59ed54e681..8c2b1d1a1e7f2716ee27aa10165b9455
|
||||
if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 )
|
||||
{
|
||||
double currentTps = 1E3 / ( curTime - tickSection ) * MinecraftServer.SAMPLE_INTERVAL;
|
||||
@@ -1234,7 +1239,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1271,7 +1276,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.debug("Autosave finished");
|
||||
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
|
||||
}
|
||||
@ -5039,7 +5039,7 @@ index 2b76a87213ea8880ede32a6f3bb91f59ed54e681..8c2b1d1a1e7f2716ee27aa10165b9455
|
||||
this.profiler.push("tallying");
|
||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
||||
@@ -1297,6 +1302,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1334,6 +1339,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
try {
|
||||
worldserver.timings.doTick.startTiming(); // Spigot
|
||||
worldserver.tick(shouldKeepTicking);
|
||||
@ -5052,10 +5052,10 @@ index 2b76a87213ea8880ede32a6f3bb91f59ed54e681..8c2b1d1a1e7f2716ee27aa10165b9455
|
||||
} catch (Throwable throwable) {
|
||||
// Spigot Start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aadaa7eb4535 100644
|
||||
index d1a053dbade32fde28784c79659d9b150c90ed93..2b936c67265f3c672d3b623e6aedd81eff0e4358 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -49,9 +49,9 @@ public class ChunkHolder {
|
||||
@@ -52,9 +52,9 @@ public class ChunkHolder {
|
||||
private static final int BLOCKS_BEFORE_RESEND_FUDGE = 64;
|
||||
private final AtomicReferenceArray<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> futures;
|
||||
private final LevelHeightAccessor levelHeightAccessor;
|
||||
@ -5068,7 +5068,7 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
private CompletableFuture<ChunkAccess> chunkToSave;
|
||||
@Nullable
|
||||
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
|
||||
@@ -70,6 +70,8 @@ public class ChunkHolder {
|
||||
@@ -73,6 +73,8 @@ public class ChunkHolder {
|
||||
private boolean resendLight;
|
||||
private CompletableFuture<Void> pendingFullStateConfirmation;
|
||||
|
||||
@ -5077,24 +5077,20 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
public ChunkHolder(ChunkPos pos, int level, LevelHeightAccessor world, LevelLightEngine lightingProvider, ChunkHolder.LevelChangeListener levelUpdateListener, ChunkHolder.PlayerProvider playersWatchingChunkProvider) {
|
||||
this.futures = new AtomicReferenceArray(ChunkHolder.CHUNK_STATUSES.size());
|
||||
this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
|
||||
@@ -90,10 +92,11 @@ public class ChunkHolder {
|
||||
@@ -93,8 +95,30 @@ public class ChunkHolder {
|
||||
this.queueLevel = this.oldTicketLevel;
|
||||
this.setTicketLevel(level);
|
||||
this.changedBlocksPerSection = new ShortSet[world.getSectionsCount()];
|
||||
+ this.chunkMap = (ChunkMap)playersWatchingChunkProvider; // Paper
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
- public LevelChunk getFullChunk() {
|
||||
+ public final LevelChunk getFullChunk() { // Paper - final for inline
|
||||
if (!ChunkHolder.getFullChunkStatus(this.oldTicketLevel).isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) return null; // note: using oldTicketLevel for isLoaded checks
|
||||
return this.getFullChunkUnchecked();
|
||||
}
|
||||
@@ -105,6 +108,21 @@ public class ChunkHolder {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ }
|
||||
+
|
||||
+ // Paper start
|
||||
+ public LevelChunk getFullChunkUnchecked() {
|
||||
+ CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> statusFuture = this.getFutureIfPresentUnchecked(ChunkStatus.FULL);
|
||||
+ Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> either = (Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>) statusFuture.getNow(null);
|
||||
+ return (either == null) ? null : (LevelChunk) either.left().orElse(null);
|
||||
}
|
||||
|
||||
+ public ChunkAccess getAvailableChunkNow() {
|
||||
+ // TODO can we just getStatusFuture(EMPTY)?
|
||||
+ for (ChunkStatus curr = ChunkStatus.FULL, next = curr.getParent(); curr != next; curr = next, next = next.getParent()) {
|
||||
@ -5112,7 +5108,7 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getFutureIfPresentUnchecked(ChunkStatus leastStatus) {
|
||||
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = (CompletableFuture) this.futures.get(leastStatus.getIndex());
|
||||
|
||||
@@ -115,20 +133,20 @@ public class ChunkHolder {
|
||||
@@ -105,20 +129,20 @@ public class ChunkHolder {
|
||||
return ChunkHolder.getStatus(this.ticketLevel).isOrAfter(leastStatus) ? this.getFutureIfPresentUnchecked(leastStatus) : ChunkHolder.UNLOADED_CHUNK_FUTURE;
|
||||
}
|
||||
|
||||
@ -5137,7 +5133,16 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getTickingChunkFuture();
|
||||
Either<LevelChunk, ChunkHolder.ChunkLoadingFailure> either = (Either) completablefuture.getNow(null); // CraftBukkit - decompile error
|
||||
|
||||
@@ -149,6 +167,21 @@ public class ChunkHolder {
|
||||
@@ -126,7 +150,7 @@ public class ChunkHolder {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- public LevelChunk getFullChunk() {
|
||||
+ public final LevelChunk getFullChunk() { // Paper - final for inline
|
||||
CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getFullChunkFuture();
|
||||
Either<LevelChunk, ChunkHolder.ChunkLoadingFailure> either = (Either) completablefuture.getNow(null); // CraftBukkit - decompile error
|
||||
|
||||
@@ -147,6 +171,21 @@ public class ChunkHolder {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -5159,7 +5164,7 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
@Nullable
|
||||
public ChunkAccess getLastAvailable() {
|
||||
for (int i = ChunkHolder.CHUNK_STATUSES.size() - 1; i >= 0; --i) {
|
||||
@@ -167,7 +200,7 @@ public class ChunkHolder {
|
||||
@@ -165,7 +204,7 @@ public class ChunkHolder {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -5168,7 +5173,7 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
return this.chunkToSave;
|
||||
}
|
||||
|
||||
@@ -335,11 +368,11 @@ public class ChunkHolder {
|
||||
@@ -342,11 +381,11 @@ public class ChunkHolder {
|
||||
return ChunkHolder.getFullChunkStatus(this.ticketLevel);
|
||||
}
|
||||
|
||||
@ -5182,7 +5187,7 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
return this.ticketLevel;
|
||||
}
|
||||
|
||||
@@ -428,14 +461,27 @@ public class ChunkHolder {
|
||||
@@ -435,14 +474,27 @@ public class ChunkHolder {
|
||||
|
||||
this.wasAccessibleSinceLastSave |= flag3;
|
||||
if (!flag2 && flag3) {
|
||||
@ -5210,7 +5215,7 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
}
|
||||
|
||||
boolean flag4 = playerchunk_state.isOrAfter(ChunkHolder.FullChunkStatus.TICKING);
|
||||
@@ -444,12 +490,29 @@ public class ChunkHolder {
|
||||
@@ -451,12 +503,29 @@ public class ChunkHolder {
|
||||
if (!flag4 && flag5) {
|
||||
this.tickingChunkFuture = chunkStorage.prepareTickingChunk(this);
|
||||
this.scheduleFullChunkPromotion(chunkStorage, this.tickingChunkFuture, executor, ChunkHolder.FullChunkStatus.TICKING);
|
||||
@ -5241,7 +5246,7 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
}
|
||||
|
||||
boolean flag6 = playerchunk_state.isOrAfter(ChunkHolder.FullChunkStatus.ENTITY_TICKING);
|
||||
@@ -462,12 +525,28 @@ public class ChunkHolder {
|
||||
@@ -469,12 +538,28 @@ public class ChunkHolder {
|
||||
|
||||
this.entityTickingChunkFuture = chunkStorage.prepareEntityTickingChunk(this.pos);
|
||||
this.scheduleFullChunkPromotion(chunkStorage, this.entityTickingChunkFuture, executor, ChunkHolder.FullChunkStatus.ENTITY_TICKING);
|
||||
@ -5271,7 +5276,7 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
}
|
||||
|
||||
if (!playerchunk_state1.isOrAfter(playerchunk_state)) {
|
||||
@@ -573,4 +652,18 @@ public class ChunkHolder {
|
||||
@@ -590,4 +675,18 @@ public class ChunkHolder {
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -5291,10 +5296,10 @@ index 40dd2077f26a2c1fa15f21861204faa53748140e..45de5e508540b4ba622985d530f1aada
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bcd619e8cf 100644
|
||||
index 27592093939d3ee3d0395527eead160ecec9330c..a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -59,6 +59,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket;
|
||||
@@ -62,6 +62,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket;
|
||||
import net.minecraft.network.protocol.game.DebugPackets;
|
||||
@ -5302,7 +5307,7 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||
import net.minecraft.server.network.ServerPlayerConnection;
|
||||
import net.minecraft.util.CsvOutput;
|
||||
@@ -158,6 +159,56 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -162,6 +163,56 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
};
|
||||
// CraftBukkit end
|
||||
|
||||
@ -5359,7 +5364,7 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
||||
super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
||||
this.visibleChunkMap = this.updatingChunkMap.clone();
|
||||
@@ -193,6 +244,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -198,6 +249,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.overworldDataStorage = persistentStateManagerFactory;
|
||||
this.poiManager = new PoiManager(path.resolve("poi"), dataFixer, dsync, world);
|
||||
this.setViewDistance(viewDistance);
|
||||
@ -5370,7 +5375,7 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
}
|
||||
|
||||
protected ChunkGenerator generator() {
|
||||
@@ -282,6 +337,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -287,6 +342,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
||||
@ -5385,7 +5390,7 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
private CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture(ChunkPos centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus) {
|
||||
List<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> list = new ArrayList();
|
||||
List<ChunkHolder> list1 = new ArrayList();
|
||||
@@ -382,6 +445,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -418,6 +481,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
holder.setTicketLevel(level);
|
||||
} else {
|
||||
holder = new ChunkHolder(new ChunkPos(pos), level, this.level, this.lightEngine, this.queueSorter, this);
|
||||
@ -5397,7 +5402,7 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
}
|
||||
|
||||
this.updatingChunkMap.put(pos, holder);
|
||||
@@ -507,7 +575,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -547,7 +615,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (completablefuture1 != completablefuture) {
|
||||
this.scheduleUnload(pos, holder);
|
||||
} else {
|
||||
@ -5412,20 +5417,19 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
if (ichunkaccess instanceof LevelChunk) {
|
||||
((LevelChunk) ichunkaccess).setLoaded(false);
|
||||
}
|
||||
@@ -522,7 +596,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.lightEngine.updateChunkStatus(ichunkaccess.getPos());
|
||||
@@ -563,7 +637,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.lightEngine.tryScheduleUpdate();
|
||||
this.progressListener.onStatusChange(ichunkaccess.getPos(), (ChunkStatus) null);
|
||||
- }
|
||||
this.chunkSaveCooldowns.remove(ichunkaccess.getPos().toLong());
|
||||
+ } else if (removed) { // Paper start
|
||||
+ for (int index = 0, len = this.regionManagers.size(); index < len; ++index) {
|
||||
+ this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z);
|
||||
+ }
|
||||
+ } // Paper end
|
||||
+ for (int index = 0, len = this.regionManagers.size(); index < len; ++index) {
|
||||
+ this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z);
|
||||
}
|
||||
+ } // Paper end
|
||||
|
||||
}
|
||||
};
|
||||
@@ -1057,6 +1135,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1111,6 +1189,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (!flag1) {
|
||||
this.distanceManager.addPlayer(SectionPos.of((Entity) player), player);
|
||||
}
|
||||
@ -5433,7 +5437,7 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
} else {
|
||||
SectionPos sectionposition = player.getLastSectionPos();
|
||||
|
||||
@@ -1064,6 +1143,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1118,6 +1197,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (!flag2) {
|
||||
this.distanceManager.removePlayer(sectionposition, player);
|
||||
}
|
||||
@ -5441,7 +5445,7 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
}
|
||||
|
||||
for (int k = i - this.viewDistance - 1; k <= i + this.viewDistance + 1; ++k) {
|
||||
@@ -1176,6 +1256,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1230,6 +1310,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
||||
@ -5450,7 +5454,7 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1379,7 +1461,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1433,7 +1515,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public class ChunkDistanceManager extends DistanceManager {
|
||||
|
||||
protected ChunkDistanceManager(Executor workerExecutor, Executor mainThreadExecutor) {
|
||||
@ -5460,10 +5464,10 @@ index 09f5ce03f842e357bbe0dd6b0fffde8ec5851f1d..504492c3889fab7b95eec3bcd9b0d1bc
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
index ef87c37633cee4ab438f1991144188ade1c4e65f..19d3802becd353e130b785f8286e595e08dc5c5f 100644
|
||||
index 6c98676827ceb6999f340fa2b06a0b3e1cb4cae2..2012831c4e9573118209672c8a0170573566b491 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
@@ -59,8 +59,9 @@ public abstract class DistanceManager {
|
||||
@@ -60,8 +60,9 @@ public abstract class DistanceManager {
|
||||
final Executor mainThreadExecutor;
|
||||
private long ticketTickCounter;
|
||||
private int simulationDistance = 10;
|
||||
@ -5474,7 +5478,7 @@ index ef87c37633cee4ab438f1991144188ade1c4e65f..19d3802becd353e130b785f8286e595e
|
||||
Objects.requireNonNull(mainThreadExecutor);
|
||||
ProcessorHandle<Runnable> mailbox = ProcessorHandle.of("player ticket throttler", mainThreadExecutor::execute);
|
||||
ChunkTaskPriorityQueueSorter chunktaskqueuesorter = new ChunkTaskPriorityQueueSorter(ImmutableList.of(mailbox), workerExecutor, 4);
|
||||
@@ -69,6 +70,7 @@ public abstract class DistanceManager {
|
||||
@@ -70,6 +71,7 @@ public abstract class DistanceManager {
|
||||
this.ticketThrottlerInput = chunktaskqueuesorter.getProcessor(mailbox, true);
|
||||
this.ticketThrottlerReleaser = chunktaskqueuesorter.getReleaseProcessor(mailbox);
|
||||
this.mainThreadExecutor = mainThreadExecutor;
|
||||
@ -5483,25 +5487,24 @@ index ef87c37633cee4ab438f1991144188ade1c4e65f..19d3802becd353e130b785f8286e595e
|
||||
|
||||
protected void purgeStaleTickets() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d168694dda 100644
|
||||
index 2015e527044db26bed960b2915b5422a7d7ad0e3..94d717f43336ace9375409b48d1e0e4291072656 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -48,6 +48,8 @@ import net.minecraft.world.level.storage.LevelData;
|
||||
import net.minecraft.world.level.storage.LevelStorageSource;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; // Paper
|
||||
+import java.util.function.Function; // Paper
|
||||
@@ -49,6 +49,7 @@ import net.minecraft.world.level.storage.LevelStorageSource;
|
||||
|
||||
public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
@@ -70,6 +72,334 @@ public class ServerChunkCache extends ChunkSource {
|
||||
+ public static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger(); // Paper
|
||||
public static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList();
|
||||
private final DistanceManager distanceManager;
|
||||
final ServerLevel level;
|
||||
@@ -67,6 +68,334 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@Nullable
|
||||
@VisibleForDebug
|
||||
private NaturalSpawner.SpawnState lastSpawnState;
|
||||
+ // Paper start
|
||||
+ final com.destroystokyo.paper.util.concurrent.WeakSeqLock loadedChunkMapSeqLock = new com.destroystokyo.paper.util.concurrent.WeakSeqLock();
|
||||
+ final Long2ObjectOpenHashMap<LevelChunk> loadedChunkMap = new Long2ObjectOpenHashMap<>(8192, 0.5f);
|
||||
+ final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<LevelChunk> loadedChunkMap = new it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<>(8192, 0.5f);
|
||||
+
|
||||
+ private final LevelChunk[] lastLoadedChunks = new LevelChunk[4 * 4];
|
||||
+
|
||||
@ -5602,13 +5605,13 @@ index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d1
|
||||
+ this.getChunkFutureAsynchronously(x, z, 33, ChunkHolder::getFullChunkFuture, onLoad);
|
||||
+ }
|
||||
+
|
||||
+ private void getChunkFutureAsynchronously(int x, int z, int ticketLevel, Function<ChunkHolder, CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>>> futureGet, java.util.function.Consumer<LevelChunk> onLoad) {
|
||||
+ private void getChunkFutureAsynchronously(int x, int z, int ticketLevel, java.util.function.Function<ChunkHolder, CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>>> futureGet, java.util.function.Consumer<LevelChunk> onLoad) {
|
||||
+ if (Thread.currentThread() != this.mainThread) {
|
||||
+ throw new IllegalStateException();
|
||||
+ }
|
||||
+ ChunkPos chunkPos = new ChunkPos(x, z);
|
||||
+ Long identifier = this.chunkFutureAwaitCounter++;
|
||||
+ this.distanceManager.addTicketAtLevel(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, identifier);
|
||||
+ this.distanceManager.addTicket(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, identifier);
|
||||
+ this.runDistanceManagerUpdates();
|
||||
+
|
||||
+ ChunkHolder chunk = this.chunkMap.getUpdatingChunkIfPresent(chunkPos.toLong());
|
||||
@ -5625,9 +5628,9 @@ index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d1
|
||||
+ if (throwable instanceof ThreadDeath) {
|
||||
+ throw (ThreadDeath)throwable;
|
||||
+ }
|
||||
+ net.minecraft.server.MinecraftServer.LOGGER.fatal("Failed to complete future await for chunk " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "'", throwable);
|
||||
+ net.minecraft.server.MinecraftServer.LOGGER.error("Failed to complete future await for chunk " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "'", throwable);
|
||||
+ } else if (either.right().isPresent()) {
|
||||
+ net.minecraft.server.MinecraftServer.LOGGER.fatal("Failed to complete future await for chunk " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "': " + either.right().get().toString());
|
||||
+ net.minecraft.server.MinecraftServer.LOGGER.error("Failed to complete future await for chunk " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "': " + either.right().get().toString());
|
||||
+ }
|
||||
+
|
||||
+ try {
|
||||
@ -5638,13 +5641,13 @@ index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d1
|
||||
+ if (thr instanceof ThreadDeath) {
|
||||
+ throw (ThreadDeath)thr;
|
||||
+ }
|
||||
+ net.minecraft.server.MinecraftServer.LOGGER.fatal("Load callback for future await failed " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "'", thr);
|
||||
+ net.minecraft.server.MinecraftServer.LOGGER.error("Load callback for future await failed " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "'", thr);
|
||||
+ return;
|
||||
+ }
|
||||
+ } finally {
|
||||
+ // due to odd behaviour with CB unload implementation we need to have these AFTER the load callback.
|
||||
+ ServerChunkCache.this.distanceManager.addTicketAtLevel(TicketType.UNKNOWN, chunkPos, ticketLevel, chunkPos);
|
||||
+ ServerChunkCache.this.distanceManager.removeTicketAtLevel(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, identifier);
|
||||
+ ServerChunkCache.this.distanceManager.addTicket(TicketType.UNKNOWN, chunkPos, ticketLevel, chunkPos);
|
||||
+ ServerChunkCache.this.distanceManager.removeTicket(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, identifier);
|
||||
+ }
|
||||
+ }, this.mainThreadProcessor);
|
||||
+ }
|
||||
@ -5726,9 +5729,9 @@ index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d1
|
||||
+ if (throwable instanceof ThreadDeath) {
|
||||
+ throw (ThreadDeath)throwable;
|
||||
+ }
|
||||
+ LOGGER.fatal("Failed to complete future await for chunk " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "'", throwable);
|
||||
+ LOGGER.error("Failed to complete future await for chunk " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "'", throwable);
|
||||
+ } else if (either.right().isPresent()) {
|
||||
+ LOGGER.fatal("Failed to complete future await for chunk " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "': " + either.right().get().toString());
|
||||
+ LOGGER.error("Failed to complete future await for chunk " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "': " + either.right().get().toString());
|
||||
+ }
|
||||
+
|
||||
+ try {
|
||||
@ -5739,7 +5742,7 @@ index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d1
|
||||
+ if (thr instanceof ThreadDeath) {
|
||||
+ throw (ThreadDeath)thr;
|
||||
+ }
|
||||
+ LOGGER.fatal("Load callback for future await failed " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "'", thr);
|
||||
+ LOGGER.error("Load callback for future await failed " + chunkPos.toString() + " in world '" + ServerChunkCache.this.level.getWorld().getName() + "'", thr);
|
||||
+ return;
|
||||
+ }
|
||||
+ } finally {
|
||||
@ -5751,11 +5754,11 @@ index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d1
|
||||
+ }
|
||||
+
|
||||
+ public <T> void addTicketAtLevel(TicketType<T> ticketType, ChunkPos chunkPos, int ticketLevel, T identifier) {
|
||||
+ this.distanceManager.addTicketAtLevel(ticketType, chunkPos, ticketLevel, identifier);
|
||||
+ this.distanceManager.addTicket(ticketType, chunkPos, ticketLevel, identifier);
|
||||
+ }
|
||||
+
|
||||
+ public <T> void removeTicketAtLevel(TicketType<T> ticketType, ChunkPos chunkPos, int ticketLevel, T identifier) {
|
||||
+ this.distanceManager.removeTicketAtLevel(ticketType, chunkPos, ticketLevel, identifier);
|
||||
+ this.distanceManager.removeTicket(ticketType, chunkPos, ticketLevel, identifier);
|
||||
+ }
|
||||
+
|
||||
+ void chunkLoadAccept(int chunkX, int chunkZ, ChunkAccess chunk, java.util.function.Consumer<ChunkAccess> consumer) {
|
||||
@ -5830,7 +5833,7 @@ index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d1
|
||||
|
||||
public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory) {
|
||||
this.level = world;
|
||||
@@ -130,6 +460,49 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -127,6 +456,49 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.lastChunk[0] = chunk;
|
||||
}
|
||||
|
||||
@ -5881,10 +5884,10 @@ index 0d23c92af7aa381976c45d36e07d965819f19707..9dd0eb49048ceccd82e139dac5d658d1
|
||||
@Override
|
||||
public ChunkAccess getChunk(int x, int z, ChunkStatus leastStatus, boolean create) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b9ef6e33e584099b77b966774e1ae6aa497dfca1..073cea951644f25c276ba05ff1fc48fda08593da 100644
|
||||
index 1e9805b029abd8a59452b185af2eae8d1c9e7267..71e01e8f7b1aa5b607ad37297dbc49e9953aa9be 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -159,6 +159,7 @@ import org.bukkit.event.server.MapInitializeEvent;
|
||||
@@ -160,6 +160,7 @@ import org.bukkit.event.server.MapInitializeEvent;
|
||||
import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
import org.bukkit.event.world.TimeSkipEvent;
|
||||
// CraftBukkit end
|
||||
@ -5892,7 +5895,7 @@ index b9ef6e33e584099b77b966774e1ae6aa497dfca1..073cea951644f25c276ba05ff1fc48fd
|
||||
|
||||
public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@@ -215,6 +216,96 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -216,6 +217,96 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return convertable.dimensionType;
|
||||
}
|
||||
|
||||
@ -5987,10 +5990,10 @@ index b9ef6e33e584099b77b966774e1ae6aa497dfca1..073cea951644f25c276ba05ff1fc48fd
|
||||
+ // Paper end
|
||||
+
|
||||
// Add env and gen to constructor, WorldData -> WorldDataServer
|
||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey<Level> resourcekey, DimensionType dimensionmanager, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, 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, ServerLevelData iworlddataserver, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
// Objects.requireNonNull(minecraftserver); // 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
|
||||
index b64f9dc47d4f632624fc40bbbafd24cb5ae7cd9b..925ffbddd5475be7fe00570d861b615f707434b4 100644
|
||||
index 146d72d8d44cda5fc3f357f52e5fb3775be620f2..9d7d7a44616b2b7849c1abd3b9ac77305fdb0815 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -232,6 +232,8 @@ public class ServerPlayer extends Player {
|
||||
@ -6024,10 +6027,10 @@ index 3a4f026c73cdd22d30bdadabbcf24bef969b73e4..0d536d72ac918fbd403397ff369d1014
|
||||
private final String name;
|
||||
private final Comparator<T> comparator;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
index d679be6c3ce0d57fa2063a45baec1b108a0a2707..de5e18a331178da8f7e82aa2419a0ee606e801ee 100644
|
||||
index 0d33910768b111863816f84393613c0cc5142691..8fdda1e5805534d08c0a06b15e89d85b3d9c21e9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||
@@ -152,6 +152,26 @@ public class WorldGenRegion implements WorldGenLevel {
|
||||
@@ -151,6 +151,26 @@ public class WorldGenRegion implements WorldGenLevel {
|
||||
return chunkX >= this.firstPos.x && chunkX <= this.lastPos.x && chunkZ >= this.firstPos.z && chunkZ <= this.lastPos.z;
|
||||
}
|
||||
|
||||
@ -6055,10 +6058,10 @@ index d679be6c3ce0d57fa2063a45baec1b108a0a2707..de5e18a331178da8f7e82aa2419a0ee6
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8b406bc884a974cf46378a9fc38645e38e00f0ab..ee55db9770eb84792200b407defc04f0fd7b7e98 100644
|
||||
index c79c4e170a8213fd47e78c43827ddc86d24f7b61..c18bed4728f6813aa8d7cf4b1e5e53a092fb1354 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -217,9 +217,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -218,9 +218,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
private final MinecraftServer server;
|
||||
public ServerPlayer player;
|
||||
private int tickCount;
|
||||
@ -6072,7 +6075,7 @@ index 8b406bc884a974cf46378a9fc38645e38e00f0ab..ee55db9770eb84792200b407defc04f0
|
||||
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
||||
index a4c5edee297af6d68d518b77f706732b5ccbe4de..7bf4bf5cb2c1b54a7e2733091f48f3a824336d36 100644
|
||||
index 288fdbef407d11ab430d5d7026dfad148c3c1065..6fefa619299d3202158490630d62c16aef71e831 100644
|
||||
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
||||
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
||||
@@ -78,6 +78,13 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
|
||||
@ -6090,10 +6093,10 @@ index a4c5edee297af6d68d518b77f706732b5ccbe4de..7bf4bf5cb2c1b54a7e2733091f48f3a8
|
||||
@Override
|
||||
public void tell(R runnable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 595a821e3dbbb0ecac8592356149d839624bcd50..78ea2df454919707a938ff75aa655f5bfa12fc99 100644
|
||||
index 2bebc5cc03ae34cf1d4003d24da42d0bc06f897b..e778f4da8b3e33b6fc9bbe21a7cbc1f185130e69 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -308,6 +308,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -311,6 +311,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -6106,10 +6109,10 @@ index 595a821e3dbbb0ecac8592356149d839624bcd50..78ea2df454919707a938ff75aa655f5b
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1c5f30b199904c74aa3e473b7696c416d93f0efe..a3b6883d7fc856ed8550ffb7aa8dd929922853e2 100644
|
||||
index 197a27274c9277c41bb7fcda34afa7ef652e1a9b..c94c62e7e32f55d322ddfed930e1aaa6c1343b29 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -255,6 +255,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -258,6 +258,7 @@ public abstract class LivingEntity extends Entity {
|
||||
public boolean collides = true;
|
||||
public Set<UUID> collidableExemptions = new HashSet<>();
|
||||
public boolean bukkitPickUpLoot;
|
||||
@ -6118,7 +6121,7 @@ index 1c5f30b199904c74aa3e473b7696c416d93f0efe..a3b6883d7fc856ed8550ffb7aa8dd929
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 59a54e99baf8219c3878b25a214508e09e819778..31f98763da600c34246d722cb92dda4442a3f046 100644
|
||||
index 351f7c08d5903113ba19205509e3fc68fc31e338..711c130a6d725d8a7f2a77e74b51c6123d7856d2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -238,6 +238,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@ -6155,10 +6158,10 @@ index 6c3044b6194dfd3037389d717bbe6783f58b951d..457880c9e894a83d88505cf0b7235df9
|
||||
super(type, world);
|
||||
this.xpReward = 5;
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 770520ace95a1fbc5bdaf5d9d62c09f0f7396602..8335880dbbb31a3f5d10c259b567baa0d5f381a1 100644
|
||||
index 62253b9fac567b515bafa06d00c6583b9ac1e216..1a52db84d9630a095347a85e136a9ad118f77325 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -727,6 +727,25 @@ public final class ItemStack {
|
||||
@@ -737,6 +737,25 @@ public final class ItemStack {
|
||||
return this.tag != null ? this.tag.getList("Enchantments", 10) : new ListTag();
|
||||
}
|
||||
|
||||
@ -6184,7 +6187,7 @@ index 770520ace95a1fbc5bdaf5d9d62c09f0f7396602..8335880dbbb31a3f5d10c259b567baa0
|
||||
public void setTag(@Nullable CompoundTag nbt) {
|
||||
this.tag = nbt;
|
||||
if (this.getItem().canBeDepleted()) {
|
||||
@@ -1127,6 +1146,7 @@ public final class ItemStack {
|
||||
@@ -1135,6 +1154,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start
|
||||
@Deprecated
|
||||
public void setItem(Item item) {
|
||||
@ -6294,10 +6297,10 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 8de437c79e105331165efaf1b154287e16e1b8ef..ff001049d71127a0b9e7a9d73996be02ec0ad044 100644
|
||||
index 6ded806628f2f3fd5b357eed41990abd7e06a372..47f625a30f3f2aa95d94f571abf5af95eee68912 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -85,6 +85,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
@@ -83,6 +83,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
||||
@ -6305,7 +6308,7 @@ index 8de437c79e105331165efaf1b154287e16e1b8ef..ff001049d71127a0b9e7a9d73996be02
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
import org.bukkit.craftbukkit.util.CraftSpawnCategory;
|
||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
@@ -270,18 +271,51 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -269,18 +270,51 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return y < -20000000 || y >= 20000000;
|
||||
}
|
||||
|
||||
@ -6361,7 +6364,7 @@ index 8de437c79e105331165efaf1b154287e16e1b8ef..ff001049d71127a0b9e7a9d73996be02
|
||||
ChunkAccess ichunkaccess = this.getChunkSource().getChunk(chunkX, chunkZ, leastStatus, create);
|
||||
|
||||
if (ichunkaccess == null && create) {
|
||||
@@ -292,7 +326,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -291,7 +325,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -6370,7 +6373,7 @@ index 8de437c79e105331165efaf1b154287e16e1b8ef..ff001049d71127a0b9e7a9d73996be02
|
||||
return this.setBlock(pos, state, flags, 512);
|
||||
}
|
||||
|
||||
@@ -597,7 +631,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -596,7 +630,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
if (this.isOutsideBuildHeight(pos)) {
|
||||
return Blocks.VOID_AIR.defaultBlockState();
|
||||
} else {
|
||||
@ -6380,10 +6383,10 @@ index 8de437c79e105331165efaf1b154287e16e1b8ef..ff001049d71127a0b9e7a9d73996be02
|
||||
return chunk.getBlockState(pos);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/LevelReader.java b/src/main/java/net/minecraft/world/level/LevelReader.java
|
||||
index a1cb8379ed4062d765659e829ba2262487ce7f8b..aa76f45d18f23997af5a9508559817964ef5e23c 100644
|
||||
index fb6ee169e6faa0dfc402f414ada10abbad57189e..34b26ee897209034c9be4d3e61acfd18d59e5e1e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/LevelReader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/LevelReader.java
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
||||
@@ -19,6 +19,7 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
public interface LevelReader extends BlockAndTintGetter, CollisionGetter, BiomeManager.NoiseBiomeSource {
|
||||
@ -6392,27 +6395,27 @@ index a1cb8379ed4062d765659e829ba2262487ce7f8b..aa76f45d18f23997af5a950855981796
|
||||
ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
index 47bd74f75f4c49a34a485d1963325a2152756c29..0dcf1c8926e471fa40517a5c92354116dad3c3c2 100644
|
||||
index ccf37eb05846f825d9acc874455cbbcdcdd2ecc2..138f5576a1df6714e754d9829f209f1a1678413f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||
@@ -5,6 +5,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.SectionPos;
|
||||
import net.minecraft.util.profiling.ProfilerFiller;
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
@@ -60,7 +61,7 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.biome.Biomes;
|
||||
@@ -70,7 +71,7 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
||||
private ChunkAccess getChunk(int chunkX, int chunkZ) {
|
||||
int i = chunkX - this.centerX;
|
||||
int j = chunkZ - this.centerZ;
|
||||
- if (i >= 0 && i < this.chunks.length && j >= 0 && j < this.chunks[i].length) {
|
||||
+ if (i >= 0 && i < this.chunks.length && j >= 0 && j < this.chunks[i].length) { // Paper - if this changes, update getChunkIfLoaded below
|
||||
ChunkAccess chunkAccess = this.chunks[i][j];
|
||||
return (ChunkAccess)(chunkAccess != null ? chunkAccess : new EmptyLevelChunk(this.level, new ChunkPos(chunkX, chunkZ)));
|
||||
return (ChunkAccess)(chunkAccess != null ? chunkAccess : new EmptyLevelChunk(this.level, new ChunkPos(chunkX, chunkZ), this.plains.get()));
|
||||
} else {
|
||||
@@ -68,6 +69,30 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
||||
@@ -78,6 +79,30 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
||||
}
|
||||
}
|
||||
|
||||
@ -6444,10 +6447,10 @@ index 47bd74f75f4c49a34a485d1963325a2152756c29..0dcf1c8926e471fa40517a5c92354116
|
||||
public WorldBorder getWorldBorder() {
|
||||
return this.level.getWorldBorder();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 0cb0b6143e3307e546c78ecda2c35ac31a8a7001..a3f44e3a44b2ec21ef41f6d598b428448c847c5f 100644
|
||||
index 42d68e0df3ff4476a248044c7a727c0c2d3b828a..2b88ea323b7e179015751e87d1a4303bffed7f51 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -644,14 +644,14 @@ public abstract class BlockBehaviour {
|
||||
@@ -646,14 +646,14 @@ public abstract class BlockBehaviour {
|
||||
|
||||
public abstract static class BlockStateBase extends StateHolder<Block, BlockState> {
|
||||
|
||||
@ -6465,7 +6468,7 @@ index 0cb0b6143e3307e546c78ecda2c35ac31a8a7001..a3f44e3a44b2ec21ef41f6d598b42844
|
||||
private final BlockBehaviour.StatePredicate isRedstoneConductor;
|
||||
private final BlockBehaviour.StatePredicate isSuffocating;
|
||||
private final BlockBehaviour.StatePredicate isViewBlocking;
|
||||
@@ -679,10 +679,18 @@ public abstract class BlockBehaviour {
|
||||
@@ -681,10 +681,18 @@ public abstract class BlockBehaviour {
|
||||
this.emissiveRendering = blockbase_info.emissiveRendering;
|
||||
}
|
||||
|
||||
@ -6484,7 +6487,7 @@ index 0cb0b6143e3307e546c78ecda2c35ac31a8a7001..a3f44e3a44b2ec21ef41f6d598b42844
|
||||
|
||||
}
|
||||
|
||||
@@ -714,8 +722,8 @@ public abstract class BlockBehaviour {
|
||||
@@ -716,8 +724,8 @@ public abstract class BlockBehaviour {
|
||||
return this.getBlock().getOcclusionShape(this.asState(), world, pos);
|
||||
}
|
||||
|
||||
@ -6496,10 +6499,10 @@ index 0cb0b6143e3307e546c78ecda2c35ac31a8a7001..a3f44e3a44b2ec21ef41f6d598b42844
|
||||
|
||||
public boolean useShapeForLightOcclusion() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
index bfcaaa69991342f71fba4df46f69aea2ec6adca7..0ea0690ab1d45f60a2b13cf8a69e580256992cdc 100644
|
||||
index b629ce7f1aa4592748f3f47ae3637b20461549d2..847ac56f20ab9c5745f9c0fa0e6f16743ba5e471 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
@@ -58,7 +58,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
@@ -61,7 +61,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
protected final ShortList[] postProcessing;
|
||||
protected volatile boolean unsaved;
|
||||
private volatile boolean isLightCorrect;
|
||||
@ -6508,7 +6511,7 @@ index bfcaaa69991342f71fba4df46f69aea2ec6adca7..0ea0690ab1d45f60a2b13cf8a69e5802
|
||||
private long inhabitedTime;
|
||||
/** @deprecated */
|
||||
@Nullable
|
||||
@@ -83,7 +83,8 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
@@ -86,7 +86,8 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
// CraftBukkit end
|
||||
|
||||
public ChunkAccess(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biome, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable BlendingData blendingData) {
|
||||
@ -6519,10 +6522,10 @@ index bfcaaa69991342f71fba4df46f69aea2ec6adca7..0ea0690ab1d45f60a2b13cf8a69e5802
|
||||
this.levelHeightAccessor = heightLimitView;
|
||||
this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()];
|
||||
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 28555314738ba891e0e36d3c85b1623116f743dd..f263022e1d15e78b51cfd148cf024b9a8c761898 100644
|
||||
index 5015d09de59cf184c98b1ea45f25a264c6dab1b1..73a99db6c31dec822514392a6102b7f8cc3b2738 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -24,6 +24,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
@@ -25,6 +25,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
|
||||
import net.minecraft.server.level.ChunkHolder;
|
||||
@ -6718,10 +6721,10 @@ index 28555314738ba891e0e36d3c85b1623116f743dd..f263022e1d15e78b51cfd148cf024b9a
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
index 37a75bb9b15356b6fb9c76c1bc1fff8e0a28b1dd..7c2e3331fac1de2e20974c8eed8aeeb9f2c92789 100644
|
||||
index 28e02151cb56141545c27d0cd9723e742fc420ad..ee0be5163811ea39efcb2092e5f126c3fd9b1523 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
@@ -73,6 +73,18 @@ public class ProtoChunk extends ChunkAccess {
|
||||
@@ -74,6 +74,18 @@ public class ProtoChunk extends ChunkAccess {
|
||||
return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks);
|
||||
}
|
||||
|
||||
@ -6963,7 +6966,7 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 5c5a0c6695fd68f16792995f9537e05b446ad7e9..8cb510615bc8b4638b4aadfd9732c9a3d65b1fac 100644
|
||||
index 950a6238f31d2c76a93831eb025092ecd8ab3a9b..bc89c976e763ec137066f8517dbcc1a3d43303bd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -97,8 +97,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@ -7000,10 +7003,10 @@ index 5c5a0c6695fd68f16792995f9537e05b446ad7e9..8cb510615bc8b4638b4aadfd9732c9a3
|
||||
|
||||
public static byte toLegacyData(BlockState data) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
index 939789831f14621800c6792d20119079fc51b6f1..9ab8159975f58a0014edbe3a368490b3590882ea 100644
|
||||
index b8d50fd20fea9f84af77de69391d670c7b6cf132..13e887e9d06c3eb8649613d1ecb3d26de6b9d6ef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
@@ -212,7 +212,23 @@ public class DummyGeneratorAccess implements WorldGenLevel {
|
||||
@@ -205,7 +205,23 @@ public class DummyGeneratorAccess implements WorldGenLevel {
|
||||
public FluidState getFluidState(BlockPos pos) {
|
||||
return Fluids.EMPTY.defaultFluidState(); // SPIGOT-6634
|
||||
}
|
||||
|
@ -36,10 +36,10 @@ index 0000000000000000000000000000000000000000..9f0c7fd903f085e70db1785fb8bcdb54
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 52eb344feee9c3bc34a6d22a32de174c52736fb5..0736454dea12d8ffe8ef6873c5d25d17a96504b0 100644
|
||||
index e778f4da8b3e33b6fc9bbe21a7cbc1f185130e69..e191f080e781473481712e27763ab80c04fe60ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -145,7 +145,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
@@ -148,7 +148,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
// CraftBukkit end
|
||||
|
||||
@ -48,7 +48,7 @@ index 52eb344feee9c3bc34a6d22a32de174c52736fb5..0736454dea12d8ffe8ef6873c5d25d17
|
||||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@@ -1963,12 +1963,32 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1968,12 +1968,32 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ index 52eb344feee9c3bc34a6d22a32de174c52736fb5..0736454dea12d8ffe8ef6873c5d25d17
|
||||
|
||||
protected abstract void readAdditionalSaveData(CompoundTag nbt);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 30adcc82bc4e2e7145d29b64fde952d694cdf1e1..d33c2d2ec285179614d21a255cea394682e4cc2c 100644
|
||||
index dec38e58e30c84887e9d29436c0f76c70c0a627d..53a8e9a63b2ea5f698acbd80b2eca9e3e3cfedb8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -23,7 +23,7 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
|
@ -745,37 +745,24 @@ index ca1a9884ab09fc7e575b1d30e2dd0aaff324fb73..b94038e2da0f986403c1ec9b27384344
|
||||
public CommandFunction(ResourceLocation id, CommandFunction.Entry[] elements) {
|
||||
this.id = id;
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
index b3a6aeba2363d283f03982cf749f25cfa11a5052..449f1b2f5dca350dc0912e14c8c2bf3eb4652b92 100644
|
||||
index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c44f999dd 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
@@ -3,6 +3,8 @@ package net.minecraft.network.protocol;
|
||||
import net.minecraft.network.PacketListener;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||
+import co.aikar.timings.Timing; // Paper
|
||||
|
||||
// CraftBukkit start
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@@ -23,10 +25,13 @@ public class PacketUtils {
|
||||
|
||||
public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T listener, BlockableEventLoop<?> engine) throws RunningOnDifferentThreadException {
|
||||
if (!engine.isSameThread()) {
|
||||
+ Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper - timings
|
||||
engine.execute(() -> {
|
||||
@@ -26,7 +26,8 @@ public class PacketUtils {
|
||||
engine.executeIfPossible(() -> {
|
||||
if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerGamePacketListenerImpl && ((ServerGamePacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590
|
||||
if (listener.getConnection().isConnected()) {
|
||||
+ try (Timing ignored = timing.startTiming()) { // Paper - timings
|
||||
packet.handle(listener);
|
||||
+ } // Paper - timings
|
||||
} else {
|
||||
PacketUtils.LOGGER.debug("Ignoring packet due to disconnection: {}", packet);
|
||||
}
|
||||
- try {
|
||||
+ co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
|
||||
+ try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
|
||||
packet.handle(listener);
|
||||
} catch (Exception exception) {
|
||||
if (listener.shouldPropagateHandlingExceptions()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754a8020219 100644
|
||||
index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9ef90b4d89 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -179,7 +179,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
||||
@@ -180,7 +180,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
||||
import org.bukkit.event.server.ServerLoadEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
@ -784,7 +771,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
import org.spigotmc.SlackActivityAccountant; // Spigot
|
||||
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
||||
@@ -898,6 +898,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -899,6 +899,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// CraftBukkit end
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
@ -792,7 +779,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@@ -1104,9 +1105,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1141,9 +1142,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
private boolean haveTime() {
|
||||
// CraftBukkit start
|
||||
@ -814,7 +801,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
private void executeModerately() {
|
||||
this.runAllTasks();
|
||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||
@@ -1114,9 +1127,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1151,9 +1164,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
protected void waitUntilNextTick() {
|
||||
@ -826,7 +813,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1202,10 +1215,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1239,10 +1252,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public void onServerExit() {}
|
||||
|
||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||
@ -846,7 +833,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
++this.tickCount;
|
||||
this.tickChildren(shouldKeepTicking);
|
||||
if (i - this.lastServerStatus >= 5000000000L) {
|
||||
@@ -1231,15 +1252,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1268,15 +1289,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
|
||||
@ -867,7 +854,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
this.profiler.push("tallying");
|
||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
||||
@@ -1250,30 +1274,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1287,30 +1311,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
this.slackActivityAccountant.tickEnded(l); // Spigot
|
||||
@ -906,7 +893,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
if (this.tickCount % 20 == 0) {
|
||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||
@@ -1281,7 +1304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1318,7 +1341,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
||||
}
|
||||
}
|
||||
@ -915,7 +902,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
@@ -1327,24 +1350,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1364,24 +1387,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
@ -947,7 +934,7 @@ index 8c2b1d1a1e7f2716ee27aa10165b94550dccd19a..eba857195121c58d1b63c58904fd4754
|
||||
this.profiler.pop();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
index 790594a831fad56aaac445702d297da170ea4f0a..4fe2e98804e42cb308bc688486cd808f5be96f62 100644
|
||||
index 2bf81de15b0a34ba85c46ffac8290a3b47576406..48205eb72c63fc22042ba4eef8bd1cf85ef61f8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
|
||||
@@ -90,7 +90,7 @@ public class ServerFunctionManager {
|
||||
@ -960,11 +947,11 @@ index 790594a831fad56aaac445702d297da170ea4f0a..4fe2e98804e42cb308bc688486cd808f
|
||||
i = this.context.runTopCommand(function, source);
|
||||
} finally {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 4dd57007af218ba1c0e666117a49939c5884f2c6..a6cb949b6f048455acc50c897fdd93d38152b53c 100644
|
||||
index ebd94265f56ecc946ff1834ec0d45673e010453e..1c0fefd539ef82d2d1b33a4974d67dc35ded0e1f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -63,8 +63,9 @@ import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.Level;
|
||||
@@ -66,8 +66,9 @@ import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.io.IoBuilder;
|
||||
import org.bukkit.command.CommandSender;
|
||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
@ -974,7 +961,7 @@ index 4dd57007af218ba1c0e666117a49939c5884f2c6..a6cb949b6f048455acc50c897fdd93d3
|
||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -445,7 +446,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -448,7 +449,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public void handleConsoleInputs() {
|
||||
@ -983,7 +970,7 @@ index 4dd57007af218ba1c0e666117a49939c5884f2c6..a6cb949b6f048455acc50c897fdd93d3
|
||||
while (!this.consoleInput.isEmpty()) {
|
||||
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
||||
|
||||
@@ -460,7 +461,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -463,7 +464,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@ -992,7 +979,7 @@ index 4dd57007af218ba1c0e666117a49939c5884f2c6..a6cb949b6f048455acc50c897fdd93d3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -696,6 +697,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -699,6 +700,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public String runCommand(String command) {
|
||||
@ -1000,7 +987,7 @@ index 4dd57007af218ba1c0e666117a49939c5884f2c6..a6cb949b6f048455acc50c897fdd93d3
|
||||
this.rconConsoleSource.prepareForCommand();
|
||||
this.executeBlocking(() -> {
|
||||
// CraftBukkit start - fire RemoteServerCommandEvent
|
||||
@@ -704,10 +706,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -707,10 +709,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
@ -1041,7 +1028,7 @@ index 4dd57007af218ba1c0e666117a49939c5884f2c6..a6cb949b6f048455acc50c897fdd93d3
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 504492c3889fab7b95eec3bcd9b0d1bcd619e8cf..5d1ac4e7afa0f1d9c9face049f768a2030eb411f 100644
|
||||
index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0e748ae44 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1,8 +1,10 @@
|
||||
@ -1055,7 +1042,7 @@ index 504492c3889fab7b95eec3bcd9b0d1bcd619e8cf..5d1ac4e7afa0f1d9c9face049f768a20
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Queues;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -652,11 +654,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -693,11 +695,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
private CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> scheduleChunkLoad(ChunkPos pos) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
@ -1073,7 +1060,7 @@ index 504492c3889fab7b95eec3bcd9b0d1bcd619e8cf..5d1ac4e7afa0f1d9c9face049f768a20
|
||||
boolean flag = nbttagcompound.contains("Status", 8);
|
||||
|
||||
if (flag) {
|
||||
@@ -667,7 +672,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -708,7 +713,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
ChunkMap.LOGGER.error("Chunk file at {} is missing level data, skipping", pos);
|
||||
@ -1082,7 +1069,7 @@ index 504492c3889fab7b95eec3bcd9b0d1bcd619e8cf..5d1ac4e7afa0f1d9c9face049f768a20
|
||||
} catch (ReportedException reportedexception) {
|
||||
Throwable throwable = reportedexception.getCause();
|
||||
|
||||
@@ -784,6 +789,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -825,6 +830,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
ChunkStatus chunkstatus = ChunkHolder.getStatus(chunkHolder.getTicketLevel());
|
||||
|
||||
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
|
||||
@ -1090,7 +1077,7 @@ index 504492c3889fab7b95eec3bcd9b0d1bcd619e8cf..5d1ac4e7afa0f1d9c9face049f768a20
|
||||
ChunkPos chunkcoordintpair = chunkHolder.getPos();
|
||||
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
|
||||
LevelChunk chunk;
|
||||
@@ -808,6 +814,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -849,6 +855,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
return chunk;
|
||||
@ -1098,7 +1085,7 @@ index 504492c3889fab7b95eec3bcd9b0d1bcd619e8cf..5d1ac4e7afa0f1d9c9face049f768a20
|
||||
});
|
||||
}, (runnable) -> {
|
||||
ProcessorHandle mailbox = this.mainThreadMailbox;
|
||||
@@ -1342,6 +1349,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1396,6 +1403,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
List<ServerPlayer> list = Lists.newArrayList();
|
||||
List<ServerPlayer> list1 = this.level.players();
|
||||
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
||||
@ -1106,7 +1093,7 @@ index 504492c3889fab7b95eec3bcd9b0d1bcd619e8cf..5d1ac4e7afa0f1d9c9face049f768a20
|
||||
|
||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
||||
|
||||
@@ -1366,14 +1374,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1420,14 +1428,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
||||
}
|
||||
}
|
||||
@ -1125,10 +1112,10 @@ index 504492c3889fab7b95eec3bcd9b0d1bcd619e8cf..5d1ac4e7afa0f1d9c9face049f768a20
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 9dd0eb49048ceccd82e139dac5d658d168694dda..a1740dd320967aa6d1ce84e081a1f2b9a1ee7d08 100644
|
||||
index 94d717f43336ace9375409b48d1e0e4291072656..3bbee4d08f4125a6499c0a8790c6bda6935e5ccc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -528,13 +528,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -524,13 +524,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
|
||||
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
|
||||
@ -1146,7 +1133,7 @@ index 9dd0eb49048ceccd82e139dac5d658d168694dda..a1740dd320967aa6d1ce84e081a1f2b9
|
||||
ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
return ichunkaccess1;
|
||||
}, (playerchunk_failure) -> {
|
||||
@@ -732,7 +734,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -728,7 +730,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
public void save(boolean flush) {
|
||||
this.runDistanceManagerUpdates();
|
||||
@ -1156,17 +1143,17 @@ index 9dd0eb49048ceccd82e139dac5d658d168694dda..a1740dd320967aa6d1ce84e081a1f2b9
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -770,7 +774,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.runDistanceManagerUpdates();
|
||||
@@ -767,7 +771,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
||||
this.level.getProfiler().popPush("chunks");
|
||||
+ this.level.timings.chunks.startTiming(); // Paper - timings
|
||||
this.tickChunks();
|
||||
+ this.level.timings.chunks.stopTiming(); // Paper - timings
|
||||
if (tickChunks) {
|
||||
+ this.level.timings.chunks.startTiming(); // Paper - timings
|
||||
this.tickChunks();
|
||||
+ this.level.timings.chunks.stopTiming(); // Paper - timings
|
||||
}
|
||||
|
||||
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
||||
this.level.getProfiler().popPush("unload");
|
||||
this.chunkMap.tick(shouldKeepTicking);
|
||||
@@ -797,13 +803,16 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -796,13 +802,16 @@ public class ServerChunkCache extends ChunkSource {
|
||||
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||
|
||||
gameprofilerfiller.push("naturalSpawnCount");
|
||||
@ -1183,7 +1170,7 @@ index 9dd0eb49048ceccd82e139dac5d658d168694dda..a1740dd320967aa6d1ce84e081a1f2b9
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
||||
@@ -832,27 +841,27 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -831,27 +840,27 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
|
||||
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
||||
@ -1217,7 +1204,7 @@ index 9dd0eb49048ceccd82e139dac5d658d168694dda..a1740dd320967aa6d1ce84e081a1f2b9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635eb46c5f31 100644
|
||||
index 71e01e8f7b1aa5b607ad37297dbc49e9953aa9be..d491d91e639028fdf9ee75da849d3084b665d93c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,6 +1,8 @@
|
||||
@ -1228,16 +1215,16 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
+import co.aikar.timings.Timings; // Paper
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
@@ -151,7 +153,6 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
@@ -152,7 +154,6 @@ import net.minecraft.world.ticks.LevelTicks;
|
||||
import org.slf4j.Logger;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.WeatherType;
|
||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.craftbukkit.util.WorldUUID;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
@@ -424,7 +425,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -427,7 +428,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.updateSkyBrightness();
|
||||
this.tickTime();
|
||||
gameprofilerfiller.popPush("tickPending");
|
||||
@ -1246,7 +1233,7 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
if (!this.isDebug()) {
|
||||
j = this.getGameTime();
|
||||
gameprofilerfiller.push("blockTicks");
|
||||
@@ -433,12 +434,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -436,12 +437,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
@ -1259,12 +1246,12 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
+ this.timings.raids.stopTiming(); // Paper - timings
|
||||
gameprofilerfiller.popPush("chunkSource");
|
||||
+ this.timings.chunkProviderTick.startTiming(); // Paper - timings
|
||||
this.getChunkSource().tick(shouldKeepTicking);
|
||||
this.getChunkSource().tick(shouldKeepTicking, true);
|
||||
+ this.timings.chunkProviderTick.stopTiming(); // Paper - timings
|
||||
gameprofilerfiller.popPush("blockEvents");
|
||||
timings.doSounds.startTiming(); // Spigot
|
||||
this.runBlockEvents();
|
||||
@@ -603,6 +608,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -606,6 +611,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("tickBlocks");
|
||||
@ -1272,7 +1259,7 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
if (randomTickSpeed > 0) {
|
||||
LevelChunkSection[] achunksection = chunk.getSections();
|
||||
int l = achunksection.length;
|
||||
@@ -635,6 +641,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -638,6 +644,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1280,7 +1267,7 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
|
||||
@@ -869,14 +876,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -872,14 +879,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void tickNonPassenger(Entity entity) {
|
||||
@ -1304,7 +1291,7 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
entity.setOldPosAndRot();
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
@@ -895,7 +910,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -898,7 +913,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.tickPassenger(entity, entity1);
|
||||
}
|
||||
@ -1313,7 +1300,7 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
|
||||
}
|
||||
|
||||
@@ -937,6 +952,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -940,6 +955,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
if (!savingDisabled) {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
|
||||
@ -1321,7 +1308,7 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
if (progressListener != null) {
|
||||
progressListener.progressStartNoAbort(new TranslatableComponent("menu.savingLevel"));
|
||||
}
|
||||
@@ -946,7 +962,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -949,7 +965,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
progressListener.progressStage(new TranslatableComponent("menu.savingChunks"));
|
||||
}
|
||||
|
||||
@ -1333,10 +1320,10 @@ index 073cea951644f25c276ba05ff1fc48fda08593da..c7fe4b6aa8d68bd5dc394752a5ae635e
|
||||
this.entityManager.saveAll();
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ee55db9770eb84792200b407defc04f0fd7b7e98..ea652f6394c7e575ce06a6b691d8b2c442eafb03 100644
|
||||
index c18bed4728f6813aa8d7cf4b1e5e53a092fb1354..443124a72eef9f60e2941b932a13471dbf1c4f72 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -207,6 +207,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
@@ -208,6 +208,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.inventory.SmithingInventory;
|
||||
@ -1344,7 +1331,7 @@ index ee55db9770eb84792200b407defc04f0fd7b7e98..ea652f6394c7e575ce06a6b691d8b2c4
|
||||
// CraftBukkit end
|
||||
|
||||
public class ServerGamePacketListenerImpl implements ServerPlayerConnection, ServerGamePacketListener {
|
||||
@@ -285,7 +286,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -286,7 +287,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit end
|
||||
|
||||
public void tick() {
|
||||
@ -1352,7 +1339,7 @@ index ee55db9770eb84792200b407defc04f0fd7b7e98..ea652f6394c7e575ce06a6b691d8b2c4
|
||||
this.resetPosition();
|
||||
this.player.xo = this.player.getX();
|
||||
this.player.yo = this.player.getY();
|
||||
@@ -361,7 +361,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -362,7 +362,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
||||
this.disconnect(new TranslatableComponent("multiplayer.disconnect.idling"));
|
||||
}
|
||||
@ -1360,7 +1347,7 @@ index ee55db9770eb84792200b407defc04f0fd7b7e98..ea652f6394c7e575ce06a6b691d8b2c4
|
||||
|
||||
}
|
||||
|
||||
@@ -1919,7 +1918,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1934,7 +1933,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit end
|
||||
|
||||
private void handleCommand(String input) {
|
||||
@ -1369,7 +1356,7 @@ index ee55db9770eb84792200b407defc04f0fd7b7e98..ea652f6394c7e575ce06a6b691d8b2c4
|
||||
// CraftBukkit start - whole method
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + input);
|
||||
@@ -1930,7 +1929,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1945,7 +1944,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -1378,7 +1365,7 @@ index ee55db9770eb84792200b407defc04f0fd7b7e98..ea652f6394c7e575ce06a6b691d8b2c4
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1943,7 +1942,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1958,7 +1957,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
@ -1388,7 +1375,7 @@ index ee55db9770eb84792200b407defc04f0fd7b7e98..ea652f6394c7e575ce06a6b691d8b2c4
|
||||
// this.server.getCommands().performCommand(this.player.createCommandSourceStack(), s);
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 8e4325abb2dda74c38b17bb27f9dcfcf97ba2de6..1be4b3ad18d314b0460ce61e01afd0d7d16aee69 100644
|
||||
index ea119e5849c90b25b7e836eb5e7454a391865b81..5fa0ce6a7f6b8df8993315a9784764f57d59bcf4 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -1412,10 +1399,10 @@ index 8e4325abb2dda74c38b17bb27f9dcfcf97ba2de6..1be4b3ad18d314b0460ce61e01afd0d7
|
||||
|
||||
public UserWhiteList getWhiteList() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 521e525cac2109a79370321163f4f27ffefb49ad..c9ab40355f02a2abfe10d9c02595e6b761b1a779 100644
|
||||
index e191f080e781473481712e27763ab80c04fe60ab..04692fe4e7f2107ffc8c48cebdf88e18e58f4ce9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -125,7 +125,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||
@@ -128,7 +128,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||
import org.bukkit.entity.Hanging;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
@ -1423,7 +1410,7 @@ index 521e525cac2109a79370321163f4f27ffefb49ad..c9ab40355f02a2abfe10d9c02595e6b7
|
||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||
@@ -292,7 +291,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -295,7 +294,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
|
||||
public boolean persistentInvisibility = false;
|
||||
public BlockPos lastLavaContact;
|
||||
@ -1431,7 +1418,7 @@ index 521e525cac2109a79370321163f4f27ffefb49ad..c9ab40355f02a2abfe10d9c02595e6b7
|
||||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -740,7 +738,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -744,7 +742,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
|
||||
public void move(MoverType movementType, Vec3 movement) {
|
||||
@ -1439,7 +1426,7 @@ index 521e525cac2109a79370321163f4f27ffefb49ad..c9ab40355f02a2abfe10d9c02595e6b7
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -893,7 +890,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -906,7 +903,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
this.level.getProfiler().pop();
|
||||
}
|
||||
}
|
||||
@ -1448,10 +1435,10 @@ index 521e525cac2109a79370321163f4f27ffefb49ad..c9ab40355f02a2abfe10d9c02595e6b7
|
||||
|
||||
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index e688949fc2f3031dc9c9817bc59554e9f5a436af..20cfdba68c200e87d00995a6a4e25a5fa8171f6c 100644
|
||||
index d790c37753f019b682fe00bea392359ba18bf204..8699a3bd63e2df83615ae39a6873d9874f0fb8da 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -293,7 +293,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -296,7 +296,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
return Registry.ENTITY_TYPE.getOptional(ResourceLocation.tryParse(id));
|
||||
}
|
||||
|
||||
@ -1463,10 +1450,10 @@ index e688949fc2f3031dc9c9817bc59554e9f5a436af..20cfdba68c200e87d00995a6a4e25a5f
|
||||
+ }
|
||||
+ public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, String id) {
|
||||
+ // Paper end
|
||||
this.builtInRegistryHolder = Registry.ENTITY_TYPE.createIntrusiveHolder(this);
|
||||
this.factory = factory;
|
||||
this.category = spawnGroup;
|
||||
this.canSpawnFarFromPlayer = spawnableFarFromPlayer;
|
||||
@@ -304,6 +311,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -308,6 +315,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
this.dimensions = dimensions;
|
||||
this.clientTrackingRange = maxTrackDistance;
|
||||
this.updateInterval = trackTickInterval;
|
||||
@ -1481,7 +1468,7 @@ index e688949fc2f3031dc9c9817bc59554e9f5a436af..20cfdba68c200e87d00995a6a4e25a5f
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -564,6 +579,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -568,6 +583,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
return this.updateInterval;
|
||||
}
|
||||
|
||||
@ -1494,7 +1481,7 @@ index e688949fc2f3031dc9c9817bc59554e9f5a436af..20cfdba68c200e87d00995a6a4e25a5f
|
||||
public boolean trackDeltas() {
|
||||
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
||||
}
|
||||
@@ -656,7 +677,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -666,7 +687,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
Util.fetchChoiceType(References.ENTITY_TREE, id);
|
||||
}
|
||||
|
||||
@ -1504,10 +1491,10 @@ index e688949fc2f3031dc9c9817bc59554e9f5a436af..20cfdba68c200e87d00995a6a4e25a5f
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4f670ff72 100644
|
||||
index c94c62e7e32f55d322ddfed930e1aaa6c1343b29..d9244b1d0ac1ae52aa9692884260cce5e2bc74bb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -137,7 +137,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@@ -139,7 +139,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
@ -1516,7 +1503,7 @@ index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4
|
||||
|
||||
public abstract class LivingEntity extends Entity {
|
||||
|
||||
@@ -2759,7 +2759,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2762,7 +2762,6 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -1524,7 +1511,7 @@ index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4
|
||||
super.tick();
|
||||
this.updatingUsingItem();
|
||||
this.updateSwimAmount();
|
||||
@@ -2800,9 +2799,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2803,9 +2802,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1534,7 +1521,7 @@ index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4
|
||||
double d0 = this.getX() - this.xo;
|
||||
double d1 = this.getZ() - this.zo;
|
||||
float f = (float) (d0 * d0 + d1 * d1);
|
||||
@@ -2882,8 +2879,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2885,8 +2882,6 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.isSleeping()) {
|
||||
this.setXRot(0.0F);
|
||||
}
|
||||
@ -1543,7 +1530,7 @@ index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4
|
||||
}
|
||||
|
||||
public void detectEquipmentUpdates() {
|
||||
@@ -3065,7 +3060,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3068,7 +3063,6 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
this.setDeltaMovement(d4, d5, d6);
|
||||
this.level.getProfiler().push("ai");
|
||||
@ -1551,7 +1538,7 @@ index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4
|
||||
if (this.isImmobile()) {
|
||||
this.jumping = false;
|
||||
this.xxa = 0.0F;
|
||||
@@ -3075,7 +3069,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3078,7 +3072,6 @@ public abstract class LivingEntity extends Entity {
|
||||
this.serverAiStep();
|
||||
this.level.getProfiler().pop();
|
||||
}
|
||||
@ -1559,7 +1546,7 @@ index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4
|
||||
|
||||
this.level.getProfiler().pop();
|
||||
this.level.getProfiler().push("jump");
|
||||
@@ -3110,9 +3103,9 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3113,9 +3106,9 @@ public abstract class LivingEntity extends Entity {
|
||||
this.updateFallFlying();
|
||||
AABB axisalignedbb = this.getBoundingBox();
|
||||
|
||||
@ -1571,7 +1558,7 @@ index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4
|
||||
this.level.getProfiler().pop();
|
||||
this.level.getProfiler().push("freezing");
|
||||
boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES);
|
||||
@@ -3141,9 +3134,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3144,9 +3137,7 @@ public abstract class LivingEntity extends Entity {
|
||||
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
||||
}
|
||||
|
||||
@ -1582,10 +1569,10 @@ index a3b6883d7fc856ed8550ffb7aa8dd929922853e2..59bb2aafcbc1a4a5c963ef0391b4e9b4
|
||||
if (!this.level.isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
|
||||
this.hurt(DamageSource.DROWN, 1.0F);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index ff001049d71127a0b9e7a9d73996be02ec0ad044..72fd18a307a7e1f769195c7ef44a12bb47f2f49c 100644
|
||||
index 47f625a30f3f2aa95d94f571abf5af95eee68912..d097223e30de74d5347792fb6d0eecb254099f73 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -83,7 +83,6 @@ import org.bukkit.Bukkit;
|
||||
@@ -81,7 +81,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
@ -1593,7 +1580,7 @@ index ff001049d71127a0b9e7a9d73996be02ec0ad044..72fd18a307a7e1f769195c7ef44a12bb
|
||||
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
||||
import org.bukkit.craftbukkit.block.CraftBlockState;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
@@ -149,7 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -147,7 +146,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
|
||||
@ -1602,7 +1589,7 @@ index ff001049d71127a0b9e7a9d73996be02ec0ad044..72fd18a307a7e1f769195c7ef44a12bb
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
@@ -239,7 +238,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -238,7 +237,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
|
||||
});
|
||||
// CraftBukkit end
|
||||
@ -1611,7 +1598,7 @@ index ff001049d71127a0b9e7a9d73996be02ec0ad044..72fd18a307a7e1f769195c7ef44a12bb
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
@@ -728,15 +727,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -727,15 +726,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
timings.tileEntityTick.stopTiming(); // Spigot
|
||||
this.tickingBlockEntities = false;
|
||||
@ -1629,10 +1616,10 @@ index ff001049d71127a0b9e7a9d73996be02ec0ad044..72fd18a307a7e1f769195c7ef44a12bb
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index c9e6cb9f5c3eae53140236e09768ff759e27ace0..5147f67c87ba3b8912a8ae24f876a9e996504600 100644
|
||||
index e72f44910f7390da9e2d78c5bb8f14d5abf9562b..54125cf5957f8165551e077c47d02b7daa578efb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -88,6 +88,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -89,6 +89,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
public static final int UPDATE_LIMIT = 512;
|
||||
protected final StateDefinition<Block, BlockState> stateDefinition;
|
||||
private BlockState defaultBlockState;
|
||||
@ -1649,7 +1636,7 @@ index c9e6cb9f5c3eae53140236e09768ff759e27ace0..5147f67c87ba3b8912a8ae24f876a9e9
|
||||
private String descriptionId;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index d33c2d2ec285179614d21a255cea394682e4cc2c..65aedffad9bef4ab80eb835e9c05b6d411f6bb15 100644
|
||||
index 53a8e9a63b2ea5f698acbd80b2eca9e3e3cfedb8..a35e3f54cbec83e8c691b6f61d4e1ac1ece6156d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -22,10 +22,12 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
@ -1667,7 +1654,7 @@ index d33c2d2ec285179614d21a255cea394682e4cc2c..65aedffad9bef4ab80eb835e9c05b6d4
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index f263022e1d15e78b51cfd148cf024b9a8c761898..52eda58a085d0a7b6329dd4791e05edf2f644df3 100644
|
||||
index 73a99db6c31dec822514392a6102b7f8cc3b2738..5496c9ae4af9658164098356532da47351808b51 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -661,6 +661,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -1687,10 +1674,10 @@ index f263022e1d15e78b51cfd148cf024b9a8c761898..52eda58a085d0a7b6329dd4791e05edf
|
||||
}
|
||||
}
|
||||
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 ed639dbb4ea94839390778654c7dd0437bac41ac..1729af83b979e35a585c8d049b14dc23ddf23803 100644
|
||||
index 95abf42577725383a2b49242c28b81beef487ee5..4e5cfc508e356691a9a249013553f97e77c213b0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -488,13 +488,10 @@ public class ChunkSerializer {
|
||||
@@ -490,13 +490,10 @@ public class ChunkSerializer {
|
||||
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
|
||||
|
||||
return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
|
||||
@ -1704,7 +1691,7 @@ index ed639dbb4ea94839390778654c7dd0437bac41ac..1729af83b979e35a585c8d049b14dc23
|
||||
if (nbttaglist1 != null) {
|
||||
for (int i = 0; i < nbttaglist1.size(); ++i) {
|
||||
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
|
||||
@@ -512,7 +509,6 @@ public class ChunkSerializer {
|
||||
@@ -514,7 +511,6 @@ public class ChunkSerializer {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1713,10 +1700,10 @@ index ed639dbb4ea94839390778654c7dd0437bac41ac..1729af83b979e35a585c8d049b14dc23
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 355a6af98163079bc60c77d6fb88cd7023264a1b..20d80a7320c6ab9f9e9bd245c4a6e0542b670758 100644
|
||||
index eac877cda0cd37d8717c770b86b590213ee0567e..14b028b75470b164e64a60cc47a2938ba54b3652 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2288,12 +2288,31 @@ public final class CraftServer implements Server {
|
||||
@@ -2280,12 +2280,31 @@ public final class CraftServer implements Server {
|
||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||
{
|
||||
|
||||
@ -2114,7 +2101,7 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae
|
||||
this.value = value;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 8cb510615bc8b4638b4aadfd9732c9a3d65b1fac..e0ba1608d83c6007717df3323b916a92906f5a17 100644
|
||||
index bc89c976e763ec137066f8517dbcc1a3d43303bd..c7a8e3b4ff46727d7f186497ff0288284eaa6d3b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -182,6 +182,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 20d80a7320c6ab9f9e9bd245c4a6e0542b670758..c9521d383c77eab823072c0d7569b76b75678d28 100644
|
||||
index 14b028b75470b164e64a60cc47a2938ba54b3652..1fe657645c118bc381aeeda0265893a3d4644025 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -402,10 +402,15 @@ public final class CraftServer implements Server {
|
||||
@@ -398,10 +398,15 @@ public final class CraftServer implements Server {
|
||||
public void loadPlugins() {
|
||||
this.pluginManager.registerInterface(JavaPluginLoader.class);
|
||||
|
||||
@ -29,7 +29,7 @@ index 20d80a7320c6ab9f9e9bd245c4a6e0542b670758..c9521d383c77eab823072c0d7569b76b
|
||||
for (Plugin plugin : plugins) {
|
||||
try {
|
||||
String message = String.format("Loading %s", plugin.getDescription().getFullName());
|
||||
@@ -420,6 +425,35 @@ public final class CraftServer implements Server {
|
||||
@@ -416,6 +421,35 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ index 20d80a7320c6ab9f9e9bd245c4a6e0542b670758..c9521d383c77eab823072c0d7569b76b
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 399e878210606e9addb535e4efed0ddb424160e8..707544dfd83839634dc4c1afc8e21c5c6c3d8140 100644
|
||||
index 70aa37fe043f56ef1b2f722ca946c4ac2cf4a98b..cf85183a4026fca981fcb44896d7210b5fc31c2f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -136,6 +136,12 @@ public class Main {
|
||||
|
@ -7,7 +7,7 @@ Co-authored-by: zml <zml@stellardrift.ca>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 756a2ab6ad416f55fa3864cff9818473840b04fc..701a2ffd04df48d437b2cb963dd150af99725b6e 100644
|
||||
index cc4c008a99bf5a16614d445d2a5e75ce2d5dedb5..043fd38598e36bb96e6d3ab1ab0966435c9aa61b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -225,4 +225,13 @@ public class PaperConfig {
|
||||
@ -1045,10 +1045,10 @@ index d5d94ea8070ab5f66f0a3244a5a953b9c9d5c527..0053474ab7c25de6d86c16e3079feb21
|
||||
|
||||
public <T extends Enum<T>> T readEnum(Class<T> enumClass) {
|
||||
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
index b964121f19e6a28df7675e65441c551a55316753..dfeff0da932b0d66b70f3a5dd281c926c048f2f0 100644
|
||||
index 021a26a6b1c258deffc26c035ab52a4ea027d9a1..00d432bd395e7f7fb6ee24e371818d13892b2f0c 100644
|
||||
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.network;
|
||||
@@ -4,6 +4,7 @@ import com.mojang.logging.LogUtils;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.MessageToByteEncoder;
|
||||
@ -1056,7 +1056,7 @@ index b964121f19e6a28df7675e65441c551a55316753..dfeff0da932b0d66b70f3a5dd281c926
|
||||
import java.io.IOException;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.PacketFlow;
|
||||
@@ -36,6 +37,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
@@ -33,6 +34,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
} else {
|
||||
FriendlyByteBuf friendlyByteBuf = new FriendlyByteBuf(byteBuf);
|
||||
friendlyByteBuf.writeVarInt(integer);
|
||||
@ -1218,7 +1218,7 @@ index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490
|
||||
buf.writeComponent(this.footer);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 925ffbddd5475be7fe00570d861b615f707434b4..a3436596d05547a60c9906c92f709bb56a9175bd 100644
|
||||
index 9d7d7a44616b2b7849c1abd3b9ac77305fdb0815..592b288c5ded992dc3fdf0db5ed0845884c5be93 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -145,6 +145,7 @@ import net.minecraft.world.scores.Score;
|
||||
@ -1292,11 +1292,11 @@ index 925ffbddd5475be7fe00570d861b615f707434b4..a3436596d05547a60c9906c92f709bb5
|
||||
// CraftBukkit end
|
||||
this.chatVisibility = packet.chatVisibility();
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ea652f6394c7e575ce06a6b691d8b2c442eafb03..306af349e96967d21ee0dda9cac04d4507bf5b00 100644
|
||||
index 443124a72eef9f60e2941b932a13471dbf1c4f72..9b47d8ab57c3b290173247ba25ad7668f3529903 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -154,6 +154,8 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -155,6 +155,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
+import io.papermc.paper.adventure.ChatProcessor; // Paper
|
||||
@ -1304,7 +1304,7 @@ index ea652f6394c7e575ce06a6b691d8b2c442eafb03..306af349e96967d21ee0dda9cac04d45
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import net.minecraft.world.entity.animal.Bucketable;
|
||||
@@ -382,21 +384,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -383,21 +385,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
return this.server.isSingleplayerOwner(this.player.getGameProfile());
|
||||
}
|
||||
|
||||
@ -1337,7 +1337,7 @@ index ea652f6394c7e575ce06a6b691d8b2c442eafb03..306af349e96967d21ee0dda9cac04d45
|
||||
|
||||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -407,8 +412,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -408,8 +413,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
return;
|
||||
}
|
||||
// Send the possibly modified leave message
|
||||
@ -1347,7 +1347,7 @@ index ea652f6394c7e575ce06a6b691d8b2c442eafb03..306af349e96967d21ee0dda9cac04d45
|
||||
// CraftBukkit end
|
||||
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), (future) -> {
|
||||
@@ -1669,9 +1673,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1684,9 +1688,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
*/
|
||||
|
||||
this.player.disconnect();
|
||||
@ -1362,7 +1362,7 @@ index ea652f6394c7e575ce06a6b691d8b2c442eafb03..306af349e96967d21ee0dda9cac04d45
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.player.getTextFilter().leave();
|
||||
@@ -1853,7 +1859,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1868,7 +1874,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.handleCommand(s);
|
||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
@ -1376,7 +1376,7 @@ index ea652f6394c7e575ce06a6b691d8b2c442eafb03..306af349e96967d21ee0dda9cac04d45
|
||||
Player player = this.getCraftPlayer();
|
||||
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -2643,30 +2654,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2667,30 +2678,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1416,18 +1416,10 @@ index ea652f6394c7e575ce06a6b691d8b2c442eafb03..306af349e96967d21ee0dda9cac04d45
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 8cf42a52732301d0216a348f588d58877d60cb0d..08e7fd48514f9a6e89efc0d8adcbcf14bc92b103 100644
|
||||
index 2b9b60c0010069916dbecd22efdb9cec71180363..627931ec09bfb1a84f0659981491cf3b6425aa32 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -36,6 +36,7 @@ import net.minecraft.world.entity.player.Player;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
+import io.papermc.paper.adventure.PaperAdventure; // Paper
|
||||
import org.bukkit.craftbukkit.util.Waitable;
|
||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
||||
import org.bukkit.event.player.PlayerPreLoginEvent;
|
||||
@@ -316,7 +317,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
@@ -323,7 +323,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
|
||||
final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
|
||||
if (asyncEvent.getResult() != PlayerPreLoginEvent.Result.ALLOWED) {
|
||||
@ -1436,18 +1428,18 @@ index 8cf42a52732301d0216a348f588d58877d60cb0d..08e7fd48514f9a6e89efc0d8adcbcf14
|
||||
}
|
||||
Waitable<PlayerPreLoginEvent.Result> waitable = new Waitable<PlayerPreLoginEvent.Result>() {
|
||||
@Override
|
||||
@@ -327,12 +328,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
@@ -334,12 +334,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
|
||||
ServerLoginPacketListenerImpl.this.server.processQueue.add(waitable);
|
||||
if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
|
||||
- ServerLoginPacketListenerImpl.this.disconnect(event.getKickMessage());
|
||||
+ ServerLoginPacketListenerImpl.this.disconnect(PaperAdventure.asVanilla(event.kickMessage())); // Paper - Adventure
|
||||
+ ServerLoginPacketListenerImpl.this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.kickMessage())); // Paper - Adventure
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (asyncEvent.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) {
|
||||
- ServerLoginPacketListenerImpl.this.disconnect(asyncEvent.getKickMessage());
|
||||
+ ServerLoginPacketListenerImpl.this.disconnect(PaperAdventure.asVanilla(asyncEvent.kickMessage())); // Paper - Adventure
|
||||
+ ServerLoginPacketListenerImpl.this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(asyncEvent.kickMessage())); // Paper - Adventure
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1465,10 +1457,10 @@ index c9a8d64ef23def0ad8e986a97c34331b8d54c205..2b24a41587fbe1fba70a0ab42d3dc333
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1be4b3ad18d314b0460ce61e01afd0d7d16aee69..96e1618a55597b0a3ac533a3610ba146395b5725 100644
|
||||
index 5fa0ce6a7f6b8df8993315a9784764f57d59bcf4..bfec1beb0af39e2af6be7c6423bf1eaab32e1062 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -8,6 +8,7 @@ import com.mojang.authlib.GameProfile;
|
||||
@@ -9,6 +9,7 @@ import com.mojang.logging.LogUtils;
|
||||
import com.mojang.serialization.DataResult;
|
||||
import com.mojang.serialization.Dynamic;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@ -1476,8 +1468,8 @@ index 1be4b3ad18d314b0460ce61e01afd0d7d16aee69..96e1618a55597b0a3ac533a3610ba146
|
||||
import java.io.File;
|
||||
import java.net.SocketAddress;
|
||||
import java.nio.file.Path;
|
||||
@@ -91,6 +92,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -91,6 +92,7 @@ import net.minecraft.world.scores.Team;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
+import io.papermc.paper.adventure.PaperAdventure; // Paper
|
||||
@ -1589,7 +1581,7 @@ index 1be4b3ad18d314b0460ce61e01afd0d7d16aee69..96e1618a55597b0a3ac533a3610ba146
|
||||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/BossEvent.java b/src/main/java/net/minecraft/world/BossEvent.java
|
||||
index d289e8321a62f7c8d1e5b83f038e7331a26fc24e..58716ba8f8d12a410bdc66ccef6a61c62fddfbb7 100644
|
||||
index 4c62df5a3781ec9df4a5c5f1b528649e6e8a62d1..affd1b8c7589ba59330dc0b6fc803cce4ee57397 100644
|
||||
--- a/src/main/java/net/minecraft/world/BossEvent.java
|
||||
+++ b/src/main/java/net/minecraft/world/BossEvent.java
|
||||
@@ -13,6 +13,7 @@ public abstract class BossEvent {
|
||||
@ -1618,9 +1610,9 @@ index d289e8321a62f7c8d1e5b83f038e7331a26fc24e..58716ba8f8d12a410bdc66ccef6a61c6
|
||||
return this.progress;
|
||||
}
|
||||
|
||||
public void setProgress(float percentage) {
|
||||
+ if (this.adventure != null) this.adventure.progress(percentage); // Paper
|
||||
this.progress = percentage;
|
||||
public void setProgress(float percent) {
|
||||
+ if (this.adventure != null) this.adventure.progress(percent); // Paper
|
||||
this.progress = percent;
|
||||
}
|
||||
|
||||
public BossEvent.BossBarColor getColor() {
|
||||
@ -1677,11 +1669,11 @@ index d289e8321a62f7c8d1e5b83f038e7331a26fc24e..58716ba8f8d12a410bdc66ccef6a61c6
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index 9af14095fa8dbc75fadb84c5a1d263039994e441..3b35ec1df648a3de920ea0c15962388044737bbc 100644
|
||||
index 595b56b2ab9a813ba71399d306117294fa90dc65..3527d40102d512d0e276edc969ea3c189aa34ec2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -33,6 +33,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -33,6 +33,7 @@ import net.minecraft.world.level.saveddata.SavedData;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
+import io.papermc.paper.adventure.PaperAdventure; // Paper
|
||||
@ -1698,10 +1690,10 @@ index 9af14095fa8dbc75fadb84c5a1d263039994e441..3b35ec1df648a3de920ea0c159623880
|
||||
}
|
||||
collection = icons;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f8441276c7b 100644
|
||||
index 1fe657645c118bc381aeeda0265893a3d4644025..e577c2fb100c217faeaf2d85d6a4374d6de047e1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -623,8 +623,10 @@ public final class CraftServer implements Server {
|
||||
@@ -619,8 +619,10 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1712,7 +1704,7 @@ index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f84
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1457,7 +1459,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1449,7 +1451,15 @@ public final class CraftServer implements Server {
|
||||
return this.configuration.getInt("settings.spawn-radius", -1);
|
||||
}
|
||||
|
||||
@ -1728,7 +1720,7 @@ index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f84
|
||||
public String getShutdownMessage() {
|
||||
return this.configuration.getString("settings.shutdown-message");
|
||||
}
|
||||
@@ -1615,7 +1625,20 @@ public final class CraftServer implements Server {
|
||||
@@ -1607,7 +1617,20 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1749,7 +1741,7 @@ index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f84
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
||||
@@ -1623,14 +1646,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1615,14 +1638,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1766,7 +1758,7 @@ index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f84
|
||||
|
||||
for (CommandSender recipient : recipients) {
|
||||
recipient.sendMessage(message);
|
||||
@@ -1881,6 +1904,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1873,6 +1896,14 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
||||
}
|
||||
|
||||
@ -1781,7 +1773,7 @@ index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f84
|
||||
@Override
|
||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
Validate.isTrue(type.isCreatable(), "Cannot open an inventory of type ", type);
|
||||
@@ -1893,13 +1924,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1885,13 +1916,28 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||
}
|
||||
|
||||
@ -1810,7 +1802,7 @@ index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f84
|
||||
public Merchant createMerchant(String title) {
|
||||
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
||||
}
|
||||
@@ -1959,6 +2005,12 @@ public final class CraftServer implements Server {
|
||||
@@ -1951,6 +1997,12 @@ public final class CraftServer implements Server {
|
||||
return Thread.currentThread().equals(console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||
}
|
||||
|
||||
@ -1823,7 +1815,7 @@ index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f84
|
||||
@Override
|
||||
public String getMotd() {
|
||||
return this.console.getMotd();
|
||||
@@ -2402,5 +2454,15 @@ public final class CraftServer implements Server {
|
||||
@@ -2394,5 +2446,15 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1840,10 +1832,10 @@ index c9521d383c77eab823072c0d7569b76b75678d28..66bceb7bd8aa4aa1d398d4d011d59f84
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 962ee738a4cce4d3bd87bfb9b481c6f158ee9756..1d0c745673bfb14966c6d644825604260f2bc69f 100644
|
||||
index 794ed40db102370338ee227ffa4e1801fd741284..5963fa56e7dcd61336a14fa1035c6c14143989ad 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -139,6 +139,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -142,6 +142,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this);
|
||||
private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>();
|
||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
|
||||
@ -1851,7 +1843,7 @@ index 962ee738a4cce4d3bd87bfb9b481c6f158ee9756..1d0c745673bfb14966c6d64482560426
|
||||
|
||||
private static final Random rand = new Random();
|
||||
|
||||
@@ -1859,4 +1860,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1862,4 +1863,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -1871,7 +1863,7 @@ index 962ee738a4cce4d3bd87bfb9b481c6f158ee9756..1d0c745673bfb14966c6d64482560426
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 707544dfd83839634dc4c1afc8e21c5c6c3d8140..c508bfb68bb4bfd06aa0cefa5bfc0bec725a6b03 100644
|
||||
index cf85183a4026fca981fcb44896d7210b5fc31c2f..7e5fc58f43836edab3696b9644264434c5a95a2f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -19,6 +19,12 @@ public class Main {
|
||||
@ -3520,7 +3512,7 @@ index f9b7b8f7ccc95b73967a51420fd6ce88d80d75fe..0de5a46423ae0403dcbfca630dfd7c5a
|
||||
|
||||
boolean hadFormat = false;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index e0ba1608d83c6007717df3323b916a92906f5a17..aea6f16d767a7cc7934688b550376338c63fd807 100644
|
||||
index c7a8e3b4ff46727d7f186497ff0288284eaa6d3b..964d15cd3b61a33868e5a9e38d21d97ec144bcad 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -66,6 +66,38 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
@ -28,10 +28,10 @@ index 4adf44026fc6269934dfa4513f06a7f8a3b41f90..791ccdebd5d37afd83eb87671034b355
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BambooBlock.java b/src/main/java/net/minecraft/world/level/block/BambooBlock.java
|
||||
index 517140666109ae27177c70ca0a41b0a9f636c9c6..1f2d9ae9593193b478375b7b03d6f9fda80a8bca 100644
|
||||
index f088f866b8f28d2627e4a60527a1f8dfa243bb47..482d6cd1065df5b0703301d403efb42ca4d5363b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BambooBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BambooBlock.java
|
||||
@@ -136,7 +136,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
@@ -135,7 +135,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
if (random.nextInt(Math.max(1, (int) (100.0F / world.spigotConfig.bambooModifier) * 3)) == 0 && world.isEmptyBlock(pos.above()) && world.getRawBrightness(pos.above(), 0) >= 9) { // Spigot
|
||||
int i = this.getHeightBelowUpToMax(world, pos) + 1;
|
||||
|
||||
@ -40,7 +40,7 @@ index 517140666109ae27177c70ca0a41b0a9f636c9c6..1f2d9ae9593193b478375b7b03d6f9fd
|
||||
this.growBamboo(state, world, pos, random, i);
|
||||
}
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
@@ -166,7 +166,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
int i = this.getHeightAboveUpToMax(world, pos);
|
||||
int j = this.getHeightBelowUpToMax(world, pos);
|
||||
|
||||
@ -49,7 +49,7 @@ index 517140666109ae27177c70ca0a41b0a9f636c9c6..1f2d9ae9593193b478375b7b03d6f9fd
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -186,7 +186,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
@@ -185,7 +185,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
BlockPos blockposition1 = pos.above(i);
|
||||
BlockState iblockdata1 = world.getBlockState(blockposition1);
|
||||
|
||||
@ -58,7 +58,7 @@ index 517140666109ae27177c70ca0a41b0a9f636c9c6..1f2d9ae9593193b478375b7b03d6f9fd
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
@@ -226,7 +226,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
}
|
||||
|
||||
int j = (Integer) state.getValue(BambooBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
|
||||
@ -67,7 +67,7 @@ index 517140666109ae27177c70ca0a41b0a9f636c9c6..1f2d9ae9593193b478375b7b03d6f9fd
|
||||
|
||||
// CraftBukkit start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooBlock.AGE, j)).setValue(BambooBlock.LEAVES, blockpropertybamboosize)).setValue(BambooBlock.STAGE, k), 3)) {
|
||||
@@ -242,7 +242,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
@@ -241,7 +241,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
protected int getHeightAboveUpToMax(BlockGetter world, BlockPos pos) {
|
||||
int i;
|
||||
|
||||
@ -76,7 +76,7 @@ index 517140666109ae27177c70ca0a41b0a9f636c9c6..1f2d9ae9593193b478375b7b03d6f9fd
|
||||
;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
@@ -251,7 +251,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
|
||||
protected int getHeightBelowUpToMax(BlockGetter world, BlockPos pos) {
|
||||
int i;
|
||||
|
||||
@ -86,10 +86,10 @@ index 517140666109ae27177c70ca0a41b0a9f636c9c6..1f2d9ae9593193b478375b7b03d6f9fd
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
index a851df8e25781963edb066c46ae75a87ef63a66d..00ada22889dafb7ae8e8740cd3eb8370fbb417eb 100644
|
||||
index b6b769fb354187cb31f878b87cce63049c0c7cf8..f1bbfc85582d29a50a82f9207509985dcb76b693 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
@@ -56,7 +56,7 @@ public class CactusBlock extends Block {
|
||||
@@ -55,7 +55,7 @@ public class CactusBlock extends Block {
|
||||
;
|
||||
}
|
||||
|
||||
@ -99,10 +99,10 @@ index a851df8e25781963edb066c46ae75a87ef63a66d..00ada22889dafb7ae8e8740cd3eb8370
|
||||
|
||||
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
index f57884fa5f0fbbdbf35c22e692da4f9b6f3f98cc..9b30b359f1559e5f97c3b2a7acffda5b39605e6b 100644
|
||||
index d40492e9729f165ed944ab2c9fa81cde042ce49c..66c06e0f7c8d223a2b00bab57a15e3a705fe176a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
@@ -53,7 +53,7 @@ public class SugarCaneBlock extends Block {
|
||||
@@ -52,7 +52,7 @@ public class SugarCaneBlock extends Block {
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,10 @@ index ec3fb557fa31b153de20c4990066182a774dd489..5896b4e4646d722db5622a424fa26f42
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index 73c5a0e6f1db6bf438fe516e213f40f0645ed954..b11f97e4ecc8d623d8a8a69e9e7a6205b96072f1 100644
|
||||
index 67fe1a436ca7b0069fabc3a1bfd0206babf07b8a..24192a91d9f5c890a316ec150d4aec84073cb61a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -82,6 +82,10 @@ public class FishingHook extends Projectile {
|
||||
@@ -85,6 +85,10 @@ public class FishingHook extends Projectile {
|
||||
this.noCulling = true;
|
||||
this.luck = Math.max(0, luckOfTheSeaLevel);
|
||||
this.lureSpeed = Math.max(0, lureLevel);
|
||||
@ -36,7 +36,7 @@ index 73c5a0e6f1db6bf438fe516e213f40f0645ed954..b11f97e4ecc8d623d8a8a69e9e7a6205
|
||||
}
|
||||
|
||||
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
|
||||
@@ -397,7 +401,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -400,7 +404,7 @@ public class FishingHook extends Projectile {
|
||||
} else {
|
||||
// CraftBukkit start - logic to modify fishing wait time
|
||||
this.timeUntilLured = Mth.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
|
||||
|
@ -19,10 +19,10 @@ index 5896b4e4646d722db5622a424fa26f42d3f8d9ff..0a6e98ca5534430540044a32c280e568
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 68ccbc193ff6682f505928dc0a29ee990349d299..3321df3bcc0b92277dc18b7f6efa42393e657a52 100644
|
||||
index 04692fe4e7f2107ffc8c48cebdf88e18e58f4ce9..8a4f4582a6bd69016a36d611f9c4ac2262f7f3ec 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1265,6 +1265,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -1278,6 +1278,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
return this.isInWater() || this.isInRain();
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ index 68ccbc193ff6682f505928dc0a29ee990349d299..3321df3bcc0b92277dc18b7f6efa4239
|
||||
return this.isInWater() || this.isInRain() || this.isInBubbleColumn();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 31f98763da600c34246d722cb92dda4442a3f046..1703bc12cd2c04fb34ebe025f305dc7fb2de1864 100644
|
||||
index 711c130a6d725d8a7f2a77e74b51c6123d7856d2..84ac8d7dca08495c2d1be9901c59546245a84c11 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -105,6 +105,7 @@ public abstract class Mob extends LivingEntity {
|
||||
|
@ -20,10 +20,10 @@ index 6ee62d06cc2b59c06d0f7acfb59384075aa6521c..9b908c5c66dc454faa479430a908dda0
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 72fd18a307a7e1f769195c7ef44a12bb47f2f49c..3914d0e21b36a480c68c091478ab282826d2b1ae 100644
|
||||
index d097223e30de74d5347792fb6d0eecb254099f73..1cb128fb60636016db826ab3120d586346d88cec 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -239,6 +239,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -238,6 +238,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
});
|
||||
// CraftBukkit end
|
||||
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
||||
|
@ -25,10 +25,10 @@ index 9b908c5c66dc454faa479430a908dda0745638c8..6dec1bb96d695f28aae6517e4d782491
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index a292a449deb820ce1d7cbeb5d04702b10643ee50..1cc849fadd1e1cf4ef1d1009c8e42febe92a6e28 100644
|
||||
index eb67ba3ce1ea68eb5db62f68bf48853fe5023f12..8e7479afd3579e6b732feca059c1e4df1160e450 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -136,6 +136,17 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -130,6 +130,17 @@ public class FallingBlockEntity extends Entity {
|
||||
}
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
@ -44,7 +44,7 @@ index a292a449deb820ce1d7cbeb5d04702b10643ee50..1cc849fadd1e1cf4ef1d1009c8e42feb
|
||||
+ }
|
||||
+ // Paper end
|
||||
if (!this.level.isClientSide) {
|
||||
blockposition = this.blockPosition();
|
||||
BlockPos blockposition = this.blockPosition();
|
||||
boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index 9fa752370a43f6d91c019316914a033f213e7126..1f61dcc3d6f33f69fbebaaaee0554403c3e13adf 100644
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Eula.java b/src/main/java/net/minecraft/server/Eula.java
|
||||
index 2c53a400611c78236c5a1c1270d27c02e94251bf..a1d5c0f8fe2adb2ee56f3217e089211ec7c61eb0 100644
|
||||
index f092497b6defd28c94393e483a9288d121158a1e..df44790b1c342d0a6ff794bea86319fa7498cbae 100644
|
||||
--- a/src/main/java/net/minecraft/server/Eula.java
|
||||
+++ b/src/main/java/net/minecraft/server/Eula.java
|
||||
@@ -64,7 +64,7 @@ public class Eula {
|
||||
@ -19,10 +19,10 @@ index 2c53a400611c78236c5a1c1270d27c02e94251bf..a1d5c0f8fe2adb2ee56f3217e089211e
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index eba857195121c58d1b63c58904fd4754a8020219..6b9d947484f0b55a86c3ee27c199669153c0a5ea 100644
|
||||
index aca0adb9f714f96b10546b837d08fe9ef90b4d89..905dbf6bb3fbbdf7b463c9b9baa59f54b83c3687 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1427,7 +1427,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1464,7 +1464,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
@ -32,10 +32,10 @@ index eba857195121c58d1b63c58904fd4754a8020219..6b9d947484f0b55a86c3ee27c1996691
|
||||
|
||||
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
|
||||
index fd87b6b719794f65a83d53e6fd06ea9a8b06002f..d1734e5b210507d7ad999ef37ea463f7c5e99e17 100644
|
||||
index e577c2fb100c217faeaf2d85d6a4374d6de047e1..a5f9e484f597680aea3a95ac27441dc09e1087ec 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -249,7 +249,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -245,7 +245,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
@ -45,11 +45,11 @@ index fd87b6b719794f65a83d53e6fd06ea9a8b06002f..d1734e5b210507d7ad999ef37ea463f7
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index c508bfb68bb4bfd06aa0cefa5bfc0bec725a6b03..c19bdd02db2b07a91aec2ee69ffb392ed67a818b 100644
|
||||
index 7e5fc58f43836edab3696b9644264434c5a95a2f..1ea304aaf85ada7737f62248f7b8cd44c800505e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -216,12 +216,25 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
|
@ -201,10 +201,10 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index a6cb949b6f048455acc50c897fdd93d38152b53c..66f74553fdddf1a6304919e4a9cde1dc2b935cf5 100644
|
||||
index 1c0fefd539ef82d2d1b33a4974d67dc35ded0e1f..20ff08f1a802d16d2306b570e9fb529946d90f6b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -201,6 +201,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -204,6 +204,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
return false;
|
||||
}
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands();
|
||||
|
@ -21,7 +21,7 @@ index 5c3b11f738c1ea19981cc878aa6c2323497391a0..b91a61be7c4829fce0ff8da290eab580
|
||||
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
|
||||
double d4 = max * max;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 07f37c1ca6a98ad8199c873556aac2e9de60fe81..0c0886fe46ad65678a6c6da89659e5991908ba7a 100644
|
||||
index 9b06b17c36b76447e75d0d790ba3e352442286da..321276281134ef692f9e50d21a84a135e09a0754 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -774,7 +774,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@ -34,10 +34,10 @@ index 07f37c1ca6a98ad8199c873556aac2e9de60fe81..0c0886fe46ad65678a6c6da89659e599
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.distanceToSqr((Entity) this);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
index 53106d7bbfeaaf52bbe69471e70670412e8bdfd3..195cdae3f3a9fe8ecab2895a6000f6f855e9a9b8 100644
|
||||
index 6eaedfabf70b604705ad9a772a2e602c8590b500..97c2c1647fa12650e5963c7c1c746fec2429e3d7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
@@ -125,7 +125,7 @@ public class Silverfish extends Monster {
|
||||
@@ -127,7 +127,7 @@ public class Silverfish extends Monster {
|
||||
if (checkAnyLightMonsterSpawnRules(type, world, spawnReason, pos, random)) {
|
||||
Player entityhuman = world.getNearestPlayer((double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, 5.0D, true);
|
||||
|
||||
@ -47,10 +47,10 @@ index 53106d7bbfeaaf52bbe69471e70670412e8bdfd3..195cdae3f3a9fe8ecab2895a6000f6f8
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index ebe55b9c8e93fec1a1f7efca86d5d3968d1df200..90eb40ee3bf20dcbeb69ead753d424387a0ef42f 100644
|
||||
index 612de4e8c26fd41d300ac09eb59d1ceac248778e..71610fa70cdaf3c5a54250a5814809013a6d228e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -174,6 +174,9 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -175,6 +175,9 @@ public abstract class Player extends LivingEntity {
|
||||
private final ItemCooldowns cooldowns;
|
||||
@Nullable
|
||||
public FishingHook fishing;
|
||||
@ -61,7 +61,7 @@ index ebe55b9c8e93fec1a1f7efca86d5d3968d1df200..90eb40ee3bf20dcbeb69ead753d42438
|
||||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index a30780611b6842e35579f0ca11d75161bf365c70..4be2833b03d24e5d87c23f04c248fbe4b0ca9e59 100644
|
||||
index 212b23a380a4bcdb1d2995ca2ccfc8a1709691bd..31bfc0c491c9a4cc6782b6c284121f96972517ea 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -51,7 +51,7 @@ public abstract class BaseSpawner {
|
||||
|
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
|
||||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6b9d947484f0b55a86c3ee27c199669153c0a5ea..b16c2c8e173d906097ee9ac3edace1334da11a4b 100644
|
||||
index 905dbf6bb3fbbdf7b463c9b9baa59f54b83c3687..9f7d562131c7b4e5bf1e5028c6e4734f73b395d8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -282,7 +282,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
public ConsoleReader reader;
|
||||
@ -24,7 +24,7 @@ index 6b9d947484f0b55a86c3ee27c199669153c0a5ea..b16c2c8e173d906097ee9ac3edace133
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public Commands vanillaCommandDispatcher;
|
||||
@@ -291,7 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -292,7 +292,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
|
||||
@ -33,7 +33,7 @@ index 6b9d947484f0b55a86c3ee27c199669153c0a5ea..b16c2c8e173d906097ee9ac3edace133
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
@@ -991,6 +991,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1009,6 +1009,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
{
|
||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
}
|
||||
@ -91,7 +91,7 @@ index 6b9d947484f0b55a86c3ee27c199669153c0a5ea..b16c2c8e173d906097ee9ac3edace133
|
||||
// Spigot End
|
||||
|
||||
protected void runServer() {
|
||||
@@ -1003,26 +1054,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1021,26 +1072,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// Spigot start
|
||||
Arrays.fill( recentTps, 20 );
|
||||
@ -133,7 +133,7 @@ index 6b9d947484f0b55a86c3ee27c199669153c0a5ea..b16c2c8e173d906097ee9ac3edace133
|
||||
tickSection = curTime;
|
||||
}
|
||||
// Spigot end
|
||||
@@ -1032,7 +1090,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1050,7 +1108,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
|
||||
}
|
||||
|
||||
@ -144,10 +144,10 @@ index 6b9d947484f0b55a86c3ee27c199669153c0a5ea..b16c2c8e173d906097ee9ac3edace133
|
||||
this.startMetricsRecordingTick();
|
||||
this.profiler.push("tick");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d1734e5b210507d7ad999ef37ea463f7c5e99e17..17112a3c7f4ab32ad7d0dc4da083459f0109cf52 100644
|
||||
index a5f9e484f597680aea3a95ac27441dc09e1087ec..9251a33715c271e17cad8b9d0de5da444ad25100 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2370,6 +2370,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2362,6 +2362,17 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c7fe4b6aa8d68bd5dc394752a5ae635eb46c5f31..a38fe84e9f8060640eb0c485957e8ceaef55c29b 100644
|
||||
index d491d91e639028fdf9ee75da849d3084b665d93c..a377639517c5777e46e9a5cdbdc94b5b6a99eaa4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2016,6 +2016,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2023,6 +2023,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
entity.valid = true; // CraftBukkit
|
||||
@ -25,10 +25,10 @@ index c7fe4b6aa8d68bd5dc394752a5ae635eb46c5f31..a38fe84e9f8060640eb0c485957e8cea
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b883558c101ad1e5d051cc8d14e1905aa3af6aad..a0c9493c7067dabbc5c9f118d01eb9c8bdd6a8a1 100644
|
||||
index 8a4f4582a6bd69016a36d611f9c4ac2262f7f3ec..a4cd7088113b60fd10e79359e5749fd15dacebe8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -297,7 +297,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -300,7 +300,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@ -56,7 +56,7 @@ index b883558c101ad1e5d051cc8d14e1905aa3af6aad..a0c9493c7067dabbc5c9f118d01eb9c8
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@@ -1817,6 +1837,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -1822,6 +1842,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
this.bukkitEntity.storeBukkitValues(nbt);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -72,7 +72,7 @@ index b883558c101ad1e5d051cc8d14e1905aa3af6aad..a0c9493c7067dabbc5c9f118d01eb9c8
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -1947,6 +1976,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -1952,6 +1981,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -94,10 +94,10 @@ index b883558c101ad1e5d051cc8d14e1905aa3af6aad..a0c9493c7067dabbc5c9f118d01eb9c8
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 1cc849fadd1e1cf4ef1d1009c8e42febe92a6e28..0366303a986ae6da8e95ed3051610c432a790194 100644
|
||||
index 8e7479afd3579e6b732feca059c1e4df1160e450..2bc46e02779d22adedc1fd9e5c9130c209bd58f7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -345,6 +345,14 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -330,6 +330,14 @@ public class FallingBlockEntity extends Entity {
|
||||
this.blockState = Blocks.SAND.defaultBlockState();
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity and entity crashes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 3914d0e21b36a480c68c091478ab282826d2b1ae..7b6ad4acee4a78dbea61c490dc53bd3d10346b56 100644
|
||||
index 1cb128fb60636016db826ab3120d586346d88cec..8653fa072825c024e0fb620bdada4adc936b0490 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -737,11 +737,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -736,11 +736,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
try {
|
||||
tickConsumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
@ -26,7 +26,7 @@ index 3914d0e21b36a480c68c091478ab282826d2b1ae..7b6ad4acee4a78dbea61c490dc53bd3d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 65aedffad9bef4ab80eb835e9c05b6d411f6bb15..14ac3c7b47525b7fd0345d817c9020b5a59d2ebc 100644
|
||||
index a35e3f54cbec83e8c691b6f61d4e1ac1ece6156d..5c2ac7a1de96d9b4830955c2ff108c0881b5949b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -233,7 +233,12 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject {
|
||||
@ -44,10 +44,10 @@ index 65aedffad9bef4ab80eb835e9c05b6d411f6bb15..14ac3c7b47525b7fd0345d817c9020b5
|
||||
}
|
||||
}
|
||||
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 d942dbfdffba68507908317be8eef02037b7a7a6..949d8cc16c91390ea573dd566bec566dc95efc18 100644
|
||||
index 2ca41f90b6b50c254a6e34da00f287197c81d65e..98fe6a1d2866d029383a5a5d60a2635d2d421f1e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1031,11 +1031,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1029,11 +1029,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
gameprofilerfiller.pop();
|
||||
} catch (Throwable throwable) {
|
||||
|
@ -29,10 +29,10 @@ index 6dec1bb96d695f28aae6517e4d78249169d2351a..1b090f2e38a8857ef74403e1f3db8c2b
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 4e835004679b3f5ae0fc7103566b613a6766aefe..6cd4fecf8b6e49027cf8a523fb373db9a2708ed4 100644
|
||||
index a4cd7088113b60fd10e79359e5749fd15dacebe8..d5307003e50251f3c52a7d395aaea07891c83bf8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -644,7 +644,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -648,7 +648,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
|
||||
public void checkOutOfWorld() {
|
||||
|
@ -25,10 +25,10 @@ index bc35bdd9cbd544ae2ab27ad042d7d1b3166db9a6..2b0a75dc2e292e655ca3300f64bc1211
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b16c2c8e173d906097ee9ac3edace1334da11a4b..4db15f60a5da9594cfc313f6fa97032ffc9259e0 100644
|
||||
index 9f7d562131c7b4e5bf1e5028c6e4734f73b395d8..26646df983507bfb1d75a7a3a9f4c12c7bf9fd49 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1406,6 +1406,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1443,6 +1443,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.profiler.pop();
|
||||
this.profiler.pop();
|
||||
@ -37,7 +37,7 @@ index b16c2c8e173d906097ee9ac3edace1334da11a4b..4db15f60a5da9594cfc313f6fa97032f
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 047864651dfbf009b66706e5cb0dd3d1749424bc..a901ce351c484820a8ca95889125e561023d9b31 100644
|
||||
index 4be483b7a8138514f645909eb3e8ea9975c0f41c..318e46932409b83bce923937683619946d876dcb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -227,7 +227,7 @@ public class Explosion {
|
||||
@ -135,10 +135,10 @@ index 047864651dfbf009b66706e5cb0dd3d1749424bc..a901ce351c484820a8ca95889125e561
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 7b6ad4acee4a78dbea61c490dc53bd3d10346b56..c3f19d36fb200e9cdc20cf2993fd72ad8810f254 100644
|
||||
index 8653fa072825c024e0fb620bdada4adc936b0490..7309226b6ee96db7330d712c41157bfde0d03d37 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -153,6 +153,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -151,6 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
private int tileTickPosition;
|
||||
|
@ -19,10 +19,10 @@ index 2b0a75dc2e292e655ca3300f64bc1211b3adeceb..5cae4a5caf9aba8c0e99f1cb6badc5e8
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 59bb2aafcbc1a4a5c963ef0391b4e9b4f670ff72..b14e9a629430070071b498f719b649af1d4bb926 100644
|
||||
index d9244b1d0ac1ae52aa9692884260cce5e2bc74bb..4ec047456f45bfceb9ba7a249a0fc0774e20b126 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1373,6 +1373,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1376,6 +1376,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ index 59bb2aafcbc1a4a5c963ef0391b4e9b4f670ff72..b14e9a629430070071b498f719b649af
|
||||
if (flag1) {
|
||||
if (flag) {
|
||||
this.level.broadcastEntityEvent(this, (byte) 29);
|
||||
@@ -1393,6 +1394,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1396,6 +1397,7 @@ public abstract class LivingEntity extends Entity {
|
||||
b0 = 2;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ index 59bb2aafcbc1a4a5c963ef0391b4e9b4f670ff72..b14e9a629430070071b498f719b649af
|
||||
this.level.broadcastEntityEvent(this, b0);
|
||||
}
|
||||
|
||||
@@ -1416,6 +1418,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1419,6 +1421,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index 59bb2aafcbc1a4a5c963ef0391b4e9b4f670ff72..b14e9a629430070071b498f719b649af
|
||||
if (!this.checkTotemDeathProtection(source)) {
|
||||
SoundEvent soundeffect = this.getDeathSound();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index a901ce351c484820a8ca95889125e561023d9b31..09f17a7f4f78b09a44a6486923060623478a2b5e 100644
|
||||
index 318e46932409b83bce923937683619946d876dcb..afac23f1741baaf2a4ee2729f25a0ddf5f2b9d7d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -262,14 +262,14 @@ public class Explosion {
|
||||
|
@ -19,10 +19,10 @@ index 5cae4a5caf9aba8c0e99f1cb6badc5e8374862c8..1a9b4b08ea906adbfa25c3963a463487
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 50513abfb5009c22cfd6d8fcf20243f66bf2f53e..afa067e314892fcb7a2b04c4f54c964f62ee2df5 100644
|
||||
index a377639517c5777e46e9a5cdbdc94b5b6a99eaa4..59dccc9b33452f6692cddf39056b2640529d2d28 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -558,7 +558,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -561,7 +561,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
gameprofilerfiller.push("thunder");
|
||||
BlockPos blockposition;
|
||||
|
||||
|
@ -19,10 +19,10 @@ index 1a9b4b08ea906adbfa25c3963a4634871d7ca2f6..ceb1602afb90fc0a23d6cc8d22fc85fa
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index afa067e314892fcb7a2b04c4f54c964f62ee2df5..c8ba29065b2e195bdb2570806763e299108725af 100644
|
||||
index 59dccc9b33452f6692cddf39056b2640529d2d28..6c2e53cf3c3fa5bf2df38d4e87e4d0ee52f3c088 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -582,7 +582,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -585,7 +585,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("iceandsnow");
|
||||
@ -30,4 +30,4 @@ index afa067e314892fcb7a2b04c4f54c964f62ee2df5..c8ba29065b2e195bdb2570806763e299
|
||||
+ if (!this.paperConfig.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow
|
||||
blockposition = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.getBlockRandomPos(j, 0, k, 15));
|
||||
BlockPos blockposition1 = blockposition.below();
|
||||
Biome biomebase = this.getBiome(blockposition);
|
||||
Biome biomebase = (Biome) this.getBiome(blockposition).value();
|
||||
|
@ -7,23 +7,21 @@ I hope to look at this more in-depth soon. It appears doable.
|
||||
However this should not block the update.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 352bfe795aea26307de9c998d67a43af3e4845f0..4689d52cd314a607d17be3657099157e95f34d47 100644
|
||||
index e3e9f082102d16a8e16df3b35772430c6d102243..ba0fc93333fbe3ef1d9677de42f00648a58dcc14 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -167,6 +167,8 @@ import org.bukkit.inventory.MainHand;
|
||||
|
||||
public class ServerPlayer extends Player {
|
||||
|
||||
+ public final int getViewDistance() { return this.getLevel().getChunkSource().chunkMap.viewDistance - 1; } // Paper - placeholder
|
||||
@@ -2198,4 +2198,6 @@ public class ServerPlayer extends Player {
|
||||
return (CraftPlayer) super.getBukkitEntity();
|
||||
}
|
||||
// CraftBukkit end
|
||||
+
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32;
|
||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
|
||||
+ public final int getViewDistance() { return this.getLevel().getChunkSource().chunkMap.viewDistance - 1; } // Paper - placeholder
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 1d0c745673bfb14966c6d644825604260f2bc69f..deeb4afbbe6d4b6f44dfe20265a1a2d7d7e66e2e 100644
|
||||
index 5963fa56e7dcd61336a14fa1035c6c14143989ad..48812a4fe0c12689dd9d7829019cdf70e0bda65b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1828,6 +1828,31 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1831,6 +1831,31 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public int getSimulationDistance() {
|
||||
return world.spigotConfig.simulationDistance;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add BeaconEffectEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
index f51c5c07f8f877f778535ee2d0ecc9dff01cca0c..76a401bcfdacded2137142ed38d739ed65d9fae6 100644
|
||||
index ccb9988d5113576d06438acf86a9f451ab0ea157..dca94c75f4531eab3ab788e722363d2065bf4170 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
@@ -42,6 +42,10 @@ import net.minecraft.world.phys.AABB;
|
||||
@@ -41,6 +41,10 @@ import net.minecraft.world.phys.AABB;
|
||||
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
// CraftBukkit end
|
||||
@ -19,7 +19,7 @@ index f51c5c07f8f877f778535ee2d0ecc9dff01cca0c..76a401bcfdacded2137142ed38d739ed
|
||||
|
||||
public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
|
||||
@@ -273,15 +277,23 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -272,15 +276,23 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index f51c5c07f8f877f778535ee2d0ecc9dff01cca0c..76a401bcfdacded2137142ed38d739ed
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -304,10 +316,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -303,10 +315,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
int j = BeaconBlockEntity.getLevel(beaconLevel);
|
||||
List list = BeaconBlockEntity.getHumansInRange(world, pos, beaconLevel);
|
||||
|
||||
|
@ -19,10 +19,10 @@ index e7b7f0a1a35f782a0da4627b4f02e673ca73693e..1b51f717ec2a0538d9037dd1d4328030
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 4689d52cd314a607d17be3657099157e95f34d47..3a97690a1e65db9a1c184fa4df5899cfda3d44bc 100644
|
||||
index ba0fc93333fbe3ef1d9677de42f00648a58dcc14..fa3344c71a9715ad465f39be92cb724368ae2b03 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -220,6 +220,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -218,6 +218,7 @@ public class ServerPlayer extends Player {
|
||||
private int containerCounter;
|
||||
public int latency;
|
||||
public boolean wonGame;
|
||||
@ -30,7 +30,7 @@ index 4689d52cd314a607d17be3657099157e95f34d47..3a97690a1e65db9a1c184fa4df5899cf
|
||||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@@ -591,7 +592,12 @@ public class ServerPlayer extends Player {
|
||||
@@ -589,7 +590,12 @@ public class ServerPlayer extends Player {
|
||||
--this.invulnerableTime;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index c3f19d36fb200e9cdc20cf2993fd72ad8810f254..0e5142f6479787ab26a22b9ec935c3d09a8dfd2c 100644
|
||||
index 7309226b6ee96db7330d712c41157bfde0d03d37..922b234865ff5d64049d634d0356f9a068bc8a8c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -703,9 +703,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -702,9 +702,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Spigot start
|
||||
// Iterator iterator = this.blockEntityTickers.iterator();
|
||||
int tilesThisCycle = 0;
|
||||
|
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
|
||||
that it is happening so that plugin authors can fix their code to stop executing commands async.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 306af349e96967d21ee0dda9cac04d4507bf5b00..979ece36de5c160a188b4c14b2bf991924f6fd98 100644
|
||||
index 9b47d8ab57c3b290173247ba25ad7668f3529903..28c4e16e202876e58447b1f766619e3cee329aaa 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1856,6 +1856,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1871,6 +1871,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
if (!async && s.startsWith("/")) {
|
||||
@ -48,10 +48,10 @@ index 306af349e96967d21ee0dda9cac04d4507bf5b00..979ece36de5c160a188b4c14b2bf9919
|
||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 17112a3c7f4ab32ad7d0dc4da083459f0109cf52..5b7e2f92315a8963b38303ed72de7f144e6c2773 100644
|
||||
index 9251a33715c271e17cad8b9d0de5da444ad25100..ee053cc0fd2fedd1d8c2212bac1b81ea3e140884 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -860,6 +860,28 @@ public final class CraftServer implements Server {
|
||||
@@ -856,6 +856,28 @@ public final class CraftServer implements Server {
|
||||
Validate.notNull(commandLine, "CommandLine cannot be null");
|
||||
org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot
|
||||
|
||||
|
@ -19,10 +19,10 @@ index 990757a8bbd27fa102c9b408246ed14d97a340dc..1e3c39f0eeeb07f8d49e3651b18a152d
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
index 19a2702d9053037203c192d7f26f3c9afbe6f782..11aefbf65b0e63777d6ed5bfdb18c7f7df30fc0e 100644
|
||||
index cee85fcbe061cf70ba9c828372369a4c41f9fbff..990f2e17aad4a1116482b3aa534686cf8dc3669a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -323,7 +323,7 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -321,7 +321,7 @@ public class Slime extends Mob implements Enemy {
|
||||
}
|
||||
|
||||
ChunkPos chunkcoordintpair = new ChunkPos(pos);
|
||||
@ -32,10 +32,10 @@ index 19a2702d9053037203c192d7f26f3c9afbe6f782..11aefbf65b0e63777d6ed5bfdb18c7f7
|
||||
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
|
||||
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
index 92a33a23764e8ca1e2e6b2b0feb6caca2a5dfc56..6c47771e0168e958b22c987bcd8bc100f6208c10 100644
|
||||
index d68bb94bf75d04b3f371518558addc645b55d8a4..404bd3389aaa75ca23f04d23ecea9093443c3976 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
@@ -218,7 +218,7 @@ public class CraftChunk implements Chunk {
|
||||
@@ -219,7 +219,7 @@ public class CraftChunk implements Chunk {
|
||||
@Override
|
||||
public boolean isSlimeChunk() {
|
||||
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5b7e2f92315a8963b38303ed72de7f144e6c2773..f421e55cc6c629f3718d0c7f4cb7ff287c2b643f 100644
|
||||
index ee053cc0fd2fedd1d8c2212bac1b81ea3e140884..3fa2d14c67c211a7e145b02b84db84706e971761 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1977,6 +1977,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1969,6 +1969,7 @@ public final class CraftServer implements Server {
|
||||
return this.helpMap;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ensure inv drag is in bounds
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index ccb6ff0cf31e619ce555d404a6454750f0958f12..36834f30ccefd229df4da2dbc7b22edcb83429c3 100644
|
||||
index dd3bd4a87e240d09f5c9cda7ec83d19a009042e3..b42ef24e9851ae1bd1313110cfe59ad424d21535 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -406,7 +406,7 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -418,7 +418,7 @@ public abstract class AbstractContainerMenu {
|
||||
this.resetQuickCraft();
|
||||
}
|
||||
} else if (this.quickcraftStatus == 1) {
|
||||
|
@ -23,10 +23,10 @@ index 1e3c39f0eeeb07f8d49e3651b18a152db9ccba7b..c248b66486044150c64eaddbef85fa66
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6edb88b123a8cc726cb6bd02fd83e5a11402ff00..e88c80fe1fe97e4704d5f17f97c536fdbba48447 100644
|
||||
index d5307003e50251f3c52a7d395aaea07891c83bf8..413de81d30fe4ee6cf7aba88805e0e536f498565 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2920,7 +2920,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -2937,7 +2937,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType());
|
||||
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
|
||||
// CraftBukkit start
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c50fdc09494895eaf6813493bdc6a370089d4240..c77db10a1c33266da8d4578e828ff039d550b292 100644
|
||||
index 3fa2d14c67c211a7e145b02b84db84706e971761..02674288c62493c22e5e21b42a2d4386b5a42a1d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -282,6 +282,7 @@ public final class CraftServer implements Server {
|
||||
@@ -278,6 +278,7 @@ public final class CraftServer implements Server {
|
||||
public boolean ignoreVanillaPermissions = false;
|
||||
private final List<CraftPlayer> playerView;
|
||||
public int reloadCount;
|
||||
@ -17,7 +17,7 @@ index c50fdc09494895eaf6813493bdc6a370089d4240..c77db10a1c33266da8d4578e828ff039
|
||||
static {
|
||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index fdbcf4989f72e1604a2841f565adfeebf8d45622..1e0b8314ef388763aa43055909e48778f0d421a3 100644
|
||||
index fdbcf4989f72e1604a2841f565adfeebf8d45622..4ebd7609ec2bf62586feef4da7605dbb89569567 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -438,10 +438,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@ -25,7 +25,7 @@ index fdbcf4989f72e1604a2841f565adfeebf8d45622..1e0b8314ef388763aa43055909e48778
|
||||
Preconditions.checkArgument(velocity != null, "velocity");
|
||||
velocity.checkFinite();
|
||||
+ // Paper start - Warn server owners when plugins try to set super high velocities
|
||||
+ if (!(this instanceof org.bukkit.entity.Projectile || this instanceof org.bukkit.entity.Minecart) && isUnsafeVelocity(velocity)) {
|
||||
+ if (!(this instanceof org.bukkit.entity.Projectile) && isUnsafeVelocity(velocity)) {
|
||||
+ CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getScoreboardName() + " id #" + getEntityId() + " to (" + velocity.getX() + "," + velocity.getY() + "," + velocity.getZ() + ").");
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
@ -49,19 +49,19 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 5d1ac4e7afa0f1d9c9face049f768a2030eb411f..85af59ffb6b11ae1980fef5ef449031c78626b9a 100644
|
||||
index 9aaf392876119cfda46f3e80d02020d0e748ae44..a10848e6899853f447f101675e3a6aba9d3d43f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -919,6 +919,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -973,6 +973,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return true;
|
||||
} catch (Exception exception) {
|
||||
ChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception);
|
||||
ChunkMap.LOGGER.error("Failed to save chunk {},{}", new Object[]{chunkcoordintpair.x, chunkcoordintpair.z, exception});
|
||||
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper
|
||||
return false;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
index 38403f62a9539382d5330f9231fe9ef618b87c21..876658b685ea09adb4c01d436da56daadb7eedaa 100644
|
||||
index 7b84b20a4de0d6e95a1d47cb077abd0e00a2336c..b7b98832be6178a2bca534bf974519ede977b282 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -88,27 +88,19 @@ index 38403f62a9539382d5330f9231fe9ef618b87c21..876658b685ea09adb4c01d436da56daa
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java b/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
||||
index 4cde8d630a0951f297622af4ef781f5b3fabf9af..7044d8c71e85551e11bf2d96b767e08811bdb9fe 100644
|
||||
index 1a9dfd8411bb8affdb3ff4c003433ecab203b004..5e526d0feda11d6b73f71b965aa098e0a79457d1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
||||
@@ -1,5 +1,7 @@
|
||||
package net.minecraft.world.entity.ai.village;
|
||||
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
+
|
||||
import java.util.Iterator;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
@@ -118,6 +120,7 @@ public class VillageSiege implements CustomSpawner {
|
||||
@@ -118,6 +118,7 @@ public class VillageSiege implements CustomSpawner {
|
||||
entityzombie.finalizeSpawn(world, world.getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.EVENT, (SpawnGroupData) null, (CompoundTag) null);
|
||||
} catch (Exception exception) {
|
||||
VillageSiege.LOGGER.warn("Failed to create zombie for village siege at {}", vec3d, exception);
|
||||
+ ServerInternalException.reportInternalException(exception); // Paper
|
||||
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper
|
||||
return;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 0e5142f6479787ab26a22b9ec935c3d09a8dfd2c..389cb85aa369dff606b21c10fcbf4825c17bbd4f 100644
|
||||
index 922b234865ff5d64049d634d0356f9a068bc8a8c..d923cc91a8f1e71831be8ded1b4818ac3b48fc34 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1,5 +1,10 @@
|
||||
@ -122,7 +114,7 @@ index 0e5142f6479787ab26a22b9ec935c3d09a8dfd2c..389cb85aa369dff606b21c10fcbf4825
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.serialization.Codec;
|
||||
import java.io.IOException;
|
||||
@@ -739,6 +744,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -738,6 +743,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||
MinecraftServer.LOGGER.error(msg, throwable);
|
||||
@ -131,7 +123,7 @@ index 0e5142f6479787ab26a22b9ec935c3d09a8dfd2c..389cb85aa369dff606b21c10fcbf4825
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 5e2a3baf46175dd92958f47c4503bb8d6f6a0941..373fbdf56dddbae5f793585e31c7e4ff6d31823b 100644
|
||||
index 8d4efe65baf28760ee68cecd7ef7c8e65a2912ba..b8666d46e85bc7e9e3a05b4ebd65f59138ac55d1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -289,6 +289,7 @@ public final class NaturalSpawner {
|
||||
@ -142,7 +134,7 @@ index 5e2a3baf46175dd92958f47c4503bb8d6f6a0941..373fbdf56dddbae5f793585e31c7e4ff
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -395,6 +396,7 @@ public final class NaturalSpawner {
|
||||
@@ -401,6 +402,7 @@ public final class NaturalSpawner {
|
||||
entity = biomesettingsmobs_c.type.create(world.getLevel());
|
||||
} catch (Exception exception) {
|
||||
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
|
||||
@ -151,7 +143,7 @@ index 5e2a3baf46175dd92958f47c4503bb8d6f6a0941..373fbdf56dddbae5f793585e31c7e4ff
|
||||
}
|
||||
|
||||
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 949d8cc16c91390ea573dd566bec566dc95efc18..3ba9f8d7dc12709670dcd94df5d82b8d44f983fa 100644
|
||||
index 98fe6a1d2866d029383a5a5d60a2635d2d421f1e..1ddc917772d701ac7b8800df44da890b9b6a6113 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -161,7 +153,7 @@ index 949d8cc16c91390ea573dd566bec566dc95efc18..3ba9f8d7dc12709670dcd94df5d82b8d
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.UnmodifiableIterator;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import com.mojang.logging.LogUtils;
|
||||
@@ -549,10 +550,15 @@ public class LevelChunk extends ChunkAccess {
|
||||
this.removeBlockEntity(blockEntity.getBlockPos());
|
||||
// Paper end
|
||||
@ -182,7 +174,7 @@ index 949d8cc16c91390ea573dd566bec566dc95efc18..3ba9f8d7dc12709670dcd94df5d82b8d
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -1034,6 +1040,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1032,6 +1038,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
@ -191,7 +183,7 @@ index 949d8cc16c91390ea573dd566bec566dc95efc18..3ba9f8d7dc12709670dcd94df5d82b8d
|
||||
// Paper end
|
||||
// Spigot start
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
index c30d7b04e8383aed7d5f3e93f42c612c685a4df7..fd70133714990ad44b4b2b80c52ffc55be8c9b63 100644
|
||||
index d51bafd2f5a763b8a49c835ab74a7cf60caa1ab6..fbf5f01a9a7968194fc85589ca7f9fa328da4881 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
@@ -274,6 +274,7 @@ public class RegionFile implements AutoCloseable {
|
||||
@ -211,7 +203,7 @@ index c30d7b04e8383aed7d5f3e93f42c612c685a4df7..fd70133714990ad44b4b2b80c52ffc55
|
||||
try {
|
||||
filechannel.close();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
||||
index 68b1a5b6b27f70b0185bb8f0ed924d6d21b43323..e84b99ca10621cb1021d7ec17ba21df24e8c7474 100644
|
||||
index 5272a718178b5a2cb1df263ce0c5500c92c9ebda..0465b397b628b11a6fc52e3375945c94d68cfdd5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
||||
@@ -120,6 +120,7 @@ public class DimensionDataStorage {
|
||||
|
@ -25,10 +25,10 @@ index ada624b5f58381122e59568c2087cf38fd2baf3e..5b55fce59db9ac3ab6030ebe8374c514
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index de15a2231057217fbbf723cf25e869998a1016f1..69f820aa1f29e626c0ae0322281063efae53c470 100644
|
||||
index 413de81d30fe4ee6cf7aba88805e0e536f498565..78fd9e84e24b163b4918ba0580abca18806f4988 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2561,6 +2561,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -2577,6 +2577,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
|
||||
@Nullable
|
||||
public Team getTeam() {
|
||||
@ -37,10 +37,10 @@ index de15a2231057217fbbf723cf25e869998a1016f1..69f820aa1f29e626c0ae0322281063ef
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b14e9a629430070071b498f719b649af1d4bb926..9168826ac85bc7cd355e73b2d02b7cce9c4c9cee 100644
|
||||
index 4ec047456f45bfceb9ba7a249a0fc0774e20b126..3bdc374b604ef1edb4e2925bef5a9586d4d8346a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -797,6 +797,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -800,6 +800,7 @@ public abstract class LivingEntity extends Entity {
|
||||
if (nbt.contains("Team", 8)) {
|
||||
String s = nbt.getString("Team");
|
||||
PlayerTeam scoreboardteam = this.level.getScoreboard().getPlayerTeam(s);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 979ece36de5c160a188b4c14b2bf991924f6fd98..18854aaa1359dd5c944d7e3a6177152bff9614a2 100644
|
||||
index 28c4e16e202876e58447b1f766619e3cee329aaa..8125b2d736594018e89bb3be32262f5e1e8791d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1638,8 +1638,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1653,8 +1653,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
|
||||
this.disconnect(new TranslatableComponent("multiplayer.requiredTexturePrompt.disconnect"));
|
||||
}
|
||||
|
@ -30,10 +30,10 @@ index 701a2ffd04df48d437b2cb963dd150af99725b6e..817d4572c9991992b720b3ba163188ac
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b6e9c6fc7f31b06f77cf108ee0f5548cd530ba5a..b06542f4b79bffda579ab91cb3b463063a34d472 100644
|
||||
index 02674288c62493c22e5e21b42a2d4386b5a42a1d..c30eb1c910147ddd6237078367ce29f9e015af9e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -459,6 +459,7 @@ public final class CraftServer implements Server {
|
||||
@@ -455,6 +455,7 @@ public final class CraftServer implements Server {
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
this.helpMap.initializeGeneralTopics();
|
||||
@ -41,7 +41,7 @@ index b6e9c6fc7f31b06f77cf108ee0f5548cd530ba5a..b06542f4b79bffda579ab91cb3b46306
|
||||
}
|
||||
|
||||
Plugin[] plugins = this.pluginManager.getPlugins();
|
||||
@@ -478,7 +479,7 @@ public final class CraftServer implements Server {
|
||||
@@ -474,7 +475,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.registerServerAliases();
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
||||
https://github.com/PaperMC/Paper/issues/49
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b06542f4b79bffda579ab91cb3b463063a34d472..01d99c5f916d93375f701a5fe9e250102ff57e8a 100644
|
||||
index c30eb1c910147ddd6237078367ce29f9e015af9e..39c847d68b9195d082d324485fee83332e07f59a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2500,5 +2500,23 @@ public final class CraftServer implements Server {
|
||||
@@ -2492,5 +2492,23 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return this.adventure$audiences;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
||||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 01d99c5f916d93375f701a5fe9e250102ff57e8a..1065f69322bb9d068f4ec63e40cc4db6f5425c40 100644
|
||||
index 39c847d68b9195d082d324485fee83332e07f59a..ad851aa3a29b6aabfcfe7f95df15303437c48eaa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -948,8 +948,16 @@ public final class CraftServer implements Server {
|
||||
@@ -944,8 +944,16 @@ public final class CraftServer implements Server {
|
||||
world.paperConfig.init(); // Paper
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@ For consistency, the old API methods now forward to use the
|
||||
ItemMeta API equivalents, and should deprecate the old API's.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 8335880dbbb31a3f5d10c259b567baa0d5f381a1..74e4990888d88f18cb3d800724d9156e9d1ae21d 100644
|
||||
index 1a52db84d9630a095347a85e136a9ad118f77325..d66cc030dcd3d98f57803938c8c06342a028ee88 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -12,6 +12,8 @@ import java.text.DecimalFormatSymbols;
|
||||
@@ -14,6 +14,8 @@ import java.text.DecimalFormatSymbols;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -30,7 +30,7 @@ index 8335880dbbb31a3f5d10c259b567baa0d5f381a1..74e4990888d88f18cb3d800724d9156e
|
||||
import java.util.Locale;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
@@ -151,6 +153,23 @@ public final class ItemStack {
|
||||
@@ -153,6 +155,23 @@ public final class ItemStack {
|
||||
return this.getItem().getTooltipImage(this);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ index 8335880dbbb31a3f5d10c259b567baa0d5f381a1..74e4990888d88f18cb3d800724d9156e
|
||||
public ItemStack(ItemLike item) {
|
||||
this(item, 1);
|
||||
}
|
||||
@@ -194,6 +213,7 @@ public final class ItemStack {
|
||||
@@ -200,6 +219,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start - make defensive copy as this data may be coming from the save thread
|
||||
this.tag = nbttagcompound.getCompound("tag").copy();
|
||||
// CraftBukkit end
|
||||
@ -62,7 +62,7 @@ index 8335880dbbb31a3f5d10c259b567baa0d5f381a1..74e4990888d88f18cb3d800724d9156e
|
||||
this.getItem().verifyTagAfterLoad(this.tag);
|
||||
}
|
||||
|
||||
@@ -748,6 +768,7 @@ public final class ItemStack {
|
||||
@@ -758,6 +778,7 @@ public final class ItemStack {
|
||||
|
||||
public void setTag(@Nullable CompoundTag nbt) {
|
||||
this.tag = nbt;
|
||||
@ -70,7 +70,7 @@ index 8335880dbbb31a3f5d10c259b567baa0d5f381a1..74e4990888d88f18cb3d800724d9156e
|
||||
if (this.getItem().canBeDepleted()) {
|
||||
this.setDamageValue(this.getDamageValue());
|
||||
}
|
||||
@@ -1055,6 +1076,7 @@ public final class ItemStack {
|
||||
@@ -1063,6 +1084,7 @@ public final class ItemStack {
|
||||
ListTag nbttaglist = this.tag.getList("Enchantments", 10);
|
||||
|
||||
nbttaglist.add(EnchantmentHelper.storeEnchantment(EnchantmentHelper.getEnchantmentId(enchantment), (byte) level));
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
|
||||
Methods that can be used for other patches to help improve logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 7a536f30a1ff7f93bad14f734aeb5d5ff69a5c9a..767a48000e41c43ccaf71be521348fcd1c71ee11 100644
|
||||
index 6c2e53cf3c3fa5bf2df38d4e87e4d0ee52f3c088..d1b9e82b9c4b90a96d2ae8930b8e33e8d1a55bdb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -208,7 +208,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -209,7 +209,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
|
||||
@ -19,10 +19,10 @@ index 7a536f30a1ff7f93bad14f734aeb5d5ff69a5c9a..767a48000e41c43ccaf71be521348fcd
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 389cb85aa369dff606b21c10fcbf4825c17bbd4f..c2fe955b23383effca7a8d712a08e346d648d2a8 100644
|
||||
index d923cc91a8f1e71831be8ded1b4818ac3b48fc34..cccce52ef5a1ac7284bc878c7b8f0d2a312fac57 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -319,6 +319,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -318,6 +318,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 9168826ac85bc7cd355e73b2d02b7cce9c4c9cee..e94344170190ae9429b744ec7878c3aa093f01b6 100644
|
||||
index 3bdc374b604ef1edb4e2925bef5a9586d4d8346a..f364978ff256aecb078cca2b6c3fd433d9a4820b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3562,9 +3562,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3552,9 +3552,10 @@ public abstract class LivingEntity extends Entity {
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@ -20,7 +20,7 @@ index 9168826ac85bc7cd355e73b2d02b7cce9c4c9cee..e94344170190ae9429b744ec7878c3aa
|
||||
level.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -3578,6 +3579,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3568,6 +3569,13 @@ public abstract class LivingEntity extends Entity {
|
||||
} else {
|
||||
itemstack = this.useItem.finishUsingItem(this.level, this);
|
||||
}
|
||||
@ -34,7 +34,7 @@ index 9168826ac85bc7cd355e73b2d02b7cce9c4c9cee..e94344170190ae9429b744ec7878c3aa
|
||||
// CraftBukkit end
|
||||
|
||||
if (itemstack != this.useItem) {
|
||||
@@ -3585,6 +3593,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3575,6 +3583,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e94344170190ae9429b744ec7878c3aa093f01b6..e13808657e0c7dc94fcd2844690a31d0691b6a7b 100644
|
||||
index f364978ff256aecb078cca2b6c3fd433d9a4820b..5f7a16651a0ca5497b20d8723e9c170506668267 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -758,7 +758,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -761,7 +761,13 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
@Override
|
||||
public void readAdditionalSaveData(CompoundTag nbt) {
|
||||
@ -23,7 +23,7 @@ index e94344170190ae9429b744ec7878c3aa093f01b6..e13808657e0c7dc94fcd2844690a31d0
|
||||
if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) {
|
||||
this.getAttributes().load(nbt.getList("Attributes", 10));
|
||||
}
|
||||
@@ -1245,6 +1251,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1248,6 +1254,10 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void setHealth(float health) {
|
||||
@ -34,7 +34,7 @@ index e94344170190ae9429b744ec7878c3aa093f01b6..e13808657e0c7dc94fcd2844690a31d0
|
||||
// CraftBukkit start - Handle scaled health
|
||||
if (this instanceof ServerPlayer) {
|
||||
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
|
||||
@@ -3396,7 +3406,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3386,7 +3396,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void setAbsorptionAmount(float amount) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities
|
||||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 69f820aa1f29e626c0ae0322281063efae53c470..415c746b497d19f359705721874ed65d7e7ca817 100644
|
||||
index 78fd9e84e24b163b4918ba0580abca18806f4988..f12e282dc4683d0430b9dba552757c4da5dee988 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -152,6 +152,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -155,6 +155,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ index 69f820aa1f29e626c0ae0322281063efae53c470..415c746b497d19f359705721874ed65d
|
||||
private CraftEntity bukkitEntity;
|
||||
|
||||
public CraftEntity getBukkitEntity() {
|
||||
@@ -339,7 +354,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -342,7 +357,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
this.bb = Entity.INITIAL_AABB;
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
this.nextStep = 1.0F;
|
||||
@ -39,12 +39,12 @@ index 69f820aa1f29e626c0ae0322281063efae53c470..415c746b497d19f359705721874ed65d
|
||||
+ this.random = SHARED_RANDOM; // Paper
|
||||
this.remainingFireTicks = -this.getFireImmuneTicks();
|
||||
this.fluidHeight = new Object2DoubleArrayMap(2);
|
||||
this.firstTick = true;
|
||||
this.fluidOnEyes = new HashSet();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
index 09ec4d66aaa5b9e4ef09750a76cebc389a4306fd..370513fbc39f178f903ce140ced1a97029dd39db 100644
|
||||
index 8e63ab510e4c2e458da726ca67be4d3b5274e7b7..a51424d29ac353cf1bec4d1484db0acb63bebba5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
@@ -47,7 +47,7 @@ public class Squid extends WaterAnimal {
|
||||
@@ -46,7 +46,7 @@ public class Squid extends WaterAnimal {
|
||||
|
||||
public Squid(EntityType<? extends Squid> type, Level world) {
|
||||
super(type, world);
|
||||
|
@ -22,10 +22,10 @@ index 71c672eafdce3547eaeb8e31fddcb142ad213094..aa8cd5965632626e4cbd4952acf9b349
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b106dfc16820d89b9c9792ad85d09fd66b7204b6..4e896cdc395cfb2b976e13ee3f0228d9f475069f 100644
|
||||
index d1b9e82b9c4b90a96d2ae8930b8e33e8d1a55bdb..d9198cf7aff9b1c0f05277fb9f1a3276e2292775 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -562,7 +562,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -565,7 +565,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||
|
@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward.
|
||||
Optimize getType and getBlockData to manually inline and optimize the calls
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
index dba7872cf337a5c3dc5a6fe508dd50b93462fae5..75aa5df03c162fa10046fbad806b81051fb5765b 100644
|
||||
index 4587a3668b6be9222cdd74a38229f89f611d1af6..9f32861d791f7e4cb39d2ad01f48e1916fc2b4b1 100644
|
||||
--- a/src/main/java/net/minecraft/core/Vec3i.java
|
||||
+++ b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
@@ -33,6 +33,12 @@ public class Vec3i implements Comparable<Vec3i> {
|
||||
@ -29,10 +29,10 @@ index dba7872cf337a5c3dc5a6fe508dd50b93462fae5..75aa5df03c162fa10046fbad806b8105
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index c2fe955b23383effca7a8d712a08e346d648d2a8..85d3ece733d78897f85a7a02d323fdb025193622 100644
|
||||
index cccce52ef5a1ac7284bc878c7b8f0d2a312fac57..f1f713c892e1843fdf5adec6714dc72f8fd4d354 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -262,7 +262,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -261,7 +261,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public boolean isInWorldBounds(BlockPos pos) {
|
||||
@ -42,10 +42,10 @@ index c2fe955b23383effca7a8d712a08e346d648d2a8..85d3ece733d78897f85a7a02d323fdb0
|
||||
|
||||
public static boolean isInSpawnableBounds(BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
index 0ea0690ab1d45f60a2b13cf8a69e580256992cdc..b3b3fa7ece66e1ab467c8ed550d150db541fd02a 100644
|
||||
index 847ac56f20ab9c5745f9c0fa0e6f16743ba5e471..eea6816c52e6c0329f3bea0e7789cda9dd4a5a08 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
@@ -119,6 +119,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
@@ -122,6 +122,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
return GameEventDispatcher.NOOP;
|
||||
}
|
||||
|
||||
@ -54,11 +54,11 @@ index 0ea0690ab1d45f60a2b13cf8a69e580256992cdc..b3b3fa7ece66e1ab467c8ed550d150db
|
||||
public abstract BlockState setBlockState(BlockPos pos, BlockState state, boolean moved);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
|
||||
index 31d01f8df394e718f1f2a268ddccee77b6706eb9..7b0da3956be23e974d3bc2f50f9004046923635f 100644
|
||||
index 80e383e9a2d12f9f1b0b0d9ae71a0add9b51c9d4..a9c65c8d36e5c7080133706df1363b3ce52e3370 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
|
||||
@@ -18,6 +18,12 @@ public class EmptyLevelChunk extends LevelChunk {
|
||||
super(world, pos);
|
||||
@@ -21,6 +21,12 @@ public class EmptyLevelChunk extends LevelChunk {
|
||||
this.biome = holder;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
@ -71,10 +71,10 @@ index 31d01f8df394e718f1f2a268ddccee77b6706eb9..7b0da3956be23e974d3bc2f50f900404
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return Blocks.VOID_AIR.defaultBlockState();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
index ef74f37cae96e61d5648fce7bbd793fb67ba9e4a..e15263a152c88371ebc65b47f0be938f7c19a8f2 100644
|
||||
index 82a4f5fb84884d229d258134fbfe62d34ad30d80..37e7f766e0de7b47c7240c9365bb134fda26a756 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
@@ -46,6 +46,12 @@ public class ImposterProtoChunk extends ProtoChunk {
|
||||
@@ -47,6 +47,12 @@ public class ImposterProtoChunk extends ProtoChunk {
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return this.wrapped.getBlockState(pos);
|
||||
}
|
||||
@ -88,7 +88,7 @@ index ef74f37cae96e61d5648fce7bbd793fb67ba9e4a..e15263a152c88371ebc65b47f0be938f
|
||||
@Override
|
||||
public FluidState getFluidState(BlockPos pos) {
|
||||
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 3ba9f8d7dc12709670dcd94df5d82b8d44f983fa..cbffb4eb93ba1888666d4b0de98b2fb05c1400a0 100644
|
||||
index 1ddc917772d701ac7b8800df44da890b9b6a6113..aff826fb06a16adac8173efcaad0da1724db95c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -288,12 +288,29 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -125,10 +125,10 @@ index 3ba9f8d7dc12709670dcd94df5d82b8d44f983fa..cbffb4eb93ba1888666d4b0de98b2fb0
|
||||
BlockState iblockdata = null;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index 6abd3cf0a388b158252628d8031b92bb8a6d65fb..50b6ecfea7a342be0d21e37ae87777a4b4860026 100644
|
||||
index a17d38d08a1f4b3e7ba4ef233a4acaf75177ac4c..c696358102086257033b55adbef84b1a259cb46e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -20,7 +20,7 @@ public class LevelChunkSection {
|
||||
@@ -21,7 +21,7 @@ public class LevelChunkSection {
|
||||
public static final int SECTION_SIZE = 4096;
|
||||
public static final int BIOME_CONTAINER_BITS = 2;
|
||||
private final int bottomBlockY;
|
||||
@ -138,10 +138,10 @@ index 6abd3cf0a388b158252628d8031b92bb8a6d65fb..50b6ecfea7a342be0d21e37ae87777a4
|
||||
private short tickingFluidCount;
|
||||
public final PalettedContainer<BlockState> states;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
index 7c2e3331fac1de2e20974c8eed8aeeb9f2c92789..acfd46c7035b4009d61bda8a7c8dd6953e4836e6 100644
|
||||
index ee0be5163811ea39efcb2092e5f126c3fd9b1523..d3d2bd5ea57254a4af0572d5dab460127718ce09 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
@@ -87,14 +87,18 @@ public class ProtoChunk extends ChunkAccess {
|
||||
@@ -88,14 +88,18 @@ public class ProtoChunk extends ChunkAccess {
|
||||
|
||||
@Override
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
|
||||
Saves on some object allocation and processing when no plugin listens to this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4db15f60a5da9594cfc313f6fa97032ffc9259e0..b807bd1e53f39a1d635800f02f6772f0fc878f7a 100644
|
||||
index 26646df983507bfb1d75a7a3a9f4c12c7bf9fd49..99478fe8f16783e7d2ae128f32199fa4b465dc83 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1367,6 +1367,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1404,6 +1404,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
@ -18,10 +18,10 @@ index 4db15f60a5da9594cfc313f6fa97032ffc9259e0..b807bd1e53f39a1d635800f02f6772f0
|
||||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ddf2468fe4adb5115f21c7eb0d695c999f1c3efe..db3f50d7bdfff919cfaee3b035f6ae4e79beb000 100644
|
||||
index d9198cf7aff9b1c0f05277fb9f1a3276e2292775..ca7c4a297e577bf9f0bf9cfd88a56ad87ac88684 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -207,6 +207,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -208,6 +208,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
private int tickPosition;
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
@ -30,10 +30,10 @@ index ddf2468fe4adb5115f21c7eb0d695c999f1c3efe..db3f50d7bdfff919cfaee3b035f6ae4e
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 85d3ece733d78897f85a7a02d323fdb025193622..c91652cf949c099145587e758b259e2b3dfbe8c5 100644
|
||||
index f1f713c892e1843fdf5adec6714dc72f8fd4d354..b2965b136405bce16f1433411df5beab15231113 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -474,7 +474,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -473,7 +473,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// CraftBukkit start
|
||||
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
|
||||
CraftWorld world = ((ServerLevel) this).getWorld();
|
||||
@ -42,7 +42,7 @@ index 85d3ece733d78897f85a7a02d323fdb025193622..c91652cf949c099145587e758b259e2b
|
||||
BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata));
|
||||
this.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
@@ -587,7 +587,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -586,7 +586,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
try {
|
||||
// CraftBukkit start
|
||||
CraftWorld world = ((ServerLevel) this).getWorld();
|
||||
@ -52,23 +52,15 @@ index 85d3ece733d78897f85a7a02d323fdb025193622..c91652cf949c099145587e758b259e2b
|
||||
this.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BushBlock.java b/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
||||
index 24227939493f852a88477c84160bda1605291eb0..1f8cf302d2309aec2955832ffafd87f14934e141 100644
|
||||
index d40e791529911ca81398ac267a819415da91502a..03fde6e47c4a347c62fe9b4a3351769aedf874f6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.Tag;
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
@@ -25,7 +26,7 @@ public class BushBlock extends Block {
|
||||
@@ -24,7 +24,7 @@ public class BushBlock extends Block {
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
// CraftBukkit start
|
||||
if (!state.canSurvive(world, pos)) {
|
||||
- if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) {
|
||||
+ if (!(world instanceof ServerLevel && ((ServerLevel) world).hasPhysicsEvent) || !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) { // Paper
|
||||
+ if (!(world instanceof net.minecraft.server.level.ServerLevel && ((net.minecraft.server.level.ServerLevel) world).hasPhysicsEvent) || !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) { // Paper
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 419f539109ca0b8103475e52d0fdda40a7b99cc7..ce13b2b9bcf0984732b3309ec3f14731cc6aef5f 100644
|
||||
index ca7c4a297e577bf9f0bf9cfd88a56ad87ac88684..22ba7b534c450a4f9e608c331344e948a0fbf1f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2026,6 +2026,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2033,6 +2033,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||
}
|
||||
// Paper end
|
||||
@ -16,7 +16,7 @@ index 419f539109ca0b8103475e52d0fdda40a7b99cc7..ce13b2b9bcf0984732b3309ec3f14731
|
||||
}
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
@@ -2106,6 +2107,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2113,6 +2114,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not load chunks for Pathfinding
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
index 9e4d43b5846ebebf9169ad906db68804292e7fe0..e23679b8c2bc35de82cb3245f35b53b44058f53d 100644
|
||||
index ca45dfc6c05760e00987c09b697efb1f9ff0e78a..2d42df635b1ce8d975278fb36f00fe9b8b8f060f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
@@ -453,7 +453,12 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
@@ -457,7 +457,12 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
for(int n = -1; n <= 1; ++n) {
|
||||
if (l != 0 || n != 0) {
|
||||
pos.set(i + l, j + m, k + n);
|
||||
@ -22,7 +22,7 @@ index 9e4d43b5846ebebf9169ad906db68804292e7fe0..e23679b8c2bc35de82cb3245f35b53b4
|
||||
if (blockState.is(Blocks.CACTUS)) {
|
||||
return BlockPathTypes.DANGER_CACTUS;
|
||||
}
|
||||
@@ -469,6 +474,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
@@ -473,6 +478,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
if (world.getFluidState(pos).is(FluidTags.WATER)) {
|
||||
return BlockPathTypes.WATER_BORDER;
|
||||
}
|
||||
@ -30,7 +30,7 @@ index 9e4d43b5846ebebf9169ad906db68804292e7fe0..e23679b8c2bc35de82cb3245f35b53b4
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -478,7 +484,8 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
@@ -482,7 +488,8 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
}
|
||||
|
||||
protected static BlockPathTypes getBlockPathTypeRaw(BlockGetter world, BlockPos pos) {
|
||||
|
@ -20,10 +20,10 @@ index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510
|
||||
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 18854aaa1359dd5c944d7e3a6177152bff9614a2..bacb8ff97a6745847b5e3eb82dd08bde934e8d1f 100644
|
||||
index 8125b2d736594018e89bb3be32262f5e1e8791d5..024f6b5bf84a4e55f6237107ae8f8958caa9ef72 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2204,8 +2204,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2219,8 +2219,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ index e7534ed3f995be64c99399ab76e98086cf37bb7f..c008f1f7f0a1e1b8bf34f2702cb44c5f
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||
index 954defe131bdcd81178e3bd31755eb18b9aef026..29f4da5962bf596da7c557d9aa61677f5604b0a0 100644
|
||||
index 4ba446351d8b8b97ebfab1436d8f313f2747901e..b642ced1bc4dd819210db291cfc1837d011431ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.block;
|
||||
@ -30,8 +30,8 @@ index 954defe131bdcd81178e3bd31755eb18b9aef026..29f4da5962bf596da7c557d9aa61677f
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.tags.FluidTags;
|
||||
import net.minecraft.tags.Tag;
|
||||
@@ -40,6 +41,7 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
@@ -39,6 +40,7 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
|
||||
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index c91652cf949c099145587e758b259e2b3dfbe8c5..46f8fff21c0d91b9326b9270def43bd99c54b3ac 100644
|
||||
index b2965b136405bce16f1433411df5beab15231113..522b33f8d78468f07786dc7d6f184d2bc49dfc3f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -545,6 +545,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -544,6 +544,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public void setBlocksDirty(BlockPos pos, BlockState old, BlockState updated) {}
|
||||
|
||||
public void updateNeighborsAt(BlockPos pos, Block block) {
|
||||
|
@ -32,18 +32,18 @@ index 8993d8809c109212ab278e15c09cebab9e89342f..005a3058c51a41a39f050b1817e2079b
|
||||
buf.writeComponent(this.playerPrefix);
|
||||
buf.writeComponent(this.playerSuffix);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b8938c4118b61758874624229b6986956f30cc8e..8ba4af81f19e20c7d949edc72c0827bab22c19cb 100644
|
||||
index 99478fe8f16783e7d2ae128f32199fa4b465dc83..0f743a46195ce83bb3d96a5a65067cfab3a369e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -159,6 +159,7 @@ import net.minecraft.world.level.storage.loot.LootTables;
|
||||
@@ -162,6 +162,7 @@ import net.minecraft.world.level.storage.loot.LootTables;
|
||||
import net.minecraft.world.level.storage.loot.PredicateManager;
|
||||
import net.minecraft.world.phys.Vec2;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
+import net.minecraft.world.scores.PlayerTeam; // Paper
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -609,6 +610,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -610,6 +611,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||
}
|
||||
|
||||
@ -65,24 +65,24 @@ index b8938c4118b61758874624229b6986956f30cc8e..8ba4af81f19e20c7d949edc72c0827ba
|
||||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||
this.connection.acceptConnections();
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 484f3ca9da6d17c12b8b19883ea8a93ec0d4fb1a..78a03125e5563bfd3baa3912d593ab71054ab606 100644
|
||||
index 8e331babd8fdeba77aa3707b7e2e08591fa0d546..5a7ca495a78f33e5449d47ce71dbf9b11678551f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -87,6 +87,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
|
||||
@@ -88,6 +88,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.scores.Objective;
|
||||
import net.minecraft.world.scores.PlayerTeam;
|
||||
+import net.minecraft.world.scores.Scoreboard; // Paper
|
||||
import net.minecraft.world.scores.Team;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -150,6 +151,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
private CraftServer cserver;
|
||||
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
|
||||
+ public @Nullable String collideRuleTeamName; // Paper - Team name used for collideRule
|
||||
|
||||
public PlayerList(MinecraftServer server, RegistryAccess.RegistryHolder registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
public PlayerList(MinecraftServer server, RegistryAccess.Frozen registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
||||
@@ -385,6 +387,13 @@ public abstract class PlayerList {
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable RCON IP address
|
||||
For servers with multiple IP's, ability to bind to a specific interface.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index 9682a149d996cc19d7bc0e9506acb1346e5c222e..07fd3da4de300f80516961ae22700dbc741e81dc 100644
|
||||
index 703403222763e42566552f2c6f3852e07f727f76..a7938420f6840b9d3880fb895aaf709ebd844312 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -70,6 +70,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@@ -74,6 +74,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@Nullable
|
||||
private WorldGenSettings worldGenSettings;
|
||||
|
||||
@ -18,10 +18,10 @@ index 9682a149d996cc19d7bc0e9506acb1346e5c222e..07fd3da4de300f80516961ae22700dbc
|
||||
// CraftBukkit start
|
||||
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
|
||||
super(properties, optionset);
|
||||
@@ -115,6 +117,10 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.textFilteringConfig = this.get("text-filtering-config", "");
|
||||
this.playerIdleTimeout = this.getMutable("player-idle-timeout", 0);
|
||||
this.whiteList = this.getMutable("white-list", false);
|
||||
@@ -124,6 +126,10 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
}, new JsonObject()), this.get("generate-structures", true), (String) this.get("level-type", (s) -> {
|
||||
return s.toLowerCase(Locale.ROOT);
|
||||
}, "default"));
|
||||
+ // Paper start - Configurable rcon ip
|
||||
+ final String rconIp = this.getStringRaw("rcon.ip");
|
||||
+ this.rconIp = rconIp == null ? this.serverIp : rconIp;
|
||||
@ -30,7 +30,7 @@ index 9682a149d996cc19d7bc0e9506acb1346e5c222e..07fd3da4de300f80516961ae22700dbc
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
||||
index 5e642ab9947f054c1741e13170a36f8fe300cdbe..a93e0eb67a78abb2eabd549cd5240095a24e5545 100644
|
||||
index cb61eaf8447c8340c4b4e1079c0a6aecd41a6116..3bf60f640aa9fa4cabd2b3e5d3931e8467b9df24 100644
|
||||
--- a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
||||
+++ b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
||||
@@ -60,7 +60,7 @@ public class RconThread extends GenericThread {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
|
||||
Don't even get me started
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e13808657e0c7dc94fcd2844690a31d0691b6a7b..fcf9206ef317aa22cd644ccb415c2156fd9f2af2 100644
|
||||
index 5f7a16651a0ca5497b20d8723e9c170506668267..2ce597f594142d64a239649e1b812b3b7b0af340 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1224,10 +1224,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1227,10 +1227,16 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
|
||||
|
@ -6,26 +6,26 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
||||
to stop IDE complaining about potential NPE
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8ba4af81f19e20c7d949edc72c0827bab22c19cb..375045935b7b9a3a8fd8f8f897763caf75e59813 100644
|
||||
index 0f743a46195ce83bb3d96a5a65067cfab3a369e8..0eaa13cf0f452fe6604767e40d8c9b6664df31bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -185,6 +185,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
|
||||
@@ -186,6 +186,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
|
||||
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
||||
|
||||
+ private static MinecraftServer SERVER; // Paper
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
public static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final String VANILLA_BRAND = "vanilla";
|
||||
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
|
||||
@@ -320,6 +321,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -321,6 +322,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, Thread thread, RegistryAccess.RegistryHolder iregistrycustom_dimension, LevelStorageSource.LevelStorageAccess convertable_conversionsession, WorldData savedata, PackRepository resourcepackrepository, Proxy proxy, DataFixer datafixer, ServerResources datapackresources, @Nullable MinecraftSessionService minecraftsessionservice, @Nullable GameProfileRepository gameprofilerepository, @Nullable GameProfileCache usercache, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||
public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, DynamicOps<Tag> registryreadops, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, @Nullable MinecraftSessionService minecraftsessionservice, @Nullable GameProfileRepository gameprofilerepository, @Nullable GameProfileCache usercache, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||
super("Server");
|
||||
+ SERVER = this; // Paper - better singleton
|
||||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||
this.profiler = this.metricsRecorder.getProfiler();
|
||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||
@@ -2259,7 +2261,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2314,7 +2316,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Deprecated
|
||||
public static MinecraftServer getServer() {
|
||||
|
@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
|
||||
Additionally, numerous issues to player position tracking on maps has been fixed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ce13b2b9bcf0984732b3309ec3f14731cc6aef5f..92fc07fb1a9dab0d44ac439287d10ae05a4e7043 100644
|
||||
index 22ba7b534c450a4f9e608c331344e948a0fbf1f9..8672a2d9a62f091cae06073d57428766efc643bd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2046,6 +2046,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2053,6 +2053,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
{
|
||||
if ( iter.next().player == entity )
|
||||
{
|
||||
@ -25,10 +25,10 @@ index ce13b2b9bcf0984732b3309ec3f14731cc6aef5f..92fc07fb1a9dab0d44ac439287d10ae0
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 4d9b7fbb35d0c8f4fbb43b77a2e11a919614ab56..2862e75108b3304ab186ed89eb36801500e58b85 100644
|
||||
index 71610fa70cdaf3c5a54250a5814809013a6d228e..cf8b0c50bf44d28dcca6a759e5dc67c0a8d484c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -87,6 +87,7 @@ import net.minecraft.world.item.ElytraItem;
|
||||
@@ -88,6 +88,7 @@ import net.minecraft.world.item.ElytraItem;
|
||||
import net.minecraft.world.item.ItemCooldowns;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
@ -36,7 +36,7 @@ index 4d9b7fbb35d0c8f4fbb43b77a2e11a919614ab56..2862e75108b3304ab186ed89eb368015
|
||||
import net.minecraft.world.item.ProjectileWeaponItem;
|
||||
import net.minecraft.world.item.SwordItem;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
@@ -105,6 +106,7 @@ import net.minecraft.world.level.block.entity.SignBlockEntity;
|
||||
@@ -106,6 +107,7 @@ import net.minecraft.world.level.block.entity.SignBlockEntity;
|
||||
import net.minecraft.world.level.block.entity.StructureBlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.pattern.BlockInWorld;
|
||||
@ -44,7 +44,7 @@ index 4d9b7fbb35d0c8f4fbb43b77a2e11a919614ab56..2862e75108b3304ab186ed89eb368015
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.scores.PlayerTeam;
|
||||
@@ -730,6 +732,14 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -740,6 +742,14 @@ public abstract class Player extends LivingEntity {
|
||||
return null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -60,7 +60,7 @@ index 4d9b7fbb35d0c8f4fbb43b77a2e11a919614ab56..2862e75108b3304ab186ed89eb368015
|
||||
return entityitem;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index 3b35ec1df648a3de920ea0c15962388044737bbc..a6219dd70ab76959b2aaa155d5d17acc22095753 100644
|
||||
index 3527d40102d512d0e276edc969ea3c189aa34ec2..913fabc7f42c05ccec6501247a5e8d1d481756ee 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -63,6 +63,7 @@ public class MapItemSavedData extends SavedData {
|
||||
|
@ -515,10 +515,10 @@ index 0000000000000000000000000000000000000000..3377b86c337d0234bbb9b0349e4034a7
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6ed53d50f395dc2a629d7393b01074d14f0a60d4..493ddc76367226fa6344a1ee333378410e42b165 100644
|
||||
index f12e282dc4683d0430b9dba552757c4da5dee988..6f33e481e70a7b34a25d1413079288ca59b058c1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -167,6 +167,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -170,6 +170,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
};
|
||||
// Paper end
|
||||
|
||||
|
@ -12,10 +12,10 @@ the user never changed the default setting for Spigot's save on stop only.
|
||||
1.17: TODO does this need the synchronized blocks anymore?
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 375045935b7b9a3a8fd8f8f897763caf75e59813..370e9a840a9c8abf8804755c0395d51fd576ee49 100644
|
||||
index 0eaa13cf0f452fe6604767e40d8c9b6664df31bb..3e858ae243eaf9e145cbc5288ac2e3467082e369 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -973,7 +973,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -991,7 +991,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} catch (java.lang.InterruptedException ignored) {} // Paper
|
||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||
@ -25,10 +25,10 @@ index 375045935b7b9a3a8fd8f8f897763caf75e59813..370e9a840a9c8abf8804755c0395d51f
|
||||
// Spigot end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 66f74553fdddf1a6304919e4a9cde1dc2b935cf5..2201aeecd9936402825200dd696dc5607fe0f880 100644
|
||||
index 20ff08f1a802d16d2306b570e9fb529946d90f6b..b99c1b62ce01700d5c374a1801e8323d5906255c 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -255,7 +255,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -258,7 +258,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
if (this.convertOldUsers()) {
|
||||
@ -38,7 +38,7 @@ index 66f74553fdddf1a6304919e4a9cde1dc2b935cf5..2201aeecd9936402825200dd696dc560
|
||||
|
||||
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
index 2ead61f86571b9ae67300a6c286d363dd7d64a8a..e8515f4ed1f29ba926bc4ab6d918722aee450ac2 100644
|
||||
index 975ab6061f9d70eb61885960fdfdb24e71b2239e..981845707f47a674a912bf84509397a42b973e74 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -118,7 +118,7 @@ public class GameProfileCache {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Faster redstone torch rapid clock removal
|
||||
Only resize the the redstone torch list once, since resizing arrays / lists is costly
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 46f8fff21c0d91b9326b9270def43bd99c54b3ac..e33c9116ebd8ad751774fd0fa736c42214aed654 100644
|
||||
index 522b33f8d78468f07786dc7d6f184d2bc49dfc3f..9abe4b8bbd97c30d84964d3c66a61e8b43140adb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -159,6 +159,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -157,6 +157,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
private int tileTickPosition;
|
||||
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Only send Dragon/Wither Death sounds to same world
|
||||
Also fix view distance lookup
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 7de279a1bef44a76173a1b71b98425ca6aa219aa..2584c02a5f6511ade260986a6aacef401c294549 100644
|
||||
index 10da58381202f8ec3d49aa2ed08faf30c435883b..89bd094fc31969284d831eaab47a131914d4fb13 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -640,8 +640,9 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -637,8 +637,9 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
if (this.dragonDeathTime == 1 && !this.isSilent()) {
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.world.b(1028, this.getChunkCoordinates(), 0);
|
||||
@ -22,10 +22,10 @@ index 7de279a1bef44a76173a1b71b98425ca6aa219aa..2584c02a5f6511ade260986a6aacef40
|
||||
double deltaZ = this.getZ() - player.getZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
index 6fde138a3da49fee4fdbf36e0ab58438e114e196..4f9f64def9b5da5bd2714c5f3ba36a4339623758 100644
|
||||
index 78bffaddbc9e478fb53639396e9c4970e9961b21..32b302aad0319ce3ee412912425c1c8db9979f8a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -272,8 +272,9 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
@@ -271,8 +271,9 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
if (!this.isSilent()) {
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.world.globalLevelEvent(1023, new BlockPosition(this), 0);
|
||||
|
@ -9,17 +9,17 @@ Subject: [PATCH] Fix Old Sign Conversion
|
||||
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 14ac3c7b47525b7fd0345d817c9020b5a59d2ebc..1e416b23a38458f16add472cea09b0ac5ac91869 100644
|
||||
index 5c2ac7a1de96d9b4830955c2ff108c0881b5949b..32a2fbf4a11a84d5a55e02d3ba21e6f4430379c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -33,6 +33,7 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject {
|
||||
@@ -32,6 +32,7 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject {
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
// CraftBukkit end
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
+ public boolean isLoadingStructure = false; // Paper
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private final BlockEntityType<?> type;
|
||||
@Nullable
|
||||
protected Level level;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
index e390cfea5bed64284a97c88a717503f07f073a30..3a2e2adeefe73981b443216724270023408c1feb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
@ -34,7 +34,7 @@ index e390cfea5bed64284a97c88a717503f07f073a30..3a2e2adeefe73981b443216724270023
|
||||
continue;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
index 2aaa7bb03ab200a5df1ae1aab7b81ac8ce85d64c..ef8dd3fa4f7ac8f85ae508999264850659bf9606 100644
|
||||
index cf8a38b7d55d229ac556f8a93b25c155381df3a2..129ebb095c2280376a59b54920e5ff90cf1f465a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
|
||||
@@ -284,7 +284,9 @@ public class StructureTemplate {
|
||||
|
@ -32,7 +32,7 @@ index c6ca15a5cc53995ca0ada9c9ac9dc1d084963eb5..728835cddd413d778e9628360989724f
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
index 6914ab77fc868844c391ac41ba2d344a26012208..00f783aafd81fa7e836e4eea5bfeac7434f33b0f 100644
|
||||
index 920a1ded577aa1c265137dd72a6f3d13a431d5c8..c3e3a9950ee05dc97f15ab128e40854901f38a2f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -98,6 +98,7 @@ public class GameProfileCache {
|
||||
@ -53,7 +53,7 @@ index 6914ab77fc868844c391ac41ba2d344a26012208..00f783aafd81fa7e836e4eea5bfeac74
|
||||
|
||||
public synchronized void add(GameProfile profile) { // Paper - synchronize
|
||||
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
index 876658b685ea09adb4c01d436da56daadb7eedaa..5445cb5910ec63408dc4379eec5e12d305182527 100644
|
||||
index b7b98832be6178a2bca534bf974519ede977b282..aa3caccc58f1cec8d5f396813d7fc40b05985cc8 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
@@ -66,7 +66,8 @@ public class OldUsersConverter {
|
||||
@ -67,10 +67,10 @@ index 876658b685ea09adb4c01d436da56daadb7eedaa..5445cb5910ec63408dc4379eec5e12d3
|
||||
} else {
|
||||
String[] astring1 = astring;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1065f69322bb9d068f4ec63e40cc4db6f5425c40..88315ebb3b5e698ecc8332951ad72ef538bc44fd 100644
|
||||
index ad851aa3a29b6aabfcfe7f95df15303437c48eaa..2b6df52d586acf28aaf531c39073cf9448c589f9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1705,7 +1705,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1697,7 +1697,7 @@ public final class CraftServer implements Server {
|
||||
// Spigot Start
|
||||
GameProfile profile = null;
|
||||
// Only fetch an online UUID in online mode
|
||||
|
@ -23,10 +23,10 @@ index 728835cddd413d778e9628360989724f65335b46..6c13fe725ca2b2a6f0f375b80f6c2cb6
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index bacb8ff97a6745847b5e3eb82dd08bde934e8d1f..035920097271ce50b21eddbed7c874b9628ac28a 100644
|
||||
index 024f6b5bf84a4e55f6237107ae8f8958caa9ef72..6547de3f54ac69af84430d0277f156adacdaa3e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1494,13 +1494,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1502,13 +1502,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// Spigot start - limit place/interactions
|
||||
private int limitedPackets;
|
||||
private long lastLimitedPacket = -1;
|
||||
|
@ -21,11 +21,11 @@ index 6c13fe725ca2b2a6f0f375b80f6c2cb643b9913d..5e23ff0c5e44427a996281ae42fc12c2
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 035920097271ce50b21eddbed7c874b9628ac28a..16bb1d2d5f168d45bef86fad6e9ebc68f2e822f4 100644
|
||||
index 6547de3f54ac69af84430d0277f156adacdaa3e7..df5282a1bb7d685f0f322f5976d8cf7d31abed49 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -299,7 +299,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
if (this.clientIsFloating && !this.player.isSleeping()) {
|
||||
@@ -300,7 +300,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) {
|
||||
if (++this.aboveGroundTickCount > 80) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
||||
- this.disconnect(new TranslatableComponent("multiplayer.disconnect.flying"));
|
||||
@ -33,7 +33,7 @@ index 035920097271ce50b21eddbed7c874b9628ac28a..16bb1d2d5f168d45bef86fad6e9ebc68
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -318,7 +318,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -319,7 +319,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) {
|
||||
if (++this.aboveGroundVehicleTickCount > 80) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityZapEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index e2ac5290751b8c219add3823251e0131c0d2b52e..8785a112519de49e0d61eab5ab5325f9b2068d7e 100644
|
||||
index 819f694e96dd21bbc47f345fcd9c5714ab44040f..32a961075b41cd84b24398b9d1a4d58f88439d73 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -834,9 +834,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -836,9 +836,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@Override
|
||||
public void thunderHit(ServerLevel world, LightningBolt lightning) {
|
||||
if (world.getDifficulty() != Difficulty.PEACEFUL) {
|
||||
|
@ -22,10 +22,10 @@ index 80345730b8ccc11d3d0833485d25b03f614aeee2..6eb3678177834a4b34b78ba8e359528d
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 0366303a986ae6da8e95ed3051610c432a790194..a8a9cbcece45c3480120cb2fa0fa03523a87d317 100644
|
||||
index 2bc46e02779d22adedc1fd9e5c9130c209bd58f7..c1de9740d199dc862f8e85251a5de021499e0031 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -324,6 +324,18 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -309,6 +309,18 @@ public class FallingBlockEntity extends Entity {
|
||||
@Override
|
||||
protected void readAdditionalSaveData(CompoundTag nbt) {
|
||||
this.blockState = NbtUtils.readBlockState(nbt.getCompound("BlockState"));
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache user authenticator threads
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 08e7fd48514f9a6e89efc0d8adcbcf14bc92b103..afa04bbf778e5dd0823a0aab0573e4cc3787858d 100644
|
||||
index 627931ec09bfb1a84f0659981491cf3b6425aa32..58ef6874cd6c90e6ccc7c39881cc3bf68fba284b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -117,6 +117,18 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
@@ -116,6 +116,18 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ index 08e7fd48514f9a6e89efc0d8adcbcf14bc92b103..afa04bbf778e5dd0823a0aab0573e4cc
|
||||
// Spigot end
|
||||
}
|
||||
|
||||
@@ -251,7 +264,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
@@ -257,7 +270,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
throw new IllegalStateException("Protocol error", cryptographyexception);
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ index 08e7fd48514f9a6e89efc0d8adcbcf14bc92b103..afa04bbf778e5dd0823a0aab0573e4cc
|
||||
public void run() {
|
||||
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.gameProfile;
|
||||
|
||||
@@ -296,10 +310,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
@@ -302,10 +316,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
|
||||
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 88315ebb3b5e698ecc8332951ad72ef538bc44fd..903e4d866ffd2711c540c8982fe189d6992361f3 100644
|
||||
index 2b6df52d586acf28aaf531c39073cf9448c589f9..eacf4e00d7ce0c1458428237e6c67aaddb45b77a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2526,5 +2526,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2518,5 +2518,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index 687904d3e1b3ee7b514c707d9b2eeccabbf56603..f7cbe6819b8c4f7eaca2389de8eaceb50bce4b15 100644
|
||||
index dba0bc7dc8fd1993f45716a398b1ccf52d3d868b..b3433ce9c722bdab81848a6c2d121ca510c48509 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -246,7 +246,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -247,7 +247,7 @@ public class ExperienceOrb extends Entity {
|
||||
int i = this.repairPlayerItems(player, this.value);
|
||||
|
||||
if (i > 0) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't let fishinghooks use portals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index eaa3ed52a57b56fc0f260aadfd23c2fd6dfc0f51..54bd343def9f1ebc987640c5d756db906593f320 100644
|
||||
index 24192a91d9f5c890a316ec150d4aec84073cb61a..3b23279ce994b9684dbc10157839f5fc47edfabd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -252,6 +252,11 @@ public class FishingHook extends Projectile {
|
||||
@@ -255,6 +255,11 @@ public class FishingHook extends Projectile {
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().scale(0.92D));
|
||||
this.reapplyPosition();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z
|
||||
Reduce method invocations for World.isLoaded(BlockPosition)Z
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index e33c9116ebd8ad751774fd0fa736c42214aed654..d65fcf365a2c24c099e70597c843562ec341df3a 100644
|
||||
index 9abe4b8bbd97c30d84964d3c66a61e8b43140adb..567cc347af00eed98fdf8832ef6c9468332b94e4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -320,6 +320,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -319,6 +319,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||
}
|
||||
|
||||
|
@ -33,15 +33,15 @@ index 6ec5a1525d0b8ced8fe78d3eab29c5eb82996844..2442c287a7f26cfee10a19e9015558cd
|
||||
public boolean isWithinBounds(ChunkPos pos) {
|
||||
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
|
||||
index cea24d53d94973218d947ece41be722f1ee79b7e..461464a4208bbb09800d87bcdb54978758863c7b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
|
||||
@@ -168,6 +168,7 @@ public class StructureFeature<C extends FeatureConfiguration> {
|
||||
int o = j + i * m;
|
||||
int p = k + i * n;
|
||||
ChunkPos chunkPos = this.getPotentialFeatureChunk(config, worldSeed, o, p);
|
||||
+ if (!world.getWorldBorder().isChunkInBounds(chunkPos.x, chunkPos.z)) { continue; } // Paper
|
||||
StructureCheckResult structureCheckResult = structureAccessor.checkStructurePresence(chunkPos, this, skipExistingChunks);
|
||||
if (structureCheckResult != StructureCheckResult.START_NOT_PRESENT) {
|
||||
if (!skipExistingChunks && structureCheckResult == StructureCheckResult.START_PRESENT) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
index ebdf71c5dc31dc002c5bb222e954c39e69ac7449..f9fc2fc63080a60fe61ebb08ddd93c4f189df84d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -432,6 +432,7 @@ public abstract class ChunkGenerator implements BiomeManager.NoiseBiomeSource {
|
||||
int l1 = i + i1 * j1;
|
||||
int i2 = j + i1 * k1;
|
||||
ChunkPos chunkcoordintpair = randomspreadstructureplacement.getPotentialFeatureChunk(l, l1, i2);
|
||||
+ if (!iworldreader.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper
|
||||
Iterator iterator = set.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
|
@ -28,10 +28,10 @@ index 6eb3678177834a4b34b78ba8e359528de7c0d2f0..f383f30b9dd1a7c6cf69d342f99118be
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
index a75236c1374919f7640e3b705f696dd8568eb3dc..90d77153d818534b1cb53ce80ea5409a709a2384 100644
|
||||
index 7eda0af21ce7662e9bb6d47c79e175a060a8bb13..52382b5b8149351ecf981d5414a0a50025f181c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
@@ -383,7 +383,8 @@ public class VillagerTrades {
|
||||
@@ -386,7 +386,8 @@ public class VillagerTrades {
|
||||
return null;
|
||||
} else {
|
||||
ServerLevel serverLevel = (ServerLevel)entity.level;
|
||||
@ -42,10 +42,10 @@ index a75236c1374919f7640e3b705f696dd8568eb3dc..90d77153d818534b1cb53ce80ea5409a
|
||||
ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true);
|
||||
MapItem.renderBiomePreviewMap(serverLevel, itemStack);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||
index bdc0de577d3acca7d9e03d184ac65b97c5b3e68a..6dc8d85f4b8a0aa24ae22d46da4a3f89c7e01871 100644
|
||||
index 385cae45ef8cbaf9f09472585e6f639eea3e0331..722930d400a35140542b742ae8ae1784ecfa0e33 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||
@@ -65,7 +65,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {
|
||||
@@ -68,7 +68,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {
|
||||
Vec3 vec3 = context.getParamOrNull(LootContextParams.ORIGIN);
|
||||
if (vec3 != null) {
|
||||
ServerLevel serverLevel = context.getLevel();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize ItemStack.isEmpty()
|
||||
Remove hashMap lookup every check, simplify code to remove ternary
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 74e4990888d88f18cb3d800724d9156e9d1ae21d..ce082016d841e3e7ba46b722b85edae9acc3f290 100644
|
||||
index d66cc030dcd3d98f57803938c8c06342a028ee88..65189af7acc3e60fc7f2bfe82128ada981bf1271 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -239,7 +239,7 @@ public final class ItemStack {
|
||||
@@ -245,7 +245,7 @@ public final class ItemStack {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
|
||||
Credit to prplz for figuring out the real issue
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 3a97690a1e65db9a1c184fa4df5899cfda3d44bc..ab73818893b00551f8137704a727e33046d43a6a 100644
|
||||
index fa3344c71a9715ad465f39be92cb724368ae2b03..2fbe90ba893393e04b72b9feeff5f6be09d65e16 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2158,7 +2158,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -2156,7 +2156,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public boolean isImmobile() {
|
||||
@ -19,10 +19,10 @@ index 3a97690a1e65db9a1c184fa4df5899cfda3d44bc..ab73818893b00551f8137704a727e330
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 16bb1d2d5f168d45bef86fad6e9ebc68f2e822f4..1a29ea597de65689b5e374e98da988e86afb4d11 100644
|
||||
index df5282a1bb7d685f0f322f5976d8cf7d31abed49..0b15188c1357926f72265411eb776726a5aa21f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2821,7 +2821,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2845,7 +2845,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
public final boolean isDisconnected() {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
index 60d60e368191038537f6a18f336565994a6b23ec..fe502e148e218ae404e0049c0251d3e3ca08c825 100644
|
||||
index 231d5923a2df7f1e7428555a3f28b83f95fc4b44..9930f7a0681899017329bd2c599db7308310b395 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -39,6 +39,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
@ -16,7 +16,7 @@ index 60d60e368191038537f6a18f336565994a6b23ec..fe502e148e218ae404e0049c0251d3e3
|
||||
|
||||
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -315,6 +316,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
@@ -318,6 +319,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
}
|
||||
|
||||
nbt.putBoolean("ShotAtAngle", (Boolean) this.entityData.get(FireworkRocketEntity.DATA_SHOT_AT_ANGLE));
|
||||
@ -28,7 +28,7 @@ index 60d60e368191038537f6a18f336565994a6b23ec..fe502e148e218ae404e0049c0251d3e3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -331,7 +337,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
@@ -334,7 +340,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
if (nbt.contains("ShotAtAngle")) {
|
||||
this.entityData.set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, nbt.getBoolean("ShotAtAngle"));
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
||||
Allows you to access the Gateway being used in a teleport event
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index 1001c318be6e57f5f55a842c148d29cf09d1e138..8af71dd1b916be666ee163904118db46fd3c9850 100644
|
||||
index 5b6b827db29756b2db0aaa26c84ddb4bccaade19..d336cf8f845a4d35a2d0a4cbe3b1b373fb00a970 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.data.worldgen.features.EndFeatures;
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.data.worldgen.features.EndFeatures;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||
@ -17,7 +17,7 @@ index 1001c318be6e57f5f55a842c148d29cf09d1e138..8af71dd1b916be666ee163904118db46
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.util.Mth;
|
||||
@@ -209,7 +210,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
@@ -210,7 +211,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
location.setPitch(player.getLocation().getPitch());
|
||||
location.setYaw(player.getLocation().getYaw());
|
||||
|
||||
|
@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
||||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index d65fcf365a2c24c099e70597c843562ec341df3a..41e7474588d8e5ba4cd4af0fed1e62e452389a3e 100644
|
||||
index 567cc347af00eed98fdf8832ef6c9468332b94e4..d22b7edc9ddea765c11e82346afd3942e37831de 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -113,7 +113,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -110,7 +110,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public static final int TICKS_PER_DAY = 24000;
|
||||
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
||||
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
||||
@ -20,10 +20,10 @@ index d65fcf365a2c24c099e70597c843562ec341df3a..41e7474588d8e5ba4cd4af0fed1e62e4
|
||||
private boolean tickingBlockEntities;
|
||||
public final Thread thread;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index deeb4afbbe6d4b6f44dfe20265a1a2d7d7e66e2e..e2289fbfbb59b0b1d2a09d6bb0e17664de209ebb 100644
|
||||
index 48812a4fe0c12689dd9d7829019cdf70e0bda65b..e90773c4824edf29a553827dd986209b2dd3f985 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -141,6 +141,57 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -144,6 +144,57 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
|
||||
private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 31d5d69ba7e78158bf854a25e2bf43b119e0bf88..ebf9e06b4fdd64d22ad2b56c26b4c994c1a84833 100644
|
||||
index 6f33e481e70a7b34a25d1413079288ca59b058c1..5a98227902dfd87cda7c046f6fde0aeb4462353f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2256,6 +2256,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -2260,6 +2260,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
|
||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
||||
|
@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
|
||||
Replaces isFromBottle() with logic that persists entity reloads too.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 252613e3c4c496bd4f6fd061e36fac06c32323c9..12c9efc409e5306fb24b8338d4c60286cff1435c 100644
|
||||
index 5a041f178184550a5b839bfa45fa271816e52e3d..c0f712fd4dd57080044341c7c7c8faf09572c2c5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -416,7 +416,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -426,7 +426,7 @@ public class ServerPlayerGameMode {
|
||||
|
||||
// Drop event experience
|
||||
if (flag && event != null) {
|
||||
@ -21,10 +21,10 @@ index 252613e3c4c496bd4f6fd061e36fac06c32323c9..12c9efc409e5306fb24b8338d4c60286
|
||||
|
||||
return true;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index f7cbe6819b8c4f7eaca2389de8eaceb50bce4b15..90692df7e02346d4ba785d2eaf724d06b98b4438 100644
|
||||
index b3433ce9c722bdab81848a6c2d121ca510c48509..227aca795efc99c4f81dfb30c00d31d2d7524542 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -38,13 +38,63 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -37,13 +37,63 @@ public class ExperienceOrb extends Entity {
|
||||
public int value;
|
||||
private int count;
|
||||
private Player followingPlayer;
|
||||
@ -90,7 +90,7 @@ index f7cbe6819b8c4f7eaca2389de8eaceb50bce4b15..90692df7e02346d4ba785d2eaf724d06
|
||||
}
|
||||
|
||||
public ExperienceOrb(EntityType<? extends ExperienceOrb> type, Level world) {
|
||||
@@ -154,12 +204,20 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -153,12 +203,20 @@ public class ExperienceOrb extends Entity {
|
||||
}
|
||||
|
||||
public static void award(ServerLevel world, Vec3 pos, int amount) {
|
||||
@ -112,7 +112,7 @@ index f7cbe6819b8c4f7eaca2389de8eaceb50bce4b15..90692df7e02346d4ba785d2eaf724d06
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,6 +285,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -228,6 +286,7 @@ public class ExperienceOrb extends Entity {
|
||||
nbt.putShort("Age", (short) this.age);
|
||||
nbt.putShort("Value", (short) this.value);
|
||||
nbt.putInt("Count", this.count);
|
||||
@ -120,7 +120,7 @@ index f7cbe6819b8c4f7eaca2389de8eaceb50bce4b15..90692df7e02346d4ba785d2eaf724d06
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -235,6 +294,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -236,6 +295,7 @@ public class ExperienceOrb extends Entity {
|
||||
this.age = nbt.getShort("Age");
|
||||
this.value = nbt.getShort("Value");
|
||||
this.count = Math.max(nbt.getInt("Count"), 1);
|
||||
@ -129,10 +129,10 @@ index f7cbe6819b8c4f7eaca2389de8eaceb50bce4b15..90692df7e02346d4ba785d2eaf724d06
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index fcf9206ef317aa22cd644ccb415c2156fd9f2af2..3490b9f1803ea852ad0682e22524b58c3b050510 100644
|
||||
index 2ce597f594142d64a239649e1b812b3b7b0af340..7df80e251dbdaff32cdc0f3e7dffc9ea6d163b09 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1697,7 +1697,8 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1700,7 +1700,8 @@ public abstract class LivingEntity extends Entity {
|
||||
protected void dropExperience() {
|
||||
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
|
||||
if (true) {
|
||||
@ -143,10 +143,10 @@ index fcf9206ef317aa22cd644ccb415c2156fd9f2af2..3490b9f1803ea852ad0682e22524b58c
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
index 4f18af2691e149e42567c45b934adf62a589ebe0..2bc77858b4a78e24227b4b096fd44177202d5292 100644
|
||||
index 884491126f9a0b1436953ea1721746e9690ca250..3d76b91f43fb2d261e270ba52fafe2648ba6abc9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
@@ -272,7 +272,7 @@ public abstract class Animal extends AgeableMob {
|
||||
@@ -271,7 +271,7 @@ public abstract class Animal extends AgeableMob {
|
||||
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
// CraftBukkit start - use event experience
|
||||
if (experience > 0) {
|
||||
@ -156,10 +156,10 @@ index 4f18af2691e149e42567c45b934adf62a589ebe0..2bc77858b4a78e24227b4b096fd44177
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 5220c9512c2a3e12a183b3c5ee42346f073661d9..2caf3aa6ca876d59deb98ee917e8228df140b414 100644
|
||||
index 483703458a374a27a1e30ea1fb1f08ec451046a7..6ffd1aec3563e92f5d5975d3fb4d3d89feec1416 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -888,7 +888,7 @@ public class Fox extends Animal {
|
||||
@@ -890,7 +890,7 @@ public class Fox extends Animal {
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
// CraftBukkit start - use event experience
|
||||
if (experience > 0) {
|
||||
@ -169,10 +169,10 @@ index 5220c9512c2a3e12a183b3c5ee42346f073661d9..2caf3aa6ca876d59deb98ee917e8228d
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
index 29ced58a41889b63282ac5abf984e14f007407c3..44679e3b44b03dc20b3763af84df655d81680c06 100644
|
||||
index 6af8773e80351f14204b969d7bbdd976b39e99d7..ea1bb6924043dfd05452b793afd7651c867de5dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
@@ -452,7 +452,7 @@ public class Turtle extends Animal {
|
||||
@@ -450,7 +450,7 @@ public class Turtle extends Animal {
|
||||
Random random = this.animal.getRandom();
|
||||
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
@ -182,10 +182,10 @@ index 29ced58a41889b63282ac5abf984e14f007407c3..44679e3b44b03dc20b3763af84df655d
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 2584c02a5f6511ade260986a6aacef401c294549..19e594757fca90c64c4dc59233ff956e7c316da9 100644
|
||||
index 89bd094fc31969284d831eaab47a131914d4fb13..139c98ab86589027873418601dbc7f4ed6358906 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -634,7 +634,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -631,7 +631,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
|
||||
if (this.level instanceof ServerLevel) {
|
||||
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && flag) {
|
||||
@ -194,7 +194,7 @@ index 2584c02a5f6511ade260986a6aacef401c294549..19e594757fca90c64c4dc59233ff956e
|
||||
}
|
||||
|
||||
if (this.dragonDeathTime == 1 && !this.isSilent()) {
|
||||
@@ -665,7 +665,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -662,7 +662,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
this.yBodyRot = this.getYRot();
|
||||
if (this.dragonDeathTime == 200 && this.level instanceof ServerLevel) {
|
||||
if (flag) {
|
||||
@ -204,10 +204,10 @@ index 2584c02a5f6511ade260986a6aacef401c294549..19e594757fca90c64c4dc59233ff956e
|
||||
|
||||
if (this.dragonFight != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index 8785a112519de49e0d61eab5ab5325f9b2068d7e..bd073ac603be130e649d206992c01860ee72d531 100644
|
||||
index 32a961075b41cd84b24398b9d1a4d58f88439d73..ac44ba98d0acc9aa2a75088d8a9a145fdbcbd911 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -622,7 +622,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -624,7 +624,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
}
|
||||
|
||||
if (offer.shouldRewardExp()) {
|
||||
@ -217,10 +217,10 @@ index 8785a112519de49e0d61eab5ab5325f9b2068d7e..bd073ac603be130e649d206992c01860
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
index 9001d627060b9691b703b4c0e157124b0cdee6bb..1101989e93758294c1adebbef0ab12a3c046e326 100644
|
||||
index b9a0fc52460ce0c50deea25112dee20c977e99c5..d7cb3d8b37f225ee4796246aa907da1092fa9a0d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
@@ -187,7 +187,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
@@ -186,7 +186,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
if (offer.shouldRewardExp()) {
|
||||
int i = 3 + this.random.nextInt(4);
|
||||
|
||||
@ -230,10 +230,10 @@ index 9001d627060b9691b703b4c0e157124b0cdee6bb..1101989e93758294c1adebbef0ab12a3
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index c4126c0ced9cd8f7f23f91e2d141c37ba85da6af..c51dbef3bf17405be368d4caec72b713e06bafbc 100644
|
||||
index 3b23279ce994b9684dbc10157839f5fc47edfabd..90a5a5ede2c65d74dec4ac247e8411636fc20f78 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -515,7 +515,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -518,7 +518,7 @@ public class FishingHook extends Projectile {
|
||||
this.level.addFreshEntity(entityitem);
|
||||
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
||||
if (playerFishEvent.getExpToDrop() > 0) {
|
||||
@ -241,7 +241,7 @@ index c4126c0ced9cd8f7f23f91e2d141c37ba85da6af..c51dbef3bf17405be368d4caec72b713
|
||||
+ entityhuman.level.addFreshEntity(new ExperienceOrb(entityhuman.level, entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.getPlayerOwner(), this)); // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (itemstack1.is((Tag) ItemTags.FISHES)) {
|
||||
if (itemstack1.is(ItemTags.FISHES)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
|
||||
index db6b1a9804a6d75dce22b780044beb04ca69cc94..dcbbff3a8dfcac869f07025e0e8e3d9c47956093 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
|
||||
@ -269,10 +269,10 @@ index dbdba510d8ff3c622ed928151cf525cfd1d1b1b5..aa0ba9c7dcb0ee81c9081031c447eeab
|
||||
|
||||
world.levelEvent(1042, blockposition, 0);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 5147f67c87ba3b8912a8ae24f876a9e996504600..b77eda6af8b430311e502465a2590d83555ff6cf 100644
|
||||
index 54125cf5957f8165551e077c47d02b7daa578efb..59a8d1984f3bcc94048a4ce3e530d21cc3f39d7f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -372,8 +372,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -374,8 +374,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
}
|
||||
|
||||
public void popExperience(ServerLevel world, BlockPos pos, int size) {
|
||||
@ -288,10 +288,10 @@ index 5147f67c87ba3b8912a8ae24f876a9e996504600..b77eda6af8b430311e502465a2590d83
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index 16c272856bf9d8f8f2bf18f408cea2de94177f37..d39546b3f8d0c97fefdcc90f638eee60a5db409e 100644
|
||||
index b44216c8f5a938a92fda4156ac67988d1c399c99..c3c53a34f645a834256c31951e465ae33aa1a9ff 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -627,7 +627,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -629,7 +629,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
j = event.getExpToDrop();
|
||||
// CraftBukkit end
|
||||
|
||||
@ -301,10 +301,10 @@ index 16c272856bf9d8f8f2bf18f408cea2de94177f37..d39546b3f8d0c97fefdcc90f638eee60
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index caccb8d7b30e616a4fb367e2e1c42845dd9a1880..ef3874fccb5d8b99c2b6753e7c60b83f5e3f316b 100644
|
||||
index 67223f63fdad5c53008c51b774917882c83ab707..8fb3e18303abbedb9c07319d11619c39743cbaf8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -883,7 +883,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@@ -884,7 +884,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
|
||||
entity = new PrimedTnt(world, x, y, z, null);
|
||||
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) {
|
||||
|
@ -27,10 +27,10 @@ index f383f30b9dd1a7c6cf69d342f99118beec70b206..47b717e8741bb2b8f3aa776dcdc73a3e
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index ebf9e06b4fdd64d22ad2b56c26b4c994c1a84833..fb7487b52af00ae44e669242a4182a49e9b00428 100644
|
||||
index 5a98227902dfd87cda7c046f6fde0aeb4462353f..9bf0d7dca8abee27ca5757bc3e56c723d910623b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -314,6 +314,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -317,6 +317,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
@ -39,10 +39,10 @@ index ebf9e06b4fdd64d22ad2b56c26b4c994c1a84833..fb7487b52af00ae44e669242a4182a49
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 3490b9f1803ea852ad0682e22524b58c3b050510..9c175c28d152d4a6af9a720cfd95df7fdcc1be81 100644
|
||||
index 7df80e251dbdaff32cdc0f3e7dffc9ea6d163b09..f7d100d5fa85cd2e705e78be8dc6373f02d0adc0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3225,8 +3225,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3228,8 +3228,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,19 +5,20 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index c72d19a903a5cbb48d38f493e00e8c54a8e23b9c..065ee0486ec275f9b61dc18afa86023183f0c73b 100644
|
||||
index a10848e6899853f447f101675e3a6aba9d3d43f3..50b2dc91f4926ebc4511e44e3aa3062eadc40ea0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -221,7 +221,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.playerMap = new PlayerMap();
|
||||
@@ -226,8 +226,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.entityMap = new Int2ObjectOpenHashMap();
|
||||
this.chunkTypeCache = new Long2ByteOpenHashMap();
|
||||
this.chunkSaveCooldowns = new Long2LongOpenHashMap();
|
||||
- this.unloadQueue = Queues.newConcurrentLinkedQueue();
|
||||
+ this.unloadQueue = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper - need constant-time size()
|
||||
this.structureManager = structureManager;
|
||||
+ this.unloadQueue = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper - need constant-time size()
|
||||
Path path = session.getDimensionPath(world.dimension());
|
||||
|
||||
@@ -529,7 +529,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.storageName = path.getFileName().toString();
|
||||
@@ -569,7 +569,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Spigot start
|
||||
org.spigotmc.SlackActivityAccountant activityAccountant = this.level.getServer().slackActivityAccountant;
|
||||
activityAccountant.startActivity(0.5);
|
||||
@ -26,7 +27,7 @@ index c72d19a903a5cbb48d38f493e00e8c54a8e23b9c..065ee0486ec275f9b61dc18afa860231
|
||||
// Spigot end
|
||||
while (longiterator.hasNext()) { // Spigot
|
||||
long j = longiterator.nextLong();
|
||||
@@ -549,7 +549,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -589,7 +589,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
activityAccountant.endActivity(); // Spigot
|
||||
|
||||
|
@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
|
||||
in corruption/dataloss.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 370e9a840a9c8abf8804755c0395d51fd576ee49..0cf83ee46754197b2b639d07bff9a0d21566a641 100644
|
||||
index 3e858ae243eaf9e145cbc5288ac2e3467082e369..fc64c29058e68239e25c51cefe97627be2a13d33 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -229,6 +229,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -230,6 +230,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final Map<ResourceKey<Level>, ServerLevel> levels;
|
||||
private PlayerList playerList;
|
||||
private volatile boolean running;
|
||||
@ -41,7 +41,7 @@ index 370e9a840a9c8abf8804755c0395d51fd576ee49..0cf83ee46754197b2b639d07bff9a0d2
|
||||
private boolean stopped;
|
||||
private int tickCount;
|
||||
protected final Proxy proxy;
|
||||
@@ -929,7 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -930,7 +931,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.playerList != null) {
|
||||
MinecraftServer.LOGGER.info("Saving players");
|
||||
this.playerList.saveAll();
|
||||
@ -50,7 +50,7 @@ index 370e9a840a9c8abf8804755c0395d51fd576ee49..0cf83ee46754197b2b639d07bff9a0d2
|
||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
|
||||
@@ -992,6 +993,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1010,6 +1011,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void halt(boolean flag) {
|
||||
@ -64,7 +64,7 @@ index 370e9a840a9c8abf8804755c0395d51fd576ee49..0cf83ee46754197b2b639d07bff9a0d2
|
||||
if (flag) {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index d96e4b008e6a23952eaae0d506dad9785761b41f..6e635a1cf5091aa7c4697de2a08414e053cc51a5 100644
|
||||
index 288a046b8335a611e0c7a155a6d0565e6f7c272a..5b1dcf148d24bbd61728d8c2af611b7c4f8dd166 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1147,8 +1147,15 @@ public abstract class PlayerList {
|
||||
|
@ -26,10 +26,10 @@ index 47b717e8741bb2b8f3aa776dcdc73a3e7dbb5960..9dad1efab44b8a23f274aa89c85944d9
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1a29ea597de65689b5e374e98da988e86afb4d11..92c9254335854067683d98e1576c7d06f28415b1 100644
|
||||
index 0b15188c1357926f72265411eb776726a5aa21f6..00ab2135a53aecfe327d4fe95073db89936038a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2054,6 +2054,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2069,6 +2069,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
switch (packet.getAction()) {
|
||||
case PRESS_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(true);
|
||||
@ -44,10 +44,10 @@ index 1a29ea597de65689b5e374e98da988e86afb4d11..92c9254335854067683d98e1576c7d06
|
||||
case RELEASE_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(false);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 2533ac009bb3778b26f168ca21c04e0c8a19366a..51666c237abda8cce63997a655f4f621dd50ccca 100644
|
||||
index cf8b0c50bf44d28dcca6a759e5dc67c0a8d484c4..b15fd75ccbe54ea9169593e02631d2952b0d239a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -577,7 +577,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -578,7 +578,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
||||
if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
||||
|
@ -20,10 +20,10 @@ index 5e23ff0c5e44427a996281ae42fc12c28649e158..7a69f9d9bb9c05474d8fbab22d626529
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 903e4d866ffd2711c540c8982fe189d6992361f3..2d782eb547136e1dae123044b114bd77ca23383a 100644
|
||||
index eacf4e00d7ce0c1458428237e6c67aaddb45b77a..ef55ae870e341af0087bc99341a77c5d1b851328 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2545,5 +2545,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2537,5 +2537,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren