13
0
geforkt von Mirrors/Paper
Dieser Commit ist enthalten in:
Zach Brown 2019-05-13 21:20:58 -05:00
Ursprung 5e7cfaf718
Commit d84080e6d1
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76
278 geänderte Dateien mit 1269 neuen und 1298 gelöschten Zeilen

Datei anzeigen

@ -1,28 +1,28 @@
From eeda55e4929215bdae08f66dcbb3a4e9c02b3da3 Mon Sep 17 00:00:00 2001
From f90b7c9822f8711fafde9773238ec4703aaf9b35 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 00:16:08 +0100
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index 0bc8d481..be4e1ca5 100644
index 0d4ef897..69866193 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,33 +3,29 @@
@@ -2,34 +2,29 @@
<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>
+ <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.14-R0.1-SNAPSHOT</version>
<version>1.14.1-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>
@ -54,7 +54,7 @@ index 0bc8d481..be4e1ca5 100644
<repositories>
<!--
If you are a plugin developer, please use https://hub.spigotmc.org/nexus/content/repositories/snapshots/
@@ -41,6 +37,10 @@
@@ -41,6 +36,10 @@
<id>spigotmc-public</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
@ -65,7 +65,7 @@ index 0bc8d481..be4e1ca5 100644
</repositories>
<pluginRepositories>
@@ -57,6 +57,20 @@
@@ -57,6 +56,20 @@
<version>2.6</version>
<scope>compile</scope>
</dependency>
@ -86,7 +86,7 @@ index 0bc8d481..be4e1ca5 100644
<!-- bundled with Minecraft, should be kept in sync -->
<dependency>
<groupId>com.google.guava</groupId>
@@ -113,15 +127,12 @@
@@ -113,15 +126,12 @@
</dependencies>
<build>
@ -103,7 +103,7 @@ index 0bc8d481..be4e1ca5 100644
<dependencies>
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
<dependency>
@@ -156,6 +167,7 @@
@@ -156,6 +166,7 @@
</execution>
</executions>
<configuration>

Datei anzeigen

@ -1,4 +1,4 @@
From 38757c176090c45b72d90314edbd83d5be3cdffb Mon Sep 17 00:00:00 2001
From ba48d41f6fb7072f60e80b0bf683b3f1650b2aeb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 1 Apr 2016 00:02:47 -0400
Subject: [PATCH] Add FastUtil to Bukkit
@ -6,10 +6,10 @@ Subject: [PATCH] Add FastUtil to Bukkit
Doesn't expose to plugins, just allows Paper-API to use it for optimization
diff --git a/pom.xml b/pom.xml
index 2e261925..545af460 100644
index 69866193..3dac66d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,6 +51,12 @@
@@ -50,6 +50,12 @@
</pluginRepositories>
<dependencies>

Datei anzeigen

