mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
remove remaining POMs
This commit is contained in:
parent
36b107516b
commit
6d848fc4bf
26 changed files with 303 additions and 620 deletions
|
@ -1,204 +0,0 @@
|
|||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.destroystokyo.paper</groupId>
|
||||
<artifactId>paper-parent</artifactId>
|
||||
<version>dev-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.destroystokyo.paper</groupId>
|
||||
<artifactId>paper-mojangapi</artifactId>
|
||||
<version>1.16.5-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Paper-MojangAPI</name>
|
||||
<url>https://github.com/PaperMC/Paper</url>
|
||||
<description>API additions that utilize Mojang Specific API's</description>
|
||||
|
||||
<properties>
|
||||
<!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spigotmc-public</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype</id>
|
||||
<url>https://oss.sonatype.org/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>minecraft-libraries</id>
|
||||
<name>Minecraft Libraries</name>
|
||||
<url>https://libraries.minecraft.net</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spigotmc-public</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.destroystokyo.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- mojang api -->
|
||||
<dependency>
|
||||
<groupId>com.mojang</groupId>
|
||||
<artifactId>brigadier</artifactId>
|
||||
<version>1.0.17</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- utils -->
|
||||
<dependency>
|
||||
<groupId>it.unimi.dsi</groupId>
|
||||
<artifactId>fastutil</artifactId>
|
||||
<version>8.2.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- annotations -->
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>18.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- testing -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-library</artifactId>
|
||||
<version>1.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm-tree</artifactId>
|
||||
<version>7.3.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<dependencies>
|
||||
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-compiler-eclipse</artifactId>
|
||||
<version>2.8.5-spigotmc</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestEntries>
|
||||
<Automatic-Module-Name>org.bukkit</Automatic-Module-Name>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
|
||||
<!-- when downloading via Maven we can pull depends individually -->
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>development</id>
|
||||
<properties>
|
||||
<skipTests>false</skipTests>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<configLocation>checkstyle.xml</configLocation>
|
||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>8.29</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<version>1.18</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<signature>
|
||||
<groupId>org.codehaus.mojo.signature</groupId>
|
||||
<artifactId>java18</artifactId>
|
||||
<version>1.0</version>
|
||||
</signature>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
|
@ -17,20 +17,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.1")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0")
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -0,0 +0,0 @@
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
+ <dependency>
|
||||
+ <groupId>it.unimi.dsi</groupId>
|
||||
+ <artifactId>fastutil</artifactId>
|
||||
+ <version>8.2.2</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
|
|
|
@ -22,71 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.1")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0")
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -0,0 +0,0 @@
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
+ <adventure.version>4.7.0</adventure.version> <!-- Paper - When updating this make sure to update the linked JavaDocs on the homepage as well! -->
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
@@ -0,0 +0,0 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
+ <!-- Paper start -->
|
||||
+ <dependencyManagement>
|
||||
+ <dependencies>
|
||||
+ <dependency>
|
||||
+ <groupId>net.kyori</groupId>
|
||||
+ <artifactId>adventure-bom</artifactId>
|
||||
+ <version>${adventure.version}</version>
|
||||
+ <type>pom</type>
|
||||
+ <scope>import</scope>
|
||||
+ </dependency>
|
||||
+ </dependencies>
|
||||
+ </dependencyManagement>
|
||||
+ <!-- Paper end -->
|
||||
+
|
||||
<dependencies>
|
||||
+ <!-- Paper start -->
|
||||
+ <dependency>
|
||||
+ <groupId>net.kyori</groupId>
|
||||
+ <artifactId>adventure-api</artifactId>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>net.kyori</groupId>
|
||||
+ <artifactId>adventure-text-serializer-gson</artifactId>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>net.kyori</groupId>
|
||||
+ <artifactId>adventure-text-serializer-legacy</artifactId>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>net.kyori</groupId>
|
||||
+ <artifactId>adventure-text-serializer-plain</artifactId>
|
||||
+ </dependency>
|
||||
+ <!-- Paper end -->
|
||||
<dependency>
|
||||
<groupId>it.unimi.dsi</groupId>
|
||||
<artifactId>fastutil</artifactId>
|
||||
@@ -0,0 +0,0 @@
|
||||
<link>https://javadoc.io/doc/org.yaml/snakeyaml/1.27/</link>
|
||||
<link>https://javadoc.io/doc/org.jetbrains/annotations-java5/20.1.0/</link>
|
||||
<link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
|
||||
+ <!-- Paper start -->
|
||||
+ <link>https://jd.adventure.kyori.net/api/${adventure.version}/</link>
|
||||
+ <link>https://jd.adventure.kyori.net/text-serializer-gson/${adventure.version}/</link>
|
||||
+ <link>https://jd.adventure.kyori.net/text-serializer-legacy/${adventure.version}/</link>
|
||||
+ <link>https://jd.adventure.kyori.net/text-serializer-plain/${adventure.version}/</link>
|
||||
+ <!-- Paper end -->
|
||||
</links>
|
||||
</configuration>
|
||||
</plugin>
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
|
|
|
@ -4,42 +4,6 @@ Date: Thu, 3 Dec 2020 14:04:57 -0800
|
|||
Subject: [PATCH] Better AnnotationTest printout
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -0,0 +0,0 @@
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
</configuration>
|
||||
</plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-surefire-plugin</artifactId>
|
||||
+ <version>2.22.2</version>
|
||||
+ <configuration>
|
||||
+ <properties>
|
||||
+ <property>
|
||||
+ <name>listener</name>
|
||||
+ <value>io.papermc.paper.JunitEventListener</value>
|
||||
+ </property>
|
||||
+ </properties>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
diff --git a/src/test/java/io/papermc/paper/JunitEventListener.java b/src/test/java/io/papermc/paper/JunitEventListener.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/JunitEventListener.java
|
||||
@@ -0,0 +0,0 @@
|
||||
+package io.papermc.paper;
|
||||
+
|
||||
+import org.junit.runner.notification.RunListener;
|
||||
+
|
||||
+public class JunitEventListener extends RunListener {
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
|
|
|
@ -24,103 +24,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
compileOnly(annotations)
|
||||
testCompileOnly(annotations)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -0,0 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
+ <parent>
|
||||
+ <groupId>com.destroystokyo.paper</groupId>
|
||||
+ <artifactId>paper-parent</artifactId>
|
||||
+ <version>dev-SNAPSHOT</version>
|
||||
+ </parent>
|
||||
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
+ <groupId>com.destroystokyo.paper</groupId>
|
||||
+ <artifactId>paper-api</artifactId>
|
||||
<version>1.17-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
- <name>Spigot-API</name>
|
||||
- <url>https://www.spigotmc.org/</url>
|
||||
+ <name>Paper-API</name>
|
||||
+ <url>https://github.com/PaperMC/Paper</url>
|
||||
<description>An enhanced plugin API for Minecraft servers.</description>
|
||||
|
||||
<properties>
|
||||
- <skipTests>true</skipTests>
|
||||
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
- <distributionManagement>
|
||||
+ <repositories>
|
||||
<repository>
|
||||
- <id>spigotmc-releases</id>
|
||||
- <url>https://hub.spigotmc.org/nexus/content/repositories/releases/</url>
|
||||
+ <id>sonatype</id>
|
||||
+ <url>https://oss.sonatype.org/content/groups/public/</url>
|
||||
</repository>
|
||||
- <snapshotRepository>
|
||||
- <id>spigotmc-snapshots</id>
|
||||
- <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
- </snapshotRepository>
|
||||
- </distributionManagement>
|
||||
+ </repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -0,0 +0,0 @@
|
||||
<version>2.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
+ <!-- bundled with Minecraft, shouldn't ever change -->
|
||||
+ <dependency>
|
||||
+ <groupId>com.google.code.findbugs</groupId>
|
||||
+ <artifactId>jsr305</artifactId>
|
||||
+ <version>1.3.9</version>
|
||||
+ <scope>compile</scope>
|
||||
+ </dependency>
|
||||
+ <!-- used in previous versions of the API -->
|
||||
+ <dependency>
|
||||
+ <groupId>com.googlecode.json-simple</groupId>
|
||||
+ <artifactId>json-simple</artifactId>
|
||||
+ <version>1.1.1</version>
|
||||
+ <scope>compile</scope>
|
||||
+ </dependency>
|
||||
<!-- bundled with Minecraft, should be kept in sync -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
@@ -0,0 +0,0 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
+ <defaultGoal>clean install</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>net.md-5</groupId>
|
||||
@@ -0,0 +0,0 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
- <configuration>
|
||||
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
||||
- <compilerId>eclipse</compilerId>
|
||||
- </configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
@@ -0,0 +0,0 @@
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
+ <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
|
||||
<!-- when downloading via Maven we can pull depends individually -->
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
</configuration>
|
||||
|
|
|
@ -3,6 +3,9 @@ From: Kyle Wood <kyle@denwav.dev>
|
|||
Date: Thu, 10 Dec 2020 20:50:33 -0800
|
||||
Subject: [PATCH] Convert project to Gradle
|
||||
|
||||
The pom.xml file is deleted in this patch so the patch will fail to
|
||||
apply if there are changes made to it from upstream - thus notifying us
|
||||
that changes were made.
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
@ -87,3 +90,271 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/"
|
||||
+ )
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -0,0 +0,0 @@
|
||||
-
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
- <modelVersion>4.0.0</modelVersion>
|
||||
-
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
- <version>1.17-R0.1-SNAPSHOT</version>
|
||||
- <packaging>jar</packaging>
|
||||
-
|
||||
- <name>Spigot-API</name>
|
||||
- <url>https://www.spigotmc.org/</url>
|
||||
- <description>An enhanced plugin API for Minecraft servers.</description>
|
||||
-
|
||||
- <properties>
|
||||
- <skipTests>true</skipTests>
|
||||
- <maven.compiler.source>1.8</maven.compiler.source>
|
||||
- <maven.compiler.target>1.8</maven.compiler.target>
|
||||
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
- </properties>
|
||||
-
|
||||
- <distributionManagement>
|
||||
- <repository>
|
||||
- <id>spigotmc-releases</id>
|
||||
- <url>https://hub.spigotmc.org/nexus/content/repositories/releases/</url>
|
||||
- </repository>
|
||||
- <snapshotRepository>
|
||||
- <id>spigotmc-snapshots</id>
|
||||
- <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
- </snapshotRepository>
|
||||
- </distributionManagement>
|
||||
-
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>commons-lang</groupId>
|
||||
- <artifactId>commons-lang</artifactId>
|
||||
- <version>2.6</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
- <dependency>
|
||||
- <groupId>com.google.guava</groupId>
|
||||
- <artifactId>guava</artifactId>
|
||||
- <version>21.0</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
- <dependency>
|
||||
- <groupId>com.google.code.gson</groupId>
|
||||
- <artifactId>gson</artifactId>
|
||||
- <version>2.8.0</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>net.md-5</groupId>
|
||||
- <artifactId>bungeecord-chat</artifactId>
|
||||
- <version>1.16-R0.4</version>
|
||||
- <type>jar</type>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.yaml</groupId>
|
||||
- <artifactId>snakeyaml</artifactId>
|
||||
- <version>1.28</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- not part of the API proper -->
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven</groupId>
|
||||
- <artifactId>maven-resolver-provider</artifactId>
|
||||
- <version>3.8.1</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven.resolver</groupId>
|
||||
- <artifactId>maven-resolver-connector-basic</artifactId>
|
||||
- <version>1.7.0</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven.resolver</groupId>
|
||||
- <artifactId>maven-resolver-transport-http</artifactId>
|
||||
- <version>1.7.0</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <!-- annotations -->
|
||||
- <dependency>
|
||||
- <groupId>org.jetbrains</groupId>
|
||||
- <artifactId>annotations-java5</artifactId>
|
||||
- <version>21.0.1</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <!-- testing -->
|
||||
- <dependency>
|
||||
- <groupId>junit</groupId>
|
||||
- <artifactId>junit</artifactId>
|
||||
- <version>4.13.1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.hamcrest</groupId>
|
||||
- <artifactId>hamcrest-library</artifactId>
|
||||
- <version>1.3</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-tree</artifactId>
|
||||
- <version>9.1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
-
|
||||
- <build>
|
||||
- <plugins>
|
||||
- <plugin>
|
||||
- <groupId>net.md-5</groupId>
|
||||
- <artifactId>scriptus</artifactId>
|
||||
- <version>0.4.1</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>initialize</phase>
|
||||
- <goals>
|
||||
- <goal>describe</goal>
|
||||
- </goals>
|
||||
- </execution>
|
||||
- </executions>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-compiler-plugin</artifactId>
|
||||
- <version>3.8.1</version>
|
||||
- <configuration>
|
||||
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
||||
- <compilerId>eclipse</compilerId>
|
||||
- </configuration>
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
- <artifactId>plexus-compiler-eclipse</artifactId>
|
||||
- <version>2.8.8</version>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.eclipse.jdt</groupId>
|
||||
- <artifactId>ecj</artifactId>
|
||||
- <version>3.24.0</version>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-jar-plugin</artifactId>
|
||||
- <version>3.2.0</version>
|
||||
- <configuration>
|
||||
- <archive>
|
||||
- <manifest>
|
||||
- <addDefaultEntries>false</addDefaultEntries>
|
||||
- </manifest>
|
||||
- <manifestEntries>
|
||||
- <Automatic-Module-Name>org.bukkit</Automatic-Module-Name>
|
||||
- </manifestEntries>
|
||||
- </archive>
|
||||
- </configuration>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-shade-plugin</artifactId>
|
||||
- <version>3.2.3</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>package</phase>
|
||||
- <goals>
|
||||
- <goal>shade</goal>
|
||||
- </goals>
|
||||
- </execution>
|
||||
- </executions>
|
||||
- <configuration>
|
||||
- <filters>
|
||||
- <filter>
|
||||
- <artifact>*:*</artifact>
|
||||
- <excludes>
|
||||
- <exclude>META-INF/MANIFEST.MF</exclude>
|
||||
- </excludes>
|
||||
- </filter>
|
||||
- </filters>
|
||||
- <!-- when downloading via Maven we can pull depends individually -->
|
||||
- <shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
- </configuration>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-javadoc-plugin</artifactId>
|
||||
- <version>3.2.0</version>
|
||||
- <configuration>
|
||||
- <links>
|
||||
- <link>https://guava.dev/releases/21.0/api/docs/</link>
|
||||
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.27/</link>
|
||||
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/20.1.0/</link>
|
||||
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
|
||||
- </links>
|
||||
- </configuration>
|
||||
- </plugin>
|
||||
- </plugins>
|
||||
- </build>
|
||||
-
|
||||
- <profiles>
|
||||
- <profile>
|
||||
- <id>development</id>
|
||||
- <properties>
|
||||
- <skipTests>false</skipTests>
|
||||
- </properties>
|
||||
- <build>
|
||||
- <plugins>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-checkstyle-plugin</artifactId>
|
||||
- <version>3.1.1</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>process-classes</phase>
|
||||
- <goals>
|
||||
- <goal>check</goal>
|
||||
- </goals>
|
||||
- </execution>
|
||||
- </executions>
|
||||
- <configuration>
|
||||
- <configLocation>checkstyle.xml</configLocation>
|
||||
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
- </configuration>
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>com.puppycrawl.tools</groupId>
|
||||
- <artifactId>checkstyle</artifactId>
|
||||
- <version>8.39</version>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.codehaus.mojo</groupId>
|
||||
- <artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
- <version>1.19</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>process-classes</phase>
|
||||
- <goals>
|
||||
- <goal>check</goal>
|
||||
- </goals>
|
||||
- </execution>
|
||||
- </executions>
|
||||
- <configuration>
|
||||
- <signature>
|
||||
- <groupId>org.codehaus.mojo.signature</groupId>
|
||||
- <artifactId>java18</artifactId>
|
||||
- <version>1.0</version>
|
||||
- </signature>
|
||||
- </configuration>
|
||||
- </plugin>
|
||||
- </plugins>
|
||||
- </build>
|
||||
- </profile>
|
||||
- </profiles>
|
||||
-</project>
|
||||
|
|
|
@ -18,28 +18,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.1")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0")
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -0,0 +0,0 @@
|
||||
<version>9.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
+ <!-- ASM -->
|
||||
+ <dependency>
|
||||
+ <groupId>org.ow2.asm</groupId>
|
||||
+ <artifactId>asm</artifactId>
|
||||
+ <version>9.0</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.ow2.asm</groupId>
|
||||
+ <artifactId>asm-commons</artifactId>
|
||||
+ <version>9.0</version>
|
||||
+ </dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
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
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
|
|
|
@ -9,23 +9,6 @@ of giving the player experience points.
|
|||
|
||||
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -0,0 +0,0 @@ public class ExperienceOrb extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
+ public final int durToXp(int i) { return durabilityToXp(i); } // Paper OBFHELPER
|
||||
private int durabilityToXp(int repairAmount) {
|
||||
return repairAmount / 2;
|
||||
}
|
||||
|
||||
+ public final int xpToDur(int i) { return xpToDurability(i); } // Paper OBFHELPER
|
||||
private int xpToDurability(int experienceAmount) {
|
||||
return experienceAmount * 2;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
|
||||
|
@ -80,12 +63,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM;
|
||||
+ orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
|
||||
+
|
||||
+ int i = Math.min(orb.xpToDur(amount), itemstack.getDamageValue());
|
||||
+ int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());
|
||||
+ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, i);
|
||||
+ i = event.getRepairAmount();
|
||||
+ orb.discard();
|
||||
+ if (!event.isCancelled()) {
|
||||
+ amount -= orb.durToXp(i);
|
||||
+ amount -= orb.durabilityToXp(i);
|
||||
+ itemstack.setDamageValue(itemstack.getDamageValue() - i);
|
||||
+ }
|
||||
+ }
|
||||
|
|
|
@ -2349,6 +2349,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ final java.util.Optional<net.minecraft.sounds.SoundEvent> event = net.minecraft.core.Registry.SOUND_EVENT.getOptional(name);
|
||||
+ if (event.isPresent()) {
|
||||
+ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSoundEntityPacket(event.get(), io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), entity, sound.volume(), sound.pitch()));
|
||||
+ } else {
|
||||
+ this.getHandle().connection.send(new ClientboundCustomSoundPacket(name, io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), entity.position(), sound.volume(), sound.pitch()));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
|
|
@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- if (!this.aware) return; // CraftBukkit
|
||||
+ if (!this.aware) { // Paper start - Allow nerfed mobs to jump, float and take water damage
|
||||
+ if (goalFloat != null) {
|
||||
+ if (goalFloat.validConditions()) goalFloat.update();
|
||||
+ if (goalFloat.validConditions()) goalFloat.tick();
|
||||
+ this.getJumpControl().tick();
|
||||
+ }
|
||||
+ if ((this instanceof net.minecraft.world.entity.monster.Blaze || this instanceof net.minecraft.world.entity.monster.EnderMan) && isInWaterRainOrBubble()) {
|
||||
|
@ -78,9 +78,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@Override
|
||||
public boolean canUse() {
|
||||
return this.mob.isInWater() && this.mob.getFluidHeight(FluidTags.WATER) > this.mob.getFluidJumpThreshold() || this.mob.isInLava();
|
||||
}
|
||||
|
||||
+ public void update() { this.tick(); } // Paper - OBFHELPER
|
||||
@Override
|
||||
public void tick() {
|
||||
if (this.mob.getRandom().nextFloat() < 0.8F) {
|
||||
|
|
|
@ -1534,7 +1534,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+ try {
|
||||
+ chunkData.chunkData = chunkManager.getChunkData(this.world.getTypeKey(),
|
||||
+ chunkManager.getWorldPersistentDataSupplier(), chunkData.chunkData, chunkPos, this.world); // clone data for safety, file IO thread does not clone
|
||||
+ chunkManager.overworldDataStorage, chunkData.chunkData, chunkPos, this.world); // clone data for safety, file IO thread does not clone
|
||||
+ } catch (final Throwable ex) {
|
||||
+ PaperFileIOThread.LOGGER.error("Could not apply datafixers for chunk task: " + this.toString(), ex);
|
||||
+ this.complete(ChunkLoadTask.createEmptyHolder());
|
||||
|
@ -2360,15 +2360,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/j
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final ThreadedLevelLightEngine lightEngine;
|
||||
private final BlockableEventLoop<Runnable> mainThreadExecutor;
|
||||
public final ChunkGenerator generator;
|
||||
- private final Supplier<DimensionDataStorage> overworldDataStorage;
|
||||
+ private final Supplier<DimensionDataStorage> overworldDataStorage; public final Supplier<DimensionDataStorage> getWorldPersistentDataSupplier() { return this.overworldDataStorage; } // Paper - OBFHELPER
|
||||
private final PoiManager poiManager;
|
||||
public final LongSet toDrop;
|
||||
private boolean modified;
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
|
|
|
@ -55,12 +55,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Validate
|
||||
+ if (entity != this) {
|
||||
+ if (entity.isRemoved() || !entity.valid || entity.level == null) {
|
||||
+ MinecraftServer.LOGGER.info("Blocking player " + this.toString() + " from spectating invalid entity " + entity.toString());
|
||||
+ MinecraftServer.LOGGER.info("Blocking player " + this + " from spectating invalid entity " + entity);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (this.isImmobile()) {
|
||||
+ // use debug: clients might maliciously spam this
|
||||
+ MinecraftServer.LOGGER.debug("Blocking frozen player " + this.toString() + " from spectating entity " + entity.toString());
|
||||
+ MinecraftServer.LOGGER.debug("Blocking frozen player " + this + " from spectating entity " + entity);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
|
@ -85,15 +85,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.a(x, y, z, yaw, pitch, PlayerTeleportEvent.TeleportCause.UNKNOWN);
|
||||
}
|
||||
|
||||
+ public final void teleport(double d0, double d1, double d2, float f, float f1, PlayerTeleportEvent.TeleportCause cause) { this.a(d0, d1, d2, f, f1, cause); } // Paper - OBFHELPER
|
||||
public void a(double d0, double d1, double d2, float f, float f1, PlayerTeleportEvent.TeleportCause cause) {
|
||||
this.a(d0, d1, d2, f, f1, Collections.emptySet(), true, cause);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ for (int x = -tickRadius; x <= tickRadius; x += 16) {
|
||||
+ for (int z = -tickRadius; z <= tickRadius; z += 16) {
|
||||
+ // radius of 2 will have the current chunk be level 31
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.add(x, 0, z)), 2, Unit.INSTANCE);
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.offset(x, 0, z)), 2, Unit.INSTANCE);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -120,17 +120,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // add border along x axis (including corner chunks)
|
||||
+ for (int x = -radiusInBlocks; x <= radiusInBlocks; x += 16) {
|
||||
+ // top
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.add(x, 0, radiusInBlocks)), 1, Unit.INSTANCE); // level 32
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.offset(x, 0, radiusInBlocks)), 1, Unit.INSTANCE); // level 32
|
||||
+ // bottom
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.add(x, 0, -radiusInBlocks)), 1, Unit.INSTANCE); // level 32
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.offset(x, 0, -radiusInBlocks)), 1, Unit.INSTANCE); // level 32
|
||||
+ }
|
||||
+
|
||||
+ // add border along z axis (excluding corner chunks)
|
||||
+ for (int z = -radiusInBlocks + 16; z < radiusInBlocks; z += 16) {
|
||||
+ // right
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.add(radiusInBlocks, 0, z)), 1, Unit.INSTANCE); // level 32
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.offset(radiusInBlocks, 0, z)), 1, Unit.INSTANCE); // level 32
|
||||
+ // left
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.add(-radiusInBlocks, 0, z)), 1, Unit.INSTANCE); // level 32
|
||||
+ chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(spawn.offset(-radiusInBlocks, 0, z)), 1, Unit.INSTANCE); // level 32
|
||||
+ }
|
||||
+ }
|
||||
+ public void removeTicketsForSpawn(int radiusInBlocks, BlockPos spawn) {
|
||||
|
@ -143,7 +143,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ for (int x = -tickRadius; x <= tickRadius; x += 16) {
|
||||
+ for (int z = -tickRadius; z <= tickRadius; z += 16) {
|
||||
+ // radius of 2 will have the current chunk be level 31
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.add(x, 0, z)), 2, Unit.INSTANCE);
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.offset(x, 0, z)), 2, Unit.INSTANCE);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -152,17 +152,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // remove border along x axis (including corner chunks)
|
||||
+ for (int x = -radiusInBlocks; x <= radiusInBlocks; x += 16) {
|
||||
+ // top
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.add(x, 0, radiusInBlocks)), 1, Unit.INSTANCE); // level 32
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.offset(x, 0, radiusInBlocks)), 1, Unit.INSTANCE); // level 32
|
||||
+ // bottom
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.add(x, 0, -radiusInBlocks)), 1, Unit.INSTANCE); // level 32
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.offset(x, 0, -radiusInBlocks)), 1, Unit.INSTANCE); // level 32
|
||||
+ }
|
||||
+
|
||||
+ // remove border along z axis (excluding corner chunks)
|
||||
+ for (int z = -radiusInBlocks + 16; z < radiusInBlocks; z += 16) {
|
||||
+ // right
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.add(radiusInBlocks, 0, z)), 1, Unit.INSTANCE); // level 32
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.offset(radiusInBlocks, 0, z)), 1, Unit.INSTANCE); // level 32
|
||||
+ // left
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.add(-radiusInBlocks, 0, z)), 1, Unit.INSTANCE); // level 32
|
||||
+ chunkproviderserver.removeRegionTicket(TicketType.START, new ChunkPos(spawn.offset(-radiusInBlocks, 0, z)), 1, Unit.INSTANCE); // level 32
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
|
|
@ -4,18 +4,6 @@ Date: Tue, 1 Mar 2016 23:45:08 -0600
|
|||
Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/nbt/ListTag.java b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
@@ -0,0 +0,0 @@ public class ListTag extends CollectionTag<Tag> {
|
||||
return new long[0];
|
||||
}
|
||||
|
||||
+ public final double getDoubleAt(int i) { return this.getDouble(i); } // Paper - OBFHELPER
|
||||
public double getDouble(int index) {
|
||||
if (index >= 0 && index < this.list.size()) {
|
||||
Tag tag = this.list.get(index);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
|
@ -89,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ originWorld = nbt.getUUID("Paper.OriginWorld");
|
||||
+ }
|
||||
+ this.originWorld = originWorld;
|
||||
+ origin = new org.bukkit.util.Vector(originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
||||
+ origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
|
|
@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
} catch (Throwable throwable) {
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
this.originWorld = originWorld;
|
||||
origin = new org.bukkit.util.Vector(originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||
}
|
||||
+
|
||||
+ spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
|
|
@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
final Spliterator<? extends net.minecraft.nbt.Tag> spliterator = entityNbtList.spliterator();
|
||||
|
||||
return StreamSupport.stream(new Spliterator<Entity>() {
|
||||
+ final Map<EntityType<?>, Integer> loadedEntityCounts = new java.util.HashMap<>(); // Paper
|
||||
+ final java.util.Map<EntityType<?>, Integer> loadedEntityCounts = new java.util.HashMap<>(); // Paper
|
||||
public boolean tryAdvance(Consumer<? super Entity> consumer) {
|
||||
return spliterator.tryAdvance((nbtbase) -> {
|
||||
EntityType.loadEntityRecursive((CompoundTag) nbtbase, world, (entity) -> {
|
||||
|
|
|
@ -9,13 +9,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
}
|
||||
// Paper end
|
||||
|
||||
+ public final void setSpawn(BlockPos blockposition, float f) { this.setDefaultSpawnPos(blockposition, f); } // Paper - OBFHELPER
|
||||
public void setDefaultSpawnPos(BlockPos pos, float angle) {
|
||||
// Paper - configurable spawn radius
|
||||
BlockPos prevSpawn = this.getSharedSpawnPos();
|
||||
//ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(this.worldData.a(), 0, this.worldData.c()));
|
||||
|
||||
this.levelData.setSpawn(pos, angle);
|
||||
|
@ -32,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
try {
|
||||
Location previousLocation = this.getSpawnLocation();
|
||||
- world.levelData.setSpawn(new BlockPos(x, y, z), angle);
|
||||
+ world.setSpawn(new BlockPos(x, y, z), angle); // Paper - use WorldServer#setSpawn
|
||||
+ world.setDefaultSpawnPos(new BlockPos(x, y, z), angle); // Paper - use WorldServer#setSpawn
|
||||
|
||||
+ // Paper start - move to nms.World
|
||||
// Notify anyone who's listening.
|
||||
|
|
|
@ -14,18 +14,6 @@ To ensure the client still receives the updated advancement data, we
|
|||
manually reload the advancement data for all players, which
|
||||
normally takes place as a part of the datapack reloading.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerAdvancements {
|
||||
|
||||
}
|
||||
|
||||
+ public final void sendUpdateIfNeeded(ServerPlayer entityPlayer) { this.flushDirty(entityPlayer); } // Paper - OBFHELPER
|
||||
public void flushDirty(ServerPlayer player) {
|
||||
if (this.isFirstPacket || !this.visibilityChanged.isEmpty() || !this.progressChanged.isEmpty()) {
|
||||
Map<ResourceLocation, AdvancementProgress> map = Maps.newHashMap();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
|
@ -39,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ //MinecraftServer.getServer().getPlayerList().reload();
|
||||
+ MinecraftServer.getServer().getPlayerList().getPlayers().forEach(player -> {
|
||||
+ player.getAdvancements().reload(MinecraftServer.getServer().getAdvancements());
|
||||
+ player.getAdvancements().sendUpdateIfNeeded(player);
|
||||
+ player.getAdvancements().flushDirty(player);
|
||||
+ });
|
||||
+ // Paper end
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final BlockableEventLoop<Runnable> mainThreadExecutor;
|
||||
+ final java.util.concurrent.Executor mainInvokingExecutor; // Paper
|
||||
public final ChunkGenerator generator;
|
||||
private final Supplier<DimensionDataStorage> overworldDataStorage; public final Supplier<DimensionDataStorage> getWorldPersistentDataSupplier() { return this.overworldDataStorage; } // Paper - OBFHELPER
|
||||
public final Supplier<DimensionDataStorage> overworldDataStorage;
|
||||
private final PoiManager poiManager;
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
|
|
|
@ -4,19 +4,6 @@ Date: Wed, 12 Sep 2018 18:53:55 +0300
|
|||
Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/arguments/blocks/BlockStateParser.java b/src/main/java/net/minecraft/commands/arguments/blocks/BlockStateParser.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/commands/arguments/blocks/BlockStateParser.java
|
||||
+++ b/src/main/java/net/minecraft/commands/arguments/blocks/BlockStateParser.java
|
||||
@@ -0,0 +0,0 @@ public class BlockStateParser {
|
||||
private final boolean forTesting;
|
||||
private final Map<Property<?>, Comparable<?>> properties = Maps.newLinkedHashMap(); // CraftBukkit - stable
|
||||
private final Map<String, String> vagueProperties = Maps.newHashMap();
|
||||
- private ResourceLocation id = new ResourceLocation("");
|
||||
+ private ResourceLocation id = new ResourceLocation(""); public final ResourceLocation getBlockKey() { return this.id; } // Paper - OBFHELPER
|
||||
private StateDefinition<Block, BlockState> definition;
|
||||
private BlockState state;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
|
@ -374,7 +361,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ if (isTag) {
|
||||
+ key = blockParser.getTag();
|
||||
+ } else {
|
||||
+ key = blockParser.getBlockKey();
|
||||
+ key = blockParser.id;
|
||||
+ }
|
||||
+
|
||||
+ if (key == null) {
|
||||
|
|
|
@ -108,12 +108,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
import net.minecraft.network.protocol.game.ClientboundGameEventPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundInitializeBorderPacket;
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
private static final SimpleDateFormat BAN_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
|
||||
private final MinecraftServer server;
|
||||
public final List<ServerPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
|
||||
- private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();
|
||||
+ private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();Map<UUID, ServerPlayer> getUUIDMap() { return playersByUUID; } // Paper - OBFHELPER
|
||||
private final UserBanList bans;
|
||||
private final IpBanList ipBans;
|
||||
private final ServerOpList ops;
|
||||
private final UserWhiteList whitelist;
|
||||
|
@ -173,7 +167,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ public ServerPlayer getActivePlayer(UUID uuid) {
|
||||
+ ServerPlayer player = this.getUUIDMap().get(uuid);
|
||||
+ ServerPlayer player = this.playersByUUID.get(uuid);
|
||||
+ return player != null ? player : pendingPlayers.get(uuid);
|
||||
+ }
|
||||
+
|
||||
|
|
|
@ -2274,14 +2274,6 @@ diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -0,0 +0,0 @@ public class BlockPos extends Vec3i {
|
||||
return d == 0.0D && e == 0.0D && f == 0.0D ? this : new BlockPos((double)this.getX() + d, (double)this.getY() + e, (double)this.getZ() + f);
|
||||
}
|
||||
|
||||
+ @Deprecated public final BlockPos add(int i, int j, int k) {return this.offset(i, j, k);} // Paper - OBFHELPER
|
||||
@Override
|
||||
public BlockPos offset(int i, int j, int k) {
|
||||
return i == 0 && j == 0 && k == 0 ? this : new BlockPos(this.getX() + i, this.getY() + j, this.getZ() + k);
|
||||
@@ -0,0 +0,0 @@ public class BlockPos extends Vec3i {
|
||||
return super.rotate(rotation).immutable();
|
||||
}
|
||||
|
@ -3473,29 +3465,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@Override
|
||||
public void tell(R runnable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -0,0 +0,0 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Spliterator;
|
||||
import java.util.Set; // Paper
|
||||
+import java.util.Map; // Paper
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
@@ -0,0 +0,0 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
return this.dimensions.height;
|
||||
}
|
||||
|
||||
- @Nullable
|
||||
- public T create(Level world) {
|
||||
+ public T create(Level world) { return this.create(world); } // Paper - OBFHELPER
|
||||
+ @Nullable public T create(Level world) { // Paper - OBFHELPER
|
||||
return this.factory.create(this, world);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
|
@ -3689,7 +3658,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
- public static long asLong(int chunkX, int chunkZ) {
|
||||
+ @Deprecated public static long pair(final BlockPos pos) { return asLong(pos.getX() >> 4, pos.getZ() >> 4); } // Paper - OBFHELPER
|
||||
+ public static long asLong(int chunkX, int chunkZ) {
|
||||
return (long)chunkX & 4294967295L | ((long)chunkZ & 4294967295L) << 32;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return MinecraftServer.getServer().applyTrackingRangeScale(vanilla);
|
||||
return MinecraftServer.getServer().getScaledTrackingDistance(vanilla);
|
||||
}
|
||||
// Paper end - use distance map to optimise tracker
|
||||
+ // Paper start - optimise PlayerChunkMap#isOutsideRange
|
||||
|
|
|
@ -1526,14 +1526,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
@Nullable
|
||||
@@ -0,0 +0,0 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
return this.dimensions.height;
|
||||
}
|
||||
|
||||
- public T create(Level world) { return this.create(world); } // Paper - OBFHELPER
|
||||
@Nullable public T create(Level world) { // Paper - OBFHELPER
|
||||
return this.factory.create(this, world);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
return this.updateInterval;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final File file;
|
||||
- private final Map<String, V> map = Maps.newHashMap();
|
||||
+ // Paper - replace HashMap is ConcurrentHashMap
|
||||
+ private final Map<String, V> map = Maps.newConcurrentMap(); private final Map<String, V> getBackingMap() { return this.map; } // Paper - OBFHELPER
|
||||
+ private final Map<String, V> map = Maps.newConcurrentMap();
|
||||
+ private boolean e = true;
|
||||
+ private static final ParameterizedType f = new ParameterizedType() {
|
||||
+ public Type[] getActualTypeArguments() {
|
||||
|
@ -83,7 +83,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start
|
||||
+ // this.g();
|
||||
+ // return (V) this.d.get(this.a(k0)); // CraftBukkit - fix decompile error
|
||||
+ return (V) this.getBackingMap().computeIfPresent(this.getKeyForUser(key), (k, v) -> {
|
||||
+ return (V) this.map.computeIfPresent(this.getKeyForUser(key), (k, v) -> {
|
||||
+ return v.hasExpired() ? null : v;
|
||||
+ });
|
||||
+ // Paper end
|
||||
|
@ -96,7 +96,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public boolean isEmpty() {
|
||||
- return this.map.size() < 1;
|
||||
+ // return this.d.size() < 1; // Paper
|
||||
+ return this.getBackingMap().isEmpty(); // Paper - readability is the goal. As an aside, isEmpty() uses only sumCount() and a comparison. size() uses sumCount(), casts, and boolean logic
|
||||
+ return this.map.isEmpty(); // Paper - readability is the goal. As an aside, isEmpty() uses only sumCount() and a comparison. size() uses sumCount(), casts, and boolean logic
|
||||
}
|
||||
|
||||
protected String getKeyForUser(K profile) {
|
||||
|
@ -127,7 +127,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.d.remove(this.a(k0));
|
||||
+ }*/
|
||||
|
||||
+ this.getBackingMap().values().removeIf(StoredUserEntry::hasExpired);
|
||||
+ this.map.values().removeIf(StoredUserEntry::hasExpired);
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
|
|
|
@ -5,18 +5,6 @@ Subject: [PATCH] Use distance map to optimise entity tracker
|
|||
|
||||
Use the distance map to find candidate players for tracking.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
+ public final int applyTrackingRangeScale(int value) { return this.getScaledTrackingDistance(value); } // Paper - OBFHELPER
|
||||
public int getScaledTrackingDistance(int initialDistance) {
|
||||
return initialDistance;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
|
@ -44,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ final int[] entityTrackerTrackRanges;
|
||||
+
|
||||
+ private int convertSpigotRangeToVanilla(final int vanilla) {
|
||||
+ return MinecraftServer.getServer().applyTrackingRangeScale(vanilla);
|
||||
+ return MinecraftServer.getServer().getScaledTrackingDistance(vanilla);
|
||||
+ }
|
||||
+ // Paper end - use distance map to optimise tracker
|
||||
|
||||
|
|
Loading…
Reference in a new issue