Start working on 1.20

This commit is contained in:
Nassim Jahnke 2023-06-07 18:24:39 +02:00
parent 1004620742
commit 1bda3d4d2a
1002 changed files with 153 additions and 206 deletions

View File

@ -38,7 +38,7 @@ How To (Plugin Developers)
<dependency> <dependency>
<groupId>io.papermc.paper</groupId> <groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId> <artifactId>paper-api</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version> <version>1.20-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
``` ```
@ -54,7 +54,7 @@ repositories {
} }
dependencies { dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.20-R0.1-SNAPSHOT")
} }
java { java {

View File

@ -61,7 +61,7 @@ repositories {
} }
dependencies { dependencies {
paramMappings("net.fabricmc:yarn:1.19.4+build.1:mergedv2") paramMappings("net.fabricmc:yarn:1.20+build.1:mergedv2")
remapper("net.fabricmc:tiny-remapper:0.8.6:fat") remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
decompiler("net.minecraftforge:forgeflower:2.0.627.2") decompiler("net.minecraftforge:forgeflower:2.0.627.2")
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6") spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6")
@ -133,7 +133,7 @@ allprojects {
tasks.collectAtsFromPatches { tasks.collectAtsFromPatches {
// Uncomment while updating for a new Minecraft version // Uncomment while updating for a new Minecraft version
// extraPatchDir.set(layout.projectDirectory.dir("patches/unapplied/server")) extraPatchDir.set(layout.projectDirectory.dir("patches/unapplied/server"))
} }
tasks.register("printMinecraftVersion") { tasks.register("printMinecraftVersion") {

View File

@ -1,6 +1,6 @@
group=io.papermc.paper group=io.papermc.paper
version=1.19.4-R0.1-SNAPSHOT version=1.20-R0.1-SNAPSHOT
mcVersion=1.19.4 mcVersion=1.20
org.gradle.caching=true org.gradle.caching=true
org.gradle.parallel=true org.gradle.parallel=true

View File

@ -135,11 +135,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @MinecraftExperimental // Paper + @MinecraftExperimental // Paper
+ @ApiStatus.Experimental // Paper + @ApiStatus.Experimental // Paper
BLOCK_BAMBOO_WOOD_FENCE_GATE_OPEN("block.bamboo_wood_fence_gate.open"), BLOCK_BAMBOO_WOOD_FENCE_GATE_OPEN("block.bamboo_wood_fence_gate.open"),
@MinecraftExperimental BLOCK_BAMBOO_WOOD_HANGING_SIGN_BREAK("block.bamboo_wood_hanging_sign.break"),
@ApiStatus.Experimental BLOCK_BAMBOO_WOOD_HANGING_SIGN_FALL("block.bamboo_wood_hanging_sign.fall"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa BLOCK_BAMBOO_WOOD_HANGING_SIGN_HIT("block.bamboo_wood_hanging_sign.hit"),
@MinecraftExperimental BLOCK_BAMBOO_WOOD_HANGING_SIGN_PLACE("block.bamboo_wood_hanging_sign.place"),
@ApiStatus.Experimental
BLOCK_BAMBOO_WOOD_HANGING_SIGN_STEP("block.bamboo_wood_hanging_sign.step"), BLOCK_BAMBOO_WOOD_HANGING_SIGN_STEP("block.bamboo_wood_hanging_sign.step"),
+ @MinecraftExperimental // Paper + @MinecraftExperimental // Paper
+ @ApiStatus.Experimental // Paper + @ApiStatus.Experimental // Paper
@ -209,44 +208,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
BLOCK_NOTE_BLOCK_IMITATE_ZOMBIE("block.note_block.imitate.zombie"), BLOCK_NOTE_BLOCK_IMITATE_ZOMBIE("block.note_block.imitate.zombie"),
BLOCK_NOTE_BLOCK_IRON_XYLOPHONE("block.note_block.iron_xylophone"), BLOCK_NOTE_BLOCK_IRON_XYLOPHONE("block.note_block.iron_xylophone"),
BLOCK_NOTE_BLOCK_PLING("block.note_block.pling"), BLOCK_NOTE_BLOCK_PLING("block.note_block.pling"),
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
ENTITY_BOAT_PADDLE_LAND("entity.boat.paddle_land"),
ENTITY_BOAT_PADDLE_WATER("entity.boat.paddle_water"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_AMBIENT("entity.camel.ambient"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_DASH("entity.camel.dash"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_DASH_READY("entity.camel.dash_ready"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_DEATH("entity.camel.death"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_EAT("entity.camel.eat"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_HURT("entity.camel.hurt"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_SADDLE("entity.camel.saddle"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_SIT("entity.camel.sit"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_STAND("entity.camel.stand"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_STEP("entity.camel.step"),
@MinecraftExperimental
+ @ApiStatus.Experimental // Paper
ENTITY_CAMEL_STEP_SAND("entity.camel.step_sand"),
ENTITY_CAT_AMBIENT("entity.cat.ambient"),
ENTITY_CAT_BEG_FOR_FOOD("entity.cat.beg_for_food"),
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Tag.java --- a/src/main/java/org/bukkit/Tag.java

View File

@ -16,4 +16,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ api("it.unimi.dsi:fastutil:8.5.6") + api("it.unimi.dsi:fastutil:8.5.6")
// Paper end // Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5") compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")

View File

@ -27,6 +27,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ extendsFrom(apiAndDocs) + extendsFrom(apiAndDocs)
+} +}
+ +
val annotationsVersion = "24.0.1"
dependencies { dependencies {
// api dependencies are listed transitively to API consumers // api dependencies are listed transitively to API consumers
api("com.google.guava:guava:31.1-jre") api("com.google.guava:guava:31.1-jre")
@ -49,11 +51,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ apiAndDocs("net.kyori:adventure-text-logger-slf4j") + apiAndDocs("net.kyori:adventure-text-logger-slf4j")
// Paper end // Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5") compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> { @@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
"https://guava.dev/releases/31.1-jre/api/docs/", "https://guava.dev/releases/31.1-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/", "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", - "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
+ // Paper start + // Paper start
+ //"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat + //"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat
@ -1542,7 +1544,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * Gets all the lines of text currently on the {@link Side#FRONT} of this sign. + * Gets all the lines of text currently on the {@link Side#FRONT} of this sign.
+ * + *
+ * @return List of components containing each line of text + * @return List of components containing each line of text
+ * @see #getSide(Side) + * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#lines()}.
+ */ + */
+ @NotNull + @NotNull
+ public java.util.List<net.kyori.adventure.text.Component> lines(); + public java.util.List<net.kyori.adventure.text.Component> lines();
@ -1555,9 +1557,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param index Line number to get the text from, starting at 0 + * @param index Line number to get the text from, starting at 0
+ * @throws IndexOutOfBoundsException Thrown when the line does not exist + * @throws IndexOutOfBoundsException Thrown when the line does not exist
+ * @return Text on the given line + * @return Text on the given line
+ * @see #getSide(Side) + * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#line(int)}.
+ */ + */
+ @NotNull + @NotNull
+ @Deprecated
+ public net.kyori.adventure.text.Component line(int index) throws IndexOutOfBoundsException; + public net.kyori.adventure.text.Component line(int index) throws IndexOutOfBoundsException;
+ +
+ /** + /**
@ -1569,49 +1572,46 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param index Line number to set the text at, starting from 0 + * @param index Line number to set the text at, starting from 0
+ * @param line New text to set at the specified index + * @param line New text to set at the specified index
+ * @throws IndexOutOfBoundsException If the index is out of the range 0..3 + * @throws IndexOutOfBoundsException If the index is out of the range 0..3
+ * @see #getSide(Side) + * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#line(int, net.kyori.adventure.text.Component)}.
+ */ + */
+ @Deprecated
+ public void line(int index, net.kyori.adventure.text.@NotNull Component line) throws IndexOutOfBoundsException; + public void line(int index, net.kyori.adventure.text.@NotNull Component line) throws IndexOutOfBoundsException;
+ // Paper end + // Paper end
/** /**
* Gets all the lines of text currently on the {@link Side#FRONT} of this sign. * Gets all the lines of text currently on the {@link Side#FRONT} of this sign.
@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable { *
* @see #getSide(Side) * @return Array of Strings containing each line of text
- * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#getLines()}.
+ * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#lines()}.
*/ */
@Deprecated
@NotNull @NotNull
+ @Deprecated // Paper
public String[] getLines();
/**
@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable { @@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
* @param index Line number to get the text from, starting at 0
* @return Text on the given line * @return Text on the given line
* @throws IndexOutOfBoundsException Thrown when the line does not exist * @throws IndexOutOfBoundsException Thrown when the line does not exist
* @see #getSide(Side) - * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#getLine(int)}.
+ * @deprecated in favour of {@link #line(int)} + * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#line(int)}.
*/ */
@Deprecated
@NotNull @NotNull
+ @Deprecated // Paper
public String getLine(int index) throws IndexOutOfBoundsException;
/**
@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable { @@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
* @param index Line number to set the text at, starting from 0
* @param line New text to set at the specified index * @param line New text to set at the specified index
* @throws IndexOutOfBoundsException If the index is out of the range 0..3 * @throws IndexOutOfBoundsException If the index is out of the range 0..3
* @see #getSide(Side) - * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#setLine(int, String)}.
+ * @deprecated in favour of {@link #line(int, net.kyori.adventure.text.Component)} + * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#line(int, net.kyori.adventure.text.Component)}.
*/ */
+ @Deprecated // Paper @Deprecated
public void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException; public void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException;
/**
diff --git a/src/main/java/org/bukkit/block/sign/SignSide.java b/src/main/java/org/bukkit/block/sign/SignSide.java diff --git a/src/main/java/org/bukkit/block/sign/SignSide.java b/src/main/java/org/bukkit/block/sign/SignSide.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/sign/SignSide.java --- a/src/main/java/org/bukkit/block/sign/SignSide.java
+++ b/src/main/java/org/bukkit/block/sign/SignSide.java +++ b/src/main/java/org/bukkit/block/sign/SignSide.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull; @@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
* Represents a side of a sign.
*/ */
@Experimental
public interface SignSide extends Colorable { public interface SignSide extends Colorable {
+ // Paper start + // Paper start
+ /** + /**

View File

@ -18,13 +18,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ // Paper end + // Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5") compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10")
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.10")
+ compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper + compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
- val annotations = "org.jetbrains:annotations-java5:23.0.0" - val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
+ val annotations = "org.jetbrains:annotations:23.0.0" // Paper - we don't want Java 5 annotations... + val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations...
compileOnly(annotations) compileOnly(annotations)
testCompileOnly(annotations) testCompileOnly(annotations)
@ -41,8 +41,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
options.links( options.links(
"https://guava.dev/releases/31.1-jre/api/docs/", "https://guava.dev/releases/31.1-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/", "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/", - "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
+ "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations + "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
) )
options.tags("apiNote:a:API Note:") options.tags("apiNote:a:API Note:")

View File

@ -41,6 +41,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ withJavadocJar() + withJavadocJar()
+} +}
+ +
+val annotationsVersion = "24.0.1"
+
+dependencies { +dependencies {
+ // api dependencies are listed transitively to API consumers + // api dependencies are listed transitively to API consumers
+ api("com.google.guava:guava:31.1-jre") + api("com.google.guava:guava:31.1-jre")
@ -49,11 +51,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ api("org.yaml:snakeyaml:1.33") + api("org.yaml:snakeyaml:1.33")
+ api("org.joml:joml:1.10.5") + api("org.joml:joml:1.10.5")
+ +
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.5") + compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") + compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10")
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") + compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.10")
+ +
+ val annotations = "org.jetbrains:annotations-java5:23.0.0" + val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
+ compileOnly(annotations) + compileOnly(annotations)
+ testCompileOnly(annotations) + testCompileOnly(annotations)
+ +
@ -98,7 +100,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ options.links( + options.links(
+ "https://guava.dev/releases/31.1-jre/api/docs/", + "https://guava.dev/releases/31.1-jre/api/docs/",
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/", + "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/", + "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", + "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
+ ) + )
+ options.tags("apiNote:a:API Note:") + options.tags("apiNote:a:API Note:")
@ -127,7 +129,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- -
- <groupId>org.spigotmc</groupId> - <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId> - <artifactId>spigot-api</artifactId>
- <version>1.19.4-R0.1-SNAPSHOT</version> - <version>1.20-R0.1-SNAPSHOT</version>
- <packaging>jar</packaging> - <packaging>jar</packaging>
- -
- <name>Spigot-API</name> - <name>Spigot-API</name>
@ -184,33 +186,33 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <dependency> - <dependency>
- <groupId>org.yaml</groupId> - <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId> - <artifactId>snakeyaml</artifactId>
- <version>1.33</version> - <version>2.0</version>
- <scope>compile</scope> - <scope>compile</scope>
- </dependency> - </dependency>
- <!-- not part of the API proper --> - <!-- not part of the API proper -->
- <dependency> - <dependency>
- <groupId>org.apache.maven</groupId> - <groupId>org.apache.maven</groupId>
- <artifactId>maven-resolver-provider</artifactId> - <artifactId>maven-resolver-provider</artifactId>
- <version>3.8.5</version> - <version>3.9.2</version>
- <scope>provided</scope> - <scope>provided</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>org.apache.maven.resolver</groupId> - <groupId>org.apache.maven.resolver</groupId>
- <artifactId>maven-resolver-connector-basic</artifactId> - <artifactId>maven-resolver-connector-basic</artifactId>
- <version>1.7.3</version> - <version>1.9.10</version>
- <scope>provided</scope> - <scope>provided</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>org.apache.maven.resolver</groupId> - <groupId>org.apache.maven.resolver</groupId>
- <artifactId>maven-resolver-transport-http</artifactId> - <artifactId>maven-resolver-transport-http</artifactId>
- <version>1.7.3</version> - <version>1.9.10</version>
- <scope>provided</scope> - <scope>provided</scope>
- </dependency> - </dependency>
- <!-- annotations --> - <!-- annotations -->
- <dependency> - <dependency>
- <groupId>org.jetbrains</groupId> - <groupId>org.jetbrains</groupId>
- <artifactId>annotations-java5</artifactId> - <artifactId>annotations-java5</artifactId>
- <version>23.0.0</version> - <version>24.0.1</version>
- <scope>provided</scope> - <scope>provided</scope>
- </dependency> - </dependency>
- <!-- testing --> - <!-- testing -->
@ -229,7 +231,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <dependency> - <dependency>
- <groupId>org.ow2.asm</groupId> - <groupId>org.ow2.asm</groupId>
- <artifactId>asm-tree</artifactId> - <artifactId>asm-tree</artifactId>
- <version>9.4</version> - <version>9.5</version>
- <scope>test</scope> - <scope>test</scope>
- </dependency> - </dependency>
- </dependencies> - </dependencies>
@ -317,7 +319,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <links> - <links>
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link> - <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.33/</link> - <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.33/</link>
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/</link> - <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/24.0.1/</link>
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link> - <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
- </links> - </links>
- <tags> - <tags>
@ -343,7 +345,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <plugin> - <plugin>
- <groupId>org.apache.maven.plugins</groupId> - <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId> - <artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.2.1</version> - <version>3.3.0</version>
- <executions> - <executions>
- <execution> - <execution>
- <phase>process-classes</phase> - <phase>process-classes</phase>

View File

@ -988,8 +988,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * Setting to show/hide armor trim from leather armor. - * Setting to show/hide armor trim from leather armor.
+ * Setting to show/hide armor trim from armor. + * Setting to show/hide armor trim from armor.
*/ */
@MinecraftExperimental HIDE_ARMOR_TRIM;
@ApiStatus.Experimental }
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java

View File

@ -12,10 +12,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
implementation("org.ow2.asm:asm-commons:9.4") implementation("org.ow2.asm:asm-commons:9.4")
// Paper end // Paper end
- compileOnly("org.apache.maven:maven-resolver-provider:3.8.5") - compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
+ api("org.apache.maven:maven-resolver-provider:3.8.5") // Paper, expose + api("org.apache.maven:maven-resolver-provider:3.9.2")
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10")
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.10")
compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
diff --git a/src/main/java/io/papermc/paper/plugin/PermissionManager.java b/src/main/java/io/papermc/paper/plugin/PermissionManager.java diff --git a/src/main/java/io/papermc/paper/plugin/PermissionManager.java b/src/main/java/io/papermc/paper/plugin/PermissionManager.java
new file mode 100644 new file mode 100644

View File

@ -19,8 +19,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
/** /**
* Setting to show/hide dyes from colored leather armor. * Setting to show/hide dyes from colored leather armor.
@@ -0,0 +0,0 @@ public enum ItemFlag { @@ -0,0 +0,0 @@ public enum ItemFlag {
@MinecraftExperimental * Setting to show/hide armor trim from armor.
@ApiStatus.Experimental */
HIDE_ARMOR_TRIM; HIDE_ARMOR_TRIM;
+ // Paper start + // Paper start
+ /** + /**

View File

@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ implementation("org.ow2.asm:asm-commons:9.4") + implementation("org.ow2.asm:asm-commons:9.4")
// Paper end // Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5") compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000

View File

@ -29,51 +29,39 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
*/ */
STICKS(0x3), STICKS(0x3),
@@ -0,0 +0,0 @@ public enum Instrument { @@ -0,0 +0,0 @@ public enum Instrument {
/**
* Zombie is normally played when a Zombie Head is on top of the note block.
*/ */
@MinecraftExperimental
@ApiStatus.Experimental
- ZOMBIE, - ZOMBIE,
+ ZOMBIE(0x10), // Paper + ZOMBIE(0x10), // Paper
/** /**
* Skeleton is normally played when a Skeleton Head is on top of the note block. * Skeleton is normally played when a Skeleton Head is on top of the note block.
*/ */
@MinecraftExperimental
@ApiStatus.Experimental
- SKELETON, - SKELETON,
+ SKELETON(0x11), // Paper + SKELETON(0x11), // Paper
/** /**
* Creeper is normally played when a Creeper Head is on top of the note block. * Creeper is normally played when a Creeper Head is on top of the note block.
*/ */
@MinecraftExperimental
@ApiStatus.Experimental
- CREEPER, - CREEPER,
+ CREEPER(0x12), // Paper + CREEPER(0x12), // Paper
/** /**
* Dragon is normally played when a Dragon Head is on top of the note block. * Dragon is normally played when a Dragon Head is on top of the note block.
*/ */
@MinecraftExperimental
@ApiStatus.Experimental
- DRAGON, - DRAGON,
+ DRAGON(0x13), // Paper + DRAGON(0x13), // Paper
/** /**
* Wither Skeleton is normally played when a Wither Skeleton Head is on top of the note block. * Wither Skeleton is normally played when a Wither Skeleton Head is on top of the note block.
*/ */
@MinecraftExperimental
@ApiStatus.Experimental
- WITHER_SKELETON, - WITHER_SKELETON,
+ WITHER_SKELETON(0x14), // Paper + WITHER_SKELETON(0x14), // Paper
/** /**
* Piglin is normally played when a Piglin Head is on top of the note block. * Piglin is normally played when a Piglin Head is on top of the note block.
*/ */
@MinecraftExperimental
@ApiStatus.Experimental
- PIGLIN, - PIGLIN,
+ PIGLIN(0x15), // Paper + PIGLIN(0x15), // Paper
/** /**
* Custom Sound is normally played when a Player Head with the required data is on top of the note block. * Custom Sound is normally played when a Player Head with the required data is on top of the note block.
*/ */
@MinecraftExperimental
@ApiStatus.Experimental
- CUSTOM_HEAD; - CUSTOM_HEAD;
+ CUSTOM_HEAD(0x16); // Paper + CUSTOM_HEAD(0x16); // Paper

View File

@ -19,8 +19,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
implementation("org.ow2.asm:asm:9.4") implementation("org.ow2.asm:asm:9.4")
+ implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation + implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
implementation("commons-lang:commons-lang:2.6") implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2") runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.0.32") runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
@@ -0,0 +0,0 @@ dependencies { @@ -0,0 +0,0 @@ dependencies {
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
@ -78,7 +78,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ 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, -21); 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java

View File

@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Override @Override
- protected void actuallyHurt(DamageSource source, float amount) { - protected void actuallyHurt(DamageSource source, float amount) {
+ protected boolean damageEntity0(DamageSource source, float amount) { // Paper - fix CB method rename issue + protected boolean damageEntity0(DamageSource source, float amount) { // Paper - fix CB method rename issue
this.standUpPanic(); this.standUpInstantly();
- super.actuallyHurt(source, amount); - super.actuallyHurt(source, amount);
+ return super.damageEntity0(source, amount); // Paper - fix CB method rename issue + return super.damageEntity0(source, amount); // Paper - fix CB method rename issue
} }
@ -89,14 +89,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -0,0 +0,0 @@ public final class CraftServer implements Server {
Validate.notNull(key, "NamespacedKey cannot be null"); Validate.notNull(key, "NamespacedKey cannot be null");
LootTables registry = this.getServer().getLootTables(); LootDataManager registry = this.getServer().getLootData();
- return new CraftLootTable(key, registry.get(CraftNamespacedKey.toMinecraft(key))); - return new CraftLootTable(key, registry.getLootTable(CraftNamespacedKey.toMinecraft(key)));
+ // Paper start - honor method contract + // Paper start - honor method contract
+ final ResourceLocation lootTableKey = CraftNamespacedKey.toMinecraft(key); + final ResourceLocation lootTableKey = CraftNamespacedKey.toMinecraft(key);
+ if (!registry.getIds().contains(lootTableKey)) { + if (registry.getLootTable(lootTableKey) == net.minecraft.world.level.storage.loot.LootTable.EMPTY) {
+ return null; + return null;
+ } + }
+ return new CraftLootTable(key, registry.get(lootTableKey)); + return new CraftLootTable(key, registry.getLootTable(lootTableKey));
+ // Paper end + // Paper end
} }

View File

@ -139,12 +139,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider @@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
@Override @Override
protected void customServerAiStep() { protected void customServerAiStep() {
this.level.getProfiler().push("camelBrain"); this.level().getProfiler().push("camelBrain");
- Brain<?> brain = this.getBrain(); - Brain<?> brain = this.getBrain();
+ Brain<Camel> brain = (Brain<Camel>) this.getBrain(); // Paper - decompile fix + Brain<Camel> brain = (Brain<Camel>) this.getBrain(); // Paper - decompile fix
brain.tick((ServerLevel)this.level, this); brain.tick((ServerLevel)this.level(), this);
this.level.getProfiler().pop(); this.level().getProfiler().pop();
this.level.getProfiler().push("camelActivityUpdate"); this.level().getProfiler().push("camelActivityUpdate");
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java --- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java

View File

@ -5559,7 +5559,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- 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
@@ -0,0 +0,0 @@ public class ChunkHolder { @@ -0,0 +0,0 @@ public class ChunkHolder {
private static final int BLOCKS_BEFORE_RESEND_FUDGE = 64; private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList();
private final AtomicReferenceArray<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> futures; private final AtomicReferenceArray<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> futures;
private final LevelHeightAccessor levelHeightAccessor; private final LevelHeightAccessor levelHeightAccessor;
- private volatile CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> fullChunkFuture; - private volatile CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> fullChunkFuture;
@ -5572,7 +5572,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Nullable @Nullable
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory; private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
@@ -0,0 +0,0 @@ public class ChunkHolder { @@ -0,0 +0,0 @@ public class ChunkHolder {
private boolean resendLight; private boolean wasAccessibleSinceLastSave;
private CompletableFuture<Void> pendingFullStateConfirmation; private CompletableFuture<Void> pendingFullStateConfirmation;
+ private final ChunkMap chunkMap; // Paper + private final ChunkMap chunkMap; // Paper
@ -5615,7 +5615,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public LevelChunk getFullChunkNow() { public LevelChunk getFullChunkNow() {
// Note: We use the oldTicketLevel for isLoaded checks. // Note: We use the oldTicketLevel for isLoaded checks.
@@ -0,0 +0,0 @@ public class ChunkHolder { @@ -0,0 +0,0 @@ public class ChunkHolder {
return ChunkHolder.getStatus(this.ticketLevel).isOrAfter(leastStatus) ? this.getFutureIfPresentUnchecked(leastStatus) : ChunkHolder.UNLOADED_CHUNK_FUTURE; return ChunkLevel.generationStatus(this.ticketLevel).isOrAfter(leastStatus) ? this.getFutureIfPresentUnchecked(leastStatus) : ChunkHolder.UNLOADED_CHUNK_FUTURE;
} }
- public CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> getTickingChunkFuture() { - public CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> getTickingChunkFuture() {
@ -5680,7 +5680,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
@@ -0,0 +0,0 @@ public class ChunkHolder { @@ -0,0 +0,0 @@ public class ChunkHolder {
return ChunkHolder.getFullChunkStatus(this.ticketLevel); return ChunkLevel.fullStatus(this.ticketLevel);
} }
- public ChunkPos getPos() { - public ChunkPos getPos() {
@ -5699,7 +5699,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (!flag2 && flag3) { if (!flag2 && flag3) {
+ int expectCreateCount = ++this.fullChunkCreateCount; // Paper + int expectCreateCount = ++this.fullChunkCreateCount; // Paper
this.fullChunkFuture = chunkStorage.prepareAccessibleChunk(this); this.fullChunkFuture = chunkStorage.prepareAccessibleChunk(this);
this.scheduleFullChunkPromotion(chunkStorage, this.fullChunkFuture, executor, ChunkHolder.FullChunkStatus.BORDER); this.scheduleFullChunkPromotion(chunkStorage, this.fullChunkFuture, executor, FullChunkStatus.FULL);
+ // Paper start - cache ticking ready status + // Paper start - cache ticking ready status
+ this.fullChunkFuture.thenAccept(either -> { + this.fullChunkFuture.thenAccept(either -> {
+ final Optional<LevelChunk> left = either.left(); + final Optional<LevelChunk> left = either.left();
@ -5724,11 +5724,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.isFullChunkReady = false; // Paper - cache ticking ready status + this.isFullChunkReady = false; // Paper - cache ticking ready status
} }
boolean flag4 = playerchunk_state.isOrAfter(ChunkHolder.FullChunkStatus.TICKING); boolean flag4 = fullchunkstatus.isOrAfter(FullChunkStatus.BLOCK_TICKING);
@@ -0,0 +0,0 @@ public class ChunkHolder { @@ -0,0 +0,0 @@ public class ChunkHolder {
if (!flag4 && flag5) { if (!flag4 && flag5) {
this.tickingChunkFuture = chunkStorage.prepareTickingChunk(this); this.tickingChunkFuture = chunkStorage.prepareTickingChunk(this);
this.scheduleFullChunkPromotion(chunkStorage, this.tickingChunkFuture, executor, ChunkHolder.FullChunkStatus.TICKING); this.scheduleFullChunkPromotion(chunkStorage, this.tickingChunkFuture, executor, FullChunkStatus.BLOCK_TICKING);
+ // Paper start - cache ticking ready status + // Paper start - cache ticking ready status
+ this.tickingChunkFuture.thenAccept(either -> { + this.tickingChunkFuture.thenAccept(either -> {
+ either.ifLeft(chunk -> { + either.ifLeft(chunk -> {
@ -5754,8 +5754,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class ChunkHolder { @@ -0,0 +0,0 @@ public class ChunkHolder {
this.entityTickingChunkFuture = chunkStorage.prepareEntityTickingChunk(this.pos); this.entityTickingChunkFuture = chunkStorage.prepareEntityTickingChunk(this);
this.scheduleFullChunkPromotion(chunkStorage, this.entityTickingChunkFuture, executor, ChunkHolder.FullChunkStatus.ENTITY_TICKING); this.scheduleFullChunkPromotion(chunkStorage, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING);
+ // Paper start - cache ticking ready status + // Paper start - cache ticking ready status
+ this.entityTickingChunkFuture.thenAccept(either -> { + this.entityTickingChunkFuture.thenAccept(either -> {
+ either.ifLeft(chunk -> { + either.ifLeft(chunk -> {
@ -5885,13 +5885,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public final int getEffectiveViewDistance() { + public final int getEffectiveViewDistance() {
+ // TODO this needs to be checked on update + // TODO this needs to be checked on update
+ // Mojang currently sets it to +1 of the configured view distance. So subtract one to get the one we really want. + // Mojang currently sets it to +1 of the configured view distance. So subtract one to get the one we really want.
+ return this.viewDistance - 1; + //TODO check if +0 is correct now
+ return this.viewDistance;
+ } + }
+ // Paper end + // Paper end
+ +
private CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture(ChunkPos centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus) { private CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture(ChunkHolder centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus) {
List<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> list = new ArrayList(); if (margin == 0) {
List<ChunkHolder> list1 = new ArrayList(); ChunkStatus chunkstatus = (ChunkStatus) distanceToStatus.apply(0);
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}; };
@ -5990,7 +5991,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.viewDistance = j; this.viewDistance = j;
this.distanceManager.updatePlayerTickets(this.viewDistance + 1); this.distanceManager.updatePlayerTickets(this.viewDistance);
- ObjectIterator objectiterator = this.updatingChunkMap.values().iterator(); - ObjectIterator objectiterator = this.updatingChunkMap.values().iterator();
+ Iterator objectiterator = io.papermc.paper.chunk.system.ChunkSystem.getUpdatingChunkHolders(this.level).iterator(); // Paper + Iterator objectiterator = io.papermc.paper.chunk.system.ChunkSystem.getUpdatingChunkHolders(this.level).iterator(); // Paper
@ -6525,7 +6526,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end + // Paper end
+ +
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer // Add env and gen to constructor, IWorldDataServer -> WorldDataServer
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @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 // IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@ -6603,7 +6604,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ player.isRealPlayer = true; // Paper + player.isRealPlayer = true; // Paper
GameProfile gameprofile = player.getGameProfile(); GameProfile gameprofile = player.getGameProfile();
GameProfileCache usercache = this.server.getProfileCache(); GameProfileCache usercache = this.server.getProfileCache();
Optional<GameProfile> optional = usercache.get(gameprofile.getId()); String s;
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java --- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
@ -6673,7 +6674,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public org.bukkit.craftbukkit.entity.CraftCreature getBukkitCreature() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper + public org.bukkit.craftbukkit.entity.CraftCreature getBukkitCreature() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper
+ +
public float getWalkTargetValue(BlockPos pos) { public float getWalkTargetValue(BlockPos pos) {
return this.getWalkTargetValue(pos, this.level); return this.getWalkTargetValue(pos, this.level());
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/Monster.java b/src/main/java/net/minecraft/world/entity/monster/Monster.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Monster.java b/src/main/java/net/minecraft/world/entity/monster/Monster.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@ -6921,14 +6922,15 @@ diff --git a/src/main/java/net/minecraft/world/level/LevelReader.java b/src/main
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
@@ -0,0 +0,0 @@ import net.minecraft.world.level.levelgen.Heightmap; @@ -0,0 +0,0 @@ public interface LevelReader extends BlockAndTintGetter, CollisionGetter, Signal
import net.minecraft.world.phys.AABB;
public interface LevelReader extends BlockAndTintGetter, CollisionGetter, BiomeManager.NoiseBiomeSource {
+ @Nullable ChunkAccess getChunkIfLoadedImmediately(int x, int z); // Paper - ifLoaded api (we need this since current impl blocks if the chunk is loading)
@Nullable @Nullable
ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create); ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create);
+ @Nullable ChunkAccess getChunkIfLoadedImmediately(int x, int z); // Paper - ifLoaded api (we need this since current impl blocks if the chunk is loading)
+
/** @deprecated */
@Deprecated
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java --- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
@ -6994,8 +6996,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private final int lightEmission; public final int getEmittedLight() { return this.lightEmission; } // Paper - OBFHELPER + private final int lightEmission; public final int getEmittedLight() { return this.lightEmission; } // Paper - OBFHELPER
+ private final boolean useShapeForLightOcclusion; public final boolean isTransparentOnSomeFaces() { return this.useShapeForLightOcclusion; } // Paper - OBFHELPER + private final boolean useShapeForLightOcclusion; public final boolean isTransparentOnSomeFaces() { return this.useShapeForLightOcclusion; } // Paper - OBFHELPER
private final boolean isAir; private final boolean isAir;
private final Material material; private final boolean ignitedByLava;
private final MaterialColor materialColor; /** @deprecated */
@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement {
private final MapColor mapColor;
public final float destroySpeed; public final float destroySpeed;
private final boolean requiresCorrectToolForDrops; private final boolean requiresCorrectToolForDrops;
- private final boolean canOcclude; - private final boolean canOcclude;
@ -7004,7 +7008,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private final BlockBehaviour.StatePredicate isSuffocating; private final BlockBehaviour.StatePredicate isSuffocating;
private final BlockBehaviour.StatePredicate isViewBlocking; private final BlockBehaviour.StatePredicate isViewBlocking;
@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement {
this.spawnParticlesOnBreak = blockbase_info.spawnParticlesOnBreak; }
} }
+ // Paper start + // Paper start
@ -7022,8 +7026,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
+ 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();
} }
@@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -0,0 +0,0 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.getBlock().getOcclusionShape(this.asState(), world, pos); return this.getBlock().getOcclusionShape(this.asState(), world, pos);
} }
@ -7051,7 +7055,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom @@ -0,0 +0,0 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
// CraftBukkit end // CraftBukkit end
public ChunkAccess(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biome, long inhabitedTime, @Nullable LevelChunkSection[] sectionArrayInitializer, @Nullable BlendingData blendingData) { public ChunkAccess(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biomeRegistry, long inhabitedTime, @Nullable LevelChunkSection[] sectionArray, @Nullable BlendingData blendingData) {
- this.chunkPos = pos; - this.chunkPos = pos;
+ this.locX = pos.x; this.locZ = pos.z; // Paper - reduce need for field lookups + this.locX = pos.x; this.locZ = pos.z; // Paper - reduce need for field lookups
+ this.chunkPos = pos; this.coordinateKey = ChunkPos.asLong(locX, locZ); // Paper - cache long key + this.chunkPos = pos; this.coordinateKey = ChunkPos.asLong(locX, locZ); // Paper - cache long key
@ -7062,14 +7066,6 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
@@ -0,0 +0,0 @@ import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
import net.minecraft.server.level.ChunkHolder;
+import net.minecraft.server.level.ServerChunkCache;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.world.entity.Entity;
@@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess { @@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess {
public boolean needsDecoration; public boolean needsDecoration;
// CraftBukkit end // CraftBukkit end
@ -7214,7 +7210,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - neighbour cache + // Paper start - neighbour cache
+ int chunkX = this.chunkPos.x; + int chunkX = this.chunkPos.x;
+ int chunkZ = this.chunkPos.z; + int chunkZ = this.chunkPos.z;
+ ServerChunkCache chunkProvider = this.level.getChunkSource(); + net.minecraft.server.level.ServerChunkCache chunkProvider = this.level.getChunkSource();
+ for (int dx = -NEIGHBOUR_CACHE_RADIUS; dx <= NEIGHBOUR_CACHE_RADIUS; ++dx) { + for (int dx = -NEIGHBOUR_CACHE_RADIUS; dx <= NEIGHBOUR_CACHE_RADIUS; ++dx) {
+ for (int dz = -NEIGHBOUR_CACHE_RADIUS; dz <= NEIGHBOUR_CACHE_RADIUS; ++dz) { + for (int dz = -NEIGHBOUR_CACHE_RADIUS; dz <= NEIGHBOUR_CACHE_RADIUS; ++dz) {
+ LevelChunk neighbour = chunkProvider.getChunkAtIfLoadedMainThreadNoCache(chunkX + dx, chunkZ + dz); + LevelChunk neighbour = chunkProvider.getChunkAtIfLoadedMainThreadNoCache(chunkX + dx, chunkZ + dz);
@ -7241,7 +7237,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - neighbour cache + // Paper start - neighbour cache
+ int chunkX = this.chunkPos.x; + int chunkX = this.chunkPos.x;
+ int chunkZ = this.chunkPos.z; + int chunkZ = this.chunkPos.z;
+ ServerChunkCache chunkProvider = this.level.getChunkSource(); + net.minecraft.server.level.ServerChunkCache chunkProvider = this.level.getChunkSource();
+ for (int dx = -NEIGHBOUR_CACHE_RADIUS; dx <= NEIGHBOUR_CACHE_RADIUS; ++dx) { + for (int dx = -NEIGHBOUR_CACHE_RADIUS; dx <= NEIGHBOUR_CACHE_RADIUS; ++dx) {
+ for (int dz = -NEIGHBOUR_CACHE_RADIUS; dz <= NEIGHBOUR_CACHE_RADIUS; ++dz) { + for (int dz = -NEIGHBOUR_CACHE_RADIUS; dz <= NEIGHBOUR_CACHE_RADIUS; ++dz) {
+ LevelChunk neighbour = chunkProvider.getChunkAtIfLoadedMainThreadNoCache(chunkX + dx, chunkZ + dz); + LevelChunk neighbour = chunkProvider.getChunkAtIfLoadedMainThreadNoCache(chunkX + dx, chunkZ + dz);

View File

@ -23,8 +23,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
+ implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files + implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
implementation("commons-lang:commons-lang:2.6") implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2") runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.0.32") runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
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..0000000000000000000000000000000000000000 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
@ -4468,16 +4468,16 @@ diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/ne
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/Services.java --- a/src/main/java/net/minecraft/server/Services.java
+++ b/src/main/java/net/minecraft/server/Services.java +++ b/src/main/java/net/minecraft/server/Services.java
@@ -0,0 +0,0 @@ import java.io.File; @@ -0,0 +0,0 @@ import javax.annotation.Nullable;
import net.minecraft.server.players.GameProfileCache; import net.minecraft.server.players.GameProfileCache;
import net.minecraft.util.SignatureValidator; import net.minecraft.util.SignatureValidator;
-public record Services(MinecraftSessionService sessionService, SignatureValidator serviceSignatureValidator, GameProfileRepository profileRepository, GameProfileCache profileCache) { -public record Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache) {
+// Paper start +// Paper start
+public record Services(MinecraftSessionService sessionService, SignatureValidator serviceSignatureValidator, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations) { +public record Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations) {
+ +
+ public Services(MinecraftSessionService sessionService, SignatureValidator signatureValidator, GameProfileRepository profileRepository, GameProfileCache profileCache) { + public Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache) {
+ this(sessionService, signatureValidator, profileRepository, profileCache, null); + this(sessionService, servicesKeySet, profileRepository, profileCache, null);
+ } + }
+ +
+ @Override + @Override
@ -4492,16 +4492,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
MinecraftSessionService minecraftSessionService = authenticationService.createMinecraftSessionService(); MinecraftSessionService minecraftSessionService = authenticationService.createMinecraftSessionService();
GameProfileRepository gameProfileRepository = authenticationService.createProfileRepository(); GameProfileRepository gameProfileRepository = authenticationService.createProfileRepository();
GameProfileCache gameProfileCache = new GameProfileCache(gameProfileRepository, new File(rootDirectory, "usercache.json")); GameProfileCache gameProfileCache = new GameProfileCache(gameProfileRepository, new File(rootDirectory, "usercache.json"));
SignatureValidator signatureValidator = SignatureValidator.from(authenticationService.getServicesKey()); - return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache);
- return new Services(minecraftSessionService, signatureValidator, gameProfileRepository, gameProfileCache);
+ // Paper start + // Paper start
+ final java.nio.file.Path legacyConfigPath = ((File) optionSet.valueOf("paper-settings")).toPath(); + final java.nio.file.Path legacyConfigPath = ((File) optionSet.valueOf("paper-settings")).toPath();
+ final java.nio.file.Path configDirPath = ((File) optionSet.valueOf("paper-settings-directory")).toPath(); + final java.nio.file.Path configDirPath = ((File) optionSet.valueOf("paper-settings-directory")).toPath();
+ io.papermc.paper.configuration.PaperConfigurations paperConfigurations = io.papermc.paper.configuration.PaperConfigurations.setup(legacyConfigPath, configDirPath, rootDirectory.toPath(), (File) optionSet.valueOf("spigot-settings")); + io.papermc.paper.configuration.PaperConfigurations paperConfigurations = io.papermc.paper.configuration.PaperConfigurations.setup(legacyConfigPath, configDirPath, rootDirectory.toPath(), (File) optionSet.valueOf("spigot-settings"));
+ return new Services(minecraftSessionService, signatureValidator, gameProfileRepository, gameProfileCache, paperConfigurations); + return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations);
+ // Paper end + // Paper end
} }
}
@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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java

View File

@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class BehaviorUtils { @@ -0,0 +0,0 @@ public class BehaviorUtils {
return optional.map((uuid) -> { return optional.map((uuid) -> {
return ((ServerLevel) entity.level).getEntity(uuid); return ((ServerLevel) entity.level()).getEntity(uuid);
- }).map((entity) -> { - }).map((entity) -> {
+ }).map((entity1) -> { // Paper - remap fix + }).map((entity1) -> { // Paper - remap fix
LivingEntity entityliving1; LivingEntity entityliving1;

View File

@ -48,12 +48,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ implementation("org.ow2.asm:asm:9.4") + implementation("org.ow2.asm:asm:9.4")
+ implementation("commons-lang:commons-lang:2.6") + implementation("commons-lang:commons-lang:2.6")
+ runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2") + runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
+ runtimeOnly("com.mysql:mysql-connector-j:8.0.32") + runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
+ +
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5") + runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.2")
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") + runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.10")
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") + runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.10")
+ +
+ testImplementation("junit:junit:4.13.2") + testImplementation("junit:junit:4.13.2")
+ testImplementation("org.hamcrest:hamcrest-library:1.3") + testImplementation("org.hamcrest:hamcrest-library:1.3")
@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <groupId>org.spigotmc</groupId> - <groupId>org.spigotmc</groupId>
- <artifactId>spigot</artifactId> - <artifactId>spigot</artifactId>
- <packaging>jar</packaging> - <packaging>jar</packaging>
- <version>1.19.4-R0.1-SNAPSHOT</version> - <version>1.20-R0.1-SNAPSHOT</version>
- <name>Spigot</name> - <name>Spigot</name>
- <url>https://www.spigotmc.org/</url> - <url>https://www.spigotmc.org/</url>
- -
@ -197,7 +197,7 @@ index 0000000000000000000000000000000000000000..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_19_R3</minecraft_version> - <minecraft_version>1_20_R1</minecraft_version>
- <maven.compiler.source>17</maven.compiler.source> - <maven.compiler.source>17</maven.compiler.source>
- <maven.compiler.target>17</maven.compiler.target> - <maven.compiler.target>17</maven.compiler.target>
- </properties> - </properties>
@ -251,19 +251,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <dependency> - <dependency>
- <groupId>com.mojang</groupId> - <groupId>com.mojang</groupId>
- <artifactId>authlib</artifactId> - <artifactId>authlib</artifactId>
- <version>3.17.30</version> - <version>4.0.43</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.0.18</version> - <version>1.1.8</version>
- <scope>compile</scope> - <scope>compile</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>com.mojang</groupId> - <groupId>com.mojang</groupId>
- <artifactId>datafixerupper</artifactId> - <artifactId>datafixerupper</artifactId>
- <version>6.0.6</version> - <version>6.0.8</version>
- <scope>compile</scope> - <scope>compile</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
@ -405,39 +405,39 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <dependency> - <dependency>
- <groupId>org.xerial</groupId> - <groupId>org.xerial</groupId>
- <artifactId>sqlite-jdbc</artifactId> - <artifactId>sqlite-jdbc</artifactId>
- <version>3.41.2.2</version> - <version>3.42.0.0</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.0.32</version> - <version>8.0.33</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 -->
- <dependency> - <dependency>
- <groupId>org.apache.maven</groupId> - <groupId>org.apache.maven</groupId>
- <artifactId>maven-resolver-provider</artifactId> - <artifactId>maven-resolver-provider</artifactId>
- <version>3.8.5</version> - <version>3.9.2</version>
- <scope>runtime</scope> - <scope>runtime</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>org.apache.maven.resolver</groupId> - <groupId>org.apache.maven.resolver</groupId>
- <artifactId>maven-resolver-connector-basic</artifactId> - <artifactId>maven-resolver-connector-basic</artifactId>
- <version>1.7.3</version> - <version>1.9.10</version>
- <scope>runtime</scope> - <scope>runtime</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>org.apache.maven.resolver</groupId> - <groupId>org.apache.maven.resolver</groupId>
- <artifactId>maven-resolver-transport-http</artifactId> - <artifactId>maven-resolver-transport-http</artifactId>
- <version>1.7.3</version> - <version>1.9.10</version>
- <scope>runtime</scope> - <scope>runtime</scope>
- </dependency> - </dependency>
- <!-- annotations --> - <!-- annotations -->
- <dependency> - <dependency>
- <groupId>org.jetbrains</groupId> - <groupId>org.jetbrains</groupId>
- <artifactId>annotations-java5</artifactId> - <artifactId>annotations-java5</artifactId>
- <version>23.0.0</version> - <version>24.0.1</version>
- <scope>provided</scope> - <scope>provided</scope>
- </dependency> - </dependency>
- <!-- testing --> - <!-- testing -->
@ -578,7 +578,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <plugin> - <plugin>
- <groupId>net.md-5</groupId> - <groupId>net.md-5</groupId>
- <artifactId>specialsource-maven-plugin</artifactId> - <artifactId>specialsource-maven-plugin</artifactId>
- <version>1.2.4</version> - <version>1.2.5</version>
- <executions> - <executions>
- <execution> - <execution>
- <phase>package</phase> - <phase>package</phase>
@ -623,7 +623,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <plugin> - <plugin>
- <groupId>org.apache.maven.plugins</groupId> - <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId> - <artifactId>maven-assembly-plugin</artifactId>
- <version>3.5.0</version> - <version>3.6.0</version>
- <executions> - <executions>
- <execution> - <execution>
- <phase>package</phase> - <phase>package</phase>
@ -668,7 +668,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <plugin> - <plugin>
- <groupId>org.apache.maven.plugins</groupId> - <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId> - <artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0</version> - <version>3.1.0</version>
- <configuration> - <configuration>
- <workingDirectory>${basedir}/target/test-server</workingDirectory> - <workingDirectory>${basedir}/target/test-server</workingDirectory>
- <excludes> - <excludes>
@ -697,7 +697,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <plugin> - <plugin>
- <groupId>org.apache.maven.plugins</groupId> - <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId> - <artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.2.1</version> - <version>3.3.0</version>
- <executions> - <executions>
- <execution> - <execution>
- <phase>test-compile</phase> - <phase>test-compile</phase>

View File

@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito + testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
implementation("commons-lang:commons-lang:2.6") implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2") runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.0.32") runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
diff --git a/src/test/java/io/papermc/paper/testing/DummyServer.java b/src/test/java/io/papermc/paper/testing/DummyServer.java diff --git a/src/test/java/io/papermc/paper/testing/DummyServer.java b/src/test/java/io/papermc/paper/testing/DummyServer.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
@ -74,7 +74,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ when(dummyServer.getLootTable(any(NamespacedKey.class))).thenAnswer(invocation -> { + when(dummyServer.getLootTable(any(NamespacedKey.class))).thenAnswer(invocation -> {
+ final NamespacedKey key = invocation.getArgument(0, NamespacedKey.class); + final NamespacedKey key = invocation.getArgument(0, NamespacedKey.class);
+ return new org.bukkit.craftbukkit.CraftLootTable(key, AbstractTestingBase.DATA_PACK.getLootTables().get(CraftNamespacedKey.toMinecraft(key))); + return new org.bukkit.craftbukkit.CraftLootTable(key, AbstractTestingBase.DATA_PACK.getLootData().getLootTable(CraftNamespacedKey.toMinecraft(key)));
+ }); + });
+ +
+ when(dummyServer.getRegistry(any())).thenAnswer(invocation -> { + when(dummyServer.getRegistry(any())).thenAnswer(invocation -> {
@ -240,7 +240,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- @Override - @Override
- public Object handle(DummyServer server, Object[] args) { - public Object handle(DummyServer server, Object[] args) {
- NamespacedKey key = (NamespacedKey) args[0]; - NamespacedKey key = (NamespacedKey) args[0];
- return new CraftLootTable(key, AbstractTestingBase.DATA_PACK.getLootTables().get(CraftNamespacedKey.toMinecraft(key))); - return new CraftLootTable(key, AbstractTestingBase.DATA_PACK.getLootData().getLootTable(CraftNamespacedKey.toMinecraft(key)));
- } - }
- } - }
- ); - );

Some files were not shown because too many files have changed in this diff Show More