@ -1,4 +1,4 @@
From 9932b11d3b8b9e6d252020d261cc20342b9343b2 Mon Sep 17 00:00:00 2001
From cb9aa21c2fd11a5f9775048e79cd86369fd5fe78 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 18:48:17 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
new file mode 100644
index 000000000..64531fcce
index 00000000..64531fcc
--- /dev/null
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
@@ -0,0 +1,84 @@
@ -96,7 +96,7 @@ index 000000000..64531fcce
+}
diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java
new file mode 100644
index 000000000..9b45ce887
index 00000000..9b45ce88
--- /dev/null
+++ b/src/main/java/co/aikar/timings/NullTimingHandler.java
@@ -0,0 +1,68 @@
@ -170,7 +170,7 @@ index 000000000..9b45ce887
+}
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
new file mode 100644
index 000000000..933ecf9bd
index 00000000..933ecf9b
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
@@ -0,0 +1,83 @@
@ -259,7 +259,7 @@ index 000000000..933ecf9bd
+}
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
new file mode 100644
index 000000000..a21e5ead5
index 00000000..a21e5ead
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timing.java
@@ -0,0 +1,83 @@
@ -348,7 +348,7 @@ index 000000000..a21e5ead5
+}
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
new file mode 100644
index 000000000..a5d13a1e4
index 00000000..a5d13a1e
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingData.java
@@ -0,0 +1,122 @@
@ -476,7 +476,7 @@ index 000000000..a5d13a1e4
+}
diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java
new file mode 100644
index 000000000..cc0390c06
index 00000000..cc0390c0
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHandler.java
@@ -0,0 +1,227 @@
@ -709,7 +709,7 @@ index 000000000..cc0390c06
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
new file mode 100644
index 000000000..ddaed8127
index 00000000..ddaed812
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
@@ -0,0 +1,354 @@
@ -1069,7 +1069,7 @@ index 000000000..ddaed8127
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
new file mode 100644
index 000000000..86d5ac6bd
index 00000000..86d5ac6b
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
@@ -0,0 +1,58 @@
@ -1133,7 +1133,7 @@ index 000000000..86d5ac6bd
+}
diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java
new file mode 100644
index 000000000..df142a89b
index 00000000..df142a89
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
@@ -0,0 +1,116 @@
@ -1255,7 +1255,7 @@ index 000000000..df142a89b
+}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
new file mode 100644
index 000000000..0b34e0d01
index 00000000..0b34e0d0
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timings.java
@@ -0,0 +1,293 @@
@ -1554,7 +1554,7 @@ index 000000000..0b34e0d01
+}
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
new file mode 100644
index 000000000..c0d8f2016
index 00000000..c0d8f201
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
@@ -0,0 +1,122 @@
@ -1682,7 +1682,7 @@ index 000000000..c0d8f2016
+}
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
new file mode 100644
index 000000000..5923adfe6
index 00000000..5923adfe
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
@@ -0,0 +1,355 @@
@ -2043,7 +2043,7 @@ index 000000000..5923adfe6
+}
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
new file mode 100644
index 000000000..ef824d701
index 00000000..ef824d70
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
@@ -0,0 +1,188 @@
@ -2237,7 +2237,7 @@ index 000000000..ef824d701
+}
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
new file mode 100644
index 000000000..bf3e059fe
index 00000000..bf3e059f
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
@@ -0,0 +1,75 @@
@ -2318,7 +2318,7 @@ index 000000000..bf3e059fe
+}
diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
new file mode 100644
index 000000000..632c49615
index 00000000..632c4961
--- /dev/null
+++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
@@ -0,0 +1,53 @@
@ -2377,7 +2377,7 @@ index 000000000..632c49615
+}
diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java
new file mode 100644
index 000000000..80155072d
index 00000000..80155072
--- /dev/null
+++ b/src/main/java/co/aikar/util/Counter.java
@@ -0,0 +1,38 @@
@ -2421,7 +2421,7 @@ index 000000000..80155072d
+}
diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java
new file mode 100644
index 000000000..190bf0598
index 00000000..190bf059
--- /dev/null
+++ b/src/main/java/co/aikar/util/JSONUtil.java
@@ -0,0 +1,140 @@
@ -2567,7 +2567,7 @@ index 000000000..190bf0598
+}
diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java
new file mode 100644
index 000000000..63a899c7d
index 00000000..63a899c7
--- /dev/null
+++ b/src/main/java/co/aikar/util/LoadingIntMap.java
@@ -0,0 +1,76 @@
@ -2649,7 +2649,7 @@ index 000000000..63a899c7d
+}
diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java
new file mode 100644
index 000000000..aedbb0332
index 00000000..aedbb033
--- /dev/null
+++ b/src/main/java/co/aikar/util/LoadingMap.java
@@ -0,0 +1,368 @@
@ -3023,7 +3023,7 @@ index 000000000..aedbb0332
+}
diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java
new file mode 100644
index 000000000..5989ee212
index 00000000..5989ee21
--- /dev/null
+++ b/src/main/java/co/aikar/util/MRUMapCache.java
@@ -0,0 +1,111 @@
@ -3139,7 +3139,7 @@ index 000000000..5989ee212
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 1c1f650d8..8f46899fd 100644
index 0822b8e5..940c643d 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -574,7 +574,6 @@ public final class Bukkit {
@ -3151,10 +3151,10 @@ index 1c1f650d8..8f46899fd 100644
/**
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 2a55a9548..0f9e5ba72 100644
index 11c5c205..c197e381 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1252,6 +1252,26 @@ public interface Server extends PluginMessageRecipient {
@@ -1250,6 +1250,26 @@ public interface Server extends PluginMessageRecipient {
throw new UnsupportedOperationException( "Not supported yet." );
}
@ -3182,7 +3182,7 @@ index 2a55a9548..0f9e5ba72 100644
* Sends the component to the player
*
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 247d194f8..72c5501e8 100644
index 247d194f..72c5501e 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -69,4 +69,12 @@ public interface UnsafeValues {
@ -3200,7 +3200,7 @@ index 247d194f8..72c5501e8 100644
}
diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java
new file mode 100644
index 000000000..f9a00aecc
index 00000000..f9a00aec
--- /dev/null
+++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java
@@ -0,0 +1,21 @@
@ -3226,7 +3226,7 @@ index 000000000..f9a00aecc
+ }
+}
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index 4bfc21468..03bdc1622 100644
index 4bfc2146..03bdc162 100644
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
@@ -33,7 +33,8 @@ public abstract class Command {
@ -3256,7 +3256,7 @@ index 4bfc21468..03bdc1622 100644
return true;
}
diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
index d6c8938b1..a6ad94ef9 100644
index d6c8938b..a6ad94ef 100644
--- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java
+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
@@ -9,6 +9,7 @@ public class FormattedCommandAlias extends Command {
@ -3280,7 +3280,7 @@ index d6c8938b1..a6ad94ef9 100644
}
diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java
new file mode 100644
index 000000000..ca1893e9f
index 00000000..ca1893e9
--- /dev/null
+++ b/src/main/java/org/bukkit/command/MessageCommandSender.java
@@ -0,0 +1,114 @@
@ -3399,7 +3399,7 @@ index 000000000..ca1893e9f
+
+}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 81e4fa573..f020cb04e 100644
index 81e4fa57..f020cb04 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -15,7 +15,6 @@ import org.bukkit.command.defaults.BukkitCommand;
@ -3456,7 +3456,7 @@ index 81e4fa573..f020cb04e 100644
diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
deleted file mode 100644
index 6023e4f61..000000000
index 6023e4f6..00000000
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
+++ /dev/null
@@ -1,253 +0,0 @@
@ -3714,7 +3714,7 @@ index 6023e4f61..000000000
- // Spigot end
-}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 06762a696..4f8ae7a83 100644
index 06762a69..4f8ae7a8 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1566,6 +1566,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ -3730,7 +3730,7 @@ index 06762a696..4f8ae7a83 100644
@NotNull
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index f648c5989..78a2d2f8d 100644
index f648c598..78a2d2f8 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -297,7 +297,6 @@ public final class SimplePluginManager implements PluginManager {
@ -3787,7 +3787,7 @@ index f648c5989..78a2d2f8d 100644
}
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 1173e433a..82e379d16 100644
index 1173e433..82e379d1 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -53,7 +53,6 @@ public final class JavaPluginLoader implements PluginLoader {
@ -3830,7 +3830,7 @@ index 1173e433a..82e379d16 100644
eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
} else {
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 0ffc1dfdb..b859796b4 100644
index 0ffc1dfd..b859796b 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -24,7 +24,8 @@ import org.jetbrains.annotations.Nullable;
@ -3844,7 +3844,7 @@ index 0ffc1dfdb..b859796b4 100644
private final Map<String, Class<?>> classes = new ConcurrentHashMap<String, Class<?>>();
private final PluginDescriptionFile description;
diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java
index 5ca863b36..612958a33 100644
index 5ca863b3..612958a3 100644
--- a/src/main/java/org/bukkit/util/CachedServerIcon.java
+++ b/src/main/java/org/bukkit/util/CachedServerIcon.java
@@ -2,6 +2,7 @@ package org.bukkit.util;
@ -3867,7 +3867,7 @@ index 5ca863b36..612958a33 100644
+
+}
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
index 6a8f7f551..3cbe5c2bb 100644
index 6a8f7f55..3cbe5c2b 100644
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -1,3 +1,26 @@

Datei anzeigen

@ -1,14 +1,14 @@
From f14a06e28d6591edd48b1b57a6709a8cf93112c4 Mon Sep 17 00:00:00 2001
From 3dc036320c5c47452a57756953fb08f509c98008 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 17:24:57 -0600
Subject: [PATCH] Add getTPS method
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 8f46899f..62b120ef 100644
index 940c643d..9f87f333 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1313,6 +1313,17 @@ public final class Bukkit {
@@ -1311,6 +1311,17 @@ public final class Bukkit {
return server.getEntity(uuid);
}
@ -27,10 +27,10 @@ index 8f46899f..62b120ef 100644
* Get the advancement specified by this key.
*
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 0f9e5ba7..3912c434 100644
index c197e381..e1dfa92a 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1098,6 +1098,16 @@ public interface Server extends PluginMessageRecipient {
@@ -1096,6 +1096,16 @@ public interface Server extends PluginMessageRecipient {
@Nullable
Entity getEntity(@NotNull UUID uuid);

Datei anzeigen

@ -1,14 +1,14 @@
From 8359b55e6f3fabe4f725ca31005c4cad376d4a23 Mon Sep 17 00:00:00 2001
From 3a982ed3a1fb226be1a1a7cc29f0aa77a91e6c8b Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Mon, 29 Feb 2016 19:48:59 -0600
Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 62b120ef..e4e1c980 100644
index 9f87f333..63e48ef3 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1487,6 +1487,19 @@ public final class Bukkit {
@@ -1485,6 +1485,19 @@ public final class Bukkit {
return server.getUnsafe();
}
@ -29,10 +29,10 @@ index 62b120ef..e4e1c980 100644
public static Server.Spigot spigot()
{
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 3912c434..f0850919 100644
index e1dfa92a..87300a5d 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1108,6 +1108,15 @@ public interface Server extends PluginMessageRecipient {
@@ -1106,6 +1106,15 @@ public interface Server extends PluginMessageRecipient {
public double[] getTPS();
// Paper end

Datei anzeigen

@ -1,4 +1,4 @@
From b3a2a2cac156b3ed3a36ba449e95547aced6dfb7 Mon Sep 17 00:00:00 2001
From 39aa81607372199ad89fe66301dc008dc4326e30 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 13:20:33 -0700
Subject: [PATCH] Use ASM for event executors.
@ -6,10 +6,10 @@ Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods.
diff --git a/pom.xml b/pom.xml
index b7f7eeff..8f2730df 100644
index 3dac66d3..aceb6bbb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -130,6 +130,17 @@
@@ -129,6 +129,17 @@
<version>7.1</version>
<scope>test</scope>
</dependency>

Datei anzeigen

@ -1,4 +1,4 @@
From 013b14c932a46c9220116f86f42ee2980735e963 Mon Sep 17 00:00:00 2001
From 6df33d108c315e2684b89eaed4eb335c049684a3 Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:28:07 -0400
Subject: [PATCH] Add command to reload permissions.yml and require confirm to
@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 3c76d5a8..d1845cf3 100644
index b92304e9..a3682b29 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1518,6 +1518,13 @@ public final class Bukkit {
@@ -1516,6 +1516,13 @@ public final class Bukkit {
public static org.bukkit.command.CommandMap getCommandMap() {
return server.getCommandMap();
}
@ -24,10 +24,10 @@ index 3c76d5a8..d1845cf3 100644
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 3359434b..41731a28 100644
index d35d2def..18faba0e 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1340,4 +1340,6 @@ public interface Server extends PluginMessageRecipient {
@@ -1338,4 +1338,6 @@ public interface Server extends PluginMessageRecipient {
@NotNull
Spigot spigot();
// Spigot end

Datei anzeigen

@ -1,4 +1,4 @@
From 5ecb0a4ced346f99f3fe3b209ec4b6bf6bd7b2c8 Mon Sep 17 00:00:00 2001
From 8e06e63bd85cca024c4e38e35741ddac6f809b48 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Mon, 28 Nov 2016 10:16:39 -0500
Subject: [PATCH] Allow Reloading of Command Aliases
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index d1845cf3..bef53644 100644
index a3682b29..a0a8b540 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1525,6 +1525,15 @@ public final class Bukkit {
@@ -1523,6 +1523,15 @@ public final class Bukkit {
public static void reloadPermissions() {
server.reloadPermissions();
}
@ -26,10 +26,10 @@ index d1845cf3..bef53644 100644
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 41731a28..54da4d99 100644
index 18faba0e..d20e044d 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1342,4 +1342,6 @@ public interface Server extends PluginMessageRecipient {
@@ -1340,4 +1340,6 @@ public interface Server extends PluginMessageRecipient {
// Spigot end
void reloadPermissions(); // Paper

Datei anzeigen

@ -1,4 +1,4 @@
From 46135ee897ecabd5085a6fbd6c82780ac61731e1 Mon Sep 17 00:00:00 2001
From 7070e4f10451715c06c1766937634f1b7f4ab98d Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Fri, 9 Jun 2017 07:24:24 -0700
Subject: [PATCH] Add configuration option to prevent player names from being
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index bef53644..30142250 100644
index a0a8b540..b5b77b2d 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1534,6 +1534,16 @@ public final class Bukkit {
@@ -1532,6 +1532,16 @@ public final class Bukkit {
public static boolean reloadCommandAliases() {
return server.reloadCommandAliases();
}
@ -27,10 +27,10 @@ index bef53644..30142250 100644
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 54da4d99..e91f74b7 100644
index d20e044d..103897fb 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1344,4 +1344,14 @@ public interface Server extends PluginMessageRecipient {
@@ -1342,4 +1342,14 @@ public interface Server extends PluginMessageRecipient {
void reloadPermissions(); // Paper
boolean reloadCommandAliases(); // Paper

Datei anzeigen

@ -1,4 +1,4 @@
From 950b96830a04000914d9a8dce07953090dccec2f Mon Sep 17 00:00:00 2001
From 70559f747cdfd82b811d7b2e356669afc267f9e7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 15 Jan 2018 21:46:46 -0500
Subject: [PATCH] Basic PlayerProfile API
@ -235,10 +235,10 @@ index 00000000..7b3b6ef5
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 30142250..24b761fe 100644
index b5b77b2d..161a714e 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1544,6 +1544,40 @@ public final class Bukkit {
@@ -1542,6 +1542,40 @@ public final class Bukkit {
public static boolean suggestPlayerNamesWhenNullTabCompletions() {
return server.suggestPlayerNamesWhenNullTabCompletions();
}
@ -280,10 +280,10 @@ index 30142250..24b761fe 100644
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index e91f74b7..9b767d7c 100644
index 103897fb..463724e4 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1353,5 +1353,33 @@ public interface Server extends PluginMessageRecipient {
@@ -1351,5 +1351,33 @@ public interface Server extends PluginMessageRecipient {
* @return true if player names should be suggested
*/
boolean suggestPlayerNamesWhenNullTabCompletions();

Datei anzeigen

@ -1,4 +1,4 @@
From f40e94e3adcc3372c06c1cec02bce37804413e93 Mon Sep 17 00:00:00 2001
From f7a220fa4c20104eba993f5b963526ae0b91cdaa Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:33:12 +0200
Subject: [PATCH] Allow plugins to use SLF4J for logging
@ -14,10 +14,10 @@ it without having to shade it in the plugin and going through
several layers of logging abstraction.
diff --git a/pom.xml b/pom.xml
index 2f68fba2..4f394580 100644
index aceb6bbb..dbbb5c72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -111,6 +111,13 @@
@@ -110,6 +110,13 @@
<version>17.0.0</version>
<scope>provided</scope>
</dependency>

Datei anzeigen

@ -1,14 +1,14 @@
From b0f277640259a7705d3bcdc87349f0c91a93388f Mon Sep 17 00:00:00 2001
From cb587e0bd55df4951e9a4cb976fc2e48aad27cc5 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 18 Nov 2018 19:44:54 +0000
Subject: [PATCH] Make the default permission message configurable
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index de42be5b..64955c6e 100644
index 0c519c41..2148a3c2 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1559,6 +1559,15 @@ public final class Bukkit {
@@ -1557,6 +1557,15 @@ public final class Bukkit {
return server.suggestPlayerNamesWhenNullTabCompletions();
}
@ -25,10 +25,10 @@ index de42be5b..64955c6e 100644
* Creates a PlayerProfile for the specified uuid, with name as null
* @param uuid UUID to create profile for
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 9c92517b..d0b2ab61 100644
index 8a76df52..1cbb9bc6 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1366,6 +1366,13 @@ public interface Server extends PluginMessageRecipient {
@@ -1364,6 +1364,13 @@ public interface Server extends PluginMessageRecipient {
*/
boolean suggestPlayerNamesWhenNullTabCompletions();

Datei anzeigen

@ -1,4 +1,4 @@
From 1ae0dd77c2f3a864593862c9d25c9c9cbc9e1339 Mon Sep 17 00:00:00 2001
From 4227a867264d348f9ba7eecf6e1a5623287a56e2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 18:39:01 -0400
Subject: [PATCH] Flip some Spigot API null annotations
@ -9,10 +9,10 @@ a ton of noise to plugin developers.
These do not help plugin developers if they bring moise noise than value.
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 64955c6e..bb03a0f4 100644
index 2148a3c2..6db69159 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1155,7 +1155,7 @@ public final class Bukkit {
@@ -1153,7 +1153,7 @@ public final class Bukkit {
*
* @return the scoreboard manager or null if no worlds are loaded.
*/
@ -21,7 +21,7 @@ index 64955c6e..bb03a0f4 100644
public static ScoreboardManager getScoreboardManager() {
return server.getScoreboardManager();
}
@@ -1452,7 +1452,7 @@ public final class Bukkit {
@@ -1450,7 +1450,7 @@ public final class Bukkit {
* @param clazz the class of the tag entries
* @return the tag or null
*/
@ -62,10 +62,10 @@ index 4e69f277..2a40da99 100644
if (this.world == null) {
return null;
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index d0b2ab61..0e7b48f2 100644
index 1cbb9bc6..27d3b5ad 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -964,7 +964,7 @@ public interface Server extends PluginMessageRecipient {
@@ -962,7 +962,7 @@ public interface Server extends PluginMessageRecipient {
*
* @return the scoreboard manager or null if no worlds are loaded.
*/
@ -74,7 +74,7 @@ index d0b2ab61..0e7b48f2 100644
ScoreboardManager getScoreboardManager();
/**
@@ -1234,7 +1234,7 @@ public interface Server extends PluginMessageRecipient {
@@ -1232,7 +1232,7 @@ public interface Server extends PluginMessageRecipient {
* @param clazz the class of the tag entries
* @return the tag or null
*/

Datei anzeigen

@ -1,11 +1,11 @@
From f754c4b64a90c21d79e2cfa1dc797acd66be8d59 Mon Sep 17 00:00:00 2001
From 4bbae6ad58eb4e2328787bc1bc4eaf98bee9d13b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 982ac22e8e..099d7218c9 100644
index 6a1ba9149..7b9fcb2c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,15 +1,14 @@
@ -16,7 +16,7 @@ index 982ac22e8e..099d7218c9 100644
- <artifactId>spigot</artifactId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.14-R0.1-SNAPSHOT</version>
<version>1.14.1-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
+ <name>Paper</name>
@ -27,7 +27,7 @@ index 982ac22e8e..099d7218c9 100644
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version>
<minecraft.version>1.14</minecraft.version>
<minecraft.version>1.14.1</minecraft.version>
@@ -22,16 +21,16 @@
</properties>
@ -146,7 +146,7 @@ index 982ac22e8e..099d7218c9 100644
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
<dependency>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0..674096cab1 100644
index 93046379d..674096cab 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ public final class Versioning {

Datei anzeigen

@ -1,4 +1,4 @@
From 3a8d4c91477d6a37245f9de40cc06933b187a23d Mon Sep 17 00:00:00 2001
From d4985c027b143f266a5f6aed5f3786189b01d347 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files
@ -535,12 +535,12 @@ index e1ba833f3..b60956218 100644
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index fd8397bd4..77015bc06 100644
index 36e42f900..8371631db 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -134,9 +134,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
protected static final DataWatcherObject<EntityPose> POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
public boolean inChunk;
- public int chunkX;
- public int chunkY;
@ -552,7 +552,7 @@ index fd8397bd4..77015bc06 100644
public boolean impulse;
public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index ee43aa24d..01d9ed69c 100644
index 659e0ea50..8c918d0d6 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils;
@ -575,7 +575,7 @@ index ee43aa24d..01d9ed69c 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 84155573d..83fdea893 100644
index cc3f201c9..923d8e28e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -86,6 +86,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -596,7 +596,7 @@ index 84155573d..83fdea893 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index be03fe24b..5dc2bb124 100644
index 3edc623a7..7fe76b8d5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -751,6 +751,7 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -1,4 +1,4 @@
From 2947fccbf09877c62048ba716cd3a027a5e8954e Mon Sep 17 00:00:00 2001
From f1cff95a232b546bacd9800d360813d6f0cdffa3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
@ -75,8 +75,50 @@ index c973ab607..30701fd7f 100644
+ return this.blockIds.a(iblockdata); // Paper - decompile fix
}
}
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
index 4faec95a3..87091d804 100644
--- a/src/main/java/net/minecraft/server/EntityFox.java
+++ b/src/main/java/net/minecraft/server/EntityFox.java
@@ -97,7 +97,7 @@ public class EntityFox extends EntityAnimal {
this.goalSelector.a(11, new EntityFox.j(this, EntityHuman.class, 24.0F));
this.goalSelector.a(12, new EntityFox.r());
this.targetSelector.a(3, new EntityFox.a(EntityLiving.class, false, false, (entityliving) -> {
- return EntityFox.bF.test(entityliving) && !this.c(entityliving.getUniqueID());
+ return EntityFox.bF.test((EntityLiving) entityliving) && !this.c(((EntityLiving) entityliving).getUniqueID()); // Paper - decompile fix
}));
}
@@ -267,8 +267,8 @@ public class EntityFox extends EntityAnimal {
private List<UUID> ek() {
List<UUID> list = Lists.newArrayList();
- list.add(((Optional) this.datawatcher.get(EntityFox.bB)).orElse((Object) null));
- list.add(((Optional) this.datawatcher.get(EntityFox.bD)).orElse((Object) null));
+ list.add((this.datawatcher.get(EntityFox.bB)).orElse(null)); // Paper - decompiler fix
+ list.add((this.datawatcher.get(EntityFox.bD)).orElse(null)); // Paper - decompiler fix
return list;
}
@@ -983,7 +983,7 @@ public class EntityFox extends EntityAnimal {
private int f;
public r() {
- super(null);
+ super(); // Paper - decompiler fix
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK));
}
@@ -1035,7 +1035,7 @@ public class EntityFox extends EntityAnimal {
private int c;
public t() {
- super(null);
+ super(); // Paper - decompiler fix
this.c = EntityFox.this.random.nextInt(140);
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK, PathfinderGoal.Type.JUMP));
}
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
index 45370ad5d..b566e7786 100644
index 1692e6b47..dbd189afe 100644
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
@@ -25,7 +25,7 @@ public class EntityVindicator extends EntityIllagerAbstract {
@ -111,10 +153,19 @@ index d8d226708..3de9d264d 100644
this.e = bifunction;
}
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 85c28ec8e..7016b03f6 100644
index 053d408d3..4510018d6 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -77,14 +77,14 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@@ -51,7 +51,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
return this.executeFuture(runnable);
} else {
runnable.run();
- return CompletableFuture.completedFuture((Object) null);
+ return CompletableFuture.completedFuture(null); // Paper - decompile fix
}
}
@@ -86,14 +86,14 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
}
protected boolean executeNext() {
@ -132,7 +183,7 @@ index 85c28ec8e..7016b03f6 100644
}
}
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
index 8753bea61..809ca0983 100644
index 2ed611980..6e365f402 100644
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
@@ -96,7 +96,7 @@ public interface IBlockAccess {
@ -364,7 +415,7 @@ index 41a5d1dc2..b3799ab56 100644
if (throwable != null) {
completablefuture.completeExceptionally(throwable);
diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java
index 1df86e3bb..eabbf2933 100644
index b0d44e377..ff3f15eac 100644
--- a/src/main/java/net/minecraft/server/VillagerTrades.java
+++ b/src/main/java/net/minecraft/server/VillagerTrades.java
@@ -15,12 +15,12 @@ import javax.annotation.Nullable;
@ -374,13 +425,13 @@ index 1df86e3bb..eabbf2933 100644
- public static final Map<VillagerProfession, Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]>> a = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
+ public static final Map<VillagerProfession, Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]>> a = SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // Paper - decompile fix
hashmap.put(VillagerProfession.FARMER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.WHEAT, 20, 8, 2), new VillagerTrades.b(Items.POTATO, 26, 8, 2), new VillagerTrades.b(Items.CARROT, 22, 8, 2), new VillagerTrades.b(Items.BEETROOT, 15, 8, 2), new VillagerTrades.h(Items.BREAD, 1, 6, 8, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Blocks.PUMPKIN, 6, 6, 10), new VillagerTrades.h(Items.PUMPKIN_PIE, 1, 4, 5), new VillagerTrades.h(Items.APPLE, 1, 4, 8, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.COOKIE, 3, 18, 10), new VillagerTrades.b(Blocks.MELON, 4, 6, 20)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Blocks.CAKE, 1, 1, 6, 15), new VillagerTrades.i(MobEffects.FASTER_MOVEMENT, 160, 15), new VillagerTrades.i(MobEffects.JUMP, 160, 15), new VillagerTrades.i(MobEffects.WEAKNESS, 140, 15), new VillagerTrades.i(MobEffects.BLINDNESS, 120, 15), new VillagerTrades.i(MobEffects.POISON, 280, 15), new VillagerTrades.i(MobEffects.SATURATION, 7, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.GOLDEN_CARROT, 3, 3, 30), new VillagerTrades.h(Items.GLISTERING_MELON_SLICE, 4, 3, 30)})));
- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.STRING, 20, 8, 2), new VillagerTrades.b(Items.COAL, 10, 8, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 8, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 8, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.COD, 15, 8, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 8, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.SALMON, 13, 8, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 2, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.TROPICAL_FISH, 6, 6, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.PUFFERFISH, 4, 6, 30), new VillagerTrades.c(1, 6, 30, ImmutableMap.builder().put(VillagerType.c, Items.OAK_BOAT).put(VillagerType.g, Items.SPRUCE_BOAT).put(VillagerType.e, Items.SPRUCE_BOAT).put(VillagerType.a, Items.JUNGLE_BOAT).put(VillagerType.b, Items.JUNGLE_BOAT).put(VillagerType.d, Items.ACACIA_BOAT).put(VillagerType.f, Items.DARK_OAK_BOAT).build())})));
+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.STRING, 20, 8, 2), new VillagerTrades.b(Items.COAL, 10, 8, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 8, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 8, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.COD, 15, 8, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 8, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.SALMON, 13, 8, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 2, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.TROPICAL_FISH, 6, 6, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.PUFFERFISH, 4, 6, 30), new VillagerTrades.c(1, 6, 30, ImmutableMap.<VillagerType, Item>builder().put(VillagerType.c, Items.OAK_BOAT).put(VillagerType.g, Items.SPRUCE_BOAT).put(VillagerType.e, Items.SPRUCE_BOAT).put(VillagerType.a, Items.JUNGLE_BOAT).put(VillagerType.b, Items.JUNGLE_BOAT).put(VillagerType.d, Items.ACACIA_BOAT).put(VillagerType.f, Items.DARK_OAK_BOAT).build())}))); // Paper - decompile fix
- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.STRING, 20, 8, 2), new VillagerTrades.b(Items.COAL, 10, 8, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 8, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 8, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.COD, 15, 8, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 8, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.SALMON, 13, 8, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 2, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.TROPICAL_FISH, 6, 6, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.PUFFERFISH, 4, 6, 30), new VillagerTrades.c(1, 6, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())})));
+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.STRING, 20, 8, 2), new VillagerTrades.b(Items.COAL, 10, 8, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 8, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 8, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.COD, 15, 8, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 8, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.SALMON, 13, 8, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 2, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.TROPICAL_FISH, 6, 6, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.PUFFERFISH, 4, 6, 30), new VillagerTrades.c(1, 6, 30, ImmutableMap.<VillagerType, Item>builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // Paper - decompile fix
hashmap.put(VillagerProfession.SHEPHERD, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Blocks.WHITE_WOOL, 18, 8, 2), new VillagerTrades.b(Blocks.BROWN_WOOL, 18, 8, 2), new VillagerTrades.b(Blocks.BLACK_WOOL, 18, 8, 2), new VillagerTrades.b(Blocks.GRAY_WOOL, 18, 8, 2), new VillagerTrades.h(Items.SHEARS, 2, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.WHITE_DYE, 12, 8, 10), new VillagerTrades.b(Items.GRAY_DYE, 12, 8, 10), new VillagerTrades.b(Items.BLACK_DYE, 12, 8, 10), new VillagerTrades.b(Items.LIGHT_BLUE_DYE, 12, 8, 10), new VillagerTrades.b(Items.LIME_DYE, 12, 8, 10), new VillagerTrades.h(Blocks.WHITE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.ORANGE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.MAGENTA_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.YELLOW_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.LIME_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.PINK_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.GRAY_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.CYAN_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.PURPLE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.BLUE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.BROWN_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.GREEN_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.RED_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.BLACK_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.WHITE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.ORANGE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.MAGENTA_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.YELLOW_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.LIME_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.PINK_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.GRAY_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.CYAN_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.PURPLE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.BLUE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.BROWN_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.GREEN_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.RED_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.BLACK_CARPET, 1, 4, 8, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.YELLOW_DYE, 12, 8, 20), new VillagerTrades.b(Items.LIGHT_GRAY_DYE, 12, 8, 20), new VillagerTrades.b(Items.ORANGE_DYE, 12, 8, 20), new VillagerTrades.b(Items.RED_DYE, 12, 8, 20), new VillagerTrades.b(Items.PINK_DYE, 12, 8, 20), new VillagerTrades.h(Blocks.WHITE_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.YELLOW_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.RED_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.BLACK_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.BLUE_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.BROWN_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.CYAN_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.GRAY_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.GREEN_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.LIGHT_BLUE_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.LIGHT_GRAY_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.LIME_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.MAGENTA_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.ORANGE_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.PINK_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.PURPLE_BED, 3, 1, 6, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.BROWN_DYE, 12, 8, 30), new VillagerTrades.b(Items.PURPLE_DYE, 12, 8, 30), new VillagerTrades.b(Items.BLUE_DYE, 12, 8, 30), new VillagerTrades.b(Items.GREEN_DYE, 12, 8, 30), new VillagerTrades.b(Items.MAGENTA_DYE, 12, 8, 30), new VillagerTrades.b(Items.CYAN_DYE, 12, 8, 30), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 6, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.PAINTING, 2, 3, 30)})));
hashmap.put(VillagerProfession.FLETCHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.STICK, 32, 8, 2), new VillagerTrades.h(Items.ARROW, 1, 16, 1), new VillagerTrades.g(Blocks.GRAVEL, 10, Items.FLINT, 10, 6, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.FLINT, 26, 6, 10), new VillagerTrades.h(Items.BOW, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.STRING, 14, 8, 20), new VillagerTrades.h(Items.CROSSBOW, 3, 1, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.FEATHER, 24, 8, 30), new VillagerTrades.e(Items.BOW, 2, 2, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.dE, 8, 6, 30), new VillagerTrades.e(Items.CROSSBOW, 3, 2, 15), new VillagerTrades.j(Items.ARROW, 5, Items.TIPPED_ARROW, 5, 2, 6, 30)})));
- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.PAPER, 24, 8, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 6, 3, 6, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.BOOK, 4, 6, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pQ, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.INK_SAC, 5, 6, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 6, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build()));
+ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.<Integer, VillagerTrades.IMerchantRecipeOption[]>builder().put(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.PAPER, 24, 8, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 6, 3, 6, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.BOOK, 4, 6, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pQ, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.INK_SAC, 5, 6, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 6, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Paper - decompile fix
hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.PAPER, 24, 8, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.df, 10, 8, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 6, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.COMPASS, 1, 6, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 6, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)})));
hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.PAPER, 24, 8, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.df, 11, 8, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 6, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.COMPASS, 1, 6, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 6, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)})));
hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 8, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.GOLD_INGOT, 3, 6, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.RABBIT_FOOT, 2, 6, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 6, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.SCUTE, 4, 6, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 6, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.NETHER_WART, 22, 6, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)})));
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.COAL, 15, 8, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 6, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.IRON_INGOT, 4, 6, 10), new VillagerTrades.h(new ItemStack(Items.pP), 36, 1, 6, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 6, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 6, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.b(Items.LAVA_BUCKET, 1, 6, 20), new VillagerTrades.b(Items.DIAMOND, 1, 6, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 6, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 6, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 6, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 2, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 2, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[] { new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 2, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 2, 30, 0.2F)})));
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java

Datei anzeigen

@ -1,4 +1,4 @@
From 8be0f9b0ebf8cb9794ed83d22dc5aaa3874e1a1a Mon Sep 17 00:00:00 2001
From c823984a165a1eefe3a7387eb0816ed663a311bf Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils
@ -57,7 +57,7 @@ index dd47e9cbe..c927d524a 100644
return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index fc54888fa..8f789c91f 100644
index 0fe575349..aa13028d0 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -32,7 +32,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent;
@ -69,7 +69,7 @@ index fc54888fa..8f789c91f 100644
private final ChunkSection[] sections;
private final BiomeBase[] d;
private final Map<BlockPosition, NBTTagCompound> e;
@@ -403,6 +403,7 @@ public class Chunk implements IChunkAccess {
@@ -407,6 +407,7 @@ public class Chunk implements IChunkAccess {
return this.a(blockposition, Chunk.EnumTileEntityState.CHECK);
}
@ -164,7 +164,7 @@ index 4411d5640..28a6be7ab 100644
this.a();
packetdataserializer.writeByte(this.i);
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
index 7636358a7..852068081 100644
index 4f69e2327..8f5f61f60 100644
--- a/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
@@ -6,6 +6,8 @@ import org.bukkit.event.entity.EntityUnleashEvent;
@ -189,7 +189,7 @@ index 472063264..afa03ce6f 100644
// CraftBukkit start - fire event
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c1bb7a88a..f86e6a4c5 100644
index 2b856727d..1a33b7048 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -126,6 +126,7 @@ public abstract class EntityLiving extends Entity {
@ -213,7 +213,7 @@ index 6ab4c78b3..76142d5dc 100644
super(entitytypes, world);
this.f = 5;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 01d9ed69c..3217a8ed1 100644
index 8c918d0d6..56a2d7df5 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -5,6 +5,7 @@ import com.mojang.datafixers.types.Type;
@ -236,10 +236,10 @@ index 01d9ed69c..3217a8ed1 100644
}
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 7016b03f6..c22128953 100644
index 4510018d6..c0d511244 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -55,6 +55,15 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@@ -64,6 +64,15 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
}
@ -752,7 +752,7 @@ index 4e20cfba4..363ab5da1 100644
int j = 0;
ChunkSection[] achunksection = chunk.getSections();
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 8080e38b3..78a090ac7 100644
index 68926d0de..5757dd6fb 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -819,7 +819,7 @@ index b3799ab56..5fae5a123 100644
public static long getTimeMillis() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 83fdea893..cbe87a338 100644
index 923d8e28e..404d3d8c8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -371,8 +371,9 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose

Datei anzeigen

@ -1,4 +1,4 @@
From 1ef3557e3a967ef452810c2fb8424c6d07775689 Mon Sep 17 00:00:00 2001
From 22ba5b0307cfeb19431eb4c9f2ce97278f48c977 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 01:40:13 -0400
Subject: [PATCH] Add MinecraftKey Information to Objects
@ -19,7 +19,7 @@ index b5f318c00..ce190d88d 100644
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 77015bc06..01e486389 100644
index 8371631db..033cddf8e 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
@ -65,7 +65,7 @@ index 77015bc06..01e486389 100644
protected abstract void a(NBTTagCompound nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 3217a8ed1..c7fb8f513 100644
index 56a2d7df5..98eb0d24c 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -238,6 +238,7 @@ public class EntityTypes<T extends Entity> {
@ -92,10 +92,10 @@ index 000000000..743142d03
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 080fd819b..77d77fcb8 100644
index 8d868d84c..b511fe263 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -10,7 +10,7 @@ import org.bukkit.inventory.InventoryHolder;
@@ -11,7 +11,7 @@ import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
import org.spigotmc.CustomTimingsHandler; // Spigot
@ -104,7 +104,7 @@ index 080fd819b..77d77fcb8 100644
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
// CraftBukkit start - data containers
@@ -18,7 +18,7 @@ public abstract class TileEntity {
@@ -19,7 +19,7 @@ public abstract class TileEntity {
public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
// CraftBukkit end
private static final Logger LOGGER = LogManager.getLogger();
@ -113,7 +113,7 @@ index 080fd819b..77d77fcb8 100644
@Nullable
protected World world;
protected BlockPosition position;
@@ -31,6 +31,26 @@ public abstract class TileEntity {
@@ -33,6 +33,26 @@ public abstract class TileEntity {
this.b = tileentitytypes;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 43fe880530ba71a467d76e1a5d6ad57ba9fed5d5 Mon Sep 17 00:00:00 2001
From 850bdbebc31a1756bdcd70dfa677cd0f3a447262 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:10:36 -0400
Subject: [PATCH] Store reference to current Chunk for Entity and Block
@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 8f789c91f7..15be6bb33f 100644
index aa13028d0..6d75bf220 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -36,7 +36,7 @@ public class Chunk implements IChunkAccess {
@ -20,13 +20,10 @@ index 8f789c91f7..15be6bb33f 100644
public final World world;
public final Map<HeightMap.Type, HeightMap> heightMap;
private final ChunkConverter i;
@@ -58,11 +58,39 @@ public class Chunk implements IChunkAccess {
private final ChunkCoordIntPair loc;
private volatile boolean x;
@@ -62,11 +62,36 @@ public class Chunk implements IChunkAccess {
this(world, chunkcoordintpair, abiomebase, ChunkConverter.a, TickListEmpty.a(), TickListEmpty.a(), 0L, (ChunkSection[]) null, (Consumer) null);
}
+ // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
+ private int neighbors = 0x1 << 12;
+ public long chunkKey;
+ // Paper start
+ private class TileEntityHashMap extends java.util.HashMap<BlockPosition, TileEntity> {
+ @Override
@ -61,7 +58,7 @@ index 8f789c91f7..15be6bb33f 100644
this.l = Maps.newHashMap();
this.m = Maps.newHashMap();
this.n = new ShortList[16];
@@ -357,6 +385,7 @@ public class Chunk implements IChunkAccess {
@@ -361,6 +386,7 @@ public class Chunk implements IChunkAccess {
}
entity.inChunk = true;
@ -69,7 +66,7 @@ index 8f789c91f7..15be6bb33f 100644
entity.chunkX = this.loc.x;
entity.chunkY = k;
entity.chunkZ = this.loc.z;
@@ -368,6 +397,7 @@ public class Chunk implements IChunkAccess {
@@ -372,6 +398,7 @@ public class Chunk implements IChunkAccess {
((HeightMap) this.heightMap.get(heightmap_type)).a(along);
}
@ -77,7 +74,7 @@ index 8f789c91f7..15be6bb33f 100644
public void b(Entity entity) {
this.a(entity, entity.chunkY);
}
@@ -380,8 +410,12 @@ public class Chunk implements IChunkAccess {
@@ -384,8 +411,12 @@ public class Chunk implements IChunkAccess {
if (i >= this.entitySlices.length) {
i = this.entitySlices.length - 1;
}
@ -93,13 +90,13 @@ index 8f789c91f7..15be6bb33f 100644
@Override
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 01e4863899..14c3f04170 100644
index 033cddf8e..7fc4af565 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -133,7 +133,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
protected static final DataWatcherObject<EntityPose> POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
- public boolean inChunk;
+ public boolean inChunk; public boolean isAddedToChunk() { return inChunk; } // Paper - OBFHELPER
public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
@ -146,10 +143,10 @@ index 01e4863899..14c3f04170 100644
private String entityKeyString;
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 77d77fcb8b..4c811325c3 100644
index b511fe263..7546f6690 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -49,6 +49,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
getMinecraftKey(); // Try to load if it doesn't exists.
return tileEntityKeyString;
}
@ -166,7 +163,7 @@ index 77d77fcb8b..4c811325c3 100644
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index eddac6ed95..049641db06 100644
index 5b72b3633..b2a16bb36 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -137,6 +137,7 @@ import net.minecraft.server.EntityZombieVillager;

Datei anzeigen

@ -1,4 +1,4 @@
From 2976aeb8835db3b9c38ccc891e1b011dca486d42 Mon Sep 17 00:00:00 2001
From 4f96ee0c29856941cb17de02ffd7c007acd7ac30 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:13:59 -0400
Subject: [PATCH] Store counts for each Entity/Block Entity Type
@ -6,12 +6,12 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type
Opens door for future patches to optimize performance
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 7fa141f52c..2b29fe837b 100644
index 6d75bf220..937fcd7fa 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -62,15 +62,19 @@ public class Chunk implements IChunkAccess {
private int neighbors = 0x1 << 12;
public long chunkKey;
@@ -63,15 +63,19 @@ public class Chunk implements IChunkAccess {
}
// Paper start
+ public final co.aikar.util.Counter<String> entityCounts = new co.aikar.util.Counter<>();
+ public final co.aikar.util.Counter<String> tileEntityCounts = new co.aikar.util.Counter<>();
@ -29,7 +29,7 @@ index 7fa141f52c..2b29fe837b 100644
}
return replaced;
}
@@ -80,6 +84,7 @@ public class Chunk implements IChunkAccess {
@@ -81,6 +85,7 @@ public class Chunk implements IChunkAccess {
TileEntity removed = super.remove(key);
if (removed != null) {
removed.setCurrentChunk(null);
@ -37,7 +37,7 @@ index 7fa141f52c..2b29fe837b 100644
}
return removed;
}
@@ -384,6 +389,7 @@ public class Chunk implements IChunkAccess {
@@ -385,6 +390,7 @@ public class Chunk implements IChunkAccess {
k = this.entitySlices.length - 1;
}
@ -45,7 +45,7 @@ index 7fa141f52c..2b29fe837b 100644
entity.inChunk = true;
entity.setCurrentChunk(this); // Paper
entity.chunkX = this.loc.x;
@@ -415,6 +421,7 @@ public class Chunk implements IChunkAccess {
@@ -416,6 +422,7 @@ public class Chunk implements IChunkAccess {
if (!this.entitySlices[i].remove(entity)) {
return;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 94debd73b26dbfff556ce7f3dfc51334b48efeb3 Mon Sep 17 00:00:00 2001
From 4e211b4edbac7f732678a856dd62fb6aace2e605 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 0000000000..3f9fb6f906
index 000000000..3f9fb6f90
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,133 @@
@ -145,7 +145,7 @@ index 0000000000..3f9fb6f906
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 0000000000..d5d3b2a20c
index 000000000..d5d3b2a20
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,105 @@
@ -255,7 +255,7 @@ index 0000000000..d5d3b2a20c
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5518ec1e54..0c65afccfd 100644
index 5518ec1e5..0c65afccf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -302,10 +302,10 @@ index 5518ec1e54..0c65afccfd 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 8b91e27c66..fd23d45346 100644
index afa9f0c1e..85a5776b0 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -24,6 +24,15 @@ public class Block implements IMaterial {
@@ -32,6 +32,15 @@ public class Block implements IMaterial {
protected final boolean q;
protected final SoundEffectType stepSound;
protected final Material material;
@ -322,10 +322,10 @@ index 8b91e27c66..fd23d45346 100644
private final float frictionFactor;
protected final BlockStateList<Block, IBlockData> blockStateList;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 9cce929c3e..5c34fe52a4 100644
index 937fcd7fa..b317a9800 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -546,6 +546,7 @@ public class Chunk implements IChunkAccess {
@@ -547,6 +547,7 @@ public class Chunk implements IChunkAccess {
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration));
if (this.needsDecoration) {
@ -333,7 +333,7 @@ index 9cce929c3e..5c34fe52a4 100644
java.util.Random random = new java.util.Random();
random.setSeed(world.getSeed());
long xRand = random.nextLong() / 2L * 2L + 1L;
@@ -564,6 +565,7 @@ public class Chunk implements IChunkAccess {
@@ -565,6 +566,7 @@ public class Chunk implements IChunkAccess {
}
}
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
@ -342,10 +342,10 @@ index 9cce929c3e..5c34fe52a4 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 845ad7427b..4f0fbe4a0d 100644
index 4cc3e1217..cbe1353ac 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -186,7 +186,9 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -234,7 +234,9 @@ public class ChunkProviderServer extends IChunkProvider {
}
public void save(boolean flag) {
@ -355,21 +355,20 @@ index 845ad7427b..4f0fbe4a0d 100644
}
@Override
@@ -296,10 +298,9 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.mobSpawn.stopTiming(); // Spigot
@@ -352,9 +354,9 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit();
}
-
- this.world.timings.doTickTiles.startTiming(); // Spigot
+ this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
this.world.a(chunk, l);
this.world.a(chunk, k);
- this.world.timings.doTickTiles.stopTiming(); // Spigot
+ this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
}
}
}
@@ -310,9 +311,7 @@ public class ChunkProviderServer extends IChunkProvider {
}
@@ -368,9 +370,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit();
}
- this.world.timings.tracker.startTiming(); // Spigot
@ -379,7 +378,7 @@ index 845ad7427b..4f0fbe4a0d 100644
@Override
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index d084d24a01..0fed039f34 100644
index e4c021a45..2b8148fbd 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -1,5 +1,6 @@
@ -389,7 +388,7 @@ index d084d24a01..0fed039f34 100644
import com.google.common.collect.Maps;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
import it.unimi.dsi.fastutil.longs.LongSet;
@@ -412,7 +413,7 @@ public class ChunkRegionLoader {
@@ -435,7 +436,7 @@ public class ChunkRegionLoader {
private static void loadEntities(NBTTagCompound nbttagcompound, Chunk chunk) {
NBTTagList nbttaglist = nbttagcompound.getList("Entities", 10);
World world = chunk.getWorld();
@ -398,7 +397,7 @@ index d084d24a01..0fed039f34 100644
for (int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
@@ -424,8 +425,6 @@ public class ChunkRegionLoader {
@@ -447,8 +448,6 @@ public class ChunkRegionLoader {
chunk.d(true);
}
@ -407,26 +406,17 @@ index d084d24a01..0fed039f34 100644
NBTTagList nbttaglist1 = nbttagcompound.getList("TileEntities", 10);
for (int j = 0; j < nbttaglist1.size(); ++j) {
@@ -442,8 +441,6 @@ public class ChunkRegionLoader {
@@ -465,7 +464,7 @@ public class ChunkRegionLoader {
}
}
}
- world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
- world.timings.syncChunkLoadTileTicksTimer.startTiming(); // Spigot
if (nbttagcompound.hasKeyOfType("TileTicks", 9) && world.getBlockTickList() instanceof TickListServer) {
((TickListServer) world.getBlockTickList()).a(nbttagcompound.getList("TileTicks", 10));
@@ -452,7 +449,7 @@ public class ChunkRegionLoader {
if (nbttagcompound.hasKeyOfType("LiquidTicks", 9) && world.getFluidTickList() instanceof TickListServer) {
((TickListServer) world.getFluidTickList()).a(nbttagcompound.getList("LiquidTicks", 10));
}
- world.timings.syncChunkLoadTileTicksTimer.stopTiming(); // Spigot
+ world.timings.chunkLoadLevelTimer.stopTiming(); // Spigot
+ world.timings.chunkLoadLevelTimer.stopTiming(); // Paper
}
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
index 46e7737ca3..a3ef943066 100644
index 46e7737ca..a3ef94306 100644
--- a/src/main/java/net/minecraft/server/CustomFunction.java
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
@@ -13,12 +13,22 @@ public class CustomFunction {
@ -453,20 +443,20 @@ index 46e7737ca3..a3ef943066 100644
return this.b;
}
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
index 42e01136d9..b7c1d7671e 100644
index 9c9eef0ad..b42fbf2c6 100644
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
@@ -100,7 +100,7 @@ public class CustomFunctionData implements IResourcePackListener {
@@ -101,7 +101,7 @@ public class CustomFunctionData implements IResourcePackListener {
return 0;
} else {
- try {
+ try (co.aikar.timings.Timing timing = customfunction.getTiming().startTiming()) { // Paper
this.i = true;
this.h = true;
int j = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index b60956218d..19e2df3098 100644
index b60956218..19e2df309 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -31,7 +31,7 @@ import org.apache.logging.log4j.Level;
@ -519,7 +509,7 @@ index b60956218d..19e2df3098 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 14c3f04170..6127f9ba96 100644
index 7fc4af565..e52f0610f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
@ -558,7 +548,7 @@ index 14c3f04170..6127f9ba96 100644
protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index f86e6a4c51..85567a7072 100644
index 1a33b7048..7c72fb918 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -634,7 +624,7 @@ index f86e6a4c51..85567a7072 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 472e8e852f..df9098955c 100644
index 25972072f..581ecf71d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,5 +1,7 @@
@ -762,7 +752,7 @@ index 472e8e852f..df9098955c 100644
this.methodProfiler.exit();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 755c0406e1..036577dd0e 100644
index 2e17358ed..e7019d8ae 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,6 +1,8 @@
@ -774,7 +764,7 @@ index 755c0406e1..036577dd0e 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.mojang.datafixers.DataFixer;
@@ -402,7 +404,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -423,7 +425,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
});
return completablefuture.thenComposeAsync((either) -> {
@ -782,8 +772,8 @@ index 755c0406e1..036577dd0e 100644
+ return either.map((list) -> { // Paper - Shut up.
try {
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> {
return this.b(playerchunk);
@@ -879,6 +881,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return this.c(playerchunk);
@@ -916,6 +918,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker;
ObjectIterator objectiterator;
@ -791,7 +781,7 @@ index 755c0406e1..036577dd0e 100644
for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) {
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
@@ -896,13 +899,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -933,13 +936,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
playerchunkmap_entitytracker.e = sectionposition1;
}
}
@ -809,7 +799,7 @@ index 755c0406e1..036577dd0e 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 78a090ac75..e07f4a9680 100644
index 5757dd6fb..a7104e966 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -864,7 +854,7 @@ index 78a090ac75..e07f4a9680 100644
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index cb6d50ea70..9ba03f8ed0 100644
index cb6d50ea7..9ba03f8ed 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,5 +1,8 @@
@ -890,7 +880,7 @@ index cb6d50ea70..9ba03f8ed0 100644
throw CancelledPacketHandleException.INSTANCE;
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 56e36c8668..7a837ec0fc 100644
index 6171b369c..bab32af46 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -900,7 +890,7 @@ index 56e36c8668..7a837ec0fc 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -894,10 +895,11 @@ public abstract class PlayerList {
@@ -895,10 +896,11 @@ public abstract class PlayerList {
}
public void savePlayers() {
@ -914,21 +904,20 @@ index 56e36c8668..7a837ec0fc 100644
public WhiteList getWhitelist() {
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
index 537e610797..b48e5b51a0 100644
index a99618099..972b1c0d2 100644
--- a/src/main/java/net/minecraft/server/TickListServer.java
+++ b/src/main/java/net/minecraft/server/TickListServer.java
@@ -25,13 +25,19 @@ public class TickListServer<T> implements TickList<T> {
private final List<NextTickListEntry<T>> g = Lists.newArrayList();
private final Consumer<NextTickListEntry<T>> h;
@@ -25,13 +25,18 @@ public class TickListServer<T> implements TickList<T> {
private final List<NextTickListEntry<T>> i = Lists.newArrayList();
private final Consumer<NextTickListEntry<T>> j;
- public TickListServer(WorldServer worldserver, Predicate<T> predicate, Function<T, MinecraftKey> function, Function<MinecraftKey, T> function1, Consumer<NextTickListEntry<T>> consumer) {
+ public TickListServer(WorldServer worldserver, Predicate<T> predicate, Function<T, MinecraftKey> function, Function<MinecraftKey, T> function1, Consumer<NextTickListEntry<T>> consumer, String timingsType) { // Paper
this.a = predicate;
this.b = function;
this.c = function1;
this.f = worldserver;
this.h = consumer;
+ // Paper start
this.h = worldserver;
this.j = consumer;
+ timingCleanup = co.aikar.timings.WorldTimingsHandler.getTickList(worldserver, timingsType + " - Cleanup");
+ timingTicking = co.aikar.timings.WorldTimingsHandler.getTickList(worldserver, timingsType + " - Ticking");
}
@ -937,40 +926,38 @@ index 537e610797..b48e5b51a0 100644
+ // Paper end
public void a() {
int i = this.nextTickList.size();
@@ -51,6 +57,7 @@ public class TickListServer<T> implements TickList<T> {
this.f.getMethodProfiler().enter("cleaning");
this.b();
@@ -53,6 +58,7 @@ public class TickListServer<T> implements TickList<T> {
this.h.getMethodProfiler().enter("selecting");
Iterator iterator = this.nextTickList.iterator();
+ timingCleanup.startTiming(); // Paper
NextTickListEntry<T> nextticklistentry; // CraftBukkit - decompile error
NextTickListEntry nextticklistentry;
for (int j = 0; j < i; ++j) {
@@ -63,9 +70,11 @@ public class TickListServer<T> implements TickList<T> {
// this.nextTickListHash.remove(nextticklistentry); // CraftBukkit - use nextTickList
this.g.add(nextticklistentry);
while (iterator.hasNext()) {
@@ -66,7 +72,9 @@ public class TickListServer<T> implements TickList<T> {
--i;
}
}
+ timingCleanup.stopTiming(); // Paper
this.f.getMethodProfiler().exit();
this.f.getMethodProfiler().enter("ticking");
+ timingTicking.startTiming(); // Paper
Iterator iterator = this.g.iterator();
this.h.getMethodProfiler().exitEnter("ticking");
iterator = this.i.iterator();
while (iterator.hasNext()) {
@@ -88,6 +97,7 @@ public class TickListServer<T> implements TickList<T> {
this.f.getMethodProfiler().exit();
@@ -94,6 +102,7 @@ public class TickListServer<T> implements TickList<T> {
this.i.clear();
this.g.clear();
this.h.getMethodProfiler().exit();
+ timingTicking.stopTiming(); // Paper
}
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 4c811325c3..da30d2cf86 100644
index 7546f6690..095ef9ba5 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -8,11 +8,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
@@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
@ -986,7 +973,7 @@ index 4c811325c3..da30d2cf86 100644
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cbe87a3389..db50066096 100644
index 404d3d8c8..93fa09121 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@
@ -1023,7 +1010,7 @@ index cbe87a3389..db50066096 100644
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
}
@@ -734,14 +735,14 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -739,21 +740,26 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
}
timings.tileEntityPending.stopTiming(); // Spigot
@ -1034,23 +1021,26 @@ index cbe87a3389..db50066096 100644
public void a(Consumer<Entity> consumer, Entity entity) {
try {
- // Spigot start
- SpigotTimings.tickEntityTimer.startTiming();
- SpigotTimings.tickEntityTimer.startTiming(); // Spigot
+ timings.tickEntities.startTiming();
entity.tickTimer.startTiming();
// Spigot end
+ entity.tickTimer.startTiming();
+ // Spigot end
consumer.accept(entity);
@@ -755,7 +756,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
// Spigot start
finally {
entity.tickTimer.stopTiming();
- SpigotTimings.tickEntityTimer.startTiming();
- SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails);
throw new ReportedException(crashreport);
+ } finally {
+ entity.tickTimer.stopTiming();
+ timings.tickEntities.stopTiming();
}
// Spigot end
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d08c5fc93b..a8527784ae 100644
index 36c517d8f..5a0d940be 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,7 @@
@ -1061,15 +1051,15 @@ index d08c5fc93b..a8527784ae 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Queues;
@@ -37,7 +39,6 @@ import org.bukkit.Bukkit;
@@ -33,7 +35,6 @@ import org.apache.logging.log4j.Logger;
// CraftBukkit start
import org.bukkit.Bukkit;
import org.bukkit.WeatherType;
import org.bukkit.block.BlockState;
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.craftbukkit.util.HashTreeSet;
@@ -99,10 +100,10 @@ public class WorldServer extends World {
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.server.MapInitializeEvent;
@@ -90,10 +91,10 @@ public class WorldServer extends World {
// CraftBukkit end
this.nextTickListBlock = new TickListServer<>(this, (block) -> {
return block == null || block.getBlockData().isAir();
@ -1082,7 +1072,7 @@ index d08c5fc93b..a8527784ae 100644
this.I = Sets.newHashSet();
this.siegeManager = new VillageSiege(this);
this.J = new ObjectLinkedOpenHashSet();
@@ -265,12 +266,12 @@ public class WorldServer extends World {
@@ -256,12 +257,12 @@ public class WorldServer extends World {
gameprofilerfiller.exitEnter("chunkSource");
this.getChunkProvider().tick(booleansupplier);
gameprofilerfiller.exitEnter("tickPending");
@ -1097,7 +1087,7 @@ index d08c5fc93b..a8527784ae 100644
gameprofilerfiller.exitEnter("village");
timings.doVillages.startTiming(); // Spigot
@@ -327,6 +328,7 @@ public class WorldServer extends World {
@@ -318,6 +319,7 @@ public class WorldServer extends World {
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
timings.entityTick.startTiming(); // Spigot
@ -1105,7 +1095,7 @@ index d08c5fc93b..a8527784ae 100644
while (objectiterator.hasNext()) {
Entry<Entity> entry = (Entry) objectiterator.next();
Entity entity1 = (Entity) entry.getValue();
@@ -430,6 +432,7 @@ public class WorldServer extends World {
@@ -421,6 +423,7 @@ public class WorldServer extends World {
}
gameprofilerfiller.exitEnter("tickBlocks");
@ -1113,7 +1103,7 @@ index d08c5fc93b..a8527784ae 100644
if (i > 0) {
ChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length;
@@ -461,7 +464,7 @@ public class WorldServer extends World {
@@ -452,7 +455,7 @@ public class WorldServer extends World {
}
}
}
@ -1122,7 +1112,7 @@ index d08c5fc93b..a8527784ae 100644
gameprofilerfiller.exit();
}
@@ -754,6 +757,7 @@ public class WorldServer extends World {
@@ -747,6 +750,7 @@ public class WorldServer extends World {
if (!flag1) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1130,7 +1120,7 @@ index d08c5fc93b..a8527784ae 100644
if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
}
@@ -763,7 +767,10 @@ public class WorldServer extends World {
@@ -756,7 +760,10 @@ public class WorldServer extends World {
iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0]));
}
@ -1142,7 +1132,7 @@ index d08c5fc93b..a8527784ae 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5dc2bb1246..8e877055c3 100644
index 7fe76b8d5..b43888592 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1926,12 +1926,31 @@ public final class CraftServer implements Server {
@ -1179,7 +1169,7 @@ index 5dc2bb1246..8e877055c3 100644
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644
index 38f211526b..0000000000
index 38f211526..000000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,166 +0,0 @@
@ -1350,7 +1340,7 @@ index 38f211526b..0000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6806ada495..e45fd0028b 100644
index 5b58b1a96..8980de820 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1728,6 +1728,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -1369,7 +1359,7 @@ index 6806ada495..e45fd0028b 100644
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index b90979c7ba..8823f94f7b 100644
index b90979c7b..8823f94f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -1,5 +1,6 @@
@ -1435,7 +1425,7 @@ index b90979c7ba..8823f94f7b 100644
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index 3f55381c15..0d9a466809 100644
index 3f55381c1..0d9a46680 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,9 +1,11 @@
@ -1520,7 +1510,7 @@ index 3f55381c15..0d9a466809 100644
- // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
index e52ef47b78..3d90b34268 100644
index e52ef47b7..3d90b3426 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
@ -1532,7 +1522,7 @@ index e52ef47b78..3d90b34268 100644
this.value = value;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 06728e53d5..783676b747 100644
index bed971921..6775bf043 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -271,6 +271,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
@ -1550,7 +1540,7 @@ index 06728e53d5..783676b747 100644
* This helper class represents the different NBT Tags.
* <p>
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 76b060a126..2daecf5049 100644
index 76b060a12..2daecf504 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -30,7 +30,7 @@ import net.minecraft.server.EntityWither;

Datei anzeigen

@ -1,14 +1,14 @@
From 5107f10a7d0b494d3974f0b55e0fb1b7d1afb31c Mon Sep 17 00:00:00 2001
From 9a31a787065e13ef9a984b049773edada78db672 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 15:08:03 -0600
Subject: [PATCH] Remove invalid mob spawner tile entities
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 5c34fe52a4..8e71c8af11 100644
index b317a9800..5a19dc756 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -500,6 +500,10 @@ public class Chunk implements IChunkAccess {
@@ -501,6 +501,10 @@ public class Chunk implements IChunkAccess {
}
// CraftBukkit start

Datei anzeigen

@ -1,11 +1,11 @@
From 70bd27dafcbb7673fa92e6ac6909bc1479626d75 Mon Sep 17 00:00:00 2001
From a2e424aa76b6978f878c936cf549d2c3b67c8cde Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ffad35a61f..7b7a437b93 100644
index 9a17badc2..d40b0cd3f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -51,7 +51,7 @@ index ffad35a61f..7b7a437b93 100644
NBTTagList nbttaglist = new NBTTagList();
double[] adouble1 = adouble;
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 55591fbe05..90becdfdec 100644
index 55591fbe0..90becdfde 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -245,6 +245,14 @@ public class EntityFallingBlock extends Entity {
@ -70,7 +70,7 @@ index 55591fbe05..90becdfdec 100644
public void a(boolean flag) {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index e3001570f9..e0535604b6 100644
index e3001570f..e0535604b 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -104,6 +104,14 @@ public class EntityTNTPrimed extends Entity {
@ -89,7 +89,7 @@ index e3001570f9..e0535604b6 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index ce510c4867..b7c94fe238 100644
index ce510c486..b7c94fe23 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -161,6 +161,7 @@ public class NBTTagList extends NBTList<NBTBase> {
@ -101,10 +101,10 @@ index ce510c4867..b7c94fe238 100644
if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 11cd9003e3..e99b1b9460 100644
index 5a0d940be..4710b79af 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1102,6 +1102,11 @@ public class WorldServer extends World {
@@ -1095,6 +1095,11 @@ public class WorldServer extends World {
this.I.add(((EntityInsentient) entity).getNavigation());
}
entity.valid = true; // CraftBukkit
@ -117,7 +117,7 @@ index 11cd9003e3..e99b1b9460 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 049641db06..cc493ab7f7 100644
index b2a16bb36..da7efb3a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1009,4 +1009,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

Datei anzeigen

@ -1,14 +1,14 @@
From 61c65a8ab53663274d629a25df7e9adf64a61e4b Mon Sep 17 00:00:00 2001
From 4d084776d0ce9cdda67239aa16e4eeb445c97774 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:52:34 -0600
Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index da30d2cf86..acd9edd670 100644
index 095ef9ba5..b99bcbf8a 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -197,7 +197,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -199,7 +199,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
return IRegistry.BLOCK_ENTITY_TYPE.getKey(this.q()) + " // " + this.getClass().getCanonicalName();
});
if (this.world != null) {
@ -23,11 +23,11 @@ index da30d2cf86..acd9edd670 100644
}
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 119e011e2c..0afc34ac0e 100644
index f9f14cc1f..cfbe3d592 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -675,11 +675,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
((ITickable) tileentity).tick();
@@ -680,11 +680,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
gameprofilerfiller.exit();
} catch (Throwable throwable) {
- CrashReport crashreport = CrashReport.a(throwable, "Ticking block entity");
@ -45,7 +45,7 @@ index 119e011e2c..0afc34ac0e 100644
}
// Spigot start
finally {
@@ -748,11 +750,12 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -753,11 +755,12 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
// Spigot end
consumer.accept(entity);
} catch (Throwable throwable) {
@ -60,9 +60,9 @@ index 119e011e2c..0afc34ac0e 100644
+ entity.dead = true;
+ return;
+ // Paper end
}
// Spigot start
finally {
} finally {
entity.tickTimer.stopTiming();
timings.tickEntities.stopTiming();
--
2.21.0

Datei anzeigen

@ -1,11 +1,11 @@
From 8f5a51d97b15c8de7f1074f14eeb26e09ad4effe Mon Sep 17 00:00:00 2001
From 85b1459df312dda2ed54ccd2fc404ad06a89d70e Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 6a307d5dd6..bf0cd6a8b4 100644
index 6a307d5dd..bf0cd6a8b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -156,4 +156,9 @@ public class PaperWorldConfig {
@ -19,10 +19,10 @@ index 6a307d5dd6..bf0cd6a8b4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d54d58e1ee..3b90e8b613 100644
index 4710b79af..9bf3726c8 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -393,7 +393,7 @@ public class WorldServer extends World {
@@ -384,7 +384,7 @@ public class WorldServer extends World {
gameprofilerfiller.enter("thunder");
BlockPosition blockposition;

Datei anzeigen

@ -1,11 +1,11 @@
From cad96100cef4ebf55c54ec59470634f0af438a13 Mon Sep 17 00:00:00 2001
From ddd20750e2a793c72044738fe3940936127eb6b5 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index bf0cd6a8b4..8db5c3f3fe 100644
index bf0cd6a8b..8db5c3f3f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -161,4 +161,9 @@ public class PaperWorldConfig {
@ -19,10 +19,10 @@ index bf0cd6a8b4..8db5c3f3fe 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 3b90e8b613..e176c63fed 100644
index 9bf3726c8..999a67ebf 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -413,7 +413,7 @@ public class WorldServer extends World {
@@ -404,7 +404,7 @@ public class WorldServer extends World {
}
gameprofilerfiller.exitEnter("iceandsnow");

Datei anzeigen

@ -1,11 +1,11 @@
From 65e8c4b55fd401af9fa2490bb37b70cb6ba47fcd Mon Sep 17 00:00:00 2001
From b4da2906d6aff2d025288a6da577d42fd0249921 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Wed, 2 Mar 2016 23:13:07 -0600
Subject: [PATCH] Send absolute position the first time an entity is seen
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index 315c3d9165..aaf3a54b08 100644
index 315c3d916..aaf3a54b0 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
@ -77,10 +77,10 @@ index 315c3d9165..aaf3a54b08 100644
this.c();
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 036577dd0e..efdfab10da 100644
index e7019d8ae..8c43c52e1 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -997,10 +997,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1034,10 +1034,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final Entity tracker;
private final int trackingDistance;
private SectionPosition e;
@ -97,7 +97,7 @@ index 036577dd0e..efdfab10da 100644
this.tracker = entity;
this.trackingDistance = i;
this.e = SectionPosition.a(entity);
@@ -1082,7 +1086,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1119,7 +1123,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
// CraftBukkit end

Datei anzeigen

@ -1,4 +1,4 @@
From 5edd0028e03561e889fdde9dcea3cdd732dc6ba3 Mon Sep 17 00:00:00 2001
From a5b32ed2ffc293d938bc77d6aab460e110d72a1b Mon Sep 17 00:00:00 2001
From: Steve Anton <anxuiz.nx@gmail.com>
Date: Thu, 3 Mar 2016 00:09:38 -0600
Subject: [PATCH] Add PlayerInitialSpawnEvent
@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent
For modifying a player's initial spawn location as they join the server
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 7939208a5a..f904e1c28d 100644
index bab32af46..b647e4287 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -109,7 +109,22 @@ public abstract class PlayerList {
@ -26,7 +26,7 @@ index 7939208a5a..f904e1c28d 100644
+ entityplayer.locZ = newLoc.getZ();
+ entityplayer.yaw = newLoc.getYaw();
+ entityplayer.pitch = newLoc.getPitch();
+ entityplayer.dimension = ((CraftWorld) newLoc.getWorld()).getHandle().dimension;
+ entityplayer.dimension = ((CraftWorld) newLoc.getWorld()).getHandle().worldProvider.getDimensionManager();
+ // Paper end
+
+ entityplayer.spawnIn(((CraftWorld) newLoc.getWorld()).getHandle());

Datei anzeigen

@ -1,4 +1,4 @@
From d20d85eabbc58677092cd028741797484a981d24 Mon Sep 17 00:00:00 2001
From e0e3c441b8dfa2892f00363d9cf15f337a1a98b3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:02:07 -0600
Subject: [PATCH] Optimize Pathfinding
@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as
arrow attacks.
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index ca30e08ff4..2ced8dedd1 100644
index 49b27c431..75e01c242 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -116,10 +116,26 @@ public abstract class NavigationAbstract {
@@ -118,10 +118,26 @@ public abstract class NavigationAbstract {
}
public boolean a(Entity entity, double d0) {
@ -38,7 +38,7 @@ index ca30e08ff4..2ced8dedd1 100644
public boolean a(@Nullable PathEntity pathentity, double d0) {
if (pathentity == null) {
@@ -252,6 +268,7 @@ public abstract class NavigationAbstract {
@@ -233,6 +249,7 @@ public abstract class NavigationAbstract {
}
public void o() {

Datei anzeigen

@ -1,4 +1,4 @@
From c79c27636c3f13a9de8cce8b259d834129af3c1f Mon Sep 17 00:00:00 2001
From 7ac114444af9a40097a33c0061bfde8eb0b33208 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:39:54 -0600
Subject: [PATCH] Change implementation of (tile)entity removal list
@ -6,7 +6,7 @@ Subject: [PATCH] Change implementation of (tile)entity removal list
use sets for faster removal
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 48360c2b47..25e5216e25 100644
index c78d48872..074944718 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -40,7 +40,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -16,7 +16,7 @@ index 48360c2b47..25e5216e25 100644
- protected final List<TileEntity> tileEntityListUnload = Lists.newArrayList();
+ protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
private final long b = 16777215L;
private final Thread c;
private final Thread serverThread;
private int d;
--
2.21.0

Datei anzeigen

@ -1,4 +1,4 @@
From ccde4241ae0089c2dbc015c597c9ed037db7f42b Mon Sep 17 00:00:00 2001
From 80433e682612d8e0b754118af2bb420a252c8055 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Thu, 3 Mar 2016 02:50:31 -0600
Subject: [PATCH] Configurable inter-world teleportation safety
@ -16,7 +16,7 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 320fd07c62..94f5c90b3c 100644
index 320fd07c6..94f5c90b3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -191,4 +191,9 @@ public class PaperWorldConfig {
@ -30,16 +30,15 @@ index 320fd07c62..94f5c90b3c 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 00be351e07..afa209f227 100644
index a09c02a1c..f4dde31e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -745,7 +745,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -745,7 +745,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) {
entity.playerConnection.teleport(to);
} else {
- server.getHandle().moveToWorld(entity, toWorld.dimension, true, to, true);
+ // Paper - Configurable suffocation check
+ server.getHandle().moveToWorld(entity, toWorld.dimension, true, to, !toWorld.paperConfig.disableTeleportationSuffocationCheck);
- server.getHandle().moveToWorld(entity, toWorld.getWorldProvider().getDimensionManager(), true, to, true);
+ server.getHandle().moveToWorld(entity, toWorld.getWorldProvider().getDimensionManager(), true, to, !toWorld.paperConfig.disableTeleportationSuffocationCheck);
}
return true;
}

Datei anzeigen

@ -1,4 +1,4 @@
From de39dfbcb3bb52924e1d01a51420f2df3f8918b5 Mon Sep 17 00:00:00 2001
From 8f6a837642c38c8fc470abddcf9e082b9cf0748d Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event
diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
new file mode 100644
index 0000000000..f699ce18ca
index 000000000..f699ce18c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
@@ -0,0 +1,38 @@
@ -49,7 +49,7 @@ index 0000000000..f699ce18ca
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 8e71c8af11..d578679920 100644
index 5a19dc756..ce058e90a 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@
@ -59,7 +59,7 @@ index 8e71c8af11..d578679920 100644
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
@@ -505,10 +506,15 @@ public class Chunk implements IChunkAccess {
@@ -506,10 +507,15 @@ public class Chunk implements IChunkAccess {
this.tileEntities.remove(blockposition);
// Paper end
} else {
@ -80,11 +80,11 @@ index 8e71c8af11..d578679920 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 4f0fbe4a0d..2dd1c28fab 100644
index cbe1353ac..421e92cfa 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -14,6 +14,9 @@ import java.util.concurrent.Executor;
import java.util.function.BooleanSupplier;
@@ -16,6 +16,9 @@ import java.util.function.BooleanSupplier;
import java.util.function.Function;
import java.util.function.Supplier;
import javax.annotation.Nullable;
+import com.destroystokyo.paper.exception.ServerInternalException;
@ -94,7 +94,7 @@ index 4f0fbe4a0d..2dd1c28fab 100644
public class ChunkProviderServer extends IChunkProvider {
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 1dd793d2fb..61ea2818b1 100644
index 1dd793d2f..61ea2818b 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@
@ -121,27 +121,27 @@ index 1dd793d2fb..61ea2818b1 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index efdfab10da..1370565b36 100644
index 8c43c52e1..fb56e6ca0 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -561,6 +561,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -597,6 +597,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.world.checkSession();
} catch (ExceptionWorldConflict exceptionworldconflict) {
PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict);
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exceptionworldconflict); // Paper
return;
return false;
}
@@ -587,6 +588,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.write(chunkcoordintpair, nbttagcompound);
@@ -624,6 +625,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return true;
} catch (Exception exception) {
PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception);
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper
return false;
}
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index d4a9af975d..88b5aa3a51 100644
index d4a9af975..88b5aa3a5 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@
@ -168,7 +168,7 @@ index d4a9af975d..88b5aa3a51 100644
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 9d4febfbb6..7e58e4714a 100644
index 90f891bea..cbf05926a 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -8,6 +8,7 @@ import org.apache.logging.log4j.LogManager;
@ -196,7 +196,7 @@ index 9d4febfbb6..7e58e4714a 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index d004494aea..d3ed749e1c 100644
index beeb9ccb8..bb3aa4a37 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@ -216,7 +216,7 @@ index d004494aea..d3ed749e1c 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a0817da433..24ea0dbe03 100644
index 074944718..a50842b13 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2,6 +2,9 @@ package net.minecraft.server;
@ -229,7 +229,7 @@ index a0817da433..24ea0dbe03 100644
import com.google.common.collect.Lists;
import java.io.IOException;
import java.util.Collection;
@@ -676,8 +679,11 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -681,8 +684,11 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
gameprofilerfiller.exit();
} catch (Throwable throwable) {
// Paper start - Prevent tile entity and entity crashes
@ -242,7 +242,7 @@ index a0817da433..24ea0dbe03 100644
tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--);
continue;
@@ -751,8 +757,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -756,8 +762,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
consumer.accept(entity);
} catch (Throwable throwable) {
// Paper start - Prevent tile entity and entity crashes
@ -255,7 +255,7 @@ index a0817da433..24ea0dbe03 100644
return;
// Paper end
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 3c5b3fe101..47a4ea9985 100644
index 3c5b3fe10..47a4ea998 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -113,6 +113,7 @@ public class WorldPersistentData {
@ -267,7 +267,7 @@ index 3c5b3fe101..47a4ea9985 100644
} finally {
if (pushbackinputstream != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 8823f94f7b..552daf4376 100644
index 8823f94f7..552daf437 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicInteger;

Datei anzeigen

@ -1,11 +1,11 @@
From da1180199e3adcaaa60cb6370fad3352e3dc2144 Mon Sep 17 00:00:00 2001
From f11f25626aa4897c7e9ac28f6cf4b4af9e2e960e Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 23:17:52 -0400
Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c73fd79666..b7c8cab9ea 100644
index f2e96da81..669566f4c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1343,7 +1343,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -22,7 +22,7 @@ index c73fd79666..b7c8cab9ea 100644
// 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 afa209f227..7209794ce9 100644
index f4dde31e9..b410b7460 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -131,6 +131,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -36,7 +36,7 @@ index afa209f227..7209794ce9 100644
public CraftPlayer(CraftServer server, EntityPlayer entity) {
super(server, entity);
@@ -1755,6 +1759,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1754,6 +1758,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
getHandle().server.getCommandDispatcher().a(getHandle());
}

Datei anzeigen

@ -1,4 +1,4 @@
From 15e7fb2e3e3c72b1c7f72fe540e5a70d098c37bb Mon Sep 17 00:00:00 2001
From 4f2555fc5045bbe267c0c4a186d6c8eb3ae9c1b8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 20:16:03 -0400
Subject: [PATCH] Add World Util Methods
@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index d578679920..2928f7d218 100644
index ce058e90a..ca1abd47c 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -365,6 +365,7 @@ public class Chunk implements IChunkAccess {
@@ -366,6 +366,7 @@ public class Chunk implements IChunkAccess {
return this.world.getChunkProvider().getLightEngine();
}
@ -18,10 +18,10 @@ index d578679920..2928f7d218 100644
return this.a(blockposition, i, this.world.getWorldProvider().g());
}
diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java
index bac6c9d65b..0930552b1f 100644
index 9a98fb4af..452b2b2d2 100644
--- a/src/main/java/net/minecraft/server/IWorldReader.java
+++ b/src/main/java/net/minecraft/server/IWorldReader.java
@@ -36,6 +36,22 @@ public interface IWorldReader extends IIBlockAccess {
@@ -38,6 +38,22 @@ public interface IWorldReader extends IIBlockAccess {
}
int getLightLevel(BlockPosition blockposition, int i);
@ -45,18 +45,18 @@ index bac6c9d65b..0930552b1f 100644
@Nullable
IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 24ea0dbe03..e1cebacb83 100644
index a50842b13..d4be7e884 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -46,7 +46,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
private final long b = 16777215L;
private final Thread c;
private final Thread serverThread;
- private int d;
+ private int d; public int getSkylightSubtracted() { return this.d; } public void setSkylightSubtracted(int value) { this.d = value;} // Paper - OBFHELPER
protected int j = (new Random()).nextInt();
protected final int k = 1013904223;
protected float l;
protected float lastRainLevel;
@@ -208,6 +208,84 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
return i < 0 || i >= 256;
}
@ -143,7 +143,7 @@ index 24ea0dbe03..e1cebacb83 100644
return this.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4);
}
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java
index 94d1c2be11..77b805f3ae 100644
index 94d1c2be1..77b805f3a 100644
--- a/src/main/java/net/minecraft/server/WorldBorder.java
+++ b/src/main/java/net/minecraft/server/WorldBorder.java
@@ -19,6 +19,7 @@ public class WorldBorder {

Datei anzeigen

@ -1,11 +1,11 @@
From 42d31ed7a97bc379dbe761f4215fbe03e7fa75a3 Mon Sep 17 00:00:00 2001
From 1638dcb7d7c6bbf985b4350a96f566ddcbcff5aa Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 27 Sep 2015 01:18:02 -0400
Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 44570edcae..5ae7014887 100644
index 5d73894d3..37a642676 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -539,7 +539,13 @@ public abstract class EntityLiving extends Entity {
@ -44,10 +44,10 @@ index 44570edcae..5ae7014887 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7209794ce9..7edb01082a 100644
index b410b7460..3e1a7be6f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1565,6 +1565,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1564,6 +1564,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {

Datei anzeigen

@ -1,11 +1,11 @@
From 5b49cb442c080f47eacf6e695ab324164edda124 Mon Sep 17 00:00:00 2001
From 4bb8555a2cc19ce266bc0bbfe84955b32f0c9154 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 22 Mar 2016 12:04:28 -0500
Subject: [PATCH] Configurable spawn chances for skeleton horses
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 98049567f4..2a71381dae 100644
index 98049567f..2a71381da 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -221,4 +221,12 @@ public class PaperWorldConfig {
@ -22,10 +22,10 @@ index 98049567f4..2a71381dae 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index e176c63fed..9a4a558467 100644
index 999a67ebf..727faa35d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -397,7 +397,7 @@ public class WorldServer extends World {
@@ -388,7 +388,7 @@ public class WorldServer extends World {
blockposition = this.a(this.a(j, 0, k, 15));
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);

Datei anzeigen

@ -1,4 +1,4 @@
From 4ed471356d2a121be6ed130098d24f68590c325a Mon Sep 17 00:00:00 2001
From 31d632b1e2cc98636c406a5133db67e2337e5f08 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward.
Optimize getType and getBlockData to manually inline and optimize the calls
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index 2852a17f23..7cb46d7a9c 100644
index 2852a17f2..7cb46d7a9 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@ -31,7 +31,7 @@ index 2852a17f23..7cb46d7a9c 100644
public BaseBlockPosition(int i, int j, int k) {
this.a = i;
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index c927d524a8..64700b97c0 100644
index c927d524a..64700b97c 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -339,6 +339,16 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
@ -52,21 +52,20 @@ index c927d524a8..64700b97c0 100644
public MutableBlockPosition() {
this(0, 0, 0);
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 2928f7d218..7a0ab24a91 100644
index ca1abd47c..18b062157 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -209,12 +209,24 @@ public class Chunk implements IChunkAccess {
@@ -210,12 +210,24 @@ public class Chunk implements IChunkAccess {
return this.sections;
}
- @Override
- public IBlockData getType(BlockPosition blockposition) {
+ // Paper start - Optimize getBlockData to reduce instructions
+ public final IBlockData getBlockData(BlockPosition pos) { return getBlockData(pos.getX(), pos.getY(), pos.getZ()); } // Paper
public IBlockData getType(BlockPosition blockposition) {
- int i = blockposition.getX();
- int j = blockposition.getY();
- int k = blockposition.getZ();
+ // Paper start - Optimize getBlockData to reduce instructions
+ public final IBlockData getBlockData(BlockPosition pos) { return getBlockData(pos.getX(), pos.getY(), pos.getZ()); } // Paper
+ public final IBlockData getType(BlockPosition blockposition) {
+ return this.getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ }
@ -86,7 +85,7 @@ index 2928f7d218..7a0ab24a91 100644
IBlockData iblockdata = null;
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 30701fd7f3..43f75fc837 100644
index 30701fd7f..43f75fc83 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -9,7 +9,7 @@ public class ChunkSection {
@ -99,18 +98,18 @@ index 30701fd7f3..43f75fc837 100644
public ChunkSection(int i) {
this(i, (short) 0, (short) 0, (short) 0);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e1cebacb83..31c38e1051 100644
index d4be7e884..aef9e2e75 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -197,11 +197,11 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
}
public static boolean isValidLocation(BlockPosition blockposition) {
- return !isInsideWorld(blockposition) && blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000;
- return !isOutsideWorld(blockposition) && blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000;
+ return blockposition.isValidLocation(); // Paper
}
public static boolean isInsideWorld(BlockPosition blockposition) {
public static boolean isOutsideWorld(BlockPosition blockposition) {
- return b(blockposition.getY());
+ return blockposition.isInvalidYLocation(); // Paper
}

Datei anzeigen

@ -1,4 +1,4 @@
From 1407efbf4ccae6c76a3bc27e1c1db9f961ce298d Mon Sep 17 00:00:00 2001
From 5619ac14f1e9afb752d7b27d45fdfbdee4aae6c1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 19:55:45 -0400
Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/BlockPlant.java b/src/main/java/net/minecraft/server/BlockPlant.java
index 9bf42bb5ef..0526af776d 100644
index 9bf42bb5e..0526af776 100644
--- a/src/main/java/net/minecraft/server/BlockPlant.java
+++ b/src/main/java/net/minecraft/server/BlockPlant.java
@@ -16,7 +16,7 @@ public class BlockPlant extends Block {
@ -19,7 +19,7 @@ index 9bf42bb5ef..0526af776d 100644
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTallPlant.java b/src/main/java/net/minecraft/server/BlockTallPlant.java
index 469a3be057..f2c429f22e 100644
index 469a3be05..f2c429f22 100644
--- a/src/main/java/net/minecraft/server/BlockTallPlant.java
+++ b/src/main/java/net/minecraft/server/BlockTallPlant.java
@@ -55,7 +55,7 @@ public class BlockTallPlant extends BlockPlant {
@ -32,7 +32,7 @@ index 469a3be057..f2c429f22e 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fd1b268798..ff70ef38aa 100644
index 7b3c4747e..8ce7903a1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1105,6 +1105,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -44,7 +44,7 @@ index fd1b268798..ff70ef38aa 100644
if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit
this.methodProfiler.a(() -> {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 31c38e1051..c31585f92f 100644
index aef9e2e75..668b64f42 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -436,7 +436,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -66,12 +66,12 @@ index 31c38e1051..c31585f92f 100644
this.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9d31d57cdf..93c229fcd1 100644
index 727faa35d..7c3d2d5de 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -76,6 +76,7 @@ public class WorldServer extends World {
@@ -68,6 +68,7 @@ public class WorldServer extends World {
// CraftBukkit start
public final DimensionManager dimension;
private int tickPosition;
+ boolean hasPhysicsEvent = true; // Paper

Datei anzeigen

@ -1,14 +1,14 @@
From c5bd4c046c5623d852b9dc727a4b8f0cba872b3f Mon Sep 17 00:00:00 2001
From 586414e6c81a1d5051fca0b97f37b134c6b3b89e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:32:58 -0400
Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 5fe2041b9d..269f793926 100644
index 7c3d2d5de..2128b0bdb 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1108,6 +1108,7 @@ public class WorldServer extends World {
@@ -1101,6 +1101,7 @@ public class WorldServer extends World {
entity.origin = entity.getBukkitEntity().getLocation();
}
// Paper end
@ -16,7 +16,7 @@ index 5fe2041b9d..269f793926 100644
}
}
@@ -1117,6 +1118,7 @@ public class WorldServer extends World {
@@ -1110,6 +1111,7 @@ public class WorldServer extends World {
if (this.tickingEntities) {
throw new IllegalStateException("Removing entity while ticking!");
} else {

Datei anzeigen

@ -1,4 +1,4 @@
From 3ac48ee8c663e1d3d38dfc50b68585bc156efce9 Mon Sep 17 00:00:00 2001
From fb8660aba1c573486ae7f97952939584263c4350 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:46:14 -0400
Subject: [PATCH] Configurable Chunk Inhabited Time
@ -11,7 +11,7 @@ For people who want all chunks to be treated equally, you can chose a fixed valu
This allows to fine-tune vanilla gameplay.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 2a71381dae..e43866991c 100644
index 2a71381da..e43866991 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -229,4 +229,19 @@ public class PaperWorldConfig {
@ -35,10 +35,10 @@ index 2a71381dae..e43866991c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 7a0ab24a91..ed7899abb2 100644
index 18b062157..c2865425d 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -803,7 +803,7 @@ public class Chunk implements IChunkAccess {
@@ -804,7 +804,7 @@ public class Chunk implements IChunkAccess {
@Override
public long q() {

Datei anzeigen

@ -1,4 +1,4 @@
From 790dff9ff673058b18a3c92bddced6e2cb179981 Mon Sep 17 00:00:00 2001
From c7641c30bd926b4c5d123ed4f9943bfbaad76ee7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 21:22:26 -0400
Subject: [PATCH] EntityPathfindEvent
@ -6,7 +6,7 @@ Subject: [PATCH] EntityPathfindEvent
Fires when an Entity decides to start moving to a location.
diff --git a/src/main/java/net/minecraft/server/Navigation.java b/src/main/java/net/minecraft/server/Navigation.java
index 79b2d9297..b6e3bf823 100644
index aacaecd82..bc30e3f33 100644
--- a/src/main/java/net/minecraft/server/Navigation.java
+++ b/src/main/java/net/minecraft/server/Navigation.java
@@ -60,7 +60,7 @@ public class Navigation extends NavigationAbstract {
@ -19,7 +19,7 @@ index 79b2d9297..b6e3bf823 100644
private int s() {
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 2ced8dedd..7b27251b3 100644
index 75e01c242..d04eb1bbf 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -4,7 +4,7 @@ import javax.annotation.Nullable;
@ -50,7 +50,7 @@ index 2ced8dedd..7b27251b3 100644
}
@Nullable
@@ -87,16 +89,24 @@ public abstract class NavigationAbstract {
@@ -87,11 +89,12 @@ public abstract class NavigationAbstract {
double d1 = entity.getBoundingBox().minY;
double d2 = entity.locZ;
@ -58,24 +58,24 @@ index 2ced8dedd..7b27251b3 100644
+ return this.a(blockposition, entity, d0, d1, d2, 16, true); // Paper - Path find event
}
- @Nullable
@Nullable
- protected PathEntity a(BlockPosition blockposition, double d0, double d1, double d2, int i, boolean flag) {
+ // Paper start - Add target entity parameter for path find event
+ @Nullable protected PathEntity a(BlockPosition blockposition, double d0, double d1, double d2, int i, boolean flag) { return this.a(blockposition, null, d0, d1, d2, i, flag); }
+ protected PathEntity a(BlockPosition blockposition, double d0, double d1, double d2, int i, boolean flag) { return this.a(blockposition, null, d0, d1, d2, i, flag); }
+ @Nullable protected PathEntity a(BlockPosition blockposition, Entity target, double d0, double d1, double d2, int i, boolean flag) {
+ // Paper end
if (!this.a()) {
if (this.a.locY < 0.0D) {
return null;
} else if (!this.a()) {
@@ -99,6 +102,12 @@ public abstract class NavigationAbstract {
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
return this.c;
} else {
+ // Paper start - Pathfind event
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(),
+ MCUtil.toLocation(getEntity().world, blockposition), target == null ? null : target.getBukkitEntity()).callEvent()) {
+ MCUtil.toLocation(getEntity().world, blockposition), target == null ? null : target.getBukkitEntity()).callEvent()) {
+ return null;
+ }
+ // Paper end
this.q = blockposition;
this.q = blockposition.immutableCopy();
float f = this.i();
diff --git a/src/main/java/net/minecraft/server/NavigationFlying.java b/src/main/java/net/minecraft/server/NavigationFlying.java

Datei anzeigen

@ -1,14 +1,14 @@
From 6e7c5c35348506ebf4ef4a4f84e8eebf1ac924ab Mon Sep 17 00:00:00 2001
From 435410e1e7631cb7e5b169d2b0a7f6b8bad0992e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 31 Mar 2016 19:17:58 -0400
Subject: [PATCH] Do not load chunks for Pathfinding
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
index c76087614..475c93836 100644
index 2c9bf7d00..281f5f04f 100644
--- a/src/main/java/net/minecraft/server/ChunkCache.java
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
@@ -25,7 +25,7 @@ public class ChunkCache implements IIBlockAccess {
@@ -25,7 +25,7 @@ public class ChunkCache implements IWorldReader {
for (k = this.a; k <= i; ++k) {
for (l = this.b; l <= j; ++l) {
@ -18,7 +18,7 @@ index c76087614..475c93836 100644
}
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 7b27251b3..fe19167a1 100644
index d04eb1bbf..4a91e0d8c 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -22,8 +22,9 @@ public abstract class NavigationAbstract {
@ -40,7 +40,7 @@ index 7b27251b3..fe19167a1 100644
}
public BlockPosition h() {
@@ -176,6 +178,7 @@ public abstract class NavigationAbstract {
@@ -177,6 +179,7 @@ public abstract class NavigationAbstract {
}
public void c() {
@ -49,7 +49,7 @@ index 7b27251b3..fe19167a1 100644
if (this.m) {
this.k();
diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java
index 480dee704..3901dd751 100644
index 359d9a11c..262fa5585 100644
--- a/src/main/java/net/minecraft/server/Pathfinder.java
+++ b/src/main/java/net/minecraft/server/Pathfinder.java
@@ -12,7 +12,7 @@ public class Pathfinder {
@ -62,12 +62,12 @@ index 480dee704..3901dd751 100644
public Pathfinder(PathfinderAbstract pathfinderabstract, int i) {
this.e = pathfinderabstract;
diff --git a/src/main/java/net/minecraft/server/PathfinderAbstract.java b/src/main/java/net/minecraft/server/PathfinderAbstract.java
index 7aad55c7d..3cb43808f 100644
index 92df34aba..e773bef61 100644
--- a/src/main/java/net/minecraft/server/PathfinderAbstract.java
+++ b/src/main/java/net/minecraft/server/PathfinderAbstract.java
@@ -7,6 +7,7 @@ public abstract class PathfinderAbstract {
protected IBlockAccess a;
protected IWorldReader a;
protected EntityInsentient b;
+ public World world; // Paper
protected final Int2ObjectMap<PathPoint> c = new Int2ObjectOpenHashMap();
@ -75,17 +75,17 @@ index 7aad55c7d..3cb43808f 100644
protected int e;
@@ -19,6 +20,7 @@ public abstract class PathfinderAbstract {
public void a(IBlockAccess iblockaccess, EntityInsentient entityinsentient) {
this.a = iblockaccess;
+ if (iblockaccess instanceof World) world = (World) iblockaccess; // Paper
public void a(IWorldReader iworldreader, EntityInsentient entityinsentient) {
this.a = iworldreader;
+ if (iworldreader instanceof World) world = (World) iworldreader; // Paper
this.b = entityinsentient;
this.c.clear();
this.d = MathHelper.d(entityinsentient.getWidth() + 1.0F);
diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java
index f1198272b..1eaed0fd8 100644
index d97166f8f..51991b8c8 100644
--- a/src/main/java/net/minecraft/server/PathfinderNormal.java
+++ b/src/main/java/net/minecraft/server/PathfinderNormal.java
@@ -343,7 +343,8 @@ public class PathfinderNormal extends PathfinderAbstract {
@@ -355,7 +355,8 @@ public class PathfinderNormal extends PathfinderAbstract {
PathType pathtype = this.b(iblockaccess, i, j, k);
if (pathtype == PathType.OPEN && j >= 1) {
@ -95,7 +95,7 @@ index f1198272b..1eaed0fd8 100644
PathType pathtype1 = this.b(iblockaccess, i, j - 1, k);
pathtype = pathtype1 != PathType.WALKABLE && pathtype1 != PathType.OPEN && pathtype1 != PathType.WATER && pathtype1 != PathType.LAVA ? PathType.WALKABLE : PathType.OPEN;
@@ -373,9 +374,10 @@ public class PathfinderNormal extends PathfinderAbstract {
@@ -385,9 +386,10 @@ public class PathfinderNormal extends PathfinderAbstract {
for (int l = -1; l <= 1; ++l) {
for (int i1 = -1; i1 <= 1; ++i1) {
if (l != 0 || i1 != 0) {
@ -108,7 +108,7 @@ index f1198272b..1eaed0fd8 100644
pathtype = PathType.DANGER_CACTUS;
} else if (block == Blocks.FIRE) {
pathtype = PathType.DANGER_FIRE;
@@ -409,7 +411,8 @@ public class PathfinderNormal extends PathfinderAbstract {
@@ -421,7 +423,8 @@ public class PathfinderNormal extends PathfinderAbstract {
protected PathType b(IBlockAccess iblockaccess, int i, int j, int k) {
BlockPosition blockposition = new BlockPosition(i, j, k);

Datei anzeigen

@ -1,14 +1,14 @@
From 41f9603cf89851f8d59fdc5c9111138712090c3a Mon Sep 17 00:00:00 2001
From 427bd54d7a0f7fd616d989a044eff927c11eddc9 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 2 Apr 2016 20:37:03 -0400
Subject: [PATCH] Fix reducedDebugInfo not initialized on client
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6541ce24fa..6997c31a2c 100644
index b647e4287..5745b4762 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -161,6 +161,7 @@ public abstract class PlayerList {
@@ -162,6 +162,7 @@ public abstract class PlayerList {
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b()));
playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry()));

Datei anzeigen

@ -1,4 +1,4 @@
From 4b363f2ad753aad4f3cea1a978ed611e23fbd38a Mon Sep 17 00:00:00 2001
From db51cb961748a40d440c861a9693892955f35464 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 6 Apr 2016 01:04:23 -0500
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
@ -12,7 +12,7 @@ for this on CB at one point but I can't find it. We may need to do this
ourselves at some point in the future.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 59d11e68c9..1da7ffab5d 100644
index 59d11e68c..1da7ffab5 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -250,4 +250,9 @@ public class PaperWorldConfig {
@ -26,7 +26,7 @@ index 59d11e68c9..1da7ffab5d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index ce98f690e8..cd0f62f5f0 100644
index 86de93275..bc11a9162 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1656,7 +1656,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -48,10 +48,10 @@ index ce98f690e8..cd0f62f5f0 100644
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
for (Object recipient : minecraftServer.getPlayerList().players) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6997c31a2c..4f47b245da 100644
index 5745b4762..eadbf0ee0 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -176,7 +176,7 @@ public abstract class PlayerList {
@@ -177,7 +177,7 @@ public abstract class PlayerList {
}
// CraftBukkit start
chatmessage.a(EnumChatFormat.YELLOW);

Datei anzeigen

@ -1,4 +1,4 @@
From 85f4312ca4d64509eb61b9d85665e53ce8d433d6 Mon Sep 17 00:00:00 2001
From 491523ef4ba143804b922744b5835af6ee868621 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 10 Apr 2016 03:23:32 -0500
Subject: [PATCH] Workaround for setting passengers on players
@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players
SPIGOT-1915 & GH-114
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7edb01082a..f75ac03b74 100644
index 3e1a7be6f..3d37f78c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -755,6 +755,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -754,6 +754,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return true;
}

Datei anzeigen

@ -1,4 +1,4 @@
From fb635d79739c98a409a62defd82b5b282b83f48c Mon Sep 17 00:00:00 2001
From 00b367a9cebfde5f675a34b83738c65cf3389278 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 00:25:28 -0400
Subject: [PATCH] Remove unused World Tile Entity List
@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index d13cf1014d..de09ed97ec 100644
index be18e029d..02ef71bb4 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -40,7 +40,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -39,7 +39,7 @@ index d13cf1014d..de09ed97ec 100644
this.tileEntityListUnload.clear();
}
@@ -782,7 +782,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -787,7 +787,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--);
// Spigot end
@ -48,7 +48,7 @@ index d13cf1014d..de09ed97ec 100644
if (this.isLoaded(tileentity.getPosition())) {
this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition());
}
@@ -812,7 +812,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -817,7 +817,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
// CraftBukkit start
// From above, don't screw this up - SPIGOT-1746
@ -57,7 +57,7 @@ index d13cf1014d..de09ed97ec 100644
this.a(tileentity1);
}
// CraftBukkit end
@@ -1083,7 +1083,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@@ -1085,7 +1085,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
} else {
if (tileentity != null) {
this.tileEntityListPending.remove(tileentity);

Datei anzeigen

@ -1,11 +1,11 @@
From ea9e4c1007b8495da4203a23c931a99023f8a3d7 Mon Sep 17 00:00:00 2001
From 98c52a0d68daa9285292fe40c0e4214e661c6372 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 4424f7ef18..69bfe62416 100644
index 4424f7ef1..69bfe6241 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -223,4 +223,9 @@ public class PaperConfig {
@ -19,7 +19,7 @@ index 4424f7ef18..69bfe62416 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ff70ef38aa..860957c0b1 100644
index 8ce7903a1..1bc26d17d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -439,6 +439,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -44,7 +44,7 @@ index ff70ef38aa..860957c0b1 100644
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
index b0740965a4..6b1a914d2f 100644
index b0740965a..6b1a914d2 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
@@ -96,7 +96,7 @@ public class PacketPlayOutScoreboardTeam implements Packet<PacketListenerPlayOut
@ -57,7 +57,7 @@ index b0740965a4..6b1a914d2f 100644
packetdataserializer.a(this.c);
packetdataserializer.a(this.d);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 4f47b245da..882dd07e7f 100644
index eadbf0ee0..7b6d518b1 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -72,6 +72,7 @@ public abstract class PlayerList {
@ -68,7 +68,7 @@ index 4f47b245da..882dd07e7f 100644
public PlayerList(MinecraftServer minecraftserver, int i) {
this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this);
@@ -285,6 +286,13 @@ public abstract class PlayerList {
@@ -286,6 +287,13 @@ public abstract class PlayerList {
}
entityplayer.syncInventory();
@ -82,7 +82,7 @@ index 4f47b245da..882dd07e7f 100644
// CraftBukkit - Moved from above, added world
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), entityplayer.world.worldData.getName(), entityplayer.locX, entityplayer.locY, entityplayer.locZ);
}
@@ -403,6 +411,16 @@ public abstract class PlayerList {
@@ -404,6 +412,16 @@ public abstract class PlayerList {
entityplayer.playerTick();// SPIGOT-924
// CraftBukkit end
@ -99,7 +99,7 @@ index 4f47b245da..882dd07e7f 100644
this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getRootVehicle();
@@ -1026,7 +1044,13 @@ public abstract class PlayerList {
@@ -1027,7 +1045,13 @@ public abstract class PlayerList {
player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
}
// CraftBukkit end

Datei anzeigen

@ -1,11 +1,11 @@
From 179783bf52fb0e0b9f812a3e0c89ba79ca6704fc Mon Sep 17 00:00:00 2001
From 7bb6986156e4f55149c222aa7d9ddc563635d5e9 Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com>
Date: Tue, 19 Apr 2016 14:09:31 -0500
Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 1b8b6daac..c9c5af65a 100644
index 6725b62a9..42b5b3f40 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -37,7 +37,7 @@ import org.bukkit.inventory.MainHand;
@ -40,10 +40,10 @@ index 1b8b6daac..c9c5af65a 100644
this.cl = packetplayinsettings.e();
this.getDataWatcher().set(EntityPlayer.bt, (byte) packetplayinsettings.f());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f75ac03b7..06db4a8f0 100644
index 3d37f78c6..eca8c0ded 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1749,8 +1749,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1748,8 +1748,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {
@ -56,7 +56,7 @@ index f75ac03b7..06db4a8f0 100644
}
// Paper start
@@ -1829,7 +1831,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1828,7 +1830,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale()
{

Datei anzeigen

@ -1,4 +1,4 @@
From f77a0b7daecc921d3c29fe4375224fe88728548b Mon Sep 17 00:00:00 2001
From a8ea4e4661e2aa7898ecf28fe43d93916064f57b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Apr 2016 20:02:00 -0400
Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes
@ -13,7 +13,7 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index d0713bfcd..8a6f8e875 100644
index 51dcb5ff0..7143ec7bb 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -590,6 +590,12 @@ public abstract class EntityHuman extends EntityLiving {
@ -30,7 +30,7 @@ index d0713bfcd..8a6f8e875 100644
return entityitem;
}
diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java
index e080a77c7..98e4ad4ac 100644
index 61892fec9..acbd381c8 100644
--- a/src/main/java/net/minecraft/server/WorldMap.java
+++ b/src/main/java/net/minecraft/server/WorldMap.java
@@ -31,6 +31,7 @@ public class WorldMap extends PersistentBase {
@ -102,10 +102,10 @@ index e080a77c7..98e4ad4ac 100644
for ( org.bukkit.map.MapCursor cursor : render.cursors) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index ab2ca1c32..1e718e4db 100644
index 2128b0bdb..2cb70b3bc 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1045,6 +1045,7 @@ public class WorldServer extends World {
@@ -1038,6 +1038,7 @@ public class WorldServer extends World {
{
if ( iter.next().trackee == entity )
{

Datei anzeigen

@ -1,4 +1,4 @@
From baaddf7e045aa037211e6721e02193fd49d933f2 Mon Sep 17 00:00:00 2001
From 75f71ce6a90425d146b533b8a86a277b014925c6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 21 Jun 2016 22:54:34 -0400
Subject: [PATCH] Fix Double World Add issues
@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added.
Also add debug if something else tries to, and abort before world gets bad state
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 1e718e4db..464a132a3 100644
index 2cb70b3bc..ec392deca 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -935,6 +935,7 @@ public class WorldServer extends World {
@@ -928,6 +928,7 @@ public class WorldServer extends World {
// CraftBukkit start
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot

Datei anzeigen

@ -1,4 +1,4 @@
From 573d367a58a83b1d1598fa03f3ab124a6b8d5ae7 Mon Sep 17 00:00:00 2001
From ace42663ea06bd02c38d2a2b2462b91303d524d1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 17 Jun 2016 20:50:11 -0400
Subject: [PATCH] Fix Old Sign Conversion
@ -9,7 +9,7 @@ Subject: [PATCH] Fix Old Sign Conversion
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
index dabfb8067b..f80ba567f2 100644
index 1e81c49bf..297f868d6 100644
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
@@ -203,9 +203,11 @@ public class DefinedStructure {
@ -25,10 +25,10 @@ index dabfb8067b..f80ba567f2 100644
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index acd9edd670..d70b678de3 100644
index b99bcbf8a..013745f82 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -19,6 +19,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -20,6 +20,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
// CraftBukkit end
private static final Logger LOGGER = LogManager.getLogger();
@ -37,15 +37,15 @@ index acd9edd670..d70b678de3 100644
@Nullable
protected World world;
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index 86505f25c1..9de03a24cf 100644
index 86d0b18f7..626ba9b17 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -58,13 +58,14 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
}
try {
- IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s);
+ //IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s); // Paper - move down - the old format might throw a json error
- IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s);
+ //IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); // Paper - move down - the old format might throw a json error
- if (oldSign) {
+ if (oldSign && !isLoadingStructure) { // Paper - saved structures will be in the new format, but will not have isConverted
@ -53,7 +53,7 @@ index 86505f25c1..9de03a24cf 100644
continue;
}
// CraftBukkit end
+ IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s); // Paper - after old sign
+ IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); // Paper - after old sign
if (this.world instanceof WorldServer) {
try {

Datei anzeigen

@ -1,4 +1,4 @@
From f355773996d96cee145d4cd5e257b0273fb37927 Mon Sep 17 00:00:00 2001
From 2b1575c0cbbe8ef6d446beabe6cc7852af985386 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 22:54:28 -0400
Subject: [PATCH] Chunk registration fixes
@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr
Keep them consistent
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 464a132a3..bbf676958 100644
index ec392deca..9fdc8f5b0 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -631,7 +631,7 @@ public class WorldServer extends World {
@@ -624,7 +624,7 @@ public class WorldServer extends World {
public void chunkCheck(Entity entity) {
this.getMethodProfiler().enter("chunkCheck");
int i = MathHelper.floor(entity.locX / 16.0D);

Datei anzeigen

@ -1,11 +1,11 @@
From a8b53fb5c3798192239fb36ef5d55815f10fc75c Mon Sep 17 00:00:00 2001
From 94dfb8f25bd8fce92c3befc3a08a5a8fa1e342d6 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 5 Oct 2016 16:27:36 -0500
Subject: [PATCH] Option to remove corrupt tile entities
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 92ab55182f..eed454bf40 100644
index 92ab55182..eed454bf4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -296,4 +296,9 @@ public class PaperWorldConfig {
@ -19,10 +19,10 @@ index 92ab55182f..eed454bf40 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index ed7899abb2..5f0329d0b1 100644
index c2865425d..7382a47d8 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -527,6 +527,12 @@ public class Chunk implements IChunkAccess {
@@ -528,6 +528,12 @@ public class Chunk implements IChunkAccess {
"Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16));
e.printStackTrace();
ServerInternalException.reportInternalException(e);

Datei anzeigen

@ -1,11 +1,11 @@
From d8b81595d51b50634099cdc7a0864b272bcef917 Mon Sep 17 00:00:00 2001
From a2ec94269fa6eaf9b16e4810c3f69e1013a3b28f Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:30 -0700
Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index 01202e4d53..616075569f 100644
index 01202e4d5..616075569 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -168,6 +168,12 @@ public class EntityPig extends EntityAnimal {
@ -22,10 +22,10 @@ index 01202e4d53..616075569f 100644
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index cc66f565c3..c348683247 100644
index 512d18a2b..9ac9d499d 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -573,6 +573,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -578,6 +578,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
public void onLightningStrike(EntityLightning entitylightning) {
EntityWitch entitywitch = (EntityWitch) EntityTypes.WITCH.a(this.world);
@ -39,7 +39,7 @@ index cc66f565c3..c348683247 100644
entitywitch.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entitywitch)), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null);
entitywitch.setNoAI(this.isNoAI());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 0736c83a4e..1632969249 100644
index 0997238df..603ebc504 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -994,6 +994,14 @@ public class CraftEventFactory {

Datei anzeigen

@ -1,4 +1,4 @@
From 86cfce2ef59058237e194d6be275d49645d503f8 Mon Sep 17 00:00:00 2001
From bd7ba68c3a9b35a34b430b27c0dc13421cac44ad Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 19 Dec 2016 23:07:42 -0500
Subject: [PATCH] Prevent Pathfinding out of World Border
@ -6,17 +6,17 @@ Subject: [PATCH] Prevent Pathfinding out of World Border
This prevents Entities from trying to run outside of the World Border
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index fe19167a1..6a1d5a899 100644
index 4a91e0d8c..6cc142383 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -98,6 +98,7 @@ public abstract class NavigationAbstract {
@Nullable protected PathEntity a(BlockPosition blockposition, double d0, double d1, double d2, int i, boolean flag) { return this.a(blockposition, null, d0, d1, d2, i, flag); }
@@ -97,6 +97,7 @@ public abstract class NavigationAbstract {
@Nullable
protected PathEntity a(BlockPosition blockposition, double d0, double d1, double d2, int i, boolean flag) { return this.a(blockposition, null, d0, d1, d2, i, flag); }
@Nullable protected PathEntity a(BlockPosition blockposition, Entity target, double d0, double d1, double d2, int i, boolean flag) {
// Paper end
+ if (!getEntity().getWorld().getWorldBorder().isInBounds(blockposition)) return null; // Paper - don't path out of world border
if (!this.a()) {
if (this.a.locY < 0.0D) {
return null;
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
} else if (!this.a()) {
--
2.21.0

Datei anzeigen

@ -1,4 +1,4 @@
From 141dac0efd72ea2e0702616331db1cd427173959 Mon Sep 17 00:00:00 2001
From 453b8bec5d32187e1700a0d78fd731096e4480d5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 7 Jan 2017 15:41:58 -0500
Subject: [PATCH] Enforce Sync Player Saves
@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 882dd07e7f..6457317d78 100644
index 7b6d518b1..f13d63030 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -929,11 +929,13 @@ public abstract class PlayerList {
@@ -930,11 +930,13 @@ public abstract class PlayerList {
}
public void savePlayers() {

Datei anzeigen

@ -1,4 +1,4 @@
From 4194fadfef71e639deaa66ce9b3d6702384d326c Mon Sep 17 00:00:00 2001
From af686a8e6fec3b00d6f5bdb9609b00150e7b45ba Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 16:31:46 -0500
Subject: [PATCH] ExperienceOrbs API for Reason/Source/Triggering player
@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index fd23d45346..69e65ea6c8 100644
index 85a5776b0..dedb063de 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -504,13 +504,13 @@ public class Block implements IMaterial {
@@ -512,13 +512,13 @@ public class Block implements IMaterial {
}
}
@ -28,7 +28,7 @@ index fd23d45346..69e65ea6c8 100644
}
diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java
index 2e4f81ebe4..88b9655bb0 100644
index 4144a4757..8a9c81ad6 100644
--- a/src/main/java/net/minecraft/server/ContainerGrindstone.java
+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java
@@ -81,7 +81,7 @@ public class ContainerGrindstone extends Container {
@ -41,7 +41,7 @@ index 2e4f81ebe4..88b9655bb0 100644
world.triggerEffect(1042, blockposition, 0);
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 2ee80c2863..b0651a7086 100644
index b3010bee5..d42d4e83e 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -607,7 +607,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
@ -54,7 +54,7 @@ index 2ee80c2863..b0651a7086 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index bfba08fb24..49668f2c21 100644
index bfba08fb2..49668f2c2 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -16,9 +16,59 @@ public class EntityExperienceOrb extends Entity {
@ -134,7 +134,7 @@ index bfba08fb24..49668f2c21 100644
@Override
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 78527f3509..03f782d4b9 100644
index bdd2a39f8..67f8b6841 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -404,7 +404,7 @@ public class EntityFishingHook extends Entity {
@ -147,7 +147,7 @@ index 78527f3509..03f782d4b9 100644
// CraftBukkit end
if (itemstack1.getItem().a(TagsItem.FISHES)) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 482d6f7c62..567112ffc7 100644
index fdc0a49f9..25570f1d1 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -381,7 +381,8 @@ public abstract class EntityLiving extends Entity {
@ -161,7 +161,7 @@ index 482d6f7c62..567112ffc7 100644
this.expToDrop = 0;
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
index 77dd4c99a6..398b499bbe 100644
index 77dd4c99a..398b499bb 100644
--- a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
+++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
@@ -43,7 +43,7 @@ public class EntityThrownExpBottle extends EntityProjectileThrowable {
@ -174,7 +174,7 @@ index 77dd4c99a6..398b499bbe 100644
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java
index 7c6506a912..1b4933c077 100644
index 7c6506a91..1b4933c07 100644
--- a/src/main/java/net/minecraft/server/EntityTurtle.java
+++ b/src/main/java/net/minecraft/server/EntityTurtle.java
@@ -512,7 +512,7 @@ public class EntityTurtle extends EntityAnimal {
@ -187,24 +187,24 @@ index 7c6506a912..1b4933c077 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index c348683247..bc04086d79 100644
index 9ac9d499d..53e2266a9 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -421,7 +421,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -426,7 +426,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
}
if (merchantrecipe.q()) {
if (merchantrecipe.isRewardExp()) {
- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY + 0.5D, this.locZ, i));
+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY + 0.5D, this.locZ, i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTrader(), this)); // Paper
}
}
diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
index 1d612d828e..002ff88800 100644
index fee8f97d8..8ced8722a 100644
--- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java
+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
@@ -147,7 +147,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
if (merchantrecipe.q()) {
if (merchantrecipe.isRewardExp()) {
int i = 3 + this.random.nextInt(4);
- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY + 0.5D, this.locZ, i));
@ -213,7 +213,7 @@ index 1d612d828e..002ff88800 100644
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
index d25a05736e..9d0b1ffefa 100644
index d25a05736..9d0b1ffef 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
@@ -117,7 +117,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
@ -226,7 +226,7 @@ index d25a05736e..9d0b1ffefa 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 6e90f21ea2..a7411c75ac 100644
index 6e90f21ea..a7411c75a 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -367,7 +367,7 @@ public class PlayerInteractManager {
@ -239,7 +239,7 @@ index 6e90f21ea2..a7411c75ac 100644
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
index d2698e847c..edc4a5c34e 100644
index d2698e847..edc4a5c34 100644
--- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java
+++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
@@ -2,7 +2,7 @@ package net.minecraft.server;
@ -252,7 +252,7 @@ index d2698e847c..edc4a5c34e 100644
public SlotFurnaceResult(EntityHuman entityhuman, IInventory iinventory, int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index adb1a09133..be16fe9a9e 100644
index adb1a0913..be16fe9a9 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -554,7 +554,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@ -265,10 +265,10 @@ index adb1a09133..be16fe9a9e 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c79b0f42a6..94178fe8ba 100644
index dd31b346c..9dd375951 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1626,7 +1626,7 @@ public class CraftWorld implements World {
@@ -1609,7 +1609,7 @@ public class CraftWorld implements World {
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
entity = new EntityTNTPrimed(world, x, y, z, null);
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) {
@ -278,7 +278,7 @@ index c79b0f42a6..94178fe8ba 100644
entity = new EntityLightning(world, x, y, z, false);
} else if (Firework.class.isAssignableFrom(clazz)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index 1b512cc45c..fbad045675 100644
index 1b512cc45..fbad04567 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@@ -20,6 +20,18 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {

Datei anzeigen

@ -1,14 +1,14 @@
From 82970c53b5f0fc7f3efa48dc5f603bbe300ebbc9 Mon Sep 17 00:00:00 2001
From 8e27f750c6159836be0bf755ba6759079648b833 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 7 Feb 2017 16:55:35 -0600
Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 1370565b36..8e40027acf 100644
index fb56e6ca0..a93117667 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -293,7 +293,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -313,7 +313,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Spigot start
org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant;
activityAccountant.startActivity(0.5);

Datei anzeigen

@ -1,4 +1,4 @@
From e5b162f22e402926b6adbca86c920ca466bcf92d Mon Sep 17 00:00:00 2001
From 96e9ac054004602ee4a59599848d078a7de53ab4 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 12 May 2017 23:34:11 -0500
Subject: [PATCH] Properly handle async calls to restart the server
@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3b745b2b75..c117e8fa3f 100644
index 852d827c1..119730460 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -80,6 +80,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -73,10 +73,10 @@ index 3b745b2b75..c117e8fa3f 100644
// Spigot Start
private static double calcTps(double avg, double exp, double tps)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6457317d78..274e93a25d 100644
index f13d63030..3158197cd 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1040,10 +1040,15 @@ public abstract class PlayerList {
@@ -1041,10 +1041,15 @@ public abstract class PlayerList {
entityplayer.playerInteractManager.b(generatoraccess.getWorldData().getGameType());
}
@ -93,7 +93,7 @@ index 6457317d78..274e93a25d 100644
}
// CraftBukkit end
// Paper start - Remove collideRule team if it exists
@@ -1054,6 +1059,7 @@ public abstract class PlayerList {
@@ -1055,6 +1060,7 @@ public abstract class PlayerList {
}
// Paper end
}
@ -102,7 +102,7 @@ index 6457317d78..274e93a25d 100644
// CraftBukkit start
public void sendMessage(IChatBaseComponent[] iChatBaseComponents) {
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
index ccea803f58..aefea3a9a8 100644
index ccea803f5..aefea3a9a 100644
--- a/src/main/java/org/spigotmc/RestartCommand.java
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -46,86 +46,134 @@ public class RestartCommand extends Command

Datei anzeigen

@ -1,14 +1,14 @@
From a901f50b7ca1bb20b0587dad07e4affc10fb35fa Mon Sep 17 00:00:00 2001
From 866cadb89f21268850f4ec0bdd25e26e73c6d679 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 May 2017 06:26:09 -0500
Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 36b5fb537..e02df8987 100644
index 9c743de8d..2deb5c494 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -316,6 +316,7 @@ public class EntityItem extends Entity {
@@ -318,6 +318,7 @@ public class EntityItem extends Entity {
// CraftBukkit start - fire PlayerPickupItemEvent
int canHold = entityhuman.inventory.canHold(itemstack);
int remaining = i - canHold;
@ -16,7 +16,7 @@ index 36b5fb537..e02df8987 100644
if (this.pickupDelay <= 0 && canHold > 0) {
itemstack.setCount(canHold);
@@ -323,7 +324,13 @@ public class EntityItem extends Entity {
@@ -325,7 +326,13 @@ public class EntityItem extends Entity {
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
playerEvent.setCancelled(!entityhuman.canPickUpLoot);
this.world.getServer().getPluginManager().callEvent(playerEvent);
@ -30,7 +30,7 @@ index 36b5fb537..e02df8987 100644
return;
}
@@ -343,7 +350,11 @@ public class EntityItem extends Entity {
@@ -345,7 +352,11 @@ public class EntityItem extends Entity {
// CraftBukkit end
if (this.pickupDelay == 0 && (this.owner == null || 6000 - this.age <= 200 || this.owner.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) {

Datei anzeigen

@ -1,11 +1,11 @@
From 8559585ae4946733a3fd8d088a3509f9348ac663 Mon Sep 17 00:00:00 2001
From d482a5bc4f483c161399595bafbf4f5803a3d6cf Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 11 Jun 2017 16:30:30 -0500
Subject: [PATCH] PlayerAttemptPickupItemEvent
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index e02df8987..c582c6711 100644
index 2deb5c494..bda5ea463 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -8,6 +8,7 @@ import javax.annotation.Nullable;
@ -16,7 +16,7 @@ index e02df8987..c582c6711 100644
public class EntityItem extends Entity {
@@ -318,6 +319,22 @@ public class EntityItem extends Entity {
@@ -320,6 +321,22 @@ public class EntityItem extends Entity {
int remaining = i - canHold;
boolean flyAtPlayer = false; // Paper

Datei anzeigen

@ -1,14 +1,14 @@
From 7f8eb3c3b567f8cf69bd6ab8e12d5f5432ec2e22 Mon Sep 17 00:00:00 2001
From 7c9560783091a441d9927d219d8a40c51adae42b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 3 Jul 2017 18:11:10 -0500
Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 9577b537fc..cacd769543 100644
index b746e7ad3..5ac4a7c28 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -520,9 +520,9 @@ public abstract class PlayerList {
@@ -521,9 +521,9 @@ public abstract class PlayerList {
// return chatmessage;
if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot
@ -20,7 +20,7 @@ index 9577b537fc..cacd769543 100644
} else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) {
IpBanEntry ipbanentry = this.l.get(socketaddress);
@@ -891,9 +891,25 @@ public abstract class PlayerList {
@@ -892,9 +892,25 @@ public abstract class PlayerList {
this.server.getCommandDispatcher().a(entityplayer);
}

Datei anzeigen

@ -1,30 +0,0 @@
From fd2bd4f9885b94441cf42515e5c37a7d59e8c267 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Fri, 20 Oct 2017 04:33:45 +0200
Subject: [PATCH] Replace HashSet with fastutil's ObjectOpenHashSet in
HashTreeSet
HashSet sometimes uses compareTo() instead of equals() and this breaks the comparison of net.minecraft.server.NextTickListEntry (the only place where HashTreeSet is used).
In this cases duplicate entries could be added to the HashSet of HashTreeSet, because NextTickListEntry.compareTo() does not return 0, even if NextTickListEntry.equals() returns true.
ObjectOpenHashSet never uses compareTo(), so the inconsistencies of NextTickListEntry cause no problems.
Fixes https://github.com/PaperMC/Paper/issues/588
diff --git a/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java b/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
index 80a5c29f3..cd864c404 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
@@ -8,7 +8,7 @@ import java.util.TreeSet;
public class HashTreeSet<V> implements Set<V> {
- private HashSet<V> hash = new HashSet<V>();
+ private Set<V> hash = new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<V>(); //Paper - Replace java.util.HashSet with ObjectOpenHashSet
private TreeSet<V> tree = new TreeSet<V>();
public HashTreeSet() {
--
2.21.0

Datei anzeigen

@ -1,4 +1,4 @@
From b1a18d2954d0e282cfb78fce638663d2afeadaba Mon Sep 17 00:00:00 2001
From ed6075e3d366248adb9544ca2a8beb353ac27237 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 31 Oct 2017 03:26:18 +0100
Subject: [PATCH] Send attack SoundEffects only to players who can see the
@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 0f8100a05..a30d88af8 100644
index 05942fb7e..b97e34163 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -941,6 +941,15 @@ public abstract class EntityHuman extends EntityLiving {
@ -72,7 +72,7 @@ index 0f8100a05..a30d88af8 100644
entity.extinguish();
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f9413dd68..8328b0125 100644
index 3fa218a32..37884a606 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -667,6 +667,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose

Datei anzeigen

@ -1,11 +1,11 @@
From b3328de9c961142f14d916b9a9b87c0570120f28 Mon Sep 17 00:00:00 2001
From 423271176bb3c5474c18d7aae55ee6333f9d7f5f Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 10 Nov 2017 23:03:12 -0500
Subject: [PATCH] Option for maximum exp value when merging orbs
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index abc967d3f5..2a50d6babf 100644
index abc967d3f..2a50d6bab 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -338,4 +338,10 @@ public class PaperWorldConfig {
@ -20,7 +20,7 @@ index abc967d3f5..2a50d6babf 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 3ad614b7de..87b2ad7960 100644
index 8585dcace..1daf7b2c5 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -513,16 +513,32 @@ public class CraftEventFactory {

Datei anzeigen

@ -1,11 +1,11 @@
From 017175990b58dac008de3399fe82a3d8d41aebb4 Mon Sep 17 00:00:00 2001
From 4b68adef0da9d19e413ba0179905f856b9418e42 Mon Sep 17 00:00:00 2001
From: pkt77 <parkerkt77@gmail.com>
Date: Fri, 10 Nov 2017 23:46:34 -0500
Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 121925046..9ef605ba3 100644
index e2921de48..864204078 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1,5 +1,6 @@

Datei anzeigen

@ -1,4 +1,4 @@
From 381f712680dfeaafe48d34a457a51f7c691def20 Mon Sep 17 00:00:00 2001
From 7d0c76996f72ee5518fad9520c12c975f177fb75 Mon Sep 17 00:00:00 2001
From: killme <killme-git@ibts.me>
Date: Sun, 12 Nov 2017 19:40:01 +0100
Subject: [PATCH] Prevent logins from being processed when the player has

Datei anzeigen

@ -1,4 +1,4 @@
From 6372cbd4afa45ce3bb758f13529d5f38893d6947 Mon Sep 17 00:00:00 2001
From 1e9ef944858c7c6d5a27733a67f1015f72a55fdc Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 16 Nov 2017 12:12:41 +0000
Subject: [PATCH] use CB BlockState implementations for captured blocks
@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 8328b0125..c388a8261 100644
index 37884a606..e3de63489 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -344,7 +344,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose

Datei anzeigen

@ -1,4 +1,4 @@
From 86492da20337216397e5af641569923b7b87b9f7 Mon Sep 17 00:00:00 2001
From d60f08ef39ec6643ebfe0664bd1071a5c0219a8b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 6 Nov 2017 21:08:22 -0500
Subject: [PATCH] API to get a BlockState without a snapshot
@ -13,10 +13,10 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
If Tile Entity was null, correct Sign to return empty lines instead of null
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index d70b678de3..b76f30dd24 100644
index 013745f82..9f31f071b 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -225,7 +225,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -236,7 +236,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
}
// CraftBukkit start - add method
@ -29,7 +29,7 @@ index d70b678de3..b76f30dd24 100644
if (world == null) return null;
// Spigot start
org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());
@@ -234,7 +239,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -245,7 +250,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
return null;
}
// Spigot end
@ -39,7 +39,7 @@ index d70b678de3..b76f30dd24 100644
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index a36876e495..d31447ccd6 100644
index a36876e49..d31447ccd 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -312,6 +312,20 @@ public class CraftBlock implements Block {
@ -64,7 +64,7 @@ index a36876e495..d31447ccd6 100644
switch (material) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index d8b3d2f3d5..7cb4c3e503 100644
index d8b3d2f3d..7cb4c3e50 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -27,20 +27,40 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
@ -114,7 +114,7 @@ index d8b3d2f3d5..7cb4c3e503 100644
private T createSnapshot(T tileEntity, World world) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index e7e58877e2..6d85a6d18e 100644
index 15022ada0..af15656cc 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -17,10 +17,12 @@ public class CraftSign extends CraftBlockEntityState<TileEntitySign> implements

Datei anzeigen

@ -1,4 +1,4 @@
From 93ca054cb327a04b224dbc227afbde0126cb6b65 Mon Sep 17 00:00:00 2001
From b215862783231105934553ef2bcbff6842ffc270 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 26 Nov 2017 13:19:58 -0500
Subject: [PATCH] AsyncTabCompleteEvent
@ -14,7 +14,7 @@ completion, such as offline players.
Also adds isCommand and getLocation to the sync TabCompleteEvent
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 593414b2b..7fba7e28e 100644
index 766918e8c..c6a44c5f2 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -519,10 +519,10 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -70,7 +70,7 @@ index 593414b2b..7fba7e28e 100644
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 08f84e5db..0732a6f21 100644
index cdf3b6b6c..d4c8c4259 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1662,7 +1662,7 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -1,4 +1,4 @@
From 243fcddd45f4e024f50c7acc018b3a301adc32f8 Mon Sep 17 00:00:00 2001
From f57d861b40cb8509e25d88098722a762ef33cd4e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 29 Nov 2017 22:18:54 -0500
Subject: [PATCH] Avoid NPE in PathfinderGoalTempt

Datei anzeigen

@ -1,4 +1,4 @@
From 2dba4612c8b3b409d05595711229a0f3028ce56c Mon Sep 17 00:00:00 2001
From cfc2812c7616898fa461e2f2a0fc4bd5d6d62820 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 22:02:53 -0500
Subject: [PATCH] PlayerPickupExperienceEvent

Datei anzeigen

@ -1,4 +1,4 @@
From 680fd7bae23eb525705eed9a735fa3d6ff029e26 Mon Sep 17 00:00:00 2001
From 02fe091f278f2ee5d532ee4e130376c3c7eb6b1a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 22:57:26 -0500
Subject: [PATCH] ExperienceOrbMergeEvent
@ -8,7 +8,7 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
metadata such as spawn reason, or conditionally move data from source to target.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 87b2ad7960..db44e82a10 100644
index 1daf7b2c5..42d82034b 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -523,7 +523,7 @@ public class CraftEventFactory {

Datei anzeigen

@ -1,4 +1,4 @@
From 1dfbde3564fde9115630f366cd4e001b9e2450aa Mon Sep 17 00:00:00 2001
From 0f4e846e31f326ca9ff66a460b347eb9ff46a725 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Dec 2017 17:36:49 -0500
Subject: [PATCH] Ability to apply mending to XP API
@ -10,7 +10,7 @@ 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/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
index 6f64b8db3a..b6a40e22a8 100644
index 6f64b8db3..b6a40e22a 100644
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
@@ -241,6 +241,11 @@ public class EnchantmentManager {
@ -26,7 +26,7 @@ index 6f64b8db3a..b6a40e22a8 100644
public static Entry<EnumItemSlot, ItemStack> b(Enchantment enchantment, EntityLiving entityliving) {
Map<EnumItemSlot, ItemStack> map = enchantment.a(entityliving);
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 704a48c8ea..64d71a9a2a 100644
index 704a48c8e..64d71a9a2 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -251,10 +251,12 @@ public class EntityExperienceOrb extends Entity {
@ -43,10 +43,10 @@ index 704a48c8ea..64d71a9a2a 100644
return i * 2;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ec52987820..92d45ab7df 100644
index 0e0421a22..4fa554b29 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1054,8 +1054,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1053,8 +1053,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return GameMode.getByValue(getHandle().playerInteractManager.getGameMode().getId());
}

Datei anzeigen

@ -1,4 +1,4 @@
From 2a4121b6db835f78f36e5680d2a2c2bf76767766 Mon Sep 17 00:00:00 2001
From f89d9937f9523a2d3000d9907c854111ff866e25 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 11 Jan 2018 16:47:28 -0600
Subject: [PATCH] Make max squid spawn height configurable

Datei anzeigen

@ -1,4 +1,4 @@
From da358531a943040a325275a457afe2a94571e7b1 Mon Sep 17 00:00:00 2001
From 31553b6ff48f0728ccdab436857ba9ea9c9b0f29 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 14 Jan 2018 17:01:31 -0500
Subject: [PATCH] PreCreatureSpawnEvent
@ -15,7 +15,7 @@ instead and save a lot of server resources.
See: https://github.com/PaperMC/Paper/issues/917
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 9aed0d6b8..dce9e2fc1 100644
index 98eb0d24c..77d4bbce1 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -271,6 +271,7 @@ public class EntityTypes<T extends Entity> {
@ -27,7 +27,7 @@ index 9aed0d6b8..dce9e2fc1 100644
if (this.bg == null) {
MinecraftKey minecraftkey = IRegistry.ENTITY_TYPE.getKey(this);
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index d8ae336e9..bca0e3a2e 100644
index 93fad14d3..55764deec 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -103,6 +103,27 @@ public abstract class MobSpawnerAbstract {
@ -59,7 +59,7 @@ index d8ae336e9..bca0e3a2e 100644
Entity entity = EntityTypes.a(nbttagcompound, world, (entity1) -> {
entity1.setPositionRotation(d3, d4, d5, entity1.yaw, entity1.pitch);
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 7e58e4714..e5695c760 100644
index cbf05926a..14e2f3ca7 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -38,7 +38,7 @@ public final class SpawnerCreature {

Datei anzeigen

@ -1,4 +1,4 @@
From 19b85fdd78fce59a1e4c21342c6941a6c36df28c Mon Sep 17 00:00:00 2001
From 81395ec21ce58c65cc12709e50127c67098e5ee9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 14 Jan 2018 17:36:02 -0500
Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent
@ -9,10 +9,10 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 8e40027ac..e44570c60 100644
index a93117667..ae04198c9 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -675,12 +675,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -712,12 +712,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
int chunkRange = world.spigotConfig.mobSpawnRange;
chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
@ -22,7 +22,7 @@ index 8e40027ac..e44570c60 100644
+ //double blockRange = Math.pow(chunkRange << 4, 2); // Paper - use the range from the event
// Spigot end
return this.y.a(chunkcoordintpair.pair()).noneMatch((entityplayer) -> {
return this.playerMap.a(chunkcoordintpair.pair()).noneMatch((entityplayer) -> {
- return !entityplayer.isSpectator() && a(chunkcoordintpair, (Entity) entityplayer) < blockRange; // Spigot
+ // Paper start -
+ com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event

Datei anzeigen

@ -1,4 +1,4 @@
From b7edad7363c088065a78acc0b2aee22b51f0f413 Mon Sep 17 00:00:00 2001
From aaaac679239827b55e690edffe62cddc8f082a29 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 19 Jan 2018 00:36:25 -0500
Subject: [PATCH] Add setPlayerProfile API for Skulls
@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo
which commonly cause rate limit issues with Mojang API
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
index a4bc7f9701..2dd2f476f0 100644
index a4bc7f970..2dd2f476f 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
@@ -1,5 +1,7 @@
@ -48,7 +48,7 @@ index a4bc7f9701..2dd2f476f0 100644
public BlockFace getRotation() {
BlockData blockData = getBlockData();
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 0136e1bfe1..aee97b9f03 100644
index 0136e1bfe..aee97b9f0 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -3,6 +3,8 @@ package org.bukkit.craftbukkit.inventory;

Datei anzeigen

@ -1,4 +1,4 @@
From 175fd070689b73c0be2c7d7048120abf4c50719f Mon Sep 17 00:00:00 2001
From 42e6a4c1631ac80556542d00dfe1c3cb73c7ee52 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 2 Jan 2018 00:31:26 -0500
Subject: [PATCH] Fill Profile Property Events

Datei anzeigen

@ -1,11 +1,11 @@
From 9545982da8ce414d8e40563962799a070cdc2c27 Mon Sep 17 00:00:00 2001
From 17b2ad1e5cef6cf031fb86d740f03a5cb9e81e7e Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 19 Jan 2018 08:15:29 -0600
Subject: [PATCH] PlayerAdvancementCriterionGrantEvent
diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
index 71158ea8b..ddee2c030 100644
index f751c30cf..593979152 100644
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
@@ -276,6 +276,12 @@ public class AdvancementDataPlayer {

Datei anzeigen

@ -1,4 +1,4 @@
From 4b232cd90061c3234462a8fddd8c265d56269971 Mon Sep 17 00:00:00 2001
From c9383f72b378e02c8fb4dca1392f6a816dccf95f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 27 Jan 2018 17:04:14 -0500
Subject: [PATCH] Add ArmorStand Item Meta
@ -13,7 +13,7 @@ starting point for future additions in this area.
Fixes GH-559
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 929d73692a..df70c5c0ef 100644
index 929d73692..df70c5c0e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -194,6 +194,8 @@ public final class CraftItemFactory implements ItemFactory {
@ -26,7 +26,7 @@ index 929d73692a..df70c5c0ef 100644
case CHEST:
case TRAPPED_CHEST:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 00497350a3..88154d2f23 100644
index 00497350a..88154d2f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -395,6 +395,8 @@ public final class CraftItemStack extends ItemStack {
@ -40,7 +40,7 @@ index 00497350a3..88154d2f23 100644
case TRAPPED_CHEST:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
new file mode 100644
index 0000000000..c00b89c8d4
index 000000000..c00b89c8d
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
@@ -0,0 +1,311 @@
@ -356,7 +356,7 @@ index 0000000000..c00b89c8d4
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 0d513e1f33..159037fc3e 100644
index 0d513e1f3..159037fc3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -161,6 +161,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@ -385,7 +385,7 @@ index 0d513e1f33..159037fc3e 100644
}
return HANDLED_TAGS;
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index 6abde9030d..2a0852675b 100644
index 6abde9030..2a0852675 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -6,6 +6,7 @@ import java.util.ArrayList;

Datei anzeigen

@ -1,4 +1,4 @@
From c378827bab648bc642354104b0277b765275ce6f Mon Sep 17 00:00:00 2001
From 0cb9cc2517f0e2fe518b8650eb849be0dc9dd48b Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 11 Feb 2018 10:43:46 +0000
Subject: [PATCH] Extend Player Interact cancellation

Datei anzeigen

@ -1,4 +1,4 @@
From 44e7a3d44b8c47e34b6de9b4d71d0809f10dfaad Mon Sep 17 00:00:00 2001
From f828c35f29e7ea0af0e0cdb6c02f584860659519 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 24 Feb 2018 01:14:55 -0500
Subject: [PATCH] Tameable#getOwnerUniqueId API
@ -7,7 +7,7 @@ This is faster if all you need is the UUID, as .getOwner() will cause
an OfflinePlayer to be loaded from disk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
index 9952db3eb5..1aea5f3f05 100644
index 9952db3eb..1aea5f3f0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
@@ -90,6 +90,9 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
@ -21,7 +21,7 @@ index 9952db3eb5..1aea5f3f05 100644
return getHandle().getOwnerUUID();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
index 5dfa40dda1..407b95cafd 100644
index 5dfa40dda..407b95caf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
@@ -17,6 +17,9 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat

Datei anzeigen

@ -1,4 +1,4 @@
From 083c75803c43b7f597b8f1b1b25b6f762535b908 Mon Sep 17 00:00:00 2001
From ee8d66e3a254792907ff2ab982f77e14e7e8c52b Mon Sep 17 00:00:00 2001
From: MiniDigger <admin@minidigger.me>
Date: Sat, 10 Mar 2018 00:50:24 +0100
Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
@ -21,7 +21,7 @@ index c3e61bdfe..32bfe0e46 100644
private void allChunksAreSlimeChunks() {
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index a30d88af8..58e2601ef 100644
index b97e34163..14c44a360 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -981,6 +981,7 @@ public abstract class EntityHuman extends EntityLiving {

Datei anzeigen

@ -1,4 +1,4 @@
From 59a62d526fd2db7cfe0976fa63bc0e2be2cd90d9 Mon Sep 17 00:00:00 2001
From 268a73860e33fa98c54470ffb7de2ee3f16ed6f4 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 10 Mar 2018 13:03:49 +0000
Subject: [PATCH] Fix NPE when getting location from InventoryEnderChest opened

Datei anzeigen

@ -1,4 +1,4 @@
From 4e2293389a9c1d4a8a4b6b9f082c383a33282a9d Mon Sep 17 00:00:00 2001
From 8c39ac12cabf0929c69641e0d509b0427498b8f3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 10 Mar 2018 16:33:15 -0500
Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks

Datei anzeigen

@ -1,4 +1,4 @@
From 6038b08ae7ea24cae5b4453e5e2401f06fe3763f Mon Sep 17 00:00:00 2001
From 6ef4c09ca221c0a6d30e1f8b32e4ce28aa40c874 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 11 Mar 2018 14:13:33 -0400
Subject: [PATCH] Disable Explicit Network Manager Flushing

Datei anzeigen

@ -1,4 +1,4 @@
From c64067e1e031f2feea4e8405a734618792f6c54c Mon Sep 17 00:00:00 2001
From e05161408f34c060a08f1ff90a9bb628d5e1b52a Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Wed, 11 Oct 2017 15:56:26 +0200
Subject: [PATCH] Implement extended PaperServerListPingEvent
@ -6,7 +6,7 @@ Subject: [PATCH] Implement extended PaperServerListPingEvent
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java
new file mode 100644
index 0000000000..c1a8e295b6
index 000000000..c1a8e295b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java
@@ -0,0 +1,31 @@
@ -43,7 +43,7 @@ index 0000000000..c1a8e295b6
+}
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java
new file mode 100644
index 0000000000..a2a409e635
index 000000000..a2a409e63
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java
@@ -0,0 +1,11 @@
@ -60,7 +60,7 @@ index 0000000000..a2a409e635
+}
diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
new file mode 100644
index 0000000000..a85466bc7e
index 000000000..a85466bc7
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
@@ -0,0 +1,112 @@
@ -177,7 +177,7 @@ index 0000000000..a85466bc7e
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c84af46815..ffa850077f 100644
index 1290cff77..ea3d9e9af 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,6 +1,7 @@
@ -198,7 +198,7 @@ index c84af46815..ffa850077f 100644
for (int k = 0; k < agameprofile.length; ++k) {
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
index b247a18b9e..ba1c76c1a5 100644
index b247a18b9..ba1c76c1a 100644
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
@@ -32,6 +32,8 @@ public class PacketStatusListener implements PacketStatusInListener {
@ -221,7 +221,7 @@ index b247a18b9e..ba1c76c1a5 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
index aa125a52dc..ea52e89bd9 100644
index aa125a52d..ea52e89bd 100644
--- a/src/main/java/net/minecraft/server/ServerPing.java
+++ b/src/main/java/net/minecraft/server/ServerPing.java
@@ -29,6 +29,7 @@ public class ServerPing {
@ -246,7 +246,7 @@ index aa125a52dc..ea52e89bd9 100644
this.c = agameprofile;
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index bd601333ee..6c5430ff94 100644
index bd601333e..6c5430ff9 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -290,7 +290,7 @@ public class SpigotConfig

Datei anzeigen

@ -1,4 +1,4 @@
From c2ec98180b068515c689d86b4e3610f7d308d0c9 Mon Sep 17 00:00:00 2001
From 0b46b3e63b9c59ae3da52b9bd3ec7f456e3217b1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 16 Mar 2018 22:59:43 -0400
Subject: [PATCH] Improved Async Task Scheduler
@ -32,7 +32,7 @@ operations are decoupled from the sync tasks queue.
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java
new file mode 100644
index 0000000000..3c1992e212
index 000000000..3c1992e21
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java
@@ -0,0 +1,122 @@
@ -159,7 +159,7 @@ index 0000000000..3c1992e212
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index e102be583c..5db848de14 100644
index e102be583..5db848de1 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -62,7 +62,7 @@ public class CraftScheduler implements BukkitScheduler {

Datei anzeigen

@ -1,4 +1,4 @@
From 45679906356d36c89d2031de68f3fb5a3bfb84dc Mon Sep 17 00:00:00 2001
From e8b48e35704ac20d175d9fda1a7b1b65005bff05 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 18 Mar 2018 11:45:57 -0400
Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent

Datei anzeigen

@ -1,4 +1,4 @@
From fea19000fb2d1139365f782ba85605e09a573fb1 Mon Sep 17 00:00:00 2001
From 4ae489261829222b96472c09200385ca09733236 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 18 Mar 2018 12:29:48 -0400
Subject: [PATCH] Player.setPlayerProfile API
@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 58e2601eff..1df83d13ab 100644
index 14c44a360..23a2f92f2 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -65,7 +65,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -19,7 +19,7 @@ index 58e2601eff..1df83d13ab 100644
private final ItemCooldown bY;
@Nullable
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 7c3b9c0b97..d4d752ddb4 100644
index 7c3b9c0b9..d4d752ddb 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -37,7 +37,7 @@ public class LoginListener implements PacketLoginInListener {
@ -48,7 +48,7 @@ index 7c3b9c0b97..d4d752ddb4 100644
uniqueId = i.getId();
// Paper end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 92d45ab7df..b2b36dcec5 100644
index 4fa554b29..35cacb3d2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,6 +1,8 @@
@ -60,7 +60,7 @@ index 92d45ab7df..b2b36dcec5 100644
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding;
@@ -1194,8 +1196,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1193,8 +1195,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
hiddenPlayers.put(player.getUniqueId(), hidingPlugins);
// Remove this player from the hidden player's EntityTrackerEntry
@ -75,7 +75,7 @@ index 92d45ab7df..b2b36dcec5 100644
PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId());
if (entry != null) {
entry.clear(getHandle());
@@ -1236,8 +1243,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1235,8 +1242,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
hiddenPlayers.remove(player.getUniqueId());
@ -90,7 +90,7 @@ index 92d45ab7df..b2b36dcec5 100644
getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other));
@@ -1246,6 +1258,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1245,6 +1257,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entry.updatePlayer(getHandle());
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 143f42bf1e4874b298ea26da4915b9dad3cf405a Mon Sep 17 00:00:00 2001
From ad97f7eebebed0934e2101b38b6910ce8de3cebd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Mar 2018 20:52:07 -0400
Subject: [PATCH] Fix Dragon Server Crashes
@ -7,7 +7,7 @@ If the dragon tries to find "ground" and hits a hole, or off edge,
it will infinitely keep looking for non air and eventually crash.
diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
index cfe84f4d48..4ab310cd6b 100644
index cfe84f4d4..4ab310cd6 100644
--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
+++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
@@ -53,7 +53,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded

Datei anzeigen

@ -1,4 +1,4 @@
From 31148f6d3e9ada3c1c1a8d78fa006e1f0602dcd9 Mon Sep 17 00:00:00 2001
From 0478c931e23f3952dd48fe4be7f457f4373acb75 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 22 Mar 2018 01:40:24 -0400
Subject: [PATCH] getPlayerUniqueId API
@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0732a6f218..45710c0d2a 100644
index d4c8c4259..4fe8e198f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1355,6 +1355,26 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -1,4 +1,4 @@
From de737d42db59cb9f89d22478a16c859d63616196 Mon Sep 17 00:00:00 2001
From 006293719b6966549e326c55587dafd894d7dcbc Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Mon, 26 Mar 2018 18:30:53 +0300
Subject: [PATCH] Make player data saving configurable

Datei anzeigen

@ -1,4 +1,4 @@
From 9437cc71ca1b7e3b5ee6f2130b40da55b8cd4acc Mon Sep 17 00:00:00 2001
From a045575f71bd8967abbb2a007bc9d74b219169e4 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Wed, 11 Oct 2017 18:22:50 +0200
Subject: [PATCH] Make legacy ping handler more reliable
@ -28,7 +28,7 @@ respond to the request.
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
index c8c5df7f95..06aefcb638 100644
index c8c5df7f9..06aefcb63 100644
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
@@ -14,6 +14,7 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {

Datei anzeigen

@ -1,4 +1,4 @@
From f113177c3094f1768d178d118a98374fe96173c2 Mon Sep 17 00:00:00 2001
From 377398d718b3643d8a65138c4c5748b9a990d0b6 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Wed, 11 Oct 2017 19:30:51 +0200
Subject: [PATCH] Call PaperServerListPingEvent for legacy pings
@ -6,7 +6,7 @@ Subject: [PATCH] Call PaperServerListPingEvent for legacy pings
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java
new file mode 100644
index 0000000000..74c012fd40
index 000000000..74c012fd4
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java
@@ -0,0 +1,73 @@
@ -84,7 +84,7 @@ index 0000000000..74c012fd40
+
+}
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
index 06aefcb638..d0bb5496e4 100644
index 06aefcb63..d0bb5496e 100644
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
@@ -1,5 +1,7 @@

Datei anzeigen

@ -1,4 +1,4 @@
From 361acebcb325d29609c67b1a6198a0623133dc4d Mon Sep 17 00:00:00 2001
From bf12bbe1828f2b1cf3a259862df5c71675611bf7 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 31 Mar 2018 17:04:26 +0100
Subject: [PATCH] Flag to disable the channel limit
@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b2b36dcec5..23a205af1e 100644
index 35cacb3d2..be7c5d174 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -136,6 +136,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -20,7 +20,7 @@ index b2b36dcec5..23a205af1e 100644
// Paper end
public CraftPlayer(CraftServer server, EntityPlayer entity) {
@@ -1460,7 +1461,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1459,7 +1460,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void addChannel(String channel) {

Datei anzeigen

@ -1,11 +1,11 @@
From 140c69ba78c6f91daf7ec29260867f0df8bba17a Mon Sep 17 00:00:00 2001
From 0fbcf21ba6889ee6ed6dace874cc782b641d2682 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Sun, 1 Apr 2018 02:29:37 +0300
Subject: [PATCH] Add method to open already placed sign
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index ad76feb253..d0a019f50d 100644
index ad76feb25..d0a019f50 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -752,4 +752,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

Datei anzeigen

@ -1,11 +1,11 @@
From bd50777e0d7f271872ef38ba9257dafea208727e Mon Sep 17 00:00:00 2001
From ddeda45f212404065b346d694bffc2f37e76a769 Mon Sep 17 00:00:00 2001
From: Kyle Wood <demonwav@gmail.com>
Date: Thu, 1 Mar 2018 19:38:14 -0600
Subject: [PATCH] Load version history at server start
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index d9f1c22050..c2c676e3bb 100644
index d9f1c2205..c2c676e3b 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -172,6 +172,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer

Datei anzeigen

@ -1,4 +1,4 @@
From 51a904fe3f153f669da47a13d8fc78d4aa234314 Mon Sep 17 00:00:00 2001
From 41305423d682a6b9bbc04d7ad00cc8df619cc030 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sat, 14 Apr 2018 20:20:46 +0200
Subject: [PATCH] Configurable sprint interruption on attack
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable sprint interruption on attack
If the sprint interruption is disabled players continue sprinting when they attack entities.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 32bfe0e462..7024336c3a 100644
index 32bfe0e46..7024336c3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -354,4 +354,9 @@ public class PaperWorldConfig {
@ -20,7 +20,7 @@ index 32bfe0e462..7024336c3a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 1df83d13ab..27bf83f373 100644
index 23a2f92f2..58d2a28a4 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1030,7 +1030,11 @@ public abstract class EntityHuman extends EntityLiving {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen