mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
remove remaining POMs
This commit is contained in:
parent
c943a108a9
commit
86abcdafe1
@ -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>
|
@ -3,6 +3,9 @@ From: Kyle Wood <demonwav@gmail.com>
|
||||
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 e431e3435737e28394d81b56568a08b3c3148b9b..c484aff2c192bf42059b5689327909e4af654401 100644
|
||||
@ -87,3 +90,271 @@ index 0000000000000000000000000000000000000000..b378772dce6fddf0a3f24e1c48667602
|
||||
+ "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 10eeaef61be733e63f6680f1675e0b527eb30fd9..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,262 +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>
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 271a6672e7fe9ce51bf96c8c18f5579fc47b2414..125fee17f7ab37fb2b4deb096f37a43cb9519e96 100644
|
||||
index b378772dce6fddf0a3f24e1c48667602fc356e51..c54be6e9df689433a8aa280541cf9366609a3c27 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -17,12 +17,14 @@ dependencies {
|
||||
@ -24,103 +24,3 @@ index 271a6672e7fe9ce51bf96c8c18f5579fc47b2414..125fee17f7ab37fb2b4deb096f37a43c
|
||||
compileOnly(annotations)
|
||||
testCompileOnly(annotations)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 10eeaef61be733e63f6680f1675e0b527eb30fd9..e5802bcb6fc2376cff2ee8b3069150127312b154 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -2,33 +2,34 @@
|
||||
<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>
|
||||
@@ -37,6 +38,20 @@
|
||||
<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>
|
||||
@@ -112,6 +127,7 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
+ <defaultGoal>clean install</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>net.md-5</groupId>
|
||||
@@ -130,10 +146,6 @@
|
||||
<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>
|
||||
@@ -183,6 +195,7 @@
|
||||
</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>
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add FastUtil to Bukkit
|
||||
Doesn't expose to plugins, just allows Paper-API to use it for optimization
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 125fee17f7ab37fb2b4deb096f37a43cb9519e96..e4123d5f918a5f21b7f6fddba7084643f86ad5aa 100644
|
||||
index c54be6e9df689433a8aa280541cf9366609a3c27..9fe78a9570f7e8dd4c6f94fc3fb1bf176c1481d2 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -18,6 +18,7 @@ dependencies {
|
||||
@ -17,20 +17,3 @@ index 125fee17f7ab37fb2b4deb096f37a43cb9519e96..e4123d5f918a5f21b7f6fddba7084643
|
||||
|
||||
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 e5802bcb6fc2376cff2ee8b3069150127312b154..7b44549b508862b207324a6003fcdfa623f40f07 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -32,6 +32,12 @@
|
||||
</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 9fe78a9570f7e8dd4c6f94fc3fb1bf176c1481d2..3a36b2b7f38e3446177f0883083d30c7
|
||||
|
||||
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 7b44549b508862b207324a6003fcdfa623f40f07..f2238314b948be036d9e7054d7af5bfdac8ebbf6 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -22,6 +22,7 @@
|
||||
<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>
|
||||
@@ -31,7 +32,39 @@
|
||||
</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>
|
||||
@@ -216,6 +249,12 @@
|
||||
<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 ef58a6c00f444bd498a2d8fc4e457236f393954f..ecd149157d4fb80444f34bf5633d74bcdb63dec5 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
|
||||
Uses method handles for private or static methods.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 176180570bf2705d975cf349faf08b5ba32cdab3..c10c9f86db276b42d8b7c21c353970691990f125 100644
|
||||
index 3a36b2b7f38e3446177f0883083d30c739f6c9b1..9d0675e2afcd9c0f82b6e993b1185d507b32ed0f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -24,6 +24,8 @@ dependencies {
|
||||
@ -18,28 +18,6 @@ index 176180570bf2705d975cf349faf08b5ba32cdab3..c10c9f86db276b42d8b7c21c35397069
|
||||
|
||||
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 f2238314b948be036d9e7054d7af5bfdac8ebbf6..aefaeec678b2f6b5ba1c15e43c4886eb9af6b143 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -163,6 +163,17 @@
|
||||
<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..5b28e9b1daba7834af67dbc193dd656bedd9a994
|
||||
|
@ -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 aefaeec678b2f6b5ba1c15e43c4886eb9af6b143..33771618d2fd7591db020af57df358c891b11d6d 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -250,6 +250,19 @@
|
||||
<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..072ac1a96394b8d494f42fca8dfe08115eaed3fe
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/JunitEventListener.java
|
||||
@@ -0,0 +1,6 @@
|
||||
+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 03229d5f4ec36a82197beb391356d791ff67fb2f..19271057cf24329757c9419fa6c97848e008a96c 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
|
@ -2258,7 +2258,7 @@ index 0000000000000000000000000000000000000000..9df0006c1a283f77c4d01d9fce9062fc
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index eee1fce53df4a35c206364f45cbc06cca198a8a9..a44709de54fc57eec337e560dc4a699a8012c58f 100644
|
||||
index 771e4b72589d7117a154ab6917bd4a56d55f19db..65e0ca442980f273d2fe5f131e174cd92f80da20 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -94,7 +94,7 @@ public class Util {
|
||||
@ -2271,18 +2271,10 @@ index eee1fce53df4a35c206364f45cbc06cca198a8a9..a44709de54fc57eec337e560dc4a699a
|
||||
|
||||
public static long getEpochMillis() {
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index a153ca538d237fab567550b0bfcdf5b2985c56f8..022cccbc52a7dda2f6bf0999905db82dd650b5ef 100644
|
||||
index 59240bb0ce088a14f8ccb62de8b69bc7bf313975..cfc2a5145e47de86a5a738d86abf333ff3db7796 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -104,6 +104,7 @@ 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);
|
||||
@@ -461,6 +462,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -461,6 +461,7 @@ public class BlockPos extends Vec3i {
|
||||
return super.rotate(rotation).immutable();
|
||||
}
|
||||
|
||||
@ -2290,7 +2282,7 @@ index a153ca538d237fab567550b0bfcdf5b2985c56f8..022cccbc52a7dda2f6bf0999905db82d
|
||||
public BlockPos.MutableBlockPos set(int x, int y, int z) {
|
||||
this.setX(x);
|
||||
this.setY(y);
|
||||
@@ -468,6 +470,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -468,6 +469,7 @@ public class BlockPos extends Vec3i {
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -2298,7 +2290,7 @@ index a153ca538d237fab567550b0bfcdf5b2985c56f8..022cccbc52a7dda2f6bf0999905db82d
|
||||
public BlockPos.MutableBlockPos set(double x, double y, double z) {
|
||||
return this.set(Mth.floor(x), Mth.floor(y), Mth.floor(z));
|
||||
}
|
||||
@@ -525,6 +528,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -525,6 +527,7 @@ public class BlockPos extends Vec3i {
|
||||
}
|
||||
}
|
||||
|
||||
@ -2306,7 +2298,7 @@ index a153ca538d237fab567550b0bfcdf5b2985c56f8..022cccbc52a7dda2f6bf0999905db82d
|
||||
@Override
|
||||
public BlockPos.MutableBlockPos setX(int i) {
|
||||
super.setX(i);
|
||||
@@ -542,6 +546,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -542,6 +545,7 @@ public class BlockPos extends Vec3i {
|
||||
super.setZ(i);
|
||||
return this;
|
||||
}
|
||||
@ -2871,7 +2863,7 @@ index 0000000000000000000000000000000000000000..80f8d6ce6dd717d4b37b78539c65b6ac
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f0aea7c801b3ef3b1a213ecd473ce9e718f1be46..224128235f712c3dc8588b3a5cdd3e776b9c0aba 100644
|
||||
index 75801343b14a5555e974168170af95f8513926f5..1b76d1b929b85b130639e7937a118342b568e795 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -941,6 +941,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -2885,7 +2877,7 @@ index f0aea7c801b3ef3b1a213ecd473ce9e718f1be46..224128235f712c3dc8588b3a5cdd3e77
|
||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||
this.getProfileCache().save();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index ed9e1b4a9179a002b965a2d979b7ad0656dd1494..df32a8b1df60064c49702dca26d7310b7d27e94b 100644
|
||||
index 6fa6fb852cd5af2009008ac6158251ba5e8cf6fb..9a8fc112dd19964c848127a8dd2f100f5db63075 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -52,9 +52,9 @@ public class ChunkHolder {
|
||||
@ -3048,7 +3040,7 @@ index ed9e1b4a9179a002b965a2d979b7ad0656dd1494..df32a8b1df60064c49702dca26d7310b
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index b48e6096b5450df94f97c4d1be3aa9bba895703d..2014ba4857e07092de4c3179149563b0ff284e56 100644
|
||||
index a45d5c1156e84ab6e56c95e392fd52ea9ecebcb0..33d17e69fac035c421345e1a8c6eb214a54efc46 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -55,6 +55,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket;
|
||||
@ -3127,7 +3119,7 @@ index b48e6096b5450df94f97c4d1be3aa9bba895703d..2014ba4857e07092de4c3179149563b0
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index b4bc656a1c5fffd8c88bc61df3ac7f84dac52d29..2427b2cfb52c0e6aee1397c9951c1aa1c0f14503 100644
|
||||
index cfe9930490489d506c91d174b5aad199314ffd17..db2bcc20d50f1833347f6edde67c366501d29c0f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -45,6 +45,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana
|
||||
@ -3362,7 +3354,7 @@ index b4bc656a1c5fffd8c88bc61df3ac7f84dac52d29..2427b2cfb52c0e6aee1397c9951c1aa1
|
||||
|
||||
if (optional.isPresent()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index d13a2497396cf83e125c72041c4cf4dee164b6a4..0127e3ab8d4e65c802c9b44d081cc0d51946e473 100644
|
||||
index bde78718251f9deb439805d41cb05ac063042efc..bcfc6ea89aa3b1df92d2b181d1d23902859e2584 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -9,6 +9,7 @@ import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
@ -3439,7 +3431,7 @@ index 391bae98e542333a431fb48bf0675c0e8a1873ac..0f6b534a4c789a2f09f6c4624e5d58b9
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e06254a78334b009bf03635927361a369f8ee51a..83e71d07f86c115a0df1eb56ae9f2b127821fe80 100644
|
||||
index a401610e083b699be2c60a505f673cb3968d452b..ab32d84cd0f29fefceb080598bdf1283cb0a33d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -219,9 +219,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@ -3473,29 +3465,6 @@ index a4c5edee297af6d68d518b77f706732b5ccbe4de..7bf4bf5cb2c1b54a7e2733091f48f3a8
|
||||
|
||||
@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 7f3d83d3d071f6b441ad119b1c93be035e911e70..89e7d02b88404ac5dce06595432ae95c9a4e5015 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -5,6 +5,7 @@ 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;
|
||||
@@ -461,8 +462,8 @@ 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 595e48db4ce6064c25f3802be54ce34e87948cff..9f68aa235949520b445b368782ccde6b0e26859d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@ -3653,7 +3622,7 @@ index 083122a2e051b23b2cb9bdb8eb70af01af9df400..e85e4a2dfceb0aa40e73b43a5e122a59
|
||||
FluidState getFluidState(BlockPos pos);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
index 3f77959c98ee6f19423105d23f69bc56a82df54b..d237ceb887b10f8e002f1aba930348a57f223834 100644
|
||||
index 3f77959c98ee6f19423105d23f69bc56a82df54b..439f82a48e6f6ce7b4773505ced32324cacb302d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
@@ -16,6 +16,7 @@ public class ChunkPos {
|
||||
@ -3664,7 +3633,7 @@ index 3f77959c98ee6f19423105d23f69bc56a82df54b..d237ceb887b10f8e002f1aba930348a5
|
||||
private static final int HASH_A = 1664525;
|
||||
private static final int HASH_C = 1013904223;
|
||||
private static final int HASH_Z_XOR = -559038737;
|
||||
@@ -23,23 +24,27 @@ public class ChunkPos {
|
||||
@@ -23,23 +24,26 @@ public class ChunkPos {
|
||||
public ChunkPos(int x, int z) {
|
||||
this.x = x;
|
||||
this.z = z;
|
||||
@ -3689,7 +3658,6 @@ index 3f77959c98ee6f19423105d23f69bc56a82df54b..d237ceb887b10f8e002f1aba930348a5
|
||||
}
|
||||
|
||||
- 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;
|
||||
}
|
||||
|
@ -1055,7 +1055,7 @@ index fe83f13d71f84591f5506e1c6b9dfbf9fba680bd..844d3b910cfb1c073b8b58b0eff3f28a
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 2014ba4857e07092de4c3179149563b0ff284e56..fe785c42b6eca6dafb28ffb6b7afaf44135b3949 100644
|
||||
index 33d17e69fac035c421345e1a8c6eb214a54efc46..3b1565309165e10b147d08b8245ea0bce50dc3c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1,7 +1,9 @@
|
||||
@ -1371,7 +1371,7 @@ index bcfc6ea89aa3b1df92d2b181d1d23902859e2584..5c5cfc31ced6695af7b1dd06cb867274
|
||||
this.entityManager.saveAll();
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 83e71d07f86c115a0df1eb56ae9f2b127821fe80..78ef2e0d9a32d38c7193859f8ee726c70c9b289e 100644
|
||||
index ab32d84cd0f29fefceb080598bdf1283cb0a33d5..f4f6f3e388a39efd2b076616350c49a0e8e65908 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -209,6 +209,7 @@ import org.bukkit.inventory.EquipmentSlot;
|
||||
@ -1486,10 +1486,10 @@ index 430d286a73cfdd643e85bdaa97bf91c2c74a342c..0b63d81ecbcb56bf3dc25661cc2b219c
|
||||
|
||||
protected void tryCheckInsideBlocks() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 89e7d02b88404ac5dce06595432ae95c9a4e5015..b7ab2844b49e97f35a04ac6c9d22ecac689f03a5 100644
|
||||
index 7f3d83d3d071f6b441ad119b1c93be035e911e70..8d5c61a77bea2f2f5dbff26cb479f855945f9541 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -295,17 +295,29 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -294,17 +294,29 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
return Registry.ENTITY_TYPE.getOptional(ResourceLocation.tryParse(id));
|
||||
}
|
||||
|
||||
@ -1526,15 +1526,7 @@ index 89e7d02b88404ac5dce06595432ae95c9a4e5015..b7ab2844b49e97f35a04ac6c9d22ecac
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -462,7 +474,6 @@ 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);
|
||||
}
|
||||
@@ -568,6 +579,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -567,6 +579,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
return this.updateInterval;
|
||||
}
|
||||
|
||||
@ -1547,7 +1539,7 @@ index 89e7d02b88404ac5dce06595432ae95c9a4e5015..b7ab2844b49e97f35a04ac6c9d22ecac
|
||||
public boolean trackDeltas() {
|
||||
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
||||
}
|
||||
@@ -660,7 +677,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -659,7 +677,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
Util.fetchChoiceType(References.ENTITY_TREE, id);
|
||||
}
|
||||
|
||||
|
@ -1251,7 +1251,7 @@ index 2b0d989119c9f69a68a6c1c69fb09dbbedd16716..172536147305f283bd14d356ff4f3953
|
||||
// CraftBukkit end
|
||||
this.chatVisibility = packet.getChatVisibility();
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 78ef2e0d9a32d38c7193859f8ee726c70c9b289e..3e89612f4bf74179b3461166b17b42af2e59b8e5 100644
|
||||
index f4f6f3e388a39efd2b076616350c49a0e8e65908..cfe2361b0af12e6333f65487f27b50e2cbc16168 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -162,6 +162,8 @@ import org.apache.logging.log4j.LogManager;
|
||||
@ -1741,7 +1741,7 @@ index bcd056ac91775c72809284bbc20c366e1ca31350..e2564dee0603735d135d1de2af6801a0
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 3c4281ad770598ecf3b9fae0d6ed6e9130136dbb..4df6b2a155a610953d8d5789bffa33d290d62aaa 100644
|
||||
index ce548fe73dcef10adb99045b06ce58135935aee6..3fd48807c554b176cd8e925bdcd68e7f808e5881 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -19,6 +19,12 @@ public class Main {
|
||||
@ -2038,7 +2038,7 @@ index d4ea706d5456e709b95e34be8220a0d39be2c8f4..2db149bf57c561d7f8f49341fbefafb5
|
||||
player.initMenu(container);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 969d5071dbf3356b80da38526351d488ab936c08..2cb5427c441e50db23bb59da31654c4f2f218b85 100644
|
||||
index 969d5071dbf3356b80da38526351d488ab936c08..bc901793055db9481ec32e668386ba33696bc0a5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -244,14 +244,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -2220,7 +2220,7 @@ index 969d5071dbf3356b80da38526351d488ab936c08..2cb5427c441e50db23bb59da31654c4f
|
||||
@Override
|
||||
public int getPing() {
|
||||
return this.getHandle().latency;
|
||||
@@ -1727,6 +1798,156 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1727,6 +1798,158 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
getInventory().setItemInMainHand(hand);
|
||||
}
|
||||
|
||||
@ -2349,6 +2349,8 @@ index 969d5071dbf3356b80da38526351d488ab936c08..2cb5427c441e50db23bb59da31654c4f
|
||||
+ 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()));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
@ -19,7 +19,7 @@ index 78948c42b13194005bdbbbc69c2b7ae0732a78c5..b41e7922dd96c3358eb849ab39982a75
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e48fe017704b495712b565feff54e1b4ed2d595d..e6abf635281c895505f3201d7329d51f36e24eef 100644
|
||||
index 0b63d81ecbcb56bf3dc25661cc2b219cd8c25592..c22eb7451aaf142f6c722715dbfda5ee332e068b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1264,6 +1264,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@ -31,7 +31,7 @@ index e48fe017704b495712b565feff54e1b4ed2d595d..e6abf635281c895505f3201d7329d51f
|
||||
return this.isInWater() || this.isInRain() || this.isInBubbleColumn();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index e91932d25e7b5d4a95e485bfa8b70632e0641b0a..9f368f32aa93fe5f94b19a884f44ded3bf69a225 100644
|
||||
index e91932d25e7b5d4a95e485bfa8b70632e0641b0a..1456dd2ef7ff28701555f4ac4b7645794ccee640 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -103,6 +103,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@ -49,7 +49,7 @@ index e91932d25e7b5d4a95e485bfa8b70632e0641b0a..9f368f32aa93fe5f94b19a884f44ded3
|
||||
- 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()) {
|
||||
@ -62,10 +62,10 @@ index e91932d25e7b5d4a95e485bfa8b70632e0641b0a..9f368f32aa93fe5f94b19a884f44ded3
|
||||
this.sensing.tick();
|
||||
this.level.getProfiler().pop();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
|
||||
index 54085b104547f2fe7c08ff8aa4839b1230877bca..5a2e3cc833b3fa7d6fcea1474e25c469a53b3bae 100644
|
||||
index 54085b104547f2fe7c08ff8aa4839b1230877bca..1e6c92a3e9a28315814b250b56ecfb3e85f151b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
|
||||
@@ -9,15 +9,18 @@ public class FloatGoal extends Goal {
|
||||
@@ -9,10 +9,12 @@ public class FloatGoal extends Goal {
|
||||
|
||||
public FloatGoal(Mob mob) {
|
||||
this.mob = mob;
|
||||
@ -78,9 +78,3 @@ index 54085b104547f2fe7c08ff8aa4839b1230877bca..5a2e3cc833b3fa7d6fcea1474e25c469
|
||||
@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) {
|
||||
|
@ -4,20 +4,8 @@ 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 88bac72edf19c578902f49d20353989ed4d96f8f..e79faeb26d079de0108268fd2607cf9eb885c003 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
@@ -179,6 +179,7 @@ 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 94c5631820590d31cfd4e8a4fb2395dd6b395841..a1d5519f2133349a805296132bbe84272818091b 100644
|
||||
index 5c5cfc31ced6695af7b1dd06cb867274fa38d85f..d5a12238317f1c85b9ad8cb63b936e501a4326ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1110,6 +1110,11 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@ -33,7 +21,7 @@ index 94c5631820590d31cfd4e8a4fb2395dd6b395841..a1d5519f2133349a805296132bbe8427
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 4a86e7e9e81a31d7a785279c294c000c559a76d6..18f98049bd6e48d6d825528b91e79f0e0759ccc3 100644
|
||||
index a65646832867e62c758eae3ee1359bdd0d810835..110177551183d1ac33a22b5b8c2c5c39697c220b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -280,6 +280,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@ -89,7 +77,7 @@ index 4a86e7e9e81a31d7a785279c294c000c559a76d6..18f98049bd6e48d6d825528b91e79f0e
|
||||
+ 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
|
||||
+
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 927cc59705c662d319fbee47c8da00d8e6256e72..609bffc7d8f21c8733b3fb861fe02f9d1302d796 100644
|
||||
index f858da07ca3d49ad338a4e77c986ddd5494d74f0..f3b5df4e693d923796929b79f9a43bfa4cbe03e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -321,6 +321,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@ -29,7 +29,7 @@ index 927cc59705c662d319fbee47c8da00d8e6256e72..609bffc7d8f21c8733b3fb861fe02f9d
|
||||
} catch (Throwable throwable) {
|
||||
@@ -1997,6 +2002,8 @@ 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
|
||||
|
@ -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 4a6a588eeeee3aa7d33d4b4545e9b8bdf043e567..30a3facc1b23ccb508b30c5affa9ea1c527dd48b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -341,10 +341,12 @@ 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 27cdfbeb6cb2159075b35dd4f9e9557ec0eac7c2..069ce59faab5184ab9da8ca3fe1cebf7449cd7fe 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
|
||||
@ -45,7 +28,7 @@ index 27cdfbeb6cb2159075b35dd4f9e9557ec0eac7c2..069ce59faab5184ab9da8ca3fe1cebf7
|
||||
return true;
|
||||
});
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 7badc90ec9e3b2dfffac6601e432c41224b701f6..44533533c4860a23a0d469c6a544825297d221de 100644
|
||||
index 6549ffa087f9955849024fa62cfca9e91cbecf30..f1c56823e1e89251c518d9d51ab7442b30a85336 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -61,11 +61,14 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
@ -80,12 +63,12 @@ index 7badc90ec9e3b2dfffac6601e432c41224b701f6..44533533c4860a23a0d469c6a5448252
|
||||
+ 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);
|
||||
+ }
|
||||
+ }
|
||||
|
@ -15,10 +15,10 @@ instead and save a lot of server resources.
|
||||
See: https://github.com/PaperMC/Paper/issues/917
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 9f5f2bd9bdfce14da030b09f56c821ec1989e12f..872f92ac1a6bc86ce54700dbf555ceea4fab2057 100644
|
||||
index 8d5c61a77bea2f2f5dbff26cb479f855945f9541..f38ccdecbade43983358dfbeadca86be7d15a68c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -333,6 +333,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -332,6 +332,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
|
||||
@Nullable
|
||||
public T spawnCreature(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
|
@ -38,7 +38,7 @@ index 7c5a75fb34640bb4e7ef839412dbb30b0d0fc8e8..b62aa9f934c33b4d22b985b5e56937ba
|
||||
|
||||
chatmessage = new TranslatableComponent("multiplayer.disconnect.banned_ip.reason", new Object[]{ipbanentry.getReason()});
|
||||
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
index 00e3662e25618459447d4ce5f56f7e046bfe47e2..0851dca56ae680387d56b3fdc894746c248604f5 100644
|
||||
index 00e3662e25618459447d4ce5f56f7e046bfe47e2..2567e51f7de898ea0a2411a176af70bdc4551260 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -12,6 +12,8 @@ import java.io.BufferedReader;
|
||||
@ -56,7 +56,7 @@ index 00e3662e25618459447d4ce5f56f7e046bfe47e2..0851dca56ae680387d56b3fdc894746c
|
||||
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 00e3662e25618459447d4ce5f56f7e046bfe47e2..0851dca56ae680387d56b3fdc894746c
|
||||
+ // 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 00e3662e25618459447d4ce5f56f7e046bfe47e2..0851dca56ae680387d56b3fdc894746c
|
||||
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 00e3662e25618459447d4ce5f56f7e046bfe47e2..0851dca56ae680387d56b3fdc894746c
|
||||
+ this.d.remove(this.a(k0));
|
||||
+ }*/
|
||||
|
||||
+ this.getBackingMap().values().removeIf(StoredUserEntry::hasExpired);
|
||||
+ this.map.values().removeIf(StoredUserEntry::hasExpired);
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize BlockPosition helper methods
|
||||
Resolves #1338
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index 022cccbc52a7dda2f6bf0999905db82dd650b5ef..86618513e8f777d1d738b230c97eb527ddce7c26 100644
|
||||
index cfc2a5145e47de86a5a738d86abf333ff3db7796..c4e622143073edbb4891ac9bd4fe30f32aede8f6 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -131,67 +131,84 @@ public class BlockPos extends Vec3i {
|
||||
@@ -130,67 +130,84 @@ public class BlockPos extends Vec3i {
|
||||
|
||||
@Override
|
||||
public BlockPos above() {
|
||||
|
@ -1436,7 +1436,7 @@ index 0000000000000000000000000000000000000000..ee906b594b306906c170180a29a8b619
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..7c4b19f565a77b63ab9d3b56557af126d0438eac
|
||||
index 0000000000000000000000000000000000000000..0eaa4f3cd476c64feab358879eee3d67f46092f4
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java
|
||||
@@ -0,0 +1,138 @@
|
||||
@ -1534,7 +1534,7 @@ index 0000000000000000000000000000000000000000..7c4b19f565a77b63ab9d3b56557af126
|
||||
+
|
||||
+ 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());
|
||||
@ -2299,7 +2299,7 @@ index fb0b3c5770f66cc3590f5ac4e690a33cb6179be3..7ce854edba32ffcafaa5268d4bb2822a
|
||||
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, datapackconfiguration1, thread, iregistrycustom_dimension, convertable_conversionsession, resourcepackrepository, datapackresources, null, dedicatedserversettings, DataFixers.getDataFixer(), minecraftsessionservice, gameprofilerepository, usercache, LoggerChunkProgressListener::new);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 880fc4e346549a5d7ed627244bdfd284705ad2fc..24fc2eb3ee067a4164db166aa3e07ecbb426bbba 100644
|
||||
index 537efec03939b0f5640dfd974bb0bd68e93b4325..627887227e266155c025592b50defede4271d978 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -976,7 +976,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -2312,7 +2312,7 @@ index 880fc4e346549a5d7ed627244bdfd284705ad2fc..24fc2eb3ee067a4164db166aa3e07ecb
|
||||
|
||||
public String getLocalIp() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index df32a8b1df60064c49702dca26d7310b7d27e94b..92faf96e12b443351ea146d4d1deccb0f7e020e5 100644
|
||||
index 9a8fc112dd19964c848127a8dd2f100f5db63075..165e72873da877f7a29d58e4da489f68979725ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -154,6 +154,18 @@ public class ChunkHolder {
|
||||
@ -2357,18 +2357,9 @@ index df32a8b1df60064c49702dca26d7310b7d27e94b..92faf96e12b443351ea146d4d1deccb0
|
||||
completablefuture = (CompletableFuture) this.futures.get(i);
|
||||
if (completablefuture == null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 52bcfcc7443b57b0e57024c0c4e78c5a7260410d..e6090343eda328ab612a9345978cf8da353e9566 100644
|
||||
index b794922eeccc845632f2442a3ed923f1d826a9e1..2c2f0497e34c58c358b04e72c9d27ef1eead4a42 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -115,7 +115,7 @@ 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;
|
||||
@@ -406,6 +406,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
@ -2645,7 +2636,7 @@ index 52bcfcc7443b57b0e57024c0c4e78c5a7260410d..e6090343eda328ab612a9345978cf8da
|
||||
return this.poiManager;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index bd937505244cc9305611815a9274f91395d3a8f8..b15d5c2a8d4d2184a55a16ff2071fd82cb2e0457 100644
|
||||
index 853056ad5c5eeff03e7d6fe0dfd6f837a03ad882..672f78d1560ccd45d1a0ca04d6daf8188105c3e9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -323,10 +323,128 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@ -2824,7 +2815,7 @@ index bd937505244cc9305611815a9274f91395d3a8f8..b15d5c2a8d4d2184a55a16ff2071fd82
|
||||
} finally {
|
||||
chunkMap.callbackExecutor.run();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e299bf10c0bdd14398d590939d90cc723ecd4ce5..479bea88e497adfe8cfacd53b5de825bba8e4722 100644
|
||||
index 774f37e02feb83be3b92620aa4a0227a0c4acc93..434f3a56e373e584801d66c13ba2c045a383beea 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -210,6 +210,79 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@ -2929,7 +2920,7 @@ index 0d536d72ac918fbd403397ff369d10143ee9c204..be677d437d17b74c6188ce1bd5fc6fdc
|
||||
private final String name;
|
||||
private final Comparator<T> comparator;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1c76d6a616d6967402fb55feffafffa0aa2fd468..2917632c5e974dbfb7d78c497ebd49e742b8ef3c 100644
|
||||
index eb52ca159e895608a6a662821f14910970759dd2..05d5d976c18149491124263b056224a384eee06d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -712,6 +712,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 63f3913815a49eb3e46e89382438cbc7826886ae..873852a77e5e62bd45912a73512edc6f02130349 100644
|
||||
index 1800119160d5711b694c14e9dde175b11c06ce61..6950e36b5e0522ba40874d3c786e5dff2ad12fed 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2230,6 +2230,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2232,6 +2232,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
connection.send(new net.minecraft.network.protocol.game.ClientboundOpenBookPacket(net.minecraft.world.InteractionHand.MAIN_HAND));
|
||||
connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(0, slot, inventory.getSelected()));
|
||||
}
|
||||
|
@ -4,21 +4,8 @@ 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 30c3b24af7efebecc21d190ab89817468bdbee22..147fc3f7648a519441eec7ef1048fd18ea595d98 100644
|
||||
--- a/src/main/java/net/minecraft/commands/arguments/blocks/BlockStateParser.java
|
||||
+++ b/src/main/java/net/minecraft/commands/arguments/blocks/BlockStateParser.java
|
||||
@@ -63,7 +63,7 @@ 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 4ad6fd7e110f949f0bd859331ed6a5109ade3008..6252c3934d72b0d5e6809842bdd26d344cab98c6 100644
|
||||
index 4ad6fd7e110f949f0bd859331ed6a5109ade3008..9288588af4e0f9dd4c9711260cd4b73b66632bb7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -83,6 +83,12 @@ import org.bukkit.persistence.PersistentDataContainer;
|
||||
@ -374,7 +361,7 @@ index 4ad6fd7e110f949f0bd859331ed6a5109ade3008..6252c3934d72b0d5e6809842bdd26d34
|
||||
+ if (isTag) {
|
||||
+ key = blockParser.getTag();
|
||||
+ } else {
|
||||
+ key = blockParser.getBlockKey();
|
||||
+ key = blockParser.id;
|
||||
+ }
|
||||
+
|
||||
+ if (key == null) {
|
||||
|
@ -19,7 +19,7 @@ spectate the target entity.
|
||||
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index df02d712e7daf1603885547995d69cb7fa3962ca..3ca3a1c16ea0900bfb868a6e2fc88e3522bf7752 100644
|
||||
index df02d712e7daf1603885547995d69cb7fa3962ca..72d17bfbe0830721caa7d1fd0aa50916e75b1ed7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1822,14 +1822,58 @@ public class ServerPlayer extends Player {
|
||||
@ -55,12 +55,12 @@ index df02d712e7daf1603885547995d69cb7fa3962ca..3ca3a1c16ea0900bfb868a6e2fc88e35
|
||||
+ // 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 df02d712e7daf1603885547995d69cb7fa3962ca..3ca3a1c16ea0900bfb868a6e2fc88e35
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2917632c5e974dbfb7d78c497ebd49e742b8ef3c..4f263837f4111f77e14e4663afeff4e170b2b3da 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1381,6 +1381,7 @@ 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);
|
||||
}
|
||||
|
@ -51,10 +51,10 @@ index 315dad4789f5f2582ee9b4fc176affd1f57537ef..f4a056185990181e486f452960159a52
|
||||
|
||||
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 17e2219bf69e8282aedf476fea5ee00137a95057..cd95e232e174de5aad462bc968fed5dda16b140d 100644
|
||||
index 5999417f4a357a895757e13f9b69fc970595be2e..59154fbdba07e812ca99fbd2d3b70d24ae9dbfd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1558,6 +1558,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1557,6 +1557,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
case START_DESTROY_BLOCK:
|
||||
case ABORT_DESTROY_BLOCK:
|
||||
case STOP_DESTROY_BLOCK:
|
||||
|
@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to
|
||||
be unintentional in the few cases we've seen so far.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index a5772815211b2739b493f2547fae819b9d9b7a39..7887173102ec582740189882064f5610d952d205 100644
|
||||
index 0e27598d8b05c09e0ae3aae618573fe774b84cca..8c19f5b79fd846bea4eb5c4776eb9a4a282b24c1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2277,6 +2277,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2279,6 +2279,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void resetCooldown() {
|
||||
getHandle().resetAttackStrengthTicker();
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ it only impacts data sent from the client.
|
||||
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6af9fbf46cb5fcf419fdf8800b5f6b08ef09cc81..c184417a71467abd420c99ba5feb3a1844e92c1d 100644
|
||||
index f0eda343820087497d20ed75d925ea6044f70816..58baed7f75ff0b573e072ad19026b7ef94a56172 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -255,6 +255,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@ -33,7 +33,7 @@ index 6af9fbf46cb5fcf419fdf8800b5f6b08ef09cc81..c184417a71467abd420c99ba5feb3a18
|
||||
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
@@ -2867,10 +2868,20 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2866,10 +2867,20 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
List<net.kyori.adventure.text.Component> lines = new java.util.ArrayList<>();
|
||||
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
|
@ -22,10 +22,10 @@ index ad9bbda31a4cdb306ca40f2b99e4b815c4f136bd..28afe2f238ded241acf77c3272a44068
|
||||
this.broadcast.accept(packet);
|
||||
if (this.entity instanceof ServerPlayer) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c184417a71467abd420c99ba5feb3a1844e92c1d..61cfe722c01ac8fa89e8ade3e798bc50bed5e186 100644
|
||||
index 58baed7f75ff0b573e072ad19026b7ef94a56172..4184b8c002c0d36574c6710558d85930d3f72279 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2289,7 +2289,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2288,7 +2288,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
if (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem) {
|
||||
// Refresh the current entity metadata
|
||||
|
@ -23,7 +23,7 @@ index 13e730b18c346934c061fb570048623ad66e7344..090958a30ce20ff01ae77d4cd821a167
|
||||
config.addDefault("world-settings.default." + path, def);
|
||||
return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path));
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c8a59de4673d430fc8ec2e53315f107293122e7e..40e48c3f1199b127066732e3c8a6d40c232215b2 100644
|
||||
index f24ce5a2543513650a3efb73e2bb5f8cd992ef88..29c1b3a43dd369419e8c93b571679a2ba024e4f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -775,35 +775,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -85,7 +85,7 @@ index c8a59de4673d430fc8ec2e53315f107293122e7e..40e48c3f1199b127066732e3c8a6d40c
|
||||
// CraftBukkit start
|
||||
// this.updateSpawnFlags();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 278d8cc1987fd6edf5bd316d6a9163f8824ee654..986147ba4e7a807a34cb136f49402973e03a0894 100644
|
||||
index 1192033c0c2248554ba452c7f3f8f05f29d9ac3a..708bc5689e68d9e3e415e9d2dc1082cf85ee8b58 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -61,6 +61,7 @@ import net.minecraft.network.protocol.game.ClientboundSoundEntityPacket;
|
||||
@ -111,7 +111,7 @@ index 278d8cc1987fd6edf5bd316d6a9163f8824ee654..986147ba4e7a807a34cb136f49402973
|
||||
+ 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 278d8cc1987fd6edf5bd316d6a9163f8824ee654..986147ba4e7a807a34cb136f49402973
|
||||
+ // 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 278d8cc1987fd6edf5bd316d6a9163f8824ee654..986147ba4e7a807a34cb136f49402973
|
||||
+ 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 278d8cc1987fd6edf5bd316d6a9163f8824ee654..986147ba4e7a807a34cb136f49402973
|
||||
+ // 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
|
||||
|
@ -7,10 +7,10 @@ Fixes an AssertionError when setting the player's item in hand to null or a new
|
||||
Fixes GH-2718
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e75e29919c6703f720658bc1c6f6f347ef066a82..58c5fd6518cf7a05725a840f6051ed0548eb1cd6 100644
|
||||
index a95abfa5f43f383401934d09e065621b0b6ce4d8..f0c22ac0765cf3efa105f99c3f5c4ca3243914eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1741,6 +1741,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1740,6 +1740,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524
|
||||
return;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 58c5fd6518cf7a05725a840f6051ed0548eb1cd6..2e7b909750ee512dce40b8574dfb62ed68fbbfb6 100644
|
||||
index f0c22ac0765cf3efa105f99c3f5c4ca3243914eb..fae06882217adf20c6f81db2793ee3930cba30c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1501,6 +1501,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1500,6 +1500,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
private void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Load Chunks for Login Asynchronously
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 63f20e7adf80a1b81438262087e33c3a1e63ca7f..f0d574307b24d19d3006e5c53b650c75436bde38 100644
|
||||
index 05e520165a86eb52e1fd4130b6f2ccc4c838934a..04260e1e8cf17d2af06504fae949958b91c86bef 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -172,6 +172,7 @@ public class ServerPlayer extends Player {
|
||||
@ -37,7 +37,7 @@ index be677d437d17b74c6188ce1bd5fc6fdc228fd92f..78fbb4c3e52e900956ae0811aaf934c8
|
||||
public static final TicketType<ChunkPos> UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1);
|
||||
public static final TicketType<Unit> PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2e7b909750ee512dce40b8574dfb62ed68fbbfb6..0d8a8b3d7a13e2384f8614bdc190768c03bb98c2 100644
|
||||
index fae06882217adf20c6f81db2793ee3930cba30c0..c57b5cf7d61eab5a45e3fa69e8804fd0ef4a54ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -221,6 +221,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@ -96,7 +96,7 @@ index 477117affabfe07d52d3b40404613492b0bcdc56..3a7cc4f8ee62c8ff726ecf3e669c9f9b
|
||||
try {
|
||||
ServerPlayer entityplayer1 = this.server.getPlayerList().processLogin(this.gameProfile, s); // CraftBukkit - add player reference
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 3a13c151066c8784fdc844e1d6310f77ff32e7f1..c4242a1602bbb02541c330bc02016f15c8644358 100644
|
||||
index 3a13c151066c8784fdc844e1d6310f77ff32e7f1..846b0dcee92f71d1c887ea88744c36f6a870c5e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -38,6 +38,7 @@ import net.minecraft.network.protocol.Packet;
|
||||
@ -107,13 +107,7 @@ index 3a13c151066c8784fdc844e1d6310f77ff32e7f1..c4242a1602bbb02541c330bc02016f15
|
||||
import net.minecraft.network.protocol.game.ClientboundEntityEventPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundGameEventPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundInitializeBorderPacket;
|
||||
@@ -127,11 +128,12 @@ 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;
|
||||
@@ -132,6 +133,7 @@ public abstract class PlayerList {
|
||||
private final IpBanList ipBans;
|
||||
private final ServerOpList ops;
|
||||
private final UserWhiteList whitelist;
|
||||
@ -173,7 +167,7 @@ index 3a13c151066c8784fdc844e1d6310f77ff32e7f1..c4242a1602bbb02541c330bc02016f15
|
||||
+ }
|
||||
+
|
||||
+ public ServerPlayer getActivePlayer(UUID uuid) {
|
||||
+ ServerPlayer player = this.getUUIDMap().get(uuid);
|
||||
+ ServerPlayer player = this.playersByUUID.get(uuid);
|
||||
+ return player != null ? player : pendingPlayers.get(uuid);
|
||||
+ }
|
||||
+
|
||||
@ -250,7 +244,7 @@ index 3a13c151066c8784fdc844e1d6310f77ff32e7f1..c4242a1602bbb02541c330bc02016f15
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7120400af3e6a36f9b097fe9dfaff655209b03ce..d9ed724d07309f23c91f20c9af888cce5127e323 100644
|
||||
index fa63a52cba5355612ce417f4bb8077a89ce59398..32323729f913d27170fca0e69346e8d2943089af 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1511,7 +1511,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
@ -5,20 +5,8 @@ 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 11fd6d24ed0612e4df1a0493907178fb9c455d1c..d7023cb0974f6c28a0fb8a0a6e5a6600fe30d3e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1718,6 +1718,7 @@ 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 187a4542dbdad2708a6ada8a84591788d5d1a125..57467cf2425bc9278e45c7ea5194a29155c69b92 100644
|
||||
index c643919e17081c85717b0b00c227b914d7abcc0a..9ce330be998f3392288d8eb0386a48237ff3a880 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -63,6 +63,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
|
||||
@ -44,7 +32,7 @@ index 187a4542dbdad2708a6ada8a84591788d5d1a125..57467cf2425bc9278e45c7ea5194a291
|
||||
+ 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
|
||||
|
||||
@ -300,7 +288,7 @@ index 187a4542dbdad2708a6ada8a84591788d5d1a125..57467cf2425bc9278e45c7ea5194a291
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5bdb1ce8875c276e5f7997db83b097b910c0a136..2cf6c22de0416fad843a901d2ffb97a55937290f 100644
|
||||
index 677124d720105e9bda9d05a1fcc46ce10f44539d..fe4b09f82d36e5d7e109c86e8f4c003e92ba4e9d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -50,6 +50,7 @@ import net.minecraft.network.syncher.EntityDataSerializers;
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Optimize isOutsideRange to use distance maps
|
||||
Use a distance map to find the players in range quickly
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 97faf7ece336928f22e518a14653b4fbc672d876..c2401b2ff0547335ddbbeb05c07b74552c246fc9 100644
|
||||
index 55f355d1218ddb3f320752666407151291c0f398..948a817a1d6f4435655931357aa094b889771e82 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -100,6 +100,18 @@ public class ChunkHolder {
|
||||
@ -37,11 +37,11 @@ index 97faf7ece336928f22e518a14653b4fbc672d876..c2401b2ff0547335ddbbeb05c07b7455
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index a345d4bff47b937852ad33be42d5c823dc11c733..b4b330988bf1a2f0b2ec7da35ee816c1d60f3ab9 100644
|
||||
index 9ce330be998f3392288d8eb0386a48237ff3a880..708c135fbdc5f071bd979dc496aefb1fac7a2284 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -241,6 +241,17 @@ 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
|
||||
@ -291,7 +291,7 @@ index b49d380ef088aed3204ec71abc437c348ef004fa..577b391dcba1db712c1e2c83296e1c87
|
||||
|
||||
public String getDebugStatus() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index c8c873f9e7fd1a8ea2d32f37be6d221408b7687d..e46ccbca0cfa63dd5143080375193a95a9249d60 100644
|
||||
index 0bb931ae8faa8e1fe36895d8321a9b36d325c3ed..135d162a926bd258d2aa001b7d0ef880fd3f2fb9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -730,6 +730,37 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@ -362,7 +362,7 @@ index c8c873f9e7fd1a8ea2d32f37be6d221408b7687d..e46ccbca0cfa63dd5143080375193a95
|
||||
if (chunksTicked[0]++ % 10 == 0) this.level.getServer().midTickLoadChunks(); // Paper
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index f0d574307b24d19d3006e5c53b650c75436bde38..d59e707f28a5f04545208ad33d122fc433b85933 100644
|
||||
index 04260e1e8cf17d2af06504fae949958b91c86bef..384f38b3c7dd030f107991137912866ae045f811 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -244,6 +244,7 @@ public class ServerPlayer extends Player {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3493fb7f526cb713340475734f176aa52ade2d12..ff0cb2ca36f052c55f2bd37b74c33b2192a03873 100644
|
||||
index 9c71188b1e193b4937eed07ff80c5a61b2db8643..03a98771e828696fef2685fbde040293645a3c17 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2778,9 +2778,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2777,9 +2777,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
this.player.resetLastActionTime();
|
||||
if (!this.player.isSpectator() && this.player.containerMenu.containerId == packet.getContainerId() && this.player.containerMenu instanceof RecipeBookMenu) {
|
||||
|
@ -8,7 +8,7 @@ makes it so that the server keeps the last difficulty used instead
|
||||
of restoring the server.properties every single load.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 04531db7c26b9defe76d2584d960132ad79dc0fa..ccca42f9a1cd72e7f4fe21bd626b61f06c51e2e7 100644
|
||||
index a465baa097339a5f661c2c331cbd3cbe854e53b2..b4ad624270406d86fb2d18edc1d94979454e779c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1721,11 +1721,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -63,10 +63,10 @@ index e5f7f043cbdb28d85b8aa0eea7cbaeb584e5fb85..a5c1114f9b323e8a49c84d0e68461e47
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 56e93709ce955a7c65dc2b058b5b8b8a646d1775..fecb2a6b8674ca110d6af539396873e9dcdc0edb 100644
|
||||
index 38f2b5ef4f4a96e5cf919eaa22f82a6909d9c909..fb010fb253f490a79e9172d7a3d017ad51dac958 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3041,7 +3041,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3040,7 +3040,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
||||
|
@ -312,7 +312,7 @@ index 88c7ae09e29a32309bf2a63ac0593b42d3fe6a42..914678af675be57fecc92189c709da97
|
||||
if (chunk != null) {
|
||||
chunkStorage.callbackExecutor.execute(() -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 07ecd8fd4d0806309c2ac3a465f1ddae3b164e60..f0ad0eef003067f3b582d6eda2b89964fdd556ea 100644
|
||||
index 3464593f1c1af6c6b36549496bc85f2e51655ccf..b92eaa44434e2ee368b90d43f322cb8601d159bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -149,6 +149,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@ -321,7 +321,7 @@ index 07ecd8fd4d0806309c2ac3a465f1ddae3b164e60..f0ad0eef003067f3b582d6eda2b89964
|
||||
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;
|
||||
@@ -187,6 +188,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
@ -1027,7 +1027,7 @@ index 334f1ad2a5ce236b58a82b1ef2e143eaa3909f12..c0bbb1acd7d83a70c9f2c34f7d19cea0
|
||||
boolean flag1 = this.chunkMap.promoteChunkMap();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index fa2eb25cdf7d8b0a80b46bc98dcdde7b67e50813..8f12232bfdf82c140fe83f88ef93b96092d586a8 100644
|
||||
index 384f38b3c7dd030f107991137912866ae045f811..29df08d378363d57508dc654a129c60bc38ad21b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -183,6 +183,14 @@ public class ServerPlayer extends Player {
|
||||
@ -1101,10 +1101,10 @@ index 8770fe0db46b01e8b608637df4f1a669a3f4cdde..3c1698ba0d3bc412ab957777d9b5211d
|
||||
private final String name;
|
||||
private final Comparator<T> comparator;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index fecb2a6b8674ca110d6af539396873e9dcdc0edb..6476d2a478b85116061a13f7ef2a5fec2ade4a04 100644
|
||||
index fb010fb253f490a79e9172d7a3d017ad51dac958..3e91275b318904ffa31183987fcbc7b28692781a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1566,6 +1566,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1565,6 +1565,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
this.player.absMoveTo(d0, d1, d2, f, f1);
|
||||
@ -1113,7 +1113,7 @@ index fecb2a6b8674ca110d6af539396873e9dcdc0edb..6476d2a478b85116061a13f7ef2a5fec
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 66735bbc2528c5812c9df14ef7cd91cb69d903b2..8ebbbecaebea8435232a2ccd9ad1062eb1dbbd6c 100644
|
||||
index 247d4959c67d41d2f4995c2e19f4c652e97694f5..f452cddd312793465dedb29c4e52d1c4dd1b4360 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -283,8 +283,8 @@ public abstract class PlayerList {
|
||||
@ -1144,7 +1144,7 @@ index 66735bbc2528c5812c9df14ef7cd91cb69d903b2..8ebbbecaebea8435232a2ccd9ad1062e
|
||||
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6c4c82fb439a07f62668b625b6ba5d552949964d..6ddef28e869ae8f3b3cbc4bacc44abc364d036d8 100644
|
||||
index 2a0f72b98d025f1f140d9118937d41e7b172be60..0fd3d689b80484339f437525130bc34de2e71e54 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -223,7 +223,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@ -1174,7 +1174,7 @@ index f72471ac82907a0d5112598b3289689495285944..6e1f8323d028790d1f55d51edb3214d0
|
||||
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null);
|
||||
if (chunk != null) addTicket(x, z); // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 4dae19fec0c4914d7b9cc3d41fb8ce36b08fbc81..160254615dac48af2af474c303b57dd293fb224b 100644
|
||||
index a98394d9bab490c1bdb5817cb30806cab85de730..535fb8f029dc09862e42e239a0fc7326e31508ef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -889,6 +889,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Move range check for block placing up
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6476d2a478b85116061a13f7ef2a5fec2ade4a04..003cd8a304420671d487c9e55622d9578aa75b3a 100644
|
||||
index 3e91275b318904ffa31183987fcbc7b28692781a..ea17f9263bef3a2a36dde15d0d75b8a5a695aa93 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1694,17 +1694,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1693,17 +1693,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
BlockPos blockposition = movingobjectpositionblock.getBlockPos();
|
||||
Direction enumdirection = movingobjectpositionblock.getDirection();
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 003cd8a304420671d487c9e55622d9578aa75b3a..6caae980ab043b8d48479e0849e1e297a78eb97a 100644
|
||||
index ea17f9263bef3a2a36dde15d0d75b8a5a695aa93..10126fccdfde8acdb55bbe9c9bfc57435ed13677 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
|
||||
@ -33,7 +33,7 @@ index 003cd8a304420671d487c9e55622d9578aa75b3a..6caae980ab043b8d48479e0849e1e297
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.server = server;
|
||||
this.connection = connection;
|
||||
@@ -3001,6 +3005,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3000,6 +3004,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register");
|
||||
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
|
||||
|
||||
@ -42,7 +42,7 @@ index 003cd8a304420671d487c9e55622d9578aa75b3a..6caae980ab043b8d48479e0849e1e297
|
||||
@Override
|
||||
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
@@ -3028,6 +3034,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3027,6 +3033,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
try {
|
||||
byte[] data = new byte[packet.data.readableBytes()];
|
||||
packet.data.readBytes(data);
|
||||
@ -58,7 +58,7 @@ index 003cd8a304420671d487c9e55622d9578aa75b3a..6caae980ab043b8d48479e0849e1e297
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@@ -3037,6 +3052,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3036,6 +3051,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
}
|
||||
|
||||
@ -72,10 +72,10 @@ index 003cd8a304420671d487c9e55622d9578aa75b3a..6caae980ab043b8d48479e0849e1e297
|
||||
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 160254615dac48af2af474c303b57dd293fb224b..99e35c68875ae807f406acd6f693f216fab749cd 100644
|
||||
index 535fb8f029dc09862e42e239a0fc7326e31508ef..6557ae8a996ddb227a9fadd4ac30d44b1c5e47b2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2418,6 +2418,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2420,6 +2420,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper end
|
||||
};
|
||||
|
||||
|
@ -5,17 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1ffb6c12a2eadc0fee0081f980594ac8b5bc4277..ba34e6a8b210cd1549ad2a49d90d3891ee40511c 100644
|
||||
index 070bc5f072163b35868ef234e5f34c3eede4c934..9790d6f7f451233e5abcaad24befb8b638ad8df3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1660,12 +1660,14 @@ 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();
|
||||
@@ -1666,6 +1666,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
//ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(this.worldData.a(), 0, this.worldData.c()));
|
||||
|
||||
this.levelData.setSpawn(pos, angle);
|
||||
@ -24,7 +17,7 @@ index 1ffb6c12a2eadc0fee0081f980594ac8b5bc4277..ba34e6a8b210cd1549ad2a49d90d3891
|
||||
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
|
||||
this.removeTicketsForSpawn(this.paperConfig.keepLoadedRange, prevSpawn);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6c5b6a5f1b9ee3fb5a6bae4d57c70cfcaba75624..d1c7d5a0918bf4d11c453fe31b3dfda9e146474c 100644
|
||||
index 6c5b6a5f1b9ee3fb5a6bae4d57c70cfcaba75624..8c8627f70f29834e19093b6298127008e75b7d74 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -386,11 +386,13 @@ public class CraftWorld implements World {
|
||||
@ -32,7 +25,7 @@ index 6c5b6a5f1b9ee3fb5a6bae4d57c70cfcaba75624..d1c7d5a0918bf4d11c453fe31b3dfda9
|
||||
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.
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add a way to get translation keys for blocks, entities and
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 9be6bcd490562ceefcadcfbbb6f650688737278b..f901ac92e5187868a01946c0744773f4f59af82e 100644
|
||||
index f38ccdecbade43983358dfbeadca86be7d15a68c..bd51753e3afaa5e025583964b16851dfa5dc8796 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -291,6 +291,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -290,6 +290,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
return Registry.ENTITY_TYPE.getKey(type);
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7ee2099dd22eaab384a16ef6a4ab50791fa16aac..d3aff6b0bbf52855adbcd3baca8ca9cb28d1128b 100644
|
||||
index bc839946fd2565ab34278991f09dfddc29257c1b..7894e20484c0b4a48f1cb5181bcb792656db9c94 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2038,6 +2038,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2037,6 +2037,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.getFunctionLibrary());
|
||||
this.structureManager.onResourceManagerReload(this.resources.getResourceManager());
|
||||
|
@ -9,7 +9,7 @@ as this is how Vanilla teleports entities.
|
||||
Cancel any pending motion when teleported.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6caae980ab043b8d48479e0849e1e297a78eb97a..b5b5f36cbdaac7791426ed721ff7db523edbda95 100644
|
||||
index 10126fccdfde8acdb55bbe9c9bfc57435ed13677..32106de96d13b4d5be08c3c85b1e57d3552e9429 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -682,7 +682,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@ -21,7 +21,7 @@ index 6caae980ab043b8d48479e0849e1e297a78eb97a..b5b5f36cbdaac7791426ed721ff7db52
|
||||
this.lastGoodX = this.awaitingPositionFromClient.x;
|
||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||
@@ -1569,7 +1569,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1568,7 +1568,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit end
|
||||
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
@ -31,7 +31,7 @@ index 6caae980ab043b8d48479e0849e1e297a78eb97a..b5b5f36cbdaac7791426ed721ff7db52
|
||||
this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6ddef28e869ae8f3b3cbc4bacc44abc364d036d8..f5718c963d0b34f46a8aa2b82ced48e066c03edc 100644
|
||||
index 0fd3d689b80484339f437525130bc34de2e71e54..b2e6426b9d8bcc860f83c3b79577bbc1cdb278db 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -152,6 +152,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d3aff6b0bbf52855adbcd3baca8ca9cb28d1128b..504d14404ed180f5193552983e5dc08e2efcfd6d 100644
|
||||
index 7894e20484c0b4a48f1cb5181bcb792656db9c94..16bb7d28c8b0e3b60def7ef0e93e648df22c6302 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2104,6 +2104,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2103,6 +2103,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.isEnforceWhitelist()) {
|
||||
PlayerList playerlist = source.getServer().getPlayerList();
|
||||
UserWhiteList whitelist = playerlist.getWhiteList();
|
||||
|
@ -14,20 +14,8 @@ 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 e05e5710c81b7dbb648afbfe16f843e7ae310752..77e262f2236318e053da136037332fbe6d8bf380 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -371,6 +371,7 @@ 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 cd51115b7c56e7eeab1248f39a690fc91524efd7..b55d5c14000317db97f2f6e511f97ff6f03fa972 100644
|
||||
index cd51115b7c56e7eeab1248f39a690fc91524efd7..2b167b65aae90aefa10dcb852d00b2abd332d2d2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -307,7 +307,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@ -39,7 +27,7 @@ index cd51115b7c56e7eeab1248f39a690fc91524efd7..b55d5c14000317db97f2f6e511f97ff6
|
||||
+ //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
|
||||
|
||||
|
@ -23,7 +23,7 @@ index 7d50aded88f5b7dfebaea1aebc86231f7b5c4e25..652d87fc5d566dba8018c81676329f0e
|
||||
public static boolean velocityOnlineMode;
|
||||
public static byte[] velocitySecretKey;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c49d9eb34883342e685c5363a4d33bf4519b2b3b..4d4b0c1fd4021367f16a292e6059de7f61a8ca8a 100644
|
||||
index 1b6610cc04f6bcb6d3153886e62ce117c6a17e15..6d88ec99a634d58ba51a87db9e25d746ec746862 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -232,6 +232,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@ -42,7 +42,7 @@ index c49d9eb34883342e685c5363a4d33bf4519b2b3b..4d4b0c1fd4021367f16a292e6059de7f
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -2795,6 +2797,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2794,6 +2796,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix interact event not being called in adventure
|
||||
Call PlayerInteractEvent when left-clicking on a block in adventure mode
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 4d4b0c1fd4021367f16a292e6059de7f61a8ca8a..703c5de24d2be2462cffe597f3a05d766075b128 100644
|
||||
index 6d88ec99a634d58ba51a87db9e25d746ec746862..16e0feef7dc99d0a06252a8d395a7c160d1e16e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1734,7 +1734,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1733,7 +1733,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
MutableComponent ichatmutablecomponent = (new TranslatableComponent("build.tooHigh", new Object[]{i - 1})).withStyle(ChatFormatting.RED);
|
||||
|
||||
this.player.sendMessage((Component) ichatmutablecomponent, ChatType.GAME_INFO, Util.NIL_UUID);
|
||||
@ -18,7 +18,7 @@ index 4d4b0c1fd4021367f16a292e6059de7f61a8ca8a..703c5de24d2be2462cffe597f3a05d76
|
||||
this.player.swing(enumhand, true);
|
||||
}
|
||||
}
|
||||
@@ -2206,7 +2206,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2205,7 +2205,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
Vec3 vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
|
||||
HitResult movingobjectposition = this.player.level.clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, this.player));
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 504d14404ed180f5193552983e5dc08e2efcfd6d..6fe5fc1fef179d1f82265290bc701e91616f16b6 100644
|
||||
index 16bb7d28c8b0e3b60def7ef0e93e648df22c6302..75782de78255e0d52f85034973dbef3aeca3ac7e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2017,7 +2017,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2016,7 +2016,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.functionManager;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ index 504d14404ed180f5193552983e5dc08e2efcfd6d..6fe5fc1fef179d1f82265290bc701e91
|
||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||
Stream<String> stream = datapacks.stream(); // CraftBukkit - decompile error
|
||||
PackRepository resourcepackrepository = this.packRepository;
|
||||
@@ -2033,6 +2039,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2032,6 +2038,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.packRepository.setSelected(datapacks);
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
datapackresources.updateGlobals();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 6708ac20478264889ea92f953afcbd9f4098d08e..ff1ad929cb4494c7a97fe5e240421e25b7ff0857 100644
|
||||
index 8621141c4000001a6c52434dc81994251afc1a5b..e0f478f234f53d9bfb600ce69463ae6d8bfc100c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1749,6 +1749,11 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -1748,6 +1748,11 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
});
|
||||
optional1.ifPresent((villageplacetype) -> {
|
||||
this.getServer().execute(() -> {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose Tracked Players
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index a28625f0b6e98b61f395a1b3ee07c2f7bc195893..e5a2fcd390ab5b41d7e482d486cef42a9eef94f5 100644
|
||||
index 85187e7b0d965b7930e6b2ab8d321d6d27211a35..4f61acf44b40bf15ae6465d7999e2bc2da837c82 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2337,6 +2337,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2339,6 +2339,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -20,10 +20,10 @@ index 20eb4aea24cc6699747b18b2c00e5b01dafb47c6..acd61a9033fdfb91e29a5fa6a10b8983
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 703c5de24d2be2462cffe597f3a05d766075b128..f6cd3c60f1d07b48ce953b1e2eb71121b3790730 100644
|
||||
index 16e0feef7dc99d0a06252a8d395a7c160d1e16e8..1a0ab16e1337867e982af8cd1a4e646b06c6e8d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1723,7 +1723,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1722,7 +1722,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
int i = this.player.level.getMaxBuildHeight();
|
||||
|
||||
if (blockposition.getY() < i) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index f901ac92e5187868a01946c0744773f4f59af82e..536d979139326191d1199e93e9fc885164766aec 100644
|
||||
index bd51753e3afaa5e025583964b16851dfa5dc8796..b48548d284e55c9010b99823325fcc14aa5ab051 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -334,6 +334,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -333,6 +333,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
|
||||
@Nullable
|
||||
public T spawnCreature(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
@ -22,7 +22,7 @@ index f901ac92e5187868a01946c0744773f4f59af82e..536d979139326191d1199e93e9fc8851
|
||||
// Paper start - Call PreCreatureSpawnEvent
|
||||
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityType.getKey(this).getPath());
|
||||
if (type != null) {
|
||||
@@ -349,6 +355,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
@@ -348,6 +354,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
}
|
||||
// Paper end
|
||||
T t0 = this.create(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1);
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] forced whitelist: use configurable kick message
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e9f5039403847a5483e67f95c900593e2f89cb60..6f68e45bdb01605a93af1a4117743c6b0ee26056 100644
|
||||
index 280a7ca4ae3a0ed92dd411c8e4e3f253b60f9a9d..6003dff25e78395a92ab279f1a93f016f4a79c56 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -77,7 +77,6 @@ import net.minecraft.nbt.NbtOps;
|
||||
@ -16,7 +16,7 @@ index e9f5039403847a5483e67f95c900593e2f89cb60..6f68e45bdb01605a93af1a4117743c6b
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetTimePacket;
|
||||
@@ -2124,7 +2123,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2123,7 +2122,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
|
||||
if (!whitelist.isWhiteListed(entityplayer.getGameProfile())) {
|
||||
|
@ -47,14 +47,14 @@ index acd61a9033fdfb91e29a5fa6a10b8983ed94baa5..20ce2c304ba57e2399e966da7dee9a02
|
||||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 536d979139326191d1199e93e9fc885164766aec..c7f50d45b3a0a238e41e5a024cd4dec08e07c8b4 100644
|
||||
index b48548d284e55c9010b99823325fcc14aa5ab051..56d9102b1a0e9d45cb1696fe5ec771972512a130 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -561,9 +561,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
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) -> {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1f7ac37a1640d5fa4c93929e21bf8b84af136eea..924a2e7fbc9afbda52dda50ddf68fd408462246e 100644
|
||||
index 78ad9688a9acab75fb059f2a37528692faf71e86..2958ff7f1ac66120fc9880d17ec4b46c72821aaa 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1927,6 +1927,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1926,6 +1926,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (this.player.isImmobile()) return; // CraftBukkit
|
||||
if (packet.getSlot() >= 0 && packet.getSlot() < Inventory.getSelectionSize()) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 924a2e7fbc9afbda52dda50ddf68fd408462246e..0b2cb820b912ddb6366f7ffb79c71047d03f2001 100644
|
||||
index 2958ff7f1ac66120fc9880d17ec4b46c72821aaa..d63bc35d37b2d6628ff2fdd97fca7978c2dded0e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2461,7 +2461,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2460,7 +2460,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
case PERFORM_RESPAWN:
|
||||
if (this.player.wonGame) {
|
||||
this.player.wonGame = false;
|
||||
@ -18,7 +18,7 @@ index 924a2e7fbc9afbda52dda50ddf68fd408462246e..0b2cb820b912ddb6366f7ffb79c71047
|
||||
} else {
|
||||
if (this.player.getHealth() > 0.0F) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 92181c6f3168317a01df0e27daec32f826ff1dee..cc098fd2a2e78caede4d36a61d513406a1ea8908 100644
|
||||
index e11bdb3ee9512898dde4575633617658ac4bd951..a1a6c03daf2aa3babef6426e7abd3a37c470b100 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -800,6 +800,12 @@ public abstract class PlayerList {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] call PortalCreateEvent players and end platform
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index b98316165c6d10945ccc9e5e0c3f0be9cfc3e889..84eca485a09c6d147f3baa277e398de58a9dc147 100644
|
||||
index 1c980abc4fb5cab2a6dc9d1a8a3e8fdd0a7e3a4b..ad444adbd1dc17c52689a2b04ef3fea23fa746ed 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -523,6 +523,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -522,6 +522,7 @@ public class BlockPos extends Vec3i {
|
||||
return this.set(this.getX() + direction.getStepX() * distance, this.getY() + direction.getStepY() * distance, this.getZ() + direction.getStepZ() * distance);
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ index b98316165c6d10945ccc9e5e0c3f0be9cfc3e889..84eca485a09c6d147f3baa277e398de5
|
||||
return this.set(this.getX() + dx, this.getY() + dy, this.getZ() + dz);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 63a89a95cb40d2e39104c2c3f3991dd40cf1ca01..d61f7dc29968b6297c7f3884c0fcb255073ddb99 100644
|
||||
index 1d885c1c0709d49c3fddc174300b3fdd478e761b..90b5bfe7bd0deae842bf6ef228f5a0e09326518e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1168,15 +1168,21 @@ public class ServerPlayer extends Player {
|
||||
|
@ -45,7 +45,7 @@ index d75f78d2e3fb1376e8f6a8668c98a04a693c99e1..79f6089b934124c3309c6bee2e48b36b
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d61f7dc29968b6297c7f3884c0fcb255073ddb99..fdbc2d74947b2f6e9ba256b0c22d94e7654536c7 100644
|
||||
index 90b5bfe7bd0deae842bf6ef228f5a0e09326518e..5561d878ad47b9cd70aebec3a36a9296041e6e2d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1785,8 +1785,15 @@ public class ServerPlayer extends Player {
|
||||
@ -123,10 +123,10 @@ index b096384cdc7596166e010e06272534b8001693c9..4b756c0a4b607faa03b00ab81761335b
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0b2cb820b912ddb6366f7ffb79c71047d03f2001..52294f5cfce86faf301c835bf1a9c2a5f4f5d721 100644
|
||||
index d63bc35d37b2d6628ff2fdd97fca7978c2dded0e..084b17d6496799fd49a9f81bb6bcbff512fd8f78 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2470,7 +2470,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2469,7 +2469,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
this.player = this.server.getPlayerList().respawn(this.player, false);
|
||||
if (this.server.isHardcore()) {
|
||||
@ -136,7 +136,7 @@ index 0b2cb820b912ddb6366f7ffb79c71047d03f2001..52294f5cfce86faf301c835bf1a9c2a5
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e5a2fcd390ab5b41d7e482d486cef42a9eef94f5..6e3bebdb7667bfd39c608412b55f7ec7732e1f7d 100644
|
||||
index 4f61acf44b40bf15ae6465d7999e2bc2da837c82..f50772b5c07d5aa7dcd0ed015507c3f6440328c8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1249,7 +1249,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerKickEvent causes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f9e15a804388e2aeff8b45d7fba151651438f1c6..7ff7f60e214d4faebc4c27ee827de780f27a46b3 100644
|
||||
index 9feb9e64e64e19d99f6ba01e203b81f13235d12d..6620d1a16522d37746c9300768e21b58b52b764d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2125,7 +2125,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2124,7 +2124,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
|
||||
if (!whitelist.isWhiteListed(entityplayer.getGameProfile())) {
|
||||
@ -57,7 +57,7 @@ index 708ac03d5a849bf09c49547306e4a8c5a5ef8d91..5a8df368a4a25839cd4ac9be6972da2e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228f66d09f6 100644
|
||||
index 084b17d6496799fd49a9f81bb6bcbff512fd8f78..7d2ac8aa97805e8b022d3982b1332c5055fc8b90 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -321,7 +321,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@ -209,7 +209,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
} else {
|
||||
ServerLevel worldserver = this.player.getLevel();
|
||||
|
||||
@@ -1641,7 +1649,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1640,7 +1648,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.dropCount++;
|
||||
if (this.dropCount >= 20) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!");
|
||||
@ -218,7 +218,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1839,7 +1847,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1838,7 +1846,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {
|
||||
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
|
||||
@ -227,7 +227,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
}
|
||||
// Paper start
|
||||
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()];
|
||||
@@ -1944,7 +1952,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1943,7 +1951,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.player.resetLastActionTime();
|
||||
} else {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
|
||||
@ -236,7 +236,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1960,7 +1968,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1959,7 +1967,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
for (int i = 0; i < s.length(); ++i) {
|
||||
if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) {
|
||||
@ -245,7 +245,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2033,7 +2041,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2032,7 +2040,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
Waitable waitable = new Waitable() {
|
||||
@Override
|
||||
protected Object evaluate() {
|
||||
@ -254,7 +254,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -2048,7 +2056,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2047,7 +2055,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} else {
|
||||
@ -263,7 +263,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
@@ -2321,7 +2329,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2320,7 +2328,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// Spigot Start
|
||||
if ( entity == this.player && !this.player.isSpectator() )
|
||||
{
|
||||
@ -272,7 +272,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
return;
|
||||
}
|
||||
// Spigot End
|
||||
@@ -2412,7 +2420,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2411,7 +2419,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
// CraftBukkit end
|
||||
} else {
|
||||
@ -281,7 +281,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
|
||||
}
|
||||
}
|
||||
@@ -2806,7 +2814,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2805,7 +2813,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// Paper start
|
||||
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
if (recipeSpamPackets.addAndGet(com.destroystokyo.paper.PaperConfig.autoRecipeIncrement) > com.destroystokyo.paper.PaperConfig.autoRecipeLimit) {
|
||||
@ -290,7 +290,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2999,7 +3007,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2998,7 +3006,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
} else if (!this.isSingleplayerOwner()) {
|
||||
// Paper start - This needs to be handled on the main thread for plugins
|
||||
server.submit(() -> {
|
||||
@ -299,7 +299,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
});
|
||||
// Paper end
|
||||
}
|
||||
@@ -3045,7 +3053,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3044,7 +3052,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex);
|
||||
@ -308,7 +308,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
}
|
||||
} else if (packet.identifier.equals(CUSTOM_UNREGISTER)) {
|
||||
try {
|
||||
@@ -3055,7 +3063,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3054,7 +3062,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex);
|
||||
@ -317,7 +317,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
@@ -3073,7 +3081,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -3072,7 +3080,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@ -327,7 +327,7 @@ index 52294f5cfce86faf301c835bf1a9c2a5f4f5d721..40d0dac02bb1922483d68f3cdd09a228
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index cc098fd2a2e78caede4d36a61d513406a1ea8908..91985dd7251ea423780bfe21abaa30aeb4b3c92a 100644
|
||||
index a1a6c03daf2aa3babef6426e7abd3a37c470b100..94f840924682bf65460a05059a655e1200ecbef8 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -708,7 +708,7 @@ public abstract class PlayerList {
|
||||
@ -351,7 +351,7 @@ index cc098fd2a2e78caede4d36a61d513406a1ea8908..91985dd7251ea423780bfe21abaa30ae
|
||||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 6e3bebdb7667bfd39c608412b55f7ec7732e1f7d..3f0096423ba5db02c1007a8547d8a0497597055f 100644
|
||||
index f50772b5c07d5aa7dcd0ed015507c3f6440328c8..76e2ae09855e0efaaa0856d2f49e4968adbccbdc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -498,16 +498,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
Loading…
Reference in New Issue
Block a user