3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-14 18:40:10 +01:00

Updated Upstream (Bukkit/CraftBukkit/Spigot) (#4728)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
30885166 Update to Minecraft 1.16.4

CraftBukkit Changes:
3af81c71 Update to Minecraft 1.16.4

Spigot Changes:
f011ca24 Update to Minecraft 1.16.4

Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
Dieser Commit ist enthalten in:
Daniel Ennis 2020-11-02 21:22:15 -05:00 committet von GitHub
Ursprung 4bcebab167
Commit e792da723a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
374 geänderte Dateien mit 996 neuen und 1041 gelöschten Zeilen

Datei anzeigen

@ -10,7 +10,7 @@
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-mojangapi</artifactId>
<version>1.16.3-R0.1-SNAPSHOT</version>
<version>1.16.4-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Paper-MojangAPI</name>

Datei anzeigen

@ -36,7 +36,7 @@ How To (Plugin Developers)
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.3-R0.1-SNAPSHOT</version>
<version>1.16.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index 0bae36cf16a4aa0a59824246db5634b6c0f6e55c..75483fe1abe6fa26f69cb437aefee4a9d51e078f 100644
index e096e95e4e21ce4e4b4b08301f3b5948242bf00d..db8ebc72f9ddfb33a3aa3d2e0366ef4f6f324567 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,34 +2,28 @@
@ -22,7 +22,7 @@ index 0bae36cf16a4aa0a59824246db5634b6c0f6e55c..75483fe1abe6fa26f69cb437aefee4a9
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.16.3-R0.1-SNAPSHOT</version>
<version>1.16.4-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 87c70ba546a908ebfd8d142cf9822d2667e9c2a1..b80d7b1c3d934d378b1fca58a9e12ac516350ea8 100644
index 185aa47591ddf92bece217a56078bd74777f749a..7d38039fcba45ee55f35c0291ad66a58ef99c392 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,15 +1,14 @@
@ -16,7 +16,7 @@ index 87c70ba546a908ebfd8d142cf9822d2667e9c2a1..b80d7b1c3d934d378b1fca58a9e12ac5
- <artifactId>spigot</artifactId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.16.3-R0.1-SNAPSHOT</version>
<version>1.16.4-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
+ <name>Paper</name>
@ -27,7 +27,7 @@ index 87c70ba546a908ebfd8d142cf9822d2667e9c2a1..b80d7b1c3d934d378b1fca58a9e12ac5
+ <!-- <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.16.3</minecraft.version>
<minecraft.version>1.16.4</minecraft.version>
@@ -19,21 +18,27 @@
</properties>
@ -196,18 +196,18 @@ index 87c70ba546a908ebfd8d142cf9822d2667e9c2a1..b80d7b1c3d934d378b1fca58a9e12ac5
<!-- 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/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 094431c4011824807f1aae54ebb4bc14c46ae53e..eaad50039181f3ae12175cdcfe5efd9c244da9dc 100644
index 8a8234199e36da33cb94fdf030f9fc75dc0add44..9c98589c2db92720b4ae054ee74ef7ab0dac891a 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -186,7 +186,7 @@ public class Main {
}
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
- Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
+ Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -21);
deadline.add(Calendar.DAY_OF_YEAR, -7);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0cefd5d3236fc59e698809acdc18f80..674096cab190d62622f9947853b056f57d43a2a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java

Datei anzeigen

@ -269,7 +269,7 @@ index 0000000000000000000000000000000000000000..b8868b86338ce0e89bc74eccccf714b9
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..68d3cb02dbfdc9d6f9d3682a2659c9430b50c490
index 0000000000000000000000000000000000000000..2d9b6439cff9e8907b55c8882b15e94abe625465
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +1,185 @@
@ -532,7 +532,7 @@ index 0000000000000000000000000000000000000000..a738657394bcccd859ef260a801736d4
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index f6335ed3eba55e939aa24b1eeb83026e61d92235..94b8cda9ce78aa22c14e88f3500bb9814ff7f631 100644
index 49cfd12dd8f68468d7a122f5420687c874cf3317..84407dfd46138359d42ddf8fd5c462a5f494d46b 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -273,15 +273,15 @@ public class ChunkProviderServer extends IChunkProvider {
@ -556,10 +556,10 @@ index f6335ed3eba55e939aa24b1eeb83026e61d92235..94b8cda9ce78aa22c14e88f3500bb981
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 87045e72d097a4eb006654ea41f58ac803bbab3e..468d0cce2208bc21ec3d62590ac6e050a2037518 100644
index bb06a7e3f3f9e4740cf6b874586e44f479d99cc4..d91b029c95b6380300db81e7c0fb172ff57958a1 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -145,6 +145,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -148,6 +148,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
@ -576,7 +576,7 @@ index 87045e72d097a4eb006654ea41f58ac803bbab3e..468d0cce2208bc21ec3d62590ac6e050
this.setPVP(dedicatedserverproperties.pvp);
this.setAllowFlight(dedicatedserverproperties.allowFlight);
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 5cecefc7e1c3b61c47563245fb1ffed16ec0851f..9ca142e2a841e686c5647de46f0f6992a431289e 100644
index d8a3851b47f8d3ff74869a50838b31c34156689a..c6bd37ac10aaf401dc4e48a11782a528eab28b85 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
@ -599,10 +599,10 @@ index 5cecefc7e1c3b61c47563245fb1ffed16ec0851f..9ca142e2a841e686c5647de46f0f6992
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 4da97dbcf95b1e782ef80956c5d128972b2c3ed5..059b9634aeffc6f710d40112f5f8d9b877f2c7a3 100644
index 6d1012cc652780189a5d849125abe09b27b88422..49649e70ee8bfb3dacd63a88a180f0f329f308c0 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -65,6 +65,12 @@ public class Main {
@@ -64,6 +64,12 @@ public class Main {
DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(iregistrycustom_dimension, optionset); // CraftBukkit - CLI argument support
dedicatedserversettings.save();
@ -615,7 +615,7 @@ index 4da97dbcf95b1e782ef80956c5d128972b2c3ed5..059b9634aeffc6f710d40112f5f8d9b8
java.nio.file.Path java_nio_file_path1 = Paths.get("eula.txt");
EULA eula = new EULA(java_nio_file_path1);
@@ -206,6 +212,16 @@ public class Main {
@@ -205,6 +211,16 @@ public class Main {
}
@ -633,7 +633,7 @@ index 4da97dbcf95b1e782ef80956c5d128972b2c3ed5..059b9634aeffc6f710d40112f5f8d9b8
Main.LOGGER.info("Forcing world upgrade! {}", convertable_conversionsession.getLevelName()); // CraftBukkit
WorldUpgrader worldupgrader = new WorldUpgrader(convertable_conversionsession, datafixer, immutableset, flag);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 62134fdbdbdc044001940d069622ccce9bdfbee2..3150f4a0a8f1f8256c7e296f479b632b47bc6620 100644
index 169822482d3e31ef4f625a82102adc6d478588a8..faa7e6b747b4a8f1b4c7d9f8da28ce29984b5f20 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -77,6 +77,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

Datei anzeigen

@ -182,7 +182,7 @@ index 96d6c55c9a2fbb9f93d369eadaacf00b7e64b79e..e77634bb4d33716ed41468722187080a
private EntityEnderDragon o() {
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
index ada618efe6cef7cf97959337d2cbb039c176f99c..a959006185afaa3306fdd228f52d8177b58286a7 100644
index a3c885b070336295cc059a8c525848c8405ef89f..b358070215477bcd33dcd440472db4489017135a 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 {
@ -218,7 +218,7 @@ index 1de8c7eaeb08c645058dbe1da7ca8ef91958abda..32f5470baa88c3dc80db1bb547e1c982
});
this.b = Lists.newArrayList();
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 447f6a55b619402447b5cf4db9b22ea8cfc7d51d..1890c760f9ffd7628d6ae3db40c36f5272379227 100644
index eeb45fb34b1a989f850049bf4fd59d585c79ab6d..ac2f4354e8c442a20b842f315a76a3abdcfec4dc 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -55,7 +55,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@ -328,7 +328,7 @@ index 88f1f201240ef0479c4f0f93f4caca454bbe7e9e..d63a4e4916ed5f5d901be0f4dd2c13cf
this.b = s;
}
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
index ea72fd57be88542d54a9660a3a5de57d969938f5..797249069b0b2adf91b4e69497752eed7116f02a 100644
index 931959013cf017ce622fb9f8516c5bf604eb8a69..f433e1f6e6d430bd35a0fb54ee85295ea06f53bd 100644
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
@@ -158,22 +158,22 @@ public interface IEntityAccess {
@ -485,10 +485,10 @@ index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d55
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index db11a3eec10ff837dde5b535da33ab2df22a477d..952f7b345f4a50ead76706765b5f95a743dbbea4 100644
index 4c2e924f16117cd5ed29fd9ae9adf5a5dbb9aebf..f3e2d387d5ce3c4b8d0341a8267979983d1a9091 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1549,9 +1549,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1555,9 +1555,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
ResourcePackRepository resourcepackrepository = this.resourcePackRepository;
this.resourcePackRepository.getClass();
@ -634,7 +634,7 @@ index e11deed00abc10d1a9490234830803649209dfb4..5078a5ce391b445b64b2a16b123a3e3d
this.f = 0;
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
index 809c0b3d10aa8fdbff8ff779ac2a9c770b218353..3c3b87e37cbf69c223da007e8b7eb646ec83691e 100644
index b9def4d603f469aa2db8c9399b5634a313aa7e44..6ee2f5ba23d573414e31ed2be228adf87e5bf46a 100644
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
@@ -191,7 +191,7 @@ public class ServerStatisticManager extends StatisticManager {
@ -711,7 +711,7 @@ index 7b17c95ff7b529a62be60e9599149a7880d60ac5..5f3a960b3303c48b039630b39975d6ef
if (throwable != null) {
completablefuture.completeExceptionally(throwable);
diff --git a/src/main/java/net/minecraft/server/ThreadedMailbox.java b/src/main/java/net/minecraft/server/ThreadedMailbox.java
index 1c9772e67f9bf5585726152d6e48d19d58f96cac..ebb9737995e0f738700d598af46a63f605f2b165 100644
index 1b2aa8f74a424c0d313de7d71e691d5c2a963b0b..b7af235dc2841dc9c8296805624f6ee763b86dfb 100644
--- a/src/main/java/net/minecraft/server/ThreadedMailbox.java
+++ b/src/main/java/net/minecraft/server/ThreadedMailbox.java
@@ -99,7 +99,7 @@ public class ThreadedMailbox<T> implements Mailbox<T>, AutoCloseable, Runnable {
@ -847,3 +847,16 @@ index 83d799bec90693e0fbbf8a7f3bc4f569b5c0ead9..141a8e31151010e5a0bd8d4661033f10
NBTTagCompound nbttagcompound = this.a(s, SharedConstants.getGameVersion().getWorldVersion());
t0.a(nbttagcompound.getCompound("data"));
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 889dd0ca3eaeaf4d9843637e3a08d5eb9773f942..2a2e812d7a72077dc3b66ab4b5c6a00664c54287 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1796,7 +1796,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
// CraftBukkit - decompile error
- return (String) object2intopenhashmap.object2IntEntrySet().stream().sorted(Comparator.comparing(it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<MinecraftKey>::getIntValue).reversed()).limit(5L).map((it_unimi_dsi_fastutil_objects_object2intmap_entry) -> {
+ return (String) object2intopenhashmap.object2IntEntrySet().stream().sorted(Comparator.comparing(Object2IntMap.Entry<MinecraftKey>::getIntValue).reversed()).limit(5L).map((it_unimi_dsi_fastutil_objects_object2intmap_entry) -> { // Paper - decompile fix
return it_unimi_dsi_fastutil_objects_object2intmap_entry.getKey() + ":" + it_unimi_dsi_fastutil_objects_object2intmap_entry.getIntValue();
}).collect(Collectors.joining(","));
} catch (Exception exception) {

Datei anzeigen

@ -2351,7 +2351,7 @@ index eff6ebcd30b538cbaedaa031a46a59ea956253ba..30cbfc8eac20910aa55951e3dce63862
public IBlockData getType(BlockPosition blockposition) {
return Blocks.AIR.getBlockData();
diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java
index 54de105a79cf199db8d97cab67ad8affe904d57c..2d3e498d5c40e573aad88fd0fce7943e930956ba 100644
index f28b9c093140a26564aff0457e7ef14abcf5f9d5..e0ae51ede44de5c894df526c1fc6d94c46d72013 100644
--- a/src/main/java/net/minecraft/server/BlockBase.java
+++ b/src/main/java/net/minecraft/server/BlockBase.java
@@ -636,6 +636,7 @@ public abstract class BlockBase {
@ -2745,7 +2745,7 @@ index ae61d0a7676bf06c8c9aa5c68ccb8dd4baf326b6..b12e43ed13a1a9d7d418831b8988c30a
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 94b8cda9ce78aa22c14e88f3500bb9814ff7f631..1ca6d656cd2c7bbf12df6368ad7d953765d03e36 100644
index 84407dfd46138359d42ddf8fd5c462a5f494d46b..6f3a0754ac2c1cbe4a4b8775a2cf9248524a1831 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -17,6 +17,10 @@ import java.util.function.Consumer;
@ -3097,7 +3097,7 @@ index 390d79187bc822187d1ba1102c418fa588e8f121..68f1a101174f4a2f7ab5556a5b733f75
super(entitytypes, world);
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index b5a8b6bf8f86b99e50014cd155d50099a3f7a91c..abafe6d3ee2f2662f0c2b62cc697606b3d7b47e0 100644
index 1e7f5d77700a1ed98c5f50ea82fb57b5e556496a..09ac187ba8ff52f6fa1f0d5d00a138518bacb50a 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -160,6 +160,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -3109,7 +3109,7 @@ index b5a8b6bf8f86b99e50014cd155d50099a3f7a91c..abafe6d3ee2f2662f0c2b62cc697606b
// 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 fbd863d1bd90eebc517ea45b17ec650fd3ea2ec6..2e9f8d55ea85615f1b61efef89ccc822df6a0cfb 100644
index b1edfd6f33a6eecbe47a2a2a4f5be844400eb283..fea94330301a7859cd7ab9af7a9cd3f6d2d8e79a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -138,6 +138,7 @@ public abstract class EntityLiving extends Entity {
@ -3121,7 +3121,7 @@ index fbd863d1bd90eebc517ea45b17ec650fd3ea2ec6..2e9f8d55ea85615f1b61efef89ccc822
@Override
public float getBukkitYaw() {
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index 07c48d777a71a979fb1f0063eef2e613e448d2eb..8a5d6869c269369d45cfe4e61853c44220885313 100644
index efba3b772238cabd5981978bee5d7dc76115f93f..74426693c47b6437a4597ddd1b961aae79d7a866 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -5,6 +5,7 @@ import java.util.function.Predicate;
@ -3133,10 +3133,10 @@ index 07c48d777a71a979fb1f0063eef2e613e448d2eb..8a5d6869c269369d45cfe4e61853c442
super(entitytypes, world);
this.f = 5;
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 8fc44b87ba16f6d25471c26310702c5b4651989a..2b86d99420b59d67b1afec45d9a02003613d40a6 100644
index 92198cd819359d2a93da0151b0f0012a51075337..7036a7556c5f859308540ec2f5643e40634c166e 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -93,6 +93,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -95,6 +95,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public Integer clientViewDistance;
// CraftBukkit end
@ -3145,9 +3145,9 @@ index 8fc44b87ba16f6d25471c26310702c5b4651989a..2b86d99420b59d67b1afec45d9a02003
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
super(worldserver, worldserver.getSpawn(), worldserver.v(), gameprofile);
this.spawnDimension = World.OVERWORLD;
@@ -104,6 +106,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.G = 1.0F;
@@ -107,6 +109,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.c(worldserver);
this.co = minecraftserver.a(this);
+ this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
+
@ -3155,7 +3155,7 @@ index 8fc44b87ba16f6d25471c26310702c5b4651989a..2b86d99420b59d67b1afec45d9a02003
this.displayName = this.getName();
this.canPickUpLoot = true;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 9ca142e2a841e686c5647de46f0f6992a431289e..e08ccba8134846ef11928183d118a6cce53b6d89 100644
index c6bd37ac10aaf401dc4e48a11782a528eab28b85..83593ff0549b770e3af148ad0105f22351e39d45 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -3,6 +3,7 @@ package net.minecraft.server;
@ -3178,7 +3178,7 @@ index 9ca142e2a841e686c5647de46f0f6992a431289e..e08ccba8134846ef11928183d118a6cc
}
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 1890c760f9ffd7628d6ae3db40c36f5272379227..46959b58bac01b5ff7e3eb4cbac07ddf6bfc4ebc 100644
index ac2f4354e8c442a20b842f315a76a3abdcfec4dc..f97fb0434e80478d514a718a1e7376fd2717037d 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -68,6 +68,15 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@ -3198,7 +3198,7 @@ index 1890c760f9ffd7628d6ae3db40c36f5272379227..46959b58bac01b5ff7e3eb4cbac07ddf
this.d.add(r0);
LockSupport.unpark(this.getThread());
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
index 29cec3e7aad70c67bfefa223bad8ec607ecb2a55..a168218c6f41bb798557461a80efb785eea99b25 100644
index cff2d0f0560fb744473d0baa4e4d6928d6559108..93946d15c08fa71c63273f6b4e096bb8b4448394 100644
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
@@ -12,6 +12,19 @@ public interface IBlockAccess {
@ -3810,7 +3810,7 @@ index 0000000000000000000000000000000000000000..17d73ebbe51a83f79f338bdb1b366cec
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 952f7b345f4a50ead76706765b5f95a743dbbea4..4e8d26b7e427e36dab6335855e3922865ab589cc 100644
index f3e2d387d5ce3c4b8d0341a8267979983d1a9091..ea02761ecd3e5b7b0ea31c220abdff918508cc94 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -764,6 +764,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -3852,7 +3852,7 @@ index ef2dee1987c45a2c43188584169dd260ee80826c..c16ff6723d3fd191b990002d40dc021d
return GameProfileSerializer.a(this.get(s));
}
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index b6902ede8ca184851fdb30ff4c86549a4743bd09..5a0129d007459fbb868784f53585fd26f495358c 100644
index cd17ad99cd1aa7c474566151025991e3f605f734..6034f0cf5a22adb8441226cd54c519e41c198f6f 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -158,6 +158,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -4225,10 +4225,10 @@ index 43168f3836eb8823f3b2046882664ba45f1be678..127c03c321e1414e0d174c8d81a7851c
@Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 46d33c6f548f1cf0b863e2e67d46aa5e905103f3..c455d0b2dc806d7c26235e6c89c58311548177ec 100644
index 6e374f85129d0ef873c7561e776a6f227a42e33a..3dff395d4e1dc3907f9cf1d35cbc4e7b5bbd8652 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 {
@@ -73,9 +73,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
private final MinecraftServer minecraftServer;
public EntityPlayer player;
private int e;
@ -4302,10 +4302,10 @@ index 49387e812a50b8cda45352cf9dd6b1692b7476c1..135f38cc5d5d2fa3866aa1063df49a96
public synchronized DataInputStream a(ChunkCoordIntPair chunkcoordintpair) throws IOException {
int i = this.getOffset(chunkcoordintpair);
diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
index e804c09cc89c21351c9241f426122e28e5d08452..e9fbeaf309735ea5fcb0c53b8b2485b0c5dd43be 100644
index adc9959932a99ff62af4f893d0f8af1130579138..34a72ba218892de337752af896fd307f91d9fc95 100644
--- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
+++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
@@ -102,6 +102,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccessSeed {
@@ -104,6 +104,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccessSeed {
return i >= this.n.x && i <= this.o.x && j >= this.n.z && j <= this.o.z;
}
@ -4387,7 +4387,7 @@ index ff41038ce6d2c1a8093bce3539070fa0ccfd61c2..ed0f9c5d29c4f88b7beee4b0ecdd7a56
return VoxelShapes.b;
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3150f4a0a8f1f8256c7e296f479b632b47bc6620..4059aaf6da1bfe6003e2d94ce33e32eb1aaa93c9 100644
index faa7e6b747b4a8f1b4c7d9f8da28ce29984b5f20..43f49a2a7f62227f35c309d4d63088a6e013481b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -22,6 +22,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
@ -4496,18 +4496,18 @@ index 5719ef9714e9680596a08c42c33508c16c0e676a..bb0f30f182856d2701fde9b1a65eeb98
return this.j.m();
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 282f4c006a3b203d3a62530c34b43259eaca55ea..4947a0aaab2dd91f3184365e64c4ad4e05132283 100644
index 2a2e812d7a72077dc3b66ab4b5c6a00664c54287..544186bbd32ddd1b209ec344a77dfa00ff70aea6 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -11,6 +11,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry;
@@ -12,6 +12,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry;
import it.unimi.dsi.fastutil.longs.LongSet;
import it.unimi.dsi.fastutil.longs.LongSets;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
+import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
import java.io.BufferedWriter;
@@ -56,7 +57,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -60,7 +61,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
private final Queue<Entity> entitiesToAdd = Queues.newArrayDeque();
private final List<EntityPlayer> players = Lists.newArrayList();
@ -4516,7 +4516,7 @@ index 282f4c006a3b203d3a62530c34b43259eaca55ea..4947a0aaab2dd91f3184365e64c4ad4e
boolean tickingEntities;
private final MinecraftServer server;
public final WorldDataServer worldDataServer; // CraftBukkit - type
@@ -1561,7 +1562,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1565,7 +1566,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
ObjectIterator objectiterator = spawnercreature_d.b().object2IntEntrySet().iterator();
while (objectiterator.hasNext()) {

Datei anzeigen

@ -755,7 +755,7 @@ index 18e18e6cabe94a23ebfc9f9d8279837105f1d976..30d760ab30ed70ec2e4c37f2e8dbe800
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 1ca6d656cd2c7bbf12df6368ad7d953765d03e36..042031d2b7cb2f56d422145ffa7589fa46dd2e53 100644
index 6f3a0754ac2c1cbe4a4b8775a2cf9248524a1831..1daf3bea2cc488276b33e624e1591a71af1459d9 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -323,11 +323,13 @@ public class ChunkProviderServer extends IChunkProvider {
@ -846,7 +846,7 @@ index 1ca6d656cd2c7bbf12df6368ad7d953765d03e36..042031d2b7cb2f56d422145ffa7589fa
private void a(long i, Consumer<Chunk> consumer) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 7d9161b9e3996098d0f257661e39036e82d3f88a..52621ab74c8af1ab0c38e8df28cb7dc7153096a3 100644
index bd47979e11d900b5b31c995751dfefbf0a2706b9..d30c4d5a4ee83e21ba9269c0b92af2b72b85d3cc 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -1,5 +1,6 @@
@ -923,7 +923,7 @@ index 11891990d90b789192d9081787c1e844646121ae..2a48d85f0490991eb323ef550cb6148d
int k = 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 468d0cce2208bc21ec3d62590ac6e050a2037518..b5d1dbf889138699c877f13382557ce377e70e72 100644
index d91b029c95b6380300db81e7c0fb172ff57958a1..218071260dec39dd4f7eb733ae6f832aacd6fd6f 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -26,8 +26,9 @@ import org.apache.logging.log4j.Logger;
@ -937,7 +937,7 @@ index 468d0cce2208bc21ec3d62590ac6e050a2037518..b5d1dbf889138699c877f13382557ce3
import org.bukkit.event.server.RemoteServerCommandEvent;
// CraftBukkit end
@@ -376,7 +377,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -382,7 +383,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public void handleCommandQueue() {
@ -946,7 +946,7 @@ index 468d0cce2208bc21ec3d62590ac6e050a2037518..b5d1dbf889138699c877f13382557ce3
while (!this.serverCommandQueue.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
@@ -391,7 +392,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -397,7 +398,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
// CraftBukkit end
}
@ -955,7 +955,7 @@ index 468d0cce2208bc21ec3d62590ac6e050a2037518..b5d1dbf889138699c877f13382557ce3
}
@Override
@@ -627,6 +628,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -633,6 +634,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@Override
public String executeRemoteCommand(String s) {
@ -963,7 +963,7 @@ index 468d0cce2208bc21ec3d62590ac6e050a2037518..b5d1dbf889138699c877f13382557ce3
this.remoteControlCommandListener.clearMessages();
this.executeSync(() -> {
// CraftBukkit start - fire RemoteServerCommandEvent
@@ -635,10 +637,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -641,10 +643,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
if (event.isCancelled()) {
return;
}
@ -1004,7 +1004,7 @@ index 468d0cce2208bc21ec3d62590ac6e050a2037518..b5d1dbf889138699c877f13382557ce3
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index cd7866f2251f68f24801eacc55800907f184537f..74277d79a845fb0a44298f42d626148616cb5a1d 100644
index 5e0db989a0f6c7c7041a968550f4068b9a946136..a6534087b10c9a469a3d2cf4da717fab17b31544 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -31,7 +31,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
@ -1038,9 +1038,9 @@ index cd7866f2251f68f24801eacc55800907f184537f..74277d79a845fb0a44298f42d6261486
- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
}
protected BlockPosition ao() {
protected BlockPosition ap() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 2e9f8d55ea85615f1b61efef89ccc822df6a0cfb..083578259d0c428fb9439fcbb4b53ac59e9c390d 100644
index fea94330301a7859cd7ab9af7a9cd3f6d2d8e79a..c3aca7ebf5aae1c0582a0683920a4b82fa98a43f 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -42,7 +42,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -1115,10 +1115,10 @@ index 2e9f8d55ea85615f1b61efef89ccc822df6a0cfb..083578259d0c428fb9439fcbb4b53ac5
this.collideNearby();
- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
this.world.getMethodProfiler().exit();
if (!this.world.isClientSide && this.dN() && this.aF()) {
if (!this.world.isClientSide && this.dO() && this.aG()) {
this.damageEntity(DamageSource.DROWN, 1.0F);
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index ffb8685e7c457483bcf4b2ed1065fec0fbaa69e2..add85654783e9c3cebf2a2072cd2e07679de1bae 100644
index 9fad0c005ada01fdff97c791c769978ae5d56920..ebffa433a4df6e573db76d95762a169d02658d72 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -151,7 +151,9 @@ public class EntityTypes<T extends Entity> {
@ -1170,7 +1170,7 @@ index ffb8685e7c457483bcf4b2ed1065fec0fbaa69e2..add85654783e9c3cebf2a2072cd2e076
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4e8d26b7e427e36dab6335855e3922865ab589cc..033633139b50f1d991ee6b18b8fb750225b52f34 100644
index ea02761ecd3e5b7b0ea31c220abdff918508cc94..dfa45dff4d040f9e1d2708e4a2407b3790435a77 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -65,7 +65,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -1459,10 +1459,10 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
protected void broadcast(Entity entity, Packet<?> packet) {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c455d0b2dc806d7c26235e6c89c58311548177ec..fd1860e3a83dec60362997ac6e1225270260cf38 100644
index 3dff395d4e1dc3907f9cf1d35cbc4e7b5bbd8652..20651905fd6566e856aeb7340469047b7eb8c2c8 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;
@@ -64,6 +64,7 @@ import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.InventoryView;
import org.bukkit.util.NumberConversions;
@ -1470,7 +1470,7 @@ index c455d0b2dc806d7c26235e6c89c58311548177ec..fd1860e3a83dec60362997ac6e122527
// CraftBukkit end
public class PlayerConnection implements PacketListenerPlayIn {
@@ -135,7 +136,6 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -146,7 +147,6 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit end
public void tick() {
@ -1478,7 +1478,7 @@ index c455d0b2dc806d7c26235e6c89c58311548177ec..fd1860e3a83dec60362997ac6e122527
this.syncPosition();
this.player.lastX = this.player.locX();
this.player.lastY = this.player.locY();
@@ -211,7 +211,6 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -222,7 +222,6 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
this.disconnect(new ChatMessage("multiplayer.disconnect.idling"));
}
@ -1486,7 +1486,7 @@ index c455d0b2dc806d7c26235e6c89c58311548177ec..fd1860e3a83dec60362997ac6e122527
}
@@ -1678,7 +1677,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1767,7 +1766,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit end
private void handleCommand(String s) {
@ -1495,7 +1495,7 @@ index c455d0b2dc806d7c26235e6c89c58311548177ec..fd1860e3a83dec60362997ac6e122527
// CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1689,7 +1688,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1778,7 +1777,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -1504,7 +1504,7 @@ index c455d0b2dc806d7c26235e6c89c58311548177ec..fd1860e3a83dec60362997ac6e122527
return;
}
@@ -1702,7 +1701,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1791,7 +1790,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
@ -1614,7 +1614,7 @@ index e8ff43662b8397229cb19ea26342b66c88807379..3b8f56c0f0507ebdd9ac20be70688b4c
this.g.clear();
this.f.clear();
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 67fdd560f8136d83a13f75e265d5f5dd11871375..8f51a1e5e37566001e1d419065ce730768c1b342 100644
index b9ffd000c97111678d45fd55dc9c207ebadc140e..f1d0e2faffb3ef27f5a41d06d0ff7d787f1098f5 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
@ -1633,7 +1633,7 @@ index 67fdd560f8136d83a13f75e265d5f5dd11871375..8f51a1e5e37566001e1d419065ce7307
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public CraftPersistentDataContainer persistentDataContainer;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 4059aaf6da1bfe6003e2d94ce33e32eb1aaa93c9..07ba51a801d803109dd92f77c19b389eb24f61b2 100644
index 43f49a2a7f62227f35c309d4d63088a6e013481b..8703a001c9d2bf114b140a94f20e0cf7e57361f9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger;
@ -1680,7 +1680,7 @@ index 4059aaf6da1bfe6003e2d94ce33e32eb1aaa93c9..07ba51a801d803109dd92f77c19b389e
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af72006fff3 100644
index 544186bbd32ddd1b209ec344a77dfa00ff70aea6..11497c73f40b0c681585cf6efca99a63eeb62e76 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -2,6 +2,8 @@ package net.minecraft.server;
@ -1692,7 +1692,7 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Queues;
@@ -40,7 +42,6 @@ import org.apache.logging.log4j.Logger;
@@ -44,7 +46,6 @@ import org.apache.logging.log4j.Logger;
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.WeatherType;
@ -1700,7 +1700,7 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.craftbukkit.util.WorldUUID;
import org.bukkit.event.entity.CreatureSpawnEvent;
@@ -96,10 +97,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -100,10 +101,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit end
this.nextTickListBlock = new TickListServer<>(this, (block) -> {
return block == null || block.getBlockData().isAir();
@ -1713,8 +1713,8 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
this.navigators = Sets.newHashSet();
this.L = new ObjectLinkedOpenHashSet();
this.Q = flag1;
@@ -327,17 +328,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.P();
@@ -331,17 +332,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.Q();
this.b();
gameprofilerfiller.exitEnter("chunkSource");
+ this.timings.chunkProviderTick.startTiming(); // Paper - timings
@ -1736,8 +1736,8 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
+ this.timings.raids.stopTiming(); // Paper - timings
gameprofilerfiller.exitEnter("blockEvents");
timings.doSounds.startTiming(); // Spigot
this.aj();
@@ -509,6 +514,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.ak();
@@ -513,6 +518,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
gameprofilerfiller.exitEnter("tickBlocks");
@ -1745,7 +1745,7 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
if (i > 0) {
ChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length;
@@ -540,7 +546,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -544,7 +550,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
}
}
@ -1754,7 +1754,7 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
gameprofilerfiller.exit();
}
@@ -638,14 +644,22 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -642,14 +648,22 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (!(entity instanceof EntityHuman) && !this.getChunkProvider().a(entity)) {
this.chunkCheck(entity);
} else {
@ -1778,7 +1778,7 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
entity.g(entity.locX(), entity.locY(), entity.locZ());
entity.lastYaw = entity.yaw;
entity.lastPitch = entity.pitch;
@@ -672,7 +686,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -676,7 +690,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.a(entity, entity1);
}
}
@ -1787,7 +1787,7 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
}
}
@@ -749,6 +763,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -753,6 +767,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (!flag1) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1795,7 +1795,7 @@ index 4947a0aaab2dd91f3184365e64c4ad4e05132283..a807933d65a22dc1b15eda4dee819af7
if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel"));
}
@@ -758,7 +773,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -762,7 +777,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
iprogressupdate.c(new ChatMessage("menu.savingChunks"));
}
@ -2204,7 +2204,7 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae
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 983444d7b742c1f7c5f08f26808dd484f90d6c20..bfecee2c9e4c68d5e254b445b3100247322017fc 100644
index 1e138a569fc785eb69b3f3935dcf97f4dcb08051..4075553d0abe19442903add9854f61cd657ab0ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -158,6 +158,12 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -31,19 +31,19 @@ index 2e869004c8c6b8bfbb002fb4eda04519d50390c8..22eb89df768819f0a18f91b806b56ace
this.b.setJumping(this.a);
this.a = false;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 74277d79a845fb0a44298f42d626148616cb5a1d..f44048171d70f183f0bbdfb835211fba6da73cb4 100644
index a6534087b10c9a469a3d2cf4da717fab17b31544..bbb66e90aba2332c7c87a173639efc6ad61f5d53 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1020,6 +1020,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.isInWater() || this.isInRain();
}
+ public final boolean isInWaterOrRainOrBubble() { return aF(); } // Paper - OBFHELPER
public boolean aF() {
+ public final boolean isInWaterOrRainOrBubble() { return aG(); } // Paper - OBFHELPER
public boolean aG() {
return this.isInWater() || this.isInRain() || this.k();
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index abafe6d3ee2f2662f0c2b62cc697606b3d7b47e0..5df3ca8c0a272392cec2cf10b15494f9f63d171c 100644
index 09ac187ba8ff52f6fa1f0d5d00a138518bacb50a..59af58e1aed678b8eac83f2346f5822aff700fb7 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -33,6 +33,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -74,7 +74,7 @@ index abafe6d3ee2f2662f0c2b62cc697606b3d7b47e0..5df3ca8c0a272392cec2cf10b15494f9
this.bo.a();
this.world.getMethodProfiler().exit();
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
index 8e41e7a159a9eabd955c5110c6c2458f5348f2f9..cb633bec6e977ba0af388d3c9b005a2dcb91bb87 100644
index fd861cbc007c164f9a18ebfe7e4d0e4fe01db54c..8030376804823264bb5a701c1304414ac932af9c 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
@@ -8,15 +8,18 @@ public class PathfinderGoalFloat extends PathfinderGoal {
@ -89,7 +89,7 @@ index 8e41e7a159a9eabd955c5110c6c2458f5348f2f9..cb633bec6e977ba0af388d3c9b005a2d
+ public final boolean validConditions() { return this.a(); } // Paper - OBFHELPER
@Override
public boolean a() {
return this.a.isInWater() && this.a.b((Tag) TagsFluid.WATER) > this.a.cw() || this.a.aP();
return this.a.isInWater() && this.a.b((Tag) TagsFluid.WATER) > this.a.cx() || this.a.aQ();
}
+ public void update() { this.e(); } // Paper - OBFHELPER

Datei anzeigen

@ -19,7 +19,7 @@ index aab33df7a36eb69300fedfce733985d6c239ca01..550232cb3819138b3bae0fa1c5142948
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 033633139b50f1d991ee6b18b8fb750225b52f34..f2b3df4319a3b0348bc5185d841abf7c0e21d425 100644
index dfa45dff4d040f9e1d2708e4a2407b3790435a77..5ff34f389b327ef630258581d0e273f9e0fe4e5b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1222,7 +1222,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -45,11 +45,11 @@ index 90551257c299aaf694eb4f4063d5b1b3eee94876..ac177cd391e220af7584463e35f1f11e
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 112a6d3ebe2f0b57f4e3c09d4ec342123af5f550..2dfba120cd81eb6b217decccb7bb218bb3f6a82e 100644
index f187c7d127c356861c30141efeafcef0057878ec..061a3bc88fcce6877bc976d3b7989dea22b0a120 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -200,12 +200,25 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -21);
deadline.add(Calendar.DAY_OF_YEAR, -7);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");

Datei anzeigen

@ -192,10 +192,10 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
+ }
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 5f49ab337ffb02b2d77f1722a30821564f86657a..aade5e291b80c5362c8fd8cf09faca8e631e0554 100644
index 218071260dec39dd4f7eb733ae6f832aacd6fd6f..7b52bf335e60a700b4c4e25cab1b0261f32775bc 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -154,6 +154,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -157,6 +157,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return false;
}
com.destroystokyo.paper.PaperConfig.registerCommands();

Datei anzeigen

@ -5,7 +5,7 @@ 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 39ee76225bcb6b44050d41bc5da1dbc63cab1220..2d421709d9155d8112b779a077f959c60fe9dba7 100644
index a54c0b9c7c0de7c74813717e690cc9aa6cc32b67..26ad7e7d44dc1195f7ab948d2b42bf629c2702a7 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -162,6 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -51,7 +51,7 @@ index 39ee76225bcb6b44050d41bc5da1dbc63cab1220..2d421709d9155d8112b779a077f959c6
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 fbb795ac767fee6d88cfa9f7f17c6a1f89bbbf2d..f7cd0fadc8aadc5c3b1655ee70e81a2a3e848b8c 100644
index 6b226c04d40adff8b0f1d28c0cc79439df002b3d..bdeabfaeb17778a12ab4ad72689a72b043efcff4 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -254,6 +254,14 @@ public class EntityFallingBlock extends Entity {
@ -70,7 +70,7 @@ index fbb795ac767fee6d88cfa9f7f17c6a1f89bbbf2d..f7cd0fadc8aadc5c3b1655ee70e81a2a
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 71404a34d27dd7771ea1145085a6a6e4dc7589b0..623db6e3befcc7031e68c71f7eb179fce78291c4 100644
index 2b8ed9d14bd6dd9330712741859eb77ba0194153..e25404fd89ad6317c2656c68c2e32aa05e5f0e73 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 {
@ -101,10 +101,10 @@ index ad8a506bb430b26fe147a657a2f826daf9bf4d45..ad4807e0bdd6409bd798f995da8f43ce
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 a807933d65a22dc1b15eda4dee819af72006fff3..25a4bd5a216798d01da33e54da4ab0e27b86b463 100644
index 11497c73f40b0c681585cf6efca99a63eeb62e76..37c4b75f4dcb490e243082897713583060f394b2 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1129,6 +1129,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1133,6 +1133,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.navigators.add(((EntityInsentient) entity).getNavigation());
}
entity.valid = true; // CraftBukkit

Datei anzeigen

@ -29,7 +29,7 @@ index d59b82b7bb1f6d1b231f4e394e0a67a3d154d7be..f7a0a33e49cadf9b2bd43f118c106937
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2d421709d9155d8112b779a077f959c60fe9dba7..e9725b99fd0ce9a104bce07425b9c049cb4b3be6 100644
index 26ad7e7d44dc1195f7ab948d2b42bf629c2702a7..52595b6534e2798b36b3a7c2d97451bd0ea2f3a0 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -415,9 +415,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -41,7 +41,7 @@ index 2d421709d9155d8112b779a077f959c60fe9dba7..e9725b99fd0ce9a104bce07425b9c049
+ // Extracted to own function
+ /*
if (this.locY() < -64.0D) {
this.am();
this.an();
}
+ */
+ this.performVoidDamage();
@ -49,7 +49,7 @@ index 2d421709d9155d8112b779a077f959c60fe9dba7..e9725b99fd0ce9a104bce07425b9c049
if (!this.world.isClientSide) {
this.setFlag(0, this.fireTicks > 0);
@@ -510,6 +517,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -510,6 +517,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.setFireTicks(0);
}
@ -62,12 +62,13 @@ index 2d421709d9155d8112b779a077f959c60fe9dba7..e9725b99fd0ce9a104bce07425b9c049
+ }
+ }
+ // Paper end
+ protected final void doVoidDamage() { this.am(); } // Paper - OBFHELPER
protected void am() {
+
+ protected final void doVoidDamage() { this.an(); } // Paper - OBFHELPER
protected void an() {
this.die();
}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index 5e41e9527a966b2fa935ab5ae266cbbedf6fc114..f04e0dbe544b5dc0e40e37c4159a4f26fa149845 100644
index dcd381069c2fd4d037ae0bcf710b9ff6ee30bb8f..35b5d41084b47de6a1185e23970ebe21875668d6 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -292,9 +292,15 @@ public abstract class EntityMinecartAbstract extends Entity {
@ -78,7 +79,7 @@ index 5e41e9527a966b2fa935ab5ae266cbbedf6fc114..f04e0dbe544b5dc0e40e37c4159a4f26
+ // Extracted to own function
+ /*
if (this.locY() < -64.0D) {
this.am();
this.an();
}
+ */
+ this.performVoidDamage();

Datei anzeigen

@ -20,7 +20,7 @@ index f7a0a33e49cadf9b2bd43f118c106937760da762..50dec5cb5e924301842300e8fc80cb67
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index ec885c22279b237974ef461285ba59e0033800d9..783e665cf519b3ba67e7be182d61eb99fac0d0b4 100644
index 7036a7556c5f859308540ec2f5643e40634c166e..76883dd525e074995d08ff20d0d74afcb3b11c2f 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -61,7 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -32,7 +32,7 @@ index ec885c22279b237974ef461285ba59e0033800d9..783e665cf519b3ba67e7be182d61eb99
private final RecipeBookServer recipeBook = new RecipeBookServer();
private Vec3D cf;
private int cg;
@@ -767,6 +767,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -770,6 +770,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.decouple();
this.getWorldServer().removePlayer(this);
if (!this.viewingCredits) {

Datei anzeigen

@ -19,7 +19,7 @@ index f038d3f7dc7d1034a3ee9f2384a85642f224836e..25e0717186366af580e512eedfd403b8
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 083578259d0c428fb9439fcbb4b53ac59e9c390d..8928d9438f1ee1f37b7d38bef6671b3a2940e645 100644
index c3aca7ebf5aae1c0582a0683920a4b82fa98a43f..3c4ce04c811e2df9877965ec35f773a7017c6e45 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1184,6 +1184,7 @@ public abstract class EntityLiving extends Entity {
@ -43,11 +43,11 @@ index 083578259d0c428fb9439fcbb4b53ac59e9c390d..8928d9438f1ee1f37b7d38bef6671b3a
}
+ if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
if (this.dk()) {
if (this.dl()) {
if (!this.f(damagesource)) {
SoundEffect soundeffect = this.getSoundDeath();
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 88d2fa33e4c9f90f2aa80b3afbf28edbdbeb03db..b7d635ca2cbe9bf7e2e3a2ae5fa7a20f39dd913b 100644
index ac39b02ec5f02f6f2db9f293513686d2d29d4036..471b48a52d564cb4989d211188f5c5b561ac7827 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -189,14 +189,14 @@ public class Explosion {

Datei anzeigen

@ -19,15 +19,15 @@ index 25e0717186366af580e512eedfd403b8efc64a75..41436a4ead736dc925ca77d4cabf925f
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 25a4bd5a216798d01da33e54da4ab0e27b86b463..7798f1906d01dd5293991a3fe8c567ee81102ccf 100644
index 37c4b75f4dcb490e243082897713583060f394b2..d86df7b56314101571ed9c2d77bfae4a5bd2f935 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -471,7 +471,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -475,7 +475,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
gameprofilerfiller.enter("thunder");
BlockPosition blockposition;
- if (flag && this.V() && this.random.nextInt(100000) == 0) {
+ if (!this.paperConfig.disableThunder && flag && this.V() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
- if (flag && this.W() && this.random.nextInt(100000) == 0) {
+ if (!this.paperConfig.disableThunder && flag && this.W() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder
blockposition = this.a(this.a(j, 0, k, 15));
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);

Datei anzeigen

@ -19,10 +19,10 @@ index 41436a4ead736dc925ca77d4cabf925f4e492d68..f53d8b96757cbedc5fbb16195952a7da
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7798f1906d01dd5293991a3fe8c567ee81102ccf..b398fcfb9f2bd61a6481bb35bebfb26f5d12e69a 100644
index d86df7b56314101571ed9c2d77bfae4a5bd2f935..8ed0c4f1e84adc602e01f10049c6e553880cb76a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -495,7 +495,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -499,7 +499,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
gameprofilerfiller.exitEnter("iceandsnow");

Datei anzeigen

@ -19,10 +19,10 @@ index 428deed56dae597291670bea8c8a6a67ce4d940f..a4da22ea65d5fdba38f8dc331919088f
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 783e665cf519b3ba67e7be182d61eb99fac0d0b4..95434c741b246ff5698e41babef9f2c1471f76a2 100644
index 76883dd525e074995d08ff20d0d74afcb3b11c2f..d0cc45637e8bb57c3d6ede6e4e49e492671f4292 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -78,6 +78,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -80,6 +80,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public boolean e;
public int ping;
public boolean viewingCredits;
@ -30,7 +30,7 @@ index 783e665cf519b3ba67e7be182d61eb99fac0d0b4..95434c741b246ff5698e41babef9f2c1
// CraftBukkit start
public String displayName;
@@ -399,7 +400,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -402,7 +403,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
--this.noDamageTicks;
}

Datei anzeigen

@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index fd1860e3a83dec60362997ac6e1225270260cf38..7493d7ce48a9c5875bce01252b4d958ab3b9ec7d 100644
index 20651905fd6566e856aeb7340469047b7eb8c2c8..adf64b482d78a8cfc9c3f57936440c4472dd4ba3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1609,6 +1609,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1698,6 +1698,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
if (!async && s.startsWith("/")) {

Datei anzeigen

@ -21,10 +21,10 @@ index 62e793b71b313146b86b466421e7a5f894bef9df..cd47a4ca069df26969de3051c2aac805
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e9725b99fd0ce9a104bce07425b9c049cb4b3be6..7cdb5c74ef3260917618fc0bfc393bcf933ffb7a 100644
index 52595b6534e2798b36b3a7c2d97451bd0ea2f3a0..716ea2fced5dc9e9a790f25e68252d5bd445b9ce 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2527,7 +2527,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2528,7 +2528,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
double d4 = DimensionManager.a(this.world.getDimensionManager(), worldserver.getDimensionManager());
BlockPosition blockposition = new BlockPosition(MathHelper.a(this.locX() * d4, d0, d2), this.locY(), MathHelper.a(this.locZ() * d4, d1, d3));
// CraftBukkit start
@ -34,10 +34,10 @@ index e9725b99fd0ce9a104bce07425b9c049cb4b3be6..7cdb5c74ef3260917618fc0bfc393bcf
return null;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 95434c741b246ff5698e41babef9f2c1471f76a2..863f779453bb028d6452292663fd1e41ab434165 100644
index d0cc45637e8bb57c3d6ede6e4e49e492671f4292..64b310347db500a0b89b3c520a2a6fd795133deb 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -872,7 +872,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -875,7 +875,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
protected CraftPortalEvent callPortalEvent(Entity entity, WorldServer exitWorldServer, BlockPosition exitPosition, TeleportCause cause, int searchRadius, int creationRadius) {
Location enter = this.getBukkitEntity().getLocation();
Location exit = new Location(exitWorldServer.getWorld(), exitPosition.getX(), exitPosition.getY(), exitPosition.getZ(), yaw, pitch);
@ -47,7 +47,7 @@ index 95434c741b246ff5698e41babef9f2c1471f76a2..863f779453bb028d6452292663fd1e41
if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null) {
return null;
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index dc972bf0abc87c2b2fb84d8fffc368a947b2d9a3..205f3f697e9c31674a4ac8db38467bb2e61cfe6b 100644
index 150c688262e79b3b675685dbd1754b9e01cb4d75..e10995ec30dd9a10d781b3c1709fd2db5a9becdd 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -14,7 +14,7 @@ public class PortalTravelAgent {

Datei anzeigen

@ -25,10 +25,10 @@ index abbf59bb91021821876a8960e8f77fac24457ec4..04430aae52205ee167662004e45c145b
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7cdb5c74ef3260917618fc0bfc393bcf933ffb7a..ab4405638f56844a54d4dba08bef11e7f54c568d 100644
index 716ea2fced5dc9e9a790f25e68252d5bd445b9ce..02ad0b959e636d0f93cfd491b7b549364f92fbb6 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2198,6 +2198,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2199,6 +2199,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@Nullable
public ScoreboardTeamBase getScoreboardTeam() {
@ -37,7 +37,7 @@ index 7cdb5c74ef3260917618fc0bfc393bcf933ffb7a..ab4405638f56844a54d4dba08bef11e7
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 8928d9438f1ee1f37b7d38bef6671b3a2940e645..98742de5952c6d09592bdbcb12ed8862712a63e7 100644
index 3c4ce04c811e2df9877965ec35f773a7017c6e45..4a67a78bbb7b633dcf5ea490b888898487a63d7a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -642,6 +642,7 @@ public abstract class EntityLiving extends Entity {

Datei anzeigen

@ -5,10 +5,10 @@ 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 7493d7ce48a9c5875bce01252b4d958ab3b9ec7d..535e24a54a22f59b165e5043653eef5ca8f0d5e0 100644
index adf64b482d78a8cfc9c3f57936440c4472dd4ba3..4796d4d807ad5aa9b78bdf36cec7f45c8bce2d76 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1375,7 +1375,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1451,7 +1451,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());

Datei anzeigen

@ -6,7 +6,7 @@ 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/World.java b/src/main/java/net/minecraft/server/World.java
index 8ae490f5dbf9afc467f82fd7ea863bc9e247203b..884e166826a73e0210f3c215d68cdf1a4bd00355 100644
index 89d773ff59ad884a49a9ef26bc590d14c7df7776..c1d3dd294049c93beddaf5e4d513913cebb639df 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -245,11 +245,27 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -51,10 +51,10 @@ index bb0f30f182856d2701fde9b1a65eeb987462104a..717f495abd63218bb7ce9241e7cfeac8
return (double) (blockposition.getX() + 1) > this.e() && (double) blockposition.getX() < this.g() && (double) (blockposition.getZ() + 1) > this.f() && (double) blockposition.getZ() < this.h();
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b398fcfb9f2bd61a6481bb35bebfb26f5d12e69a..fd50d0649edb0bbc71bb775059993cca0cb2c227 100644
index 8ed0c4f1e84adc602e01f10049c6e553880cb76a..e307f939745db9688e96c42a70d337e8751874f2 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -84,7 +84,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -88,7 +88,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
public final Convertable.ConversionSession convertable;
public final UUID uuid;

Datei anzeigen

@ -22,10 +22,10 @@ index d8b9d87bca6eb95c2cea91e4d8466b9792582d52..92d1dffbf436a21943b4a6aa0fabf54f
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index fd50d0649edb0bbc71bb775059993cca0cb2c227..4f9e7df2f08c6db88fe8c337f20e620efca62ed8 100644
index e307f939745db9688e96c42a70d337e8751874f2..2dfecbc93c5de9ea67064ff2b8e041e173fc0be2 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -475,7 +475,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -479,7 +479,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
blockposition = this.a(this.a(j, 0, k, 15));
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);

Datei anzeigen

@ -32,7 +32,7 @@ index 48eb9c8a68d45c88c7a42e8e400446a374fb4fc9..2c8d49501664862559ed8974b4821bdd
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0d892aa828b75fddae89fe5133710af96719e408..82ac7329aa0e9fada9a195afef65479865588393 100644
index 298ca618e520fb93f4eba39c48e0d5b3e2d44a98..b5a40ee42cf0e976097c099aec6148bc02eccb7b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1172,6 +1172,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -44,7 +44,7 @@ index 0d892aa828b75fddae89fe5133710af96719e408..82ac7329aa0e9fada9a195afef654798
this.methodProfiler.a(() -> {
return worldserver + " " + worldserver.getDimensionKey().a();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3b4ac43dbad865e1f99a20e4b8860797d060903f..62af19816439beae85adf3c4de67971f3537d055 100644
index 92785a80bae6b5c88285536f74f23e0609d793ac..19f0149051d9ff58223624754b27285c4c99b769 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -406,7 +406,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -66,10 +66,10 @@ index 3b4ac43dbad865e1f99a20e4b8860797d060903f..62af19816439beae85adf3c4de67971f
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 4f9e7df2f08c6db88fe8c337f20e620efca62ed8..f833dca02871773feab2d296669fc3896c4bcb63 100644
index 2dfecbc93c5de9ea67064ff2b8e041e173fc0be2..e900ce242a84c8f6003905cf320070ea88ae13f3 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -83,6 +83,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -87,6 +87,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private int tickPosition;
public final Convertable.ConversionSession convertable;
public final UUID uuid;

Datei anzeigen

@ -5,10 +5,10 @@ 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 f833dca02871773feab2d296669fc3896c4bcb63..c5fdd3bf3e462833f33c94d68049400e68e7d283 100644
index e900ce242a84c8f6003905cf320070ea88ae13f3..b196dfb3de0ab6fa2cd57b970e5a36ccc3fcc352 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1097,7 +1097,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1101,7 +1101,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity instanceof EntityInsentient) {
this.navigators.remove(((EntityInsentient) entity).getNavigation());
}
@ -17,7 +17,7 @@ index f833dca02871773feab2d296669fc3896c4bcb63..c5fdd3bf3e462833f33c94d68049400e
entity.valid = false; // CraftBukkit
}
@@ -1135,6 +1135,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1139,6 +1139,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
entity.origin = entity.getBukkitEntity().getLocation();
}
// Paper end

Datei anzeigen

@ -18,10 +18,10 @@ index 49c911e54eb3b20d820f3e1895c057eead6d312b..09c757a3bb1d9a49343cf58e18f736e1
private Vec3D c;
private EnumHand d;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 535e24a54a22f59b165e5043653eef5ca8f0d5e0..7afb8b6ec1cc52d7dae77afab44f8f47bc30fa57 100644
index 4796d4d807ad5aa9b78bdf36cec7f45c8bce2d76..979cb35952b995dfe912e909f06b0e490fe855fc 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1950,6 +1950,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2039,6 +2039,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}
}

Datei anzeigen

@ -26,10 +26,10 @@ index fe2c8001897dc6d66ce0d24ddb1a5d3b79810294..538e6751f3bda77ba32256158d2a6a25
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 7afb8b6ec1cc52d7dae77afab44f8f47bc30fa57..575825af6500bb7be669fec700a4ccd8f95dd90e 100644
index 979cb35952b995dfe912e909f06b0e490fe855fc..e3057d52e589c5f39279547181e91a9ea019113a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1687,7 +1687,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1776,7 +1776,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
return;
}

Datei anzeigen

@ -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 d55b688dcf41bf9082da311b143055d3a6683baf..0fbd0e4c6fe7a12807848470954aee859234fa5a 100644
index b2be738480442898603a1bd9f38aebb30ec9ebef..e1f2177b3ce48cc8f9bca6e014065d787e4741e4 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -57,7 +57,7 @@ index d55b688dcf41bf9082da311b143055d3a6683baf..0fbd0e4c6fe7a12807848470954aee85
this.a(tileentity1);
}
// CraftBukkit end
@@ -902,7 +902,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -906,7 +906,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
} else {
if (tileentity != null) {
this.tileEntityListPending.remove(tileentity);
@ -67,10 +67,10 @@ index d55b688dcf41bf9082da311b143055d3a6683baf..0fbd0e4c6fe7a12807848470954aee85
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index c5fdd3bf3e462833f33c94d68049400e68e7d283..7b41dddfb62e91b3a0102d98db07e4863be7a0bd 100644
index b196dfb3de0ab6fa2cd57b970e5a36ccc3fcc352..25d7e8d4ea4fd3f3f5b649866f105b4381aff0b3 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1594,7 +1594,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1598,7 +1598,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size()));
@ -79,7 +79,7 @@ index c5fdd3bf3e462833f33c94d68049400e68e7d283..7b41dddfb62e91b3a0102d98db07e486
bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a()));
bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a()));
bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n");
@@ -1733,7 +1733,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1737,7 +1737,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private void a(Writer writer) throws IOException {
CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Configurable RCON IP address
For servers with multiple IP's, ability to bind to a specific interface.
diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
index 834330e97326f8f739c9358234b64c685b80025c..0aa8448d25f743a0d12e4c7f7c9c04fd9d5d0088 100644
index bec3a69b0f68a29ecff71f10c7b195adc91d16b3..3ecfb193be1d83d2b2c90ca9e264388dabb88c05 100644
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
@@ -56,6 +56,8 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
@@ -57,6 +57,8 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
public final GeneratorSettings generatorSettings;
@ -18,8 +18,8 @@ index 834330e97326f8f739c9358234b64c685b80025c..0aa8448d25f743a0d12e4c7f7c9c04fd
// CraftBukkit start
public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom, OptionSet optionset) {
super(properties, optionset);
@@ -106,6 +108,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
}, 100);
@@ -108,6 +110,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
this.textFilteringConfig = this.getString("text-filtering-config", "");
this.playerIdleTimeout = this.b("player-idle-timeout", 0);
this.whiteList = this.b("white-list", false);
+ // Paper start - Configurable rcon ip

Datei anzeigen

@ -5,10 +5,10 @@ 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 4799bf67f0ca74cf5573ce0a553903f75b7711b7..4849a44ebbddcdd17a84cb0db3c47ea420f2bf05 100644
index 64b310347db500a0b89b3c520a2a6fd795133deb..b4abf6a7ba8ce73868a3a63106ea542d0ca67024 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1540,16 +1540,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1543,16 +1543,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return s;
}

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a0d59bf7d7c5582f6221b4b8868cfd18101f79b9..165e915c9c76b603b61d0548a85ec8e09f25ca05 100644
index 3a16c0387fbd611680ccd2e125aef26f7cb7c9ce..d1fe6c006776b221fe817a06c22c675108f38b2f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -70,6 +70,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
@ -22,10 +22,10 @@ index a0d59bf7d7c5582f6221b4b8868cfd18101f79b9..165e915c9c76b603b61d0548a85ec8e0
public MinecraftServer(OptionSet options, DataPackConfiguration datapackconfiguration, Thread thread, IRegistryCustom.Dimension iregistrycustom_dimension, Convertable.ConversionSession convertable_conversionsession, SaveData savedata, ResourcePackRepository resourcepackrepository, Proxy proxy, DataFixer datafixer, DataPackResources datapackresources, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory) {
super("Server");
+ SERVER = this; // Paper - better singleton
this.m = new GameProfilerSwitcher(SystemUtils.a, this::ah);
this.m = new GameProfilerSwitcher(SystemUtils.a, this::ai);
this.methodProfiler = GameProfilerDisabled.a;
this.serverPing = new ServerPing();
@@ -2036,7 +2038,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2042,7 +2044,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Deprecated
public static MinecraftServer getServer() {

Datei anzeigen

@ -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 683d98dea1b46931478ac7b55e49bc9d92d36f77..485b69140f72a22b3eae53be74bcad003dd92e8f 100644
index 4ba524df18fa5e37bb4cee013a024a61a8239453..8e6059e0f6b800e0a141e0274c10b19beb4c58c2 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -595,6 +595,12 @@ public abstract class EntityHuman extends EntityLiving {
@ -102,10 +102,10 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d
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 7b41dddfb62e91b3a0102d98db07e4863be7a0bd..bedeeffdc7f0fc391215b0577224e64423809bbe 100644
index 25d7e8d4ea4fd3f3f5b649866f105b4381aff0b3..dc9c3086d2171b226f54668727625b673f29aaca 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1053,6 +1053,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1057,6 +1057,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
{
if ( iter.next().trackee == entity )
{

Datei anzeigen

@ -518,7 +518,7 @@ index 0000000000000000000000000000000000000000..a1923aff2b5e2e867670a5a064a76791
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 268aca49b98ba02c25fde588240c4ddc19a5fe00..55b34a971fc47fad851e30d07f99091b98ec4a2e 100644
index 1769e9b0f3d358253b6387491589916f7bb219fe..92edb4474167fa95fd36ae9ef86a9eafd29f9b23 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -73,6 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -530,7 +530,7 @@ index 268aca49b98ba02c25fde588240c4ddc19a5fe00..55b34a971fc47fad851e30d07f99091b
public CraftEntity getBukkitEntity() {
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index 50dab307c888cb07cf137f4dc0a38ef59d7acd57..67ff7fe6ab823e89015fb2bf17d70900597ab2fe 100644
index 75e9c1538b3d8ef5186986ab3c8ca8b60f63ee6e..574838bd33a46e464ff7d801345613a3351f487f 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -19,6 +19,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@ -589,7 +589,7 @@ index 50dab307c888cb07cf137f4dc0a38ef59d7acd57..67ff7fe6ab823e89015fb2bf17d70900
if (entityhuman != null) {
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java
index 1551136c0a50a116eef3430b0c5848ac1ed44bae..c6e6c54a3eb5d725b71f2ec2bb27dd8e2aceabde 100644
index 9265bc7331f5d3cb43394a7457ab89140b731c8b..d9be182a574daaedcc7a106c759c2bde2e4eb19a 100644
--- a/src/main/java/net/minecraft/server/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/server/TileEntityLootable.java
@@ -8,6 +8,7 @@ public abstract class TileEntityLootable extends TileEntityContainer {
@ -600,13 +600,14 @@ index 1551136c0a50a116eef3430b0c5848ac1ed44bae..c6e6c54a3eb5d725b71f2ec2bb27dd8e
protected TileEntityLootable(TileEntityTypes<?> tileentitytypes) {
super(tileentitytypes);
@@ -23,16 +24,18 @@ public abstract class TileEntityLootable extends TileEntityContainer {
@@ -23,16 +24,19 @@ public abstract class TileEntityLootable extends TileEntityContainer {
}
protected boolean b(NBTTagCompound nbttagcompound) {
+ this.lootableData.loadNbt(nbttagcompound); // Paper
if (nbttagcompound.hasKeyOfType("LootTable", 8)) {
this.lootTable = new MinecraftKey(nbttagcompound.getString("LootTable"));
+ try { org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(this.lootTable); } catch (IllegalArgumentException ex) { this.lootTable = null; } // Paper - validate
this.lootTableSeed = nbttagcompound.getLong("LootTableSeed");
- return true;
+ return false; // Paper - always load the items, table may still remain
@ -620,7 +621,7 @@ index 1551136c0a50a116eef3430b0c5848ac1ed44bae..c6e6c54a3eb5d725b71f2ec2bb27dd8e
if (this.lootTable == null) {
return false;
} else {
@@ -41,19 +44,20 @@ public abstract class TileEntityLootable extends TileEntityContainer {
@@ -41,19 +45,20 @@ public abstract class TileEntityLootable extends TileEntityContainer {
nbttagcompound.setLong("LootTableSeed", this.lootTableSeed);
}

Datei anzeigen

@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase
the user never changed the default setting for Spigot's save on stop only.
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index aade5e291b80c5362c8fd8cf09faca8e631e0554..2d74d14385c7e705cb210bcfc0780f4c9c6a1cda 100644
index 7b52bf335e60a700b4c4e25cab1b0261f32775bc..dc0cb79525adf0d5afee1f677e1fde546529cf97 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -210,7 +210,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -212,7 +212,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
if (this.convertNames()) {
@ -23,7 +23,7 @@ index aade5e291b80c5362c8fd8cf09faca8e631e0554..2d74d14385c7e705cb210bcfc0780f4c
if (!NameReferencingFileConverter.e(this)) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 165e915c9c76b603b61d0548a85ec8e09f25ca05..9dd54bea5f9a7d1cb638100312855135f83bcaf9 100644
index d1fe6c006776b221fe817a06c22c675108f38b2f..009a8cd2c77c5b6b474b587e637280a8feac9959 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -786,7 +786,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

Datei anzeigen

@ -32,13 +32,13 @@ index 05ea87a473228f5b386258fae3943f3f4561eaa6..ac76bdd7e1d91b0d242539c4495948cd
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 3fd27209ccbd582370287c29e1c8957aa9e25ae0..f5c760a8db6f509298f53df3538e7dd60f096b50 100644
index 92edb4474167fa95fd36ae9ef86a9eafd29f9b23..703267fe8a9b5e9d49d3b2dbe1da93def15d1b54 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2674,6 +2674,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2675,6 +2675,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public boolean bU() {
public boolean bV() {
+ // Paper start
+ return this.pushedByWater();
+ }
@ -48,7 +48,7 @@ index 3fd27209ccbd582370287c29e1c8957aa9e25ae0..f5c760a8db6f509298f53df3538e7dd6
}
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 623db6e3befcc7031e68c71f7eb179fce78291c4..3e71332c47000b21ff90aec6937f90dc639a41bd 100644
index e25404fd89ad6317c2656c68c2e32aa05e5f0e73..b108874d977a4fb1a7c0d52f66bc08390decb4d0 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -80,7 +80,27 @@ public class EntityTNTPrimed extends Entity {

Datei anzeigen

@ -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 bedeeffdc7f0fc391215b0577224e64423809bbe..5e0ea872a03e603faf74ea58fd5541d9aeedb172 100644
index dc9c3086d2171b226f54668727625b673f29aaca..0c5299f97981a8394231a24b084b320cbecb0847 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -922,6 +922,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -926,6 +926,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit start
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5827ef1e3eb35a11867ee4f92f301e1b0245c0fa..23c9e0f317073bb9c327ec49e0b0586d2123e4e9 100644
index 3592b8ecac38cabe9cacdd7d9071e4c179b6aed8..92244ab7d9b29689835c7f4e842210145e19414e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -244,4 +244,13 @@ public class PaperConfig {
@ -23,10 +23,10 @@ index 5827ef1e3eb35a11867ee4f92f301e1b0245c0fa..23c9e0f317073bb9c327ec49e0b0586d
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 575825af6500bb7be669fec700a4ccd8f95dd90e..fe1a6b5b2a432805830e651be5f98fc4709b8883 100644
index e3057d52e589c5f39279547181e91a9ea019113a..3812ec96b668757f9527b5e942467694532e20a4 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1235,13 +1235,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1311,13 +1311,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 23c9e0f317073bb9c327ec49e0b0586d2123e4e9..c4086de778cc2ccc958b1a94dd6e9cdb5065076c 100644
index 92244ab7d9b29689835c7f4e842210145e19414e..9c3e64d73f314f4db9ad764774f617ecbf08eb5f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -253,4 +253,11 @@ public class PaperConfig {
@ -21,10 +21,10 @@ index 23c9e0f317073bb9c327ec49e0b0586d2123e4e9..c4086de778cc2ccc958b1a94dd6e9cdb
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index fe1a6b5b2a432805830e651be5f98fc4709b8883..2f5ffd261208f726b4eedb5ac2830162741fcb43 100644
index 3812ec96b668757f9527b5e942467694532e20a4..406303f75b5bead76ab6b8c7f26614544f5236d8 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -147,7 +147,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -158,7 +158,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (this.B && !this.player.isSleeping()) {
if (++this.C > 80) {
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString());
@ -33,7 +33,7 @@ index fe1a6b5b2a432805830e651be5f98fc4709b8883..2f5ffd261208f726b4eedb5ac2830162
return;
}
} else {
@@ -166,7 +166,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -177,7 +177,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (this.D && this.player.getRootVehicle().getRidingPassenger() == this.player) {
if (++this.E > 80) {
PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getDisplayName().getString());

Datei anzeigen

@ -8,11 +8,11 @@ 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 5e0ea872a03e603faf74ea58fd5541d9aeedb172..0b36f37a0f8accdcede06564f56f4ffa10dd9b74 100644
index 0c5299f97981a8394231a24b084b320cbecb0847..9040385c68db1dc004b5ce6cc62300e7da85073e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -731,7 +731,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity.ck()) {
@@ -735,7 +735,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity.cl()) {
this.getMethodProfiler().enter("chunkCheck");
int i = MathHelper.floor(entity.locX() / 16.0D);
- int j = MathHelper.floor(entity.locY() / 16.0D);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Auto fix bad Y levels on player login
Bring down to a saner Y level if super high, as this can cause the server to crash
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index ed29b3cdbc0137f81d586207d4082a02d8ef73b5..40d35a7b04ae266214840da676a08f3967401fe2 100644
index b4abf6a7ba8ce73868a3a63106ea542d0ca67024..09b2ad46f051c94988061018100086847ce0fb9a 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -205,6 +205,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -208,6 +208,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public void loadData(NBTTagCompound nbttagcompound) {
super.loadData(nbttagcompound);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 40d35a7b04ae266214840da676a08f3967401fe2..9d0af9bcdc91996d09db9472fca6682368091efa 100644
index 09b2ad46f051c94988061018100086847ce0fb9a..ea275587cbe06f5624b4a5d05095e6d0964ea9b9 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -4,7 +4,9 @@ import com.google.common.collect.Lists;
@ -27,7 +27,7 @@ index 40d35a7b04ae266214840da676a08f3967401fe2..9d0af9bcdc91996d09db9472fca66823
private final AdvancementDataPlayer advancementDataPlayer;
private final ServerStatisticManager serverStatisticManager;
private float lastHealthScored = Float.MIN_VALUE;
@@ -415,13 +417,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -418,13 +420,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
while (!this.removeQueue.isEmpty()) {
int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE);
int[] aint = new int[i];
@ -50,7 +50,7 @@ index 40d35a7b04ae266214840da676a08f3967401fe2..9d0af9bcdc91996d09db9472fca66823
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint));
}
@@ -1407,7 +1416,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1410,7 +1419,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.lastHealthSent = -1.0F;
this.lastFoodSent = -1;
// this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Optimise removeQueue
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 87afa6e458f50e8e1d9e6c5a05020876de0a0fdc..dfdc7598a47cc60d0877d2e48aea017cab92c8a2 100644
index 291baeb12c796cfaa64d60d44007ee537ddedce2..d7c48b3fd1a70fe500df80bb57ce9e2a91feb8ef 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -96,6 +96,12 @@ public class LoginListener implements PacketLoginInListener {
@@ -97,6 +97,12 @@ public class LoginListener implements PacketLoginInListener {
}
@ -21,8 +21,8 @@ index 87afa6e458f50e8e1d9e6c5a05020876de0a0fdc..dfdc7598a47cc60d0877d2e48aea017c
// Spigot start
public void initUUID()
{
@@ -174,8 +180,8 @@ public class LoginListener implements PacketLoginInListener {
this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e));
@@ -175,8 +181,8 @@ public class LoginListener implements PacketLoginInListener {
this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic().getEncoded(), this.e));
} else {
// Spigot start
- new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) {
@ -32,7 +32,7 @@ index 87afa6e458f50e8e1d9e6c5a05020876de0a0fdc..dfdc7598a47cc60d0877d2e48aea017c
@Override
public void run() {
try {
@@ -186,7 +192,8 @@ public class LoginListener implements PacketLoginInListener {
@@ -187,7 +193,8 @@ public class LoginListener implements PacketLoginInListener {
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
}
}
@ -42,26 +42,26 @@ index 87afa6e458f50e8e1d9e6c5a05020876de0a0fdc..dfdc7598a47cc60d0877d2e48aea017c
// Spigot end
}
@@ -203,7 +210,8 @@ public class LoginListener implements PacketLoginInListener {
this.loginKey = packetlogininencryptionbegin.a(privatekey);
this.g = LoginListener.EnumProtocolState.AUTHENTICATING;
this.networkManager.a(this.loginKey);
- Thread thread = new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) {
+ // Paper start - Cache authenticator threads
+ authenticatorPool.execute(new Runnable() {
public void run() {
GameProfile gameprofile = LoginListener.this.i;
@@ -250,10 +258,8 @@ public class LoginListener implements PacketLoginInListener {
return LoginListener.this.server.V() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
}
- };
-
- thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LoginListener.LOGGER));
- thread.start();
+ });
+ // Paper end
@@ -216,7 +223,8 @@ public class LoginListener implements PacketLoginInListener {
throw new IllegalStateException("Protocol error", cryptographyexception);
}
- Thread thread = new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) {
+ // Paper start - Cache authenticator threads
+ authenticatorPool.execute(new Runnable() {
public void run() {
GameProfile gameprofile = LoginListener.this.i;
@@ -261,10 +269,8 @@ public class LoginListener implements PacketLoginInListener {
return LoginListener.this.server.W() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
}
- };
-
- thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LoginListener.LOGGER));
- thread.start();
+ });
+ // Paper end
}
// Spigot start

Datei anzeigen

@ -5,13 +5,13 @@ Subject: [PATCH] Don't let fishinghooks use portals
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index cd095cee4f162e5c47c04a68c66a4eb743d95a3f..7dde9774106b7bc1dac46ad591279343b863a9cc 100644
index 8724f293a2c4b56dc5f30c1377151edb425db63b..4a5f2617c7b35490980b341115e3df468ab3a544 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -191,6 +191,11 @@ public class EntityFishingHook extends IProjectile {
this.setMot(this.getMot().a(0.92D));
this.ae();
this.af();
+ // Paper start - These shouldn't be going through portals
+ if (this.inPortal) {
+ this.die();

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 9d0af9bcdc91996d09db9472fca6682368091efa..3d4ae2f7e6dbc10f38329d89027eea9c51e19c45 100644
index ea275587cbe06f5624b4a5d05095e6d0964ea9b9..a4e93985d2db37d1f597878cfb5069fbc7233aa4 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1905,7 +1905,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1913,7 +1913,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
protected boolean isFrozen() {
@ -19,10 +19,10 @@ index 9d0af9bcdc91996d09db9472fca6682368091efa..3d4ae2f7e6dbc10f38329d89027eea9c
@Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2f5ffd261208f726b4eedb5ac2830162741fcb43..c98766717dc45539227cf2a2ab7efd2f8faa5c4a 100644
index 406303f75b5bead76ab6b8c7f26614544f5236d8..0f1757a114278c461b149a8ec91ef3949ea2df16 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2564,7 +2564,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2658,7 +2658,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
public final boolean isDisconnected() {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
index b350825141e7a0d71a7362f1faf01c41d769a14f..36729e478329cdcd4af6132f3024963314bc4c61 100644
index 46b315036bbe576b2bf9938db73d9c5931003cc1..a646dc9f030ad1f76ba2b7bb1bc7897cd34b648c 100644
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
@@ -13,7 +13,8 @@ public class EntityFireworks extends IProjectile {
@ -18,7 +18,7 @@ index b350825141e7a0d71a7362f1faf01c41d769a14f..36729e478329cdcd4af6132f30249633
public EntityFireworks(EntityTypes<? extends EntityFireworks> entitytypes, World world) {
super(entitytypes, world);
@@ -258,6 +259,11 @@ public class EntityFireworks extends IProjectile {
@@ -260,6 +261,11 @@ public class EntityFireworks extends IProjectile {
}
nbttagcompound.setBoolean("ShotAtAngle", (Boolean) this.datawatcher.get(EntityFireworks.SHOT_AT_ANGLE));
@ -30,7 +30,7 @@ index b350825141e7a0d71a7362f1faf01c41d769a14f..36729e478329cdcd4af6132f30249633
}
@Override
@@ -274,7 +280,11 @@ public class EntityFireworks extends IProjectile {
@@ -276,7 +282,11 @@ public class EntityFireworks extends IProjectile {
if (nbttagcompound.hasKey("ShotAtAngle")) {
this.datawatcher.set(EntityFireworks.SHOT_AT_ANGLE, nbttagcompound.getBoolean("ShotAtAngle"));
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f5c760a8db6f509298f53df3538e7dd60f096b50..e720917159089e80dc8589ef7345644b44409c3d 100644
index 703267fe8a9b5e9d49d3b2dbe1da93def15d1b54..170dad8be525b40d764b6e63c981f7b73775a01b 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1955,6 +1955,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1956,6 +1956,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
protected boolean addPassenger(Entity entity) { // CraftBukkit

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Do not let armorstands drown
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 254c7ad539edfbbd34464b80b523fa2134939ef9..f2938b115aa34158e76da9f974f5746ed43630e1 100644
index 41aedbbe52761f79512a0676b096a1f8a9a49396..96c229e5dd214d32478fe4d5b96e77d8ba2bc93c 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -830,5 +830,10 @@ public class EntityArmorStand extends EntityLiving {
@ -20,22 +20,22 @@ index 254c7ad539edfbbd34464b80b523fa2134939ef9..f2938b115aa34158e76da9f974f5746e
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 60ee57139a86492c290b33808ca35300dcf96f54..0e79f18eaf11b9abab193135af07f4db2035a7eb 100644
index 1b23da5c34704bbc00dd050bdf418a937002d784..f52c2faa42c45d1d8acf7002c306a7de3aadcb86 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -245,6 +245,7 @@ public abstract class EntityLiving extends Entity {
super.a(d0, flag, iblockdata, blockposition);
}
+ public boolean canBreatheUnderwater() { return this.cL(); } // Paper - OBFHELPER
public boolean cL() {
+ public boolean canBreatheUnderwater() { return this.cM(); } // Paper - OBFHELPER
public boolean cM() {
return this.getMonsterType() == EnumMonsterType.UNDEAD;
}
@@ -288,7 +289,7 @@ public abstract class EntityLiving extends Entity {
if (this.isAlive()) {
if (this.a((Tag) TagsFluid.WATER) && !this.world.getType(new BlockPosition(this.locX(), this.getHeadY(), this.locZ())).a(Blocks.BUBBLE_COLUMN)) {
- if (!this.cL() && !MobEffectUtil.c(this) && !flag1) {
- if (!this.cM() && !MobEffectUtil.c(this) && !flag1) {
+ if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden
this.setAirTicks(this.l(this.getAirTicks()));
if (this.getAirTicks() == -20) {

Datei anzeigen

@ -26,7 +26,7 @@ index 04ee0856a8c62e1afb438d4fddf40e605e82a074..0cc7ad571eba249199a2e5e8ec567a87
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 485b69140f72a22b3eae53be74bcad003dd92e8f..196d1a7fa8ac9249ca061a704b2403c7bf1f4eb1 100644
index 8e6059e0f6b800e0a141e0274c10b19beb4c58c2..980484baae997832dafa55a54e4a658507a05803 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -436,7 +436,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -39,10 +39,10 @@ index 485b69140f72a22b3eae53be74bcad003dd92e8f..196d1a7fa8ac9249ca061a704b2403c7
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c98766717dc45539227cf2a2ab7efd2f8faa5c4a..29b620bce44e3508dd7870347df4bbf02cef2662 100644
index 0f1757a114278c461b149a8ec91ef3949ea2df16..e9fa6aa6a2417cc017eb255fce02a37d6d2933e6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1812,6 +1812,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1901,6 +1901,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
switch (packetplayinentityaction.c()) {
case PRESS_SHIFT_KEY:
this.player.setSneaking(true);

Datei anzeigen

@ -19,7 +19,7 @@ Other changes:
configuration
diff --git a/pom.xml b/pom.xml
index b80d7b1c3d934d378b1fca58a9e12ac516350ea8..e356999b348002af2d74266dfb93b8af8f376401 100644
index 7d38039fcba45ee55f35c0291ad66a58ef99c392..7c775cb6b51be98e2a257a5e2774e23f35e46369 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,10 +44,27 @@
@ -144,10 +144,10 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 971be962f5031dc6bb5f6cbb7bb7667896f4a50e..3bdde27a52c88b5f0621bdaf30ccd1ac00160b64 100644
index dc0cb79525adf0d5afee1f677e1fde546529cf97..750b1dc10ffb7adb9194e6cc8ace8fa92a5f0dec 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -60,6 +60,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -63,6 +63,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
if (!org.bukkit.craftbukkit.Main.useConsole) {
return;
}
@ -157,7 +157,7 @@ index 971be962f5031dc6bb5f6cbb7bb7667896f4a50e..3bdde27a52c88b5f0621bdaf30ccd1ac
jline.console.ConsoleReader bufferedreader = reader;
// MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
@@ -99,6 +102,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -102,6 +105,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
}
@ -166,7 +166,7 @@ index 971be962f5031dc6bb5f6cbb7bb7667896f4a50e..3bdde27a52c88b5f0621bdaf30ccd1ac
}
};
@@ -110,6 +115,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -113,6 +118,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
@ -176,7 +176,7 @@ index 971be962f5031dc6bb5f6cbb7bb7667896f4a50e..3bdde27a52c88b5f0621bdaf30ccd1ac
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
@@ -118,6 +126,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -121,6 +129,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start();
@ -186,7 +186,7 @@ index 971be962f5031dc6bb5f6cbb7bb7667896f4a50e..3bdde27a52c88b5f0621bdaf30ccd1ac
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3f1ab69ac09c0c5ab50a99961a705254f3749f18..08708a42737ce66794083116f55ea209dbf81dcf 100644
index f6e870bd5213cee48baf8d8f8159f43b65389e23..bf36e03b9be60c5be30944cae0b15809861b4e18 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -58,7 +58,7 @@ import org.apache.logging.log4j.LogManager;
@ -286,7 +286,7 @@ index b54d24096bba7afd33b45cf22dfcdafcfa31eb3d..2eb2c0c93b0d67ad7474e37158dab440
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 83f3ce88c16bee4fa6d20d6942c69ecd279ae2af..1152ba83b0389a6adde25b64bc44d427f52752b5 100644
index 868a67c5023e61960d6225de8ad1506c46177733..eae93b314fed9f7ddf1c0b87228a2f3bc9f73a78 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -12,7 +12,7 @@ import java.util.logging.Level;
@ -325,7 +325,7 @@ index 83f3ce88c16bee4fa6d20d6942c69ecd279ae2af..1152ba83b0389a6adde25b64bc44d427
+ System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper
}
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
@@ -226,7 +237,7 @@ public class Main {
System.out.println("Unable to read system info");
}

Datei anzeigen

@ -310,7 +310,7 @@ index 0000000000000000000000000000000000000000..2751ce7f1556da07ef853807a588f096
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
new file mode 100644
index 0000000000000000000000000000000000000000..ef9f55afd6bffa8c02c6820295223e5465eed91e
index 0000000000000000000000000000000000000000..d64d45eb01c65864fca1077982d89bc05e0f811b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
@@ -0,0 +1,31 @@
@ -325,8 +325,8 @@ index 0000000000000000000000000000000000000000..ef9f55afd6bffa8c02c6820295223e54
+
+public class PaperAuthenticationService extends YggdrasilAuthenticationService {
+ private final Environment environment;
+ public PaperAuthenticationService(Proxy proxy, String clientToken) {
+ super(proxy, clientToken);
+ public PaperAuthenticationService(Proxy proxy) {
+ super(proxy);
+ this.environment = (Environment)EnvironmentParser.getEnvironmentFromProperties().orElse(YggdrasilEnvironment.PROD);;
+ }
+
@ -407,19 +407,20 @@ index 0000000000000000000000000000000000000000..93d73c27340645c7502acafdc0b2cfbc
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
new file mode 100644
index 0000000000000000000000000000000000000000..3aceb0ea8a1a3ed94dd8a9e954c52ecd341c6bd1
index 0000000000000000000000000000000000000000..3cdd06d3af7ff94f1fe1a11b9a9275e17c695a38
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
@@ -0,0 +1,11 @@
@@ -0,0 +1,12 @@
+package com.destroystokyo.paper.profile;
+
+import com.mojang.authlib.Agent;
+import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
+import com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication;
+import java.util.UUID;
+
+public class PaperUserAuthentication extends YggdrasilUserAuthentication {
+ public PaperUserAuthentication(YggdrasilAuthenticationService authenticationService, Agent agent) {
+ super(authenticationService, agent);
+ super(authenticationService, UUID.randomUUID().toString(), agent);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
@ -451,15 +452,15 @@ index 17d73ebbe51a83f79f338bdb1b366cecd99f880d..39174bca00b4535e92f6b325b3fd058c
* Calculates distance between 2 entities
* @param e1
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 059b9634aeffc6f710d40112f5f8d9b877f2c7a3..d80235349ea8cc868b720b69f7f0812184e895c8 100644
index 49649e70ee8bfb3dacd63a88a180f0f329f308c0..dacb8563bc823c8f6f1e1e10f2b8b9894819374f 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -94,7 +94,7 @@ public class Main {
@@ -93,7 +93,7 @@ public class Main {
}
File file = (File) optionset.valueOf("universe"); // CraftBukkit
- YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString());
+ YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString()); // Paper
- YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY);
+ YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY); // Paper
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
UserCache usercache = new UserCache(gameprofilerepository, new File(file, MinecraftServer.b.getName()));

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Block player logins during server shutdown
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index dfdc7598a47cc60d0877d2e48aea017cab92c8a2..4217fdd952cb51a00e0e46d3f7f84f056e4594ca 100644
index d7c48b3fd1a70fe500df80bb57ce9e2a91feb8ef..3772268f91bbd726995f6006e2b2ee7048eb376c 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -48,6 +48,12 @@ public class LoginListener implements PacketLoginInListener {
@@ -49,6 +49,12 @@ public class LoginListener implements PacketLoginInListener {
}
public void tick() {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index cad87c5f4cea45233c6266794f6e4dd9fd2c1fd9..5d3f402f06c5ed0816e9cce45904148c5fda0e0d 100644
index 97abed1cede09624748e40331a15a021939568be..ef3fb476615fe6a3aafdf5aebcf5680bfaa62e49 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -183,6 +183,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -16,7 +16,7 @@ index cad87c5f4cea45233c6266794f6e4dd9fd2c1fd9..5d3f402f06c5ed0816e9cce45904148c
protected int numCollisions = 0; // Paper
public void inactiveTick() { }
// Spigot end
@@ -1579,6 +1580,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1580,6 +1581,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
if (this.origin != null) {
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -27,7 +27,7 @@ index cad87c5f4cea45233c6266794f6e4dd9fd2c1fd9..5d3f402f06c5ed0816e9cce45904148c
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
@@ -1707,6 +1712,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1708,6 +1713,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
if (!originTag.isEmpty()) {
origin = new org.bukkit.Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
}

Datei anzeigen

@ -9,12 +9,12 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa
and to provide some level of hint without being disruptive.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index de16a5f8b88d671c42db786ffcf60f4dce181029..ba949818493369c02d06d33d77a992c8ee8f457f 100644
index eae93b314fed9f7ddf1c0b87228a2f3bc9f73a78..ac60ed4396b67838ded7c775ca1115eba40d318b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -218,10 +218,12 @@ public class Main {
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -21);
deadline.add(Calendar.DAY_OF_YEAR, -7);
if (buildDate.before(deadline.getTime())) {
- System.err.println("*** Error, this build is outdated ***");
+ // Paper start - This is some stupid bullshit

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5fa63d7ca20b88a44d8800b3ebf74e4c0e376d0b..cee8740e644c492e3d71fd58791e7d52d57e856d 100644
index f9225e48d6b7916858ca7cc761444adb1ad89a6e..5fe6c36bdf8527d7fcb41e8d471194c7e395b946 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -1,5 +1,6 @@
@ -27,17 +27,17 @@ index 5fa63d7ca20b88a44d8800b3ebf74e4c0e376d0b..cee8740e644c492e3d71fd58791e7d52
+ }
}
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 4217fdd952cb51a00e0e46d3f7f84f056e4594ca..d96555b62e8c5963ac84e6c3b4b88c2411a2a42a 100644
index 3772268f91bbd726995f6006e2b2ee7048eb376c..c38255b43a9870bf8e20a3ca037f691934e5f146 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -246,6 +246,10 @@ public class LoginListener implements PacketLoginInListener {
LoginListener.this.i = LoginListener.this.a(gameprofile);
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
} else {
@@ -257,6 +257,10 @@ public class LoginListener implements PacketLoginInListener {
LoginListener.this.i = LoginListener.this.a(gameprofile);
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
} else {
+ // Paper start
+ if (com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage != null) {
+ LoginListener.this.disconnect(new ChatComponentText(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage));
+ } else // Paper end
LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down"));
LoginListener.LOGGER.error("Couldn't verify username because servers are unavailable");
}
LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down"));
LoginListener.LOGGER.error("Couldn't verify username because servers are unavailable");
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 29b620bce44e3508dd7870347df4bbf02cef2662..3ab384f09f8b309fe204ac052db7ecaf70ba14a6 100644
index e9fa6aa6a2417cc017eb255fce02a37d6d2933e6..3df76ca67dd372e968341e92c10b37b5e77925da 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -58,6 +58,8 @@ import org.bukkit.inventory.CraftingInventory;
@@ -64,6 +64,8 @@ import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.InventoryView;
import org.bukkit.util.NumberConversions;
@ -17,7 +17,7 @@ index 29b620bce44e3508dd7870347df4bbf02cef2662..3ab384f09f8b309fe204ac052db7ecaf
import co.aikar.timings.MinecraftTimings; // Paper
// CraftBukkit end
@@ -939,7 +941,34 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1015,7 +1017,34 @@ public class PlayerConnection implements PacketListenerPlayIn {
boolean flag = d8 > 0.0D;
if (this.player.isOnGround() && !packetplayinflying.b() && flag) {

Datei anzeigen

@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 3ab384f09f8b309fe204ac052db7ecaf70ba14a6..e272691a8f44eba88a344ea24bfcf5874f03bc1d 100644
index 3df76ca67dd372e968341e92c10b37b5e77925da..9eb5ec1b8b0299bf964ed1f0f1b30a4ce1a1ecd3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2525,14 +2525,18 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2619,14 +2619,18 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {

Datei anzeigen

@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e272691a8f44eba88a344ea24bfcf5874f03bc1d..a3710f23d4ef254cda3fae83d8547507aa2a8696 100644
index 9eb5ec1b8b0299bf964ed1f0f1b30a4ce1a1ecd3..8acbd8cb850461339c9990165106f104609efed0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -70,7 +70,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -76,7 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
private final MinecraftServer minecraftServer;
public EntityPlayer player;
private int e;
@ -29,7 +29,7 @@ index e272691a8f44eba88a344ea24bfcf5874f03bc1d..a3710f23d4ef254cda3fae83d8547507
private boolean awaitingKeepAlive; private void setPendingPing(boolean isPending) { this.awaitingKeepAlive = isPending;}; private boolean isPendingPing() { return this.awaitingKeepAlive;}; // Paper - OBFHELPER
private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER
// CraftBukkit start - multithreaded fields
@@ -101,6 +101,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -107,6 +107,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
private int E;
private int receivedMovePackets;
private int processedMovePackets;
@ -37,7 +37,7 @@ index e272691a8f44eba88a344ea24bfcf5874f03bc1d..a3710f23d4ef254cda3fae83d8547507
public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) {
this.minecraftServer = minecraftserver;
@@ -182,18 +183,25 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -193,18 +194,25 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
this.minecraftServer.getMethodProfiler().enter("keepAlive");

Datei anzeigen

@ -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 b64eecae09241360b6997200f931eb3a63470dab..700cc4161163308c72f66c688a6afc1663e38284 100644
index ca33de2d305487f0f2f50e14f5878c05e1c9845c..c21d5e87f5ce7f9193d75848bfc89dc294bb8733 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1030,7 +1030,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -24,7 +24,7 @@ index b64eecae09241360b6997200f931eb3a63470dab..700cc4161163308c72f66c688a6afc16
- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F);
+ sendSoundEffect(this, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility
this.ew();
this.ex();
}
@@ -1133,15 +1133,15 @@ public abstract class EntityHuman extends EntityLiving {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Prevent logins from being processed when the player has
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index d96555b62e8c5963ac84e6c3b4b88c2411a2a42a..7400d85e21d8efd231b3a00f16765946bcc54e65 100644
index c38255b43a9870bf8e20a3ca037f691934e5f146..63769f6d6e82f4c3758db0f82314c3cc28d44011 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -55,7 +55,11 @@ public class LoginListener implements PacketLoginInListener {
@@ -56,7 +56,11 @@ public class LoginListener implements PacketLoginInListener {
}
// Paper end
if (this.g == LoginListener.EnumProtocolState.READY_TO_ACCEPT) {

Datei anzeigen

@ -14,10 +14,10 @@ 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 a3710f23d4ef254cda3fae83d8547507aa2a8696..4dc0b3a6054ef82ad675c30d30b6a7ad5acea400 100644
index 8acbd8cb850461339c9990165106f104609efed0..b92449c7035ebb330eb3aaa48e91a6d0b3873c5c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -521,10 +521,10 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -564,10 +564,10 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInTabComplete packetplayintabcomplete) {
@ -30,7 +30,7 @@ index a3710f23d4ef254cda3fae83d8547507aa2a8696..4dc0b3a6054ef82ad675c30d30b6a7ad
return;
}
// CraftBukkit end
@@ -534,12 +534,35 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -577,12 +577,35 @@ public class PlayerConnection implements PacketListenerPlayIn {
stringreader.skip();
}

Datei anzeigen

@ -9,7 +9,7 @@ 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/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 042031d2b7cb2f56d422145ffa7589fa46dd2e53..09cfd3ee900d0d1f523e6453163fdb806a0da6de 100644
index 1daf3bea2cc488276b33e624e1591a71af1459d9..90812ab056acc39e62a43cb208bfd782e2a0c1b7 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -590,6 +590,15 @@ public class ChunkProviderServer extends IChunkProvider {
@ -29,7 +29,7 @@ index 042031d2b7cb2f56d422145ffa7589fa46dd2e53..09cfd3ee900d0d1f523e6453163fdb80
Optional<Chunk> optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 3d4ae2f7e6dbc10f38329d89027eea9c51e19c45..6a8327379e7520d31e5eb0a61893e6d9f23a6814 100644
index a4e93985d2db37d1f597878cfb5069fbc7233aa4..36ac4fde147fb5c4d26f1bdbcf027fb0bf3edca7 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1,5 +1,6 @@
@ -39,7 +39,7 @@ index 3d4ae2f7e6dbc10f38329d89027eea9c51e19c45..6a8327379e7520d31e5eb0a61893e6d9
import com.google.common.collect.Lists;
import com.mojang.authlib.GameProfile;
import com.mojang.datafixers.util.Either;
@@ -95,6 +96,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -97,6 +98,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public boolean sentListPacket = false;
public Integer clientViewDistance;
// CraftBukkit end

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent
This will allow you to change the players name or skin on login.
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 7400d85e21d8efd231b3a00f16765946bcc54e65..230dcda34707b822790ace75957174f937821898 100644
index 63769f6d6e82f4c3758db0f82314c3cc28d44011..b8642986f4304b48bf88c4a1d4ddfab1fbae175a 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -1,5 +1,7 @@
@ -17,7 +17,7 @@ index 7400d85e21d8efd231b3a00f16765946bcc54e65..230dcda34707b822790ace75957174f9
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.exceptions.AuthenticationUnavailableException;
import java.math.BigInteger;
@@ -18,6 +20,7 @@ import org.apache.logging.log4j.LogManager;
@@ -19,6 +21,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
// CraftBukkit start
@ -25,15 +25,15 @@ index 7400d85e21d8efd231b3a00f16765946bcc54e65..230dcda34707b822790ace75957174f9
import org.bukkit.craftbukkit.util.Waitable;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerPreLoginEvent;
@@ -286,8 +289,16 @@ public class LoginListener implements PacketLoginInListener {
java.util.UUID uniqueId = i.getId();
final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server;
@@ -296,8 +299,16 @@ public class LoginListener implements PacketLoginInListener {
java.util.UUID uniqueId = i.getId();
final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server;
- AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId);
- AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId);
+ // Paper start
+ PlayerProfile profile = Bukkit.createProfile(uniqueId, playerName);
+ AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, profile);
server.getPluginManager().callEvent(asyncEvent);
server.getPluginManager().callEvent(asyncEvent);
+ profile = asyncEvent.getPlayerProfile();
+ profile.complete();
+ i = CraftPlayerProfile.asAuthlibCopy(profile);
@ -41,5 +41,5 @@ index 7400d85e21d8efd231b3a00f16765946bcc54e65..230dcda34707b822790ace75957174f9
+ uniqueId = i.getId();
+ // Paper end
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);

Datei anzeigen

@ -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 de781fce74e5300be508f25aac23f402f97a2874..49f051a1f47c73a66cc462b3eecf72c4e932b648 100644
index 04dda158dd42a5e995ed376904e0505b97ffe1c4..7e9a077a6e6af34c06910d1381399eed81f9fc20 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,10 +19,10 @@ index de781fce74e5300be508f25aac23f402f97a2874..49f051a1f47c73a66cc462b3eecf72c4
private final ItemCooldown bM;
@Nullable
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 230dcda34707b822790ace75957174f937821898..a3555dd251af5dd4b320428aadaffe7063ecd356 100644
index b8642986f4304b48bf88c4a1d4ddfab1fbae175a..87dcb1688d1bf1221609a410c33a8d61b0761a1f 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -36,7 +36,7 @@ public class LoginListener implements PacketLoginInListener {
@@ -37,7 +37,7 @@ public class LoginListener implements PacketLoginInListener {
public final NetworkManager networkManager;
private LoginListener.EnumProtocolState g;
private int h;
@ -31,14 +31,14 @@ index 230dcda34707b822790ace75957174f937821898..a3555dd251af5dd4b320428aadaffe70
private final String j;
private SecretKey loginKey;
private EntityPlayer l;
@@ -290,12 +290,12 @@ public class LoginListener implements PacketLoginInListener {
final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server;
@@ -300,12 +300,12 @@ public class LoginListener implements PacketLoginInListener {
final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server;
// Paper start
- PlayerProfile profile = Bukkit.createProfile(uniqueId, playerName);
+ PlayerProfile profile = CraftPlayerProfile.asBukkitMirror(getGameProfile());
AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, profile);
server.getPluginManager().callEvent(asyncEvent);
server.getPluginManager().callEvent(asyncEvent);
profile = asyncEvent.getPlayerProfile();
- profile.complete();
- i = CraftPlayerProfile.asAuthlibCopy(profile);

Datei anzeigen

@ -5,15 +5,16 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 4dc0b3a6054ef82ad675c30d30b6a7ad5acea400..c79db4e81883ce8635e91304b288f32e7bc2c763 100644
index b92449c7035ebb330eb3aaa48e91a6d0b3873c5c..e72a519645e9383c989fc3ad8059c1c88c1b6382 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2537,7 +2537,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2631,7 +2631,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
String[] lines = new String[4];
for (int i = 0; i < astring.length; ++i) {
- lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a(astring[i])).getString());
+ lines[i] = SharedConstants.a(astring[i]); //Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created.
for (int i = 0; i < list.size(); ++i) {
- lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a((String) list.get(i))).getString());
+ // Paper TODO(Proximyst): Add obfhelper when 1.16.4 runs
+ lines[i] = SharedConstants.a(list.get(i)); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created.
}
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines);
this.server.getPluginManager().callEvent(event);

Datei anzeigen

@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player
You may cancel this, enabling ranged attacks to damage the enderman for example.
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index eea2534be648bec49749bd8f55e36658dccdba57..f20283585464d54c4c5da294cf19261c2d258c97 100644
index 4e7553a70e3caafdc661215f6c3e2cbf49c6db91..b9ede7d533a813f4de27404dc14b0ef99c8fcd62 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
@ -34,7 +34,7 @@ index eea2534be648bec49749bd8f55e36658dccdba57..f20283585464d54c4c5da294cf19261c
if (!super.setGoalTarget(entityliving, reason, fireEvent)) {
@@ -208,7 +215,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
if (this.world.isDay() && this.ticksLived >= this.bs + 600) {
float f = this.aQ();
float f = this.aR();
- if (f > 0.5F && this.world.e(this.getChunkCoordinates()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
+ if (f > 0.5F && this.world.e(this.getChunkCoordinates()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper

Datei anzeigen

@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 0b36f37a0f8accdcede06564f56f4ffa10dd9b74..530d55b569cbdf19df4ad39368dd20dc47bc7c97 100644
index 9040385c68db1dc004b5ce6cc62300e7da85073e..fde791f4b1d80d3dab7d5a91d644295a80297f34 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -57,7 +57,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -61,7 +61,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
public final Int2ObjectMap<Entity> entitiesById = new Int2ObjectLinkedOpenHashMap();
private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
private final Queue<Entity> entitiesToAdd = Queues.newArrayDeque();
@ -22,7 +22,7 @@ index 0b36f37a0f8accdcede06564f56f4ffa10dd9b74..530d55b569cbdf19df4ad39368dd20dc
public final ChunkProviderServer chunkProvider; // Paper - public
boolean tickingEntities;
private final MinecraftServer server;
@@ -1351,12 +1351,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1355,12 +1355,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 4c6c0b3b77b3cea9abf4a9e6dec4872201db7b7b..db84ddd62b627764ff5debc56095d37e81c94605 100644
index a962f695f3f3508f8ce32f72a56990eb0e601589..51d1d9abcb66bef329fa2396e9e338b9d962733b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -119,7 +119,7 @@ public abstract class EntityLiving extends Entity {
@ -22,14 +22,14 @@ index 4c6c0b3b77b3cea9abf4a9e6dec4872201db7b7b..db84ddd62b627764ff5debc56095d37e
return this.activeItem;
}
+ public int getItemUseRemainingTime() { return this.dY(); } // Paper - OBFHELPER
public int dY() {
+ public int getItemUseRemainingTime() { return this.dZ(); } // Paper - OBFHELPER
public int dZ() {
return this.bd;
}
+ public int getHandRaisedTime() { return this.dZ(); } // Paper - OBFHELPER
public int dZ() {
return this.isHandRaised() ? this.activeItem.k() - this.dY() : 0;
+ public int getHandRaisedTime() { return this.ea(); } // Paper - OBFHELPER
public int ea() {
return this.isHandRaised() ? this.activeItem.k() - this.dZ() : 0;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 2e146ec4ba0c6db67c558a48ce5ec60bc2ca337f..a91070c3674dc47e0019e642f0f76a3cf76b7387 100644

Datei anzeigen

@ -7,11 +7,11 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 0f7e162b342ac589dc357508a1dcd1ab02d1fe3e..cc20b73a993d021789840ed2ee7ba1fc8310dc5a 100644
index cbffebfe323ff4ddec792c49ebc3391fc9ac35ac..73a33eff97d26e5b3542d787344013e18e52db68 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -155,7 +155,7 @@ public abstract class EntityHuman extends EntityLiving {
this.es();
this.et();
super.tick();
if (!this.world.isClientSide && this.activeContainer != null && !this.activeContainer.canUse(this)) {
- this.closeInventory();
@ -34,10 +34,10 @@ index 0f7e162b342ac589dc357508a1dcd1ab02d1fe3e..cc20b73a993d021789840ed2ee7ba1fc
this.activeContainer = this.defaultContainer;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index e2ee907758f5cb5ff2cdb930ad705d38bf5638c8..daeb5a6e005a4b85b5f3ac581c0e7cb6ea64b2c8 100644
index 36ac4fde147fb5c4d26f1bdbcf027fb0bf3edca7..dd3ae707776626d54894d19d5b0968256104c4dd 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -412,7 +412,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -415,7 +415,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
// Paper end
if (!this.world.isClientSide && !this.activeContainer.canUse(this)) {
@ -46,7 +46,7 @@ index e2ee907758f5cb5ff2cdb930ad705d38bf5638c8..daeb5a6e005a4b85b5f3ac581c0e7cb6
this.activeContainer = this.defaultContainer;
}
@@ -586,7 +586,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -589,7 +589,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
// SPIGOT-943 - only call if they have an inventory open
if (this.activeContainer != this.defaultContainer) {
@ -55,7 +55,7 @@ index e2ee907758f5cb5ff2cdb930ad705d38bf5638c8..daeb5a6e005a4b85b5f3ac581c0e7cb6
}
String deathMessage = event.getDeathMessage();
@@ -1139,7 +1139,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1142,7 +1142,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return OptionalInt.empty();
} else {
if (this.activeContainer != this.defaultContainer) {
@ -64,7 +64,7 @@ index e2ee907758f5cb5ff2cdb930ad705d38bf5638c8..daeb5a6e005a4b85b5f3ac581c0e7cb6
}
this.nextContainerCounter();
@@ -1199,7 +1199,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1202,7 +1202,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
// CraftBukkit end
if (this.activeContainer != this.defaultContainer) {
@ -73,7 +73,7 @@ index e2ee907758f5cb5ff2cdb930ad705d38bf5638c8..daeb5a6e005a4b85b5f3ac581c0e7cb6
}
// this.nextContainerCounter(); // CraftBukkit - moved up
@@ -1263,7 +1263,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1266,7 +1266,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public void closeInventory() {
@ -88,10 +88,10 @@ index e2ee907758f5cb5ff2cdb930ad705d38bf5638c8..daeb5a6e005a4b85b5f3ac581c0e7cb6
this.o();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c79db4e81883ce8635e91304b288f32e7bc2c763..19524eb45c313be977e8fd68fd3dd5e470067542 100644
index e72a519645e9383c989fc3ad8059c1c88c1b6382..bad3923c0ec5b99d4e102d61ad88321aa854350e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -37,6 +37,7 @@ import org.bukkit.event.inventory.ClickType;
@@ -43,6 +43,7 @@ import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.inventory.CraftItemEvent;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
@ -99,7 +99,7 @@ index c79db4e81883ce8635e91304b288f32e7bc2c763..19524eb45c313be977e8fd68fd3dd5e4
import org.bukkit.event.inventory.InventoryCreativeEvent;
import org.bukkit.event.inventory.InventoryType.SlotType;
import org.bukkit.event.player.AsyncPlayerChatEvent;
@@ -2072,10 +2073,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2161,10 +2162,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInCloseWindow packetplayinclosewindow) {
@ -130,10 +130,10 @@ index 3fa1ea2958bec57d40b702bdbdc511d67b165d7e..129f4095cb98e1e4295b9a12105d06e2
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 530d55b569cbdf19df4ad39368dd20dc47bc7c97..3d7950ea51a533477d3569d9768ca20a1b6d0822 100644
index fde791f4b1d80d3dab7d5a91d644295a80297f34..79d0f4eff913560d718132b50f63a79ff365938d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1008,7 +1008,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1012,7 +1012,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
for (TileEntity tileentity : chunk.getTileEntities().values()) {
if (tileentity instanceof IInventory) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) {
@ -142,7 +142,7 @@ index 530d55b569cbdf19df4ad39368dd20dc47bc7c97..3d7950ea51a533477d3569d9768ca20a
}
}
}
@@ -1066,7 +1066,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1070,7 +1070,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
@ -193,7 +193,7 @@ index df1896d447295123dbf7f8c8dea163be7849132f..18f0d23e38abb9c3e326a727cc4b4e04
// Check if the fromWorld and toWorld are the same.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index a0f7f69a79a11bc9be879a299e5130e96dc9b5b7..486613df75ea8a41a8a9424d8da4a20c5e39b941 100644
index f4242870654ea6faa6829348717cd2f3c3407679..52762d75edd35dd3bc9668e3f7a3c79be279b783 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1173,7 +1173,7 @@ public class CraftEventFactory {

Datei anzeigen

@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 19524eb45c313be977e8fd68fd3dd5e470067542..7be8745df9a7481e48e873b5595b8848b3e5c494 100644
index bad3923c0ec5b99d4e102d61ad88321aa854350e..e025360ffdb54f91b2215076f24f9abb08d6718f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1985,6 +1985,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2074,6 +2074,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
if (event.isCancelled()) {

Datei anzeigen

@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data...
We should kind of know about these things you know.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 3d7950ea51a533477d3569d9768ca20a1b6d0822..81cdfe2351e62461171e5658290d80bb9b735d7a 100644
index 79d0f4eff913560d718132b50f63a79ff365938d..caaebdba5ede1d41c97ea57ea1e9de9d0a977c95 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -961,7 +961,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -965,7 +965,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity1 == null) {
return false;
} else {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5d3f402f06c5ed0816e9cce45904148c5fda0e0d..dd9588cfdb9ea6f50c08af829a533319680c7e59 100644
index ef3fb476615fe6a3aafdf5aebcf5680bfaa62e49..07941c987a0c644e896f49ce217c1c625dc25014 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2436,7 +2436,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2437,7 +2437,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public String toString() {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index dd9588cfdb9ea6f50c08af829a533319680c7e59..d0e077084b84e44336878410aa9a44fed7408670 100644
index 07941c987a0c644e896f49ce217c1c625dc25014..c863fd94ee77b81aec84223588e20eed974515d6 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -40,7 +40,7 @@ index 8862bbd73b627e37709d46e6aeeee70c89cbd821..4bbcd00950405a4bf3ce391b557049a3
protected void g() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index dc00ad1607dc6b05f8cb13470046d72f17aa115b..6ebf3884a289d0be081d43d012ac10796740cc1e 100644
index cc17d9862ed6169c332896d81dc18209234cfa00..6003201197a89fa6c46c35d711a53db690295b1e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -52,10 +52,10 @@ index dc00ad1607dc6b05f8cb13470046d72f17aa115b..6ebf3884a289d0be081d43d012ac1079
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 81cdfe2351e62461171e5658290d80bb9b735d7a..04e57c81d0e58a801ad8e842c48fc6a143de70f2 100644
index caaebdba5ede1d41c97ea57ea1e9de9d0a977c95..3655b3d48da865931507e8588830567ffef1cdac 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -84,6 +84,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -88,6 +88,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
public final Convertable.ConversionSession convertable;
public final UUID uuid;
boolean hasPhysicsEvent = true; // Paper
@ -65,7 +65,7 @@ index 81cdfe2351e62461171e5658290d80bb9b735d7a..04e57c81d0e58a801ad8e842c48fc6a1
@Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
return this.chunkProvider.getChunkAt(x, z, false);
@@ -922,8 +925,28 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -926,8 +929,28 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit start
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
@ -95,7 +95,7 @@ index 81cdfe2351e62461171e5658290d80bb9b735d7a..04e57c81d0e58a801ad8e842c48fc6a1
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit
return false;
} else if (this.isUUIDTaken(entity)) {
@@ -1120,7 +1143,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1124,7 +1147,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
}

Datei anzeigen

@ -18,7 +18,7 @@ an invalid entity.
This should reduce log occurrences of dupe uuid messages.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 52621ab74c8af1ab0c38e8df28cb7dc7153096a3..8affcbbb0a970acc83531f7308734552727b00c5 100644
index d30c4d5a4ee83e21ba9269c0b92af2b72b85d3cc..3a292bccb2295bf7ae46fc3d7e5c9c63a72f403d 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -307,6 +307,7 @@ public class ChunkRegionLoader {
@ -80,10 +80,10 @@ index 52621ab74c8af1ab0c38e8df28cb7dc7153096a3..8affcbbb0a970acc83531f7308734552
public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) {
if (nbttagcompound != null) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 04e57c81d0e58a801ad8e842c48fc6a143de70f2..186a7b1435132f0795b74ee843f8a4c830aa9f43 100644
index 3655b3d48da865931507e8588830567ffef1cdac..254f2567f36ced5c4309ea2df7952772bb279390 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1040,6 +1040,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1044,6 +1044,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
List[] aentityslice = chunk.getEntitySlices(); // Spigot
int i = aentityslice.length;
@ -91,7 +91,7 @@ index 04e57c81d0e58a801ad8e842c48fc6a143de70f2..186a7b1435132f0795b74ee843f8a4c8
for (int j = 0; j < i; ++j) {
List<Entity> entityslice = aentityslice[j]; // Spigot
Iterator iterator = entityslice.iterator();
@@ -1052,11 +1053,25 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1056,11 +1057,25 @@ public class WorldServer extends World implements GeneratorAccessSeed {
throw (IllegalStateException) SystemUtils.c((Throwable) (new IllegalStateException("Removing entity while ticking!")));
}

Datei anzeigen

@ -51,7 +51,7 @@ index 18d55cea6258c7b59b79aec1bcdf358944d5b527..6154f7a7973168cbe294bc0f40894f05
if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check
list.add(t0);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ef375f3987c26d70ba3f88e53f458bdccb6fc1ae..e4afda074cdbbc4b1d81844fb60602392de8941c 100644
index 29b24fd75f06501a814868d1fab85c9b818bd316..b2cccdc9f2f243cd3fb1283ade0280b2acb0f772 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -190,6 +190,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -63,10 +63,10 @@ index ef375f3987c26d70ba3f88e53f458bdccb6fc1ae..e4afda074cdbbc4b1d81844fb6060239
public float getBukkitYaw() {
return this.yaw;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 186a7b1435132f0795b74ee843f8a4c830aa9f43..7ec836666f3468ce90db0da448f5b7afaad24c32 100644
index 254f2567f36ced5c4309ea2df7952772bb279390..38fd15bd2f3503eae0be0aa2c939b8c737368c24 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1192,6 +1192,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1196,6 +1196,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
entity.origin = entity.getBukkitEntity().getLocation();
}
// Paper end
@ -74,7 +74,7 @@ index 186a7b1435132f0795b74ee843f8a4c830aa9f43..7ec836666f3468ce90db0da448f5b7af
new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
}
@@ -1204,6 +1205,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1208,6 +1209,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.removeEntityFromChunk(entity);
this.entitiesById.remove(entity.getId());
this.unregisterEntity(entity);

Datei anzeigen

@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index c8a7d8092a2849b62a8d83d7970756fd76100025..2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9 100644
index f3e906902a3a90fd023050ebfae7ebc6d50311eb..e8d6cc7c116faaf168efdb0af0b2365bb7fb6eac 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -288,4 +288,18 @@ public class PaperConfig {
@ -45,10 +45,10 @@ index c8a7d8092a2849b62a8d83d7970756fd76100025..2e5c71d6b7d120a308076d95a3d5b73c
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 7be8745df9a7481e48e873b5595b8848b3e5c494..d7a62e63ea1cdc7436ee1b5d57c72bc7dec04182 100644
index e025360ffdb54f91b2215076f24f9abb08d6718f..6e3d66ab776146e2204539319412ea8bde17d58a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -77,6 +77,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -83,6 +83,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit start - multithreaded fields
private volatile int chatThrottle;
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
@ -56,7 +56,7 @@ index 7be8745df9a7481e48e873b5595b8848b3e5c494..d7a62e63ea1cdc7436ee1b5d57c72bc7
// CraftBukkit end
private int j;
private final Int2ShortMap k = new Int2ShortOpenHashMap();
@@ -207,6 +208,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -218,6 +219,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.minecraftServer.getMethodProfiler().exit();
// CraftBukkit start
for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ;
@ -64,7 +64,7 @@ index 7be8745df9a7481e48e873b5595b8848b3e5c494..d7a62e63ea1cdc7436ee1b5d57c72bc7
/* Use thread-safe field access instead
if (this.chatThrottle > 0) {
--this.chatThrottle;
@@ -524,7 +526,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -567,7 +569,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
public void a(PacketPlayInTabComplete packetplayintabcomplete) {
// PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async
// CraftBukkit start

Datei anzeigen

@ -73,7 +73,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd
int i = blockposition.getX();
int j = blockposition.getY();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 4b28cb07e24a2deb18e2c7e97f25fee1d32e0d25..42307f0ed23c413f86edf3ac2783f258560ac969 100644
index 514be9c4356380627032c54b4b1eda37aaefe16d..caeca1b5b6aafa5770924c3f9e0cc264f23156ef 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -218,6 +218,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -95,10 +95,10 @@ index 4b28cb07e24a2deb18e2c7e97f25fee1d32e0d25..42307f0ed23c413f86edf3ac2783f258
public boolean s_() {
return this.isClientSide;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7ec836666f3468ce90db0da448f5b7afaad24c32..d6c86ce6a6a23ac8e889b0a9e7b8b7b8513ba5d1 100644
index 38fd15bd2f3503eae0be0aa2c939b8c737368c24..458ee180fa1c8c105d596125398b2c34d8265d0a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1530,15 +1530,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1534,15 +1534,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition, f));
}
@ -126,7 +126,7 @@ index 7ec836666f3468ce90db0da448f5b7afaad24c32..d6c86ce6a6a23ac8e889b0a9e7b8b7b8
public float v() {
return this.worldData.d();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 462cc4539c98787bb0c7e5925d8b6b06874120ca..95f01296b1a7763f33ec17ab4e11d85549ca95c0 100644
index 6458cd6823ea066588742f8105048001395e4dde..1c806c97bf77cb3a71086d51110605b147bdbfbf 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -234,7 +234,7 @@ public class CraftEventFactory {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands
Lists are bad as Queues mmmkay.
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 3bdde27a52c88b5f0621bdaf30ccd1ac00160b64..54ef6eeb8866915f03fb16413c8b5f36a7501f82 100644
index 750b1dc10ffb7adb9194e6cc8ace8fa92a5f0dec..bec26885108442c8e22cdddf5e764ecab6994dca 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -36,7 +36,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -18,7 +18,7 @@ index 3bdde27a52c88b5f0621bdaf30ccd1ac00160b64..54ef6eeb8866915f03fb16413c8b5f36
private RemoteStatusListener remoteStatusListener;
public final RemoteControlCommandListener remoteControlCommandListener;
private RemoteControlListener remoteControlListener;
@@ -389,8 +389,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -395,8 +395,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
public void handleCommandQueue() {
MinecraftTimings.serverCommandTimer.startTiming(); // Spigot

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index cb7cf185cc93813de97fbab830856573af8b6e73..f74c827850ebb894af94aecadcaa0e3ff8c6254c 100644
index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029bcffd5f10 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -5,6 +5,14 @@ import java.util.Objects;
@ -56,8 +56,8 @@ index cb7cf185cc93813de97fbab830856573af8b6e73..f74c827850ebb894af94aecadcaa0e3f
@Override
public boolean a() {
- return (this.a.isInWater() || this.a.aP()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
+ return (this.a.isInWater() || this.a.aP()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper
- return (this.a.isInWater() || this.a.aQ()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
+ return (this.a.isInWater() || this.a.aQ()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper
}
@Override
@ -65,8 +65,8 @@ index cb7cf185cc93813de97fbab830856573af8b6e73..f74c827850ebb894af94aecadcaa0e3f
@Override
public boolean a() {
- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aP() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
+ return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aP() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander; // Paper - add canWander
- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aQ() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
+ return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aQ() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander; // Paper - add canWander
}
@Override

Datei anzeigen

@ -5,15 +5,15 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index cc20b73a993d021789840ed2ee7ba1fc8310dc5a..a6265c71973b67a0b49a41e2163a6f48876f1b41 100644
index 73a33eff97d26e5b3542d787344013e18e52db68..6a46b9262ba34febc2664a6f56c186843ed7fb3f 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -2005,6 +2005,7 @@ public abstract class EntityHuman extends EntityLiving {
this.datawatcher.set(EntityHuman.bl, nbttagcompound);
}
+ public float getCooldownPeriod() { return this.eQ(); } // Paper - OBFHELPER
public float eQ() {
+ public float getCooldownPeriod() { return this.eR(); } // Paper - OBFHELPER
public float eR() {
return (float) (1.0D / this.b(GenericAttributes.ATTACK_SPEED) * 20.0D);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java

Datei anzeigen

@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
internal code.
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
index 6281f7900afab3ef1c9ba3c034b91cbfa1900f50..7f3401d5d7878e4a0f407e92bf110dbe7c7868a6 100644
index 0790d45e3c8ac68c280b9378d93061b48b045639..a8054a599e3eb502e7bbce903b5683987f95fb66 100644
--- a/src/main/java/net/minecraft/server/CombatTracker.java
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
@@ -192,6 +192,7 @@ public class CombatTracker {
@ -27,10 +27,10 @@ index 6281f7900afab3ef1c9ba3c034b91cbfa1900f50..7f3401d5d7878e4a0f407e92bf110dbe
int i = this.f ? 300 : 100;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e4afda074cdbbc4b1d81844fb60602392de8941c..18a79f9c61c0263526cd632f032d17bdc6cb2139 100644
index b2cccdc9f2f243cd3fb1283ade0280b2acb0f772..4923fe299e7f057d5d70d346e83e746185eafdd3 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1451,6 +1451,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1452,6 +1452,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
// CraftBukkit end
@ -38,7 +38,7 @@ index e4afda074cdbbc4b1d81844fb60602392de8941c..18a79f9c61c0263526cd632f032d17bd
public void a(Entity entity, int i, DamageSource damagesource) {
if (entity instanceof EntityPlayer) {
CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource);
@@ -2350,6 +2351,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2351,6 +2352,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fallDistance = 0.0F;
}
@ -47,7 +47,7 @@ index e4afda074cdbbc4b1d81844fb60602392de8941c..18a79f9c61c0263526cd632f032d17bd
protected void l(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index fc86ae2519c8ff54ff7c5e45d7c45fcc16eefca0..41d5dd7f08775a68984da24c92ee244c1b69426b 100644
index 4e6f195965af2108631f373a3a2987826e4317de..01c0ec114cf913e54058a2f5298807dbb83d1cf4 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -704,7 +704,8 @@ public class EntityArmorStand extends EntityLiving {
@ -61,7 +61,7 @@ index fc86ae2519c8ff54ff7c5e45d7c45fcc16eefca0..41d5dd7f08775a68984da24c92ee244c
}
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
index 83fa99b1cf784eb7f30b14f9f0743cbab7136563..0ac0364ffeb81ac3f379848f6e1afae641658c73 100644
index a7bbf21e9736a0da38f95d93b013097b1e745306..56c119e8d11c5ffb1f90ac4249bce434b3e78884 100644
--- a/src/main/java/net/minecraft/server/EntityFox.java
+++ b/src/main/java/net/minecraft/server/EntityFox.java
@@ -577,15 +577,25 @@ public class EntityFox extends EntityAnimal {
@ -94,7 +94,7 @@ index 83fa99b1cf784eb7f30b14f9f0743cbab7136563..0ac0364ffeb81ac3f379848f6e1afae6
public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
index 29d1b9bb4e481b6d6fb7185d9adf17f5ec07d4a1..c14d722e9b1ed61d2878ca752797871b6de39ac9 100644
index 09d076db37507b17797635df232a568752c97584..3bcebb89c9f9a5243d1d215a47d7d5e64d2529b2 100644
--- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
@@ -50,11 +50,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract {
@ -119,7 +119,7 @@ index 29d1b9bb4e481b6d6fb7185d9adf17f5ec07d4a1..c14d722e9b1ed61d2878ca752797871b
public void saveData(NBTTagCompound nbttagcompound) {
super.saveData(nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index f193c2778d0f04973546256d648692398b932dca..c54641d984bdd04067f9dba66322b01b840904ed 100644
index 99dac0a315c29dd394ea3e8049da89c62ace65cc..81e41ec85160eeef833824821d797db9b3d38b40 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -96,7 +96,7 @@ public abstract class EntityLiving extends Entity {
@ -141,17 +141,17 @@ index f193c2778d0f04973546256d648692398b932dca..c54641d984bdd04067f9dba66322b01b
public float getBukkitYaw() {
@@ -1249,13 +1250,17 @@ public abstract class EntityLiving extends Entity {
if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
if (this.dk()) {
if (this.dl()) {
if (!this.f(damagesource)) {
- SoundEffect soundeffect = this.getSoundDeath();
+ // Paper start - moved into CraftEventFactory event caller for cancellable death event
+ //SoundEffect soundeffect = this.getSoundDeath();
- if (flag1 && soundeffect != null) {
- this.playSound(soundeffect, this.getSoundVolume(), this.dG());
- this.playSound(soundeffect, this.getSoundVolume(), this.dH());
- }
+// if (flag1 && soundeffect != null) {
+// this.playSound(soundeffect, this.getSoundVolume(), this.dG());
+// this.playSound(soundeffect, this.getSoundVolume(), this.dH());
+// }
+ this.silentDeath = !flag1; // mark entity as dying silently
+ // Paper end
@ -269,15 +269,15 @@ index f193c2778d0f04973546256d648692398b932dca..c54641d984bdd04067f9dba66322b01b
return 1.0F;
}
+ public float getSoundPitch() { return dG();} // Paper - OBFHELPER
protected float dG() {
+ public float getSoundPitch() { return dH();} // Paper - OBFHELPER
protected float dH() {
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index daeb5a6e005a4b85b5f3ac581c0e7cb6ea64b2c8..db7435c6923235fad63bdf531eca4a95c1b63dc9 100644
index dd3ae707776626d54894d19d5b0968256104c4dd..08e2e911d726e9d306f5fcc7755ab89f94959aa3 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -82,6 +82,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -84,6 +84,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public int ping;
public boolean viewingCredits;
private int containerUpdateDelay; // Paper
@ -288,7 +288,7 @@ index daeb5a6e005a4b85b5f3ac581c0e7cb6ea64b2c8..db7435c6923235fad63bdf531eca4a95
// CraftBukkit start
public String displayName;
@@ -583,6 +587,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -586,6 +590,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
String deathmessage = defaultMessage.getString();
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory);
@ -304,7 +304,7 @@ index daeb5a6e005a4b85b5f3ac581c0e7cb6ea64b2c8..db7435c6923235fad63bdf531eca4a95
// SPIGOT-943 - only call if they have an inventory open
if (this.activeContainer != this.defaultContainer) {
@@ -734,8 +747,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -737,8 +750,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
}
@ -373,7 +373,7 @@ index 982b8a7028385d38ff0bd88aabd94801ae258037..6c3b9df31e9c44f7171cf08014561e4b
public void injectScaledMaxHealth(Collection<AttributeModifiable> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 78f3af7de270750734f6d8d1522e0d755408e17e..4d82634cc4f1f4ef16cb027c7edfc8b7638311b5 100644
index 1c806c97bf77cb3a71086d51110605b147bdbfbf..2222d3fdb9920f5662d42c0303bd05a4a07483c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -791,9 +791,16 @@ public class CraftEventFactory {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable connection throttle kick message
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 1b21911c3e4fd1d4a3305176bb8477c370256906..d5c97bb6503c9bfafd819dd62397b9decd515df5 100644
index aaaaead8c740a22906612ca43147bd00eb4639f7..9e10e2e965dd52755ee5ede71104cc89b11da45e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -273,6 +273,11 @@ public class PaperConfig {
@ -21,15 +21,15 @@ index 1b21911c3e4fd1d4a3305176bb8477c370256906..d5c97bb6503c9bfafd819dd62397b9de
private static void savePlayerData() {
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index 07d5036ce3b04c78f332deed65b9177b70b4361a..ad9324a6052d9fedd40fb8b0899c6ded6e60b315 100644
index abace78271eedd453df692f4e24dacef474d215e..5e1747dc176ef855829a38605ec85c8494fb0d21 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
@@ -37,7 +37,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
@@ -35,7 +35,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
synchronized (throttleTracker) {
if (throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - throttleTracker.get(address) < connectionThrottle) {
throttleTracker.put(address, currentTime);
- chatmessage = new ChatMessage("Connection throttled! Please wait before reconnecting.");
+ chatmessage = new ChatMessage(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message
- ChatMessage chatmessage = new ChatMessage("Connection throttled! Please wait before reconnecting.");
+ ChatMessage chatmessage = new ChatMessage(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message
this.c.sendPacket(new PacketLoginOutDisconnect(chatmessage));
this.c.close(chatmessage);
return;

Datei anzeigen

@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
debugging in an IDE pre-relocate.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index ac48431777b70c200f9e4113c8a0c03957126e90..fbaf078b154a0f376b4a5a076a50a5c306504663 100644
index ac48431777b70c200f9e4113c8a0c03957126e90..1d78086cb94d24372f9fbe21463e21277e25eab7 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -6,7 +6,9 @@ import java.io.FileOutputStream;
@ -52,7 +52,7 @@ index ac48431777b70c200f9e4113c8a0c03957126e90..fbaf078b154a0f376b4a5a076a50a5c3
+ if ( Boolean.getBoolean( "debug.rewriteForIde" ) )
+ {
+ // unversion incoming calls for pre-relocate debug work
+ final String NMS_REVISION_PACKAGE = "v1_16_R2/";
+ final String NMS_REVISION_PACKAGE = "v1_16_R3/";
+
+ getAndRemove.put( "net/minecraft/".concat( "server/" + NMS_REVISION_PACKAGE ), NMS_REVISION_PACKAGE );
+ getAndRemove.put( "org/bukkit/".concat( "craftbukkit/" + NMS_REVISION_PACKAGE ), NMS_REVISION_PACKAGE );

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add sun related API
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 90c38aed8f546987e45b9fd3ae9aa11b2e1f2084..033a6c50dff9e5e5706f9e7ab8b95ea7bc37d5dd 100644
index 38bf49da2cc6b2f7068462ea8b57cf3a76ae1779..d91503b3e46c6ded3d77da4feeb8350df5bf924c 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1529,6 +1529,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -15,7 +15,7 @@ index 90c38aed8f546987e45b9fd3ae9aa11b2e1f2084..033a6c50dff9e5e5706f9e7ab8b95ea7
+ public boolean isInDaylight() { return this.eG(); } // Paper - OBFHELPER
protected boolean eG() {
if (this.world.isDay() && !this.world.isClientSide) {
float f = this.aQ();
float f = this.aR();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index d193667beca3da156d8ae17cd80f4bf4c1dbfc8c..98af366848dba468d526d037a5e78fde4a4eda59 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java

Datei anzeigen

@ -19,10 +19,10 @@ spectate the target entity.
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 246de149254a6303b36ba1e2441499497c09bc5b..868dcb4b43a7d82f9df58742da6d5cd7ca5fdcc7 100644
index 08e2e911d726e9d306f5fcc7755ab89f94959aa3..0eb5d6a58a9794ed366d03b76f01abb673a6827c 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1660,15 +1660,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1663,15 +1663,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
}
@ -88,10 +88,10 @@ index 246de149254a6303b36ba1e2441499497c09bc5b..868dcb4b43a7d82f9df58742da6d5cd7
@Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index d7a62e63ea1cdc7436ee1b5d57c72bc7dec04182..441cdb07db49c32c56134c0eb6f66e2992223308 100644
index 6e3d66ab776146e2204539319412ea8bde17d58a..bb46e757b560d1bfec5c84d59971b51d9aa90bd8 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1128,6 +1128,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1204,6 +1204,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
// CraftBukkit start - Delegate to teleport(Location)

Datei anzeigen

@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index d5c97bb6503c9bfafd819dd62397b9decd515df5..478856f190a8d0177dee39dab4692fc54f9c8ed4 100644
index 9e10e2e965dd52755ee5ede71104cc89b11da45e..7b905c16e3833741966cce301b0f7639addac05e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -8,6 +8,7 @@ import java.io.IOException;
@ -130,10 +130,10 @@ index 0000000000000000000000000000000000000000..fdd8708f974700c7cde6e436c2f189d9
+ }
+}
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index a3555dd251af5dd4b320428aadaffe7063ecd356..afbe6defdffd967a841ebe51d260c418dcd23590 100644
index 87dcb1688d1bf1221609a410c33a8d61b0761a1f..2b46943e094544611390758664f3b2a3e2949323 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -25,6 +25,7 @@ import org.bukkit.craftbukkit.util.Waitable;
@@ -26,6 +26,7 @@ import org.bukkit.craftbukkit.util.Waitable;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerPreLoginEvent;
// CraftBukkit end
@ -141,7 +141,7 @@ index a3555dd251af5dd4b320428aadaffe7063ecd356..afbe6defdffd967a841ebe51d260c418
public class LoginListener implements PacketLoginInListener {
@@ -41,6 +42,7 @@ public class LoginListener implements PacketLoginInListener {
@@ -42,6 +43,7 @@ public class LoginListener implements PacketLoginInListener {
private SecretKey loginKey;
private EntityPlayer l;
public String hostname = ""; // CraftBukkit - add field
@ -149,9 +149,9 @@ index a3555dd251af5dd4b320428aadaffe7063ecd356..afbe6defdffd967a841ebe51d260c418
public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) {
this.g = LoginListener.EnumProtocolState.HELLO;
@@ -192,6 +194,14 @@ public class LoginListener implements PacketLoginInListener {
@@ -193,6 +195,14 @@ public class LoginListener implements PacketLoginInListener {
this.g = LoginListener.EnumProtocolState.KEY;
this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e));
this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic().getEncoded(), this.e));
} else {
+ // Paper start - Velocity support
+ if (com.destroystokyo.paper.PaperConfig.velocitySupport) {
@ -164,20 +164,20 @@ index a3555dd251af5dd4b320428aadaffe7063ecd356..afbe6defdffd967a841ebe51d260c418
// Spigot start
// Paper start - Cache authenticator threads
authenticatorPool.execute(new Runnable() {
@@ -284,6 +294,12 @@ public class LoginListener implements PacketLoginInListener {
@@ -294,6 +304,12 @@ public class LoginListener implements PacketLoginInListener {
public class LoginHandler {
public void fireEvents() throws Exception {
+ // Paper start - Velocity support
+ if (LoginListener.this.velocityLoginMessageId == -1 && com.destroystokyo.paper.PaperConfig.velocitySupport) {
+ disconnect("This server requires you to connect with Velocity.");
+ return;
+ }
+ // Paper end
String playerName = i.getName();
java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress();
java.util.UUID uniqueId = i.getId();
@@ -331,6 +347,35 @@ public class LoginListener implements PacketLoginInListener {
+ // Paper start - Velocity support
+ if (LoginListener.this.velocityLoginMessageId == -1 && com.destroystokyo.paper.PaperConfig.velocitySupport) {
+ disconnect("This server requires you to connect with Velocity.");
+ return;
+ }
+ // Paper end
String playerName = i.getName();
java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress();
java.util.UUID uniqueId = i.getId();
@@ -341,6 +357,35 @@ public class LoginListener implements PacketLoginInListener {
// Spigot end
public void a(PacketLoginInCustomPayload packetloginincustompayload) {

Datei anzeigen

@ -20,10 +20,10 @@ index 098c99793c68ac916b52776f9a1cc2c6510c0057..15e1f9f65280043853544d3bf796f991
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 441cdb07db49c32c56134c0eb6f66e2992223308..1ec968d871d00e6589c8572eabda9d0fb8f8f226 100644
index bb46e757b560d1bfec5c84d59971b51d9aa90bd8..b4270cab83e676ea9cd6975286f96e350a493962 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -351,6 +351,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -394,6 +394,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
@ -37,7 +37,7 @@ index 441cdb07db49c32c56134c0eb6f66e2992223308..1ec968d871d00e6589c8572eabda9d0f
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) {
// CraftBukkit end
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8);
@@ -914,9 +921,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -990,9 +997,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
double d1 = this.player.locY();
double d2 = this.player.locZ();
double d3 = this.player.locY();
@ -49,7 +49,7 @@ index 441cdb07db49c32c56134c0eb6f66e2992223308..1ec968d871d00e6589c8572eabda9d0f
float f = packetplayinflying.a(this.player.yaw);
float f1 = packetplayinflying.b(this.player.pitch);
double d7 = d4 - this.l;
@@ -955,6 +962,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1031,6 +1038,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
} else {
speed = player.abilities.walkSpeed * 10f;
}

Datei anzeigen

@ -5,22 +5,22 @@ Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 18a79f9c61c0263526cd632f032d17bdc6cb2139..52016eefd310a19297d6b16b73596aec3792aed5 100644
index 4923fe299e7f057d5d70d346e83e746185eafdd3..470f8f1440c62b30a9df6cf356003dd35a69ee46 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2263,6 +2263,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2264,6 +2264,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
+ public final int getMaxAirTicks() { return bG(); } // Paper - OBFHELPER
public int bG() {
+ public final int getMaxAirTicks() { return bH(); } // Paper - OBFHELPER
public int bH() {
return 300;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 868dcb4b43a7d82f9df58742da6d5cd7ca5fdcc7..9717ae9ead12eae7ad258b1a9d8b63c21945d934 100644
index 0eb5d6a58a9794ed366d03b76f01abb673a6827c..f07014a563e2d472f02fc17d3bbf7d8c8a7f63f5 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1997,6 +1997,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -2005,6 +2005,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
this.setHealth(this.getMaxHealth());

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow digging into unloaded chunks
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 1ec968d871d00e6589c8572eabda9d0fb8f8f226..4861666aa091554dea8aa6f8563547eceb26041e 100644
index b4270cab83e676ea9cd6975286f96e350a493962..1adf90526360bd0cf2a46251dd767498ac44565c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1292,6 +1292,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1368,6 +1368,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
case START_DESTROY_BLOCK:
case ABORT_DESTROY_BLOCK:
case STOP_DESTROY_BLOCK:
@ -21,7 +21,7 @@ index 1ec968d871d00e6589c8572eabda9d0fb8f8f226..4861666aa091554dea8aa6f8563547ec
return;
default:
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 0aa9b3a0d2aec8072fe32e43ed16946f22b29fab..b129d650c940d5b98f7dd04542c293e3f3045569 100644
index 9b282a917e797a652b5ec10f1f9f550b6d82777f..3056468a7e70238228b91be0f103cfbe111fedb5 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -80,8 +80,8 @@ public class PlayerInteractManager {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 478856f190a8d0177dee39dab4692fc54f9c8ed4..01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed 100644
index 7b905c16e3833741966cce301b0f7639addac05e..b61a1925ba09bb6e9f59baa6df111d994edd1169 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -334,4 +334,11 @@ public class PaperConfig {
@ -22,23 +22,23 @@ index 478856f190a8d0177dee39dab4692fc54f9c8ed4..01d48da8b2f89ad3a615ad10c044c5f0
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 4861666aa091554dea8aa6f8563547eceb26041e..b6db6b7980e3d90b0b5f9bc3758adebc9625c8dc 100644
index 1adf90526360bd0cf2a46251dd767498ac44565c..58102ee94907b9ab1bac93b4086d8aa4c6b06287 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -14,6 +14,7 @@ import java.util.Optional;
import java.util.Set;
@@ -20,6 +20,7 @@ import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.Nullable;
+import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -809,6 +810,42 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -852,6 +853,42 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInBEdit packetplayinbedit) {
+ // Paper start
+ ItemStack testStack = packetplayinbedit.b();
+ ItemStack testStack = packetplayinbedit.b(); // TODO(Proximyst): Add obfhelper here
+ if (!server.isPrimaryThread() && !testStack.isEmpty() && testStack.getTag() != null) {
+ NBTTagList pageList = testStack.getTag().getList("pages", 8);
+ long byteTotal = 0;
@ -73,6 +73,6 @@ index 4861666aa091554dea8aa6f8563547eceb26041e..b6db6b7980e3d90b0b5f9bc3758adebc
+ }
+ }
+ // Paper end
PlayerConnectionUtils.ensureMainThread(packetplayinbedit, this, this.player.getWorldServer());
// CraftBukkit start
if (this.lastBookTick + 20 > MinecraftServer.currentTick) {
this.disconnect("Book edited too quickly!");

Datei anzeigen

@ -20,16 +20,16 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 52016eefd310a19297d6b16b73596aec3792aed5..82408036e833880aedb073e30bcb4444667639ca 100644
index 470f8f1440c62b30a9df6cf356003dd35a69ee46..ea0525ca0b52b3270b868cc8a526c7139baa4db8 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1953,12 +1953,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1954,12 +1954,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
- public void be() {
- public void bf() {
+ // Paper start
+ public void be() { stopRiding(false); }
+ public void bf() { stopRiding(false); }
+ public void stopRiding(boolean suppressCancellation) {
+ // Paper end
if (this.vehicle != null) {
@ -41,7 +41,7 @@ index 52016eefd310a19297d6b16b73596aec3792aed5..82408036e833880aedb073e30bcb4444
}
}
@@ -2013,7 +2016,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2014,7 +2017,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return true; // CraftBukkit
}
@ -53,7 +53,7 @@ index 52016eefd310a19297d6b16b73596aec3792aed5..82408036e833880aedb073e30bcb4444
if (entity.getVehicle() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else {
@@ -2023,7 +2029,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2024,7 +2030,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
VehicleExitEvent event = new VehicleExitEvent(
(Vehicle) getBukkitEntity(),
@ -62,7 +62,7 @@ index 52016eefd310a19297d6b16b73596aec3792aed5..82408036e833880aedb073e30bcb4444
);
// Suppress during worldgen
if (this.valid) {
@@ -2037,7 +2043,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2038,7 +2044,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
// CraftBukkit end
// Spigot start
@ -72,7 +72,7 @@ index 52016eefd310a19297d6b16b73596aec3792aed5..82408036e833880aedb073e30bcb4444
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index a6265c71973b67a0b49a41e2163a6f48876f1b41..272f4ff0a59350a088d6699a9fcb6bb9f8e95551 100644
index 6a46b9262ba34febc2664a6f56c186843ed7fb3f..21bace17c7cac0b895ac1ab16ae43bb207a725ab 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -942,9 +942,11 @@ public abstract class EntityHuman extends EntityLiving {
@ -80,10 +80,10 @@ index a6265c71973b67a0b49a41e2163a6f48876f1b41..272f4ff0a59350a088d6699a9fcb6bb9
}
- @Override
- public void be() {
- super.be();
- public void bf() {
- super.bf();
+ // Paper start
+ @Override public void be() { stopRiding(false); }
+ @Override public void bf() { stopRiding(false); }
+ @Override public void stopRiding(boolean suppressCancellation) {
+ // Paper end
+ super.stopRiding(suppressCancellation); // Paper - suppress
@ -91,7 +91,7 @@ index a6265c71973b67a0b49a41e2163a6f48876f1b41..272f4ff0a59350a088d6699a9fcb6bb9
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c54641d984bdd04067f9dba66322b01b840904ed..fb86ed22331ca8194460da7210f03a4c7e01abc3 100644
index 81e41ec85160eeef833824821d797db9b3d38b40..eaaef11527bc325d6cd6d3b1bc24c59eb8f5ba95 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2904,11 +2904,13 @@ public abstract class EntityLiving extends Entity {
@ -112,10 +112,10 @@ index c54641d984bdd04067f9dba66322b01b840904ed..fb86ed22331ca8194460da7210f03a4c
this.a(entity);
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 9717ae9ead12eae7ad258b1a9d8b63c21945d934..0bc51dd94d87b469022183c5a4f94cebe9f1a950 100644
index f07014a563e2d472f02fc17d3bbf7d8c8a7f63f5..c2726933790ec58bf9ae84969b973dd727fac059 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1107,11 +1107,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1110,11 +1110,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}

Datei anzeigen

@ -34,10 +34,10 @@ how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent
is undefined.
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index afbe6defdffd967a841ebe51d260c418dcd23590..0cb8f5a4a5cc5e302815af4c1ed325dfbc75235b 100644
index 2b46943e094544611390758664f3b2a3e2949323..0b1baeab3075a741519c6875f7b4847ce6cad8fc 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -35,9 +35,9 @@ public class LoginListener implements PacketLoginInListener {
@@ -36,9 +36,9 @@ public class LoginListener implements PacketLoginInListener {
private final byte[] e = new byte[4];
private final MinecraftServer server;
public final NetworkManager networkManager;
@ -50,7 +50,7 @@ index afbe6defdffd967a841ebe51d260c418dcd23590..0cb8f5a4a5cc5e302815af4c1ed325df
private SecretKey loginKey;
private EntityPlayer l;
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index 9ea4ce3aa6a43906eb7bf9593de0191a94242da2..8508f5f5136791ffcdf200f0087548ea636a9a7f 100644
index c90c616860b5157956250e4fe21e1764dd04881c..511a480aa962fd2659e929bb274297db6baf437e 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -340,6 +340,26 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {

Datei anzeigen

@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index e69fd9985ea99c46ac20bf5cabd961eeccdbc7c1..32b2d592f2e2e736ab46a08ecbad89bc3adc3f2b 100644
index c2726933790ec58bf9ae84969b973dd727fac059..508fe73d2117be31f929c577b9aa4fb44c0fa226 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -82,6 +82,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -84,6 +84,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public int ping;
public boolean viewingCredits;
private int containerUpdateDelay; // Paper

Datei anzeigen

@ -1,30 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Himing <mhiming@gmail.com>
Date: Sun, 16 Dec 2018 13:07:33 +1100
Subject: [PATCH] Fix PlayerEditBookEvent
- Updating book writing (not signing) mutated the original item, making
it impossible to properly cancel the event or modify the book meta
- When the event was cancelled, the client's book would keep the
cancelled writing
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b6db6b7980e3d90b0b5f9bc3758adebc9625c8dc..5fa1d0756d6e47a360dbdac89235941be67c4692 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -885,9 +885,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
itemstack2.a("pages", (NBTBase) nbttaglist);
this.player.a(packetplayinbedit.d(), CraftEventFactory.handleEditBookEvent(player, enumitemslot, itemstack1, itemstack2)); // CraftBukkit
} else {
- ItemStack old = itemstack1.cloneItemStack(); // CraftBukkit
- itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8));
- CraftEventFactory.handleEditBookEvent(player, enumitemslot, old, itemstack1); // CraftBukkit
+ // Paper start - dont mutate players current item, set it from the event
+ ItemStack newBook = itemstack1.cloneItemStack();
+ newBook.getOrCreateTagAndSet("pages", (NBTBase)itemstack.getTag().getList("pages", 8));
+ this.player.setSlot(enumitemslot, CraftEventFactory.handleEditBookEvent(player, enumitemslot, itemstack1, newBook));
+ // Paper end
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 71604e01fe6d7dc5d8c500c10ae8b54075848b4f..433140dc33fe2a9eb8241afc2aabf97378dcefdd 100644
index 508fe73d2117be31f929c577b9aa4fb44c0fa226..b518b49aa96ff63ac4907e5baa09c5789a07949d 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1373,6 +1373,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1376,6 +1376,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void p() {
this.ch = true;
this.ejectPassengers();

Datei anzeigen

@ -11,7 +11,7 @@ floating in the air.
This can replace many uses of BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 42307f0ed23c413f86edf3ac2783f258560ac969..abc73ccc26d1496434009ba09e2e08dbe5784d7b 100644
index caeca1b5b6aafa5770924c3f9e0cc264f23156ef..4d69dd189091681fee7634f9ffa00c4afb63011f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -499,8 +499,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix sign edit memory leak
when a player edits a sign, a reference to their Entity is never cleand up.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 5fa1d0756d6e47a360dbdac89235941be67c4692..ca0f14a34e5167c544cef47f675a48baef44294b 100644
index 58102ee94907b9ab1bac93b4086d8aa4c6b06287..b1faac1e2465cdae624ca5d8d999db3cdedfe3de 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2588,7 +2588,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2682,7 +2682,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
TileEntitySign tileentitysign = (TileEntitySign) tileentity;

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