mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 03:55:14 +01:00
First batch of server patches
This commit is contained in:
parent
e080b20c45
commit
d280061a1a
@ -67,7 +67,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
paramMappings("net.fabricmc:yarn:1.21.1+build.3:mergedv2")
|
paramMappings("net.fabricmc:yarn:1.21.2+build.1:mergedv2")
|
||||||
remapper("net.fabricmc:tiny-remapper:0.10.3:fat")
|
remapper("net.fabricmc:tiny-remapper:0.10.3:fat")
|
||||||
decompiler("org.vineflower:vineflower:1.10.1")
|
decompiler("org.vineflower:vineflower:1.10.1")
|
||||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13")
|
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13")
|
||||||
|
@ -28,7 +28,7 @@ index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f
|
|||||||
+/.factorypath
|
+/.factorypath
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..82b298d454dee6a6d996aa7822dd745e70a8da74
|
index 0000000000000000000000000000000000000000..6ef457b8ea6ff9b89cb74ecbdca20731d9f94e97
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -0,0 +1,131 @@
|
@@ -0,0 +1,131 @@
|
||||||
@ -47,8 +47,8 @@ index 0000000000000000000000000000000000000000..82b298d454dee6a6d996aa7822dd745e
|
|||||||
+ }
|
+ }
|
||||||
+ implementation("org.ow2.asm:asm-commons:9.7.1")
|
+ implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||||
+ implementation("commons-lang:commons-lang:2.6")
|
+ implementation("commons-lang:commons-lang:2.6")
|
||||||
+ runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
|
+ runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3")
|
||||||
+ runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
|
+ runtimeOnly("com.mysql:mysql-connector-j:9.1.0")
|
||||||
+
|
+
|
||||||
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||||
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
||||||
@ -62,7 +62,7 @@ index 0000000000000000000000000000000000000000..82b298d454dee6a6d996aa7822dd745e
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+paperweight {
|
+paperweight {
|
||||||
+ craftBukkitPackageVersion.set("v1_21_R1") // also needs to be updated in MappingEnvironment
|
+ craftBukkitPackageVersion.set("v1_21_R2") // also needs to be updated in MappingEnvironment
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+tasks.jar {
|
+tasks.jar {
|
||||||
@ -165,10 +165,10 @@ index 0000000000000000000000000000000000000000..82b298d454dee6a6d996aa7822dd745e
|
|||||||
+}
|
+}
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..0000000000000000000000000000000000000000
|
index da3dad9b745635f2f4b3dd30350070cace3dfc48..0000000000000000000000000000000000000000
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,612 +0,0 @@
|
@@ -1,691 +0,0 @@
|
||||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
-<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">
|
- 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>
|
- <modelVersion>4.0.0</modelVersion>
|
||||||
@ -192,7 +192,7 @@ index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..00000000000000000000000000000000
|
|||||||
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
- <api.version>unknown</api.version>
|
- <api.version>unknown</api.version>
|
||||||
- <bt.name>git</bt.name>
|
- <bt.name>git</bt.name>
|
||||||
- <minecraft_version>1_21_R1</minecraft_version>
|
- <minecraft_version>1_21_R2</minecraft_version>
|
||||||
- <maven.compiler.release>21</maven.compiler.release>
|
- <maven.compiler.release>21</maven.compiler.release>
|
||||||
- </properties>
|
- </properties>
|
||||||
-
|
-
|
||||||
@ -235,7 +235,25 @@ index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..00000000000000000000000000000000
|
|||||||
- <version>9.7.1</version>
|
- <version>9.7.1</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <!-- Mojang depends -->
|
- <!-- Start Mojang depends -->
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
- <artifactId>jackson-annotations</artifactId>
|
||||||
|
- <version>2.13.4</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
- <artifactId>jackson-core</artifactId>
|
||||||
|
- <version>2.13.4</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
- <artifactId>jackson-databind</artifactId>
|
||||||
|
- <version>2.13.4.2</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>com.github.oshi</groupId>
|
- <groupId>com.github.oshi</groupId>
|
||||||
- <artifactId>oshi-core</artifactId>
|
- <artifactId>oshi-core</artifactId>
|
||||||
@ -243,15 +261,27 @@ index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..00000000000000000000000000000000
|
|||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
|
- <groupId>com.github.stephenc.jcip</groupId>
|
||||||
|
- <artifactId>jcip-annotations</artifactId>
|
||||||
|
- <version>1.0-1</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.microsoft.azure</groupId>
|
||||||
|
- <artifactId>msal4j</artifactId>
|
||||||
|
- <version>1.15.0</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
- <groupId>com.mojang</groupId>
|
- <groupId>com.mojang</groupId>
|
||||||
- <artifactId>authlib</artifactId>
|
- <artifactId>authlib</artifactId>
|
||||||
- <version>6.0.54</version>
|
- <version>6.0.55</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>com.mojang</groupId>
|
- <groupId>com.mojang</groupId>
|
||||||
- <artifactId>brigadier</artifactId>
|
- <artifactId>brigadier</artifactId>
|
||||||
- <version>1.2.9</version>
|
- <version>1.3.10</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
@ -262,8 +292,38 @@ index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..00000000000000000000000000000000
|
|||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>com.mojang</groupId>
|
- <groupId>com.mojang</groupId>
|
||||||
|
- <artifactId>jtracy</artifactId>
|
||||||
|
- <version>1.0.29</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.mojang</groupId>
|
||||||
- <artifactId>logging</artifactId>
|
- <artifactId>logging</artifactId>
|
||||||
- <version>1.2.7</version>
|
- <version>1.4.9</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.nimbusds</groupId>
|
||||||
|
- <artifactId>content-type</artifactId>
|
||||||
|
- <version>2.3</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.nimbusds</groupId>
|
||||||
|
- <artifactId>lang-tag</artifactId>
|
||||||
|
- <version>1.7</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.nimbusds</groupId>
|
||||||
|
- <artifactId>nimbus-jose-jwt</artifactId>
|
||||||
|
- <version>9.37.3</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>com.nimbusds</groupId>
|
||||||
|
- <artifactId>oauth2-oidc-sdk</artifactId>
|
||||||
|
- <version>11.9.1</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
@ -353,6 +413,18 @@ index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..00000000000000000000000000000000
|
|||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
|
- <groupId>net.minidev</groupId>
|
||||||
|
- <artifactId>accessors-smart</artifactId>
|
||||||
|
- <version>2.5.0</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>net.minidev</groupId>
|
||||||
|
- <artifactId>json-smart</artifactId>
|
||||||
|
- <version>2.5.0</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
- <groupId>net.sf.jopt-simple</groupId>
|
- <groupId>net.sf.jopt-simple</groupId>
|
||||||
- <artifactId>jopt-simple</artifactId>
|
- <artifactId>jopt-simple</artifactId>
|
||||||
- <version>5.0.4</version>
|
- <version>5.0.4</version>
|
||||||
@ -366,6 +438,12 @@ index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..00000000000000000000000000000000
|
|||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>org.apache.logging.log4j</groupId>
|
- <groupId>org.apache.logging.log4j</groupId>
|
||||||
|
- <artifactId>log4j-api</artifactId>
|
||||||
|
- <version>2.22.1</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>org.apache.logging.log4j</groupId>
|
||||||
- <artifactId>log4j-core</artifactId>
|
- <artifactId>log4j-core</artifactId>
|
||||||
- <version>2.22.1</version>
|
- <version>2.22.1</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
@ -377,17 +455,18 @@ index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..00000000000000000000000000000000
|
|||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>org.slf4j</groupId>
|
|
||||||
- <artifactId>slf4j-api</artifactId>
|
|
||||||
- <version>2.0.9</version>
|
|
||||||
- <scope>compile</scope>
|
|
||||||
- </dependency>
|
|
||||||
- <dependency>
|
|
||||||
- <groupId>org.lz4</groupId>
|
- <groupId>org.lz4</groupId>
|
||||||
- <artifactId>lz4-java</artifactId>
|
- <artifactId>lz4-java</artifactId>
|
||||||
- <version>1.8.0</version>
|
- <version>1.8.0</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
- <groupId>org.slf4j</groupId>
|
||||||
|
- <artifactId>slf4j-api</artifactId>
|
||||||
|
- <version>2.0.9</version>
|
||||||
|
- <scope>compile</scope>
|
||||||
|
- </dependency>
|
||||||
|
- <!-- End Mojang depends -->
|
||||||
- <!-- deprecated API depend -->
|
- <!-- deprecated API depend -->
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>commons-lang</groupId>
|
- <groupId>commons-lang</groupId>
|
||||||
@ -411,13 +490,13 @@ index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..00000000000000000000000000000000
|
|||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>org.xerial</groupId>
|
- <groupId>org.xerial</groupId>
|
||||||
- <artifactId>sqlite-jdbc</artifactId>
|
- <artifactId>sqlite-jdbc</artifactId>
|
||||||
- <version>3.46.0.0</version>
|
- <version>3.46.1.3</version>
|
||||||
- <scope>runtime</scope>
|
- <scope>runtime</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>com.mysql</groupId>
|
- <groupId>com.mysql</groupId>
|
||||||
- <artifactId>mysql-connector-j</artifactId>
|
- <artifactId>mysql-connector-j</artifactId>
|
||||||
- <version>8.4.0</version>
|
- <version>9.1.0</version>
|
||||||
- <scope>runtime</scope>
|
- <scope>runtime</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <!-- add these back in as they are not exposed by the API -->
|
- <!-- add these back in as they are not exposed by the API -->
|
||||||
|
@ -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
|
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
index 766006fe7ff965d6ca17df1df457ecc629b3be18..0ef1a7b2a17e81144d594f29f7b5e54d5038dcf4 100644
|
index e8b604659cec5a1b09e93dd7c5166d627aa2fe3d..115cb27d3233863692553f8e07238c74b0fcb61c 100644
|
||||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
@@ -323,9 +323,11 @@ public class BlockPos extends Vec3i {
|
@@ -323,9 +323,11 @@ public class BlockPos extends Vec3i {
|
||||||
@ -59,7 +59,7 @@ index 7344cff32fa6fe3dedb74ed98126072c55b0abd2..d98b28e9488a5a7736719cf656736bb0
|
|||||||
} else {
|
} else {
|
||||||
entityliving1 = null;
|
entityliving1 = null;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
|
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
|
||||||
index 9051f0186c09eeb8ecccf62b0116f6da1800a1df..b231f90317fe7df9133674b12d47873520b481cb 100644
|
index f3a2612f0e27c36d5206334307eac1880ce8c4b7..4d4d413b8527e1a109276928611b8c857ad6f6aa 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
|
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
|
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTable.java
|
||||||
@@ -259,8 +259,8 @@ public class LootTable {
|
@@ -259,8 +259,8 @@ public class LootTable {
|
||||||
@ -70,7 +70,7 @@ index 9051f0186c09eeb8ecccf62b0116f6da1800a1df..b231f90317fe7df9133674b12d478735
|
|||||||
- private final Builder<LootItemFunction> functions = ImmutableList.builder();
|
- private final Builder<LootItemFunction> functions = ImmutableList.builder();
|
||||||
+ private final ImmutableList.Builder<LootPool> pools = ImmutableList.builder();
|
+ private final ImmutableList.Builder<LootPool> pools = ImmutableList.builder();
|
||||||
+ private final ImmutableList.Builder<LootItemFunction> functions = ImmutableList.builder();
|
+ private final ImmutableList.Builder<LootItemFunction> functions = ImmutableList.builder();
|
||||||
private LootContextParamSet paramSet;
|
private ContextKeySet paramSet;
|
||||||
private Optional<ResourceLocation> randomSequence;
|
private Optional<ResourceLocation> randomSequence;
|
||||||
|
|
||||||
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
|
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
|
||||||
@ -104,10 +104,10 @@ index e96d821da0698dd42651500fb97a0856a9e9ce02..fb7d40181abdaa5b2ce607db47c09d0d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/test/java/org/bukkit/ParticleTest.java b/src/test/java/org/bukkit/ParticleTest.java
|
diff --git a/src/test/java/org/bukkit/ParticleTest.java b/src/test/java/org/bukkit/ParticleTest.java
|
||||||
index 688c5bae8146f6fc8cddb2632e9cbf304f0745fb..1b0df6220682328b8f1d03416cb8df2f6662a1cf 100644
|
index ab72aeeec64c284ea42ac1542f55fd33d314effb..e2a03301073aced927244b07fe86f2de043e40a3 100644
|
||||||
--- a/src/test/java/org/bukkit/ParticleTest.java
|
--- a/src/test/java/org/bukkit/ParticleTest.java
|
||||||
+++ b/src/test/java/org/bukkit/ParticleTest.java
|
+++ b/src/test/java/org/bukkit/ParticleTest.java
|
||||||
@@ -251,7 +251,7 @@ public class ParticleTest {
|
@@ -279,7 +279,7 @@ public class ParticleTest {
|
||||||
Check in CraftParticle if the conversion is still correct.
|
Check in CraftParticle if the conversion is still correct.
|
||||||
""", bukkit.getKey()));
|
""", bukkit.getKey()));
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ index 4a3ac959f0dcc35f80371443383be1f8b42b6d95..e8520f541fda2d1cd9677f3fc7d7d295
|
|||||||
|
|
||||||
assertNotNull(bukkit, "Bukkit gene null for " + gene);
|
assertNotNull(bukkit, "Bukkit gene null for " + gene);
|
||||||
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||||
index a382ca7c6e0f96e5d8be37fa8139360db13f9c2f..8fb906c77070eedec8cde263154eaf4610ad3197 100644
|
index 9654a6b8d583c9c8842b14298e2f697761bdd705..dbd5b8684d4c86ff5a6f20f53fe30d0b30c384bf 100644
|
||||||
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||||
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||||
@@ -31,17 +31,17 @@ public class RegistryConstantsTest {
|
@@ -31,17 +31,17 @@ public class RegistryConstantsTest {
|
@ -9,7 +9,7 @@ public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/
|
|||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 82b298d454dee6a6d996aa7822dd745e70a8da74..ef88afa5fe914ae3fef9ffb1a971dabf568f75f3 100644
|
index 6ef457b8ea6ff9b89cb74ecbdca20731d9f94e97..d4a5229b4df544ff60cdaee80c8ae301faf2a235 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -8,9 +8,7 @@ plugins {
|
@@ -8,9 +8,7 @@ plugins {
|
||||||
@ -22,7 +22,7 @@ index 82b298d454dee6a6d996aa7822dd745e70a8da74..ef88afa5fe914ae3fef9ffb1a971dabf
|
|||||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
|
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
|
||||||
implementation("org.ow2.asm:asm-commons:9.7.1")
|
implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||||
implementation("commons-lang:commons-lang:2.6")
|
implementation("commons-lang:commons-lang:2.6")
|
||||||
runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
|
runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3")
|
||||||
@@ -39,6 +37,7 @@ tasks.jar {
|
@@ -39,6 +37,7 @@ tasks.jar {
|
||||||
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
||||||
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||||
@ -131,7 +131,7 @@ index feca36209fd2405fab70f564f63e627b8b78ac18..396ec10a76bdadbf5be2f0e15e88eed4
|
|||||||
|
|
||||||
public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) {
|
public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index dd64f5c16560d2ce6255c8319ddd0f5157237f0f..4566237fa1d49a559b2df806f9a318be46a6eade 100644
|
index ec2854226de69ce87e1a9bb0b5483775ed192044..17e10c4373b4281cc74b748c4a1e173e36eb9196 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -199,7 +199,7 @@ public class Main {
|
@@ -199,7 +199,7 @@ public class Main {
|
||||||
@ -142,7 +142,7 @@ index dd64f5c16560d2ce6255c8319ddd0f5157237f0f..4566237fa1d49a559b2df806f9a318be
|
|||||||
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||||
|
|
||||||
Calendar deadline = Calendar.getInstance();
|
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
|
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
|
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||||
@ -172,10 +172,10 @@ index 0000000000000000000000000000000000000000..288fbe68c6053f40e72f0feedef0ae0f
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/test/java/org/bukkit/support/RegistryHelper.java b/src/test/java/org/bukkit/support/RegistryHelper.java
|
diff --git a/src/test/java/org/bukkit/support/RegistryHelper.java b/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||||
index e5dbcdcbd4187c724c3c6a3b8141a3796710c7a8..73645ea2e5c17e973ed3b888aab56f733f9c87a3 100644
|
index f9ed3fd96cb7474785610fe0f87e550456349287..5781c2fab2d407b4a22d5fc80e1c03e907617316 100644
|
||||||
--- a/src/test/java/org/bukkit/support/RegistryHelper.java
|
--- a/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||||
+++ b/src/test/java/org/bukkit/support/RegistryHelper.java
|
+++ b/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||||
@@ -58,6 +58,7 @@ public final class RegistryHelper {
|
@@ -70,6 +70,7 @@ public final class RegistryHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setup(FeatureFlagSet featureFlagSet) {
|
public static void setup(FeatureFlagSet featureFlagSet) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Test changes
|
|||||||
Co-authored-by: yannnicklamprecht <yannicklamprecht@live.de>
|
Co-authored-by: yannnicklamprecht <yannicklamprecht@live.de>
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index ef88afa5fe914ae3fef9ffb1a971dabf568f75f3..3c1770864ab3e8708bab6cd50d6ffb5e19af5399 100644
|
index d4a5229b4df544ff60cdaee80c8ae301faf2a235..41b000aaa71dca3fb392ae657be16e05bd37a178 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -23,6 +23,7 @@ dependencies {
|
@@ -23,6 +23,7 @@ dependencies {
|
||||||
@ -352,7 +352,7 @@ index ee5ab15bb0bfeb0ff6fa0d720eeff086d92cb459..7419ea2f68607aad27929a608c402bd4
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
diff --git a/src/test/java/org/bukkit/registry/RegistryClassTest.java b/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
diff --git a/src/test/java/org/bukkit/registry/RegistryClassTest.java b/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
||||||
index 740073ddd99b5e6aba056b99d5ed3e2a94a13b6c..575a06125e0b60b5bb8b6f85131f7d6cf86f5083 100644
|
index 297700b237bbd8d5ff9116919f203c82b4037968..ea3d37f387bdb0dd5ae3fba9231ace31d0cebd64 100644
|
||||||
--- a/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
--- a/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
||||||
+++ b/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
+++ b/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
||||||
@@ -57,6 +57,7 @@ import org.objectweb.asm.Type;
|
@@ -57,6 +57,7 @@ import org.objectweb.asm.Type;
|
||||||
@ -364,7 +364,7 @@ index 740073ddd99b5e6aba056b99d5ed3e2a94a13b6c..575a06125e0b60b5bb8b6f85131f7d6c
|
|||||||
|
|
||||||
private static final Map<Class<? extends Keyed>, Data> INIT_DATA = new HashMap<>();
|
private static final Map<Class<? extends Keyed>, Data> INIT_DATA = new HashMap<>();
|
||||||
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||||
index 8fb906c77070eedec8cde263154eaf4610ad3197..8705ee2a28d5dba7bb579eae1436451502e1e3c2 100644
|
index dbd5b8684d4c86ff5a6f20f53fe30d0b30c384bf..7848c3bb78356f74e7e2cb708308626baa708b1f 100644
|
||||||
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||||
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||||
@@ -26,7 +26,7 @@ public class RegistryConstantsTest {
|
@@ -26,7 +26,7 @@ public class RegistryConstantsTest {
|
||||||
@ -377,7 +377,7 @@ index 8fb906c77070eedec8cde263154eaf4610ad3197..8705ee2a28d5dba7bb579eae14364515
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
index 6ecafd167d4d8c79f2cbc43ea9da98a5d61d8751..f81f86cf05a8c6816d356185af6d0d84a0474dd2 100644
|
index a678510df2b999b78d0b4d233fd15bf444c97080..0a6ba289a94468b67d282a199250142e1e86f075 100644
|
||||||
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
@@ -47,7 +47,7 @@ public final class DummyServerHelper {
|
@@ -47,7 +47,7 @@ public final class DummyServerHelper {
|
||||||
@ -395,7 +395,7 @@ index 6ecafd167d4d8c79f2cbc43ea9da98a5d61d8751..f81f86cf05a8c6816d356185af6d0d84
|
|||||||
Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace must have fluid type");
|
Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace must have fluid type");
|
||||||
- TagKey<FluidType> fluidTagKey = TagKey.create(Registries.FLUID, key);
|
- TagKey<FluidType> fluidTagKey = TagKey.create(Registries.FLUID, key);
|
||||||
+ TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey = TagKey.create(Registries.FLUID, key); // Paper - address remapping issues
|
+ TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey = TagKey.create(Registries.FLUID, key); // Paper - address remapping issues
|
||||||
if (BuiltInRegistries.FLUID.getTag(fluidTagKey).isPresent()) {
|
if (BuiltInRegistries.FLUID.get(fluidTagKey).isPresent()) {
|
||||||
return new CraftFluidTag(BuiltInRegistries.FLUID, fluidTagKey);
|
return new CraftFluidTag(BuiltInRegistries.FLUID, fluidTagKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -403,7 +403,7 @@ index 6ecafd167d4d8c79f2cbc43ea9da98a5d61d8751..f81f86cf05a8c6816d356185af6d0d84
|
|||||||
Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace must have entity type");
|
Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace must have entity type");
|
||||||
- TagKey<EntityTypes<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key);
|
- TagKey<EntityTypes<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key);
|
||||||
+ TagKey<net.minecraft.world.entity.EntityType<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key); // Paper - address remapping issues
|
+ TagKey<net.minecraft.world.entity.EntityType<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key); // Paper - address remapping issues
|
||||||
if (BuiltInRegistries.ENTITY_TYPE.getTag(entityTagKey).isPresent()) {
|
if (BuiltInRegistries.ENTITY_TYPE.get(entityTagKey).isPresent()) {
|
||||||
return new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
|
return new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -425,18 +425,30 @@ index 6ecafd167d4d8c79f2cbc43ea9da98a5d61d8751..f81f86cf05a8c6816d356185af6d0d84
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/test/java/org/bukkit/support/RegistryHelper.java b/src/test/java/org/bukkit/support/RegistryHelper.java
|
diff --git a/src/test/java/org/bukkit/support/RegistryHelper.java b/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||||
index 73645ea2e5c17e973ed3b888aab56f733f9c87a3..4d169ff3541044d447de519d2b0973da98b0bd53 100644
|
index 5781c2fab2d407b4a22d5fc80e1c03e907617316..68ae998b30bbcacae3604fb6581ceca3da1eda18 100644
|
||||||
--- a/src/test/java/org/bukkit/support/RegistryHelper.java
|
--- a/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||||
+++ b/src/test/java/org/bukkit/support/RegistryHelper.java
|
+++ b/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||||
@@ -98,6 +98,11 @@ public final class RegistryHelper {
|
@@ -65,6 +65,11 @@ public final class RegistryHelper {
|
||||||
private static LayeredRegistryAccess<RegistryLayer> createLayers(MultiPackResourceManager resourceManager) {
|
List<HolderLookup.RegistryLookup<?>> list1 = TagLoader.buildUpdatedLookups(iregistrycustom_dimension, list);
|
||||||
// add tags and loot tables for unit tests
|
RegistryAccess.Frozen iregistrycustom_dimension1 = RegistryDataLoader.load((ResourceManager) ireloadableresourcemanager, list1, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||||
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
|
LayeredRegistryAccess<RegistryLayer> layers = layeredregistryaccess.replaceFrom(RegistryLayer.WORLDGEN, iregistrycustom_dimension1);
|
||||||
+ // Paper start - load registry here to ensure bukkit object registry are correctly delayed if needed
|
+ // Paper start - load registry here to ensure bukkit object registry are correctly delayed if needed
|
||||||
+ try {
|
+ try {
|
||||||
+ Class.forName("org.bukkit.Registry");
|
+ Class.forName("org.bukkit.Registry");
|
||||||
+ } catch (final ClassNotFoundException ignored) {}
|
+ } catch (final ClassNotFoundException ignored) {}
|
||||||
+ // Paper end - load registry here to ensure bukkit object registry are correctly delayed if needed
|
+ // Paper end - load registry here to ensure bukkit object registry are correctly delayed if needed
|
||||||
layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
|
||||||
|
|
||||||
return layers;
|
return layers.compositeAccess().freeze();
|
||||||
|
}
|
||||||
|
@@ -82,6 +87,11 @@ public final class RegistryHelper {
|
||||||
|
List<HolderLookup.RegistryLookup<?>> list1 = TagLoader.buildUpdatedLookups(iregistrycustom_dimension, list);
|
||||||
|
RegistryAccess.Frozen iregistrycustom_dimension1 = RegistryDataLoader.load((ResourceManager) ireloadableresourcemanager, list1, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||||
|
LayeredRegistryAccess<RegistryLayer> layers = layeredregistryaccess.replaceFrom(RegistryLayer.WORLDGEN, iregistrycustom_dimension1);
|
||||||
|
+ // Paper start - load registry here to ensure bukkit object registry are correctly delayed if needed
|
||||||
|
+ try {
|
||||||
|
+ Class.forName("org.bukkit.Registry");
|
||||||
|
+ } catch (final ClassNotFoundException ignored) {}
|
||||||
|
+ // Paper end - load registry here to ensure bukkit object registry are correctly delayed if needed
|
||||||
|
RegistryHelper.registry = layers.compositeAccess().freeze();
|
||||||
|
// Register vanilla pack
|
||||||
|
RegistryHelper.dataPack = ReloadableServerResources.loadResources(ireloadableresourcemanager, layers, list, featureFlagSet, Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join();
|
@ -15,7 +15,7 @@ public net.minecraft.server.dedicated.DedicatedServerProperties reload(Lnet/mine
|
|||||||
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
|
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 2233e51bfab4ac36977984e8fe7fddb04120dddd..7f7b7f0b29107375b2438e3af0bc0f40390db4fa 100644
|
index 41b000aaa71dca3fb392ae657be16e05bd37a178..da6b4787fa787e098e4031790e955ce616593ee9 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -10,6 +10,7 @@ dependencies {
|
@@ -10,6 +10,7 @@ dependencies {
|
||||||
@ -24,8 +24,8 @@ index 2233e51bfab4ac36977984e8fe7fddb04120dddd..7f7b7f0b29107375b2438e3af0bc0f40
|
|||||||
implementation("org.ow2.asm:asm-commons:9.7.1")
|
implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||||
+ implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
|
+ implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
|
||||||
implementation("commons-lang:commons-lang:2.6")
|
implementation("commons-lang:commons-lang:2.6")
|
||||||
runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
|
runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3")
|
||||||
runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
|
runtimeOnly("com.mysql:mysql-connector-j:9.1.0")
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..ef41cf3a7d1e6f2bfe81e0fb865d2f969bbc77c1
|
index 0000000000000000000000000000000000000000..ef41cf3a7d1e6f2bfe81e0fb865d2f969bbc77c1
|
||||||
@ -5074,7 +5074,7 @@ index 0000000000000000000000000000000000000000..614aba60bb07946a144650fd3aedb316
|
|||||||
+ protected abstract boolean belowZero(O value);
|
+ protected abstract boolean belowZero(O value);
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||||
index b334265d4015fec13d7fedbffba2b6c22f4c8bc8..5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0 100644
|
index fc5c42e77a76b0ca946b13435144584b9c4bfafa..9bd6056bba6ba48bada7e9cd5883b0a171b0bbc4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Main.java
|
--- a/src/main/java/net/minecraft/server/Main.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||||
@@ -129,6 +129,10 @@ public class Main {
|
@@ -129,6 +129,10 @@ public class Main {
|
||||||
@ -5098,10 +5098,10 @@ index b334265d4015fec13d7fedbffba2b6c22f4c8bc8..5b4ac7b4fd0077e900e9f788963f1613
|
|||||||
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
||||||
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index db2031ffbc802bd850ab40acaec2a9624b753f4c..299afe72a2fc2affca196f2fdfbf27e5533c51a6 100644
|
index c54fae06acd566742cea3aef537ad1b4e2b7414a..3fc0abef2c4e2c8ceb3b8c4f02c59700aa3d0803 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -309,6 +309,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -320,6 +320,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
private static final int SAMPLE_INTERVAL = 100;
|
private static final int SAMPLE_INTERVAL = 100;
|
||||||
public final double[] recentTps = new double[ 3 ];
|
public final double[] recentTps = new double[ 3 ];
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -5109,7 +5109,7 @@ index db2031ffbc802bd850ab40acaec2a9624b753f4c..299afe72a2fc2affca196f2fdfbf27e5
|
|||||||
|
|
||||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||||
AtomicReference<S> atomicreference = new AtomicReference();
|
AtomicReference<S> atomicreference = new AtomicReference();
|
||||||
@@ -405,6 +406,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -420,6 +421,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -5158,10 +5158,10 @@ index dfbb04800d6f1dcbb909fcdfeb1ebf1a5efa6a48..5928e5f1934b8e247ba516595018ed5c
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index d3c7c1e016af5d04b5a18a6ced898cf4dc9b1700..cd26616aba6abd44abc5eb8b01cc96f29248aecd 100644
|
index abde0c14bf0998830f1f9a7661e9eab8b35c7b85..ca095f9d6c985b066a393debc6529973a3616397 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -200,6 +200,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -199,6 +199,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings"));
|
org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings"));
|
||||||
org.spigotmc.SpigotConfig.registerCommands();
|
org.spigotmc.SpigotConfig.registerCommands();
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -5185,23 +5185,23 @@ index 6d89a5414f46a0c30badb4fcd25bc6cb6d18db3a..0ec3b546db0cf3858dd9cd9ea067d1d6
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 63ad1280667a02e00f9c636193e38f933cad0185..a696a0d168987aaa4e59c471a23eeb48d683c1b2 100644
|
index a0b4ca006ba51da1a91d10b8e8d4a1b12a5a37d3..a17846ccd8581c3d6da962e977623aaab8314ec7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -242,7 +242,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -241,7 +241,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
|
||||||
|
|
||||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||||
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env);
|
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||||
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules()))); // Paper - create paper world configs
|
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env);
|
||||||
|
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules()))); // Paper - create paper world configs
|
||||||
this.pvpMode = minecraftserver.isPvpAllowed();
|
this.pvpMode = minecraftserver.isPvpAllowed();
|
||||||
this.convertable = convertable_conversionsession;
|
this.convertable = convertable_conversionsession;
|
||||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index e433037a03ffafabb952887ae3980e1d51411d4c..c061813d275fbc48d7629cc59d90dbb4c347516c 100644
|
index 9cf0c141fefe67893828e300cba4f8a8545ba25f..c8e49c1904c80c4ede40ca5c26efad9b12e247d1 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -156,6 +156,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -157,6 +157,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
|
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
|
||||||
public boolean populating;
|
public boolean populating;
|
||||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||||
@ -5214,31 +5214,31 @@ index e433037a03ffafabb952887ae3980e1d51411d4c..c061813d275fbc48d7629cc59d90dbb4
|
|||||||
|
|
||||||
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
||||||
public static BlockPos lastPhysicsProblem; // Spigot
|
public static BlockPos lastPhysicsProblem; // Spigot
|
||||||
@@ -173,8 +179,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -174,8 +180,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||||
|
|
||||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
||||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator) { // Paper - create paper world config
|
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator) { // Paper - create paper world config
|
||||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||||
+ this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
+ this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
||||||
this.generator = gen;
|
this.generator = gen;
|
||||||
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 357c948dd66644497583996f211f25cbe5c78828..d0c41302478bd9b0ec65020e7ef520bd3ff1f347 100644
|
index c48b1d5fc73a98eb4967632d8e6e0744961a688f..3882ae04173cd125fe490692a6bc2b4d8b20ff7b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -964,6 +964,7 @@ public final class CraftServer implements Server {
|
@@ -967,6 +967,7 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||||
+ this.console.paperConfigurations.reloadConfigs(this.console);
|
+ this.console.paperConfigurations.reloadConfigs(this.console);
|
||||||
for (ServerLevel world : this.console.getAllLevels()) {
|
for (ServerLevel world : this.console.getAllLevels()) {
|
||||||
world.serverLevelData.setDifficulty(config.difficulty);
|
world.serverLevelData.setDifficulty(config.difficulty);
|
||||||
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
|
world.setSpawnSettings(config.spawnMonsters);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 4566237fa1d49a559b2df806f9a318be46a6eade..0ea2d13ab80559472513c6df362583b8371a9532 100644
|
index 17e10c4373b4281cc74b748c4a1e173e36eb9196..755b1d77418ecae0dc9ec5197275d0cd914e7bee 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -142,6 +142,19 @@ public class Main {
|
@@ -142,6 +142,19 @@ public class Main {
|
||||||
@ -5363,7 +5363,7 @@ index 0000000000000000000000000000000000000000..0396589795da1f83ddf62426236dde9a
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
index f81f86cf05a8c6816d356185af6d0d84a0474dd2..ba0a2ab9de34fa40dd90cecaeec4a5e54fe3e2d8 100644
|
index 0a6ba289a94468b67d282a199250142e1e86f075..bdfa164ea21cba91b30b965d65d47112111a1209 100644
|
||||||
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
@@ -91,6 +91,7 @@ public final class DummyServerHelper {
|
@@ -91,6 +91,7 @@ public final class DummyServerHelper {
|
@ -17,10 +17,10 @@ index 643bb8860962ad691b11073f6dbf406bf7ec5fb1..9b8ec1fd158f6e51779be263fd56b911
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
index 0ef1a7b2a17e81144d594f29f7b5e54d5038dcf4..8994a381b05dcdd1163d2e7a0b63a8875b6063ed 100644
|
index 115cb27d3233863692553f8e07238c74b0fcb61c..83e7c141d947f8f8096fed1da716560494bc5c62 100644
|
||||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||||
@@ -439,12 +439,12 @@ public class BlockPos extends Vec3i {
|
@@ -445,12 +445,12 @@ public class BlockPos extends Vec3i {
|
||||||
if (this.index == l) {
|
if (this.index == l) {
|
||||||
return this.endOfData();
|
return this.endOfData();
|
||||||
} else {
|
} else {
|
||||||
@ -39,11 +39,11 @@ index 0ef1a7b2a17e81144d594f29f7b5e54d5038dcf4..8994a381b05dcdd1163d2e7a0b63a887
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
diff --git a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
diff --git a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||||
index a467eb6b3b74cdb5378ff5f3043efbe6f4a6f06e..34b3b3251da21bce616870d312fd42fd58ba7881 100644
|
index 69993496b6328a963288e11d193d36bd7decfcba..f66a2154486b6d3b5873da043e51df91cd396c72 100644
|
||||||
--- a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
--- a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||||
+++ b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
+++ b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||||
@@ -317,7 +317,7 @@ public class BuiltInRegistries {
|
@@ -325,7 +325,7 @@ public class BuiltInRegistries {
|
||||||
Bootstrap.checkBootstrapCalled(() -> "registry " + key);
|
Bootstrap.checkBootstrapCalled(() -> "registry " + key.location());
|
||||||
ResourceLocation resourceLocation = key.location();
|
ResourceLocation resourceLocation = key.location();
|
||||||
LOADERS.put(resourceLocation, () -> initializer.run(registry));
|
LOADERS.put(resourceLocation, () -> initializer.run(registry));
|
||||||
- WRITABLE_REGISTRY.register((ResourceKey<WritableRegistry<?>>)key, registry, RegistrationInfo.BUILT_IN);
|
- WRITABLE_REGISTRY.register((ResourceKey<WritableRegistry<?>>)key, registry, RegistrationInfo.BUILT_IN);
|
||||||
@ -71,10 +71,10 @@ index a614e960fcd5958ad17b679eee8a8e6926f58e62..da101bca71f4710812621b98f0a0d8ca
|
|||||||
|
|
||||||
if (!this.hasElementSeparator()) {
|
if (!this.hasElementSeparator()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 299afe72a2fc2affca196f2fdfbf27e5533c51a6..40adb6117b9e0d5f70103113202a07715e403e2a 100644
|
index 3fc0abef2c4e2c8ceb3b8c4f02c59700aa3d0803..8e16bc7da15824723f1d7d4bff87fac181978500 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1952,7 +1952,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2031,7 +2031,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
PackRepository resourcepackrepository = this.packRepository;
|
PackRepository resourcepackrepository = this.packRepository;
|
||||||
|
|
||||||
Objects.requireNonNull(this.packRepository);
|
Objects.requireNonNull(this.packRepository);
|
||||||
@ -82,7 +82,7 @@ index 299afe72a2fc2affca196f2fdfbf27e5533c51a6..40adb6117b9e0d5f70103113202a0771
|
|||||||
+ 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?
|
+ 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) -> {
|
}, this).thenCompose((immutablelist) -> {
|
||||||
MultiPackResourceManager resourcemanager = new MultiPackResourceManager(PackType.SERVER_DATA, immutablelist);
|
MultiPackResourceManager resourcemanager = new MultiPackResourceManager(PackType.SERVER_DATA, immutablelist);
|
||||||
|
List<Registry.PendingTags<?>> list = TagLoader.loadTagsForExistingRegistries(resourcemanager, this.registries.compositeAccess());
|
||||||
diff --git a/src/main/java/net/minecraft/util/SortedArraySet.java b/src/main/java/net/minecraft/util/SortedArraySet.java
|
diff --git a/src/main/java/net/minecraft/util/SortedArraySet.java b/src/main/java/net/minecraft/util/SortedArraySet.java
|
||||||
index 661a6274a800ca9b91bdb809d026972d23c3b263..ea72dcb064a35bc6245bc5c94d592efedd8faf41 100644
|
index 661a6274a800ca9b91bdb809d026972d23c3b263..ea72dcb064a35bc6245bc5c94d592efedd8faf41 100644
|
||||||
--- a/src/main/java/net/minecraft/util/SortedArraySet.java
|
--- a/src/main/java/net/minecraft/util/SortedArraySet.java
|
||||||
@ -97,25 +97,25 @@ index 661a6274a800ca9b91bdb809d026972d23c3b263..ea72dcb064a35bc6245bc5c94d592efe
|
|||||||
|
|
||||||
public static <T> SortedArraySet<T> create(Comparator<T> comparator) {
|
public static <T> SortedArraySet<T> create(Comparator<T> comparator) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Pillager.java b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Pillager.java b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
|
||||||
index 8eb1aca72df0bca292473e90ecb74159db4fe034..4b4dcee6abe7a6db43638d04665125eec560496e 100644
|
index cf025d7a4392213db3cf04e7ace3e2b166e710eb..3e8631c7bd1e7591051ca21c6ae7acd87d3c7529 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Pillager.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Pillager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
|
||||||
@@ -66,7 +66,7 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve
|
@@ -69,7 +69,7 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve
|
||||||
protected void registerGoals() {
|
|
||||||
super.registerGoals();
|
super.registerGoals();
|
||||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||||
|
this.goalSelector.addGoal(1, new AvoidEntityGoal<>(this, Creaking.class, 8.0F, 1.0D, 1.2D));
|
||||||
- this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, this, 10.0F));
|
- this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, this, 10.0F));
|
||||||
+ this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, 10.0F)); // Paper - decomp fix
|
+ this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, 10.0F)); // Paper - decomp fix
|
||||||
this.goalSelector.addGoal(3, new RangedCrossbowAttackGoal<>(this, 1.0D, 8.0F));
|
this.goalSelector.addGoal(3, new RangedCrossbowAttackGoal<>(this, 1.0D, 8.0F));
|
||||||
this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6D));
|
this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6D));
|
||||||
this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 15.0F, 1.0F));
|
this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 15.0F, 1.0F));
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
|
||||||
index e2b72817857a7a203aae4c9de4e01ba1396dc95b..82fc5133325a127890984d51c1381883759eb444 100644
|
index 5fa94fd51027901591e40cabdacfd61d16a58585..3f552ee8f90566edddb5943311a14309e4bebb61 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
|
||||||
@@ -153,7 +153,7 @@ public class ChunkStatusTasks {
|
@@ -151,7 +151,7 @@ public class ChunkStatusTasks {
|
||||||
if (protochunk instanceof ImposterProtoChunk) {
|
if (protochunk instanceof ImposterProtoChunk protochunkextension) {
|
||||||
chunk1 = ((ImposterProtoChunk) protochunk).getWrapped();
|
chunk1 = protochunkextension.getWrapped();
|
||||||
} else {
|
} else {
|
||||||
- chunk1 = new LevelChunk(worldserver, protochunk, (chunk1) -> {
|
- chunk1 = new LevelChunk(worldserver, protochunk, (chunk1) -> {
|
||||||
+ chunk1 = new LevelChunk(worldserver, protochunk, ($) -> { // Paper - decompile fix
|
+ chunk1 = new LevelChunk(worldserver, protochunk, ($) -> { // Paper - decompile fix
|
@ -19,10 +19,10 @@ Subject: [PATCH] CB fixes
|
|||||||
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index a696a0d168987aaa4e59c471a23eeb48d683c1b2..9d11fcb3df12182ae00ce73f7e30091fd199a341 100644
|
index a17846ccd8581c3d6da962e977623aaab8314ec7..f6a3606b972064c4ec78487374e6197c0c447e27 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -303,7 +303,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -293,7 +293,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
|
|
||||||
long l = minecraftserver.getWorldData().worldGenOptions().seed();
|
long l = minecraftserver.getWorldData().worldGenOptions().seed();
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ index a696a0d168987aaa4e59c471a23eeb48d683c1b2..9d11fcb3df12182ae00ce73f7e30091f
|
|||||||
if ((this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END
|
if ((this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END
|
||||||
this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
|
this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
diff --git a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
||||||
index d927357d541cf206bb3019b2fda3473a77b44ec4..4601c7069ba82ccfe87e9dc304b6f3262f7bbfbf 100644
|
index ed78039b89884c41ce10d520786c5b56f7d9b154..0239495abcc7b796864976b37ece184efa9a747e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
--- a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
+++ b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
||||||
@@ -54,7 +54,7 @@ public record SummonEntityEffect(HolderSet<EntityType<?>> entityTypes, boolean j
|
@@ -54,7 +54,7 @@ public record SummonEntityEffect(HolderSet<EntityType<?>> entityTypes, boolean j
|
||||||
@ -45,7 +45,7 @@ index d927357d541cf206bb3019b2fda3473a77b44ec4..4601c7069ba82ccfe87e9dc304b6f326
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||||
index 0dc7f88877020bddd5a84db51d349f52b673048e..aae73586265593ee7830fb8dd5c2e3d7560057f0 100644
|
index 4f68394a94308513269f0a4c749b6a36738e3ca0..953ab7638f7242b5a11dd1de8786172443a0558c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||||
@@ -40,7 +40,7 @@ public class StructureCheck {
|
@@ -40,7 +40,7 @@ public class StructureCheck {
|
||||||
@ -67,7 +67,7 @@ index 0dc7f88877020bddd5a84db51d349f52b673048e..aae73586265593ee7830fb8dd5c2e3d7
|
|||||||
RandomState noiseConfig,
|
RandomState noiseConfig,
|
||||||
LevelHeightAccessor world,
|
LevelHeightAccessor world,
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
|
||||||
index 85c7f3027978b1d7d6c31b7ad21b3377cdda5925..e34deaf398dc6722c3128bdd6b9bc16da2d33bf7 100644
|
index a70e6872add1c952a89e74be0e6d09a53cc16559..90b82ad996b2b85628c9a5ddeef9410150b7f70c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
|
||||||
@@ -187,4 +187,11 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
|
@@ -187,4 +187,11 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
|
||||||
@ -83,7 +83,7 @@ index 85c7f3027978b1d7d6c31b7ad21b3377cdda5925..e34deaf398dc6722c3128bdd6b9bc16d
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 0ea2d13ab80559472513c6df362583b8371a9532..13c37384defda4475de584f33d1860a2d53ce05e 100644
|
index 755b1d77418ecae0dc9ec5197275d0cd914e7bee..94004204b6cdbbbf35263faae56e3e06cb6b650c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -123,6 +123,7 @@ public class Main {
|
@@ -123,6 +123,7 @@ public class Main {
|
||||||
@ -95,7 +95,7 @@ index 0ea2d13ab80559472513c6df362583b8371a9532..13c37384defda4475de584f33d1860a2
|
|||||||
|
|
||||||
this.acceptsAll(Main.asList("nojline"), "Disables jline and emulates the vanilla console");
|
this.acceptsAll(Main.asList("nojline"), "Disables jline and emulates the vanilla console");
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
index 905adf97c0d1f0d1c774a6835a5dffcfea884e58..c017ce2ca1bc535795c958a2e509af2adf88efa9 100644
|
index 163d54a8bf4cedbd1471e86b7ab1a1b850ed3f39..6effe47b32a8551aa6f6b11bc0315714a119e199 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
@@ -26,6 +26,7 @@ import org.bukkit.scheduler.BukkitWorker;
|
@@ -26,6 +26,7 @@ import org.bukkit.scheduler.BukkitWorker;
|
||||||
@ -115,7 +115,7 @@ index 905adf97c0d1f0d1c774a6835a5dffcfea884e58..c017ce2ca1bc535795c958a2e509af2a
|
|||||||
public class CraftScheduler implements BukkitScheduler {
|
public class CraftScheduler implements BukkitScheduler {
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index a0f228ee83fd3a913666f88381c946f8a6340644..60dc550431fa4641f8c6d964329b0e2698d1fdd6 100644
|
index fc444b734aad2c23f0808cd66fca23fc350d9e10..2392aa50aec6468f2f498e0a806f65013ce963d1 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -246,7 +246,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -246,7 +246,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -4288,10 +4288,10 @@ index 0000000000000000000000000000000000000000..f7114d5b8f2f93f62883e24da29afaf9
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index 5135cd504ec5864a4603c004e748947a7d88d2b4..396f368a7e21a7c7b1630b4e20cdbc452c4b0f84 100644
|
index 5b9ca3d968fd4884b1b7f2c06477ae00c09f202e..5d0ef11671beb2381e0e1959f5e5f845789a2982 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -133,7 +133,7 @@ public class Util {
|
@@ -136,7 +136,7 @@ public class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long getNanos() {
|
public static long getNanos() {
|
||||||
@ -4416,10 +4416,18 @@ index 3e5a85a7ad6149b04622c254fbc2e174896a4128..3f662692ed4846e026a9d48595e7b3b2
|
|||||||
+
|
+
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 40adb6117b9e0d5f70103113202a07715e403e2a..c9cab509796599b13ca3422de1049aed78348704 100644
|
index 8e16bc7da15824723f1d7d4bff87fac181978500..83b32b2963febf8af9ccd7df666cbaccc62f1313 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -973,6 +973,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -334,7 +334,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
if (Runtime.getRuntime().availableProcessors() > 4) {
|
||||||
|
thread.setPriority(8);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
|
||||||
|
|
||||||
|
atomicreference.set(s0);
|
||||||
|
@@ -988,6 +987,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
|
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
|
||||||
}
|
}
|
||||||
// Spigot start
|
// Spigot start
|
||||||
@ -4429,16 +4437,8 @@ index 40adb6117b9e0d5f70103113202a07715e403e2a..c9cab509796599b13ca3422de1049aed
|
|||||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||||
this.getProfileCache().save();
|
this.getProfileCache().save();
|
||||||
@@ -1337,7 +1340,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
||||||
MinecraftServer.LOGGER.debug("Autosave finished");
|
|
||||||
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
|
|
||||||
}
|
|
||||||
-
|
|
||||||
this.profiler.push("tallying");
|
|
||||||
long j = Util.getNanos() - i;
|
|
||||||
int k = this.tickCount % 100;
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index 814e7fdf6c089b920825effaeeb0675695b2f3fa..43513325b7052d388a63d63bd3a4edff48cf23c2 100644
|
index 59bc334ade71c106e01e54db8d21fb65563dd3f1..b9ab241b930edc63a39dbbcf14cd0b5edacb9ea9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -37,9 +37,9 @@ public class ChunkHolder extends GenerationChunkHolder {
|
@@ -37,9 +37,9 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||||
@ -4463,7 +4463,7 @@ index 814e7fdf6c089b920825effaeeb0675695b2f3fa..43513325b7052d388a63d63bd3a4edff
|
|||||||
return (LevelChunk) ((ChunkResult) this.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).orElse(null); // CraftBukkit - decompile error
|
return (LevelChunk) ((ChunkResult) this.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).orElse(null); // CraftBukkit - decompile error
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,12 +345,28 @@ public class ChunkHolder extends GenerationChunkHolder {
|
@@ -361,12 +361,28 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||||
|
|
||||||
this.wasAccessibleSinceLastSave |= flag1;
|
this.wasAccessibleSinceLastSave |= flag1;
|
||||||
if (!flag && flag1) {
|
if (!flag && flag1) {
|
||||||
@ -4492,7 +4492,7 @@ index 814e7fdf6c089b920825effaeeb0675695b2f3fa..43513325b7052d388a63d63bd3a4edff
|
|||||||
this.fullChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK);
|
this.fullChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK);
|
||||||
this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
|
this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
|
||||||
}
|
}
|
||||||
@@ -361,11 +377,25 @@ public class ChunkHolder extends GenerationChunkHolder {
|
@@ -377,11 +393,25 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||||
if (!flag2 && flag3) {
|
if (!flag2 && flag3) {
|
||||||
this.tickingChunkFuture = chunkLoadingManager.prepareTickingChunk(this);
|
this.tickingChunkFuture = chunkLoadingManager.prepareTickingChunk(this);
|
||||||
this.scheduleFullChunkPromotion(chunkLoadingManager, this.tickingChunkFuture, executor, FullChunkStatus.BLOCK_TICKING);
|
this.scheduleFullChunkPromotion(chunkLoadingManager, this.tickingChunkFuture, executor, FullChunkStatus.BLOCK_TICKING);
|
||||||
@ -4519,7 +4519,7 @@ index 814e7fdf6c089b920825effaeeb0675695b2f3fa..43513325b7052d388a63d63bd3a4edff
|
|||||||
this.tickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
|
this.tickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -379,11 +409,24 @@ public class ChunkHolder extends GenerationChunkHolder {
|
@@ -395,11 +425,24 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||||
|
|
||||||
this.entityTickingChunkFuture = chunkLoadingManager.prepareEntityTickingChunk(this);
|
this.entityTickingChunkFuture = chunkLoadingManager.prepareEntityTickingChunk(this);
|
||||||
this.scheduleFullChunkPromotion(chunkLoadingManager, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING);
|
this.scheduleFullChunkPromotion(chunkLoadingManager, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING);
|
||||||
@ -4546,10 +4546,10 @@ index 814e7fdf6c089b920825effaeeb0675695b2f3fa..43513325b7052d388a63d63bd3a4edff
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f1637499b 100644
|
index 952936754cbe5a6fae543d19432599e30eb495b0..b6fb3921b7df9748e38df494fd0012f45d97ac4b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -170,6 +170,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -174,6 +174,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
};
|
};
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -4562,8 +4562,8 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
||||||
super(new RegionStorageInfo(session.getLevelId(), world.dimension(), "chunk"), session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
super(new RegionStorageInfo(session.getLevelId(), world.dimension(), "chunk"), session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
||||||
this.visibleChunkMap = this.updatingChunkMap.clone();
|
this.visibleChunkMap = this.updatingChunkMap.clone();
|
||||||
@@ -223,6 +229,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -229,6 +235,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
this.worldGenContext = new WorldGenContext(world, chunkGenerator, structureTemplateManager, this.lightEngine, this.mainThreadMailbox);
|
this.chunksToEagerlySave.add(pos.toLong());
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
@ -4575,7 +4575,7 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
protected ChunkGenerator generator() {
|
protected ChunkGenerator generator() {
|
||||||
return this.worldGenContext.generator();
|
return this.worldGenContext.generator();
|
||||||
}
|
}
|
||||||
@@ -378,9 +390,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -385,9 +397,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
};
|
};
|
||||||
|
|
||||||
stringbuilder.append("Updating:").append(System.lineSeparator());
|
stringbuilder.append("Updating:").append(System.lineSeparator());
|
||||||
@ -4587,17 +4587,17 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
CrashReport crashreport = CrashReport.forThrowable(exception, "Chunk loading");
|
CrashReport crashreport = CrashReport.forThrowable(exception, "Chunk loading");
|
||||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Chunk loading");
|
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Chunk loading");
|
||||||
|
|
||||||
@@ -422,6 +434,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -429,6 +441,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
holder.setTicketLevel(level);
|
holder.setTicketLevel(level);
|
||||||
} else {
|
} else {
|
||||||
holder = new ChunkHolder(new ChunkPos(pos), level, this.level, this.lightEngine, this.queueSorter, this);
|
holder = new ChunkHolder(new ChunkPos(pos), level, this.level, this.lightEngine, this::onLevelChange, this);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ ca.spottedleaf.moonrise.common.util.ChunkSystem.onChunkHolderCreate(this.level, holder);
|
+ ca.spottedleaf.moonrise.common.util.ChunkSystem.onChunkHolderCreate(this.level, holder);
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updatingChunkMap.put(pos, holder);
|
this.updatingChunkMap.put(pos, holder);
|
||||||
@@ -445,7 +460,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -458,7 +473,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
|
|
||||||
protected void saveAllChunks(boolean flush) {
|
protected void saveAllChunks(boolean flush) {
|
||||||
if (flush) {
|
if (flush) {
|
||||||
@ -4606,50 +4606,44 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
MutableBoolean mutableboolean = new MutableBoolean();
|
MutableBoolean mutableboolean = new MutableBoolean();
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -468,7 +483,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -484,7 +499,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
});
|
|
||||||
this.flushWorker();
|
|
||||||
} else {
|
} else {
|
||||||
- this.visibleChunkMap.values().forEach(this::saveChunkIfNeeded);
|
this.nextChunkSaveTime.clear();
|
||||||
+ ca.spottedleaf.moonrise.common.util.ChunkSystem.getVisibleChunkHolders(this.level).forEach(this::saveChunkIfNeeded);
|
long i = Util.getMillis();
|
||||||
}
|
- ObjectIterator objectiterator = this.visibleChunkMap.values().iterator();
|
||||||
|
+ Iterator<ChunkHolder> objectiterator = ca.spottedleaf.moonrise.common.util.ChunkSystem.getVisibleChunkHolders(this.level).iterator(); // Paper
|
||||||
|
|
||||||
}
|
while (objectiterator.hasNext()) {
|
||||||
@@ -487,7 +502,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
ChunkHolder playerchunk = (ChunkHolder) objectiterator.next();
|
||||||
|
@@ -509,7 +524,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasWork() {
|
public boolean hasWork() {
|
||||||
- return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || !this.updatingChunkMap.isEmpty() || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.queueSorter.hasWork() || this.distanceManager.hasTickets();
|
- return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || !this.updatingChunkMap.isEmpty() || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.worldgenTaskDispatcher.hasWork() || this.lightTaskDispatcher.hasWork() || this.distanceManager.hasTickets();
|
||||||
+ return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || ca.spottedleaf.moonrise.common.util.ChunkSystem.hasAnyChunkHolders(this.level) || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.queueSorter.hasWork() || this.distanceManager.hasTickets(); // Paper
|
+ return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || ca.spottedleaf.moonrise.common.util.ChunkSystem.hasAnyChunkHolders(this.level) || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.queueSorter.hasWork() || this.lightTaskDispatcher.hasWork() || this.distanceManager.hasTickets(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processUnloads(BooleanSupplier shouldKeepTicking) {
|
private void processUnloads(BooleanSupplier shouldKeepTicking) {
|
||||||
@@ -523,7 +538,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -568,9 +583,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
this.scheduleUnload(pos, chunk);
|
||||||
|
|
||||||
int l = 0;
|
|
||||||
- ObjectIterator<ChunkHolder> objectiterator = this.visibleChunkMap.values().iterator();
|
|
||||||
+ Iterator<ChunkHolder> objectiterator = ca.spottedleaf.moonrise.common.util.ChunkSystem.getVisibleChunkHolders(this.level).iterator(); // Paper
|
|
||||||
|
|
||||||
while (l < 20 && shouldKeepTicking.getAsBoolean() && objectiterator.hasNext()) {
|
|
||||||
if (this.saveChunkIfNeeded((ChunkHolder) objectiterator.next())) {
|
|
||||||
@@ -541,7 +556,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
||||||
} else {
|
} else {
|
||||||
ChunkAccess ichunkaccess = holder.getLatestChunk();
|
ChunkAccess ichunkaccess = chunk.getLatestChunk();
|
||||||
|
-
|
||||||
- if (this.pendingUnloads.remove(pos, holder) && ichunkaccess != null) {
|
- if (this.pendingUnloads.remove(pos, chunk) && ichunkaccess != null) {
|
||||||
|
- LevelChunk chunk1;
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ boolean removed;
|
+ boolean removed;
|
||||||
+ if ((removed = this.pendingUnloads.remove(pos, holder)) && ichunkaccess != null) {
|
+ if ((removed = this.pendingUnloads.remove(pos, chunk)) && ichunkaccess != null) {
|
||||||
+ ca.spottedleaf.moonrise.common.util.ChunkSystem.onChunkHolderDelete(this.level, holder);
|
+ ca.spottedleaf.moonrise.common.util.ChunkSystem.onChunkHolderDelete(this.level, chunk);
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
LevelChunk chunk;
|
+ LevelChunk chunk;
|
||||||
|
|
||||||
if (ichunkaccess instanceof LevelChunk) {
|
if (ichunkaccess instanceof LevelChunk) {
|
||||||
@@ -559,7 +578,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
chunk1 = (LevelChunk) ichunkaccess;
|
||||||
|
@@ -587,7 +605,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
this.lightEngine.tryScheduleUpdate();
|
this.lightEngine.tryScheduleUpdate();
|
||||||
this.progressListener.onStatusChange(ichunkaccess.getPos(), (ChunkStatus) null);
|
this.progressListener.onStatusChange(ichunkaccess.getPos(), (ChunkStatus) null);
|
||||||
this.chunkSaveCooldowns.remove(ichunkaccess.getPos().toLong());
|
this.nextChunkSaveTime.remove(ichunkaccess.getPos().toLong());
|
||||||
- }
|
- }
|
||||||
+ } else if (removed) { // Paper start
|
+ } else if (removed) { // Paper start
|
||||||
+ ca.spottedleaf.moonrise.common.util.ChunkSystem.onChunkHolderDelete(this.level, holder);
|
+ ca.spottedleaf.moonrise.common.util.ChunkSystem.onChunkHolderDelete(this.level, holder);
|
||||||
@ -4657,7 +4651,7 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -896,7 +917,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -936,7 +956,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4666,7 +4660,7 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
int j = Mth.clamp(watchDistance, 2, 32);
|
int j = Mth.clamp(watchDistance, 2, 32);
|
||||||
|
|
||||||
if (j != this.serverViewDistance) {
|
if (j != this.serverViewDistance) {
|
||||||
@@ -913,7 +934,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -953,7 +973,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4675,7 +4669,7 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
return Mth.clamp(player.requestedViewDistance(), 2, this.serverViewDistance);
|
return Mth.clamp(player.requestedViewDistance(), 2, this.serverViewDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -942,7 +963,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -982,7 +1002,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
public int size() {
|
public int size() {
|
||||||
@ -4684,7 +4678,7 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DistanceManager getDistanceManager() {
|
public DistanceManager getDistanceManager() {
|
||||||
@@ -950,19 +971,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -990,19 +1010,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Iterable<ChunkHolder> getChunks() {
|
protected Iterable<ChunkHolder> getChunks() {
|
||||||
@ -4709,7 +4703,7 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
Optional<ChunkAccess> optional = Optional.ofNullable(playerchunk.getLatestChunk());
|
Optional<ChunkAccess> optional = Optional.ofNullable(playerchunk.getLatestChunk());
|
||||||
Optional<LevelChunk> optional1 = optional.flatMap((ichunkaccess) -> {
|
Optional<LevelChunk> optional1 = optional.flatMap((ichunkaccess) -> {
|
||||||
return ichunkaccess instanceof LevelChunk ? Optional.of((LevelChunk) ichunkaccess) : Optional.empty();
|
return ichunkaccess instanceof LevelChunk ? Optional.of((LevelChunk) ichunkaccess) : Optional.empty();
|
||||||
@@ -1385,7 +1406,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1445,7 +1465,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4719,10 +4713,10 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
|||||||
protected ChunkDistanceManager(final Executor workerExecutor, final Executor mainThreadExecutor) {
|
protected ChunkDistanceManager(final Executor workerExecutor, final Executor mainThreadExecutor) {
|
||||||
super(workerExecutor, mainThreadExecutor);
|
super(workerExecutor, mainThreadExecutor);
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
index d3769ad50ddb556cff515ea8cf853d28e490ca94..dfa0456f352ce25bc4edd1b0f04ca5a14434d7fa 100644
|
index 019228b1809e3816b0b4dfb9f19b8d42876cc240..6c2339d6a93172e25040c4868a3a47473a1f5336 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
@@ -370,7 +370,7 @@ public abstract class DistanceManager {
|
@@ -385,7 +385,7 @@ public abstract class DistanceManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeTicketsOnClosing() {
|
public void removeTicketsOnClosing() {
|
||||||
@ -4732,18 +4726,10 @@ index d3769ad50ddb556cff515ea8cf853d28e490ca94..dfa0456f352ce25bc4edd1b0f04ca5a1
|
|||||||
|
|
||||||
while (objectiterator.hasNext()) {
|
while (objectiterator.hasNext()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index d39268911ed7c4d60ee6a82178be23245aae58c4..cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175 100644
|
index 9cdcab885a915990a679f3fc9ae6885f7d125bfd..c615510f3f59292715bcff1bd9e4e896c9733436 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -48,6 +48,7 @@ import net.minecraft.world.level.storage.LevelStorageSource;
|
@@ -74,6 +74,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
public class ServerChunkCache extends ChunkSource {
|
|
||||||
|
|
||||||
+ public static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger(); // Paper
|
|
||||||
private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList();
|
|
||||||
private final DistanceManager distanceManager;
|
|
||||||
final ServerLevel level;
|
|
||||||
@@ -66,6 +67,10 @@ public class ServerChunkCache extends ChunkSource {
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@VisibleForDebug
|
@VisibleForDebug
|
||||||
private NaturalSpawner.SpawnState lastSpawnState;
|
private NaturalSpawner.SpawnState lastSpawnState;
|
||||||
@ -4754,7 +4740,7 @@ index d39268911ed7c4d60ee6a82178be23245aae58c4..cf94dd9ddcc1eabcf3fd336e70720f4e
|
|||||||
|
|
||||||
public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory) {
|
public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory) {
|
||||||
this.level = world;
|
this.level = world;
|
||||||
@@ -91,6 +96,54 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -104,6 +108,54 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
return chunk.getFullChunkNow() != null;
|
return chunk.getFullChunkNow() != null;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -4809,7 +4795,7 @@ index d39268911ed7c4d60ee6a82178be23245aae58c4..cf94dd9ddcc1eabcf3fd336e70720f4e
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThreadedLevelLightEngine getLightEngine() {
|
public ThreadedLevelLightEngine getLightEngine() {
|
||||||
@@ -286,7 +339,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -299,7 +351,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
return this.mainThreadProcessor.pollTask();
|
return this.mainThreadProcessor.pollTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4818,7 +4804,7 @@ index d39268911ed7c4d60ee6a82178be23245aae58c4..cf94dd9ddcc1eabcf3fd336e70720f4e
|
|||||||
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
|
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
|
||||||
boolean flag1 = this.chunkMap.promoteChunkMap();
|
boolean flag1 = this.chunkMap.promoteChunkMap();
|
||||||
|
|
||||||
@@ -299,6 +352,12 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -312,6 +364,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4829,13 +4815,13 @@ index d39268911ed7c4d60ee6a82178be23245aae58c4..cf94dd9ddcc1eabcf3fd336e70720f4e
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
public boolean isPositionTicking(long pos) {
|
public boolean isPositionTicking(long pos) {
|
||||||
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos);
|
if (!this.level.shouldTickBlocksAt(pos)) {
|
||||||
|
return false;
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 9d11fcb3df12182ae00ce73f7e30091fd199a341..4c39d9e0466240b5cd459ee649a22fe3a72bf9f0 100644
|
index f6a3606b972064c4ec78487374e6197c0c447e27..6fe373de360570b528b8133043ef3bb9ba12529d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -236,6 +236,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -239,6 +239,98 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
return this.convertable.dimensionType;
|
return this.convertable.dimensionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4933,12 +4919,12 @@ index 9d11fcb3df12182ae00ce73f7e30091fd199a341..4c39d9e0466240b5cd459ee649a22fe3
|
|||||||
+
|
+
|
||||||
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||||
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
|
super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules()))); // Paper - create paper world configs
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index ff1a8e62d2bb3de62e0c27b2335cb512ea91dedd..cb136a30287a17947ed018cdc48e6f91ed904072 100644
|
index 0c211366be68e33b24da2b055142626968ed6b0b..32e7c6e6f09e53fe8b5ade22dad8142cd09e0163 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -281,6 +281,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
@@ -309,6 +309,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
public boolean sentListPacket = false;
|
public boolean sentListPacket = false;
|
||||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -4947,7 +4933,7 @@ index ff1a8e62d2bb3de62e0c27b2335cb512ea91dedd..cb136a30287a17947ed018cdc48e6f91
|
|||||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
|
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
|
||||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/TicketType.java b/src/main/java/net/minecraft/server/level/TicketType.java
|
diff --git a/src/main/java/net/minecraft/server/level/TicketType.java b/src/main/java/net/minecraft/server/level/TicketType.java
|
||||||
index 045b754b5b70bbd1e7732ad2142dfadd6cc2305c..f56e5c0f53f9b52a9247b9be9265b949494fc924 100644
|
index 011eeab289d68b9b535c6438016f1244d0666286..e701f57ac8b0efdf739389f9be7a255220bb3e21 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/TicketType.java
|
--- a/src/main/java/net/minecraft/server/level/TicketType.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/TicketType.java
|
+++ b/src/main/java/net/minecraft/server/level/TicketType.java
|
||||||
@@ -7,6 +7,7 @@ import net.minecraft.util.Unit;
|
@@ -7,6 +7,7 @@ import net.minecraft.util.Unit;
|
||||||
@ -4959,7 +4945,7 @@ index 045b754b5b70bbd1e7732ad2142dfadd6cc2305c..f56e5c0f53f9b52a9247b9be9265b949
|
|||||||
private final String name;
|
private final String name;
|
||||||
private final Comparator<T> comparator;
|
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
|
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||||
index 7d69da7e761ccfe736656e8c89dd1ae08956695f..421f146ea9c35b852251c0ddb29856c13e11aef3 100644
|
index a1f4ebcd0877a6d0c41493eff5d70a408bf98e59..f1725ef766c35aa623ace58fe8bf31fc9b2bb6b3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
||||||
@@ -169,6 +169,26 @@ public class WorldGenRegion implements WorldGenLevel {
|
@@ -169,6 +169,26 @@ public class WorldGenRegion implements WorldGenLevel {
|
||||||
@ -4990,10 +4976,10 @@ index 7d69da7e761ccfe736656e8c89dd1ae08956695f..421f146ea9c35b852251c0ddb29856c1
|
|||||||
public BlockState getBlockState(BlockPos pos) {
|
public BlockState getBlockState(BlockPos pos) {
|
||||||
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
|
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 0914b2f9fef1f49df9f0ce7c85cdde94c2c39b6c..6abe921099ff00ecfaf0f423ef27d708420f6f48 100644
|
index 23a611c9a83d1cea5ab2f64cdbd696c39872477d..bf660a057d135563b47e7b74d927a82a20b8ef75 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -180,6 +180,7 @@ public abstract class PlayerList {
|
@@ -181,6 +181,7 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
|
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
|
||||||
@ -5002,10 +4988,10 @@ index 0914b2f9fef1f49df9f0ce7c85cdde94c2c39b6c..6abe921099ff00ecfaf0f423ef27d708
|
|||||||
GameProfileCache usercache = this.server.getProfileCache();
|
GameProfileCache usercache = this.server.getProfileCache();
|
||||||
// Optional optional; // CraftBukkit - decompile error
|
// Optional optional; // CraftBukkit - decompile error
|
||||||
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
||||||
index aede9b65e799a1f123f71f9390fb05acddda676b..ca94a1aaccdcc9f28b5f7936b871216a75ab762a 100644
|
index ae25aec117a7272735c824a00c1ed117fa52a921..f877bc637fef7f446b328381316f1431b3a5dee8 100644
|
||||||
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
||||||
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
|
||||||
@@ -79,6 +79,13 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
|
@@ -82,6 +82,13 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
|
||||||
runnable.run();
|
runnable.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5018,12 +5004,12 @@ index aede9b65e799a1f123f71f9390fb05acddda676b..ca94a1aaccdcc9f28b5f7936b871216a
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tell(R runnable) {
|
public void schedule(R runnable) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 05a4056b242159b1c85aa6ebf43b69cf85c00021..06cbe7a7ea131a8bead857cbfbd27810a9093320 100644
|
index 1631ea62aab53d6e5e0ae44f63367416ac424410..c010d18061f58a583c69e85fc29305497523f569 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -339,6 +339,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -342,6 +342,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
|
return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -5036,10 +5022,10 @@ index 05a4056b242159b1c85aa6ebf43b69cf85c00021..06cbe7a7ea131a8bead857cbfbd27810
|
|||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
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
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index c1db114edd9e31273b76374cbd19710b01cada2b..26064174397dc95f9b117d901e22c55abebf3c39 100644
|
index 47712d062ece9914de058153272ab1fa535af372..9aa4e70f1d1c4de2138d31701dceaed25062e69c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -282,6 +282,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -296,6 +296,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
public boolean collides = true;
|
public boolean collides = true;
|
||||||
public Set<UUID> collidableExemptions = new HashSet<>();
|
public Set<UUID> collidableExemptions = new HashSet<>();
|
||||||
public boolean bukkitPickUpLoot;
|
public boolean bukkitPickUpLoot;
|
||||||
@ -5048,10 +5034,10 @@ index c1db114edd9e31273b76374cbd19710b01cada2b..26064174397dc95f9b117d901e22c55a
|
|||||||
@Override
|
@Override
|
||||||
public float getBukkitYaw() {
|
public float getBukkitYaw() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index 3e00b12d166c5a6a82e61574bfefd5973ffcbb59..142d762750b9745428ae27802f7a428147a74771 100644
|
index 0495b02157a40742ebf6817841010aacea179806..b0e45e28d17780b760a81ccbff61581274e033df 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -953,6 +953,25 @@ public final class ItemStack implements DataComponentHolder {
|
@@ -1025,6 +1025,25 @@ public final class ItemStack implements DataComponentHolder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5077,7 +5063,7 @@ index 3e00b12d166c5a6a82e61574bfefd5973ffcbb59..142d762750b9745428ae27802f7a4281
|
|||||||
public void applyComponents(DataComponentPatch changes) {
|
public void applyComponents(DataComponentPatch changes) {
|
||||||
this.components.applyPatch(changes);
|
this.components.applyPatch(changes);
|
||||||
this.getItem().verifyComponentsAfterLoad(this);
|
this.getItem().verifyComponentsAfterLoad(this);
|
||||||
@@ -1219,6 +1238,7 @@ public final class ItemStack implements DataComponentHolder {
|
@@ -1300,6 +1319,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setItem(Item item) {
|
public void setItem(Item item) {
|
||||||
@ -5086,10 +5072,10 @@ index 3e00b12d166c5a6a82e61574bfefd5973ffcbb59..142d762750b9745428ae27802f7a4281
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||||
index 1c71d2c1b16bdba1e14a8230787e4cb4ad530163..d6d8bbc98fc71997cb52521d59ebb59d727d3c22 100644
|
index 1a69fa49d43c904d0f762159129b8ed1eea36a43..6850ac324ee4d202f112dbd057ea1bde9de17ea9 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
|
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||||
@@ -9,6 +9,7 @@ import javax.annotation.Nullable;
|
@@ -12,6 +12,7 @@ import javax.annotation.Nullable;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
@ -5097,7 +5083,7 @@ index 1c71d2c1b16bdba1e14a8230787e4cb4ad530163..d6d8bbc98fc71997cb52521d59ebb59d
|
|||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
@@ -30,6 +31,15 @@ public interface BlockGetter extends LevelHeightAccessor {
|
@@ -35,6 +36,15 @@ public interface BlockGetter extends LevelHeightAccessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockState getBlockState(BlockPos pos);
|
BlockState getBlockState(BlockPos pos);
|
||||||
@ -5114,10 +5100,10 @@ index 1c71d2c1b16bdba1e14a8230787e4cb4ad530163..d6d8bbc98fc71997cb52521d59ebb59d
|
|||||||
FluidState getFluidState(BlockPos pos);
|
FluidState getFluidState(BlockPos pos);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||||
index 171c9c4ab2d1a7988935e09b49286f30e36741e2..fa58eeec2b652f0fa251eedf11cfabde5fd3198b 100644
|
index a59d3f56859ba7c07dcb45b1e199e3a7132dcff7..0639e4565c3324d757dec1226adb4e99d841f2c0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/ChunkPos.java
|
--- a/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
+++ b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||||
@@ -20,6 +20,7 @@ public class ChunkPos {
|
@@ -46,6 +46,7 @@ public class ChunkPos {
|
||||||
public static final int REGION_MAX_INDEX = 31;
|
public static final int REGION_MAX_INDEX = 31;
|
||||||
public final int x;
|
public final int x;
|
||||||
public final int z;
|
public final int z;
|
||||||
@ -5125,7 +5111,7 @@ index 171c9c4ab2d1a7988935e09b49286f30e36741e2..fa58eeec2b652f0fa251eedf11cfabde
|
|||||||
private static final int HASH_A = 1664525;
|
private static final int HASH_A = 1664525;
|
||||||
private static final int HASH_C = 1013904223;
|
private static final int HASH_C = 1013904223;
|
||||||
private static final int HASH_Z_XOR = -559038737;
|
private static final int HASH_Z_XOR = -559038737;
|
||||||
@@ -27,16 +28,19 @@ public class ChunkPos {
|
@@ -53,16 +54,19 @@ public class ChunkPos {
|
||||||
public ChunkPos(int x, int z) {
|
public ChunkPos(int x, int z) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.z = z;
|
this.z = z;
|
||||||
@ -5145,7 +5131,7 @@ index 171c9c4ab2d1a7988935e09b49286f30e36741e2..fa58eeec2b652f0fa251eedf11cfabde
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ChunkPos minFromRegion(int x, int z) {
|
public static ChunkPos minFromRegion(int x, int z) {
|
||||||
@@ -48,7 +52,7 @@ public class ChunkPos {
|
@@ -74,7 +78,7 @@ public class ChunkPos {
|
||||||
}
|
}
|
||||||
|
|
||||||
public long toLong() {
|
public long toLong() {
|
||||||
@ -5155,7 +5141,7 @@ index 171c9c4ab2d1a7988935e09b49286f30e36741e2..fa58eeec2b652f0fa251eedf11cfabde
|
|||||||
|
|
||||||
public static long asLong(int chunkX, int chunkZ) {
|
public static long asLong(int chunkX, int chunkZ) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java b/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java
|
diff --git a/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java b/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java
|
||||||
index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671f8c89e21 100644
|
index 8741264b0a9529b40c41a4b9bf25b50d27c830bc..87af0b3cfd3a3170955894028fd667f108ea8121 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java
|
--- a/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java
|
+++ b/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java
|
||||||
@@ -17,6 +17,18 @@ public enum EmptyBlockGetter implements BlockGetter {
|
@@ -17,6 +17,18 @@ public enum EmptyBlockGetter implements BlockGetter {
|
||||||
@ -5178,10 +5164,10 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671
|
|||||||
public BlockState getBlockState(BlockPos pos) {
|
public BlockState getBlockState(BlockPos pos) {
|
||||||
return Blocks.AIR.defaultBlockState();
|
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
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index c061813d275fbc48d7629cc59d90dbb4c347516c..2bc1d0d3ea8a6e3327e9c11bd1f0666d210e9bbe 100644
|
index c8e49c1904c80c4ede40ca5c26efad9b12e247d1..3fb17bbcecf6dc4af3b231835adff25f86e1379f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -95,6 +95,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
@@ -97,6 +97,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
||||||
@ -5259,7 +5245,7 @@ index c061813d275fbc48d7629cc59d90dbb4c347516c..2bc1d0d3ea8a6e3327e9c11bd1f0666d
|
|||||||
ChunkAccess ichunkaccess = this.getChunkSource().getChunk(chunkX, chunkZ, leastStatus, create);
|
ChunkAccess ichunkaccess = this.getChunkSource().getChunk(chunkX, chunkZ, leastStatus, create);
|
||||||
|
|
||||||
if (ichunkaccess == null && create) {
|
if (ichunkaccess == null && create) {
|
||||||
@@ -551,7 +593,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -553,7 +595,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
if (this.isOutsideBuildHeight(pos)) {
|
if (this.isOutsideBuildHeight(pos)) {
|
||||||
return Blocks.VOID_AIR.defaultBlockState();
|
return Blocks.VOID_AIR.defaultBlockState();
|
||||||
} else {
|
} else {
|
||||||
@ -5269,7 +5255,7 @@ index c061813d275fbc48d7629cc59d90dbb4c347516c..2bc1d0d3ea8a6e3327e9c11bd1f0666d
|
|||||||
return chunk.getBlockState(pos);
|
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
|
diff --git a/src/main/java/net/minecraft/world/level/LevelReader.java b/src/main/java/net/minecraft/world/level/LevelReader.java
|
||||||
index 749e4ea1be56b393877b5fdd72dc3669dbf5a3dd..a0ae26d6197e1069ca09982b4f8b706c55ae8491 100644
|
index 35b338fed1df844846ecc876cbbab19e0efbfcb0..5eb8982678110fabb82a93c5ec67c666b7fde017 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/LevelReader.java
|
--- a/src/main/java/net/minecraft/world/level/LevelReader.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/LevelReader.java
|
+++ b/src/main/java/net/minecraft/world/level/LevelReader.java
|
||||||
@@ -26,6 +26,9 @@ public interface LevelReader extends BlockAndTintGetter, CollisionGetter, Signal
|
@@ -26,6 +26,9 @@ public interface LevelReader extends BlockAndTintGetter, CollisionGetter, Signal
|
||||||
@ -5283,18 +5269,18 @@ index 749e4ea1be56b393877b5fdd72dc3669dbf5a3dd..a0ae26d6197e1069ca09982b4f8b706c
|
|||||||
boolean hasChunk(int chunkX, int chunkZ);
|
boolean hasChunk(int chunkX, int chunkZ);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||||
index 497792978bdf0e6a53d772304770e8df3e7416ea..c5454b92ca2565461c799d7340160f9fb72c1b0f 100644
|
index b682c7c51204f727e21bfc20c691837deb7137ba..5375ea8dee8f74c843964824ad1a374e15711b60 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
+++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
|
||||||
@@ -9,6 +9,7 @@ import net.minecraft.core.Holder;
|
@@ -8,6 +8,7 @@ import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.SectionPos;
|
import net.minecraft.core.SectionPos;
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.util.profiling.ProfilerFiller;
|
|
||||||
+import net.minecraft.server.level.ServerLevel;
|
+import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
import net.minecraft.world.level.biome.Biomes;
|
import net.minecraft.world.level.biome.Biomes;
|
||||||
@@ -67,7 +68,7 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
@@ -66,7 +67,7 @@ public class PathNavigationRegion implements CollisionGetter {
|
||||||
private ChunkAccess getChunk(int chunkX, int chunkZ) {
|
private ChunkAccess getChunk(int chunkX, int chunkZ) {
|
||||||
int i = chunkX - this.centerX;
|
int i = chunkX - this.centerX;
|
||||||
int j = chunkZ - this.centerZ;
|
int j = chunkZ - this.centerZ;
|
||||||
@ -5303,7 +5289,7 @@ index 497792978bdf0e6a53d772304770e8df3e7416ea..c5454b92ca2565461c799d7340160f9f
|
|||||||
ChunkAccess chunkAccess = this.chunks[i][j];
|
ChunkAccess chunkAccess = this.chunks[i][j];
|
||||||
return (ChunkAccess)(chunkAccess != null ? chunkAccess : new EmptyLevelChunk(this.level, new ChunkPos(chunkX, chunkZ), this.plains.get()));
|
return (ChunkAccess)(chunkAccess != null ? chunkAccess : new EmptyLevelChunk(this.level, new ChunkPos(chunkX, chunkZ), this.plains.get()));
|
||||||
} else {
|
} else {
|
||||||
@@ -75,6 +76,30 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
|
@@ -74,6 +75,30 @@ public class PathNavigationRegion implements CollisionGetter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5335,10 +5321,10 @@ index 497792978bdf0e6a53d772304770e8df3e7416ea..c5454b92ca2565461c799d7340160f9f
|
|||||||
public WorldBorder getWorldBorder() {
|
public WorldBorder getWorldBorder() {
|
||||||
return this.level.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
|
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 e0594a1c381487b43bfc55212044e1b3122cee66..59fcaca90b67c03e1a6799e58061dbae3b1f1ceb 100644
|
index 107d387f0f81e1a1400cefbec4758b743a64ca3b..0bae4e8d1e9fcc4608b3ef1c981c65f3b03de22b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
@@ -841,12 +841,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
@@ -883,12 +883,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5352,9 +5338,9 @@ index e0594a1c381487b43bfc55212044e1b3122cee66..59fcaca90b67c03e1a6799e58061dbae
|
|||||||
+ this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here
|
+ this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here
|
||||||
|
|
||||||
this.legacySolid = this.calculateSolid();
|
this.legacySolid = this.calculateSolid();
|
||||||
}
|
this.occlusionShape = this.canOcclude ? ((Block) this.owner).getOcclusionShape(this.asState()) : Shapes.empty();
|
||||||
@@ -893,8 +895,8 @@ public abstract class BlockBehaviour implements FeatureElement {
|
@@ -955,8 +957,8 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||||
return this.getBlock().getOcclusionShape(this.asState(), world, pos);
|
return this.occlusionShape;
|
||||||
}
|
}
|
||||||
|
|
||||||
- public boolean hasLargeCollisionShape() {
|
- public boolean hasLargeCollisionShape() {
|
||||||
@ -5365,19 +5351,19 @@ index e0594a1c381487b43bfc55212044e1b3122cee66..59fcaca90b67c03e1a6799e58061dbae
|
|||||||
|
|
||||||
public boolean useShapeForLightOcclusion() {
|
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
|
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 35c4bf87870c0dfa1f648547115238dacbb87426..db4d95ce98eb1490d5306d1f74b282d27264871a 100644
|
index 15e3b8c8a850039d0adda3c345bd5b9288d06299..37795b9e264c571efe9c718fa9996197dca4ed54 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||||
@@ -65,7 +65,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
@@ -65,7 +65,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
|
||||||
protected final ShortList[] postProcessing;
|
protected final ShortList[] postProcessing;
|
||||||
protected volatile boolean unsaved;
|
private volatile boolean unsaved;
|
||||||
private volatile boolean isLightCorrect;
|
private volatile boolean isLightCorrect;
|
||||||
- protected final ChunkPos chunkPos;
|
- protected final ChunkPos chunkPos;
|
||||||
+ protected final ChunkPos chunkPos; public final long coordinateKey; public final int locX; public final int locZ; // Paper - cache coordinate key
|
+ protected final ChunkPos chunkPos; public final long coordinateKey; public final int locX; public final int locZ; // Paper - cache coordinate key
|
||||||
private long inhabitedTime;
|
private long inhabitedTime;
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -91,7 +91,8 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
@@ -91,7 +91,8 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public ChunkAccess(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biomeRegistry, long inhabitedTime, @Nullable LevelChunkSection[] sectionArray, @Nullable BlendingData blendingData) {
|
public ChunkAccess(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biomeRegistry, long inhabitedTime, @Nullable LevelChunkSection[] sectionArray, @Nullable BlendingData blendingData) {
|
||||||
@ -5405,10 +5391,10 @@ index a52077f0d93c94b0ea644bc14b9b28e84fd1b154..dcc0acd259920463a4464213b9a5e793
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 5b73fcfe278f57de249f3a96da58dc08eda7aff6..25380a44e5cc94f3924cfee6a03c3091fea04ae2 100644
|
index 7252096639078cd0b16997354530bf181a61e999..d76591694c3b167b8b8f17b61a373a43140a8b68 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -116,6 +116,10 @@ public class LevelChunk extends ChunkAccess {
|
@@ -120,6 +120,10 @@ public class LevelChunk extends ChunkAccess {
|
||||||
public boolean needsDecoration;
|
public boolean needsDecoration;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -5419,7 +5405,7 @@ index 5b73fcfe278f57de249f3a96da58dc08eda7aff6..25380a44e5cc94f3924cfee6a03c3091
|
|||||||
public LevelChunk(ServerLevel world, ProtoChunk protoChunk, @Nullable LevelChunk.PostLoadProcessor entityLoader) {
|
public LevelChunk(ServerLevel world, ProtoChunk protoChunk, @Nullable LevelChunk.PostLoadProcessor entityLoader) {
|
||||||
this(world, protoChunk.getPos(), protoChunk.getUpgradeData(), protoChunk.unpackBlockTicks(), protoChunk.unpackFluidTicks(), protoChunk.getInhabitedTime(), protoChunk.getSections(), entityLoader, protoChunk.getBlendingData());
|
this(world, protoChunk.getPos(), protoChunk.getUpgradeData(), protoChunk.unpackBlockTicks(), protoChunk.unpackFluidTicks(), protoChunk.getInhabitedTime(), protoChunk.getSections(), entityLoader, protoChunk.getBlendingData());
|
||||||
Iterator iterator = protoChunk.getBlockEntities().values().iterator();
|
Iterator iterator = protoChunk.getBlockEntities().values().iterator();
|
||||||
@@ -181,8 +185,25 @@ public class LevelChunk extends ChunkAccess {
|
@@ -204,8 +208,25 @@ public class LevelChunk extends ChunkAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5445,7 +5431,7 @@ index 5b73fcfe278f57de249f3a96da58dc08eda7aff6..25380a44e5cc94f3924cfee6a03c3091
|
|||||||
int i = pos.getX();
|
int i = pos.getX();
|
||||||
int j = pos.getY();
|
int j = pos.getY();
|
||||||
int k = pos.getZ();
|
int k = pos.getZ();
|
||||||
@@ -224,6 +245,18 @@ public class LevelChunk extends ChunkAccess {
|
@@ -247,6 +268,18 @@ public class LevelChunk extends ChunkAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5464,7 +5450,7 @@ index 5b73fcfe278f57de249f3a96da58dc08eda7aff6..25380a44e5cc94f3924cfee6a03c3091
|
|||||||
@Override
|
@Override
|
||||||
public FluidState getFluidState(BlockPos pos) {
|
public FluidState getFluidState(BlockPos pos) {
|
||||||
return this.getFluidState(pos.getX(), pos.getY(), pos.getZ());
|
return this.getFluidState(pos.getX(), pos.getY(), pos.getZ());
|
||||||
@@ -554,7 +587,11 @@ public class LevelChunk extends ChunkAccess {
|
@@ -579,7 +612,11 @@ public class LevelChunk extends ChunkAccess {
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public void loadCallback() {
|
public void loadCallback() {
|
||||||
@ -5476,7 +5462,7 @@ index 5b73fcfe278f57de249f3a96da58dc08eda7aff6..25380a44e5cc94f3924cfee6a03c3091
|
|||||||
if (server != null) {
|
if (server != null) {
|
||||||
/*
|
/*
|
||||||
* If it's a new world, the first few chunks are generated inside
|
* If it's a new world, the first few chunks are generated inside
|
||||||
@@ -595,6 +632,10 @@ public class LevelChunk extends ChunkAccess {
|
@@ -620,6 +657,10 @@ public class LevelChunk extends ChunkAccess {
|
||||||
server.getPluginManager().callEvent(unloadEvent);
|
server.getPluginManager().callEvent(unloadEvent);
|
||||||
// note: saving can be prevented, but not forced if no saving is actually required
|
// note: saving can be prevented, but not forced if no saving is actually required
|
||||||
this.mustNotSave = !unloadEvent.isSaveChunk();
|
this.mustNotSave = !unloadEvent.isSaveChunk();
|
||||||
@ -5488,7 +5474,7 @@ index 5b73fcfe278f57de249f3a96da58dc08eda7aff6..25380a44e5cc94f3924cfee6a03c3091
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
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 ca4c8f74a1ab2a8b36e193a2c40c3bd76565d258..2c153af611399e884752f8256bee4fe32de5c572 100644
|
index 0cf916776ce8735dcfa4c765b18e77037501a322..771529ba28a16664ad19ed9c0f4bf95eeb7da76b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||||
@@ -19,7 +19,7 @@ public class LevelChunkSection {
|
@@ -19,7 +19,7 @@ public class LevelChunkSection {
|
||||||
@ -5501,11 +5487,11 @@ index ca4c8f74a1ab2a8b36e193a2c40c3bd76565d258..2c153af611399e884752f8256bee4fe3
|
|||||||
private short tickingFluidCount;
|
private short tickingFluidCount;
|
||||||
public final PalettedContainer<BlockState> states;
|
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
|
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 ae16b014abd52ee10d523fb003cce166b846b222..7f302405a88766c2112539d24d3dd2e513f94985 100644
|
index 8bd5fb4971be46a51534c202e10a362723ad8664..5321109ca638036572df9a7e17eafcef2b4f5112 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||||
@@ -83,6 +83,18 @@ public class ProtoChunk extends ChunkAccess {
|
@@ -83,6 +83,18 @@ public class ProtoChunk extends ChunkAccess {
|
||||||
return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks);
|
return new ChunkAccess.PackedTicks(this.blockTicks.pack(time), this.fluidTicks.pack(time));
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - If loaded util
|
+ // Paper start - If loaded util
|
||||||
@ -5547,10 +5533,10 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..1cfc906317f07a44f06a4adf021c44e3
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index d0c41302478bd9b0ec65020e7ef520bd3ff1f347..99178e22846c41f1d800b69d4fed064088bbe92c 100644
|
index 3882ae04173cd125fe490692a6bc2b4d8b20ff7b..eb61712ea067b277e7f32f887e3528faca275450 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2600,4 +2600,9 @@ public final class CraftServer implements Server {
|
@@ -2617,4 +2617,9 @@ public final class CraftServer implements Server {
|
||||||
return this.spigot;
|
return this.spigot;
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -5561,10 +5547,10 @@ index d0c41302478bd9b0ec65020e7ef520bd3ff1f347..99178e22846c41f1d800b69d4fed0640
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 07012c01e1d8eacf37b8a86a5e4e56fb0d81c989..ac6d4c8ac26696a0c6dfa471eee764b871dd2029 100644
|
index 799444e4101283c972a160742a9e2548e604173f..456c58877490feab6be3577d34c89ea776568617 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -252,8 +252,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -256,8 +256,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Chunk[] getLoadedChunks() {
|
public Chunk[] getLoadedChunks() {
|
||||||
@ -5575,7 +5561,7 @@ index 07012c01e1d8eacf37b8a86a5e4e56fb0d81c989..ac6d4c8ac26696a0c6dfa471eee764b8
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -328,7 +328,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -334,7 +334,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean refreshChunk(int x, int z) {
|
public boolean refreshChunk(int x, int z) {
|
||||||
@ -5584,7 +5570,7 @@ index 07012c01e1d8eacf37b8a86a5e4e56fb0d81c989..ac6d4c8ac26696a0c6dfa471eee764b8
|
|||||||
if (playerChunk == null) return false;
|
if (playerChunk == null) return false;
|
||||||
|
|
||||||
playerChunk.getTickingChunkFuture().thenAccept(either -> {
|
playerChunk.getTickingChunkFuture().thenAccept(either -> {
|
||||||
@@ -2100,4 +2100,55 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -2110,4 +2110,55 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
return this.spigot;
|
return this.spigot;
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -5641,10 +5627,10 @@ index 07012c01e1d8eacf37b8a86a5e4e56fb0d81c989..ac6d4c8ac26696a0c6dfa471eee764b8
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 4cbf0d797fc2d57c822877c111698b2077399d32..9cd22b09b295ecd95d17d1dd5edb96f916eb6c09 100644
|
index 8ad04c031656d8a676687001b8e9cdc9a1b3bd70..1f013a6eb2088eccb3aea1a5ecd8aac8cc9597d9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -2420,4 +2420,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2433,4 +2433,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return this.spigot;
|
return this.spigot;
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -5680,10 +5666,10 @@ index 4cbf0d797fc2d57c822877c111698b2077399d32..9cd22b09b295ecd95d17d1dd5edb96f9
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
index 952c6ebde7031dc060efe98992f82c02bf3534ea..17fa2d3db112762bcb8b941b69b8ddcc53f47224 100644
|
index f6e6f0ddef6693c58f28b89cf3df005a8d47e08d..101eea3452c9e387e770b716543c3a4f17b9a737 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
@@ -23,6 +23,20 @@ import org.jetbrains.annotations.ApiStatus;
|
@@ -31,6 +31,20 @@ import org.jetbrains.annotations.ApiStatus;
|
||||||
@DelegateDeserialization(ItemStack.class)
|
@DelegateDeserialization(ItemStack.class)
|
||||||
public final class CraftItemStack extends ItemStack {
|
public final class CraftItemStack extends ItemStack {
|
||||||
|
|
||||||
@ -5705,10 +5691,10 @@ index 952c6ebde7031dc060efe98992f82c02bf3534ea..17fa2d3db112762bcb8b941b69b8ddcc
|
|||||||
if (original instanceof CraftItemStack) {
|
if (original instanceof CraftItemStack) {
|
||||||
CraftItemStack stack = (CraftItemStack) original;
|
CraftItemStack stack = (CraftItemStack) original;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
||||||
index 5fd6eb754c4edebed6798c65b06507a4e89ca48f..524b51a0ab808a0629c871ad813115abd4b49dbd 100644
|
index b8a865305cc61954aeebff4a7cd1d1973c5f46ab..e444662ee4d9405eeea7caa41b9cd6b36586d840 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
|
||||||
@@ -58,6 +58,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
@@ -56,6 +56,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import net.minecraft.world.ticks.LevelTickAccess;
|
import net.minecraft.world.ticks.LevelTickAccess;
|
||||||
import net.minecraft.world.ticks.TickPriority;
|
import net.minecraft.world.ticks.TickPriority;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||||
@ -5716,9 +5702,9 @@ index 5fd6eb754c4edebed6798c65b06507a4e89ca48f..524b51a0ab808a0629c871ad813115ab
|
|||||||
|
|
||||||
public abstract class DelegatedGeneratorAccess implements WorldGenLevel {
|
public abstract class DelegatedGeneratorAccess implements WorldGenLevel {
|
||||||
|
|
||||||
@@ -807,4 +808,24 @@ public abstract class DelegatedGeneratorAccess implements WorldGenLevel {
|
@@ -788,4 +789,25 @@ public abstract class DelegatedGeneratorAccess implements WorldGenLevel {
|
||||||
public int getMoonPhase() {
|
public boolean isFluidAtPosition(BlockPos pos, Predicate<FluidState> state) {
|
||||||
return this.handle.getMoonPhase();
|
return this.handle.isFluidAtPosition(pos, state);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
@ -5741,6 +5727,7 @@ index 5fd6eb754c4edebed6798c65b06507a4e89ca48f..524b51a0ab808a0629c871ad813115ab
|
|||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
+
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||||
index e837d76e833d73d888bc1dad3515c2b82bc0e437..4705aed1dd98378c146bf9e346df1a17f719ad36 100644
|
index e837d76e833d73d888bc1dad3515c2b82bc0e437..4705aed1dd98378c146bf9e346df1a17f719ad36 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||||
@ -5770,7 +5757,7 @@ index e837d76e833d73d888bc1dad3515c2b82bc0e437..4705aed1dd98378c146bf9e346df1a17
|
|||||||
public WorldBorder getWorldBorder() {
|
public WorldBorder getWorldBorder() {
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
index 0c7c97f27853843ec714e47f5b570f9d09bbba14..ff422d4d4f2b764370f0ee2af13034853c1d3fe1 100644
|
index 1bf87b4915edf341ad55f8274cef324e0bc28547..3591b79481ac17bd02e59ac3c623d1c6991abd84 100644
|
||||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
@@ -34,6 +34,9 @@ public class ActivationRange
|
@@ -34,6 +34,9 @@ public class ActivationRange
|
@ -2179,10 +2179,10 @@ index 08dcd817bfe1ba0121d4ce701825e4aee384db85..d5f63d06d921d731b4e64b3822837771
|
|||||||
public static ChatFormatting getById(int colorIndex) {
|
public static ChatFormatting getById(int colorIndex) {
|
||||||
if (colorIndex < 0) {
|
if (colorIndex < 0) {
|
||||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||||
index f30cdfa5fd294479e35680b2f758b3295f659b74..ec34e402104d7a696ea95e0b11ee70189b678ab9 100644
|
index d6ea21d6d33b701f249a8acd3e7304eb2c02e1ca..2fbd7f7c976fb55b7238f1e512afad79e52a5b2c 100644
|
||||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||||
@@ -65,6 +65,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
@@ -67,6 +67,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
||||||
private final CommandSigningContext signingContext;
|
private final CommandSigningContext signingContext;
|
||||||
private final TaskChainer chatMessageChainer;
|
private final TaskChainer chatMessageChainer;
|
||||||
public volatile CommandNode currentCommand; // CraftBukkit
|
public volatile CommandNode currentCommand; // CraftBukkit
|
||||||
@ -2235,7 +2235,7 @@ index dd66979bcae33096d72001678e8e55569bea6f53..c8d39e6e1c570c9219f6066da273dc01
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
index 6d7545a925156aef6badcfa2bc40dbdad18c4ac0..0cd6a50837efce87ca052a0e1e24db2b75761196 100644
|
index 7bf8cb128a6bad9c5a3405f4137b837638ce3f50..a523a83aec3a6ecbec4d60a187edc0c0167d15b4 100644
|
||||||
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||||
@@ -72,6 +72,7 @@ public class FriendlyByteBuf extends ByteBuf {
|
@@ -72,6 +72,7 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||||
@ -2607,18 +2607,18 @@ index bb97fdb9aa6167083442a928276ebe4225a586ef..eeaa40e8121643c6c1d951e76e7361e2
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index c9cab509796599b13ca3422de1049aed78348704..387552877ac82baa3af0da723dbb7c331fad6cf4 100644
|
index 83b32b2963febf8af9ccd7df666cbaccc62f1313..775f68ce2b402d86a83ab2307f38963ade731ef0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -201,6 +201,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
@@ -208,6 +208,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource, AutoCloseable {
|
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource {
|
||||||
|
|
||||||
public static final Logger LOGGER = LogUtils.getLogger();
|
public static final Logger LOGGER = LogUtils.getLogger();
|
||||||
+ public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
|
+ public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
|
||||||
public static final String VANILLA_BRAND = "vanilla";
|
public static final String VANILLA_BRAND = "vanilla";
|
||||||
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
|
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
|
||||||
private static final int TICK_STATS_SPAN = 100;
|
private static final int TICK_STATS_SPAN = 100;
|
||||||
@@ -251,8 +252,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -257,8 +258,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
private boolean preventProxyConnections;
|
private boolean preventProxyConnections;
|
||||||
private boolean pvp;
|
private boolean pvp;
|
||||||
private boolean allowFlight;
|
private boolean allowFlight;
|
||||||
@ -2628,7 +2628,7 @@ index c9cab509796599b13ca3422de1049aed78348704..387552877ac82baa3af0da723dbb7c33
|
|||||||
private int playerIdleTimeout;
|
private int playerIdleTimeout;
|
||||||
private final long[] tickTimesNanos;
|
private final long[] tickTimesNanos;
|
||||||
private long aggregatedTickTimesNanos;
|
private long aggregatedTickTimesNanos;
|
||||||
@@ -1394,7 +1394,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1469,7 +1469,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
private ServerStatus buildServerStatus() {
|
private ServerStatus buildServerStatus() {
|
||||||
ServerStatus.Players serverping_serverpingplayersample = this.buildPlayerStatus();
|
ServerStatus.Players serverping_serverpingplayersample = this.buildPlayerStatus();
|
||||||
|
|
||||||
@ -2637,15 +2637,15 @@ index c9cab509796599b13ca3422de1049aed78348704..387552877ac82baa3af0da723dbb7c33
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ServerStatus.Players buildPlayerStatus() {
|
private ServerStatus.Players buildPlayerStatus() {
|
||||||
@@ -1426,6 +1426,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1503,6 +1503,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
SpigotTimings.schedulerTimer.startTiming(); // Spigot
|
SpigotTimings.schedulerTimer.startTiming(); // Spigot
|
||||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
|
||||||
SpigotTimings.schedulerTimer.stopTiming(); // Spigot
|
SpigotTimings.schedulerTimer.stopTiming(); // Spigot
|
||||||
+ io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
+ io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||||
this.profiler.push("commandFunctions");
|
gameprofilerfiller.push("commandFunctions");
|
||||||
SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
|
SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
|
||||||
this.getFunctions().tick();
|
this.getFunctions().tick();
|
||||||
@@ -1797,10 +1798,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1876,10 +1877,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMotd() {
|
public String getMotd() {
|
||||||
@ -2667,7 +2667,7 @@ index c9cab509796599b13ca3422de1049aed78348704..387552877ac82baa3af0da723dbb7c33
|
|||||||
this.motd = motd;
|
this.motd = motd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2562,23 +2573,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2637,23 +2648,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logChatMessage(Component message, ChatType.Bound params, @Nullable String prefix) {
|
public void logChatMessage(Component message, ChatType.Bound params, @Nullable String prefix) {
|
||||||
@ -2700,10 +2700,10 @@ index c9cab509796599b13ca3422de1049aed78348704..387552877ac82baa3af0da723dbb7c33
|
|||||||
|
|
||||||
public boolean logIPs() {
|
public boolean logIPs() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index cb136a30287a17947ed018cdc48e6f91ed904072..ee5188f3aa2ff71306f5af8046e8ddf919c8601b 100644
|
index 32e7c6e6f09e53fe8b5ade22dad8142cd09e0163..4303bde198050cd037f006234d269af406606eff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -172,6 +172,7 @@ import net.minecraft.world.item.trading.MerchantOffers;
|
@@ -190,6 +190,7 @@ import net.minecraft.world.item.trading.MerchantOffers;
|
||||||
import net.minecraft.world.scores.Scoreboard;
|
import net.minecraft.world.scores.Scoreboard;
|
||||||
import net.minecraft.world.scores.Team;
|
import net.minecraft.world.scores.Team;
|
||||||
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
|
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
|
||||||
@ -2711,7 +2711,7 @@ index cb136a30287a17947ed018cdc48e6f91ed904072..ee5188f3aa2ff71306f5af8046e8ddf9
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.WeatherType;
|
import org.bukkit.WeatherType;
|
||||||
@@ -237,6 +238,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
@@ -261,6 +262,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
private boolean disconnected;
|
private boolean disconnected;
|
||||||
private int requestedViewDistance;
|
private int requestedViewDistance;
|
||||||
public String language = "en_us"; // CraftBukkit - default
|
public String language = "en_us"; // CraftBukkit - default
|
||||||
@ -2719,15 +2719,15 @@ index cb136a30287a17947ed018cdc48e6f91ed904072..ee5188f3aa2ff71306f5af8046e8ddf9
|
|||||||
@Nullable
|
@Nullable
|
||||||
private Vec3 startingToFallPosition;
|
private Vec3 startingToFallPosition;
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -270,6 +272,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
@@ -297,6 +299,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public CraftPlayer.TransferCookieConnection transferCookieConnection;
|
public CraftPlayer.TransferCookieConnection transferCookieConnection;
|
||||||
public String displayName;
|
public String displayName;
|
||||||
+ public net.kyori.adventure.text.Component adventure$displayName; // Paper
|
+ public net.kyori.adventure.text.Component adventure$displayName; // Paper
|
||||||
public Component listName;
|
public Component listName;
|
||||||
|
public int listOrder = 0;
|
||||||
public org.bukkit.Location compassTarget;
|
public org.bukkit.Location compassTarget;
|
||||||
public int newExp = 0;
|
@@ -414,6 +417,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
@@ -353,6 +356,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
this.displayName = this.getScoreboardName();
|
this.displayName = this.getScoreboardName();
|
||||||
@ -2735,7 +2735,7 @@ index cb136a30287a17947ed018cdc48e6f91ed904072..ee5188f3aa2ff71306f5af8046e8ddf9
|
|||||||
this.bukkitPickUpLoot = true;
|
this.bukkitPickUpLoot = true;
|
||||||
this.maxHealthCache = this.getMaxHealth();
|
this.maxHealthCache = this.getMaxHealth();
|
||||||
}
|
}
|
||||||
@@ -910,22 +914,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
@@ -1170,22 +1174,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
|
|
||||||
String deathmessage = defaultMessage.getString();
|
String deathmessage = defaultMessage.getString();
|
||||||
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
|
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
|
||||||
@ -2762,7 +2762,7 @@ index cb136a30287a17947ed018cdc48e6f91ed904072..ee5188f3aa2ff71306f5af8046e8ddf9
|
|||||||
|
|
||||||
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getId(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
|
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getId(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
|
||||||
boolean flag1 = true;
|
boolean flag1 = true;
|
||||||
@@ -2025,8 +2024,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
@@ -2288,8 +2287,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendChatMessage(OutgoingChatMessage message, boolean filterMaskEnabled, ChatType.Bound params) {
|
public void sendChatMessage(OutgoingChatMessage message, boolean filterMaskEnabled, ChatType.Bound params) {
|
||||||
@ -2777,7 +2777,7 @@ index cb136a30287a17947ed018cdc48e6f91ed904072..ee5188f3aa2ff71306f5af8046e8ddf9
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2053,6 +2057,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
@@ -2316,6 +2320,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.language = clientOptions.language();
|
this.language = clientOptions.language();
|
||||||
@ -2786,10 +2786,10 @@ index cb136a30287a17947ed018cdc48e6f91ed904072..ee5188f3aa2ff71306f5af8046e8ddf9
|
|||||||
this.chatVisibility = clientOptions.chatVisibility();
|
this.chatVisibility = clientOptions.chatVisibility();
|
||||||
this.canChatColor = clientOptions.chatColors();
|
this.canChatColor = clientOptions.chatColors();
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
index 16320a5fccc7faf7ceac95d471532104a61d27a5..b2bddc6183204b9f519549073e38741e1a9322c4 100644
|
index 64b13cc2f32ab59dd6bea6d33c475228384b7c3e..99f89854e43ed6742dc9ac1624fa7140b4594b3b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
@@ -72,7 +72,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -73,7 +73,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
private static final Component TIMEOUT_DISCONNECTION_MESSAGE = Component.translatable("disconnect.timeout");
|
private static final Component TIMEOUT_DISCONNECTION_MESSAGE = Component.translatable("disconnect.timeout");
|
||||||
static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response");
|
static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response");
|
||||||
protected final MinecraftServer server;
|
protected final MinecraftServer server;
|
||||||
@ -2798,7 +2798,7 @@ index 16320a5fccc7faf7ceac95d471532104a61d27a5..b2bddc6183204b9f519549073e38741e
|
|||||||
private final boolean transferred;
|
private final boolean transferred;
|
||||||
private long keepAliveTime;
|
private long keepAliveTime;
|
||||||
private boolean keepAlivePending;
|
private boolean keepAlivePending;
|
||||||
@@ -81,6 +81,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -82,6 +82,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
private boolean closed = false;
|
private boolean closed = false;
|
||||||
private int latency;
|
private int latency;
|
||||||
private volatile boolean suspendFlushingOnServerThread = false;
|
private volatile boolean suspendFlushingOnServerThread = false;
|
||||||
@ -2806,7 +2806,7 @@ index 16320a5fccc7faf7ceac95d471532104a61d27a5..b2bddc6183204b9f519549073e38741e
|
|||||||
|
|
||||||
public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit
|
public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit
|
||||||
this.server = minecraftserver;
|
this.server = minecraftserver;
|
||||||
@@ -194,6 +195,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -201,6 +202,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id());
|
ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id());
|
||||||
this.disconnect((Component) Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
|
this.disconnect((Component) Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
|
||||||
}
|
}
|
||||||
@ -2825,7 +2825,7 @@ index 16320a5fccc7faf7ceac95d471532104a61d27a5..b2bddc6183204b9f519549073e38741e
|
|||||||
this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packet.id(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit
|
this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packet.id(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -280,6 +293,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -287,6 +300,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2838,7 +2838,7 @@ index 16320a5fccc7faf7ceac95d471532104a61d27a5..b2bddc6183204b9f519549073e38741e
|
|||||||
public void disconnect(Component reason) {
|
public void disconnect(Component reason) {
|
||||||
this.disconnect(new DisconnectionDetails(reason));
|
this.disconnect(new DisconnectionDetails(reason));
|
||||||
}
|
}
|
||||||
@@ -310,9 +329,9 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -317,9 +336,9 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2850,7 +2850,7 @@ index 16320a5fccc7faf7ceac95d471532104a61d27a5..b2bddc6183204b9f519549073e38741e
|
|||||||
|
|
||||||
if (this.cserver.getServer().isRunning()) {
|
if (this.cserver.getServer().isRunning()) {
|
||||||
this.cserver.getPluginManager().callEvent(event);
|
this.cserver.getPluginManager().callEvent(event);
|
||||||
@@ -324,7 +343,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -331,7 +350,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
}
|
}
|
||||||
this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||||
// Send the possibly modified leave message
|
// Send the possibly modified leave message
|
||||||
@ -2872,7 +2872,7 @@ index e7c407039fef88ef01ba9b6be9ae5bcc3edc026f..5457358bc76889153036818fdfd70a04
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 2de70e3a3038b2d2bb47b58f0e14d937c35d55ba..4acee8121ff62413dbbf2294d17da3bd2f974d5a 100644
|
index 2a2197f30db99542cb7d2f99dc1377160ba2dc64..eed5dd58fc37c137c87bf3e55e1e033b74002110 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -45,6 +45,7 @@ import net.minecraft.nbt.CompoundTag;
|
@@ -45,6 +45,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||||
@ -2883,7 +2883,7 @@ index 2de70e3a3038b2d2bb47b58f0e14d937c35d55ba..4acee8121ff62413dbbf2294d17da3bd
|
|||||||
import net.minecraft.network.chat.ChatType;
|
import net.minecraft.network.chat.ChatType;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.LastSeenMessages;
|
import net.minecraft.network.chat.LastSeenMessages;
|
||||||
@@ -195,6 +196,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
@@ -201,6 +202,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -2892,7 +2892,7 @@ index 2de70e3a3038b2d2bb47b58f0e14d937c35d55ba..4acee8121ff62413dbbf2294d17da3bd
|
|||||||
import com.mojang.datafixers.util.Pair;
|
import com.mojang.datafixers.util.Pair;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
@@ -1728,9 +1731,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -1739,9 +1742,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
*/
|
*/
|
||||||
|
|
||||||
this.player.disconnect();
|
this.player.disconnect();
|
||||||
@ -2907,7 +2907,7 @@ index 2de70e3a3038b2d2bb47b58f0e14d937c35d55ba..4acee8121ff62413dbbf2294d17da3bd
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.player.getTextFilter().leave();
|
this.player.getTextFilter().leave();
|
||||||
@@ -1791,10 +1796,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -1802,10 +1807,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent()).thenApplyAsync(Function.identity(), this.server.chatExecutor); // CraftBukkit - async chat
|
CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent()).thenApplyAsync(Function.identity(), this.server.chatExecutor); // CraftBukkit - async chat
|
||||||
@ -2921,7 +2921,7 @@ index 2de70e3a3038b2d2bb47b58f0e14d937c35d55ba..4acee8121ff62413dbbf2294d17da3bd
|
|||||||
|
|
||||||
this.broadcastChatMessage(playerchatmessage1);
|
this.broadcastChatMessage(playerchatmessage1);
|
||||||
});
|
});
|
||||||
@@ -2014,7 +2019,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2025,7 +2030,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
this.handleCommand(s);
|
this.handleCommand(s);
|
||||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
||||||
// Do nothing, this is coming from a plugin
|
// Do nothing, this is coming from a plugin
|
||||||
@ -2938,7 +2938,7 @@ index 2de70e3a3038b2d2bb47b58f0e14d937c35d55ba..4acee8121ff62413dbbf2294d17da3bd
|
|||||||
Player player = this.getCraftPlayer();
|
Player player = this.getCraftPlayer();
|
||||||
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
|
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
|
||||||
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
|
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
|
||||||
@@ -3011,6 +3024,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -3058,6 +3071,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||||
this.player.updateOptions(packet.information());
|
this.player.updateOptions(packet.information());
|
||||||
@ -2947,7 +2947,7 @@ index 2de70e3a3038b2d2bb47b58f0e14d937c35d55ba..4acee8121ff62413dbbf2294d17da3bd
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index b53e3e5e02ed501d30c3fca4c3130263c32cd2f5..b2f7c76207f2dc0c62f608f21aba4b531f8f523f 100644
|
index c209ac2be7fabcd36cfcc0400308e44a26d78263..8cf3b9f1b7eef2d6278830e21ae012852687e02b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -338,7 +338,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -338,7 +338,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
@ -2988,10 +2988,10 @@ index 3848cc836785829c5aa82bdb5d37d36a97f94a04..f08700abb005f487aca95c0457c09cef
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2bcfaeaf9 100644
|
index bf660a057d135563b47e7b74d927a82a20b8ef75..a70e0ecedc7b70031334bc7fee981bd790ce26a4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -271,7 +271,7 @@ public abstract class PlayerList {
|
@@ -274,7 +274,7 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
ichatmutablecomponent.withStyle(ChatFormatting.YELLOW);
|
ichatmutablecomponent.withStyle(ChatFormatting.YELLOW);
|
||||||
@ -3000,7 +3000,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
|
|
||||||
playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
|
playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
|
||||||
ServerStatus serverping = this.server.getStatus();
|
ServerStatus serverping = this.server.getStatus();
|
||||||
@@ -292,19 +292,18 @@ public abstract class PlayerList {
|
@@ -295,19 +295,18 @@ public abstract class PlayerList {
|
||||||
// Ensure that player inventory is populated with its viewer
|
// Ensure that player inventory is populated with its viewer
|
||||||
player.containerMenu.transferTo(player.containerMenu, bukkitPlayer);
|
player.containerMenu.transferTo(player.containerMenu, bukkitPlayer);
|
||||||
|
|
||||||
@ -3025,7 +3025,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -492,7 +491,7 @@ public abstract class PlayerList {
|
@@ -451,7 +450,7 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3034,7 +3034,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
ServerLevel worldserver = entityplayer.serverLevel();
|
ServerLevel worldserver = entityplayer.serverLevel();
|
||||||
|
|
||||||
entityplayer.awardStat(Stats.LEAVE_GAME);
|
entityplayer.awardStat(Stats.LEAVE_GAME);
|
||||||
@@ -503,7 +502,7 @@ public abstract class PlayerList {
|
@@ -462,7 +461,7 @@ public abstract class PlayerList {
|
||||||
entityplayer.closeContainer();
|
entityplayer.closeContainer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3043,7 +3043,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||||
|
|
||||||
@@ -556,7 +555,7 @@ public abstract class PlayerList {
|
@@ -523,7 +522,7 @@ public abstract class PlayerList {
|
||||||
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
|
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -3052,7 +3052,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
|
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
|
||||||
@@ -603,11 +602,11 @@ public abstract class PlayerList {
|
@@ -570,11 +569,11 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
// return chatmessage;
|
// return chatmessage;
|
||||||
@ -3067,7 +3067,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||||
|
|
||||||
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
|
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
|
||||||
@@ -616,17 +615,17 @@ public abstract class PlayerList {
|
@@ -583,17 +582,17 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
// return chatmessage;
|
// return chatmessage;
|
||||||
@ -3088,7 +3088,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
@@ -1122,7 +1121,7 @@ public abstract class PlayerList {
|
@@ -1091,7 +1090,7 @@ public abstract class PlayerList {
|
||||||
public void removeAll() {
|
public void removeAll() {
|
||||||
// CraftBukkit start - disconnect safely
|
// CraftBukkit start - disconnect safely
|
||||||
for (ServerPlayer player : this.players) {
|
for (ServerPlayer player : this.players) {
|
||||||
@ -3097,7 +3097,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -1163,24 +1162,43 @@ public abstract class PlayerList {
|
@@ -1132,24 +1131,43 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void broadcastChatMessage(PlayerChatMessage message, ServerPlayer sender, ChatType.Bound params) {
|
public void broadcastChatMessage(PlayerChatMessage message, ServerPlayer sender, ChatType.Bound params) {
|
||||||
@ -3144,7 +3144,7 @@ index 6abe921099ff00ecfaf0f423ef27d708420f6f48..e9109526880159e2341cc97b53939ba2
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (flag1 && sender != null) {
|
if (flag1 && sender != null) {
|
||||||
@@ -1189,7 +1207,7 @@ public abstract class PlayerList {
|
@@ -1158,7 +1176,7 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3242,7 +3242,7 @@ index ed54c81a3269360acce674aa4e1d54ccb2461841..c9c849534c3998cfcab7ddcb12a71ccb
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index 142d762750b9745428ae27802f7a428147a74771..d0c946b0383dbd8242a554a92bc70dcc2f5cccc6 100644
|
index b0e45e28d17780b760a81ccbff61581274e033df..1ebaedc9617e5b79458fa119887fd72cb1f39852 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -183,7 +183,15 @@ public final class ItemStack implements DataComponentHolder {
|
@@ -183,7 +183,15 @@ public final class ItemStack implements DataComponentHolder {
|
||||||
@ -3262,10 +3262,10 @@ index 142d762750b9745428ae27802f7a428147a74771..d0c946b0383dbd8242a554a92bc70dcc
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
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
|
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 8ec376f453ac1f4c9423483f5ae1625b295858c7..e535fb3b5194b8412c0c26c0799340916c7542eb 100644
|
index 657b5bab0d9e513e52b511e8a1b8fac5799f2281..cdaa050f237c6d6d5a0df0faf23daf3775249451 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||||
@@ -210,22 +210,22 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
@@ -210,22 +210,22 @@ public class SignBlockEntity extends BlockEntity {
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Player player = ((ServerPlayer) entityhuman).getBukkitEntity();
|
Player player = ((ServerPlayer) entityhuman).getBukkitEntity();
|
||||||
@ -3294,10 +3294,10 @@ index 8ec376f453ac1f4c9423483f5ae1625b295858c7..e535fb3b5194b8412c0c26c079934091
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
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
|
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 6acee03278c8005a06d9cd2577761f2f5355a7ec..5e469bd4d9ca428abdd9d758993164635dc86f27 100644
|
index 2decbf562161fa51b931fcb208a3503d7663bb2e..c21ae4975206398e7d20b37a749b830b9219c746 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||||
@@ -45,6 +45,7 @@ import net.minecraft.world.level.saveddata.SavedData;
|
@@ -48,6 +48,7 @@ import net.minecraft.world.level.saveddata.SavedData;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -3305,7 +3305,7 @@ index 6acee03278c8005a06d9cd2577761f2f5355a7ec..5e469bd4d9ca428abdd9d75899316463
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
@@ -615,7 +616,7 @@ public class MapItemSavedData extends SavedData {
|
@@ -650,7 +651,7 @@ public class MapItemSavedData extends SavedData {
|
||||||
|
|
||||||
for (org.bukkit.map.MapCursor cursor : render.cursors) {
|
for (org.bukkit.map.MapCursor cursor : render.cursors) {
|
||||||
if (cursor.isVisible()) {
|
if (cursor.isVisible()) {
|
||||||
@ -3327,10 +3327,10 @@ index 49c037e961c5ca5ba8d6a870cb32ffe8719adc91..2772c19f58a35713d61aab24f6f0d6f5
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9ebd6096f46 100644
|
index eb61712ea067b277e7f32f887e3528faca275450..16a9142bdbbfbbbb69d1486bd119dc610094484b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -645,8 +645,10 @@ public final class CraftServer implements Server {
|
@@ -648,8 +648,10 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -3341,7 +3341,7 @@ index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9eb
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1623,7 +1625,15 @@ public final class CraftServer implements Server {
|
@@ -1627,7 +1629,15 @@ public final class CraftServer implements Server {
|
||||||
return this.configuration.getInt("settings.spawn-radius", -1);
|
return this.configuration.getInt("settings.spawn-radius", -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3357,7 +3357,7 @@ index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9eb
|
|||||||
public String getShutdownMessage() {
|
public String getShutdownMessage() {
|
||||||
return this.configuration.getString("settings.shutdown-message");
|
return this.configuration.getString("settings.shutdown-message");
|
||||||
}
|
}
|
||||||
@@ -1797,7 +1807,20 @@ public final class CraftServer implements Server {
|
@@ -1801,7 +1811,20 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -3378,7 +3378,7 @@ index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9eb
|
|||||||
Set<CommandSender> recipients = new HashSet<>();
|
Set<CommandSender> recipients = new HashSet<>();
|
||||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||||
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
||||||
@@ -1805,14 +1828,14 @@ public final class CraftServer implements Server {
|
@@ -1809,14 +1832,14 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3395,7 +3395,7 @@ index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9eb
|
|||||||
|
|
||||||
for (CommandSender recipient : recipients) {
|
for (CommandSender recipient : recipients) {
|
||||||
recipient.sendMessage(message);
|
recipient.sendMessage(message);
|
||||||
@@ -2074,6 +2097,14 @@ public final class CraftServer implements Server {
|
@@ -2078,6 +2101,14 @@ public final class CraftServer implements Server {
|
||||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3410,7 +3410,7 @@ index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9eb
|
|||||||
@Override
|
@Override
|
||||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||||
Preconditions.checkArgument(type != null, "InventoryType cannot be null");
|
Preconditions.checkArgument(type != null, "InventoryType cannot be null");
|
||||||
@@ -2088,13 +2119,28 @@ public final class CraftServer implements Server {
|
@@ -2092,13 +2123,28 @@ public final class CraftServer implements Server {
|
||||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3439,7 +3439,7 @@ index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9eb
|
|||||||
public Merchant createMerchant(String title) {
|
public Merchant createMerchant(String title) {
|
||||||
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
||||||
}
|
}
|
||||||
@@ -2159,6 +2205,17 @@ public final class CraftServer implements Server {
|
@@ -2163,6 +2209,17 @@ public final class CraftServer implements Server {
|
||||||
return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3457,7 +3457,7 @@ index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9eb
|
|||||||
@Override
|
@Override
|
||||||
public String getMotd() {
|
public String getMotd() {
|
||||||
return this.console.getMotd();
|
return this.console.getMotd();
|
||||||
@@ -2605,4 +2662,57 @@ public final class CraftServer implements Server {
|
@@ -2622,4 +2679,57 @@ public final class CraftServer implements Server {
|
||||||
public double[] getTPS() {
|
public double[] getTPS() {
|
||||||
return new double[]{0, 0, 0}; // TODO
|
return new double[]{0, 0, 0}; // TODO
|
||||||
}
|
}
|
||||||
@ -3554,10 +3554,10 @@ index cbdb1a56a97150c164515a4ce6d3ba06428bf321..b214e7b302abbfe1641485a05f1371ac
|
|||||||
public URI getUrl() {
|
public URI getUrl() {
|
||||||
return this.handle.link();
|
return this.handle.link();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index ac6d4c8ac26696a0c6dfa471eee764b871dd2029..85c99c3b23df1c4fd8721e7676d8e6b82f9e6abf 100644
|
index 456c58877490feab6be3577d34c89ea776568617..274c9cc32d7f65456d184db7f61bc4b159f890f8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -162,6 +162,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -166,6 +166,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this);
|
private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this);
|
||||||
private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>();
|
private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>();
|
||||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
|
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
|
||||||
@ -3565,7 +3565,7 @@ index ac6d4c8ac26696a0c6dfa471eee764b871dd2029..85c99c3b23df1c4fd8721e7676d8e6b8
|
|||||||
|
|
||||||
private static final Random rand = new Random();
|
private static final Random rand = new Random();
|
||||||
|
|
||||||
@@ -1709,6 +1710,42 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -1705,6 +1706,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
entityTracker.broadcastAndSend(packet);
|
entityTracker.broadcastAndSend(packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3578,7 +3578,13 @@ index ac6d4c8ac26696a0c6dfa471eee764b871dd2029..85c99c3b23df1c4fd8721e7676d8e6b8
|
|||||||
+ player.connection.send(io.papermc.paper.adventure.PaperAdventure.asSoundPacket(sound, player.getX(), player.getY(), player.getZ(), seed, null));
|
+ player.connection.send(io.papermc.paper.adventure.PaperAdventure.asSoundPacket(sound, player.getX(), player.getY(), player.getZ(), seed, null));
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
|
@Override
|
||||||
|
public void playSound(Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
|
||||||
|
@@ -1717,6 +1727,33 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void playSound(final net.kyori.adventure.sound.Sound sound, final double x, final double y, final double z) {
|
+ public void playSound(final net.kyori.adventure.sound.Sound sound, final double x, final double y, final double z) {
|
||||||
+ org.spigotmc.AsyncCatcher.catchOp("play sound"); // Paper
|
+ org.spigotmc.AsyncCatcher.catchOp("play sound"); // Paper
|
||||||
@ -3604,11 +3610,12 @@ index ac6d4c8ac26696a0c6dfa471eee764b871dd2029..85c99c3b23df1c4fd8721e7676d8e6b8
|
|||||||
+ private java.util.function.BiConsumer<net.minecraft.network.protocol.Packet<?>, Float> playSound0(final double x, final double y, final double z) {
|
+ private java.util.function.BiConsumer<net.minecraft.network.protocol.Packet<?>, Float> playSound0(final double x, final double y, final double z) {
|
||||||
+ return (packet, distance) -> this.world.getServer().getPlayerList().broadcast(null, x, y, z, distance, this.world.dimension(), packet);
|
+ return (packet, distance) -> this.world.getServer().getPlayerList().broadcast(null, x, y, z, distance, this.world.dimension(), packet);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end - Adventure
|
||||||
|
+
|
||||||
private static Map<String, GameRules.Key<?>> gamerules;
|
private Map<String, GameRules.Key<?>> gamerules;
|
||||||
public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
|
public synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
|
||||||
@@ -2150,5 +2187,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
if (this.gamerules != null) {
|
||||||
|
@@ -2160,5 +2197,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
public void setSendViewDistance(final int viewDistance) {
|
public void setSendViewDistance(final int viewDistance) {
|
||||||
throw new UnsupportedOperationException("Not implemented yet");
|
throw new UnsupportedOperationException("Not implemented yet");
|
||||||
}
|
}
|
||||||
@ -3628,7 +3635,7 @@ index ac6d4c8ac26696a0c6dfa471eee764b871dd2029..85c99c3b23df1c4fd8721e7676d8e6b8
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 13c37384defda4475de584f33d1860a2d53ce05e..3b0370256b4d8c96053b340a657c6bcc6be6c9de 100644
|
index 94004204b6cdbbbf35263faae56e3e06cb6b650c..2e33acc428dbfd3e123dfd6ef90bc020b8a08daf 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -20,6 +20,12 @@ public class Main {
|
@@ -20,6 +20,12 @@ public class Main {
|
||||||
@ -3645,10 +3652,10 @@ index 13c37384defda4475de584f33d1860a2d53ce05e..3b0370256b4d8c96053b340a657c6bcc
|
|||||||
OptionParser parser = new OptionParser() {
|
OptionParser parser = new OptionParser() {
|
||||||
{
|
{
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||||
index 9ef8b0327e377817faaf58b82a8fdfa5e801eac8..2dfbe061a064b0c79b96f644a1c3639bb900eca4 100644
|
index 0949f9e6bcb66da94c30439ce4ed4c8415537526..8021ac39cb9c1ff45123d51e6f13b840d1290bb2 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||||
@@ -72,6 +72,19 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
|
@@ -81,6 +81,19 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
|
||||||
this.getSnapshot().secondaryPower = (effect != null) ? CraftPotionEffectType.bukkitToMinecraftHolder(effect) : null;
|
this.getSnapshot().secondaryPower = (effect != null) ? CraftPotionEffectType.bukkitToMinecraftHolder(effect) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3690,11 +3697,11 @@ index f9b89a7c6ac9f7fdbd29567a5b6550398dbc7345..f5b0bec4c1164fe7ef6da1f19a6ce9bb
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
|
||||||
index 007b6d66dd837ca6352c0fba5c2399139f6b5425..513402b61e6b8388b7bc163d98e54ffae0e18254 100644
|
index 32f3c1f1903baf26c69b1262ff2956d7dcb84a90..76888df4b47ee0d134bca4a3aecddbb1bf4c09b0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
|
||||||
@@ -32,6 +32,19 @@ public abstract class CraftContainer<T extends BaseContainerBlockEntity> extends
|
@@ -57,6 +57,19 @@ public abstract class CraftContainer<T extends BaseContainerBlockEntity> extends
|
||||||
this.getSnapshot().lockKey = (key == null) ? LockCode.NO_LOCK : new LockCode(key);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
@ -4033,10 +4040,10 @@ index 2d0c82ca240e371a756d71f28e2e04d1aa8e6ad2..f73017bff613bd62b86c974b29576e24
|
|||||||
@Override
|
@Override
|
||||||
public String getTranslationKey() {
|
public String getTranslationKey() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index d09102fe44dffa61dff883488f47715effaa8211..269326e7689eba91bcfd3475006e8cbf8f5694ef 100644
|
index 8b53a3c4f4285321b12ac0d51f94c04f39cc8ec8..978397e517a6fdb24c7d2b3f242545af07deeab0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -69,6 +69,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -70,6 +70,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
private final EntityType entityType;
|
private final EntityType entityType;
|
||||||
private EntityDamageEvent lastDamageEvent;
|
private EntityDamageEvent lastDamageEvent;
|
||||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
|
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
|
||||||
@ -4044,7 +4051,7 @@ index d09102fe44dffa61dff883488f47715effaa8211..269326e7689eba91bcfd3475006e8cbf
|
|||||||
|
|
||||||
public CraftEntity(final CraftServer server, final Entity entity) {
|
public CraftEntity(final CraftServer server, final Entity entity) {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
@@ -525,6 +526,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -526,6 +527,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
return this.getHandle().getVehicle().getBukkitEntity();
|
return this.getHandle().getVehicle().getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4077,7 +4084,7 @@ index d09102fe44dffa61dff883488f47715effaa8211..269326e7689eba91bcfd3475006e8cbf
|
|||||||
@Override
|
@Override
|
||||||
public void setCustomName(String name) {
|
public void setCustomName(String name) {
|
||||||
// sane limit for name length
|
// sane limit for name length
|
||||||
@@ -621,6 +648,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -622,6 +649,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return CraftChatMessage.fromComponent(this.getHandle().getName());
|
return CraftChatMessage.fromComponent(this.getHandle().getName());
|
||||||
}
|
}
|
||||||
@ -4096,10 +4103,10 @@ index d09102fe44dffa61dff883488f47715effaa8211..269326e7689eba91bcfd3475006e8cbf
|
|||||||
@Override
|
@Override
|
||||||
public boolean isPermissionSet(String name) {
|
public boolean isPermissionSet(String name) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
index f77f14d549479a5e6d4ef823c137954de746a5ce..a93895a6e656c25e819354ecf5c73ff4bae83675 100644
|
index 3091c174f7f8454035d015e96278e87284d5f399..bfa44c4e37618df3f745bccc6e775ce16c19490d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
@@ -329,9 +329,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@@ -330,9 +330,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||||
container = CraftEventFactory.callInventoryOpenEvent(player, container);
|
container = CraftEventFactory.callInventoryOpenEvent(player, container);
|
||||||
if (container == null) return;
|
if (container == null) return;
|
||||||
|
|
||||||
@ -4114,7 +4121,7 @@ index f77f14d549479a5e6d4ef823c137954de746a5ce..a93895a6e656c25e819354ecf5c73ff4
|
|||||||
player.containerMenu = container;
|
player.containerMenu = container;
|
||||||
player.initMenu(container);
|
player.initMenu(container);
|
||||||
}
|
}
|
||||||
@@ -401,8 +404,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@@ -402,8 +405,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||||
|
|
||||||
// Now open the window
|
// Now open the window
|
||||||
MenuType<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory());
|
MenuType<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory());
|
||||||
@ -4148,10 +4155,10 @@ index 55945b83a5426b352bad9507cc9e94afb1278032..9ea1537408ff2d790747b6e5a681d917
|
|||||||
public boolean isOp() {
|
public boolean isOp() {
|
||||||
return true;
|
return true;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca40d70f9d1 100644
|
index 1f013a6eb2088eccb3aea1a5ecd8aac8cc9597d9..c02ab554fe6e1b7eb01bbd1824a86ff4de1db2f0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -390,14 +390,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -391,14 +391,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
@ -4192,7 +4199,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
@Override
|
@Override
|
||||||
public String getPlayerListName() {
|
public String getPlayerListName() {
|
||||||
return this.getHandle().listName == null ? this.getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
|
return this.getHandle().listName == null ? this.getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
|
||||||
@@ -409,6 +435,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -410,6 +436,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
name = this.getName();
|
name = this.getName();
|
||||||
}
|
}
|
||||||
this.getHandle().listName = name.equals(this.getName()) ? null : CraftChatMessage.fromStringOrNull(name);
|
this.getHandle().listName = name.equals(this.getName()) ? null : CraftChatMessage.fromStringOrNull(name);
|
||||||
@ -4200,8 +4207,8 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
for (ServerPlayer player : (List<ServerPlayer>) this.server.getHandle().players) {
|
for (ServerPlayer player : (List<ServerPlayer>) this.server.getHandle().players) {
|
||||||
if (player.getBukkitEntity().canSee(this)) {
|
if (player.getBukkitEntity().canSee(this)) {
|
||||||
player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle()));
|
player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle()));
|
||||||
@@ -416,42 +443,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -429,42 +456,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
this.getHandle().listOrder = order;
|
||||||
}
|
}
|
||||||
|
|
||||||
- private Component playerListHeader;
|
- private Component playerListHeader;
|
||||||
@ -4252,7 +4259,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
this.getHandle().connection.send(packet);
|
this.getHandle().connection.send(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,6 +508,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -494,6 +521,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
this.getHandle().transferCookieConnection.kickPlayer(CraftChatMessage.fromStringOrEmpty(message, true));
|
this.getHandle().transferCookieConnection.kickPlayer(CraftChatMessage.fromStringOrEmpty(message, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4276,7 +4283,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
@Override
|
@Override
|
||||||
public void setCompassTarget(Location loc) {
|
public void setCompassTarget(Location loc) {
|
||||||
Preconditions.checkArgument(loc != null, "Location cannot be null");
|
Preconditions.checkArgument(loc != null, "Location cannot be null");
|
||||||
@@ -777,6 +821,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -790,6 +834,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
this.getHandle().connection.send(packet);
|
this.getHandle().connection.send(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4301,7 +4308,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
@Override
|
@Override
|
||||||
public void sendSignChange(Location loc, String[] lines) {
|
public void sendSignChange(Location loc, String[] lines) {
|
||||||
this.sendSignChange(loc, lines, DyeColor.BLACK);
|
this.sendSignChange(loc, lines, DyeColor.BLACK);
|
||||||
@@ -800,6 +862,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -813,6 +875,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
if (this.getHandle().connection == null) return;
|
if (this.getHandle().connection == null) return;
|
||||||
|
|
||||||
Component[] components = CraftSign.sanitizeLines(lines);
|
Component[] components = CraftSign.sanitizeLines(lines);
|
||||||
@ -4314,7 +4321,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
|
SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
|
||||||
SignText text = sign.getFrontText();
|
SignText text = sign.getFrontText();
|
||||||
text = text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
|
text = text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
|
||||||
@@ -1816,7 +1884,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1829,7 +1897,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setResourcePack(String url) {
|
public void setResourcePack(String url) {
|
||||||
@ -4323,7 +4330,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1831,7 +1899,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1844,7 +1912,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setResourcePack(String url, byte[] hash, boolean force) {
|
public void setResourcePack(String url, byte[] hash, boolean force) {
|
||||||
@ -4332,7 +4339,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1868,6 +1936,59 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1881,6 +1949,59 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
this.handlePushResourcePack(new ClientboundResourcePackPushPacket(id, url, hashStr, force, CraftChatMessage.fromStringOrOptional(prompt, true)), false);
|
this.handlePushResourcePack(new ClientboundResourcePackPushPacket(id, url, hashStr, force, CraftChatMessage.fromStringOrOptional(prompt, true)), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4392,7 +4399,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
@Override
|
@Override
|
||||||
public void removeResourcePack(UUID id) {
|
public void removeResourcePack(UUID id) {
|
||||||
Preconditions.checkArgument(id != null, "Resource pack id cannot be null");
|
Preconditions.checkArgument(id != null, "Resource pack id cannot be null");
|
||||||
@@ -2288,6 +2409,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2301,6 +2422,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return (this.getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : this.getHandle().requestedViewDistance();
|
return (this.getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : this.getHandle().requestedViewDistance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4405,7 +4412,7 @@ index 9cd22b09b295ecd95d17d1dd5edb96f916eb6c09..69b8d0f73ced69cd88029a5d7e11aca4
|
|||||||
@Override
|
@Override
|
||||||
public int getPing() {
|
public int getPing() {
|
||||||
return this.getHandle().connection.latency();
|
return this.getHandle().connection.latency();
|
||||||
@@ -2338,6 +2465,248 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2351,6 +2478,248 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return this.getHandle().allowsListing();
|
return this.getHandle().allowsListing();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4677,10 +4684,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364
|
|||||||
@Override
|
@Override
|
||||||
public int getLineWidth() {
|
public int getLineWidth() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 7719afbb1af4091f688a75c92ee8cae8669974ff..34636f7a05d868c4df86316a65c4e008f54db634 100644
|
index b5034787283b5a0403c11281895563372fccb5d2..8ea4d63833cd1500d7f413f761aa9a7cf26520c0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -917,7 +917,7 @@ public class CraftEventFactory {
|
@@ -915,7 +915,7 @@ public class CraftEventFactory {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4688,8 +4695,8 @@ index 7719afbb1af4091f688a75c92ee8cae8669974ff..34636f7a05d868c4df86316a65c4e008
|
|||||||
+ public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure
|
+ public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure
|
||||||
CraftPlayer entity = victim.getBukkitEntity();
|
CraftPlayer entity = victim.getBukkitEntity();
|
||||||
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
||||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
|
PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(victim.serverLevel(), damageSource.getEntity()), 0, deathMessage);
|
||||||
@@ -950,7 +950,7 @@ public class CraftEventFactory {
|
@@ -948,7 +948,7 @@ public class CraftEventFactory {
|
||||||
* Server methods
|
* Server methods
|
||||||
*/
|
*/
|
||||||
public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) {
|
public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) {
|
||||||
@ -4821,11 +4828,11 @@ index d89b178dc82c7e2ad6d586217c5a039688563e29..d674289b07748022b94cc6a7e6c6eb45
|
|||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return this.title;
|
return this.title;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
index 500bfe5dd745327f953a314e863f7318953bf3bc..e2daeeba1bacbb5c5ca2aa922fa67b02cd050755 100644
|
index 6e111222e251e2f7959390e9fa0c31a163207c14..5d7e6b61102a6244c5426917c4ff280fa9e12cf1 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
@@ -206,4 +206,21 @@ public final class CraftItemFactory implements ItemFactory {
|
@@ -209,4 +209,21 @@ public final class CraftItemFactory implements ItemFactory {
|
||||||
Optional<HolderSet.Named<Enchantment>> optional = (allowTreasures) ? Optional.empty() : registry.registryOrThrow(Registries.ENCHANTMENT).getTag(EnchantmentTags.IN_ENCHANTING_TABLE);
|
Optional<HolderSet.Named<Enchantment>> optional = (allowTreasures) ? Optional.empty() : registry.lookupOrThrow(Registries.ENCHANTMENT).get(EnchantmentTags.IN_ENCHANTING_TABLE);
|
||||||
return CraftItemStack.asCraftMirror(EnchantmentHelper.enchantItem(source, craft.handle, level, registry, optional));
|
return CraftItemStack.asCraftMirror(EnchantmentHelper.enchantItem(source, craft.handle, level, registry, optional));
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
@ -5191,11 +5198,11 @@ index c71a4971f127fdfc753306019313ce1a31201120..fd3b12477c30d1eabdbe57ea77902793
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index 8bba749bce211814f51af8a33f2ed60ba7a8b52d..0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4 100644
|
index bc68a45af66699f013851869646a2c11d5a871ee..626fe2af05fecd41b777b5dd5decbedb2f17b43a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -961,6 +961,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1097,6 +1097,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
|
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasEnchantable() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.hasTooltipStyle() || this.hasItemModel() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isGlider() || this.hasDamageResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasUseRemainder() || this.hasUseCooldown() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasEquippable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
@ -5213,7 +5220,7 @@ index 8bba749bce211814f51af8a33f2ed60ba7a8b52d..0c73854243f7fa21d1ffdb3b4c85ee0a
|
|||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return CraftChatMessage.fromComponent(this.displayName);
|
return CraftChatMessage.fromComponent(this.displayName);
|
||||||
@@ -991,6 +1003,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1127,6 +1139,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return this.itemName != null;
|
return this.itemName != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5232,7 +5239,7 @@ index 8bba749bce211814f51af8a33f2ed60ba7a8b52d..0c73854243f7fa21d1ffdb3b4c85ee0a
|
|||||||
@Override
|
@Override
|
||||||
public String getLocalizedName() {
|
public String getLocalizedName() {
|
||||||
return this.getDisplayName();
|
return this.getDisplayName();
|
||||||
@@ -1010,6 +1034,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1146,6 +1170,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return this.lore != null && !this.lore.isEmpty();
|
return this.lore != null && !this.lore.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5252,7 +5259,7 @@ index 8bba749bce211814f51af8a33f2ed60ba7a8b52d..0c73854243f7fa21d1ffdb3b4c85ee0a
|
|||||||
public boolean hasRepairCost() {
|
public boolean hasRepairCost() {
|
||||||
return this.repairCost > 0;
|
return this.repairCost > 0;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
|
||||||
index 8952e5526cfe90ad16a7af28b0a8d9c65b159f90..cd3e35867075e65f46051fb88d8a2460a8bb4b53 100644
|
index 38fb47bbfcec739be795b46cfb7c2c41a8379fea..caf7e4312e95e90dd0822355c8832006e69a2700 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
|
||||||
@@ -60,6 +60,14 @@ public class CraftTrimMaterial implements TrimMaterial, Handleable<net.minecraft
|
@@ -60,6 +60,14 @@ public class CraftTrimMaterial implements TrimMaterial, Handleable<net.minecraft
|
||||||
@ -5271,7 +5278,7 @@ index 8952e5526cfe90ad16a7af28b0a8d9c65b159f90..cd3e35867075e65f46051fb88d8a2460
|
|||||||
+ // Paper end - adventure
|
+ // Paper end - adventure
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
|
||||||
index 0a6df5fdaf6724bb1cf777d527f032e2ae74fbbd..364f8d7a7106259401154d91b1b79869d014a469 100644
|
index 3bc9e6fae141f7b6f0c8742f9df5b29f64934628..f91577c9239c8d5ed4b72b23dde9c053b4beae0b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
|
||||||
@@ -60,6 +60,14 @@ public class CraftTrimPattern implements TrimPattern, Handleable<net.minecraft.w
|
@@ -60,6 +60,14 @@ public class CraftTrimPattern implements TrimPattern, Handleable<net.minecraft.w
|
||||||
@ -5624,7 +5631,7 @@ index ff040613083c015d9c52c0995591b64305fd5018..95444fd9fecc5bda5462ca8dfeca82c5
|
|||||||
|
|
||||||
boolean hadFormat = false;
|
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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 60dc550431fa4641f8c6d964329b0e2698d1fdd6..655ceaa92b9979fe29725f9812507731bb0bb484 100644
|
index 2392aa50aec6468f2f498e0a806f65013ce963d1..e04586249625dc8d77ad5eecd06b8b88fa288503 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -79,6 +79,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -79,6 +79,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -25,7 +25,7 @@ Other changes:
|
|||||||
Co-Authored-By: Emilia Kond <emilia@rymiel.space>
|
Co-Authored-By: Emilia Kond <emilia@rymiel.space>
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index c4572c0a6d9695088613d158838f236fe64efb48..83daf789efc4ce90ff54420e040b783569eb5cab 100644
|
index da6b4787fa787e098e4031790e955ce616593ee9..02a3dd42d82df410b6a6d22c0350fa3e44ccf70f 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -5,9 +5,29 @@ plugins {
|
@@ -5,9 +5,29 @@ plugins {
|
||||||
@ -260,10 +260,10 @@ index 8323f135d6bf2e1f12525e05094ffa3f2420e7e1..a143ea1e58464a3122fbd8ccafe417bd
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 387552877ac82baa3af0da723dbb7c331fad6cf4..b334cfc9b98d96f9bfba1d5b14c03c336d30ff23 100644
|
index 775f68ce2b402d86a83ab2307f38963ade731ef0..11832f0d93ae86cb3d54bd82f9377b915b4365d3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -154,7 +154,7 @@ import com.mojang.serialization.Dynamic;
|
@@ -161,7 +161,7 @@ import com.mojang.serialization.Dynamic;
|
||||||
import com.mojang.serialization.Lifecycle;
|
import com.mojang.serialization.Lifecycle;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@ -272,7 +272,7 @@ index 387552877ac82baa3af0da723dbb7c331fad6cf4..b334cfc9b98d96f9bfba1d5b14c03c33
|
|||||||
import joptsimple.OptionSet;
|
import joptsimple.OptionSet;
|
||||||
import net.minecraft.nbt.NbtException;
|
import net.minecraft.nbt.NbtException;
|
||||||
import net.minecraft.nbt.ReportedNbtException;
|
import net.minecraft.nbt.ReportedNbtException;
|
||||||
@@ -296,7 +296,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -307,7 +307,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public org.bukkit.craftbukkit.CraftServer server;
|
public org.bukkit.craftbukkit.CraftServer server;
|
||||||
public OptionSet options;
|
public OptionSet options;
|
||||||
public org.bukkit.command.ConsoleCommandSender console;
|
public org.bukkit.command.ConsoleCommandSender console;
|
||||||
@ -280,7 +280,7 @@ index 387552877ac82baa3af0da723dbb7c331fad6cf4..b334cfc9b98d96f9bfba1d5b14c03c33
|
|||||||
public static int currentTick = (int) (System.currentTimeMillis() / 50);
|
public static int currentTick = (int) (System.currentTimeMillis() / 50);
|
||||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||||
public int autosavePeriod;
|
public int autosavePeriod;
|
||||||
@@ -383,7 +382,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -397,7 +396,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.worldLoader = worldLoader;
|
this.worldLoader = worldLoader;
|
||||||
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
|
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
|
||||||
@ -290,7 +290,7 @@ index 387552877ac82baa3af0da723dbb7c331fad6cf4..b334cfc9b98d96f9bfba1d5b14c03c33
|
|||||||
if (System.console() == null && System.getProperty("jline.terminal") == null) {
|
if (System.console() == null && System.getProperty("jline.terminal") == null) {
|
||||||
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
|
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
|
||||||
Main.useJline = false;
|
Main.useJline = false;
|
||||||
@@ -404,6 +405,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -418,6 +419,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
MinecraftServer.LOGGER.warn((String) null, ex);
|
MinecraftServer.LOGGER.warn((String) null, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -299,7 +299,7 @@ index 387552877ac82baa3af0da723dbb7c331fad6cf4..b334cfc9b98d96f9bfba1d5b14c03c33
|
|||||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
|
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
|
||||||
@@ -1118,7 +1121,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1158,7 +1161,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
||||||
// CraftBukkit start - Restore terminal to original settings
|
// CraftBukkit start - Restore terminal to original settings
|
||||||
try {
|
try {
|
||||||
@ -308,7 +308,7 @@ index 387552877ac82baa3af0da723dbb7c331fad6cf4..b334cfc9b98d96f9bfba1d5b14c03c33
|
|||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@@ -1656,7 +1659,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1743,7 +1746,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendSystemMessage(Component message) {
|
public void sendSystemMessage(Component message) {
|
||||||
@ -318,10 +318,10 @@ index 387552877ac82baa3af0da723dbb7c331fad6cf4..b334cfc9b98d96f9bfba1d5b14c03c33
|
|||||||
|
|
||||||
public KeyPair getKeyPair() {
|
public KeyPair getKeyPair() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index cd26616aba6abd44abc5eb8b01cc96f29248aecd..b41eb920b5665b7a1b7cd9f38955c31eeb350847 100644
|
index ca095f9d6c985b066a393debc6529973a3616397..dcb9258d3fbdfdfd41065d4c0919ed4300eac3ae 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -112,6 +112,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -111,6 +111,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
if (!org.bukkit.craftbukkit.Main.useConsole) {
|
if (!org.bukkit.craftbukkit.Main.useConsole) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ index cd26616aba6abd44abc5eb8b01cc96f29248aecd..b41eb920b5665b7a1b7cd9f38955c31e
|
|||||||
jline.console.ConsoleReader bufferedreader = DedicatedServer.this.reader;
|
jline.console.ConsoleReader bufferedreader = DedicatedServer.this.reader;
|
||||||
|
|
||||||
// MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
|
// MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
|
||||||
@@ -143,7 +146,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -142,7 +145,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (s.trim().length() > 0) { // Trim to filter lines which are just spaces
|
if (s.trim().length() > 0) { // Trim to filter lines which are just spaces
|
||||||
@ -340,7 +340,7 @@ index cd26616aba6abd44abc5eb8b01cc96f29248aecd..b41eb920b5665b7a1b7cd9f38955c31e
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
@@ -151,6 +154,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -150,6 +153,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
|
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ index cd26616aba6abd44abc5eb8b01cc96f29248aecd..b41eb920b5665b7a1b7cd9f38955c31e
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -162,6 +167,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -161,6 +166,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
|
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
|
||||||
|
|
||||||
@ -359,7 +359,7 @@ index cd26616aba6abd44abc5eb8b01cc96f29248aecd..b41eb920b5665b7a1b7cd9f38955c31e
|
|||||||
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
|
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
|
||||||
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
|
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
|
||||||
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
|
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
|
||||||
@@ -172,6 +180,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -171,6 +179,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
TerminalConsoleWriterThread writerThread = new TerminalConsoleWriterThread(System.out, this.reader);
|
TerminalConsoleWriterThread writerThread = new TerminalConsoleWriterThread(System.out, this.reader);
|
||||||
this.reader.setCompletionHandler(new TerminalCompletionHandler(writerThread, this.reader.getCompletionHandler()));
|
this.reader.setCompletionHandler(new TerminalCompletionHandler(writerThread, this.reader.getCompletionHandler()));
|
||||||
writerThread.start();
|
writerThread.start();
|
||||||
@ -382,10 +382,10 @@ index 3d92c61f7781221cfdc0324d11bd0088954e4a68..84a2c6c397604279ba821286f5c3c855
|
|||||||
if (!SwingUtilities.isEventDispatchThread()) {
|
if (!SwingUtilities.isEventDispatchThread()) {
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() -> {
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index e9109526880159e2341cc97b53939ba2bcfaeaf9..9dcfcea63f57f45a5584bb80c34fe445d65849e8 100644
|
index a70e0ecedc7b70031334bc7fee981bd790ce26a4..56f046bac04205a813441907058c4ce21982d927 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -161,8 +161,7 @@ public abstract class PlayerList {
|
@@ -162,8 +162,7 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||||
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
||||||
@ -396,7 +396,7 @@ index e9109526880159e2341cc97b53939ba2bcfaeaf9..9dcfcea63f57f45a5584bb80c34fe445
|
|||||||
|
|
||||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 9f7634053ddfc4fc67f89cc99524e9ebd6096f46..752933ceabd7ebe7b1e9f7d41198128f6f2182a6 100644
|
index 16a9142bdbbfbbbb69d1486bd119dc610094484b..2affb23b83e4368a94345b36410f23139f5d36c8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -43,7 +43,7 @@ import java.util.logging.Level;
|
@@ -43,7 +43,7 @@ import java.util.logging.Level;
|
||||||
@ -408,7 +408,7 @@ index 9f7634053ddfc4fc67f89cc99524e9ebd6096f46..752933ceabd7ebe7b1e9f7d41198128f
|
|||||||
import net.minecraft.advancements.AdvancementHolder;
|
import net.minecraft.advancements.AdvancementHolder;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
import net.minecraft.commands.Commands;
|
import net.minecraft.commands.Commands;
|
||||||
@@ -1356,9 +1356,13 @@ public final class CraftServer implements Server {
|
@@ -1359,9 +1359,13 @@ public final class CraftServer implements Server {
|
||||||
return this.logger;
|
return this.logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,7 +423,7 @@ index 9f7634053ddfc4fc67f89cc99524e9ebd6096f46..752933ceabd7ebe7b1e9f7d41198128f
|
|||||||
@Override
|
@Override
|
||||||
public PluginCommand getPluginCommand(String name) {
|
public PluginCommand getPluginCommand(String name) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 3b0370256b4d8c96053b340a657c6bcc6be6c9de..bdb8e882ec1efbe5afec9ec5a5df57bf38d4ba2b 100644
|
index 2e33acc428dbfd3e123dfd6ef90bc020b8a08daf..4a99cf5a146abe0d2b40ffc1189fdc5540f14d55 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
|
|||||||
the plugin logger.
|
the plugin logger.
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 0a05e753ff5e7b1d741c7719524715d7364cac4f..d82d1e90cbda544b3d20edcc13d1cb955c48f731 100644
|
index 02a3dd42d82df410b6a6d22c0350fa3e44ccf70f..a6fafa32af547efd912468ca3a5c76d8d193651d 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -23,7 +23,7 @@ dependencies {
|
@@ -23,7 +23,7 @@ dependencies {
|
@ -5,13 +5,13 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index d82d1e90cbda544b3d20edcc13d1cb955c48f731..3bd5c2a2add9b462523beb9dfaf2eb5a00d470b9 100644
|
index a6fafa32af547efd912468ca3a5c76d8d193651d..b36f2e9e9980f6d2596c57791e0769c6ce734d11 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -34,6 +34,7 @@ dependencies {
|
@@ -34,6 +34,7 @@ dependencies {
|
||||||
implementation("commons-lang:commons-lang:2.6")
|
implementation("commons-lang:commons-lang:2.6")
|
||||||
runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
|
runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3")
|
||||||
runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
|
runtimeOnly("com.mysql:mysql-connector-j:9.1.0")
|
||||||
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||||
|
|
||||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 7c81605648c6ba1360936faae25ef5fc11f0bcb4..4838ca75b9536ce5fd30906b51bdab86789668ec 100644
|
index b36f2e9e9980f6d2596c57791e0769c6ce734d11..c73ab51caa985089ade4df0616ee8d3333632980 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -46,6 +46,7 @@ dependencies {
|
@@ -46,6 +46,7 @@ dependencies {
|
||||||
@ -454,7 +454,7 @@ index 1938ae691dafec1fc1e5a68792d1191bd52b4e5c..268310642181a715815d3b2d1c0f090e
|
|||||||
this.exception = cause;
|
this.exception = cause;
|
||||||
this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
|
this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
|
||||||
diff --git a/src/main/java/net/minecraft/CrashReportCategory.java b/src/main/java/net/minecraft/CrashReportCategory.java
|
diff --git a/src/main/java/net/minecraft/CrashReportCategory.java b/src/main/java/net/minecraft/CrashReportCategory.java
|
||||||
index f367ba058018074bfe6e4fe88bcc875ea9794d9e..2176171954609fd88f97f93408e14e018c1d6eaa 100644
|
index 81831a061d7fbf513f4aa7880e3b18ef3fdc05d7..1e9873d7b258ce1f0b2437cb1e487157a16f6834 100644
|
||||||
--- a/src/main/java/net/minecraft/CrashReportCategory.java
|
--- a/src/main/java/net/minecraft/CrashReportCategory.java
|
||||||
+++ b/src/main/java/net/minecraft/CrashReportCategory.java
|
+++ b/src/main/java/net/minecraft/CrashReportCategory.java
|
||||||
@@ -110,6 +110,7 @@ public class CrashReportCategory {
|
@@ -110,6 +110,7 @@ public class CrashReportCategory {
|
||||||
@ -496,10 +496,10 @@ index 77985072928a1b892fb4f7dec1d0899324780082..f5e6610d271ef2c997fb3d1a5f65e0bf
|
|||||||
|
|
||||||
protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet<?> packet) {
|
protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet<?> packet) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index b41eb920b5665b7a1b7cd9f38955c31eeb350847..bb59986c211f7d6ea50b1ad4bd5565227bec8a6c 100644
|
index dcb9258d3fbdfdfd41065d4c0919ed4300eac3ae..a61a92078a8bb4979f231c02ef5aa990b8ab57ad 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -210,6 +210,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -209,6 +209,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings"));
|
org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings"));
|
||||||
org.spigotmc.SpigotConfig.registerCommands();
|
org.spigotmc.SpigotConfig.registerCommands();
|
||||||
// Spigot end
|
// Spigot end
|
@ -605,10 +605,10 @@ index 0000000000000000000000000000000000000000..ae60bd96b5284d54676d8e7e4dd5d170
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index bb59986c211f7d6ea50b1ad4bd5565227bec8a6c..9c950fc1de15b5039e34a9fdf893e97a8cc13237 100644
|
index a61a92078a8bb4979f231c02ef5aa990b8ab57ad..cd9e4bfdb3f335213001ced27540bb7efbc04130 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -215,6 +215,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -214,6 +214,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
||||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||||
// Paper end - initialize global and world-defaults configuration
|
// Paper end - initialize global and world-defaults configuration
|
||||||
@ -617,10 +617,10 @@ index bb59986c211f7d6ea50b1ad4bd5565227bec8a6c..9c950fc1de15b5039e34a9fdf893e97a
|
|||||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 752933ceabd7ebe7b1e9f7d41198128f6f2182a6..492af80bc4a252ad3b82aef0c46c3e6625ec9146 100644
|
index 2affb23b83e4368a94345b36410f23139f5d36c8..1b66c5173dd37433d895c0d804257141a3a8c588 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -988,6 +988,7 @@ public final class CraftServer implements Server {
|
@@ -991,6 +991,7 @@ public final class CraftServer implements Server {
|
||||||
this.commandMap.clearCommands();
|
this.commandMap.clearCommands();
|
||||||
this.reloadData();
|
this.reloadData();
|
||||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||||
@ -628,7 +628,7 @@ index 752933ceabd7ebe7b1e9f7d41198128f6f2182a6..492af80bc4a252ad3b82aef0c46c3e66
|
|||||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||||
|
|
||||||
@@ -2710,6 +2711,34 @@ public final class CraftServer implements Server {
|
@@ -2727,6 +2728,34 @@ public final class CraftServer implements Server {
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
@ -698,10 +698,10 @@ index 0000000000000000000000000000000000000000..6aaed8e8bf8c721fc834da5c76ac72a4
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 9c950fc1de15b5039e34a9fdf893e97a8cc13237..6ba90739c20995362a5275e2259cac9e17fbcf59 100644
|
index cd9e4bfdb3f335213001ced27540bb7efbc04130..3b403e9edf4e860160dd230977870f21a0e32a7a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -216,6 +216,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -215,6 +215,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||||
// Paper end - initialize global and world-defaults configuration
|
// Paper end - initialize global and world-defaults configuration
|
||||||
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
|
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
|
||||||
@ -710,7 +710,7 @@ index 9c950fc1de15b5039e34a9fdf893e97a8cc13237..6ba90739c20995362a5275e2259cac9e
|
|||||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index b717c9d8b6edc2cafc9281140913b7bdb6108cf0..ba621fdc82896245f6ce448e084847edc4d3fe08 100644
|
index 744edd40128c910c3ad2f3657bde995612e0a1e4..d9e73e37b54e2f6e13313977c76cb4212c240992 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
@@ -83,6 +83,7 @@ public class SpigotConfig
|
@@ -83,6 +83,7 @@ public class SpigotConfig
|
@ -7203,10 +7203,10 @@ index f7114d5b8f2f93f62883e24da29afaf9f74ee1a6..8bf0630c0e06950cd99b7ae9898137f7
|
|||||||
|
|
||||||
return foundFrame.orElse(null);
|
return foundFrame.orElse(null);
|
||||||
diff --git a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
diff --git a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||||
index 34b3b3251da21bce616870d312fd42fd58ba7881..cbc1658e0df4070605a6b2fbe99167b3bc001223 100644
|
index f66a2154486b6d3b5873da043e51df91cd396c72..3f72e30b57fb2a4231e22a2234729408c1240af4 100644
|
||||||
--- a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
--- a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||||
+++ b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
+++ b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||||
@@ -322,7 +322,13 @@ public class BuiltInRegistries {
|
@@ -330,7 +330,13 @@ public class BuiltInRegistries {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void bootStrap() {
|
public static void bootStrap() {
|
||||||
@ -7221,10 +7221,10 @@ index 34b3b3251da21bce616870d312fd42fd58ba7881..cbc1658e0df4070605a6b2fbe99167b3
|
|||||||
validate(REGISTRY);
|
validate(REGISTRY);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
|
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
index 394792291e3b89e5fd757907eecd85ccc71183e2..8f1992188f7fd9e735569e099b36a7eafed47aae 100644
|
index aa38282b0f5461fc623a69d9860523a678a6bcd6..9abd1dea58ffc612114d5fd8e8944d4aa8c68236 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Bootstrap.java
|
--- a/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
|
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
@@ -62,6 +62,7 @@ public class Bootstrap {
|
@@ -63,6 +63,7 @@ public class Bootstrap {
|
||||||
Bootstrap.isBootstrapped = true;
|
Bootstrap.isBootstrapped = true;
|
||||||
Instant instant = Instant.now();
|
Instant instant = Instant.now();
|
||||||
|
|
||||||
@ -7232,7 +7232,7 @@ index 394792291e3b89e5fd757907eecd85ccc71183e2..8f1992188f7fd9e735569e099b36a7ea
|
|||||||
if (BuiltInRegistries.REGISTRY.keySet().isEmpty()) {
|
if (BuiltInRegistries.REGISTRY.keySet().isEmpty()) {
|
||||||
throw new IllegalStateException("Unable to load registries");
|
throw new IllegalStateException("Unable to load registries");
|
||||||
} else {
|
} else {
|
||||||
@@ -73,7 +74,10 @@ public class Bootstrap {
|
@@ -74,7 +75,10 @@ public class Bootstrap {
|
||||||
EntitySelectorOptions.bootStrap();
|
EntitySelectorOptions.bootStrap();
|
||||||
DispenseItemBehavior.bootStrap();
|
DispenseItemBehavior.bootStrap();
|
||||||
CauldronInteraction.bootStrap();
|
CauldronInteraction.bootStrap();
|
||||||
@ -7245,7 +7245,7 @@ index 394792291e3b89e5fd757907eecd85ccc71183e2..8f1992188f7fd9e735569e099b36a7ea
|
|||||||
Bootstrap.wrapStreams();
|
Bootstrap.wrapStreams();
|
||||||
Bootstrap.bootstrapDuration.set(Duration.between(instant, Instant.now()).toMillis());
|
Bootstrap.bootstrapDuration.set(Duration.between(instant, Instant.now()).toMillis());
|
||||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||||
index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943597be9ff 100644
|
index 9bd6056bba6ba48bada7e9cd5883b0a171b0bbc4..7399358f18dc7869fbfe414186cf18414c1eaafc 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Main.java
|
--- a/src/main/java/net/minecraft/server/Main.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||||
@@ -119,6 +119,7 @@ public class Main {
|
@@ -119,6 +119,7 @@ public class Main {
|
||||||
@ -7257,10 +7257,10 @@ index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943
|
|||||||
Bootstrap.validate();
|
Bootstrap.validate();
|
||||||
Util.startTimerHackThread();
|
Util.startTimerHackThread();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 492af80bc4a252ad3b82aef0c46c3e6625ec9146..3d98004af5c872f8a183476183d1cc89a2aac4b6 100644
|
index 1b66c5173dd37433d895c0d804257141a3a8c588..e8c1ceed228a1dfb9f3c76b54a91d712c511ffb5 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -277,7 +277,8 @@ public final class CraftServer implements Server {
|
@@ -280,7 +280,8 @@ public final class CraftServer implements Server {
|
||||||
private final CraftCommandMap commandMap = new CraftCommandMap(this);
|
private final CraftCommandMap commandMap = new CraftCommandMap(this);
|
||||||
private final SimpleHelpMap helpMap = new SimpleHelpMap(this);
|
private final SimpleHelpMap helpMap = new SimpleHelpMap(this);
|
||||||
private final StandardMessenger messenger = new StandardMessenger();
|
private final StandardMessenger messenger = new StandardMessenger();
|
||||||
@ -7270,7 +7270,7 @@ index 492af80bc4a252ad3b82aef0c46c3e6625ec9146..3d98004af5c872f8a183476183d1cc89
|
|||||||
private final StructureManager structureManager;
|
private final StructureManager structureManager;
|
||||||
protected final DedicatedServer console;
|
protected final DedicatedServer console;
|
||||||
protected final DedicatedPlayerList playerList;
|
protected final DedicatedPlayerList playerList;
|
||||||
@@ -455,24 +456,7 @@ public final class CraftServer implements Server {
|
@@ -458,24 +459,7 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadPlugins() {
|
public void loadPlugins() {
|
||||||
@ -7296,7 +7296,7 @@ index 492af80bc4a252ad3b82aef0c46c3e6625ec9146..3d98004af5c872f8a183476183d1cc89
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void enablePlugins(PluginLoadOrder type) {
|
public void enablePlugins(PluginLoadOrder type) {
|
||||||
@@ -561,15 +545,17 @@ public final class CraftServer implements Server {
|
@@ -564,15 +548,17 @@ public final class CraftServer implements Server {
|
||||||
private void enablePlugin(Plugin plugin) {
|
private void enablePlugin(Plugin plugin) {
|
||||||
try {
|
try {
|
||||||
List<Permission> perms = plugin.getDescription().getPermissions();
|
List<Permission> perms = plugin.getDescription().getPermissions();
|
||||||
@ -7320,7 +7320,7 @@ index 492af80bc4a252ad3b82aef0c46c3e6625ec9146..3d98004af5c872f8a183476183d1cc89
|
|||||||
|
|
||||||
this.pluginManager.enablePlugin(plugin);
|
this.pluginManager.enablePlugin(plugin);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
@@ -1012,6 +998,7 @@ public final class CraftServer implements Server {
|
@@ -1015,6 +1001,7 @@ public final class CraftServer implements Server {
|
||||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -7329,12 +7329,12 @@ index 492af80bc4a252ad3b82aef0c46c3e6625ec9146..3d98004af5c872f8a183476183d1cc89
|
|||||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 655ceaa92b9979fe29725f9812507731bb0bb484..a339a0aa6fd7cc7be810e93bc9eb192437519c75 100644
|
index e04586249625dc8d77ad5eecd06b8b88fa288503..1aae364ee6c67b6c89a59ad6cab83bb921645453 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -401,6 +401,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -401,6 +401,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
||||||
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
|
return nmsItemStack.getItem().getDescriptionId();
|
||||||
}
|
}
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
@ -8154,7 +8154,7 @@ index 0000000000000000000000000000000000000000..ba271c35eb2804f94cfc893bf94affb9
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
index ba0a2ab9de34fa40dd90cecaeec4a5e54fe3e2d8..5d24b95e3eec351ec1e9444533dd5f9d376ec4c6 100644
|
index bdfa164ea21cba91b30b965d65d47112111a1209..2fed099bc91a8591a2415493b333f9c18bfe35f6 100644
|
||||||
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||||
@@ -87,7 +87,7 @@ public final class DummyServerHelper {
|
@@ -87,7 +87,7 @@ public final class DummyServerHelper {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Plugin remapping
|
|||||||
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 3c9a9d2c44a3b177408ddfb3cad1e09169bf148b..ccf6e24f016991ac5987b5872037bf44d17e698f 100644
|
index c73ab51caa985089ade4df0616ee8d3333632980..9086a65f5d593eea72a89d1153f6d353dfac1619 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -47,6 +47,7 @@ dependencies {
|
@@ -47,6 +47,7 @@ dependencies {
|
||||||
@ -1553,10 +1553,10 @@ index 0000000000000000000000000000000000000000..badff5d6ae6dd8d209c82bc7e8afe370
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index b334cfc9b98d96f9bfba1d5b14c03c336d30ff23..e880543e94189fea3ba62eb7fb05ff48bc425299 100644
|
index 11832f0d93ae86cb3d54bd82f9377b915b4365d3..3d1e9f24b83513c9f499471e7eefaf639f9097ec 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -642,6 +642,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -656,6 +656,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
|
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
|
||||||
@ -1564,7 +1564,7 @@ index b334cfc9b98d96f9bfba1d5b14c03c336d30ff23..e880543e94189fea3ba62eb7fb05ff48
|
|||||||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||||
this.connection.acceptConnections();
|
this.connection.acceptConnections();
|
||||||
}
|
}
|
||||||
@@ -915,6 +916,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -929,6 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.server.disablePlugins();
|
this.server.disablePlugins();
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -1573,10 +1573,10 @@ index b334cfc9b98d96f9bfba1d5b14c03c336d30ff23..e880543e94189fea3ba62eb7fb05ff48
|
|||||||
this.isSaving = true;
|
this.isSaving = true;
|
||||||
if (this.playerList != null) {
|
if (this.playerList != null) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 6ba90739c20995362a5275e2259cac9e17fbcf59..d38ecbc208c34509eaf77751ac45d9ef51a5dce8 100644
|
index 3b403e9edf4e860160dd230977870f21a0e32a7a..9d6be455c3bbcdbcb9d3d24b0bad79f46ba6a8cb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -319,6 +319,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -318,6 +318,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1587,8 +1587,8 @@ index 6ba90739c20995362a5275e2259cac9e17fbcf59..d38ecbc208c34509eaf77751ac45d9ef
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
public boolean isSpawningAnimals() {
|
public boolean isSpawningMonsters() {
|
||||||
return this.getProperties().spawnAnimals && super.isSpawningAnimals();
|
return this.settings.getProperties().spawnMonsters && super.isSpawningMonsters();
|
||||||
diff --git a/src/main/java/net/neoforged/art/internal/RenamerImpl.java b/src/main/java/net/neoforged/art/internal/RenamerImpl.java
|
diff --git a/src/main/java/net/neoforged/art/internal/RenamerImpl.java b/src/main/java/net/neoforged/art/internal/RenamerImpl.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a098513afafc1
|
index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a098513afafc1
|
||||||
@ -1904,10 +1904,10 @@ index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a0985
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 3d98004af5c872f8a183476183d1cc89a2aac4b6..cd6b6109ea3844f7d78ad7a1cbd6cf5dc3d90b5c 100644
|
index e8c1ceed228a1dfb9f3c76b54a91d712c511ffb5..9bf8c4d9154c433e586f59587e8d7db7c310bb9c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1002,6 +1002,7 @@ public final class CraftServer implements Server {
|
@@ -1005,6 +1005,7 @@ public final class CraftServer implements Server {
|
||||||
this.loadPlugins();
|
this.loadPlugins();
|
||||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
@ -6,7 +6,7 @@ Subject: [PATCH] Remap reflection calls in plugins using internals
|
|||||||
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 381a4885c4f52c1e094af350fcb7e04b590f849a..6d8f4c3b290609d60dbcabe3d2c8274b017246c8 100644
|
index 9086a65f5d593eea72a89d1153f6d353dfac1619..e1cfa2188dbe583a0180be2243a7a554dc5412d7 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -48,6 +48,12 @@ dependencies {
|
@@ -48,6 +48,12 @@ dependencies {
|
||||||
@ -608,7 +608,7 @@ index 0000000000000000000000000000000000000000..a3045afbc0cc057e99189b909367b21c
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/util/MappingEnvironment.java b/src/main/java/io/papermc/paper/util/MappingEnvironment.java
|
diff --git a/src/main/java/io/papermc/paper/util/MappingEnvironment.java b/src/main/java/io/papermc/paper/util/MappingEnvironment.java
|
||||||
index 8e4229634d41a42b3d93948eebb77def7c0c72b1..fb6aa9e2575b22e3089ea7fb32e6abfa6bb07d18 100644
|
index 8e4229634d41a42b3d93948eebb77def7c0c72b1..4477944f632a6b3936960ee80f9d898d3b7eed19 100644
|
||||||
--- a/src/main/java/io/papermc/paper/util/MappingEnvironment.java
|
--- a/src/main/java/io/papermc/paper/util/MappingEnvironment.java
|
||||||
+++ b/src/main/java/io/papermc/paper/util/MappingEnvironment.java
|
+++ b/src/main/java/io/papermc/paper/util/MappingEnvironment.java
|
||||||
@@ -10,6 +10,8 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
@@ -10,6 +10,8 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||||
@ -616,7 +616,7 @@ index 8e4229634d41a42b3d93948eebb77def7c0c72b1..fb6aa9e2575b22e3089ea7fb32e6abfa
|
|||||||
@DefaultQualifier(NonNull.class)
|
@DefaultQualifier(NonNull.class)
|
||||||
public final class MappingEnvironment {
|
public final class MappingEnvironment {
|
||||||
+ public static final boolean DISABLE_PLUGIN_REMAPPING = Boolean.getBoolean("paper.disablePluginRemapping");
|
+ public static final boolean DISABLE_PLUGIN_REMAPPING = Boolean.getBoolean("paper.disablePluginRemapping");
|
||||||
+ public static final String LEGACY_CB_VERSION = "v1_21_R1";
|
+ public static final String LEGACY_CB_VERSION = "v1_21_R2";
|
||||||
private static final @Nullable String MAPPINGS_HASH = readMappingsHash();
|
private static final @Nullable String MAPPINGS_HASH = readMappingsHash();
|
||||||
private static final boolean REOBF = checkReobf();
|
private static final boolean REOBF = checkReobf();
|
||||||
|
|
||||||
@ -705,7 +705,7 @@ index 2a29f60c3e82239ab7acd85242fc3390cb9129cd..91c6721201b095eb32c5fd5a1aaf2cbc
|
|||||||
final Set<RerouteMethodData> rerouteMethodData = new HashSet<>();
|
final Set<RerouteMethodData> rerouteMethodData = new HashSet<>();
|
||||||
String className;
|
String className;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index a339a0aa6fd7cc7be810e93bc9eb192437519c75..33d3085d0d44d748fcb1fc203dfd14c9e1b4aff0 100644
|
index 1aae364ee6c67b6c89a59ad6cab83bb921645453..a45c08c423248a60f9d5822046014427a6dadd12 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -74,6 +74,7 @@ import org.bukkit.potion.PotionType;
|
@@ -74,6 +74,7 @@ import org.bukkit.potion.PotionType;
|
@ -714,19 +714,19 @@ index f7197f1347251a37dd0f6d9ffa2f09bc3a4e1233..d0d36a57ec4896bcb74970f8fb24d8f3
|
|||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
if (exception instanceof ReportedException) {
|
if (exception instanceof ReportedException) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index e880543e94189fea3ba62eb7fb05ff48bc425299..49de4625c57689a3624ed421c0b03512507c97c3 100644
|
index 3d1e9f24b83513c9f499471e7eefaf639f9097ec..4502e2cf565b7b0547a1963b1119d7810b7a0bcb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -196,7 +196,7 @@ import org.bukkit.craftbukkit.Main;
|
@@ -203,7 +203,7 @@ import org.bukkit.craftbukkit.Main;
|
||||||
import org.bukkit.event.server.ServerLoadEvent;
|
import org.bukkit.event.server.ServerLoadEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||||
|
|
||||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource, AutoCloseable {
|
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource {
|
||||||
|
|
||||||
@@ -911,6 +911,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -925,6 +925,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
MinecraftServer.LOGGER.info("Stopping server");
|
MinecraftServer.LOGGER.info("Stopping server");
|
||||||
@ -734,7 +734,7 @@ index e880543e94189fea3ba62eb7fb05ff48bc425299..49de4625c57689a3624ed421c0b03512
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this.server != null) {
|
if (this.server != null) {
|
||||||
this.server.disablePlugins();
|
this.server.disablePlugins();
|
||||||
@@ -1187,9 +1188,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1227,9 +1228,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
private boolean haveTime() {
|
private boolean haveTime() {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -756,26 +756,35 @@ index e880543e94189fea3ba62eb7fb05ff48bc425299..49de4625c57689a3624ed421c0b03512
|
|||||||
private void executeModerately() {
|
private void executeModerately() {
|
||||||
this.runAllTasks();
|
this.runAllTasks();
|
||||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||||
@@ -1218,9 +1231,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1258,12 +1271,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void waitUntilNextTick() {
|
protected void waitUntilNextTick() {
|
||||||
- this.runAllTasks();
|
- this.runAllTasks();
|
||||||
+ //this.executeAll(); // Paper - move this into the tick method for timings
|
+ //this.runAllTasks(); // Paper - move this into the tick method for timings
|
||||||
|
this.waitingForNextTick = true;
|
||||||
|
|
||||||
|
try {
|
||||||
this.managedBlock(() -> {
|
this.managedBlock(() -> {
|
||||||
- return !this.haveTime();
|
- return !this.haveTime();
|
||||||
+ return !this.canSleepForTickNoOversleep(); // Paper - move oversleep into full server tick
|
+ return !this.canSleepForTickNoOversleep(); // Paper - move oversleep into full server tick
|
||||||
});
|
});
|
||||||
}
|
} finally {
|
||||||
|
this.waitingForNextTick = false;
|
||||||
@@ -1321,9 +1334,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1369,7 +1382,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||||
- SpigotTimings.serverTickTimer.startTiming(); // Spigot
|
- org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||||
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
|
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
|
||||||
long i = Util.getNanos();
|
long i = Util.getNanos();
|
||||||
|
int j = this.pauseWhileEmptySeconds() * 20;
|
||||||
|
|
||||||
|
@@ -1392,7 +1405,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- SpigotTimings.serverTickTimer.startTiming(); // Spigot
|
||||||
+ // Paper start - move oversleep into full server tick
|
+ // Paper start - move oversleep into full server tick
|
||||||
+ isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
|
+ isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
|
||||||
+ this.managedBlock(() -> {
|
+ this.managedBlock(() -> {
|
||||||
@ -787,53 +796,58 @@ index e880543e94189fea3ba62eb7fb05ff48bc425299..49de4625c57689a3624ed421c0b03512
|
|||||||
++this.tickCount;
|
++this.tickCount;
|
||||||
this.tickRateManager.tick();
|
this.tickRateManager.tick();
|
||||||
this.tickChildren(shouldKeepTicking);
|
this.tickChildren(shouldKeepTicking);
|
||||||
@@ -1337,14 +1358,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1408,6 +1428,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
if (this.autosavePeriod > 0 && this.ticksUntilAutosave <= 0) {
|
|
||||||
this.ticksUntilAutosave = this.autosavePeriod;
|
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||||
// CraftBukkit end
|
|
||||||
- SpigotTimings.worldSaveTimer.startTiming(); // Spigot
|
|
||||||
MinecraftServer.LOGGER.debug("Autosave started");
|
|
||||||
this.profiler.push("save");
|
|
||||||
this.saveEverything(true, false, false);
|
|
||||||
this.profiler.pop();
|
|
||||||
MinecraftServer.LOGGER.debug("Autosave finished");
|
|
||||||
- SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
|
|
||||||
}
|
|
||||||
+ // Paper start - move executeAll() into full server tick timing
|
+ // Paper start - move executeAll() into full server tick timing
|
||||||
+ try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
|
+ try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
|
||||||
+ this.runAllTasks();
|
+ this.runAllTasks();
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.profiler.push("tallying");
|
gameprofilerfiller.push("tallying");
|
||||||
long j = Util.getNanos() - i;
|
long k = Util.getNanos() - i;
|
||||||
int k = this.tickCount % 100;
|
int l = this.tickCount % 100;
|
||||||
@@ -1356,8 +1380,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1418,13 +1443,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) k / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
|
||||||
this.logTickMethodTime(i);
|
this.logTickMethodTime(i);
|
||||||
this.profiler.pop();
|
gameprofilerfiller.pop();
|
||||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
|
||||||
- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
|
- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
|
||||||
- org.spigotmc.CustomTimingsHandler.tick(); // Spigot
|
- org.spigotmc.CustomTimingsHandler.tick(); // Spigot
|
||||||
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void autoSave() {
|
||||||
|
this.ticksUntilAutosave = this.autosavePeriod; // CraftBukkit
|
||||||
|
- SpigotTimings.worldSaveTimer.startTiming(); // Spigot
|
||||||
|
MinecraftServer.LOGGER.debug("Autosave started");
|
||||||
|
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||||
|
|
||||||
|
@@ -1432,7 +1455,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
this.saveEverything(true, false, false);
|
||||||
|
gameprofilerfiller.pop();
|
||||||
|
MinecraftServer.LOGGER.debug("Autosave finished");
|
||||||
|
- SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
|
||||||
|
}
|
||||||
|
|
||||||
private void logTickMethodTime(long tickStartTime) {
|
private void logTickMethodTime(long tickStartTime) {
|
||||||
@@ -1428,26 +1451,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1505,26 +1527,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
||||||
entityplayer.connection.suspendFlushing();
|
entityplayer.connection.suspendFlushing();
|
||||||
});
|
});
|
||||||
- SpigotTimings.schedulerTimer.startTiming(); // Spigot
|
- SpigotTimings.schedulerTimer.startTiming(); // Spigot
|
||||||
+ MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
+ MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
||||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
|
||||||
- SpigotTimings.schedulerTimer.stopTiming(); // Spigot
|
- SpigotTimings.schedulerTimer.stopTiming(); // Spigot
|
||||||
+ MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
+ MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
||||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||||
this.profiler.push("commandFunctions");
|
gameprofilerfiller.push("commandFunctions");
|
||||||
- SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
|
- SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
|
||||||
+ MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
+ MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
||||||
this.getFunctions().tick();
|
this.getFunctions().tick();
|
||||||
- SpigotTimings.commandFunctionsTimer.stopTiming(); // Spigot
|
- SpigotTimings.commandFunctionsTimer.stopTiming(); // Spigot
|
||||||
+ MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
+ MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
||||||
this.profiler.popPush("levels");
|
gameprofilerfiller.popPush("levels");
|
||||||
Iterator iterator = this.getAllLevels().iterator();
|
Iterator iterator = this.getAllLevels().iterator();
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -851,8 +865,8 @@ index e880543e94189fea3ba62eb7fb05ff48bc425299..49de4625c57689a3624ed421c0b03512
|
|||||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||||
if (this.tickCount % 20 == 0) {
|
if (this.tickCount % 20 == 0) {
|
||||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||||
@@ -1455,7 +1478,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1532,7 +1554,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.level().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- SpigotTimings.timeUpdateTimer.stopTiming(); // Spigot
|
- SpigotTimings.timeUpdateTimer.stopTiming(); // Spigot
|
||||||
@ -860,16 +874,16 @@ index e880543e94189fea3ba62eb7fb05ff48bc425299..49de4625c57689a3624ed421c0b03512
|
|||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||||
@@ -1491,24 +1514,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1568,24 +1590,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
this.profiler.popPush("connection");
|
gameprofilerfiller.popPush("connection");
|
||||||
- SpigotTimings.connectionTimer.startTiming(); // Spigot
|
- SpigotTimings.connectionTimer.startTiming(); // Spigot
|
||||||
+ MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
|
+ MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
|
||||||
this.getConnection().tick();
|
this.tickConnection();
|
||||||
- SpigotTimings.connectionTimer.stopTiming(); // Spigot
|
- SpigotTimings.connectionTimer.stopTiming(); // Spigot
|
||||||
+ MinecraftTimings.connectionTimer.stopTiming(); // Spigot // Paper
|
+ MinecraftTimings.connectionTimer.stopTiming(); // Spigot // Paper
|
||||||
this.profiler.popPush("players");
|
gameprofilerfiller.popPush("players");
|
||||||
- SpigotTimings.playerListTimer.startTiming(); // Spigot
|
- SpigotTimings.playerListTimer.startTiming(); // Spigot
|
||||||
+ MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
+ MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
||||||
this.playerList.tick();
|
this.playerList.tick();
|
||||||
@ -879,7 +893,7 @@ index e880543e94189fea3ba62eb7fb05ff48bc425299..49de4625c57689a3624ed421c0b03512
|
|||||||
GameTestTicker.SINGLETON.tick();
|
GameTestTicker.SINGLETON.tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.profiler.popPush("server gui refresh");
|
gameprofilerfiller.popPush("server gui refresh");
|
||||||
|
|
||||||
- SpigotTimings.tickablesTimer.startTiming(); // Spigot
|
- SpigotTimings.tickablesTimer.startTiming(); // Spigot
|
||||||
+ MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
+ MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
||||||
@ -889,13 +903,13 @@ index e880543e94189fea3ba62eb7fb05ff48bc425299..49de4625c57689a3624ed421c0b03512
|
|||||||
- SpigotTimings.tickablesTimer.stopTiming(); // Spigot
|
- SpigotTimings.tickablesTimer.stopTiming(); // Spigot
|
||||||
+ MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
+ MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
||||||
|
|
||||||
this.profiler.popPush("send chunks");
|
gameprofilerfiller.popPush("send chunks");
|
||||||
iterator = this.playerList.getPlayers().iterator();
|
iterator = this.playerList.getPlayers().iterator();
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index d38ecbc208c34509eaf77751ac45d9ef51a5dce8..b51c3f8c485496734ea58c15377a1215a334c765 100644
|
index 9d6be455c3bbcdbcb9d3d24b0bad79f46ba6a8cb..de6cceeec4fc4a64d325b506ae9d9b0e0e0d90ff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -65,10 +65,11 @@ import org.apache.logging.log4j.Level;
|
@@ -64,10 +64,11 @@ import org.apache.logging.log4j.Level;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.io.IoBuilder;
|
import org.apache.logging.log4j.io.IoBuilder;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -908,7 +922,7 @@ index d38ecbc208c34509eaf77751ac45d9ef51a5dce8..b51c3f8c485496734ea58c15377a1215
|
|||||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -439,7 +440,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -421,7 +422,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleConsoleInputs() {
|
public void handleConsoleInputs() {
|
||||||
@ -917,7 +931,7 @@ index d38ecbc208c34509eaf77751ac45d9ef51a5dce8..b51c3f8c485496734ea58c15377a1215
|
|||||||
while (!this.consoleInput.isEmpty()) {
|
while (!this.consoleInput.isEmpty()) {
|
||||||
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
||||||
|
|
||||||
@@ -454,7 +455,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -436,7 +437,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -926,7 +940,7 @@ index d38ecbc208c34509eaf77751ac45d9ef51a5dce8..b51c3f8c485496734ea58c15377a1215
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -712,7 +713,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -694,7 +695,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
public String runCommand(RconConsoleSource rconConsoleSource, String s) {
|
public String runCommand(RconConsoleSource rconConsoleSource, String s) {
|
||||||
@ -936,7 +950,7 @@ index d38ecbc208c34509eaf77751ac45d9ef51a5dce8..b51c3f8c485496734ea58c15377a1215
|
|||||||
this.executeBlocking(() -> {
|
this.executeBlocking(() -> {
|
||||||
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
|
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
|
||||||
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
|
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
|
||||||
@@ -720,9 +723,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -702,9 +705,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -977,7 +991,7 @@ index d38ecbc208c34509eaf77751ac45d9ef51a5dce8..b51c3f8c485496734ea58c15377a1215
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 449608e60f3900778247101581ff598f1637499b..bb5115b3593c314f5edfb5947a3c35a489bf71af 100644
|
index b6fb3921b7df9748e38df494fd0012f45d97ac4b..5c9ed5091d61418d99582cb5a7242b5e10126dc5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -1,8 +1,10 @@
|
@@ -1,8 +1,10 @@
|
||||||
@ -991,7 +1005,7 @@ index 449608e60f3900778247101581ff598f1637499b..bb5115b3593c314f5edfb5947a3c35a4
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Queues;
|
import com.google.common.collect.Queues;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
@@ -1296,6 +1298,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1355,6 +1357,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
List<ServerPlayer> list = Lists.newArrayList();
|
List<ServerPlayer> list = Lists.newArrayList();
|
||||||
List<ServerPlayer> list1 = this.level.players();
|
List<ServerPlayer> list1 = this.level.players();
|
||||||
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
||||||
@ -999,7 +1013,7 @@ index 449608e60f3900778247101581ff598f1637499b..bb5115b3593c314f5edfb5947a3c35a4
|
|||||||
|
|
||||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
||||||
|
|
||||||
@@ -1320,14 +1323,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1379,14 +1382,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1018,10 +1032,10 @@ index 449608e60f3900778247101581ff598f1637499b..bb5115b3593c314f5edfb5947a3c35a4
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175..e0c8b89767087cba34fc3c3809db4c386dacb193 100644
|
index c615510f3f59292715bcff1bd9e4e896c9733436..a29598ae54d5d20740a105f81bcaec2a152fe4ba 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -195,13 +195,15 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -207,13 +207,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
|
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
|
||||||
@ -1039,7 +1053,7 @@ index cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175..e0c8b89767087cba34fc3c3809db4c38
|
|||||||
ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
|
ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
|
||||||
ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
|
ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
|
||||||
|
|
||||||
@@ -366,7 +368,9 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -382,7 +384,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
public void save(boolean flush) {
|
public void save(boolean flush) {
|
||||||
this.runDistanceManagerUpdates();
|
this.runDistanceManagerUpdates();
|
||||||
@ -1049,9 +1063,9 @@ index cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175..e0c8b89767087cba34fc3c3809db4c38
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -408,10 +412,10 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -429,10 +433,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
this.level.timings.doChunkMap.stopTiming(); // Spigot
|
||||||
this.level.getProfiler().popPush("chunks");
|
gameprofilerfiller.popPush("chunks");
|
||||||
if (tickChunks) {
|
if (tickChunks) {
|
||||||
+ this.level.timings.chunks.startTiming(); // Paper - timings
|
+ this.level.timings.chunks.startTiming(); // Paper - timings
|
||||||
this.tickChunks();
|
this.tickChunks();
|
||||||
@ -1062,55 +1076,57 @@ index cf94dd9ddcc1eabcf3fd336e70720f4ed3e52175..e0c8b89767087cba34fc3c3809db4c38
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
this.level.timings.doChunkUnload.startTiming(); // Spigot
|
||||||
@@ -434,6 +438,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -442,6 +446,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
gameprofilerfiller.push("filteringLoadedChunks");
|
gameprofilerfiller.pop();
|
||||||
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
|
this.clearCache();
|
||||||
Iterator iterator = this.chunkMap.getChunks().iterator();
|
}
|
||||||
+ if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper
|
+ if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
private void tickChunks() {
|
||||||
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
|
long i = this.level.getGameTime();
|
||||||
@@ -446,8 +451,10 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -481,7 +486,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
LevelChunk chunk = playerchunk.getTickingChunk();
|
||||||
|
|
||||||
if (this.level.tickRateManager().runsNormally()) {
|
if (chunk != null) {
|
||||||
gameprofilerfiller.popPush("naturalSpawnCount");
|
+ this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing
|
||||||
|
playerchunk.broadcastChanges(chunk);
|
||||||
|
+ this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -502,8 +509,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
|
private void tickChunks(ProfilerFiller profiler, long timeDelta, List<LevelChunk> chunks) {
|
||||||
|
profiler.popPush("naturalSpawnCount");
|
||||||
+ this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
+ this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||||
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
int j = this.distanceManager.getNaturalSpawnChunkCount();
|
||||||
NaturalSpawner.SpawnState spawnercreature_d = NaturalSpawner.createState(k, this.level.getAllEntities(), this::getFullChunk, new LocalMobCapCalculator(this.chunkMap));
|
NaturalSpawner.SpawnState spawnercreature_d = NaturalSpawner.createState(j, this.level.getAllEntities(), this::getFullChunk, new LocalMobCapCalculator(this.chunkMap));
|
||||||
+ this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
+ this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||||
|
|
||||||
this.lastSpawnState = spawnercreature_d;
|
this.lastSpawnState = spawnercreature_d;
|
||||||
gameprofilerfiller.popPush("spawnAndTick");
|
profiler.popPush("spawnAndTick");
|
||||||
@@ -470,22 +477,25 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -531,15 +540,17 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
|
||||||
- this.level.timings.doTickTiles.startTiming(); // Spigot
|
- this.level.timings.doTickTiles.startTiming(); // Spigot
|
||||||
this.level.tickChunk(chunk1, l);
|
this.level.tickChunk(chunk, k);
|
||||||
- this.level.timings.doTickTiles.stopTiming(); // Spigot
|
- this.level.timings.doTickTiles.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
+ this.level.timings.chunkTicks.stopTiming(); // Paper
|
|
||||||
|
|
||||||
gameprofilerfiller.popPush("customSpawners");
|
+ this.level.timings.chunkTicks.stopTiming(); // Paper
|
||||||
|
+
|
||||||
|
profiler.popPush("customSpawners");
|
||||||
if (flag) {
|
if (flag) {
|
||||||
+ try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings
|
+ try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings
|
||||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||||
+ } // Paper - timings
|
+ }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.popPush("broadcast");
|
}
|
||||||
list.forEach((chunkproviderserver_a1) -> {
|
|
||||||
+ this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing
|
|
||||||
chunkproviderserver_a1.holder.broadcastChanges(chunkproviderserver_a1.chunk);
|
|
||||||
+ this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
|
|
||||||
});
|
|
||||||
gameprofilerfiller.pop();
|
|
||||||
gameprofilerfiller.pop();
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57a04e0c51 100644
|
index 6fe373de360570b528b8133043ef3bb9ba12529d..d82f4255faac84ce6af47e86707f5c035529ab5d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1,6 +1,8 @@
|
@@ -1,6 +1,8 @@
|
||||||
@ -1122,7 +1138,7 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.mojang.datafixers.DataFixer;
|
import com.mojang.datafixers.DataFixer;
|
||||||
import com.mojang.datafixers.util.Pair;
|
import com.mojang.datafixers.util.Pair;
|
||||||
@@ -173,7 +175,6 @@ import net.minecraft.world.ticks.LevelTicks;
|
@@ -176,7 +178,6 @@ import net.minecraft.world.ticks.LevelTicks;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.WeatherType;
|
import org.bukkit.WeatherType;
|
||||||
@ -1130,16 +1146,16 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||||
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
||||||
import org.bukkit.craftbukkit.util.WorldUUID;
|
import org.bukkit.craftbukkit.util.WorldUUID;
|
||||||
@@ -478,7 +479,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -469,7 +470,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.popPush("tickPending");
|
gameprofilerfiller.push("tickPending");
|
||||||
- this.timings.doTickPending.startTiming(); // Spigot
|
- this.timings.doTickPending.startTiming(); // Spigot
|
||||||
+ this.timings.scheduledBlocks.startTiming(); // Paper
|
+ this.timings.scheduledBlocks.startTiming(); // Paper
|
||||||
if (!this.isDebug() && flag) {
|
if (!this.isDebug() && flag) {
|
||||||
j = this.getGameTime();
|
j = this.getGameTime();
|
||||||
gameprofilerfiller.push("blockTicks");
|
gameprofilerfiller.push("blockTicks");
|
||||||
@@ -487,15 +488,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -478,15 +479,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
}
|
}
|
||||||
@ -1160,7 +1176,7 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
gameprofilerfiller.popPush("blockEvents");
|
gameprofilerfiller.popPush("blockEvents");
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.timings.doSounds.startTiming(); // Spigot
|
this.timings.doSounds.startTiming(); // Spigot
|
||||||
@@ -648,6 +653,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -635,6 +640,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.popPush("tickBlocks");
|
gameprofilerfiller.popPush("tickBlocks");
|
||||||
@ -1168,7 +1184,7 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
if (randomTickSpeed > 0) {
|
if (randomTickSpeed > 0) {
|
||||||
LevelChunkSection[] achunksection = chunk.getSections();
|
LevelChunkSection[] achunksection = chunk.getSections();
|
||||||
|
|
||||||
@@ -680,6 +686,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -667,6 +673,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1176,7 +1192,7 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -956,14 +963,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -944,14 +951,22 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tickNonPassenger(Entity entity) {
|
public void tickNonPassenger(Entity entity) {
|
||||||
@ -1198,9 +1214,9 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
+ try {
|
+ try {
|
||||||
+ // Paper end - timings
|
+ // Paper end - timings
|
||||||
entity.setOldPosAndRot();
|
entity.setOldPosAndRot();
|
||||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||||
|
|
||||||
@@ -982,7 +997,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -970,7 +985,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
|
|
||||||
this.tickPassenger(entity, entity1);
|
this.tickPassenger(entity, entity1);
|
||||||
}
|
}
|
||||||
@ -1209,7 +1225,7 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1024,6 +1039,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1012,6 +1027,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
|
|
||||||
if (!savingDisabled) {
|
if (!savingDisabled) {
|
||||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
|
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
|
||||||
@ -1217,7 +1233,7 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
if (progressListener != null) {
|
if (progressListener != null) {
|
||||||
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||||
}
|
}
|
||||||
@@ -1033,7 +1049,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1021,7 +1037,10 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1229,10 +1245,10 @@ index 4c39d9e0466240b5cd459ee649a22fe3a72bf9f0..eb98bb1bd76869fd76b34885223c8e57
|
|||||||
this.entityManager.saveAll();
|
this.entityManager.saveAll();
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 4acee8121ff62413dbbf2294d17da3bd2f974d5a..3a67b2b6a6d3204b2a7bbe8adbf2b0ecf7898551 100644
|
index eed5dd58fc37c137c87bf3e55e1e033b74002110..7a130da1b50a67331a862f96934739845c7b2d67 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -330,7 +330,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -337,7 +337,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
@ -1240,7 +1256,7 @@ index 4acee8121ff62413dbbf2294d17da3bd2f974d5a..3a67b2b6a6d3204b2a7bbe8adbf2b0ec
|
|||||||
if (this.ackBlockChangesUpTo > -1) {
|
if (this.ackBlockChangesUpTo > -1) {
|
||||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||||
this.ackBlockChangesUpTo = -1;
|
this.ackBlockChangesUpTo = -1;
|
||||||
@@ -397,7 +396,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -393,7 +392,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
||||||
this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"));
|
this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"));
|
||||||
}
|
}
|
||||||
@ -1248,7 +1264,7 @@ index 4acee8121ff62413dbbf2294d17da3bd2f974d5a..3a67b2b6a6d3204b2a7bbe8adbf2b0ec
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2103,7 +2101,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2114,7 +2112,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleCommand(String s) {
|
private void handleCommand(String s) {
|
||||||
@ -1257,7 +1273,7 @@ index 4acee8121ff62413dbbf2294d17da3bd2f974d5a..3a67b2b6a6d3204b2a7bbe8adbf2b0ec
|
|||||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||||
|
|
||||||
@@ -2113,7 +2111,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2124,7 +2122,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
this.cserver.getPluginManager().callEvent(event);
|
this.cserver.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
@ -1266,7 +1282,7 @@ index 4acee8121ff62413dbbf2294d17da3bd2f974d5a..3a67b2b6a6d3204b2a7bbe8adbf2b0ec
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2126,7 +2124,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2137,7 +2135,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
@ -1276,7 +1292,7 @@ index 4acee8121ff62413dbbf2294d17da3bd2f974d5a..3a67b2b6a6d3204b2a7bbe8adbf2b0ec
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 9dcfcea63f57f45a5584bb80c34fe445d65849e8..765c412cd0c5cd410c224b4bc55dbf431fd6617b 100644
|
index 56f046bac04205a813441907058c4ce21982d927..b103d49458330be9f7fb3382c764b204a02a925a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -1286,7 +1302,7 @@ index 9dcfcea63f57f45a5584bb80c34fe445d65849e8..765c412cd0c5cd410c224b4bc55dbf43
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
@@ -1007,10 +1008,11 @@ public abstract class PlayerList {
|
@@ -976,10 +977,11 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveAll() {
|
public void saveAll() {
|
||||||
@ -1300,10 +1316,10 @@ index 9dcfcea63f57f45a5584bb80c34fe445d65849e8..765c412cd0c5cd410c224b4bc55dbf43
|
|||||||
|
|
||||||
public UserWhiteList getWhiteList() {
|
public UserWhiteList getWhiteList() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 06cbe7a7ea131a8bead857cbfbd27810a9093320..0a3ed94165430774c7037e78fd7bffc205c6f72f 100644
|
index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c594f9a88 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -140,7 +140,6 @@ import org.bukkit.command.CommandSender;
|
@@ -148,7 +148,6 @@ import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Hanging;
|
import org.bukkit.entity.Hanging;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Vehicle;
|
import org.bukkit.entity.Vehicle;
|
||||||
@ -1311,7 +1327,7 @@ index 06cbe7a7ea131a8bead857cbfbd27810a9093320..0a3ed94165430774c7037e78fd7bffc2
|
|||||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||||
@@ -323,7 +322,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -326,7 +325,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
// Marks an entity, that it was removed by a plugin via Entity#remove
|
// Marks an entity, that it was removed by a plugin via Entity#remove
|
||||||
// Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
|
// Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
|
||||||
public boolean pluginRemoved = false;
|
public boolean pluginRemoved = false;
|
||||||
@ -1319,30 +1335,30 @@ index 06cbe7a7ea131a8bead857cbfbd27810a9093320..0a3ed94165430774c7037e78fd7bffc2
|
|||||||
// Spigot start
|
// Spigot start
|
||||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||||
public final boolean defaultActivationState;
|
public final boolean defaultActivationState;
|
||||||
@@ -840,7 +838,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -866,7 +864,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
public void move(MoverType movementType, Vec3 movement) {
|
public void move(MoverType type, Vec3 movement) {
|
||||||
- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
|
- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
|
||||||
if (this.noPhysics) {
|
if (this.noPhysics) {
|
||||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||||
} else {
|
} else {
|
||||||
@@ -1001,7 +998,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -978,7 +975,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
this.level().getProfiler().pop();
|
gameprofilerfiller.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
|
- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isStateClimbable(BlockState state) {
|
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission moveEffect, Vec3 movement, BlockPos landingPos, BlockState landingState) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
index e465aaa4fd29b4966ea8d88316c6d8f217da2e73..474f020371bb9e5fd2c5b22e44d7902977c4fc18 100644
|
index 17ab230c95901f0533997ac117d5b3d852fcd467..0782b2b58ed30d4ef2598e4b89f338a94a62bbe5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
@@ -339,6 +339,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -413,6 +413,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, FeatureFlagSet requiredFeatures) {
|
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, String translationKey, Optional<ResourceKey<LootTable>> lootTable, FeatureFlagSet requiredFeatures) {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, spawnBoxScale, maxTrackDistance, trackTickInterval, requiredFeatures, "custom");
|
+ this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, spawnBoxScale, maxTrackDistance, trackTickInterval, requiredFeatures, "custom");
|
||||||
+ }
|
+ }
|
||||||
@ -1351,11 +1367,12 @@ index e465aaa4fd29b4966ea8d88316c6d8f217da2e73..474f020371bb9e5fd2c5b22e44d79029
|
|||||||
+ this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick");
|
+ this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick");
|
||||||
+ this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick");
|
+ this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick");
|
||||||
+ this.passengerInactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerInactiveTick");
|
+ this.passengerInactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerInactiveTick");
|
||||||
|
+ this.id = id;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
|
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
|
||||||
this.factory = factory;
|
this.factory = factory;
|
||||||
this.category = spawnGroup;
|
this.category = spawnGroup;
|
||||||
@@ -654,6 +663,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -720,6 +730,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
return this.updateInterval;
|
return this.updateInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1364,24 +1381,25 @@ index e465aaa4fd29b4966ea8d88316c6d8f217da2e73..474f020371bb9e5fd2c5b22e44d79029
|
|||||||
+ public final co.aikar.timings.Timing inactiveTickTimer;
|
+ public final co.aikar.timings.Timing inactiveTickTimer;
|
||||||
+ public final co.aikar.timings.Timing passengerTickTimer;
|
+ public final co.aikar.timings.Timing passengerTickTimer;
|
||||||
+ public final co.aikar.timings.Timing passengerInactiveTickTimer;
|
+ public final co.aikar.timings.Timing passengerInactiveTickTimer;
|
||||||
|
+ private final String id;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
public boolean trackDeltas() {
|
public boolean trackDeltas() {
|
||||||
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
||||||
}
|
}
|
||||||
@@ -823,7 +838,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
@@ -926,7 +943,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||||
Util.fetchChoiceType(References.ENTITY_TREE, id);
|
Util.fetchChoiceType(References.ENTITY_TREE, registryKey.location().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
- return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions.withAttachments(this.attachments), this.spawnDimensionsScale, this.clientTrackingRange, this.updateInterval, this.requiredFeatures);
|
- return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions.withAttachments(this.attachments), this.spawnDimensionsScale, this.clientTrackingRange, this.updateInterval, (String) this.descriptionId.get(registryKey), (Optional) this.lootTable.get(registryKey), this.requiredFeatures);
|
||||||
+ return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions.withAttachments(this.attachments), this.spawnDimensionsScale, this.clientTrackingRange, this.updateInterval, this.requiredFeatures, id); // Paper - add id
|
+ return new EntityType<>(this.factory, this.category, this.serialize, this.summon, this.fireImmune, this.canSpawnFarFromPlayer, this.immuneTo, this.dimensions.withAttachments(this.attachments), this.spawnDimensionsScale, this.clientTrackingRange, this.updateInterval, (String) this.descriptionId.get(registryKey), (Optional) this.lootTable.get(registryKey), this.requiredFeatures, this.id); // Paper - add id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 26064174397dc95f9b117d901e22c55abebf3c39..d1e042ec0c1a818d713b31c3d81b48327c3578d5 100644
|
index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6cc86412d45186dff312d9b1246fd1d03dbc15d8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -156,7 +156,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
@@ -162,7 +162,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -1390,7 +1408,7 @@ index 26064174397dc95f9b117d901e22c55abebf3c39..d1e042ec0c1a818d713b31c3d81b4832
|
|||||||
|
|
||||||
public abstract class LivingEntity extends Entity implements Attackable {
|
public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
@@ -2977,7 +2977,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3090,7 +3090,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
@ -1398,7 +1416,7 @@ index 26064174397dc95f9b117d901e22c55abebf3c39..d1e042ec0c1a818d713b31c3d81b4832
|
|||||||
super.tick();
|
super.tick();
|
||||||
this.updatingUsingItem();
|
this.updatingUsingItem();
|
||||||
this.updateSwimAmount();
|
this.updateSwimAmount();
|
||||||
@@ -3019,9 +3018,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3132,9 +3131,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isRemoved()) {
|
if (!this.isRemoved()) {
|
||||||
@ -1408,61 +1426,61 @@ index 26064174397dc95f9b117d901e22c55abebf3c39..d1e042ec0c1a818d713b31c3d81b4832
|
|||||||
}
|
}
|
||||||
|
|
||||||
double d0 = this.getX() - this.xo;
|
double d0 = this.getX() - this.xo;
|
||||||
@@ -3112,7 +3109,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3228,7 +3225,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.refreshDimensions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.elytraAnimationState.tick();
|
||||||
- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
|
- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
public void detectEquipmentUpdatesPublic() { // CraftBukkit
|
public void detectEquipmentUpdatesPublic() { // CraftBukkit
|
||||||
@@ -3328,7 +3324,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3435,7 +3431,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||||
|
|
||||||
this.setDeltaMovement(d0, d1, d2);
|
gameprofilerfiller.push("ai");
|
||||||
this.level().getProfiler().push("ai");
|
|
||||||
- SpigotTimings.timerEntityAI.startTiming(); // Spigot
|
- SpigotTimings.timerEntityAI.startTiming(); // Spigot
|
||||||
if (this.isImmobile()) {
|
if (this.isImmobile()) {
|
||||||
this.jumping = false;
|
this.jumping = false;
|
||||||
this.xxa = 0.0F;
|
this.xxa = 0.0F;
|
||||||
@@ -3338,7 +3333,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3445,7 +3440,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.serverAiStep();
|
this.serverAiStep();
|
||||||
this.level().getProfiler().pop();
|
gameprofilerfiller.pop();
|
||||||
}
|
}
|
||||||
- SpigotTimings.timerEntityAI.stopTiming(); // Spigot
|
- SpigotTimings.timerEntityAI.stopTiming(); // Spigot
|
||||||
|
|
||||||
this.level().getProfiler().pop();
|
gameprofilerfiller.pop();
|
||||||
this.level().getProfiler().push("jump");
|
gameprofilerfiller.push("jump");
|
||||||
@@ -3378,7 +3372,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3488,7 +3482,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.resetFallDistance();
|
this.resetFallDistance();
|
||||||
}
|
}
|
||||||
|
|
||||||
- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
|
- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
|
||||||
label104:
|
label112:
|
||||||
{
|
{
|
||||||
LivingEntity entityliving = this.getControllingPassenger();
|
LivingEntity entityliving = this.getControllingPassenger();
|
||||||
@@ -3392,7 +3385,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3502,7 +3495,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
this.travel(vec3d1);
|
this.travel(vec3d1);
|
||||||
}
|
}
|
||||||
- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
|
- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
|
||||||
|
|
||||||
this.level().getProfiler().pop();
|
if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
|
||||||
this.level().getProfiler().push("freezing");
|
this.applyEffectsFromBlocks();
|
||||||
@@ -3419,9 +3411,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3538,9 +3530,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
||||||
}
|
}
|
||||||
|
|
||||||
- SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
|
- SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
|
||||||
this.pushEntities();
|
this.pushEntities();
|
||||||
- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
|
- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
|
||||||
this.level().getProfiler().pop();
|
gameprofilerfiller.pop();
|
||||||
if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
|
world = this.level();
|
||||||
this.hurt(this.damageSources().drown(), 1.0F);
|
if (world instanceof ServerLevel worldserver) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 2bc1d0d3ea8a6e3327e9c11bd1f0666d210e9bbe..79d5423be919dfe4db75ad7dd0ce403ad0214462 100644
|
index 3fb17bbcecf6dc4af3b231835adff25f86e1379f..5df862e026e15e10e2fcc7c5a49e8a8022125579 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -93,7 +93,6 @@ import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePa
|
@@ -95,7 +95,6 @@ import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePa
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
@ -1470,7 +1488,7 @@ index 2bc1d0d3ea8a6e3327e9c11bd1f0666d210e9bbe..79d5423be919dfe4db75ad7dd0ce403a
|
|||||||
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
||||||
import org.bukkit.craftbukkit.block.CraftBlockState;
|
import org.bukkit.craftbukkit.block.CraftBlockState;
|
||||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||||
@@ -164,7 +163,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -165,7 +164,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
}
|
}
|
||||||
// Paper end - add paper world config
|
// Paper end - add paper world config
|
||||||
|
|
||||||
@ -1488,7 +1506,7 @@ index 2bc1d0d3ea8a6e3327e9c11bd1f0666d210e9bbe..79d5423be919dfe4db75ad7dd0ce403a
|
|||||||
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
|
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
|
||||||
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
|
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
|
||||||
}
|
}
|
||||||
@@ -723,15 +722,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -725,15 +724,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
this.timings.tileEntityTick.stopTiming(); // Spigot
|
this.timings.tileEntityTick.stopTiming(); // Spigot
|
||||||
this.tickingBlockEntities = false;
|
this.tickingBlockEntities = false;
|
||||||
@ -1506,7 +1524,7 @@ index 2bc1d0d3ea8a6e3327e9c11bd1f0666d210e9bbe..79d5423be919dfe4db75ad7dd0ce403a
|
|||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
|
||||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
|
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
index d1cfcc8a36964f006f1af6764c52b5ca458b478d..def3e28edc206e0ba41111e26332db468223fb2e 100644
|
index 27cbec37c6ea278232970ae035795fdecca71735..3cefda12d4c2ca2c4e9ef97eff961a55af164d6b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
@@ -88,6 +88,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
@@ -88,6 +88,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||||
@ -1523,10 +1541,10 @@ index d1cfcc8a36964f006f1af6764c52b5ca458b478d..def3e28edc206e0ba41111e26332db46
|
|||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
@Nullable
|
@Nullable
|
||||||
private String descriptionId;
|
private Item item;
|
||||||
@Nullable
|
private static final int CACHE_SIZE = 256;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
index 6a4e5bfa70b31311a9076eb314c0a0146d5b08a5..17cda4c8b61efd99c1a43f921ed604827bb064f3 100644
|
index 4c3bc3a495990bc486fce7ba1758bf731c3baf02..9afe509b3455a7aabd11976fb8a7430d1bce065d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
@@ -34,10 +34,12 @@ import org.bukkit.inventory.InventoryHolder;
|
@@ -34,10 +34,12 @@ import org.bukkit.inventory.InventoryHolder;
|
||||||
@ -1544,10 +1562,10 @@ index 6a4e5bfa70b31311a9076eb314c0a0146d5b08a5..17cda4c8b61efd99c1a43f921ed60482
|
|||||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||||
public CraftPersistentDataContainer persistentDataContainer;
|
public CraftPersistentDataContainer persistentDataContainer;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 25380a44e5cc94f3924cfee6a03c3091fea04ae2..418ba374886d93f69afd614e4be05f6561e1f897 100644
|
index d76591694c3b167b8b8f17b61a373a43140a8b68..717e4bf9f5ee0ec2c3a0b5cc65a50b0f6d649a8d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -602,6 +602,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -627,6 +627,7 @@ public class LevelChunk extends ChunkAccess {
|
||||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration));
|
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration));
|
||||||
|
|
||||||
if (this.needsDecoration) {
|
if (this.needsDecoration) {
|
||||||
@ -1555,7 +1573,7 @@ index 25380a44e5cc94f3924cfee6a03c3091fea04ae2..418ba374886d93f69afd614e4be05f65
|
|||||||
this.needsDecoration = false;
|
this.needsDecoration = false;
|
||||||
java.util.Random random = new java.util.Random();
|
java.util.Random random = new java.util.Random();
|
||||||
random.setSeed(this.level.getSeed());
|
random.setSeed(this.level.getSeed());
|
||||||
@@ -621,6 +622,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -646,6 +647,7 @@ public class LevelChunk extends ChunkAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
||||||
@ -1563,37 +1581,11 @@ index 25380a44e5cc94f3924cfee6a03c3091fea04ae2..418ba374886d93f69afd614e4be05f65
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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 46a090123e205394791cdbde2af84c58ce55f7e1..47f5f3d58bb3bf85cf35f9baae77df7fab5c844f 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
|
|
||||||
@@ -472,13 +472,10 @@ public class ChunkSerializer {
|
|
||||||
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
|
|
||||||
|
|
||||||
return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
|
|
||||||
- world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
|
|
||||||
if (nbttaglist != null) {
|
|
||||||
world.addLegacyChunkEntities(EntityType.loadEntitiesRecursive(nbttaglist, world));
|
|
||||||
}
|
|
||||||
- world.timings.syncChunkLoadEntitiesTimer.stopTiming(); // Spigot
|
|
||||||
|
|
||||||
- world.timings.syncChunkLoadTileEntitiesTimer.startTiming(); // Spigot
|
|
||||||
if (nbttaglist1 != null) {
|
|
||||||
for (int i = 0; i < nbttaglist1.size(); ++i) {
|
|
||||||
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
|
|
||||||
@@ -496,7 +493,6 @@ public class ChunkSerializer {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index cd6b6109ea3844f7d78ad7a1cbd6cf5dc3d90b5c..0fda501dedcc1f3f7d35e3b66a4b40394c4b3cb5 100644
|
index 9bf8c4d9154c433e586f59587e8d7db7c310bb9c..232a21080ff416ac5b9fdf913f6784eb3bcdacfa 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -376,7 +376,7 @@ public final class CraftServer implements Server {
|
@@ -379,7 +379,7 @@ public final class CraftServer implements Server {
|
||||||
this.saveCommandsConfig();
|
this.saveCommandsConfig();
|
||||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||||
@ -1602,7 +1594,7 @@ index cd6b6109ea3844f7d78ad7a1cbd6cf5dc3d90b5c..0fda501dedcc1f3f7d35e3b66a4b4039
|
|||||||
this.overrideSpawnLimits();
|
this.overrideSpawnLimits();
|
||||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||||
@@ -2619,12 +2619,31 @@ public final class CraftServer implements Server {
|
@@ -2636,12 +2636,31 @@ public final class CraftServer implements Server {
|
||||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1804,10 +1796,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
|
|||||||
- }
|
- }
|
||||||
-}
|
-}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 69b8d0f73ced69cd88029a5d7e11aca40d70f9d1..e4ea877228102ccf93fe8c92b0cec8ebd89771a0 100644
|
index c02ab554fe6e1b7eb01bbd1824a86ff4de1db2f0..dafd4105f4ad4729c7637a7b0e5606ff0ec326d1 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -2782,6 +2782,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2795,6 +2795,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
|
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
|
||||||
}
|
}
|
||||||
@ -1823,7 +1815,7 @@ index 69b8d0f73ced69cd88029a5d7e11aca40d70f9d1..e4ea877228102ccf93fe8c92b0cec8eb
|
|||||||
|
|
||||||
public Player.Spigot spigot()
|
public Player.Spigot spigot()
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
index c017ce2ca1bc535795c958a2e509af2adf88efa9..6c0debe3f3b693ed90dd2a39f481cccd8e4f7634 100644
|
index 6effe47b32a8551aa6f6b11bc0315714a119e199..4c376f67ae311b4fedea27b3475f9fb56054aec2 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -1869,7 +1861,7 @@ index c017ce2ca1bc535795c958a2e509af2adf88efa9..6c0debe3f3b693ed90dd2a39f481cccd
|
|||||||
this.pending.addAll(temp);
|
this.pending.addAll(temp);
|
||||||
temp.clear();
|
temp.clear();
|
||||||
+ MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming(); // Paper
|
+ MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming(); // Paper
|
||||||
this.debugHead = this.debugHead.getNextHead(currentTick);
|
this.debugHead = this.debugHead.getNextHead(this.currentTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,6 +481,7 @@ public class CraftScheduler implements BukkitScheduler {
|
@@ -480,6 +481,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||||
@ -1985,7 +1977,7 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222
|
|||||||
+ } // Paper
|
+ } // Paper
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 33d3085d0d44d748fcb1fc203dfd14c9e1b4aff0..f7b80cf8c89ae5eb9d8f0893e05ffc753fdace19 100644
|
index a45c08c423248a60f9d5822046014427a6dadd12..1e8b13096b0ebed35290c9cbe6b8fb8f4b054b34 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -199,6 +199,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -199,6 +199,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
@ -2015,7 +2007,7 @@ index 33d3085d0d44d748fcb1fc203dfd14c9e1b4aff0..f7b80cf8c89ae5eb9d8f0893e05ffc75
|
|||||||
@Override
|
@Override
|
||||||
public String get(Class<?> aClass, String s) {
|
public String get(Class<?> aClass, String s) {
|
||||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
index ff422d4d4f2b764370f0ee2af13034853c1d3fe1..a5da6c1cae0afbde684be250e2fc3c0c32a1265b 100644
|
index 3591b79481ac17bd02e59ac3c623d1c6991abd84..2122e044d99902d2aff86693aaa424a50b9f8a13 100644
|
||||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
@@ -27,7 +27,7 @@ import net.minecraft.world.entity.projectile.ThrownTrident;
|
@@ -27,7 +27,7 @@ import net.minecraft.world.entity.projectile.ThrownTrident;
|
@ -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
|
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
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397bd75de5c 100644
|
index 4502e2cf565b7b0547a1963b1119d7810b7a0bcb..36a3fa8847afc0d0831054958886a04a1d847596 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -296,7 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -307,7 +307,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public org.bukkit.craftbukkit.CraftServer server;
|
public org.bukkit.craftbukkit.CraftServer server;
|
||||||
public OptionSet options;
|
public OptionSet options;
|
||||||
public org.bukkit.command.ConsoleCommandSender console;
|
public org.bukkit.command.ConsoleCommandSender console;
|
||||||
@ -24,7 +24,7 @@ index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397
|
|||||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||||
public int autosavePeriod;
|
public int autosavePeriod;
|
||||||
public Commands vanillaCommandDispatcher;
|
public Commands vanillaCommandDispatcher;
|
||||||
@@ -305,7 +305,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -316,7 +316,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
// Spigot start
|
// Spigot start
|
||||||
public static final int TPS = 20;
|
public static final int TPS = 20;
|
||||||
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
|
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
|
||||||
@ -34,7 +34,7 @@ index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397
|
|||||||
public final double[] recentTps = new double[ 3 ];
|
public final double[] recentTps = new double[ 3 ];
|
||||||
// Spigot end
|
// Spigot end
|
||||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
||||||
@@ -1019,6 +1020,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1033,6 +1034,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
{
|
{
|
||||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397
|
|||||||
// Spigot End
|
// Spigot End
|
||||||
|
|
||||||
protected void runServer() {
|
protected void runServer() {
|
||||||
@@ -1033,7 +1085,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1047,7 +1099,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
// Spigot start
|
// Spigot start
|
||||||
Arrays.fill( this.recentTps, 20 );
|
Arrays.fill( this.recentTps, 20 );
|
||||||
@ -104,7 +104,7 @@ index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397
|
|||||||
while (this.running) {
|
while (this.running) {
|
||||||
long i;
|
long i;
|
||||||
|
|
||||||
@@ -1055,15 +1110,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1069,15 +1124,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Spigot start
|
// Spigot start
|
||||||
@ -135,7 +135,7 @@ index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
boolean flag = i == 0L;
|
boolean flag = i == 0L;
|
||||||
@@ -1073,7 +1135,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1087,7 +1149,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
|
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,13 +143,13 @@ index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397
|
|||||||
+ //MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
+ //MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||||
+ lastTick = currentTime;
|
+ lastTick = currentTime;
|
||||||
this.nextTickTimeNanos += i;
|
this.nextTickTimeNanos += i;
|
||||||
this.startMetricsRecordingTick();
|
|
||||||
this.profiler.push("tick");
|
try {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 0fda501dedcc1f3f7d35e3b66a4b40394c4b3cb5..2c3efcf07f933278a8b897cf7b1f6f24b452a7c5 100644
|
index 232a21080ff416ac5b9fdf913f6784eb3bcdacfa..f7af198966928ac28bd7e2851caae93a27974e5c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2672,7 +2672,11 @@ public final class CraftServer implements Server {
|
@@ -2689,7 +2689,11 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double[] getTPS() {
|
public double[] getTPS() {
|
@ -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
|
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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 2c3efcf07f933278a8b897cf7b1f6f24b452a7c5..b8b2e582115cc42a913b03a35861fa810d774cbb 100644
|
index f7af198966928ac28bd7e2851caae93a27974e5c..10e1b6bf90b249a5dd04bb10f0a742cdedae0a01 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -459,6 +459,35 @@ public final class CraftServer implements Server {
|
@@ -462,6 +462,35 @@ public final class CraftServer implements Server {
|
||||||
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
|
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ index 2c3efcf07f933278a8b897cf7b1f6f24b452a7c5..b8b2e582115cc42a913b03a35861fa81
|
|||||||
if (type == PluginLoadOrder.STARTUP) {
|
if (type == PluginLoadOrder.STARTUP) {
|
||||||
this.helpMap.clear();
|
this.helpMap.clear();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index bdb8e882ec1efbe5afec9ec5a5df57bf38d4ba2b..034d68c2715b6a90f31e56f949ff3d27235a26eb 100644
|
index 4a99cf5a146abe0d2b40ffc1189fdc5540f14d55..03790abcc3474999db6d8986e50ebc2caf6eba0c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -160,6 +160,12 @@ public class Main {
|
@@ -160,6 +160,12 @@ public class Main {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index 0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4..f6ac13f91f08498a8adda7d34518a5cfe34c15b2 100644
|
index 626fe2af05fecd41b777b5dd5decbedb2f17b43a..1c943638bfbda8281d2c9038e9024591823e2b5e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -978,11 +978,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1114,11 +1114,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return CraftChatMessage.fromComponent(this.displayName);
|
return CraftChatMessage.fromComponent(this.displayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ index 0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4..f6ac13f91f08498a8adda7d34518a5cf
|
|||||||
@Override
|
@Override
|
||||||
public boolean hasDisplayName() {
|
public boolean hasDisplayName() {
|
||||||
return this.displayName != null;
|
return this.displayName != null;
|
||||||
@@ -1156,6 +1168,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1292,6 +1304,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent));
|
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ index 0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4..f6ac13f91f08498a8adda7d34518a5cf
|
|||||||
@Override
|
@Override
|
||||||
public void setLore(List<String> lore) {
|
public void setLore(List<String> lore) {
|
||||||
if (lore == null || lore.isEmpty()) {
|
if (lore == null || lore.isEmpty()) {
|
||||||
@@ -1170,6 +1190,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1306,6 +1326,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ index 0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4..f6ac13f91f08498a8adda7d34518a5cf
|
|||||||
@Override
|
@Override
|
||||||
public boolean hasCustomModelData() {
|
public boolean hasCustomModelData() {
|
||||||
return this.customModelData != null;
|
return this.customModelData != null;
|
||||||
@@ -1882,6 +1917,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -2188,6 +2223,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Object object : addFrom) {
|
for (Object object : addFrom) {
|
@ -7,7 +7,7 @@ Bamboo - Both the minimum fully-grown height and the maximum are configurable
|
|||||||
- Machine_Maker
|
- Machine_Maker
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||||
index eda75b316acd09120539c92ff8adb97d92e9523f..e2951dd077441fe9cda461a2d3ef0c0671308316 100644
|
index 80bf98e7681cfde3a41ce5676425d5e96089500d..5e88bd02f5c53124f1aeec3eae727a1f83cc8238 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||||
@@ -137,7 +137,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
@@ -137,7 +137,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||||
@ -19,7 +19,7 @@ index eda75b316acd09120539c92ff8adb97d92e9523f..e2951dd077441fe9cda461a2d3ef0c06
|
|||||||
this.growBamboo(state, world, pos, random, i);
|
this.growBamboo(state, world, pos, random, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
@@ -164,7 +164,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||||
int i = this.getHeightAboveUpToMax(world, pos);
|
int i = this.getHeightAboveUpToMax(world, pos);
|
||||||
int j = this.getHeightBelowUpToMax(world, pos);
|
int j = this.getHeightBelowUpToMax(world, pos);
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ index eda75b316acd09120539c92ff8adb97d92e9523f..e2951dd077441fe9cda461a2d3ef0c06
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -187,7 +187,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
@@ -183,7 +183,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||||
BlockPos blockposition1 = pos.above(i);
|
BlockPos blockposition1 = pos.above(i);
|
||||||
BlockState iblockdata1 = world.getBlockState(blockposition1);
|
BlockState iblockdata1 = world.getBlockState(blockposition1);
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ index eda75b316acd09120539c92ff8adb97d92e9523f..e2951dd077441fe9cda461a2d3ef0c06
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
@@ -224,7 +224,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
int j = (Integer) state.getValue(BambooStalkBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
|
int j = (Integer) state.getValue(BambooStalkBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
|
||||||
@ -46,7 +46,7 @@ index eda75b316acd09120539c92ff8adb97d92e9523f..e2951dd077441fe9cda461a2d3ef0c06
|
|||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooStalkBlock.AGE, j)).setValue(BambooStalkBlock.LEAVES, blockpropertybamboosize)).setValue(BambooStalkBlock.STAGE, k), 3)) {
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooStalkBlock.AGE, j)).setValue(BambooStalkBlock.LEAVES, blockpropertybamboosize)).setValue(BambooStalkBlock.STAGE, k), 3)) {
|
||||||
@@ -243,7 +243,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
@@ -239,7 +239,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||||
protected int getHeightAboveUpToMax(BlockGetter world, BlockPos pos) {
|
protected int getHeightAboveUpToMax(BlockGetter world, BlockPos pos) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ index eda75b316acd09120539c92ff8adb97d92e9523f..e2951dd077441fe9cda461a2d3ef0c06
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
@@ -249,7 +249,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||||
protected int getHeightBelowUpToMax(BlockGetter world, BlockPos pos) {
|
protected int getHeightBelowUpToMax(BlockGetter world, BlockPos pos) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -65,10 +65,10 @@ index eda75b316acd09120539c92ff8adb97d92e9523f..e2951dd077441fe9cda461a2d3ef0c06
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
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 c7e462a187196da906aec3b528f7945afec9f6b0..fd344c5cf0d6d523abe34d5e3f8d939106942cbb 100644
|
index de3df6606979171fd39fa6c5207fd9b0b668ba4e..de1b64e0cbe7f2de63f04262428c9e6ec340916e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||||
@@ -61,7 +61,7 @@ public class CactusBlock extends Block {
|
@@ -62,7 +62,7 @@ public class CactusBlock extends Block {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ index c7e462a187196da906aec3b528f7945afec9f6b0..fd344c5cf0d6d523abe34d5e3f8d9391
|
|||||||
|
|
||||||
int modifier = world.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution
|
int modifier = world.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
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 f034a7dbc0124353f8cb9b2c841226e73d83423a..c48c622e92cedeaa46b929c7adfedec98dd5a3fb 100644
|
index 161f70de43105c0b49b6c4d0a371dc6036c6813c..547ea09ed84595286c97c128b3b96f6d387ae25f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||||
@@ -59,7 +59,7 @@ public class SugarCaneBlock extends Block {
|
@@ -59,7 +59,7 @@ public class SugarCaneBlock extends Block {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable baby zombie movement speed
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||||
index 60a9db4131bcf69a33003b83db6117c9a7a83276..393a9c704f4637a0e8031328d2a0facef4723dd8 100644
|
index 6845a8e13cdc9dd03015ac53b2a62dd706def5cd..3836d9255ac326a7220e1decd2e9d98be7884c17 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||||
@@ -75,7 +75,7 @@ import org.bukkit.event.entity.EntityTransformEvent;
|
@@ -77,7 +77,7 @@ import org.bukkit.event.entity.EntityTransformEvent;
|
||||||
public class Zombie extends Monster {
|
public class Zombie extends Monster {
|
||||||
|
|
||||||
private static final ResourceLocation SPEED_MODIFIER_BABY_ID = ResourceLocation.withDefaultNamespace("baby");
|
private static final ResourceLocation SPEED_MODIFIER_BABY_ID = ResourceLocation.withDefaultNamespace("baby");
|
||||||
@ -17,7 +17,7 @@ index 60a9db4131bcf69a33003b83db6117c9a7a83276..393a9c704f4637a0e8031328d2a0face
|
|||||||
private static final ResourceLocation REINFORCEMENT_CALLER_CHARGE_ID = ResourceLocation.withDefaultNamespace("reinforcement_caller_charge");
|
private static final ResourceLocation REINFORCEMENT_CALLER_CHARGE_ID = ResourceLocation.withDefaultNamespace("reinforcement_caller_charge");
|
||||||
private static final AttributeModifier ZOMBIE_REINFORCEMENT_CALLEE_CHARGE = new AttributeModifier(ResourceLocation.withDefaultNamespace("reinforcement_callee_charge"), -0.05000000074505806D, AttributeModifier.Operation.ADD_VALUE);
|
private static final AttributeModifier ZOMBIE_REINFORCEMENT_CALLEE_CHARGE = new AttributeModifier(ResourceLocation.withDefaultNamespace("reinforcement_callee_charge"), -0.05000000074505806D, AttributeModifier.Operation.ADD_VALUE);
|
||||||
private static final ResourceLocation LEADER_ZOMBIE_BONUS_ID = ResourceLocation.withDefaultNamespace("leader_zombie_bonus");
|
private static final ResourceLocation LEADER_ZOMBIE_BONUS_ID = ResourceLocation.withDefaultNamespace("leader_zombie_bonus");
|
||||||
@@ -188,9 +188,9 @@ public class Zombie extends Monster {
|
@@ -186,9 +186,9 @@ public class Zombie extends Monster {
|
||||||
if (this.level() != null && !this.level().isClientSide) {
|
if (this.level() != null && !this.level().isClientSide) {
|
||||||
AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
||||||
|
|
@ -5,11 +5,11 @@ Subject: [PATCH] Configurable fishing time ranges
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
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 0acb45014039d4392988c7d853595f96e856af4a..ed43ad94ca007a54e3c32d5e17c141048eeb5835 100644
|
index 0f3e3f1b918ed2971440b7414ae62ee018a85b3e..ed378bc8135c329cb7423da06eb26fff69ee4954 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
@@ -94,6 +94,10 @@ public class FishingHook extends Projectile {
|
@@ -93,6 +93,10 @@ public class FishingHook extends Projectile {
|
||||||
this.noCulling = true;
|
this.currentState = FishingHook.FishHookState.FLYING;
|
||||||
this.luck = Math.max(0, luckBonus);
|
this.luck = Math.max(0, luckBonus);
|
||||||
this.lureSpeed = Math.max(0, waitTimeReductionTicks);
|
this.lureSpeed = Math.max(0, waitTimeReductionTicks);
|
||||||
+ // Paper start - Configurable fishing time ranges
|
+ // Paper start - Configurable fishing time ranges
|
||||||
@ -19,7 +19,7 @@ index 0acb45014039d4392988c7d853595f96e856af4a..ed43ad94ca007a54e3c32d5e17c14104
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
|
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
|
||||||
@@ -411,7 +415,7 @@ public class FishingHook extends Projectile {
|
@@ -416,7 +420,7 @@ public class FishingHook extends Projectile {
|
||||||
} else {
|
} else {
|
||||||
// CraftBukkit start - logic to modify fishing wait time
|
// CraftBukkit start - logic to modify fishing wait time
|
||||||
this.timeUntilLured = Mth.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
|
this.timeUntilLured = Mth.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow nerfed mobs to jump
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index 930b5002aa6eaa1137314f7b38fad99778b6edaa..0593d828c911c94c9833bf12b9c294e5dac1f4e8 100644
|
index 02a2fdf2a4bdfb390d23bf45211b71798de422fa..9b26f6a7526f875535738b1f22d9aa458845eb8e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -124,6 +124,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
@@ -127,6 +127,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
private final BodyRotationControl bodyRotationControl;
|
private final BodyRotationControl bodyRotationControl;
|
||||||
protected PathNavigation navigation;
|
protected PathNavigation navigation;
|
||||||
public GoalSelector goalSelector;
|
public GoalSelector goalSelector;
|
||||||
@ -16,7 +16,7 @@ index 930b5002aa6eaa1137314f7b38fad99778b6edaa..0593d828c911c94c9833bf12b9c294e5
|
|||||||
public GoalSelector targetSelector;
|
public GoalSelector targetSelector;
|
||||||
@Nullable
|
@Nullable
|
||||||
private LivingEntity target;
|
private LivingEntity target;
|
||||||
@@ -888,7 +889,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
@@ -886,7 +887,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
@Override
|
@Override
|
||||||
protected final void serverAiStep() {
|
protected final void serverAiStep() {
|
||||||
++this.noActionTime;
|
++this.noActionTime;
|
||||||
@ -30,7 +30,7 @@ index 930b5002aa6eaa1137314f7b38fad99778b6edaa..0593d828c911c94c9833bf12b9c294e5
|
|||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end - Allow nerfed mobs to jump and float
|
+ // Paper end - Allow nerfed mobs to jump and float
|
||||||
ProfilerFiller gameprofilerfiller = this.level().getProfiler();
|
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||||
|
|
||||||
gameprofilerfiller.push("sensing");
|
gameprofilerfiller.push("sensing");
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user