Update to 1.14.4 (#2333)

This commit is contained in:
Spottedleaf 2019-07-19 21:01:24 -07:00 committed by Zach
parent a41d51f098
commit 9fe63a1673
328 changed files with 1938 additions and 1954 deletions

View File

@ -1,14 +1,14 @@
From 5517592aa39fa15d51e8e186af82b46219c0223e Mon Sep 17 00:00:00 2001
From 9524ffe0f99ca69cf2478a834000bd6959a981d5 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 00:16:08 +0100
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index b5532ae6..a85aaa1a 100644
index 23d0a44a2..aef4ec33d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,34 +2,29 @@
@@ -2,34 +2,28 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@ -22,8 +22,7 @@ index b5532ae6..a85aaa1a 100644
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.14.3-R0.1-SNAPSHOT</version>
+
<version>1.14.4-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>
@ -54,7 +53,7 @@ index b5532ae6..a85aaa1a 100644
<repositories>
<!--
If you are a plugin developer, please use https://hub.spigotmc.org/nexus/content/repositories/snapshots/
@@ -41,6 +36,10 @@
@@ -41,6 +35,10 @@
<id>spigotmc-public</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
@ -65,7 +64,7 @@ index b5532ae6..a85aaa1a 100644
</repositories>
<pluginRepositories>
@@ -57,6 +56,20 @@
@@ -57,6 +55,20 @@
<version>2.6</version>
<scope>compile</scope>
</dependency>
@ -86,7 +85,7 @@ index b5532ae6..a85aaa1a 100644
<!-- bundled with Minecraft, should be kept in sync -->
<dependency>
<groupId>com.google.guava</groupId>
@@ -113,15 +126,12 @@
@@ -113,15 +125,12 @@
</dependencies>
<build>
@ -103,7 +102,7 @@ index b5532ae6..a85aaa1a 100644
<dependencies>
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
<dependency>
@@ -156,6 +166,7 @@
@@ -156,6 +165,7 @@
</execution>
</executions>
<configuration>

View File

@ -1,4 +1,4 @@
From fa8d0d47698759ed68d4d63544b943369a5fa77c Mon Sep 17 00:00:00 2001
From 900d1808e8b2df014a6f10a66d8293484735f9dc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 1 Apr 2016 00:02:47 -0400
Subject: [PATCH] Add FastUtil to Bukkit
@ -6,10 +6,10 @@ Subject: [PATCH] Add FastUtil to Bukkit
Doesn't expose to plugins, just allows Paper-API to use it for optimization
diff --git a/pom.xml b/pom.xml
index a85aaa1a..e65cbc15 100644
index aef4ec33d..2daee11a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,6 +50,12 @@
@@ -49,6 +49,12 @@
</pluginRepositories>
<dependencies>

View File

@ -1,4 +1,4 @@
From 69ce0886b5a5faff5c6f3b0cd144d74e15e26f62 Mon Sep 17 00:00:00 2001
From d87d2f7f427676e03cff1ec88420117d8dd7f993 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 13:20:33 -0700
Subject: [PATCH] Use ASM for event executors.
@ -6,10 +6,10 @@ Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods.
diff --git a/pom.xml b/pom.xml
index e65cbc15..a1dd0ac2 100644
index 2daee11a2..709b7a222 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,6 +129,17 @@
@@ -128,6 +128,17 @@
<version>7.1</version>
<scope>test</scope>
</dependency>
@ -29,7 +29,7 @@ index e65cbc15..a1dd0ac2 100644
<build>
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java
new file mode 100644
index 00000000..5b28e9b1
index 000000000..5b28e9b1d
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java
@@ -0,0 +1,42 @@
@ -77,7 +77,7 @@ index 00000000..5b28e9b1
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java
new file mode 100644
index 00000000..c8367242
index 000000000..c83672427
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java
@@ -0,0 +1,43 @@
@ -126,7 +126,7 @@ index 00000000..c8367242
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
new file mode 100644
index 00000000..b6e7d8ee
index 000000000..b6e7d8ee8
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
@@ -0,0 +1,47 @@
@ -179,7 +179,7 @@ index 00000000..b6e7d8ee
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
new file mode 100644
index 00000000..beed9e6e
index 000000000..beed9e6e0
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
@@ -0,0 +1,35 @@
@ -220,7 +220,7 @@ index 00000000..beed9e6e
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java
new file mode 100644
index 00000000..ac99477e
index 000000000..ac99477e9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java
@@ -0,0 +1,66 @@
@ -292,7 +292,7 @@ index 00000000..ac99477e
+}
diff --git a/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java
new file mode 100644
index 00000000..72e48e8e
index 000000000..72e48e8ef
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java
@@ -0,0 +1,35 @@
@ -332,7 +332,7 @@ index 00000000..72e48e8e
+ }
+}
diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java
index a850f078..9026e108 100644
index a850f0780..9026e108c 100644
--- a/src/main/java/org/bukkit/plugin/EventExecutor.java
+++ b/src/main/java/org/bukkit/plugin/EventExecutor.java
@@ -5,9 +5,75 @@ import org.bukkit.event.EventException;
@ -412,7 +412,7 @@ index a850f078..9026e108 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 12601db6..06b6724f 100644
index 12601db68..06b6724fa 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -301,21 +301,7 @@ public final class JavaPluginLoader implements PluginLoader {

View File

@ -1,4 +1,4 @@
From 20af2ff69a3f0159a59f104960b7b769cea9901f Mon Sep 17 00:00:00 2001
From 42992ea0a373658e8d49bac0fe96d13aab7128d9 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:33:12 +0200
Subject: [PATCH] Allow plugins to use SLF4J for logging
@ -14,10 +14,10 @@ it without having to shade it in the plugin and going through
several layers of logging abstraction.
diff --git a/pom.xml b/pom.xml
index a1dd0ac2..df8fc517 100644
index 709b7a222..5088c3315 100644
--- a/pom.xml
+++ b/pom.xml
@@ -110,6 +110,13 @@
@@ -109,6 +109,13 @@
<version>17.0.0</version>
<scope>provided</scope>
</dependency>
@ -32,7 +32,7 @@ index a1dd0ac2..df8fc517 100644
<dependency>
<groupId>junit</groupId>
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
index febfec6e..79890c68 100644
index febfec6ef..79890c68f 100644
--- a/src/main/java/org/bukkit/plugin/Plugin.java
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
@@ -166,6 +166,13 @@ public interface Plugin extends TabExecutor {

View File

@ -1,11 +1,11 @@
From 4c628f35e6729657249dce1859413e0a61822416 Mon Sep 17 00:00:00 2001
From 566af2ba410dc0dfd23c752b3f94cc20a39fc736 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 519a3319ca..75c1b84f6a 100644
index 0f8bccd430..04b0dd9a7f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,15 +1,14 @@
@ -16,7 +16,7 @@ index 519a3319ca..75c1b84f6a 100644
- <artifactId>spigot</artifactId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.14.3-R0.1-SNAPSHOT</version>
<version>1.14.4-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
+ <name>Paper</name>
@ -27,7 +27,7 @@ index 519a3319ca..75c1b84f6a 100644
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version>
<minecraft.version>1.14.3</minecraft.version>
<minecraft.version>1.14.4</minecraft.version>
@@ -22,16 +21,16 @@
</properties>

View File

@ -1,4 +1,4 @@
From 7bc91c774360b1e26e2c2a45139abf21241a76ab Mon Sep 17 00:00:00 2001
From d99eaf4f0c6f2a9b5cd3be7cee05369dca7244d1 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files
@ -518,7 +518,7 @@ index 0000000000..a738657394
+ }
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 82ff352d8a..c088ff9692 100644
index d88c9b6f65..5e0797afde 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -152,6 +152,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -538,7 +538,7 @@ index 82ff352d8a..c088ff9692 100644
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f949ace59d..5f560d93a2 100644
index 9eea61fc2b..d4dff91586 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -134,9 +134,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
@ -555,19 +555,19 @@ index f949ace59d..5f560d93a2 100644
public boolean impulse;
public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index eee82c20e1..0c712f77de 100644
index e34ef4531c..43d207ae59 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils;
import com.mojang.datafixers.types.Type;
@@ -3,6 +3,7 @@ package net.minecraft.server;
import com.mojang.datafixers.DataFixUtils;
import java.util.Collections;
import java.util.Optional;
+import java.util.Set; // Paper
import java.util.UUID;
import java.util.function.Function;
import java.util.stream.Stream;
@@ -427,4 +428,10 @@ public class EntityTypes<T extends Entity> {
return new EntityTypes<>(this.a, this.b, this.c, this.d, this.e, type, this.f);
@@ -434,4 +435,10 @@ public class EntityTypes<T extends Entity> {
return new EntityTypes<>(this.a, this.b, this.c, this.d, this.e, this.f, this.g);
}
}
+
@ -578,7 +578,7 @@ index eee82c20e1..0c712f77de 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index d375a40012..e9d65c9275 100644
index bec64d7f28..7f648dbbc9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -86,6 +86,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -599,7 +599,7 @@ index d375a40012..e9d65c9275 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6e4b23b7d1..64d39414ac 100644
index 8465a91088..4d38bf5018 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -756,6 +756,7 @@ public final class CraftServer implements Server {
@ -663,7 +663,7 @@ index 6e4b23b7d1..64d39414ac 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e17d914185..f406464ef8 100644
index 87088cf691..d28530051d 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -128,6 +128,14 @@ public class Main {

View File

@ -1,14 +1,14 @@
From 659ea460bfdd40bc6b027dc326f40bcf22efb79a Mon Sep 17 00:00:00 2001
From 7f5c894288d4476ea577befbbb98c3eca8b59530 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 26fa6e7b6..9a839d654 100644
index 94df229c7b..65daa76bc1 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -42,7 +42,7 @@ public abstract class BiomeBase {
@@ -53,7 +53,7 @@ public abstract class BiomeBase {
@Nullable
public static BiomeBase a(BiomeBase biomebase) {
@ -17,7 +17,7 @@ index 26fa6e7b6..9a839d654 100644
}
public static <C extends WorldGenCarverConfiguration> WorldGenCarverWrapper<C> a(WorldGenCarverAbstract<C> worldgencarverabstract, C c0) {
@@ -202,7 +202,7 @@ public abstract class BiomeBase {
@@ -232,7 +232,7 @@ public abstract class BiomeBase {
@Nullable
public <C extends WorldGenFeatureConfiguration> C b(StructureGenerator<C> structuregenerator) {
@ -27,7 +27,7 @@ index 26fa6e7b6..9a839d654 100644
public List<WorldGenFeatureConfigured<?>> e() {
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
index adc998186..b37031657 100644
index cd277dd17f..ab05425793 100644
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
@@ -29,7 +29,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
@ -43,8 +43,8 @@ index adc998186..b37031657 100644
}
public <T extends Comparable<T>> S a(IBlockState<T> iblockstate) {
- return this.set(iblockstate, (Comparable) a(iblockstate.d(), this.get(iblockstate)));
+ return this.set(iblockstate, a(iblockstate.d(), this.get(iblockstate))); // Paper - decompiler fix
- return this.set(iblockstate, (Comparable) a(iblockstate.getValues(), this.get(iblockstate)));
+ return this.set(iblockstate, a(iblockstate.getValues(), this.get(iblockstate))); // Paper - decompile fix
}
protected static <T> T a(Collection<T> collection, T t0) {
@ -72,7 +72,7 @@ index adc998186..b37031657 100644
S s0 = this.f.get(iblockstate, v0);
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 6a8e8f7a6..daf406637 100644
index 6a8e8f7a67..daf406637c 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
@ -92,7 +92,7 @@ index 6a8e8f7a6..daf406637 100644
});
}
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
index b4c8722f0..59d86fc66 100644
index 28cfbaae28..1486d460c8 100644
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
@@ -20,10 +20,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
@ -109,10 +109,10 @@ index b4c8722f0..59d86fc66 100644
if (this.b.containsKey(s1)) {
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index d4b7074ca..f4605e393 100644
index 22375330b2..473be2c695 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -148,6 +148,6 @@ public class ChunkSection {
@@ -142,6 +142,6 @@ public class ChunkSection {
}
public boolean a(IBlockData iblockdata) {
@ -121,7 +121,7 @@ index d4b7074ca..f4605e393 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
index 26db8f135..dd1822d6f 100644
index 26db8f135f..dd1822d6ff 100644
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
@@ -84,7 +84,7 @@ public class ChunkStatus {
@ -134,7 +134,7 @@ index 26db8f135..dd1822d6f 100644
for (int j = a().size() - 1; j >= 0; --j) {
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
index d0b4bf8b7..6fb734c64 100644
index d0b4bf8b7e..6fb734c64f 100644
--- a/src/main/java/net/minecraft/server/CraftingManager.java
+++ b/src/main/java/net/minecraft/server/CraftingManager.java
@@ -58,7 +58,7 @@ public class CraftingManager extends ResourceDataJson {
@ -147,7 +147,7 @@ index d0b4bf8b7..6fb734c64 100644
CraftingManager.LOGGER.info("Loaded {} recipes", map1.size());
}
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
index 85af024c9..daa7bf330 100644
index fe57e1c75e..06918b8c91 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 {
@ -160,10 +160,10 @@ index 85af024c9..daa7bf330 100644
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true));
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 053d408d3..4510018d6 100644
index efa496fcc0..70a4509055 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -51,7 +51,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@@ -55,7 +55,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
return this.executeFuture(runnable);
} else {
runnable.run();
@ -172,7 +172,7 @@ index 053d408d3..4510018d6 100644
}
}
@@ -86,14 +86,14 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@@ -90,14 +90,14 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
}
protected boolean executeNext() {
@ -190,7 +190,7 @@ index 053d408d3..4510018d6 100644
}
}
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
index 2ed611980..6e365f402 100644
index 2ed6119804..6e365f402c 100644
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
@@ -96,7 +96,7 @@ public interface IBlockAccess {
@ -203,10 +203,10 @@ index 2ed611980..6e365f402 100644
do {
if (d12 > 1.0D && d13 > 1.0D && d14 > 1.0D) {
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
index 21321805e..452602d43 100644
index fa51b372c1..3328a84792 100644
--- a/src/main/java/net/minecraft/server/IBlockData.java
+++ b/src/main/java/net/minecraft/server/IBlockData.java
@@ -269,12 +269,12 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
@@ -277,12 +277,12 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
public static <T> Dynamic<T> a(DynamicOps<T> dynamicops, IBlockData iblockdata) {
ImmutableMap<IBlockState<?>, Comparable<?>> immutablemap = iblockdata.getStateMap();
@ -221,7 +221,7 @@ index 21321805e..452602d43 100644
return Pair.of(dynamicops.createString(((IBlockState) entry.getKey()).a()), dynamicops.createString(IBlockDataHolder.b((IBlockState) entry.getKey(), (Comparable) entry.getValue())));
}).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))));
}
@@ -332,9 +332,9 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
@@ -344,9 +344,9 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
if (!iblockdata.o()) {
this.f = null;
} else {
@ -230,14 +230,23 @@ index 21321805e..452602d43 100644
VoxelShape voxelshape = block.h(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO);
- EnumDirection[] aenumdirection = IBlockData.a.a;
+ EnumDirection[] aenumdirection = a; // Paper - decompile fix
int i = aenumdirection.length;
for (int j = 0; j < i; ++j) {
i = aenumdirection.length;
@@ -362,7 +362,7 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
return this.g.b(enumdirection_enumaxis) < 0.0D || this.g.c(enumdirection_enumaxis) > 1.0D;
});
this.i = new boolean[6];
- EnumDirection[] aenumdirection1 = IBlockData.a.a;
+ EnumDirection[] aenumdirection1 = a; // Paper - decompile fix
int k = aenumdirection1.length;
for (i = 0; i < k; ++i) {
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
index b4b73e5f0..3a86c519c 100644
index b86efbd2dc..dca18afdbb 100644
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
@@ -39,7 +39,7 @@ public interface IEntityAccess {
@@ -47,7 +47,7 @@ public interface IEntityAccess {
return Stream.empty();
} else {
AxisAlignedBB axisalignedbb1 = axisalignedbb.g(1.0E-7D);
@ -246,7 +255,7 @@ index b4b73e5f0..3a86c519c 100644
return !set.contains(entity1);
}).filter((entity1) -> {
return entity == null || !entity.x(entity1);
@@ -47,7 +47,6 @@ public interface IEntityAccess {
@@ -55,7 +55,6 @@ public interface IEntityAccess {
return Stream.of(entity1.aq(), entity == null ? null : entity.j(entity1));
}).filter(Objects::nonNull);
@ -254,7 +263,7 @@ index b4b73e5f0..3a86c519c 100644
return stream.filter(axisalignedbb1::c).map(VoxelShapes::a);
}
}
@@ -149,17 +148,17 @@ public interface IEntityAccess {
@@ -157,22 +156,22 @@ public interface IEntityAccess {
@Nullable
default <T extends EntityLiving> T a(Class<? extends T> oclass, PathfinderTargetCondition pathfindertargetcondition, @Nullable EntityLiving entityliving, double d0, double d1, double d2, AxisAlignedBB axisalignedbb) {
@ -262,6 +271,12 @@ index b4b73e5f0..3a86c519c 100644
+ return this.a(this.a(oclass, axisalignedbb, null), pathfindertargetcondition, entityliving, d0, d1, d2); // Paper - decompile fix
}
@Nullable
default <T extends EntityLiving> T b(Class<? extends T> oclass, PathfinderTargetCondition pathfindertargetcondition, @Nullable EntityLiving entityliving, double d0, double d1, double d2, AxisAlignedBB axisalignedbb) {
- return this.a(this.b(oclass, axisalignedbb, (Predicate) null), pathfindertargetcondition, entityliving, d0, d1, d2);
+ return this.a(this.b(oclass, axisalignedbb, null), pathfindertargetcondition, entityliving, d0, d1, d2); // Paper - decompile fix
}
@Nullable
default <T extends EntityLiving> T a(List<? extends T> list, PathfinderTargetCondition pathfindertargetcondition, @Nullable EntityLiving entityliving, double d0, double d1, double d2) {
double d3 = -1.0D;
@ -275,7 +290,7 @@ index b4b73e5f0..3a86c519c 100644
if (pathfindertargetcondition.a(entityliving, t1)) {
double d4 = t1.e(d0, d1, d2);
@@ -192,10 +191,10 @@ public interface IEntityAccess {
@@ -205,10 +204,10 @@ public interface IEntityAccess {
default <T extends EntityLiving> List<T> a(Class<? extends T> oclass, PathfinderTargetCondition pathfindertargetcondition, EntityLiving entityliving, AxisAlignedBB axisalignedbb) {
List<T> list = this.a(oclass, axisalignedbb, (Predicate) null);
List<T> list1 = Lists.newArrayList();
@ -289,7 +304,7 @@ index b4b73e5f0..3a86c519c 100644
if (pathfindertargetcondition.a(entityliving, t0)) {
list1.add(t0);
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
index 929053491..1016325bd 100644
index 9290534917..1016325bd7 100644
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
@@ -127,7 +127,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
@ -317,7 +332,7 @@ index 929053491..1016325bd 100644
}
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
index eab34088a..7a987c6be 100644
index eab34088a6..7a987c6be3 100644
--- a/src/main/java/net/minecraft/server/NBTBase.java
+++ b/src/main/java/net/minecraft/server/NBTBase.java
@@ -88,7 +88,7 @@ public interface NBTBase {
@ -330,7 +345,7 @@ index eab34088a..7a987c6be 100644
default String asString() {
return this.toString();
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
index 0dda7aaf6..4e20cfba4 100644
index 0dda7aaf69..4e20cfba41 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
@@ -134,7 +134,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
@ -343,7 +358,7 @@ index 0dda7aaf6..4e20cfba4 100644
}
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
index 7f89562e9..4efcb8b59 100644
index 7f89562e90..4efcb8b595 100644
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
@@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> {
@ -356,7 +371,7 @@ index 7f89562e9..4efcb8b59 100644
this.c.set(i, t0);
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
index 4cb78c6a3..e15d28671 100644
index 4cb78c6a3f..e15d286710 100644
--- a/src/main/java/net/minecraft/server/RegistryID.java
+++ b/src/main/java/net/minecraft/server/RegistryID.java
@@ -17,9 +17,9 @@ public class RegistryID<K> implements Registry<K> {
@ -384,7 +399,7 @@ index 4cb78c6a3..e15d28671 100644
this.f = 0;
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
index 62c39f9ba..376219a1c 100644
index 1676ae2b36..0df534b563 100644
--- a/src/main/java/net/minecraft/server/SystemUtils.java
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
@@ -45,8 +45,8 @@ public class SystemUtils {
@ -427,8 +442,21 @@ index 62c39f9ba..376219a1c 100644
acompletablefuture[i] = completablefuture1.whenComplete((object, throwable) -> {
if (throwable != null) {
completablefuture.completeExceptionally(throwable);
diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java
index c23a366b2c..0430ca5353 100644
--- a/src/main/java/net/minecraft/server/Ticket.java
+++ b/src/main/java/net/minecraft/server/Ticket.java
@@ -24,7 +24,7 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {
} else {
int j = Integer.compare(System.identityHashCode(this.a), System.identityHashCode(ticket.a));
- return j != 0 ? j : this.a.a().compare(this.identifier, ticket.identifier);
+ return j != 0 ? j : this.a.a().compare(this.identifier, (T)ticket.identifier); // Paper - decompile fix
}
}
diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java
index 73f9da1fd..2a4e4f785 100644
index 2fbb1f8df9..8cee460bd3 100644
--- a/src/main/java/net/minecraft/server/VillagerTrades.java
+++ b/src/main/java/net/minecraft/server/VillagerTrades.java
@@ -15,12 +15,12 @@ import javax.annotation.Nullable;
@ -437,18 +465,18 @@ index 73f9da1fd..2a4e4f785 100644
- public static final Map<VillagerProfession, Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]>> a = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
+ public static final Map<VillagerProfession, Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]>> a = SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // Paper - decompile fix
hashmap.put(VillagerProfession.FARMER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHEAT, 20, 8, 2), new VillagerTrades.b(Items.POTATO, 26, 8, 2), new VillagerTrades.b(Items.CARROT, 22, 8, 2), new VillagerTrades.b(Items.BEETROOT, 15, 8, 2), new VillagerTrades.h(Items.BREAD, 1, 6, 8, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.PUMPKIN, 6, 6, 10), new VillagerTrades.h(Items.PUMPKIN_PIE, 1, 4, 5), new VillagerTrades.h(Items.APPLE, 1, 4, 8, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.COOKIE, 3, 18, 10), new VillagerTrades.b(Blocks.MELON, 4, 6, 20)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Blocks.CAKE, 1, 1, 6, 15), new VillagerTrades.i(MobEffects.FASTER_MOVEMENT, 160, 15), new VillagerTrades.i(MobEffects.JUMP, 160, 15), new VillagerTrades.i(MobEffects.WEAKNESS, 140, 15), new VillagerTrades.i(MobEffects.BLINDNESS, 120, 15), new VillagerTrades.i(MobEffects.POISON, 280, 15), new VillagerTrades.i(MobEffects.SATURATION, 7, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GOLDEN_CARROT, 3, 3, 30), new VillagerTrades.h(Items.GLISTERING_MELON_SLICE, 4, 3, 30)})));
- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 8, 2), new VillagerTrades.b(Items.COAL, 10, 8, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 8, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 8, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 8, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 8, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 8, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 2, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 6, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 6, 30), new VillagerTrades.c(1, 6, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())})));
+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 8, 2), new VillagerTrades.b(Items.COAL, 10, 8, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 8, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 8, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 8, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 8, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 8, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 2, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 6, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 6, 30), new VillagerTrades.c(1, 6, 30, ImmutableMap.<VillagerType, Item>builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // Paper - decompile fix
hashmap.put(VillagerProfession.SHEPHERD, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.WHITE_WOOL, 18, 8, 2), new VillagerTrades.b(Blocks.BROWN_WOOL, 18, 8, 2), new VillagerTrades.b(Blocks.BLACK_WOOL, 18, 8, 2), new VillagerTrades.b(Blocks.GRAY_WOOL, 18, 8, 2), new VillagerTrades.h(Items.SHEARS, 2, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHITE_DYE, 12, 8, 10), new VillagerTrades.b(Items.GRAY_DYE, 12, 8, 10), new VillagerTrades.b(Items.BLACK_DYE, 12, 8, 10), new VillagerTrades.b(Items.LIGHT_BLUE_DYE, 12, 8, 10), new VillagerTrades.b(Items.LIME_DYE, 12, 8, 10), new VillagerTrades.h(Blocks.WHITE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.ORANGE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.MAGENTA_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.YELLOW_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.LIME_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.PINK_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.GRAY_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.CYAN_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.PURPLE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.BLUE_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.BROWN_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.GREEN_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.RED_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.BLACK_WOOL, 1, 1, 8, 5), new VillagerTrades.h(Blocks.WHITE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.ORANGE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.MAGENTA_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.YELLOW_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.LIME_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.PINK_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.GRAY_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.CYAN_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.PURPLE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.BLUE_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.BROWN_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.GREEN_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.RED_CARPET, 1, 4, 8, 5), new VillagerTrades.h(Blocks.BLACK_CARPET, 1, 4, 8, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.YELLOW_DYE, 12, 8, 20), new VillagerTrades.b(Items.LIGHT_GRAY_DYE, 12, 8, 20), new VillagerTrades.b(Items.ORANGE_DYE, 12, 8, 20), new VillagerTrades.b(Items.RED_DYE, 12, 8, 20), new VillagerTrades.b(Items.PINK_DYE, 12, 8, 20), new VillagerTrades.h(Blocks.WHITE_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.YELLOW_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.RED_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.BLACK_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.BLUE_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.BROWN_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.CYAN_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.GRAY_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.GREEN_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.LIGHT_BLUE_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.LIGHT_GRAY_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.LIME_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.MAGENTA_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.ORANGE_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.PINK_BED, 3, 1, 6, 10), new VillagerTrades.h(Blocks.PURPLE_BED, 3, 1, 6, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BROWN_DYE, 12, 8, 30), new VillagerTrades.b(Items.PURPLE_DYE, 12, 8, 30), new VillagerTrades.b(Items.BLUE_DYE, 12, 8, 30), new VillagerTrades.b(Items.GREEN_DYE, 12, 8, 30), new VillagerTrades.b(Items.MAGENTA_DYE, 12, 8, 30), new VillagerTrades.b(Items.CYAN_DYE, 12, 8, 30), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 6, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 6, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.PAINTING, 2, 3, 30)})));
hashmap.put(VillagerProfession.FLETCHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STICK, 32, 8, 2), new VillagerTrades.h(Items.ARROW, 1, 16, 1), new VillagerTrades.g(Blocks.GRAVEL, 10, Items.FLINT, 10, 6, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FLINT, 26, 6, 10), new VillagerTrades.h(Items.BOW, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 14, 8, 20), new VillagerTrades.h(Items.CROSSBOW, 3, 1, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FEATHER, 24, 8, 30), new VillagerTrades.e(Items.BOW, 2, 2, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.dE, 8, 6, 30), new VillagerTrades.e(Items.CROSSBOW, 3, 2, 15), new VillagerTrades.j(Items.ARROW, 5, Items.TIPPED_ARROW, 5, 2, 6, 30)})));
- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 8, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 6, 3, 6, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 6, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pQ, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 6, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 6, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build()));
+ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.<Integer, VillagerTrades.IMerchantRecipeOption[]>builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 8, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 6, 3, 6, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 6, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pQ, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 6, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 6, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Paper - decompile fix
hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 8, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.df, 11, 8, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 6, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 6, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 6, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)})));
hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 8, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 6, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 6, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 6, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 6, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 6, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 6, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)})));
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 8, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 6, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 6, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 6, 10), new VillagerTrades.h(new ItemStack(Items.pP), 36, 1, 6, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 6, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 6, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 6, 20), new VillagerTrades.b(Items.DIAMOND, 1, 6, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 6, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 6, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 6, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 2, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 2, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 2, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 2, 30, 0.2F)})));
hashmap.put(VillagerProfession.FARMER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHEAT, 20, 16, 2), new VillagerTrades.b(Items.POTATO, 26, 16, 2), new VillagerTrades.b(Items.CARROT, 22, 16, 2), new VillagerTrades.b(Items.BEETROOT, 15, 16, 2), new VillagerTrades.h(Items.BREAD, 1, 6, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.PUMPKIN, 6, 12, 10), new VillagerTrades.h(Items.PUMPKIN_PIE, 1, 4, 5), new VillagerTrades.h(Items.APPLE, 1, 4, 16, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.COOKIE, 3, 18, 10), new VillagerTrades.b(Blocks.MELON, 4, 12, 20)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Blocks.CAKE, 1, 1, 12, 15), new VillagerTrades.i(MobEffects.NIGHT_VISION, 100, 15), new VillagerTrades.i(MobEffects.JUMP, 160, 15), new VillagerTrades.i(MobEffects.WEAKNESS, 140, 15), new VillagerTrades.i(MobEffects.BLINDNESS, 120, 15), new VillagerTrades.i(MobEffects.POISON, 280, 15), new VillagerTrades.i(MobEffects.SATURATION, 7, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GOLDEN_CARROT, 3, 3, 30), new VillagerTrades.h(Items.GLISTERING_MELON_SLICE, 4, 3, 30)})));
- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())})));
+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.<VillagerType, Item>builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // Paper - decompile fix
hashmap.put(VillagerProfession.SHEPHERD, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.WHITE_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.BROWN_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.BLACK_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.GRAY_WOOL, 18, 16, 2), new VillagerTrades.h(Items.SHEARS, 2, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHITE_DYE, 12, 16, 10), new VillagerTrades.b(Items.GRAY_DYE, 12, 16, 10), new VillagerTrades.b(Items.BLACK_DYE, 12, 16, 10), new VillagerTrades.b(Items.LIGHT_BLUE_DYE, 12, 16, 10), new VillagerTrades.b(Items.LIME_DYE, 12, 16, 10), new VillagerTrades.h(Blocks.WHITE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.ORANGE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.MAGENTA_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.YELLOW_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIME_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.PINK_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.GRAY_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.CYAN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.PURPLE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BLUE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BROWN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.GREEN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.RED_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BLACK_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.WHITE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.ORANGE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.MAGENTA_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.YELLOW_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIME_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.PINK_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.GRAY_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.CYAN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.PURPLE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BLUE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BROWN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.GREEN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.RED_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BLACK_CARPET, 1, 4, 16, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.YELLOW_DYE, 12, 16, 20), new VillagerTrades.b(Items.LIGHT_GRAY_DYE, 12, 16, 20), new VillagerTrades.b(Items.ORANGE_DYE, 12, 16, 20), new VillagerTrades.b(Items.RED_DYE, 12, 16, 20), new VillagerTrades.b(Items.PINK_DYE, 12, 16, 20), new VillagerTrades.h(Blocks.WHITE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.YELLOW_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.RED_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BLACK_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BLUE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BROWN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.CYAN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.GRAY_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.GREEN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIGHT_BLUE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIGHT_GRAY_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIME_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.MAGENTA_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.ORANGE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.PINK_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.PURPLE_BED, 3, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BROWN_DYE, 12, 16, 30), new VillagerTrades.b(Items.PURPLE_DYE, 12, 16, 30), new VillagerTrades.b(Items.BLUE_DYE, 12, 16, 30), new VillagerTrades.b(Items.GREEN_DYE, 12, 16, 30), new VillagerTrades.b(Items.MAGENTA_DYE, 12, 16, 30), new VillagerTrades.b(Items.CYAN_DYE, 12, 16, 30), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 12, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.PAINTING, 2, 3, 30)})));
hashmap.put(VillagerProfession.FLETCHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STICK, 32, 16, 2), new VillagerTrades.h(Items.ARROW, 1, 16, 1), new VillagerTrades.g(Blocks.GRAVEL, 10, Items.FLINT, 10, 12, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FLINT, 26, 12, 10), new VillagerTrades.h(Items.BOW, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 14, 16, 20), new VillagerTrades.h(Items.CROSSBOW, 3, 1, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FEATHER, 24, 16, 30), new VillagerTrades.e(Items.BOW, 2, 3, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.dE, 8, 12, 30), new VillagerTrades.e(Items.CROSSBOW, 3, 3, 15), new VillagerTrades.j(Items.ARROW, 5, Items.TIPPED_ARROW, 5, 2, 12, 30)})));
- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 6, 3, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pQ, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build()));
+ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.<Integer, VillagerTrades.IMerchantRecipeOption[]>builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 6, 3, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pQ, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Paper - decompile fix
hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.df, 11, 16, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 12, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 12, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)})));
hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 16, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 12, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 12, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 12, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 12, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 12, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)})));
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.pP), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)})));
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 0b950aae6..f5f540032 100644
index 0b950aae63..f5f540032f 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -37,7 +37,7 @@ public class WorldPersistentData {

View File

@ -1,24 +1,9 @@
From 7c5ce6c9fd1f84aad2ca77e5834685659027f8e1 Mon Sep 17 00:00:00 2001
From 76ec5cd5870016019c709317fd0091bfd13f7d11 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils
diff --git a/src/main/java/net/minecraft/server/AttributeInstance.java b/src/main/java/net/minecraft/server/AttributeInstance.java
index 2f2b103641..b1900ba364 100644
--- a/src/main/java/net/minecraft/server/AttributeInstance.java
+++ b/src/main/java/net/minecraft/server/AttributeInstance.java
@@ -21,8 +21,10 @@ public interface AttributeInstance {
@Nullable
AttributeModifier a(UUID uuid);
+ default void addModifier(AttributeModifier modifier) { b(modifier); } // Paper - OBFHELPER
void b(AttributeModifier attributemodifier);
+ default void removeModifier(AttributeModifier modifier) { c(modifier); } // Paper - OBFHELPER
void c(AttributeModifier attributemodifier);
void b(UUID uuid);
diff --git a/src/main/java/net/minecraft/server/BlockAccessAir.java b/src/main/java/net/minecraft/server/BlockAccessAir.java
index e8ab5d3221..d7a68a1ef7 100644
--- a/src/main/java/net/minecraft/server/BlockAccessAir.java
@ -43,7 +28,7 @@ index e8ab5d3221..d7a68a1ef7 100644
public IBlockData getType(BlockPosition blockposition) {
return Blocks.AIR.getBlockData();
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
index b370316574..841c7d1904 100644
index ab05425793..b3fe95d856 100644
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
@@ -80,6 +80,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
@ -92,7 +77,7 @@ index daf406637c..2613de6624 100644
return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 5005643853..2a6ae10a11 100644
index 837ca87fc6..1cbcefec58 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger;
@ -132,7 +117,7 @@ index 5005643853..2a6ae10a11 100644
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
index 2c9bf7d00f..ccbc1dde09 100644
index 90363e790c..869e8548c6 100644
--- a/src/main/java/net/minecraft/server/ChunkCache.java
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
@@ -47,6 +47,30 @@ public class ChunkCache implements IWorldReader {
@ -182,11 +167,11 @@ index 857b2f8868..bbf136614c 100644
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index f1e807296c..710d40b43a 100644
index 36a89817f8..dd6e69a0f1 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -64,6 +64,58 @@ public class ChunkProviderServer extends IChunkProvider {
return this.playerChunkMap.c();
@@ -77,6 +77,58 @@ public class ChunkProviderServer extends IChunkProvider {
this.cacheChunk[0] = ichunkaccess;
}
+ // Paper start - "real" get chunk if loaded
@ -245,10 +230,10 @@ index f1e807296c..710d40b43a 100644
@Override
public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) {
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
index 8bda055159..409dc837c6 100644
index 91ebd474ad..08d1be3117 100644
--- a/src/main/java/net/minecraft/server/DataBits.java
+++ b/src/main/java/net/minecraft/server/DataBits.java
@@ -82,6 +82,7 @@ public class DataBits {
@@ -83,6 +83,7 @@ public class DataBits {
}
}
@ -274,10 +259,10 @@ index 75ba698868..45403fbe30 100644
T a(int i);
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
index 4411d5640a..28a6be7ab0 100644
index 8764379c6d..a3bb2e8779 100644
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
@@ -8,7 +8,7 @@ import java.util.stream.Collectors;
@@ -11,7 +11,7 @@ import java.util.stream.Collectors;
public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
@ -286,7 +271,7 @@ index 4411d5640a..28a6be7ab0 100644
private final DataPaletteExpandable<T> c = (i, object) -> {
return 0;
};
@@ -16,9 +16,9 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
@@ -19,9 +19,9 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
private final Function<NBTTagCompound, T> e;
private final Function<T, NBTTagCompound> f;
private final T g;
@ -299,7 +284,7 @@ index 4411d5640a..28a6be7ab0 100644
private final ReentrantLock j = new ReentrantLock();
public void a() {
@@ -53,6 +53,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
@@ -56,6 +56,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
return j << 8 | k << 4 | i;
}
@ -307,7 +292,7 @@ index 4411d5640a..28a6be7ab0 100644
private void b(int i) {
if (i != this.i) {
this.i = i;
@@ -130,6 +131,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
@@ -133,6 +134,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
return t0 == null ? this.g : t0;
}
@ -316,7 +301,7 @@ index 4411d5640a..28a6be7ab0 100644
this.a();
packetdataserializer.writeByte(this.i);
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
index c2ec2c2823..54a05cdb86 100644
index ef81d3a5be..7dacaa2166 100644
--- a/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
@@ -6,6 +6,8 @@ import org.bukkit.event.entity.EntityUnleashEvent;
@ -329,7 +314,7 @@ index c2ec2c2823..54a05cdb86 100644
super(entitytypes, world);
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 01ce810683..6d7b313aeb 100644
index 613d534aeb..f31a996aa5 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -144,6 +144,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -341,7 +326,7 @@ index 01ce810683..6d7b313aeb 100644
// CraftBukkit start - fire event
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index f115d0b931..e0b12e1fd7 100644
index 35a67665a2..5c863860ae 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -126,6 +126,7 @@ public abstract class EntityLiving extends Entity {
@ -353,7 +338,7 @@ index f115d0b931..e0b12e1fd7 100644
@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 9895124579..f97958652a 100644
index 07774e4b1f..e0609e7e97 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;
@ -365,10 +350,10 @@ index 9895124579..f97958652a 100644
super(entitytypes, world);
this.f = 5;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 0c712f77de..f603950b2e 100644
index 43d207ae59..335877889a 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -5,6 +5,7 @@ import com.mojang.datafixers.types.Type;
@@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils;
import java.util.Collections;
import java.util.Optional;
import java.util.Set; // Paper
@ -376,7 +361,7 @@ index 0c712f77de..f603950b2e 100644
import java.util.UUID;
import java.util.function.Function;
import java.util.stream.Stream;
@@ -287,8 +288,8 @@ public class EntityTypes<T extends Entity> {
@@ -289,8 +290,8 @@ public class EntityTypes<T extends Entity> {
return this.bi.height;
}
@ -388,10 +373,10 @@ index 0c712f77de..f603950b2e 100644
}
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 4510018d6f..c0d5112444 100644
index 70a4509055..d521d25cf5 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -64,6 +64,15 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@@ -68,6 +68,15 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
}
@ -437,7 +422,7 @@ index 6e365f402c..577b227758 100644
return this.getType(blockposition).h();
}
diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java
index b3725f15e3..233399e8bb 100644
index a5eff27651..a25736e23d 100644
--- a/src/main/java/net/minecraft/server/IWorldReader.java
+++ b/src/main/java/net/minecraft/server/IWorldReader.java
@@ -39,6 +39,7 @@ public interface IWorldReader extends IIBlockAccess {
@ -449,7 +434,7 @@ index b3725f15e3..233399e8bb 100644
IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag);
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 91168181b2..7bcc723998 100644
index f77477d860..9ebfbff46b 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent;
@ -859,19 +844,10 @@ index e16a579b55..3f6d2676e7 100644
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
}
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index 1c32e6ef47..d4c59baf8f 100644
index 6700582e36..3ccf166366 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -43,7 +43,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
return new DefaultEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Local Client IO #%d").setDaemon(true).build());
});
private final EnumProtocolDirection h;
- private final Queue<NetworkManager.QueuedPacket> packetQueue = Queues.newConcurrentLinkedQueue();
+ private final Queue<NetworkManager.QueuedPacket> packetQueue = Queues.newConcurrentLinkedQueue(); private final Queue<NetworkManager.QueuedPacket> getPacketQueue() { return this.packetQueue; } // Paper - OBFHELPER
private final ReentrantReadWriteLock j = new ReentrantReadWriteLock();
public Channel channel;
public SocketAddress socketAddress;
@@ -167,6 +167,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@@ -159,6 +159,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
}
@ -879,15 +855,15 @@ index 1c32e6ef47..d4c59baf8f 100644
private void b(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
EnumProtocol enumprotocol = EnumProtocol.a(packet);
EnumProtocol enumprotocol1 = (EnumProtocol) this.channel.attr(NetworkManager.c).get();
@@ -207,6 +208,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@@ -199,6 +200,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
}
+ private void sendPacketQueue() { this.o(); } // Paper - OBFHELPER
private void o() {
if (this.channel != null && this.channel.isOpen()) {
this.j.readLock().lock();
@@ -337,9 +339,9 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
Queue queue = this.packetQueue;
@@ -327,9 +329,9 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
static class QueuedPacket {
@ -945,7 +921,7 @@ index 4e20cfba41..363ab5da12 100644
int j = 0;
ChunkSection[] achunksection = chunk.getSections();
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 62387f5099..5599d0e71f 100644
index 3aedcfc33e..7407c1a564 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -63,6 +63,14 @@ public class PlayerChunk {
@ -964,7 +940,7 @@ index 62387f5099..5599d0e71f 100644
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c());
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9062767efa..d40600c103 100644
index 58e89dd27c..301b1c0829 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 {
@ -1029,7 +1005,7 @@ index 2158e239e0..6bdd7dda04 100644
public IBlockData getType(BlockPosition blockposition) {
int i = blockposition.getY();
diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
index 33db1403fe..aff3591ec8 100644
index 7260b9bfd3..ac6687754c 100644
--- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
+++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
@@ -106,6 +106,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccess {
@ -1072,7 +1048,7 @@ index 4efcb8b595..60948afa4e 100644
return this.b.size();
}
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
index 376219a1cd..59164684e0 100644
index 0df534b563..538ed5bb9b 100644
--- a/src/main/java/net/minecraft/server/SystemUtils.java
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
@@ -58,7 +58,7 @@ public class SystemUtils {
@ -1085,7 +1061,7 @@ index 376219a1cd..59164684e0 100644
public static long getTimeMillis() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e9d65c9275..32981c4422 100644
index 7f648dbbc9..1d5e4c5127 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -210,6 +210,40 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -1142,7 +1118,7 @@ index e9d65c9275..32981c4422 100644
return this.setTypeAndData(blockposition, fluid.getBlockData(), 3 | (flag ? 64 : 0));
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 2a9e2ab58a..4eb7438f25 100644
index c3a3fbde04..c04ec4a7cb 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack {
@ -1154,10 +1130,10 @@ index 2a9e2ab58a..4eb7438f25 100644
/**
* Mirror
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index 755f7f2649..cd910f3dcb 100644
index f575b884b0..5bae026dcc 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -201,4 +201,22 @@ public class DummyGeneratorAccess implements GeneratorAccess {
@@ -200,4 +200,22 @@ public class DummyGeneratorAccess implements GeneratorAccess {
public boolean b(BlockPosition blockposition, boolean flag) {
throw new UnsupportedOperationException("Not supported yet.");
}

View File

@ -1,4 +1,4 @@
From d7435d6dc5cfbf22a2d1d079aa142b7a997f2156 Mon Sep 17 00:00:00 2001
From 507180a0d4b214f63b2fcb17c7b21ad5d90a1902 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 01:40:13 -0400
Subject: [PATCH] Add MinecraftKey Information to Objects
@ -6,7 +6,7 @@ Subject: [PATCH] Add MinecraftKey Information to Objects
Stores the reference to the objects respective MinecraftKey
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index 5626ae4e3..360abc05e 100644
index 5626ae4e3a..360abc05e4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -175,7 +175,7 @@ public class PaperCommand extends Command {
@ -19,7 +19,7 @@ index 5626ae4e3..360abc05e 100644
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 845536e4d..11b273b1a 100644
index d4dff91586..1519e481fb 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
@ -65,10 +65,10 @@ index 845536e4d..11b273b1a 100644
protected abstract void a(NBTTagCompound nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index f603950b2..eaacc9bff 100644
index 335877889a..a7fc34f850 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -238,6 +238,7 @@ public class EntityTypes<T extends Entity> {
@@ -236,6 +236,7 @@ public class EntityTypes<T extends Entity> {
}
}
@ -78,7 +78,7 @@ index f603950b2..eaacc9bff 100644
}
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
new file mode 100644
index 000000000..743142d03
index 0000000000..743142d030
--- /dev/null
+++ b/src/main/java/net/minecraft/server/KeyedObject.java
@@ -0,0 +1,9 @@
@ -92,7 +92,7 @@ index 000000000..743142d03
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 33dec830e..7f480b3b3 100644
index 33dec830ea..7f480b3b3e 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -11,7 +11,7 @@ import org.bukkit.inventory.InventoryHolder;

View File

@ -1,4 +1,4 @@
From e0eb58b3af41c6a327560737d75f9673739f78af Mon Sep 17 00:00:00 2001
From 92d78e2c8e6c305184f27034b3be19a8799aed6e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:10:36 -0400
Subject: [PATCH] Store reference to current Chunk for Entity and Block
@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 2a6ae10a1..24d69778f 100644
index 1cbcefec58..4836d1f715 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -29,7 +29,7 @@ public class Chunk implements IChunkAccess {
@ -21,7 +21,7 @@ index 2a6ae10a1..24d69778f 100644
public final Map<HeightMap.Type, HeightMap> heightMap;
private final ChunkConverter i;
@@ -55,11 +55,36 @@ public class Chunk implements IChunkAccess {
this(world, chunkcoordintpair, abiomebase, ChunkConverter.a, TickListEmpty.a(), TickListEmpty.a(), 0L, (ChunkSection[]) null, (Consumer) null);
this(world, chunkcoordintpair, abiomebase, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
}
+ // Paper start
@ -90,7 +90,7 @@ index 2a6ae10a1..24d69778f 100644
@Override
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 11b273b1a..b21fa66ae 100644
index 1519e481fb..d4954801cb 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -133,7 +133,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -143,7 +143,7 @@ index 11b273b1a..b21fa66ae 100644
private String entityKeyString;
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 7f480b3b3..2efaf516f 100644
index 7f480b3b3e..2efaf516ff 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
@ -163,7 +163,7 @@ index 7f480b3b3..2efaf516f 100644
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index f22959ee1..a98f6f338 100644
index f22959ee15..a98f6f3389 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -137,6 +137,7 @@ import net.minecraft.server.EntityZombieVillager;

View File

@ -1,4 +1,4 @@
From faf6de3f329e5baee5994a5edc4e4c95c020a8f5 Mon Sep 17 00:00:00 2001
From 004767ba009e3a42594e7d442299af724f0f3da5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 000000000..3f9fb6f90
index 0000000000..3f9fb6f906
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,133 @@
@ -145,7 +145,7 @@ index 000000000..3f9fb6f90
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 000000000..366de6665
index 0000000000..366de66657
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,107 @@
@ -257,7 +257,7 @@ index 000000000..366de6665
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5518ec1e5..0c65afccf 100644
index 5518ec1e54..0c65afccfd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -304,7 +304,7 @@ index 5518ec1e5..0c65afccf 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index ee9a571bf..4b9e51b30 100644
index 70c881643d..a4b6d6fd4c 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -31,6 +31,15 @@ public class Block implements IMaterial {
@ -324,7 +324,7 @@ index ee9a571bf..4b9e51b30 100644
private final float frictionFactor;
protected final BlockStateList<Block, IBlockData> blockStateList;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index f3c5c729f..ab9b7bbd3 100644
index 3ed48be382..c4d989f702 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -573,6 +573,7 @@ public class Chunk implements IChunkAccess {
@ -344,10 +344,10 @@ index f3c5c729f..ab9b7bbd3 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index b500f6e59..534636889 100644
index dd6e69a0f1..25e0163c60 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -137,11 +137,13 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -150,11 +150,13 @@ public class ChunkProviderServer extends IChunkProvider {
}
}
@ -363,7 +363,7 @@ index b500f6e59..534636889 100644
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
return ichunkaccess1;
}, (playerchunk_failure) -> {
@@ -301,7 +303,9 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -346,7 +348,9 @@ public class ChunkProviderServer extends IChunkProvider {
public void save(boolean flag) {
this.tickDistanceManager();
@ -373,7 +373,7 @@ index b500f6e59..534636889 100644
}
@Override
@@ -417,9 +421,9 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -462,9 +466,9 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit();
}
@ -385,7 +385,7 @@ index b500f6e59..534636889 100644
}
}
});
@@ -432,9 +436,7 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -477,9 +481,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.getMethodProfiler().exit();
}
@ -396,7 +396,7 @@ index b500f6e59..534636889 100644
@Override
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 1894509df..ad3ade3c5 100644
index 28bf9e14d6..03be77299b 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -1,5 +1,6 @@
@ -434,7 +434,7 @@ index 1894509df..ad3ade3c5 100644
}
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
index 12885cbd6..49de6e997 100644
index 12885cbd60..49de6e997a 100644
--- a/src/main/java/net/minecraft/server/CustomFunction.java
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
@@ -13,12 +13,22 @@ public class CustomFunction {
@ -461,7 +461,7 @@ index 12885cbd6..49de6e997 100644
return this.b;
}
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
index 834677838..8bc74add6 100644
index 53735b52a3..721839b4c6 100644
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
@@ -101,7 +101,7 @@ public class CustomFunctionData implements IResourcePackListener {
@ -474,7 +474,7 @@ index 834677838..8bc74add6 100644
int j = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index c088ff969..c7ea4ec4f 100644
index 5e0797afde..f572cd8fc7 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -19,6 +19,8 @@ import java.util.Collections;
@ -513,7 +513,7 @@ index c088ff969..c7ea4ec4f 100644
}
@Override
@@ -664,6 +666,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -669,6 +671,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@Override
public String executeRemoteCommand(String s) {
@ -521,7 +521,7 @@ index c088ff969..c7ea4ec4f 100644
this.remoteControlCommandListener.clearMessages();
this.executeSync(() -> {
// CraftBukkit start - fire RemoteServerCommandEvent
@@ -672,10 +675,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -677,10 +680,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
if (event.isCancelled()) {
return;
}
@ -538,7 +538,7 @@ index c088ff969..c7ea4ec4f 100644
+ co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable));
+ } else {
+ // Paper end
ServerCommand serverCommand = new ServerCommand(event.getCommand(), remoteControlCommandListener.f());
ServerCommand serverCommand = new ServerCommand(event.getCommand(), remoteControlCommandListener.getWrapper());
server.dispatchServerCommand(remoteConsole, serverCommand);
+ } // Paper
// CraftBukkit end
@ -562,7 +562,7 @@ index c088ff969..c7ea4ec4f 100644
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b21fa66ae..43abdf41f 100644
index d4954801cb..fd4712c710 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
@ -601,7 +601,7 @@ index b21fa66ae..43abdf41f 100644
protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index e0b12e1fd..30aa4f56d 100644
index 5c863860ae..ed5b9a9516 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -619,8 +619,8 @@ index e0b12e1fd..30aa4f56d 100644
public void tick() {
- SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
super.tick();
this.dl();
this.o();
this.p();
@@ -2289,9 +2288,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -677,10 +677,10 @@ index e0b12e1fd..30aa4f56d 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f9ec2b068..d0419119b 100644
index b397fd3445..18d5461cac 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -54,7 +54,7 @@ import org.bukkit.craftbukkit.CraftServer;
@@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.Main;
import org.bukkit.event.server.ServerLoadEvent;
// CraftBukkit end
@ -689,7 +689,7 @@ index f9ec2b068..d0419119b 100644
import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable {
@@ -674,6 +674,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -686,6 +686,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@ -697,7 +697,7 @@ index f9ec2b068..d0419119b 100644
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -951,7 +952,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -963,7 +964,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
protected void exit() {}
protected void a(BooleanSupplier booleansupplier) {
@ -706,7 +706,7 @@ index f9ec2b068..d0419119b 100644
this.slackActivityAccountant.tickStarted(); // Spigot
long i = SystemUtils.getMonotonicNanos();
@@ -972,14 +973,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -984,14 +985,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -721,7 +721,7 @@ index f9ec2b068..d0419119b 100644
}
this.methodProfiler.enter("snooper");
@@ -1002,30 +1001,29 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1014,30 +1013,29 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot
@ -760,7 +760,7 @@ index f9ec2b068..d0419119b 100644
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1033,7 +1031,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1045,7 +1043,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))); // Add support for per player time
}
}
@ -769,7 +769,7 @@ index f9ec2b068..d0419119b 100644
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@@ -1076,20 +1074,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1088,20 +1086,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.exitEnter("connection");
@ -797,7 +797,7 @@ index f9ec2b068..d0419119b 100644
this.methodProfiler.exit();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 070cfc61e..ec7824baf 100644
index 119a3be367..1dec47bc18 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,7 +1,9 @@
@ -810,7 +810,7 @@ index 070cfc61e..ec7824baf 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
@@ -464,8 +466,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -471,8 +473,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> f(ChunkCoordIntPair chunkcoordintpair) {
return CompletableFuture.supplyAsync(() -> {
@ -824,7 +824,7 @@ index 070cfc61e..ec7824baf 100644
if (nbttagcompound != null) {
boolean flag = nbttagcompound.hasKeyOfType("Level", 10) && nbttagcompound.getCompound("Level").hasKeyOfType("Status", 8);
@@ -502,7 +507,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -509,7 +514,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
});
return completablefuture.thenComposeAsync((either) -> {
@ -833,7 +833,7 @@ index 070cfc61e..ec7824baf 100644
try {
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> {
return this.c(playerchunk);
@@ -555,6 +560,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -562,6 +567,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
ChunkStatus chunkstatus = PlayerChunk.getChunkStatus(playerchunk.getTicketLevel());
return !chunkstatus.b(ChunkStatus.FULL) ? PlayerChunk.UNLOADED_CHUNK_ACCESS : either.mapLeft((ichunkaccess) -> {
@ -841,7 +841,7 @@ index 070cfc61e..ec7824baf 100644
ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
Chunk chunk;
@@ -599,6 +605,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -606,6 +612,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
return chunk;
@ -849,7 +849,7 @@ index 070cfc61e..ec7824baf 100644
});
}, (runnable) -> {
Mailbox mailbox = this.mailboxMain;
@@ -992,6 +999,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1042,6 +1049,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker;
ObjectIterator objectiterator;
@ -857,7 +857,7 @@ index 070cfc61e..ec7824baf 100644
for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) {
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
@@ -1009,13 +1017,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1059,13 +1067,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
playerchunkmap_entitytracker.e = sectionposition1;
}
}
@ -875,7 +875,7 @@ index 070cfc61e..ec7824baf 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 80a80ed47..d6550af41 100644
index 301b1c0829..36c56773f3 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;
@ -902,7 +902,7 @@ index 80a80ed47..d6550af41 100644
}
@@ -1657,7 +1656,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1622,7 +1621,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit end
private void handleCommand(String s) {
@ -911,7 +911,7 @@ index 80a80ed47..d6550af41 100644
// CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1668,7 +1667,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1633,7 +1632,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -920,7 +920,7 @@ index 80a80ed47..d6550af41 100644
return;
}
@@ -1681,7 +1680,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1646,7 +1645,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
@ -930,33 +930,34 @@ index 80a80ed47..d6550af41 100644
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index cb6d50ea7..9ba03f8ed 100644
index a677ec74d4..e928525b8f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,5 +1,8 @@
package net.minecraft.server;
@@ -2,6 +2,8 @@ package net.minecraft.server;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import co.aikar.timings.MinecraftTimings; // Paper
+import co.aikar.timings.Timing; // Paper
+
public class PlayerConnectionUtils {
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T t0, WorldServer worldserver) throws CancelledPacketHandleException {
@@ -8,9 +11,12 @@ public class PlayerConnectionUtils {
@@ -13,10 +15,13 @@ public class PlayerConnectionUtils {
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
if (!iasynctaskhandler.isMainThread()) {
+ Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper
+ Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper - timings
iasynctaskhandler.execute(() -> {
if (MinecraftServer.getServer().hasStopped() || (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect)) return; // CraftBukkit, MC-142590
+ try (Timing ignored = timing.startTiming()) { // Paper
if (t0.a().isConnected()) {
+ try (Timing ignored = timing.startTiming()) { // Paper - timings
packet.a(t0);
+ } // Paper - timings
});
throw CancelledPacketHandleException.INSTANCE;
} else {
PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet);
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ee22d6c81..fb6b48e3f 100644
index ee22d6c81a..fb6b48e3fe 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -980,7 +981,7 @@ index ee22d6c81..fb6b48e3f 100644
public WhiteList getWhitelist() {
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
index 061730c56..c5890f5dc 100644
index 00bbd34b6a..f533860bbe 100644
--- a/src/main/java/net/minecraft/server/TickListServer.java
+++ b/src/main/java/net/minecraft/server/TickListServer.java
@@ -28,13 +28,18 @@ public class TickListServer<T> implements TickList<T> {
@ -1001,7 +1002,7 @@ index 061730c56..c5890f5dc 100644
+ private final co.aikar.timings.Timing timingTicking; // Paper
+ // Paper end
public void a() {
public void b() {
int i = this.nextTickList.size();
@@ -57,6 +62,7 @@ public class TickListServer<T> implements TickList<T> {
@ -1030,7 +1031,7 @@ index 061730c56..c5890f5dc 100644
this.g.clear();
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 2efaf516f..22a8ea916 100644
index 2efaf516ff..22a8ea916a 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;
@ -1049,7 +1050,7 @@ index 2efaf516f..22a8ea916 100644
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 32981c442..2f608305f 100644
index 1d5e4c5127..60c222b12b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@
@ -1104,7 +1105,7 @@ index 32981c442..2f608305f 100644
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 df518ff63..69af071e6 100644
index 6cb7925d34..aaf3882634 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,7 @@
@ -1115,7 +1116,7 @@ index df518ff63..69af071e6 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Queues;
@@ -33,7 +35,6 @@ import org.apache.logging.log4j.Logger;
@@ -37,7 +39,6 @@ import org.apache.logging.log4j.Logger;
// CraftBukkit start
import org.bukkit.Bukkit;
import org.bukkit.WeatherType;
@ -1123,7 +1124,7 @@ index df518ff63..69af071e6 100644
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.server.MapInitializeEvent;
@@ -90,10 +91,10 @@ public class WorldServer extends World {
@@ -93,10 +94,10 @@ public class WorldServer extends World {
// CraftBukkit end
this.nextTickListBlock = new TickListServer<>(this, (block) -> {
return block == null || block.getBlockData().isAir();
@ -1133,25 +1134,25 @@ index df518ff63..69af071e6 100644
return fluidtype == null || fluidtype == FluidTypes.EMPTY;
- }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a);
+ }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a, "Fluids"); // Paper - Timings
this.I = Sets.newHashSet();
this.siegeManager = new VillageSiege(this);
this.J = new ObjectLinkedOpenHashSet();
@@ -256,12 +257,12 @@ public class WorldServer extends World {
this.H = Sets.newHashSet();
this.I = new ObjectLinkedOpenHashSet();
this.dataManager = worldnbtstorage;
@@ -258,12 +259,12 @@ public class WorldServer extends World {
gameprofilerfiller.exitEnter("chunkSource");
this.getChunkProvider().tick(booleansupplier);
gameprofilerfiller.exitEnter("tickPending");
- timings.doTickPending.startTiming(); // Spigot
+ timings.scheduledBlocks.startTiming(); // Spigot
if (this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES) {
this.nextTickListBlock.a();
this.nextTickListFluid.a();
this.nextTickListBlock.b();
this.nextTickListFluid.b();
}
- timings.doTickPending.stopTiming(); // Spigot
+ timings.scheduledBlocks.stopTiming(); // Spigot
gameprofilerfiller.exitEnter("village");
timings.doVillages.startTiming(); // Spigot
@@ -318,6 +319,7 @@ public class WorldServer extends World {
gameprofilerfiller.exitEnter("portalForcer");
timings.doPortalForcer.startTiming(); // Spigot
@@ -316,6 +317,7 @@ public class WorldServer extends World {
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
timings.entityTick.startTiming(); // Spigot
@ -1159,7 +1160,7 @@ index df518ff63..69af071e6 100644
while (objectiterator.hasNext()) {
Entry<Entity> entry = (Entry) objectiterator.next();
Entity entity1 = (Entity) entry.getValue();
@@ -344,6 +346,7 @@ public class WorldServer extends World {
@@ -342,6 +344,7 @@ public class WorldServer extends World {
gameprofilerfiller.enter("tick");
if (!entity1.dead && !(entity1 instanceof EntityComplexPart)) {
this.a(this::entityJoinedWorld, entity1);
@ -1167,7 +1168,7 @@ index df518ff63..69af071e6 100644
}
gameprofilerfiller.exit();
@@ -421,6 +424,7 @@ public class WorldServer extends World {
@@ -419,6 +422,7 @@ public class WorldServer extends World {
}
gameprofilerfiller.exitEnter("tickBlocks");
@ -1175,7 +1176,7 @@ index df518ff63..69af071e6 100644
if (i > 0) {
ChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length;
@@ -452,7 +456,7 @@ public class WorldServer extends World {
@@ -450,7 +454,7 @@ public class WorldServer extends World {
}
}
}
@ -1184,7 +1185,7 @@ index df518ff63..69af071e6 100644
gameprofilerfiller.exit();
}
@@ -747,6 +751,7 @@ public class WorldServer extends World {
@@ -745,6 +749,7 @@ public class WorldServer extends World {
if (!flag1) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1192,7 +1193,7 @@ index df518ff63..69af071e6 100644
if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
}
@@ -756,7 +761,10 @@ public class WorldServer extends World {
@@ -754,7 +759,10 @@ public class WorldServer extends World {
iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0]));
}
@ -1204,7 +1205,7 @@ index df518ff63..69af071e6 100644
// CraftBukkit start - moved from MinecraftServer.saveChunks
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 39ca7b5f3..5adfd6a7b 100644
index 4d38bf5018..936f181f06 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1931,12 +1931,31 @@ public final class CraftServer implements Server {
@ -1241,10 +1242,10 @@ index 39ca7b5f3..5adfd6a7b 100644
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644
index 38f211526..000000000
index b98a7b56a4..0000000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,166 +0,0 @@
@@ -1,164 +0,0 @@
-package org.bukkit.craftbukkit;
-
-import java.util.HashMap;
@ -1365,7 +1366,6 @@ index 38f211526..000000000
- public final CustomTimingsHandler doPortalForcer;
- public final CustomTimingsHandler doTickPending;
- public final CustomTimingsHandler doTickTiles;
- public final CustomTimingsHandler doVillages;
- public final CustomTimingsHandler doChunkMap;
- public final CustomTimingsHandler doSounds;
- public final CustomTimingsHandler entityTick;
@ -1389,7 +1389,6 @@ index 38f211526..000000000
- doChunkUnload = new CustomTimingsHandler("** " + name + "doChunkUnload");
- doTickPending = new CustomTimingsHandler("** " + name + "doTickPending");
- doTickTiles = new CustomTimingsHandler("** " + name + "doTickTiles");
- doVillages = new CustomTimingsHandler("** " + name + "doVillages");
- doChunkMap = new CustomTimingsHandler("** " + name + "doChunkMap");
- doSounds = new CustomTimingsHandler("** " + name + "doSounds");
- doPortalForcer = new CustomTimingsHandler("** " + name + "doPortalForcer");
@ -1412,7 +1411,7 @@ index 38f211526..000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 00aecdc47..c6daf693c 100644
index 184802803c..9280bb6f74 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1749,6 +1749,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -1431,7 +1430,7 @@ index 00aecdc47..c6daf693c 100644
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index b90979c7b..8823f94f7 100644
index b90979c7ba..8823f94f7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -1,5 +1,6 @@
@ -1497,7 +1496,7 @@ index b90979c7b..8823f94f7 100644
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index 3f55381c1..0d9a46680 100644
index 3f55381c15..0d9a466809 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,9 +1,11 @@
@ -1582,7 +1581,7 @@ index 3f55381c1..0d9a46680 100644
- // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
index e52ef47b7..3d90b3426 100644
index e52ef47b78..3d90b34268 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
@ -1594,7 +1593,7 @@ index e52ef47b7..3d90b3426 100644
this.value = value;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 8b6ec888e..2733c63aa 100644
index dd602243d3..924ab7f541 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -288,6 +288,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
@ -1612,7 +1611,7 @@ index 8b6ec888e..2733c63aa 100644
* This helper class represents the different NBT Tags.
* <p>
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index ca7789b5e..442383969 100644
index ca7789b5e0..4423839697 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither;

View File

@ -1,4 +1,4 @@
From 6456cdcc6bf414af08441d98d6fe6152ec1bf92d Mon Sep 17 00:00:00 2001
From 7c509bcd404bfad17b7af2429a193f24af732e57 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:09:16 -0600
Subject: [PATCH] Configurable baby zombie movement speed
@ -20,10 +20,10 @@ index 098bd3fba8..55d8e74f82 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 9cea262c80..4cb305ff28 100644
index 2b4a9ffe82..99e501cef4 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -19,7 +19,7 @@ public class EntityZombie extends EntityMonster {
@@ -20,7 +20,7 @@ public class EntityZombie extends EntityMonster {
protected static final IAttribute d = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
@ -32,18 +32,18 @@ index 9cea262c80..4cb305ff28 100644
private static final DataWatcherObject<Boolean> bz = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Integer> bA = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
@@ -127,9 +127,9 @@ public class EntityZombie extends EntityMonster {
@@ -128,9 +128,9 @@ public class EntityZombie extends EntityMonster {
if (this.world != null && !this.world.isClientSide) {
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
- attributeinstance.c(EntityZombie.c);
+ attributeinstance.c(this.babyModifier); // Paper
- attributeinstance.removeModifier(EntityZombie.c);
+ attributeinstance.removeModifier(this.babyModifier); // Paper
if (flag) {
- attributeinstance.b(EntityZombie.c);
+ attributeinstance.b(this.babyModifier); // Paper
- attributeinstance.addModifier(EntityZombie.c);
+ attributeinstance.addModifier(this.babyModifier); // Paper
}
}
--
2.21.0
2.22.0

View File

@ -1,4 +1,4 @@
From 6a568d4df68e4198bec44d06a2a0b614adf66560 Mon Sep 17 00:00:00 2001
From d02c4d04df4da6331455d3f31a1e9a345fe48baf Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index 3f35a28ba..cf00f35a5 100644
index 3f35a28ba1..cf00f35a5b 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -70,7 +70,7 @@ public class EULA {
@ -19,10 +19,10 @@ index 3f35a28ba..cf00f35a5 100644
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 d0419119b..1346fc35c 100644
index 18d5461cac..e709b9123d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1285,7 +1285,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1297,7 +1297,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -32,7 +32,7 @@ index d0419119b..1346fc35c 100644
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5adfd6a7b..9cbacaceb 100644
index 936f181f06..01311668df 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -196,7 +196,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -45,7 +45,7 @@ index 5adfd6a7b..9cbacaceb 100644
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 d28530051..484f1995a 100644
index d28530051d..484f1995aa 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 {
@ -76,7 +76,7 @@ index d28530051..484f1995a 100644
MinecraftServer.main(options);
} catch (Throwable t) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 27297204f..70b187190 100644
index 27297204f1..70b187190f 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -19,7 +19,7 @@ public class WatchdogThread extends Thread

View File

@ -1,15 +1,15 @@
From fe2a4b3a0eb87faf8512700171147012ded647c5 Mon Sep 17 00:00:00 2001
From 66d130d40bbf356e6055727bb4cbbba1eac70025 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600
Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 4735f6e673..1a41a9c1d9 100644
index 9daa8ed210..5c45d8ee08 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -70,6 +70,9 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bY;
@@ -71,6 +71,9 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bZ;
@Nullable
public EntityFishingHook hookedFish;
+ // Paper start
@ -19,7 +19,7 @@ index 4735f6e673..1a41a9c1d9 100644
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index a2247fa1dd..4fa345db65 100644
index 14b4c1fe69..6e304492cf 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -610,7 +610,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -32,12 +32,12 @@ index a2247fa1dd..4fa345db65 100644
if (d0 > world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index e66cdc49ca..2979cc8b66 100644
index 323a56c63f..eb3c56fefd 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -100,7 +100,7 @@ public class EntitySilverfish extends EntityMonster {
@@ -99,7 +99,7 @@ public class EntitySilverfish extends EntityMonster {
if (d(entitytypes, generatoraccess, enummobspawn, blockposition, random)) {
EntityHuman entityhuman = generatoraccess.a(EntitySilverfish.b, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D);
EntityHuman entityhuman = generatoraccess.a((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0D, true);
- return entityhuman == null;
+ return !(entityhuman != null && !entityhuman.affectsSpawning) && entityhuman == null; // Paper - Affects Spawning API
@ -45,7 +45,7 @@ index e66cdc49ca..2979cc8b66 100644
return false;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c6daf693c5..00d6fc4b32 100644
index 9280bb6f74..8aba3c775c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1651,7 +1651,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -1,11 +1,11 @@
From 0b8109d70dce130297bf090e7af8090c483bc3e1 Mon Sep 17 00:00:00 2001
From f330251e5134f41873289563ce02eb5c70499ce7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 8 Mar 2015 22:55:25 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 271406f8bb..85b450c054 100644
index ffaf16cff8..387e366130 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@ -90,7 +90,7 @@ index 271406f8bb..85b450c054 100644
int newPower = Math.max(0, Math.min(15, this.viewingCount));
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 340dd1dafe..14598d7ee9 100644
index 0fae06d3a0..ae6784b6aa 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -1,6 +1,6 @@
@ -133,7 +133,7 @@ index 340dd1dafe..14598d7ee9 100644
double d1 = (double) i + 0.5D;
@@ -30,8 +40,17 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
d0 = (double) k + 0.5D;
this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
this.world.playSound((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
}
+ // Paper start
+ }
@ -150,7 +150,7 @@ index 340dd1dafe..14598d7ee9 100644
float f1 = this.a;
if (this.c > 0) {
@@ -47,11 +66,15 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
@@ -47,11 +66,14 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
float f2 = 0.5F;
if (this.a < 0.5F && f1 >= 0.5F) {
@ -160,14 +160,13 @@ index 340dd1dafe..14598d7ee9 100644
double d2 = (double) k + 0.5D;
+ MCUtil.scheduleTask(10, () -> {
this.world.a((EntityHuman) null, d0, (double) j + 0.5D, d2, SoundEffects.BLOCK_ENDER_CHEST_CLOSE, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
this.world.playSound((EntityHuman) null, d0, (double) j + 0.5D, d2, SoundEffects.BLOCK_ENDER_CHEST_CLOSE, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
- }
+ });
+ // Paper end
if (this.a < 0.0F) {
this.a = 0.0F;
@@ -79,11 +102,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
@@ -79,11 +101,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
public void d() {
++this.c;
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.c);

View File

@ -1,4 +1,4 @@
From 5648b0bef0e03aef5d7b335d56c3d87e611ce8be Mon Sep 17 00:00:00 2001
From 999afc724c832e02f43f5a53eb3d718fec26ca49 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1346fc35c5..968ce67956 100644
index e709b9123d..c16f2a9c16 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -147,7 +147,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -157,7 +157,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -24,7 +24,7 @@ index 1346fc35c5..968ce67956 100644
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public File bukkitDataPackFolder;
@@ -157,7 +157,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -167,7 +167,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / TPS;
@ -33,7 +33,7 @@ index 1346fc35c5..968ce67956 100644
public final double[] recentTps = new double[ 3 ];
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -758,6 +758,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -770,6 +770,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index 1346fc35c5..968ce67956 100644
// Spigot End
public void run() {
@@ -770,30 +821,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -782,30 +833,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start
Arrays.fill( recentTps, 20 );
@ -137,10 +137,10 @@ index 1346fc35c5..968ce67956 100644
+ //MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
+ lastTick = curTime;
this.nextTick += 50L;
if (this.S) {
this.S = false;
if (this.T) {
this.T = false;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 49799cf13b..3083538088 100644
index 01311668df..8cdaf4758d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1928,6 +1928,17 @@ public final class CraftServer implements Server {

View File

@ -1,11 +1,11 @@
From 8cafbd1f887537f35f8cca7b94f917260a08c634 Mon Sep 17 00:00:00 2001
From 26db9586e819f8d79effc46ed50b58819cbbf259 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 716892c72..8f97aa296 100644
index 40dcb31258..5f85eb2ba2 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -51,10 +51,10 @@ index 716892c72..8f97aa296 100644
NBTTagList nbttaglist = new NBTTagList();
double[] adouble1 = adouble;
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 7fb0c0e06..9d86beda9 100644
index f8d8d8f353..0f9fa41133 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -253,6 +253,14 @@ public class EntityFallingBlock extends Entity {
@@ -254,6 +254,14 @@ public class EntityFallingBlock extends Entity {
this.block = Blocks.SAND.getBlockData();
}
@ -70,7 +70,7 @@ index 7fb0c0e06..9d86beda9 100644
public void a(boolean flag) {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index e988abd67..f2ee53ab9 100644
index e988abd67c..f2ee53ab90 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -104,6 +104,14 @@ public class EntityTNTPrimed extends Entity {
@ -89,7 +89,7 @@ index e988abd67..f2ee53ab9 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index ce510c486..b7c94fe23 100644
index ce510c4867..b7c94fe238 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -161,6 +161,7 @@ public class NBTTagList extends NBTList<NBTBase> {
@ -101,11 +101,11 @@ index ce510c486..b7c94fe23 100644
if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 69af071e6..458c14e1d 100644
index aaf3882634..b9e1816e82 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1104,6 +1104,11 @@ public class WorldServer extends World {
this.I.add(((EntityInsentient) entity).getNavigation());
@@ -1101,6 +1101,11 @@ public class WorldServer extends World {
this.H.add(((EntityInsentient) entity).getNavigation());
}
entity.valid = true; // CraftBukkit
+ // Paper start - Set origin location when the entity is being added to the world
@ -117,7 +117,7 @@ index 69af071e6..458c14e1d 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index a98f6f338..d1d37c06b 100644
index a98f6f3389..d1d37c06bf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1009,4 +1009,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

View File

@ -1,4 +1,4 @@
From 7cfb4c83487da77cd975787dbdb2a5bac003b3d1 Mon Sep 17 00:00:00 2001
From f13f1a117cb7ab0d080989a022144036df1e9404 Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com>
Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits
@ -20,7 +20,7 @@ index a797a57671..c2b9690a0c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 90bcb01e3a..b907600db9 100644
index d960d117f8..f3a9c0f2b4 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -32,7 +32,7 @@ index 90bcb01e3a..b907600db9 100644
private final RecipeBookServer recipeBook;
private Vec3D cr;
private int cs;
@@ -706,6 +706,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -707,6 +707,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.getWorldServer().removePlayer(this);
if (!this.viewingCredits) {
this.viewingCredits = true;

View File

@ -1,4 +1,4 @@
From 0c07fa8b0166461f1f94dc0d8a825d4a5c1066eb Mon Sep 17 00:00:00 2001
From 85255374d47dda4ae56b01c57b7a66978c0fb320 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 11:59:48 -0600
Subject: [PATCH] Optimize explosions
@ -25,7 +25,7 @@ index c2b9690a0c..a5ec0bc0e0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 7c1305164d..594e7bd94c 100644
index cdd8939504..bd6a0bd16b 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -172,7 +172,7 @@ public class Explosion {
@ -123,10 +123,10 @@ index 7c1305164d..594e7bd94c 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 968ce67956..ffa208e81b 100644
index c16f2a9c16..85c04d4035 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1129,6 +1129,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1141,6 +1141,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
this.methodProfiler.exit();
@ -135,7 +135,7 @@ index 968ce67956..ffa208e81b 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1915dd9145..b5029ab733 100644
index 5fea828de0..ee869a769f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -19,6 +19,7 @@ import org.apache.logging.log4j.util.Supplier;

View File

@ -1,4 +1,4 @@
From b7c3348e24a4f8b8152de7710e197c368163d797 Mon Sep 17 00:00:00 2001
From 98d790acb8c4c4761a0a9999b6e8c378aa28f0c5 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder
@ -19,10 +19,10 @@ index 6a307d5dd6..bf0cd6a8b4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 458c14e1d1..5358c7379a 100644
index b9e1816e82..9555afbd8d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -385,7 +385,7 @@ public class WorldServer extends World {
@@ -383,7 +383,7 @@ public class WorldServer extends World {
gameprofilerfiller.enter("thunder");
BlockPosition blockposition;

View File

@ -1,4 +1,4 @@
From f5f389e934a6c08470c975a0f85441748562ddf6 Mon Sep 17 00:00:00 2001
From 6b7e6ab5ed2af58cd941e6d5715778ee5ea21c4b Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow
@ -19,10 +19,10 @@ index bf0cd6a8b4..8db5c3f3fe 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 5358c7379a..b72e1b8062 100644
index 9555afbd8d..eaa2ff33c8 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -405,7 +405,7 @@ public class WorldServer extends World {
@@ -403,7 +403,7 @@ public class WorldServer extends World {
}
gameprofilerfiller.exitEnter("iceandsnow");

View File

@ -1,11 +1,11 @@
From 0e886139b4309506fbf412f759388adf5e9e712d Mon Sep 17 00:00:00 2001
From 612915a00e67427a0bc209686be7c6b15e3c43dc Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Wed, 2 Mar 2016 23:13:07 -0600
Subject: [PATCH] Send absolute position the first time an entity is seen
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index cf0e1a6a0..f04a9d18c 100644
index cf0e1a6a0c..f04a9d18c4 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
@ -77,10 +77,10 @@ index cf0e1a6a0..f04a9d18c 100644
this.c();
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index ec7824baf..c352c71d0 100644
index 1dec47bc18..e2ab4b1bfb 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1115,10 +1115,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1165,10 +1165,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final Entity tracker;
private final int trackingDistance;
private SectionPosition e;
@ -97,7 +97,7 @@ index ec7824baf..c352c71d0 100644
this.tracker = entity;
this.trackingDistance = i;
this.e = SectionPosition.a(entity);
@@ -1200,7 +1204,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1250,7 +1254,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
// CraftBukkit end

View File

@ -1,11 +1,11 @@
From 16c38581b8016682a071558fc9f55670de35a84e Mon Sep 17 00:00:00 2001
From d2e4d23521f1cc249c8ac8f6a5cc93c5c83240db Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 23:30:53 -0600
Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index 4ad19515a4..ef3a7260fd 100644
index 69d59a9f88..e510234db5 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -14,6 +14,11 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil;
@ -20,7 +20,7 @@ index 4ad19515a4..ef3a7260fd 100644
public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable {
@@ -240,14 +245,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
@@ -242,14 +247,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
}
private void applyEffect(List list, MobEffectList effects, int i, int b0) {
@ -53,7 +53,7 @@ index 4ad19515a4..ef3a7260fd 100644
}
}
}
@@ -270,10 +292,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
@@ -272,10 +294,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
int i = getLevel();
List list = getHumansInRange();
@ -67,5 +67,5 @@ index 4ad19515a4..ef3a7260fd 100644
}
--
2.21.0
2.22.0

View File

@ -1,4 +1,4 @@
From 5af5ec5c5b6a59f8b838c9d126e7945edaa383e6 Mon Sep 17 00:00:00 2001
From b4e632bf15f5e3621eaa2fd9dc4fc0f787a2973f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:17:12 -0600
Subject: [PATCH] Ensure commands are not ran async
@ -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 d6550af41..58e7cede6 100644
index 36c56773f3..962362889a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1588,6 +1588,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1553,6 +1553,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
if (!async && s.startsWith("/")) {
@ -48,7 +48,7 @@ index d6550af41..58e7cede6 100644
} else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) {
// Do nothing, this is coming from a plugin
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index cbee3453c..905fc64e5 100644
index 8cdaf4758d..63e26ae4b5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -707,6 +707,29 @@ public final class CraftServer implements Server {
@ -82,7 +82,7 @@ index cbee3453c..905fc64e5 100644
return true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index ddef523ea..70f8d4299 100644
index ddef523ea8..70f8d42992 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -13,6 +13,7 @@ public class ServerShutdownThread extends Thread {
@ -94,7 +94,7 @@ index ddef523ea..70f8d4299 100644
} finally {
try {
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
index aeed76972..9f7d2ef93 100644
index aeed769725..9f7d2ef932 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
@@ -6,6 +6,7 @@ public class AsyncCatcher
@ -106,7 +106,7 @@ index aeed76972..9f7d2ef93 100644
public static void catchOp(String reason)
{
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
index e7b953ca3..ccea803f5 100644
index e7b953ca31..ccea803f58 100644
--- a/src/main/java/org/spigotmc/RestartCommand.java
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -43,6 +43,7 @@ public class RestartCommand extends Command

View File

@ -1,11 +1,11 @@
From f9531fb0b9e20cc195b415bf63ba04f5f7c29ed3 Mon Sep 17 00:00:00 2001
From 79217cb0b53cf7dc77e9e07086ee7a54f7364ef0 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:18:39 -0600
Subject: [PATCH] Be a bit more informative in maxHealth exception
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 2e007d4ffc..82b3c0a7de 100644
index 2e007d4ffc..4948e61da9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -104,7 +104,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -15,7 +15,7 @@ index 2e007d4ffc..82b3c0a7de 100644
- throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + "(" + health + ")");
+ // Paper - Be more informative
+ throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + ", but was " + health
+ + ". (attribute base value: " + this.getHandle().getAttributeInstance(GenericAttributes.MAX_HEALTH).b()
+ + ". (attribute base value: " + this.getHandle().getAttributeInstance(GenericAttributes.MAX_HEALTH).getBaseValue()
+ + (this instanceof CraftPlayer ? ", player: " + this.getName() + ')' : ')'));
}

View File

@ -1,4 +1,4 @@
From 9b645dc69e99bc1f83333143abae570679e5b032 Mon Sep 17 00:00:00 2001
From 1eccbe939abff45b26650e89f4db915f53c5b36b Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:39:54 -0600
Subject: [PATCH] Change implementation of (tile)entity removal list
@ -6,7 +6,7 @@ Subject: [PATCH] Change implementation of (tile)entity removal list
use sets for faster removal
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 59c4fdbd9d..17d1dc93bc 100644
index f5590f5ab2..d80497e993 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -40,7 +40,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -17,7 +17,7 @@ index 59c4fdbd9d..17d1dc93bc 100644
+ protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
private final long b = 16777215L;
private final Thread serverThread;
private int d;
private int u;
--
2.22.0

View File

@ -1,4 +1,4 @@
From 599de7111c22e14f4eb714ace7d8b832e772723a Mon Sep 17 00:00:00 2001
From cf75b4463e247e36daca0616d92949435ca35c66 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event
diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
new file mode 100644
index 000000000..f699ce18c
index 0000000000..f699ce18ca
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
@@ -0,0 +1,38 @@
@ -49,7 +49,7 @@ index 000000000..f699ce18c
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index f6f5b72de..ec64391a4 100644
index 46635a5308..6c13ae3bae 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@
@ -80,10 +80,10 @@ index f6f5b72de..ec64391a4 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 534636889..cafa244fd 100644
index 25e0163c60..4e60de0b6e 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -14,6 +14,9 @@ import java.util.function.BooleanSupplier;
@@ -15,6 +15,9 @@ import java.util.function.BooleanSupplier;
import java.util.function.Function;
import java.util.function.Supplier;
import javax.annotation.Nullable;
@ -94,7 +94,7 @@ index 534636889..cafa244fd 100644
public class ChunkProviderServer extends IChunkProvider {
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 2cb0962ff..21a8ed323 100644
index 2cb0962ff1..21a8ed3231 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@
@ -121,10 +121,10 @@ index 2cb0962ff..21a8ed323 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index c352c71d0..b5ae705d9 100644
index e2ab4b1bfb..14b0875eee 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -674,6 +674,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -681,6 +681,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.world.checkSession();
} catch (ExceptionWorldConflict exceptionworldconflict) {
PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict);
@ -132,7 +132,7 @@ index c352c71d0..b5ae705d9 100644
return false;
}
@@ -701,6 +702,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -708,6 +709,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return true;
} catch (Exception exception) {
PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception);
@ -141,7 +141,7 @@ index c352c71d0..b5ae705d9 100644
}
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index d4a9af975..88b5aa3a5 100644
index d4a9af975d..88b5aa3a51 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@
@ -168,7 +168,7 @@ index d4a9af975..88b5aa3a5 100644
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index a54d65337..4aa65c193 100644
index fc2bb1d693..9c065c9997 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -8,6 +8,7 @@ import org.apache.logging.log4j.LogManager;
@ -179,7 +179,7 @@ index a54d65337..4aa65c193 100644
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
// CraftBukkit end
@@ -83,6 +84,7 @@ public final class SpawnerCreature {
@@ -86,6 +87,7 @@ public final class SpawnerCreature {
entityinsentient = (EntityInsentient) entity;
} catch (Exception exception) {
SpawnerCreature.LOGGER.warn("Failed to create mob", exception);
@ -187,7 +187,7 @@ index a54d65337..4aa65c193 100644
return;
}
@@ -210,6 +212,7 @@ public final class SpawnerCreature {
@@ -214,6 +216,7 @@ public final class SpawnerCreature {
entity = biomebase_biomemeta.b.a(generatoraccess.getMinecraftWorld());
} catch (Exception exception) {
SpawnerCreature.LOGGER.warn("Failed to create mob", exception);
@ -196,7 +196,7 @@ index a54d65337..4aa65c193 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 0a1d342c1..347608531 100644
index a58d3ba4cd..6e4c5d4d8f 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@ -207,8 +207,8 @@ index 0a1d342c1..347608531 100644
import java.util.Iterator;
import javax.annotation.Nullable;
@@ -97,6 +99,7 @@ public class VillageSiege {
entityzombie.prepare(this.a, this.a.getDamageScaler(new BlockPosition(entityzombie)), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null);
@@ -100,6 +102,7 @@ public class VillageSiege {
entityzombie.prepare(worldserver, worldserver.getDamageScaler(new BlockPosition(entityzombie)), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null);
} catch (Exception exception) {
exception.printStackTrace();
+ ServerInternalException.reportInternalException(exception); // Paper
@ -216,7 +216,7 @@ index 0a1d342c1..347608531 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index c58c95b03..d2062b335 100644
index d80497e993..6e7f72a1a4 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2,6 +2,9 @@ package net.minecraft.server;
@ -255,7 +255,7 @@ index c58c95b03..d2062b335 100644
return;
// Paper end
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index f5f540032..00e9a1735 100644
index f5f540032f..00e9a17355 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -121,6 +121,7 @@ public class WorldPersistentData {
@ -267,7 +267,7 @@ index f5f540032..00e9a1735 100644
} finally {
if (pushbackinputstream != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 8823f94f7..552daf437 100644
index 8823f94f7b..552daf4376 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicInteger;

View File

@ -1,14 +1,14 @@
From cb101e53b32e46961baa2986c56a7b1037e7ff1f Mon Sep 17 00:00:00 2001
From 66cd8b650ee784167dc1ccb379ca3ac3072e4ca2 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 23:17:52 -0400
Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 58e7cede6..8d325db4a 100644
index 962362889a..7906b67570 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1353,7 +1353,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1318,7 +1318,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
// CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());
@ -22,7 +22,7 @@ index 58e7cede6..8d325db4a 100644
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f4b3b7ff0..2e0621b88 100644
index 3be0c60b5c..dbd34b1432 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -134,6 +134,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -1,4 +1,4 @@
From 157c060e8b929f22ff86400308741af965a75ddc Mon Sep 17 00:00:00 2001
From b049e61067c54dcf37d13269adc3c886c08ed1b7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 20:16:03 -0400
Subject: [PATCH] Add World Util Methods
@ -6,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/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index ec64391a4a..4aaf20dfcb 100644
index 6c13ae3bae..77d6d5e6eb 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -371,6 +371,7 @@ public class Chunk implements IChunkAccess {
@ -18,17 +18,17 @@ index ec64391a4a..4aaf20dfcb 100644
return this.a(blockposition, i, this.world.getWorldProvider().g());
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f3f10ca60e..769d59271a 100644
index 6e7f72a1a4..b1a3717d30 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -46,7 +46,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
private final long b = 16777215L;
private final Thread serverThread;
- private int d;
+ private int d; public int getSkylightSubtracted() { return this.d; } public void setSkylightSubtracted(int value) { this.d = value;} // Paper - OBFHELPER
protected int j = (new Random()).nextInt();
protected final int k = 1013904223;
- private int u;
+ private int u; public int getSkylightSubtracted() { return this.u; } public void setSkylightSubtracted(int value) { this.u = value;} // Paper - OBFHELPER
protected int i = (new Random()).nextInt();
protected final int j = 1013904223;
protected float lastRainLevel;
@@ -208,6 +208,54 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
return i < 0 || i >= 256;

View File

@ -1,11 +1,11 @@
From 8f8be849cf05bfb4adbb69d9946489c33b770ffc Mon Sep 17 00:00:00 2001
From f77b9c5b4e36960ad5e5abb91bb4ddd2d271a65a Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 21 Jun 2015 15:07:20 -0400
Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0b21c0b8dd..645b7f605c 100644
index acd6a3f142..f32408b3b5 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2817,12 +2817,13 @@ public abstract class EntityLiving extends Entity {
@ -35,7 +35,7 @@ index 0b21c0b8dd..645b7f605c 100644
+ // Paper end
this.a(this.getRaisedHand(), itemstack);
// CraftBukkit end
this.dq();
this.dp();
+ // Paper start - if the replacement is anything but the default, update the client inventory
+ if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
+ ((EntityPlayer) this).getBukkitEntity().updateInventory();

View File

@ -1,4 +1,4 @@
From cd5273fe9fa835c8840a82f4844be6f873b88cc7 Mon Sep 17 00:00:00 2001
From c3fa37daab3af14e540958f9d1754deac692251a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 22 Mar 2016 12:04:28 -0500
Subject: [PATCH] Configurable spawn chances for skeleton horses
@ -22,10 +22,10 @@ index 98049567f4..2a71381dae 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b72e1b8062..48ee9d7a5c 100644
index eaa2ff33c8..252fbb36eb 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -389,7 +389,7 @@ public class WorldServer extends World {
@@ -387,7 +387,7 @@ public class WorldServer extends World {
blockposition = this.a(this.a(j, 0, k, 15));
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);

View File

@ -1,4 +1,4 @@
From 9c9058dddd0f28532ee7dd70b53b47f330ac8a6d Mon Sep 17 00:00:00 2001
From ac322fe105093fc639e571fac8a0e5cce52c5b6a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 19:55:45 -0400
Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
@ -32,10 +32,10 @@ index ef392f5fe8..227fe073fd 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ffa208e81b..a87df2b6fb 100644
index 85c04d4035..1cbb8b1ef7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1095,6 +1095,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1107,6 +1107,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@ -44,7 +44,7 @@ index ffa208e81b..a87df2b6fb 100644
this.methodProfiler.a(() -> {
return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 822db5d4c0..93a061b6b2 100644
index c40777ecb8..cb5515dc3b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -440,7 +440,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -66,10 +66,10 @@ index 822db5d4c0..93a061b6b2 100644
this.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b5ff34443c..b7e98bc269 100644
index 252fbb36eb..44ababac7a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -68,6 +68,7 @@ public class WorldServer extends World {
@@ -71,6 +71,7 @@ public class WorldServer extends World {
// CraftBukkit start
private int tickPosition;

View File

@ -1,14 +1,14 @@
From 41fc6241ac74a486d2515d43f542b4d0c04c192d Mon Sep 17 00:00:00 2001
From 8840587b8d1c787f21915ab058e88d720e56403c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:32:58 -0400
Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 443986ef3a..28a6a62dfc 100644
index 44ababac7a..d2e6bd8c39 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1110,6 +1110,7 @@ public class WorldServer extends World {
@@ -1107,6 +1107,7 @@ public class WorldServer extends World {
entity.origin = entity.getBukkitEntity().getLocation();
}
// Paper end
@ -16,7 +16,7 @@ index 443986ef3a..28a6a62dfc 100644
}
}
@@ -1119,6 +1120,7 @@ public class WorldServer extends World {
@@ -1116,6 +1117,7 @@ public class WorldServer extends World {
if (this.tickingEntities) {
throw new IllegalStateException("Removing entity while ticking!");
} else {

View File

@ -1,4 +1,4 @@
From 59ebe95337d3e98711219afb2c04a22a213cd3f0 Mon Sep 17 00:00:00 2001
From 774c6237e4c391735a13a083af901713e91a82ea Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 21:22:26 -0400
Subject: [PATCH] EntityPathfindEvent
@ -6,23 +6,23 @@ Subject: [PATCH] EntityPathfindEvent
Fires when an Entity decides to start moving to a location.
diff --git a/src/main/java/net/minecraft/server/Navigation.java b/src/main/java/net/minecraft/server/Navigation.java
index 04ccf141ce..e15728668e 100644
index 9ca0e2c9d0..fd1dbb1085 100644
--- a/src/main/java/net/minecraft/server/Navigation.java
+++ b/src/main/java/net/minecraft/server/Navigation.java
@@ -60,7 +60,7 @@ public class Navigation extends NavigationAbstract {
@Override
public PathEntity a(Entity entity) {
- return this.b(new BlockPosition(entity));
+ return this.b(new BlockPosition(entity), entity); // Paper - Forward target entity
public PathEntity a(Entity entity, int i) {
- return this.a(new BlockPosition(entity), i);
+ return this.a(new BlockPosition(entity), entity, i); // Paper - Forward target entity
}
private int t() {
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 4a03bd9800..a9f17b0318 100644
index 4e49133b03..4d04ba8fc6 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -4,7 +4,7 @@ import javax.annotation.Nullable;
@@ -8,7 +8,7 @@ import javax.annotation.Nullable;
public abstract class NavigationAbstract {
@ -31,63 +31,69 @@ index 4a03bd9800..a9f17b0318 100644
protected final World b;
@Nullable
protected PathEntity c;
@@ -71,13 +71,15 @@ public abstract class NavigationAbstract {
return this.b(new BlockPosition(d0, d1, d2));
}
@@ -83,16 +83,26 @@ public abstract class NavigationAbstract {
- @Nullable
- public PathEntity b(BlockPosition blockposition) {
+ // Paper start - Add target entity parameter for path find event
+ @Nullable public PathEntity b(BlockPosition blockposition) { return this.b(blockposition, null); }
+ @Nullable public PathEntity b(BlockPosition blockposition, Entity target) {
@Nullable
public PathEntity a(BlockPosition blockposition, int i) {
- return this.a(ImmutableSet.of(blockposition), 8, false, i);
+ // Paper start - add target parameter
+ return this.a(blockposition, null, i);
+ }
+ @Nullable public PathEntity a(BlockPosition blockposition, Entity target, int i) {
+ return this.a(ImmutableSet.of(blockposition), target, 8, false, i);
+ // Paper end
float f = (float) blockposition.getX() + 0.5F;
float f1 = (float) blockposition.getY() + 0.5F;
float f2 = (float) blockposition.getZ() + 0.5F;
- return this.a(blockposition, (double) f, (double) f1, (double) f2, 8, false);
+ return this.a(blockposition, target, (double) f, (double) f1, (double) f2, 8, false); // Paper - Path find event
}
@Nullable
@@ -87,11 +89,12 @@ public abstract class NavigationAbstract {
double d1 = entity.getBoundingBox().minY;
double d2 = entity.locZ;
- return this.a(blockposition, d0, d1, d2, 16, true);
+ return this.a(blockposition, entity, d0, d1, d2, 16, true); // Paper - Path find event
public PathEntity a(Entity entity, int i) {
- return this.a(ImmutableSet.of(new BlockPosition(entity)), 16, true, i);
+ return this.a(ImmutableSet.of(new BlockPosition(entity)), entity, 16, true, i); // Paper
}
@Nullable
- protected PathEntity a(BlockPosition blockposition, double d0, double d1, double d2, int i, boolean flag) {
+ protected PathEntity a(BlockPosition blockposition, double d0, double d1, double d2, int i, boolean flag) { return this.a(blockposition, null, d0, d1, d2, i, flag); }
+ @Nullable protected PathEntity a(BlockPosition blockposition, Entity target, double d0, double d1, double d2, int i, boolean flag) {
if (this.a.locY < 0.0D) {
+ // Paper start - Add target
protected PathEntity a(Set<BlockPosition> set, int i, boolean flag, int j) {
+ return this.a(set, null, i, flag, j);
+ }
+ @Nullable protected PathEntity a(Set<BlockPosition> set, Entity target, int i, boolean flag, int j) {
+ // Paper end
if (set.isEmpty()) {
return null;
} else if (!this.a()) {
@@ -99,6 +102,12 @@ public abstract class NavigationAbstract {
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
} else if (this.a.locY < 0.0D) {
@@ -102,6 +112,23 @@ public abstract class NavigationAbstract {
} else if (this.c != null && !this.c.b() && set.contains(this.q)) {
return this.c;
} else {
+ // Paper start - Pathfind event
+ boolean copiedSet = false;
+ for (BlockPosition possibleTarget : set) {
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(),
+ MCUtil.toLocation(getEntity().world, blockposition), target == null ? null : target.getBukkitEntity()).callEvent()) {
+ MCUtil.toLocation(getEntity().world, possibleTarget), target == null ? null : target.getBukkitEntity()).callEvent()) {
+ if (!copiedSet) {
+ copiedSet = true;
+ set = new java.util.HashSet<>(set);
+ }
+ // note: since we copy the set this remove call is safe, since we're iterating over the old copy
+ set.remove(possibleTarget);
+ if (set.isEmpty()) {
+ return null;
+ }
+ }
+ }
+ // Paper end
this.q = blockposition.immutableCopy();
this.b.getMethodProfiler().enter("pathfind");
float f = this.i();
BlockPosition blockposition = flag ? (new BlockPosition(this.a)).up() : new BlockPosition(this.a);
diff --git a/src/main/java/net/minecraft/server/NavigationFlying.java b/src/main/java/net/minecraft/server/NavigationFlying.java
index 9dfca6067f..551ff417bd 100644
index f5844a7260..fbf5752aa5 100644
--- a/src/main/java/net/minecraft/server/NavigationFlying.java
+++ b/src/main/java/net/minecraft/server/NavigationFlying.java
@@ -25,7 +25,7 @@ public class NavigationFlying extends NavigationAbstract {
@Override
public PathEntity a(Entity entity) {
- return this.b(new BlockPosition(entity));
+ return this.b(new BlockPosition(entity), entity); // Paper - Pathfind event
public PathEntity a(Entity entity, int i) {
- return this.a(new BlockPosition(entity), i);
+ return this.a(new BlockPosition(entity), entity, i); // Paper - Forward target entity
}
@Override

View File

@ -1,11 +1,11 @@
From 3a28632a712e12127804f4157859dc49c0f32b36 Mon Sep 17 00:00:00 2001
From 5ff0a28a206a6167b2cc2ed85be0bdbc41633c19 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 31 Mar 2016 19:17:58 -0400
Subject: [PATCH] Do not load chunks for Pathfinding
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
index ccbc1dde0..34e743716 100644
index 869e8548c6..beb50d2068 100644
--- a/src/main/java/net/minecraft/server/ChunkCache.java
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
@@ -25,7 +25,7 @@ public class ChunkCache implements IWorldReader {
@ -27,23 +27,23 @@ index ccbc1dde0..34e743716 100644
@Override
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index a9f17b031..8b05b8acd 100644
index 4d04ba8fc6..126c05adc7 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -22,7 +22,7 @@ public abstract class NavigationAbstract {
protected long n;
@@ -27,7 +27,7 @@ public abstract class NavigationAbstract {
protected PathfinderAbstract o;
private BlockPosition q;
- private Pathfinder r;
+ private Pathfinder r; public Pathfinder getPathfinder() { return r; } // Paper - OBFHELPER
private int r;
- private Pathfinder s;
+ private Pathfinder s; public Pathfinder getPathfinder() { return this.s; } // Paper - OBFHELPER
public NavigationAbstract(EntityInsentient entityinsentient, World world) {
this.g = Vec3D.a;
diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java
index 359d9a11c..262fa5585 100644
index 30b4569a39..0cec80ec7d 100644
--- a/src/main/java/net/minecraft/server/Pathfinder.java
+++ b/src/main/java/net/minecraft/server/Pathfinder.java
@@ -12,7 +12,7 @@ public class Pathfinder {
@@ -19,7 +19,7 @@ public class Pathfinder {
private final Set<PathPoint> b = Sets.newHashSet();
private final PathPoint[] c = new PathPoint[32];
private final int d;
@ -53,7 +53,7 @@ index 359d9a11c..262fa5585 100644
public Pathfinder(PathfinderAbstract pathfinderabstract, int i) {
this.e = pathfinderabstract;
diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java
index 593f13af4..80fcb66e3 100644
index 617c29a58a..45fd135034 100644
--- a/src/main/java/net/minecraft/server/PathfinderNormal.java
+++ b/src/main/java/net/minecraft/server/PathfinderNormal.java
@@ -355,7 +355,8 @@ public class PathfinderNormal extends PathfinderAbstract {

View File

@ -1,11 +1,11 @@
From e7e9594d32eab8f5653501e1ed7aec5e623bb583 Mon Sep 17 00:00:00 2001
From 3a52ecf1b027228b2c9325519362f95f31c7ed8a Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 2 Apr 2016 05:09:16 -0400
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
index 680adbdeb..3f7697b39 100644
index 680adbdeb0..3f7697b39c 100644
--- a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
+++ b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
@@ -5,7 +5,7 @@ import javax.annotation.Nullable;
@ -18,10 +18,10 @@ index 680adbdeb..3f7697b39 100644
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 8d325db4a..a6bb6a511 100644
index 7906b67570..32c6e2eca4 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1932,6 +1932,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1897,6 +1897,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}
}

View File

@ -1,15 +1,15 @@
From 0f2946da63e4535f27443aca7732bb5ff9415eac Mon Sep 17 00:00:00 2001
From 5bd701a50d3bfb1c5e3ee0d9e4943cf228713b68 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Apr 2016 17:48:50 -0400
Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 35fb686d8..b1ce9b874 100644
index a0e3974a54..07d1505867 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -510,6 +510,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
public void m(BlockPosition blockposition) {}
public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {}
public void applyPhysics(BlockPosition blockposition, Block block) {
+ if (captureBlockStates) { return; } // Paper - Cancel all physics during placement

View File

@ -1,4 +1,4 @@
From 6200eb779aea5a7a90e6e77adee16a5ec273b9ff Mon Sep 17 00:00:00 2001
From 0bb92ac5ff3a6a438066972a9983b450375cbe92 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Apr 2016 21:38:58 -0400
Subject: [PATCH] Remove Debug checks from DataBits
@ -9,10 +9,10 @@ Before: http://i.imgur.com/nQsMzAE.png
After: http://i.imgur.com/nJ46crB.png
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
index 409dc837c..4194acc8b 100644
index 08d1be3117..a75b08ee33 100644
--- a/src/main/java/net/minecraft/server/DataBits.java
+++ b/src/main/java/net/minecraft/server/DataBits.java
@@ -14,7 +14,7 @@ public class DataBits {
@@ -15,7 +15,7 @@ public class DataBits {
}
public DataBits(int i, int j, long[] along) {
@ -21,7 +21,7 @@ index 409dc837c..4194acc8b 100644
this.d = j;
this.b = i;
this.a = along;
@@ -27,8 +27,8 @@ public class DataBits {
@@ -28,8 +28,8 @@ public class DataBits {
}
public int a(int i, int j) {
@ -32,7 +32,7 @@ index 409dc837c..4194acc8b 100644
int k = i * this.b;
int l = k >> 6;
int i1 = (i + 1) * this.b - 1 >> 6;
@@ -49,8 +49,8 @@ public class DataBits {
@@ -50,8 +50,8 @@ public class DataBits {
}
public void b(int i, int j) {
@ -43,7 +43,7 @@ index 409dc837c..4194acc8b 100644
int k = i * this.b;
int l = k >> 6;
int i1 = (i + 1) * this.b - 1 >> 6;
@@ -67,7 +67,7 @@ public class DataBits {
@@ -68,7 +68,7 @@ public class DataBits {
}
public int a(int i) {

View File

@ -1,4 +1,4 @@
From e40c08b3fbb3d17216aa807c6111cc15157fc0d4 Mon Sep 17 00:00:00 2001
From 8450187c9dae694288aa6eb2c64f2979755efeee Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 6 Apr 2016 01:04:23 -0500
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
@ -12,7 +12,7 @@ for this on CB at one point but I can't find it. We may need to do this
ourselves at some point in the future.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 271410337..aeeb7c24e 100644
index 271410337d..aeeb7c24ef 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -245,4 +245,9 @@ public class PaperWorldConfig {
@ -26,10 +26,10 @@ index 271410337..aeeb7c24e 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a6bb6a511..c4384bbee 100644
index 32c6e2eca4..046bcb27e3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1666,7 +1666,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1631,7 +1631,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
return;
}
@ -48,7 +48,7 @@ index a6bb6a511..c4384bbee 100644
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
for (Object recipient : minecraftServer.getPlayerList().players) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index cce5305fb..d368b3975 100644
index cce5305fbe..d368b39751 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -177,7 +177,7 @@ public abstract class PlayerList {

View File

@ -1,4 +1,4 @@
From e4a968963a687d98049c628e230dacbdd1011fcd Mon Sep 17 00:00:00 2001
From 4e1e1c945760b2c4649778faddc0660e15f4b60b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 00:25:28 -0400
Subject: [PATCH] Remove unused World Tile Entity List
@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b1ce9b874..f396ca691 100644
index 07d1505867..ebeb48f6dc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -40,7 +40,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -66,6 +66,28 @@ index b1ce9b874..f396ca691 100644
this.tileEntityListTick.remove(tileentity);
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d2e6bd8c39..c81156a7ca 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1557,7 +1557,7 @@ public class WorldServer extends World {
}
bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size()));
- bufferedwriter.write(String.format("block_entities: %d\n", this.tileEntityList.size()));
+ bufferedwriter.write(String.format("block_entities: %d\n", this.tileEntityListTick.size())); // Paper - remove unused list
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");
@@ -1720,7 +1720,7 @@ public class WorldServer extends World {
private void a(Writer writer) throws IOException {
CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer);
- Iterator iterator = this.tileEntityList.iterator();
+ Iterator iterator = this.tileEntityListTick.iterator(); // Paper - remove unused list
while (iterator.hasNext()) {
TileEntity tileentity = (TileEntity) iterator.next();
--
2.22.0

View File

@ -1,11 +1,11 @@
From c0d681f2d2654d66987c76f82fba905b96076db8 Mon Sep 17 00:00:00 2001
From c37becf719c64b0f3313627c7d9e6ee6be8fccd3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 0cef1853f..dc3438890 100644
index 0cef1853f5..dc3438890b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -223,4 +223,9 @@ public class PaperConfig {
@ -19,10 +19,10 @@ index 0cef1853f..dc3438890 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a87df2b6f..ccfe1b4c3 100644
index 1cbb8b1ef7..257258c189 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -436,6 +436,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -446,6 +446,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}
@ -44,7 +44,7 @@ index a87df2b6f..ccfe1b4c3 100644
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
index b0740965a..6b1a914d2 100644
index b0740965a4..6b1a914d2f 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
@@ -96,7 +96,7 @@ public class PacketPlayOutScoreboardTeam implements Packet<PacketListenerPlayOut
@ -57,7 +57,7 @@ index b0740965a..6b1a914d2 100644
packetdataserializer.a(this.c);
packetdataserializer.a(this.d);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index d368b3975..ee5297dc3 100644
index d368b39751..ee5297dc38 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -72,6 +72,7 @@ public abstract class PlayerList {

View File

@ -1,4 +1,4 @@
From 1fdbd7f48b5093cd1390e999ba1bfab46a5e46a5 Mon Sep 17 00:00:00 2001
From d9a3536a7a23b482b3808a0c323d69b5517e6dde Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 16 Apr 2016 00:39:33 -0400
Subject: [PATCH] Configurable RCON IP address
@ -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 4af81c886..fb092a941 100644
index ad1e3508a7..0c3ec83570 100644
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
@@ -53,6 +53,8 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
@@ -54,6 +54,8 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Integer> playerIdleTimeout;
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
@ -18,7 +18,7 @@ index 4af81c886..fb092a941 100644
// CraftBukkit start
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
super(properties, optionset);
@@ -98,6 +100,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
@@ -100,6 +102,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
}, 29999984);
this.playerIdleTimeout = this.b("player-idle-timeout", 0);
this.whiteList = this.b("white-list", false);
@ -30,7 +30,7 @@ index 4af81c886..fb092a941 100644
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/PropertyManager.java b/src/main/java/net/minecraft/server/PropertyManager.java
index d7e81a6d9..729455ce5 100644
index d7e81a6d99..729455ce53 100644
--- a/src/main/java/net/minecraft/server/PropertyManager.java
+++ b/src/main/java/net/minecraft/server/PropertyManager.java
@@ -127,8 +127,8 @@ public abstract class PropertyManager<T extends PropertyManager<T>> {
@ -45,7 +45,7 @@ index d7e81a6d9..729455ce5 100644
}
diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java
index e48d6dcd7..2ce490be0 100644
index e48d6dcd74..2ce490be00 100644
--- a/src/main/java/net/minecraft/server/RemoteControlListener.java
+++ b/src/main/java/net/minecraft/server/RemoteControlListener.java
@@ -25,7 +25,7 @@ public class RemoteControlListener extends RemoteConnectionThread {

View File

@ -1,11 +1,11 @@
From eb26cb49b8c0b9ca1bb297eec904b50998e3e56c Mon Sep 17 00:00:00 2001
From f4fa73ca0720878a17001c4926e6c159446bdc2d Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com>
Date: Tue, 19 Apr 2016 14:09:31 -0500
Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 462c66673..c5dbcbe59 100644
index ceb88515f3..ef80bc12f6 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -37,7 +37,7 @@ import org.bukkit.inventory.MainHand;
@ -17,7 +17,7 @@ index 462c66673..c5dbcbe59 100644
public PlayerConnection playerConnection;
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
@@ -1449,13 +1449,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1450,13 +1450,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}
@ -40,7 +40,7 @@ index 462c66673..c5dbcbe59 100644
this.cl = packetplayinsettings.e();
this.getDataWatcher().set(EntityPlayer.bt, (byte) packetplayinsettings.f());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 57f2499ca..d854d4844 100644
index a3faa7da33..2a04e9f504 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1758,8 +1758,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -1,4 +1,4 @@
From 46c11def326856f9e47d21b9abc6ba7a4b6b4cfa Mon Sep 17 00:00:00 2001
From 1d10e6e32bcf870ba8f8e0a3f44fe1afbfabc7f6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 Apr 2016 00:57:27 -0400
Subject: [PATCH] remove null possibility for getServer singleton
@ -6,26 +6,26 @@ 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 ccfe1b4c3..1dda1fee9 100644
index 257258c189..bb0b37a29c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -59,6 +59,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
@@ -68,6 +68,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable {
+ private static MinecraftServer SERVER; // Paper
public static final Logger LOGGER = LogManager.getLogger();
public static final File b = new File("usercache.json");
public static final WorldSettings c = (new WorldSettings((long) "North Carolina".hashCode(), EnumGamemode.SURVIVAL, true, false, WorldType.NORMAL)).a();
@@ -164,6 +165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private static final CompletableFuture<Unit> i = CompletableFuture.completedFuture(Unit.INSTANCE);
@@ -175,6 +176,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public MinecraftServer(OptionSet options, Proxy proxy, DataFixer datafixer, CommandDispatcher commanddispatcher, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory, String s) {
super("Server");
this.ae = new ResourceManager(EnumResourcePackType.SERVER_DATA, this.serverThread);
+ SERVER = this; // Paper - better singleton
this.ad = new ResourceManager(EnumResourcePackType.SERVER_DATA, this.serverThread);
this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new);
this.ah = new CraftingManager();
@@ -1911,7 +1913,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.ai = new CraftingManager();
this.aj = new TagRegistry();
@@ -2119,7 +2121,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Deprecated
public static MinecraftServer getServer() {

View File

@ -1,4 +1,4 @@
From 943f8772a86f10285c6d500e548491814fe895ac Mon Sep 17 00:00:00 2001
From 610601e93c59ca7deee4414062e1b7dc9eeb0478 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Apr 2016 20:02:00 -0400
Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes
@ -13,10 +13,10 @@ 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 1a41a9c1d..1a1b1dd1e 100644
index 5c45d8ee08..87d3337c88 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -590,6 +590,12 @@ public abstract class EntityHuman extends EntityLiving {
@@ -605,6 +605,12 @@ public abstract class EntityHuman extends EntityLiving {
return null;
}
// CraftBukkit end
@ -30,7 +30,7 @@ index 1a41a9c1d..1a1b1dd1e 100644
return entityitem;
}
diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java
index fc0815893..090d3dbd3 100644
index fc08158937..090d3dbd31 100644
--- a/src/main/java/net/minecraft/server/WorldMap.java
+++ b/src/main/java/net/minecraft/server/WorldMap.java
@@ -31,6 +31,7 @@ public class WorldMap extends PersistentBase {
@ -102,10 +102,10 @@ index fc0815893..090d3dbd3 100644
for ( org.bukkit.map.MapCursor cursor : render.cursors) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 28a6a62df..d0ab36190 100644
index d2e6bd8c39..863b678846 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1047,6 +1047,7 @@ public class WorldServer extends World {
@@ -1044,6 +1044,7 @@ public class WorldServer extends World {
{
if ( iter.next().trackee == entity )
{
@ -114,7 +114,7 @@ index 28a6a62df..d0ab36190 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/map/RenderData.java b/src/main/java/org/bukkit/craftbukkit/map/RenderData.java
index 256a13178..5768cd512 100644
index 256a131781..5768cd512e 100644
--- a/src/main/java/org/bukkit/craftbukkit/map/RenderData.java
+++ b/src/main/java/org/bukkit/craftbukkit/map/RenderData.java
@@ -5,7 +5,7 @@ import org.bukkit.map.MapCursor;

View File

@ -1,4 +1,4 @@
From be64a5db5bd0d3a37ba2de71bba177043ba85e0d Mon Sep 17 00:00:00 2001
From 26b42293f673a7c08bf8f14fde2260901ca07a3e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 16 May 2016 20:47:41 -0400
Subject: [PATCH] Optimize UserCache / Thread Safe
@ -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/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1dda1fee9..065062c61 100644
index bb0b37a29c..b7e188cf9f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -740,7 +740,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -752,7 +752,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
LOGGER.info("Saving usercache.json");
@ -23,7 +23,7 @@ index 1dda1fee9..065062c61 100644
// Spigot end
}
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
index 57d053e9f..ea0256755 100644
index 57d053e9ff..ea02567554 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
@@ -43,8 +43,8 @@ public class UserCache {

View File

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

View File

@ -1,14 +1,14 @@
From 43a5570007eaa8674bbce1e96544fba27dbd0e54 Mon Sep 17 00:00:00 2001
From 3c1bfaec22e1743156d4806b5e56b666a63294e9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Jul 2016 17:58:53 -0500
Subject: [PATCH] More informative vehicle moved wrongly message
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c4384bbee..be2fe04a9 100644
index 046bcb27e3..39662f1462 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -361,7 +361,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -362,7 +362,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
flag1 = true;

View File

@ -1,14 +1,14 @@
From 6c34034efcc75beb19e063096f73cc95a0995b8f Mon Sep 17 00:00:00 2001
From 472812cd2e86962b1e22b8ccaa27fa997ecc7742 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 31 Jul 2016 16:33:03 -0500
Subject: [PATCH] Re-track players that dismount from other players
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index c5dbcbe59..2d29e9d86 100644
index ef80bc12f6..c0889bfc20 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -980,6 +980,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -981,6 +981,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (entity1 != entity && this.playerConnection != null) {
this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
}

View File

@ -1,11 +1,11 @@
From f9ce5a3aec563f3b0d461b1d708e83538092f17b Mon Sep 17 00:00:00 2001
From c948e40ab09a0873d5df1d64a05b26cb7e56bf93 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 11 Sep 2016 14:30:57 -0500
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 1daa2e453..5d0645c82 100644
index 1daa2e4535..5d0645c829 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -243,4 +243,13 @@ public class PaperConfig {
@ -23,10 +23,10 @@ index 1daa2e453..5d0645c82 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index be2fe04a9..cfd34f516 100644
index 39662f1462..586d40a471 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1226,13 +1226,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1191,13 +1191,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;

View File

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

View File

@ -1,11 +1,11 @@
From 97f0e2e694712db3a4bc8febda96ed6e44a5a87f Mon Sep 17 00:00:00 2001
From 495e69a586a30ceb3ba646e097c743813fd22e29 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:30 -0700
Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index 23621a0dc..0d099d2fd 100644
index bdbd0371e8..1943a23de4 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -168,6 +168,12 @@ public class EntityPig extends EntityAnimal {
@ -22,10 +22,10 @@ index 23621a0dc..0d099d2fd 100644
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 14125f519..5e56447e7 100644
index ba0386ad4e..09d12d1fca 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -618,6 +618,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -693,6 +693,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
public void onLightningStrike(EntityLightning entitylightning) {
EntityWitch entitywitch = (EntityWitch) EntityTypes.WITCH.a(this.world);
@ -39,7 +39,7 @@ index 14125f519..5e56447e7 100644
entitywitch.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entitywitch)), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null);
entitywitch.setNoAI(this.isNoAI());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index bb5c5aa3d..cf1abd187 100644
index bff5883d77..7abced0442 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1014,6 +1014,14 @@ public class CraftEventFactory {

View File

@ -1,11 +1,11 @@
From 328ec5b1b2c4b56d24a60aeb5858cf54b7f4aa21 Mon Sep 17 00:00:00 2001
From 8eaf282800c825f2c49bfe029e6ad4ba46c21e67 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 12 Nov 2016 23:25:22 -0600
Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 849872f66..11b0f11a8 100644
index 849872f663..11b0f11a80 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -2,6 +2,7 @@ package com.destroystokyo.paper;
@ -30,10 +30,10 @@ index 849872f66..11b0f11a8 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 9d86beda9..44dd99ea2 100644
index 0f9fa41133..0a6d2b9b39 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -232,6 +232,15 @@ public class EntityFallingBlock extends Entity {
@@ -233,6 +233,15 @@ public class EntityFallingBlock extends Entity {
@Override
protected void a(NBTTagCompound nbttagcompound) {
this.block = GameProfileSerializer.d(nbttagcompound.getCompound("BlockState"));

View File

@ -1,14 +1,14 @@
From dbbca49137c950788a787394a49de39d64f46a90 Mon Sep 17 00:00:00 2001
From 0b49c3de819289a7beb6bebc8cf16c245c7b3bcc Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es>
Date: Wed, 23 Nov 2016 08:31:45 -0500
Subject: [PATCH] Cache user authenticator threads
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index b85b048ac..22d5c7d20 100644
index 3db306655d..49df63d6de 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -92,6 +92,12 @@ public class LoginListener implements PacketLoginInListener {
@@ -97,6 +97,12 @@ public class LoginListener implements PacketLoginInListener {
}
@ -21,7 +21,7 @@ index b85b048ac..22d5c7d20 100644
// Spigot start
public void initUUID()
{
@@ -170,8 +176,8 @@ public class LoginListener implements PacketLoginInListener {
@@ -175,8 +181,8 @@ public class LoginListener implements PacketLoginInListener {
this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e));
} else {
// Spigot start
@ -32,7 +32,7 @@ index b85b048ac..22d5c7d20 100644
@Override
public void run() {
try {
@@ -182,7 +188,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,7 +42,7 @@ index b85b048ac..22d5c7d20 100644
// Spigot end
}
@@ -199,7 +206,8 @@ public class LoginListener implements PacketLoginInListener {
@@ -204,7 +211,8 @@ public class LoginListener implements PacketLoginInListener {
this.loginKey = packetlogininencryptionbegin.a(privatekey);
this.g = LoginListener.EnumProtocolState.AUTHENTICATING;
this.networkManager.a(this.loginKey);
@ -52,9 +52,9 @@ index b85b048ac..22d5c7d20 100644
public void run() {
GameProfile gameprofile = LoginListener.this.i;
@@ -246,10 +254,8 @@ public class LoginListener implements PacketLoginInListener {
@@ -251,10 +259,8 @@ public class LoginListener implements PacketLoginInListener {
return LoginListener.this.server.T() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
return LoginListener.this.server.U() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
}
- };
-

View File

@ -1,11 +1,11 @@
From 98d8191eba1f6029f5ebae24b943dcb60151a8ab Mon Sep 17 00:00:00 2001
From 3d1daac800afd1ea09b18d50ac15b616e6be5352 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 25 Nov 2016 13:22:40 +0000
Subject: [PATCH] Optimise removeQueue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 7b0c89ce7..fc4b3945d 100644
index fd53e53562..a835f77dc3 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;
@ -50,7 +50,7 @@ index 7b0c89ce7..fc4b3945d 100644
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint));
}
@@ -1323,7 +1332,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1324,7 +1333,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.lastHealthSent = -1.0F;
this.lastFoodSent = -1;
// this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit

View File

@ -1,4 +1,4 @@
From 55841be6ae2c51e34ba14f337cbbf0ff7c352696 Mon Sep 17 00:00:00 2001
From 0c29a08334c31ceac93202ef8cc943e177ea67e5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 19 Dec 2016 23:07:42 -0500
Subject: [PATCH] Prevent Pathfinding out of World Border
@ -6,17 +6,18 @@ Subject: [PATCH] Prevent Pathfinding out of World Border
This prevents Entities from trying to run outside of the World Border
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 8b05b8acd..65b38d75b 100644
index 126c05adc7..be6aa59749 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -95,6 +95,7 @@ public abstract class NavigationAbstract {
@Nullable
protected PathEntity a(BlockPosition blockposition, double d0, double d1, double d2, int i, boolean flag) { return this.a(blockposition, null, d0, d1, d2, i, flag); }
@Nullable protected PathEntity a(BlockPosition blockposition, Entity target, double d0, double d1, double d2, int i, boolean flag) {
+ if (!getEntity().getWorld().getWorldBorder().isInBounds(blockposition)) return null; // Paper - don't path out of world border
if (this.a.locY < 0.0D) {
return null;
} else if (!this.a()) {
@@ -115,7 +115,7 @@ public abstract class NavigationAbstract {
// Paper start - Pathfind event
boolean copiedSet = false;
for (BlockPosition possibleTarget : set) {
- if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(),
+ if (!getEntity().getWorld().getWorldBorder().isInBounds(possibleTarget) || !new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), // Paper - don't path out of world border
MCUtil.toLocation(getEntity().world, possibleTarget), target == null ? null : target.getBukkitEntity()).callEvent()) {
if (!copiedSet) {
copiedSet = true;
--
2.22.0

View File

@ -1,11 +1,11 @@
From 66befc2b6f14be3178930d89c6d392a763f8bba3 Mon Sep 17 00:00:00 2001
From 02f8350a638e2937a4fc5ba86243e2c3dcf83e36 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 21 Dec 2016 11:47:25 -0600
Subject: [PATCH] Add API methods to control if armour stands can move
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 2ba9cc9fe..ccdd0d27e 100644
index 9bf18e9b06..de5a4a05ad 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -43,6 +43,7 @@ public class EntityArmorStand extends EntityLiving {
@ -18,7 +18,7 @@ index 2ba9cc9fe..ccdd0d27e 100644
super(entitytypes, world);
@@ -789,4 +790,13 @@ public class EntityArmorStand extends EntityLiving {
return this.getEntityType().j().a(f);
return this.getEntityType().k().a(f);
}
+
+ // Paper start
@ -31,7 +31,7 @@ index 2ba9cc9fe..ccdd0d27e 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index 2b66a08ad..124c3185b 100644
index 2b66a08ade..124c3185bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -211,4 +211,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {

View File

@ -1,4 +1,4 @@
From 91e39c858f06734d31882e3027101fcd628e30df Mon Sep 17 00:00:00 2001
From a4c3a38bf45b8c61a927d6776e5fd4390b369cc0 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Tue, 27 Dec 2016 01:57:57 +0000
Subject: [PATCH] Properly fix item duplication bug
@ -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 fc4b3945d..18c71640f 100644
index a835f77dc3..5d659d626b 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1796,7 +1796,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1797,7 +1797,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
protected boolean isFrozen() {
@ -19,10 +19,10 @@ index fc4b3945d..18c71640f 100644
@Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index bf09c3939..fd8d30e5c 100644
index 13c1d9b914..068827e2ea 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2550,7 +2550,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2515,7 +2515,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
public final boolean isDisconnected() {

View File

@ -1,4 +1,4 @@
From 4af485139828a7c37975ecab287553f2db10eb96 Mon Sep 17 00:00:00 2001
From 03f39502eeb5083f0bc4a54de2de1ac40915ad44 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 16:31:46 -0500
Subject: [PATCH] ExperienceOrbs API for Reason/Source/Triggering player
@ -8,7 +8,7 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 4b9e51b30..c72ae7e25 100644
index a4b6d6fd4c..2c0e59c60d 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -511,13 +511,13 @@ public class Block implements IMaterial {
@ -28,7 +28,7 @@ index 4b9e51b30..c72ae7e25 100644
}
diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java
index 2d2cd09ad..ed88e208d 100644
index 2d2cd09ad1..ed88e208d0 100644
--- a/src/main/java/net/minecraft/server/ContainerGrindstone.java
+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java
@@ -81,7 +81,7 @@ public class ContainerGrindstone extends Container {
@ -41,7 +41,7 @@ index 2d2cd09ad..ed88e208d 100644
world.triggerEffect(1042, blockposition, 0);
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 0421052d2..f015c023e 100644
index cf857b88de..5fae347db2 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -607,7 +607,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
@ -54,7 +54,7 @@ index 0421052d2..f015c023e 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index a4cd502bc..214ecdb88 100644
index a4cd502bca..214ecdb884 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -16,9 +16,59 @@ public class EntityExperienceOrb extends Entity {
@ -134,7 +134,7 @@ index a4cd502bc..214ecdb88 100644
@Override
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 05fa5cd6a..d9767de12 100644
index 758559d35d..2a351701b4 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -404,7 +404,7 @@ public class EntityFishingHook extends Entity {
@ -147,7 +147,7 @@ index 05fa5cd6a..d9767de12 100644
// CraftBukkit end
if (itemstack1.getItem().a(TagsItem.FISHES)) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 45c024ca2..cb2f3eb45 100644
index c435c7303d..c5e671961b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -385,7 +385,8 @@ public abstract class EntityLiving extends Entity {
@ -161,7 +161,7 @@ index 45c024ca2..cb2f3eb45 100644
this.expToDrop = 0;
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
index 4ac5cce06..05970c564 100644
index 4ac5cce062..05970c5644 100644
--- a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
+++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
@@ -43,7 +43,7 @@ public class EntityThrownExpBottle extends EntityProjectileThrowable {
@ -174,7 +174,7 @@ index 4ac5cce06..05970c564 100644
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java
index dc1ba69f6..013b3a1ca 100644
index 25c7214ded..594cc70def 100644
--- a/src/main/java/net/minecraft/server/EntityTurtle.java
+++ b/src/main/java/net/minecraft/server/EntityTurtle.java
@@ -508,7 +508,7 @@ public class EntityTurtle extends EntityAnimal {
@ -187,10 +187,10 @@ index dc1ba69f6..013b3a1ca 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 5e56447e7..9311cc5bd 100644
index 09d12d1fca..a4033a6663 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -429,7 +429,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -504,7 +504,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
}
if (merchantrecipe.isRewardExp()) {
@ -200,7 +200,7 @@ index 5e56447e7..9311cc5bd 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
index b9aa51295..c179e11e4 100644
index 1753c67aa9..a24e7127d7 100644
--- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java
+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
@@ -147,7 +147,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
@ -213,7 +213,7 @@ index b9aa51295..c179e11e4 100644
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
index 363a98bec..0cc34400b 100644
index 363a98bece..0cc34400be 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
@@ -117,7 +117,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
@ -226,20 +226,20 @@ index 363a98bec..0cc34400b 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 4ccc77e4f..e306b138d 100644
index 954f0f2019..ac60c96e3a 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -367,7 +367,7 @@ public class PlayerInteractManager {
@@ -364,7 +364,7 @@ public class PlayerInteractManager {
// CraftBukkit start - Drop event experience
// Drop event experience
if (flag && event != null) {
- iblockdata.getBlock().dropExperience(this.world, blockposition, event.getExpToDrop());
+ iblockdata.getBlock().dropExperience(this.world, blockposition, event.getExpToDrop(), this.player); // Paper
}
// CraftBukkit end
return true;
diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
index d2698e847..edc4a5c34 100644
index d2698e847c..edc4a5c34e 100644
--- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java
+++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
@@ -2,7 +2,7 @@ package net.minecraft.server;
@ -252,7 +252,7 @@ index d2698e847..edc4a5c34 100644
public SlotFurnaceResult(EntityHuman entityhuman, IInventory iinventory, int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index 0cb2e6d87..2bbd3663a 100644
index 0cb2e6d874..2bbd3663a7 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -554,7 +554,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@ -265,7 +265,7 @@ index 0cb2e6d87..2bbd3663a 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b07e3fe26..853a0374e 100644
index b02bc99298..ac680a6a78 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1695,7 +1695,7 @@ public class CraftWorld implements World {
@ -278,7 +278,7 @@ index b07e3fe26..853a0374e 100644
entity = new EntityLightning(world, x, y, z, false);
} else if (Firework.class.isAssignableFrom(clazz)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index 1b512cc45..fbad04567 100644
index 1b512cc45c..fbad045675 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@@ -20,6 +20,18 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {

View File

@ -1,4 +1,4 @@
From e33ae307a120190c1dd440ba9e099ec6f3f7418c Mon Sep 17 00:00:00 2001
From b40164fbd816aa8ff20c8416815fc9d49ad83204 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 22 Jan 2017 18:07:56 -0500
Subject: [PATCH] Cap Entity Collisions
@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
You can set this to 0 to disable collisions.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 46d525223..de8362ddd 100644
index 46d5252239..de8362ddd7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -315,4 +315,10 @@ public class PaperWorldConfig {
@ -27,7 +27,7 @@ index 46d525223..de8362ddd 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f2be5b5a3..4dd2df808 100644
index f4188fc75d..482864ac62 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -184,6 +184,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -39,7 +39,7 @@ index f2be5b5a3..4dd2df808 100644
// Spigot end
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index cb2f3eb45..769540479 100644
index c5e671961b..96bed03b15 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2559,8 +2559,11 @@ public abstract class EntityLiving extends Entity {

View File

@ -1,4 +1,4 @@
From c6eda3f2ed18dd7cb6c375e143ec729bef2d7729 Mon Sep 17 00:00:00 2001
From 8a89d0054aa70d747bc10d9a0f546df94ab6bb3e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 5 Feb 2017 00:04:04 -0500
Subject: [PATCH] Remove CraftScheduler Async Task Debugger
@ -9,7 +9,7 @@ One report of a suspected memory leak with the system.
This adds additional overhead to asynchronous task dispatching
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 552daf437..e102be583 100644
index 552daf4376..e102be583c 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -414,7 +414,7 @@ public class CraftScheduler implements BukkitScheduler {

View File

@ -1,14 +1,14 @@
From 6774c84e4671225b9edb7d8f94e4aa589d376d82 Mon Sep 17 00:00:00 2001
From 3728f0b19240c5f228fb7caa3e467ab7f78f9155 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 7 Feb 2017 16:55:35 -0600
Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index b5ae705d9..71494ecb3 100644
index 14b0875eee..63140fb642 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -104,7 +104,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -109,7 +109,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.v = new AtomicInteger();
this.playerMap = new PlayerMap();
this.trackedEntities = new Int2ObjectOpenHashMap();
@ -17,7 +17,7 @@ index b5ae705d9..71494ecb3 100644
this.definedStructureManager = definedstructuremanager;
this.x = worldserver.getWorldProvider().getDimensionManager().a(file);
this.world = worldserver;
@@ -347,7 +347,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -354,7 +354,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Spigot start
org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant;
activityAccountant.startActivity(0.5);
@ -26,11 +26,11 @@ index b5ae705d9..71494ecb3 100644
// Spigot end
while (longiterator.hasNext()) { // Spigot
long j = longiterator.nextLong();
@@ -369,7 +369,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -376,7 +376,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
Runnable runnable;
- while (booleansupplier.getAsBoolean() && (runnable = (Runnable) this.A.poll()) != null) {
- while ((booleansupplier.getAsBoolean() || this.A.size() > 2000) && (runnable = (Runnable) this.A.poll()) != null) {
+ int queueTarget = Math.min(this.A.size() - 100, (int) (this.A.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Target this queue as well
+
+ while ((booleansupplier.getAsBoolean() || this.A.size() > queueTarget) && (runnable = (Runnable) this.A.poll()) != null) { // Paper - Target this queue as well

View File

@ -1,11 +1,11 @@
From e69cd7f468280194fb62e08f23f504f7862c187c Mon Sep 17 00:00:00 2001
From 9ea404bf49b2813a616fb19a09d7fed57e502d05 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 18 Feb 2017 19:29:58 -0600
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 ccdd0d27e..62a878d13 100644
index de5a4a05ad..297ed7c1ce 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -798,5 +798,10 @@ public class EntityArmorStand extends EntityLiving {
@ -20,7 +20,7 @@ index ccdd0d27e..62a878d13 100644
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 769540479..3961ae171 100644
index 96bed03b15..0733caf7bd 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -223,6 +223,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -1,4 +1,4 @@
From badadfda257f57e9e0512be166f7e8b2d5734d0f Mon Sep 17 00:00:00 2001
From 153b2024ee027d82e6cad338025d9afed894e013 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 12 May 2017 23:34:11 -0500
Subject: [PATCH] Properly handle async calls to restart the server
@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 065062c61..36d29b332 100644
index b7e188cf9f..d8dd78b56a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -78,6 +78,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -88,6 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public final Map<DimensionManager, WorldServer> worldServer = Maps.newLinkedHashMap(); // CraftBukkit - keep order, k+v already use identity methods
private PlayerList playerList;
private volatile boolean isRunning = true;
@ -41,7 +41,7 @@ index 065062c61..36d29b332 100644
private boolean isStopped;
private int ticks;
protected final Proxy proxy;
@@ -703,7 +704,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -715,7 +716,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.savePlayers();
@ -50,7 +50,7 @@ index 065062c61..36d29b332 100644
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -757,8 +758,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -769,8 +770,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return this.isRunning;
}
@ -64,7 +64,7 @@ index 065062c61..36d29b332 100644
if (flag) {
try {
this.serverThread.join();
@@ -768,6 +774,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -780,6 +786,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}
@ -73,7 +73,7 @@ index 065062c61..36d29b332 100644
// Spigot Start
private static double calcTps(double avg, double exp, double tps)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ccf8b7c70..d23e4e5e3 100644
index ccf8b7c707..d23e4e5e3d 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1041,10 +1041,15 @@ public abstract class PlayerList {
@ -102,7 +102,7 @@ index ccf8b7c70..d23e4e5e3 100644
// CraftBukkit start
public void sendMessage(IChatBaseComponent[] iChatBaseComponents) {
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
index ccea803f5..aefea3a9a 100644
index ccea803f58..aefea3a9a8 100644
--- a/src/main/java/org/spigotmc/RestartCommand.java
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -46,86 +46,134 @@ public class RestartCommand extends Command

View File

@ -1,4 +1,4 @@
From 0323ec893471d8f4c46be213fb7052f27089692a Mon Sep 17 00:00:00 2001
From 272feafa6283d0d0742476237ff68300247fe357 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 13 May 2017 20:11:21 -0500
Subject: [PATCH] Add system property to disable book size limits
@ -11,7 +11,7 @@ to make books with as much data as they want. Do not use this without
limiting incoming data from packets in some other way.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index fe8e6dcb7..f8a3c9718 100644
index fe8e6dcb77..f8a3c9718d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -36,6 +36,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {

View File

@ -1,4 +1,4 @@
From 7e2d4c45595801a4ddf9575d68a62a65d23091b9 Mon Sep 17 00:00:00 2001
From 4b69c61b46470062ee37c9f54bc6ae98e6759489 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 16 May 2017 21:29:08 -0500
Subject: [PATCH] Add option to make parrots stay on shoulders despite movement
@ -11,7 +11,7 @@ I suspect Mojang may switch to this behavior before full release.
To be converted into a Paper-API event at some point in the future?
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index de8362ddd..54d679944 100644
index de8362ddd7..54d6799442 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -321,4 +321,10 @@ public class PaperWorldConfig {
@ -26,23 +26,23 @@ index de8362ddd..54d679944 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 1a1b1dd1e..0974135c6 100644
index 87d3337c88..1efec35941 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 {
@@ -451,7 +451,7 @@ public abstract class EntityHuman extends EntityLiving {
this.j(this.getShoulderEntityLeft());
this.j(this.getShoulderEntityRight());
if (!this.world.isClientSide && (this.fallDistance > 0.5F || this.isInWater() || this.isPassenger()) || this.abilities.isFlying) {
if (!this.world.isClientSide && (this.fallDistance > 0.5F || this.isInWater() || this.isPassenger()) || this.abilities.isFlying || this.isSleeping()) {
- this.releaseShoulderEntities();
+ if (!this.world.paperConfig.parrotsHangOnBetter) this.releaseShoulderEntities(); // Paper - Hang on!
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b34a0fb35..f7d487bb6 100644
index 068827e2ea..579c551f95 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1793,6 +1793,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1756,6 +1756,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
switch (packetplayinentityaction.c()) {
case START_SNEAKING:
this.player.setSneaking(true);

View File

@ -1,4 +1,4 @@
From eb27f8f1c3b57c94ede68718f517ff4f285afd64 Mon Sep 17 00:00:00 2001
From 41566122b7aea7361afaecd0032a395f3d193040 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Fri, 9 Jun 2017 07:24:34 -0700
Subject: [PATCH] Add configuration option to prevent player names from being
@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index b5a50afd2..11d2a1013 100644
index b5a50afd24..11d2a1013b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -259,4 +259,9 @@ public class PaperConfig {
@ -20,7 +20,7 @@ index b5a50afd2..11d2a1013 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9b4e957d6..79b2f0f57 100644
index 9ccf6a6891..f762ff1d2e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2095,5 +2095,10 @@ public final class CraftServer implements Server {

View File

@ -1,4 +1,4 @@
From 103b8778f1616489f464d9b206a0dae38b9ac2d6 Mon Sep 17 00:00:00 2001
From e81667bbdaab0d52dc2d54ed822697ad462bf617 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 9 Jun 2017 19:03:43 +0200
Subject: [PATCH] Use TerminalConsoleAppender for console improvements
@ -19,7 +19,7 @@ Other changes:
configuration
diff --git a/pom.xml b/pom.xml
index 75c1b84f6..58ccbaa1a 100644
index 04b0dd9a7f..54d214a8cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,10 +41,27 @@
@ -75,7 +75,7 @@ index 75c1b84f6..58ccbaa1a 100644
<groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
new file mode 100644
index 000000000..cd6e25923
index 0000000000..cd6e259239
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
@@ -0,0 +1,40 @@
@ -121,7 +121,7 @@ index 000000000..cd6e25923
+}
diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
new file mode 100644
index 000000000..685deaa0e
index 0000000000..685deaa0e5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
@@ -0,0 +1,17 @@
@ -143,7 +143,7 @@ index 000000000..685deaa0e
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 6e1509c2c..26b35855e 100644
index f2c65e40a1..f8fa3f78e7 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -85,6 +85,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -185,10 +185,10 @@ index 6e1509c2c..26b35855e 100644
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 36d29b332..f340f4bfe 100644
index d8dd78b56a..2cf4adf779 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -48,7 +48,7 @@ import org.apache.commons.lang3.Validate;
@@ -57,7 +57,7 @@ import org.apache.commons.lang3.Validate;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
// CraftBukkit start
@ -197,7 +197,7 @@ index 36d29b332..f340f4bfe 100644
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.Main;
@@ -148,7 +148,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -158,7 +158,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public OptionSet options;
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
@ -206,8 +206,8 @@ index 36d29b332..f340f4bfe 100644
public static int currentTick = 0; // Paper - Further improve tick loop
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
@@ -197,7 +197,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.J = s;
@@ -207,7 +207,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.K = s;
// CraftBukkit start
this.options = options;
+ // Paper start - Handled by TerminalConsoleAppender
@ -216,7 +216,7 @@ index 36d29b332..f340f4bfe 100644
if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false;
@@ -218,6 +220,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -228,6 +230,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
LOGGER.warn((String) null, ex);
}
}
@ -225,7 +225,7 @@ index 36d29b332..f340f4bfe 100644
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
}
// CraftBukkit end
@@ -931,7 +935,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -943,7 +947,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} finally {
// CraftBukkit start - Restore terminal to original settings
try {
@ -234,7 +234,7 @@ index 36d29b332..f340f4bfe 100644
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1413,7 +1417,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1425,7 +1429,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Override
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
@ -244,7 +244,7 @@ index 36d29b332..f340f4bfe 100644
public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index d23e4e5e3..6a7770798 100644
index d23e4e5e3d..6a77707983 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -76,8 +76,7 @@ public abstract class PlayerList {
@ -258,7 +258,7 @@ index d23e4e5e3..6a7770798 100644
this.k = new GameProfileBanList(PlayerList.a);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 79b2f0f57..a8d1a2f1b 100644
index f762ff1d2e..7179692e11 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -41,7 +41,6 @@ import java.util.function.Consumer;
@ -284,7 +284,7 @@ index 79b2f0f57..a8d1a2f1b 100644
@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 ad1da9ddd..d2bdd7c73 100644
index ad1da9ddd3..d2bdd7c73f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -13,7 +13,7 @@ import java.util.logging.Logger;
@ -326,7 +326,7 @@ index ad1da9ddd..d2bdd7c73 100644
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
deleted file mode 100644
index fdf2f075e..000000000
index fdf2f075e2..0000000000
--- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ /dev/null
@@ -1,72 +0,0 @@
@ -403,7 +403,7 @@ index fdf2f075e..000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
index befcc19f9..5510266fb 100644
index befcc19f9b..5510266fb1 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
@@ -4,20 +4,31 @@ import java.util.Collections;
@ -486,7 +486,7 @@ index befcc19f9..5510266fb 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index 70f8d4299..449e99d1b 100644
index 70f8d42992..449e99d1b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -17,7 +17,7 @@ public class ServerShutdownThread extends Thread {
@ -500,7 +500,7 @@ index 70f8d4299..449e99d1b 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
deleted file mode 100644
index f267f99f9..000000000
index f267f99f96..0000000000
--- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
+++ /dev/null
@@ -1,57 +0,0 @@
@ -562,7 +562,7 @@ index f267f99f9..000000000
- }
-}
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 490a9acc7..08b6bb7f9 100644
index 490a9acc70..08b6bb7f97 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -1,12 +1,11 @@

View File

@ -1,4 +1,4 @@
From 694c0300246c075a6f2b926b60f83c9c852140f7 Mon Sep 17 00:00:00 2001
From e8c7fda052854a3c98b1a29eff68f280e5e3e79e Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 11 Jun 2017 21:01:18 +0100
Subject: [PATCH] provide a configurable option to disable creeper lingering
@ -6,7 +6,7 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 54d679944..4d0d4cbe4 100644
index 54d6799442..4d0d4cbe4e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -327,4 +327,10 @@ public class PaperWorldConfig {
@ -21,7 +21,7 @@ index 54d679944..4d0d4cbe4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index 7ee854e94..8f5f97a22 100644
index 53b1e2ac03..100a1a10c9 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -226,7 +226,7 @@ public class EntityCreeper extends EntityMonster {

View File

@ -1,11 +1,11 @@
From 02db19d0526850a5513db4a9433794486e981ed5 Mon Sep 17 00:00:00 2001
From 4e73cb7abb2e428e3f77a0a75b9b45d63aa2c43d Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 5 May 2017 03:57:17 -0500
Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 4fa345db6..c20374d77 100644
index 6e304492cf..a14d490ade 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -511,6 +511,11 @@ public abstract class EntityInsentient extends EntityLiving {
@ -21,7 +21,7 @@ index 4fa345db6..c20374d77 100644
}
}
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 0569ad9af..c0b81223f 100644
index 0569ad9af8..c0b81223f1 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -19,6 +19,7 @@ public class EntityItem extends Entity {
@ -33,7 +33,7 @@ index 0569ad9af..c0b81223f 100644
public EntityItem(EntityTypes<? extends EntityItem> entitytypes, World world) {
super(entitytypes, world);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
index cc593fbc9..3f552b590 100644
index cc593fbc99..3f552b5905 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
@@ -48,6 +48,16 @@ public class CraftItem extends CraftEntity implements Item {

View File

@ -1,11 +1,11 @@
From 1a93d53038435493ae5a76b56555011cd1ee2e77 Mon Sep 17 00:00:00 2001
From 7983e759d8066c357793dd5487226a0c5a27b2ca Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 May 2017 06:26:09 -0500
Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index c0b81223f..1baff88c4 100644
index c0b81223f1..1baff88c4a 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -318,6 +318,7 @@ public class EntityItem extends Entity {

View File

@ -1,11 +1,11 @@
From 0f1ba434f613344fbc4695c30fbba356ad18bc28 Mon Sep 17 00:00:00 2001
From 5908c0f26e8452837d9a92f7bf31821e27639437 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 11 Jun 2017 16:30:30 -0500
Subject: [PATCH] PlayerAttemptPickupItemEvent
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 1baff88c4..f1f86ef8b 100644
index 1baff88c4a..f1f86ef8b5 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -8,6 +8,7 @@ import javax.annotation.Nullable;

View File

@ -1,11 +1,11 @@
From 633f79e3f1621746dbcf0a0aa6e2f835b0323440 Mon Sep 17 00:00:00 2001
From f4b1ac869326bd16b7c94847d5ece41e4dc896c8 Mon Sep 17 00:00:00 2001
From: Sweepyoface <github@sweepy.pw>
Date: Sat, 17 Jun 2017 18:48:21 -0400
Subject: [PATCH] Add UnknownCommandEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a8d1a2f1b..9972ca6ab 100644
index 7179692e11..344c99d107 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -77,6 +77,7 @@ import net.minecraft.server.WorldServer;

View File

@ -1,4 +1,4 @@
From 9d0d2b30be170aeca39eacbb5feccdb3c6df4664 Mon Sep 17 00:00:00 2001
From 9362f6ce5477a3176986f89a20e7b06d87e4575f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 15 Jan 2018 22:11:48 -0500
Subject: [PATCH] Basic PlayerProfile API
@ -7,7 +7,7 @@ Establishes base extension of profile systems for future edits too
diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
new file mode 100644
index 000000000..b151a13c1
index 0000000000..b151a13c1b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
@@ -0,0 +1,280 @@
@ -293,7 +293,7 @@ index 000000000..b151a13c1
+}
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 000000000..25836b975
index 0000000000..25836b975b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
@@ -0,0 +1,30 @@
@ -329,7 +329,7 @@ index 000000000..25836b975
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
new file mode 100644
index 000000000..3bcdb8f93
index 0000000000..3bcdb8f93f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
@@ -0,0 +1,17 @@
@ -352,7 +352,7 @@ index 000000000..3bcdb8f93
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
new file mode 100644
index 000000000..4b2a67423
index 0000000000..4b2a67423f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
@@ -0,0 +1,29 @@
@ -387,7 +387,7 @@ index 000000000..4b2a67423
+}
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 000000000..3aceb0ea8
index 0000000000..3aceb0ea8a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
@@ -0,0 +1,11 @@
@ -403,7 +403,7 @@ index 000000000..3aceb0ea8
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index 1f6a12632..6d278a0da 100644
index 1f6a126329..6d278a0da5 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -1,7 +1,10 @@
@ -429,10 +429,10 @@ index 1f6a12632..6d278a0da 100644
* Calculates distance between 2 entities
* @param e1
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f340f4bfe..c229651b5 100644
index 2cf4adf779..6276833474 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1244,7 +1244,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1256,7 +1256,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
DispenserRegistry.init();
DispenserRegistry.c();
String s = "."; // PAIL?
@ -441,8 +441,8 @@ index f340f4bfe..c229651b5 100644
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
UserCache usercache = new UserCache(gameprofilerepository, new File(s, MinecraftServer.b.getName()));
@@ -1704,6 +1704,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.G = i;
@@ -1716,6 +1716,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.H = i;
}
+ public final MinecraftSessionService getSessionService() { return this.getMinecraftSessionService(); } // Paper - OBFHELPER
@ -450,7 +450,7 @@ index f340f4bfe..c229651b5 100644
return this.minecraftSessionService;
}
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
index b0d883d49..1d4bf64b1 100644
index b0d883d493..1d4bf64b1b 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
@@ -43,7 +43,7 @@ public class UserCache {
@ -486,7 +486,7 @@ index b0d883d49..1d4bf64b1 100644
private UserCacheEntry(GameProfile gameprofile, Date date) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9972ca6ab..2f70d0627 100644
index 344c99d107..9f29be85c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -196,6 +196,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;

View File

@ -1,15 +1,15 @@
From 0260deaff7988780863ae225424d00209d0bfdc4 Mon Sep 17 00:00:00 2001
From 1380b2694c5854f34c793ebc60953d200b0109c5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 17 Jun 2017 15:18:30 -0400
Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 0974135c6..d1f01bb64 100644
index 1efec35941..9d1c3b0737 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1781,20 +1781,45 @@ public abstract class EntityHuman extends EntityLiving {
// CraftBukkit end
@@ -1800,20 +1800,44 @@ public abstract class EntityHuman extends EntityLiving {
}
+ // Paper start
@ -28,9 +28,8 @@ index 0974135c6..d1f01bb64 100644
+ }
+ return entity;
+ }
+
+ // Paper - maintain old signature
private boolean spawnEntityFromShoulder(@Nullable NBTTagCompound nbttagcompound) { // CraftBukkit void->boolean
private boolean spawnEntityFromShoulder(NBTTagCompound nbttagcompound) { // CraftBukkit void->boolean
- if (!this.world.isClientSide && !nbttagcompound.isEmpty()) {
+ return spawnEntityFromShoulder0(nbttagcompound) != null;
+ }
@ -59,7 +58,7 @@ index 0974135c6..d1f01bb64 100644
@Override
public abstract boolean isSpectator();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 5cc5074a5..e4d9300be 100644
index fa9cedd6e2..4d9125c226 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -664,6 +664,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

View File

@ -1,4 +1,4 @@
From ec335e5cf002193d782def24ab0d161b66153e51 Mon Sep 17 00:00:00 2001
From db5fd6216ff20d4670dc04f0222792982220196f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 17 Jun 2017 17:00:32 -0400
Subject: [PATCH] Profile Lookup Events
@ -7,7 +7,7 @@ Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in p
profiles that had to be looked up.
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
index 3bcdb8f93..bb9894318 100644
index 3bcdb8f93f..bb9894318e 100644
--- a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
@@ -1,17 +1,68 @@

View File

@ -1,11 +1,11 @@
From ea0babba02771d72151b9692c5ce02fe9ad853aa Mon Sep 17 00:00:00 2001
From f59189466e67ed2dd9a28bb8f55af3f6a6b57266 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 2 Jul 2017 21:35:56 -0500
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 22d5c7d20..91b6f1de8 100644
index 49df63d6de..977a5009dd 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -49,6 +49,12 @@ public class LoginListener implements PacketLoginInListener {

View File

@ -1,11 +1,11 @@
From d8dc04b6f30e2587ea3298941140f903ce0e7d19 Mon Sep 17 00:00:00 2001
From f2644404c77b9c3a56656a7c49c5db077787d5b4 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 18 Jun 2017 18:17:05 -0500
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 4dd2df808..433972025 100644
index 482864ac62..be4ebcadb7 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -184,6 +184,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -37,7 +37,7 @@ index 4dd2df808..433972025 100644
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 13e62e3d7..4bd511dd7 100644
index 13e62e3d7f..4bd511dd7c 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -133,6 +133,7 @@ public abstract class MobSpawnerAbstract {
@ -49,7 +49,7 @@ index 13e62e3d7..4bd511dd7 100644
if ( entity.world.spigotConfig.nerfSpawnerMobs )
{
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index ed496d03a..b000bc8c7 100644
index ed496d03ae..b000bc8c71 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1047,5 +1047,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

View File

@ -1,4 +1,4 @@
From 38a48da2e69d4ff804616f0533ea238d0ef1b43a Mon Sep 17 00:00:00 2001
From c7287c81488d289834b45064849790e3dac26be7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 10 Dec 2016 16:24:06 -0500
Subject: [PATCH] Improve the Saddle API for Horses
@ -7,7 +7,7 @@ Not all horses with Saddles have armor. This lets us break up the horses with sa
and access their saddle state separately from an interface shared with Armor.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
index 09016e354..9952db3eb 100644
index 09016e3547..9952db3eb5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
@@ -6,6 +6,7 @@ import net.minecraft.server.EntityHorseAbstract;
@ -27,7 +27,7 @@ index 09016e354..9952db3eb 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
index 63991bf4b..9a47a1adc 100644
index 63991bf4be..9a47a1adc1 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
@@ -4,7 +4,7 @@ import net.minecraft.server.IInventory;
@ -41,7 +41,7 @@ index 63991bf4b..9a47a1adc 100644
super(inventory);
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java
new file mode 100644
index 000000000..99cfbaf90
index 0000000000..99cfbaf90b
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java
@@ -0,0 +1,15 @@

View File

@ -1,4 +1,4 @@
From 881e728b2d73b2e1fc2b974ea554b03b26ca7393 Mon Sep 17 00:00:00 2001
From 0dbd7be656fe599ebdf257ce06a895bcaec94ebf Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 22:43:12 -0400
Subject: [PATCH] Implement ensureServerConversions API
@ -7,7 +7,7 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
to ensure it meets latest minecraft expectations.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index e3bb1dffd..594a280e9 100644
index e3bb1dffd6..594a280e9a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -330,4 +330,10 @@ public final class CraftItemFactory implements ItemFactory {

View File

@ -1,4 +1,4 @@
From f13614046f40648258e7472353c7b21c0f88c177 Mon Sep 17 00:00:00 2001
From 9517f80ea1b821d95a458c4ba1f0d43ddf78921d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:59:38 -0400
Subject: [PATCH] Implement getI18NDisplayName
@ -8,7 +8,7 @@ Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
index c0c13798f..601273933 100644
index c0c13798f8..6012739331 100644
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
@@ -65,10 +65,12 @@ public class LocaleLanguage {
@ -25,7 +25,7 @@ index c0c13798f..601273933 100644
return this.c(s);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 594a280e9..80f71a77b 100644
index 594a280e9a..80f71a77b7 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -335,5 +335,18 @@ public final class CraftItemFactory implements ItemFactory {

View File

@ -1,11 +1,11 @@
From 576e17ccad9de416655b035f5ac05f8645416fc5 Mon Sep 17 00:00:00 2001
From 9363bf8ee294b4e8687c4af786bd781e781ad95b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 3 Jul 2017 18:11:10 -0500
Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6a7770798..a167843bf 100644
index 6a77707983..a167843bfb 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -521,9 +521,9 @@ public abstract class PlayerList {

View File

@ -1,4 +1,4 @@
From 709bb372b87f6478be5717d270cd81223c460db7 Mon Sep 17 00:00:00 2001
From 834c2e5d32a575b12eb91a6c2ad0685179bc76f3 Mon Sep 17 00:00:00 2001
From: DemonWav <demonwav@gmail.com>
Date: Sun, 6 Aug 2017 17:17:53 -0500
Subject: [PATCH] Fix this stupid bullshit
@ -9,7 +9,7 @@ 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 d2bdd7c73..1fa81904d 100644
index d2bdd7c73f..1fa81904d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -217,10 +217,12 @@ public class Main {

View File

@ -1,11 +1,11 @@
From 06483bd2137b5de16b38caa67e46aabf6d3fd094 Mon Sep 17 00:00:00 2001
From 2e0688b36f97187cb8f065e164e5fd0fa9059935 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 01:54:40 -0500
Subject: [PATCH] Ocelot despawns should honor nametags and leash
diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java
index f50efe782..0f1c25959 100644
index a6b15efd5d..edc5f696c0 100644
--- a/src/main/java/net/minecraft/server/EntityOcelot.java
+++ b/src/main/java/net/minecraft/server/EntityOcelot.java
@@ -82,7 +82,7 @@ public class EntityOcelot extends EntityAnimal {

View File

@ -1,11 +1,11 @@
From 699a56bea1a38f6d317cf7c4dc340ef1a2937f16 Mon Sep 17 00:00:00 2001
From 393e17f7fb0841095ec391a7a7192c6b81604ffb Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 01:45:19 -0500
Subject: [PATCH] Reset spawner timer when spawner event is cancelled
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 4bd511dd7..59bd9ccd7 100644
index 4bd511dd7c..59bd9ccd70 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -139,6 +139,9 @@ public abstract class MobSpawnerAbstract {

View File

@ -1,11 +1,11 @@
From e306b1f60ec0dd3ebadefca87ae7a67b4cf38ab1 Mon Sep 17 00:00:00 2001
From 71b39eb3328c1d4bb08e116a0410410bec249da8 Mon Sep 17 00:00:00 2001
From: mezz <tehgeek@gmail.com>
Date: Wed, 9 Aug 2017 17:51:22 -0500
Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cfdb6b57f..002fdd768 100644
index d6f04c823a..8add757cc8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -734,7 +734,11 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose

View File

@ -1,4 +1,4 @@
From 165f8cf515e55863064f67c20f7797e9936ad918 Mon Sep 17 00:00:00 2001
From 3e8591beff5e88eda41d6790603446fbe00fe15c Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 17 Aug 2017 16:08:20 -0700
Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
@ -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 11d2a1013..11f08c2b7 100644
index 11d2a1013b..11f08c2b73 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -1,5 +1,6 @@
@ -27,10 +27,10 @@ index 11d2a1013..11f08c2b7 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 91b6f1de8..398f67f4b 100644
index 977a5009dd..c3ff7a6b8f 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -242,6 +242,10 @@ public class LoginListener implements PacketLoginInListener {
@@ -247,6 +247,10 @@ public class LoginListener implements PacketLoginInListener {
LoginListener.this.i = LoginListener.this.a(gameprofile);
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
} else {

View File

@ -1,11 +1,11 @@
From 304a36f415dcc5530b321815a2fe6f48c79191dc Mon Sep 17 00:00:00 2001
From 24f63e31e78e209ed3fea9cbe1b1536b13c5459d Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 01:49:48 -0500
Subject: [PATCH] LivingEntity#setKiller
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 3961ae171..31e3bf0ed 100644
index 0733caf7bd..efc7617957 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -76,7 +76,7 @@ public abstract class EntityLiving extends Entity {
@ -18,7 +18,7 @@ index 3961ae171..31e3bf0ed 100644
protected int ticksFarFromPlayer;
protected float aT;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index aa50435be..42cc15882 100644
index aa50435bec..42cc158824 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -304,6 +304,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

View File

@ -1,4 +1,4 @@
From 47c7a823f8bb02c915e51a9e0fea989318c661d4 Mon Sep 17 00:00:00 2001
From 6123d01c33d30f1f87f3760e6ecc70c1b67a4aa2 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Mon, 18 Sep 2017 12:00:03 +0200
Subject: [PATCH] Use Log4j IOStreams to redirect System.out/err to logger
@ -12,7 +12,7 @@ results in a separate line, even though it should not result in
a line break. Log4j's implementation handles it correctly.
diff --git a/pom.xml b/pom.xml
index 58ccbaa1a..85fa0d983 100644
index 54d214a8cf..ea6fb01249 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,6 +63,11 @@
@ -28,7 +28,7 @@ index 58ccbaa1a..85fa0d983 100644
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 26b35855e..c093747bb 100644
index f8fa3f78e7..118d90242e 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -137,8 +137,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer

View File

@ -1,4 +1,4 @@
From 6274ed4beb01d620d286d631208e21977133d642 Mon Sep 17 00:00:00 2001
From 8e9be82d7e127ea31437f7c85c18273646a24ea6 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:14:55 +0200
Subject: [PATCH] Handle plugin prefixes using Log4J configuration
@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
the plugin logger.
diff --git a/pom.xml b/pom.xml
index 85fa0d983..5558921cd 100644
index ea6fb01249..d955106433 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,7 +61,7 @@
@ -28,7 +28,7 @@ index 85fa0d983..5558921cd 100644
<dependency>
<groupId>org.apache.logging.log4j</groupId>
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index fc6cb9306..bd601333e 100644
index fc6cb9306a..bd601333ee 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -291,7 +291,7 @@ public class SpigotConfig
@ -41,7 +41,7 @@ index fc6cb9306..bd601333e 100644
public static int playerShuffle;
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 08b6bb7f9..9f8334376 100644
index 08b6bb7f97..9f8334376f 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -2,10 +2,22 @@

View File

@ -1,11 +1,11 @@
From d51166fad157707f92dbc777e8bb27dcbe987b1d Mon Sep 17 00:00:00 2001
From bf759fa436ae169e7e28d17abdd048943a1d2e54 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:33:35 +0200
Subject: [PATCH] Include Log4J2 SLF4J implementation
diff --git a/pom.xml b/pom.xml
index 5558921cd..4ead09327 100644
index d955106433..b7db74c9ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,6 +63,12 @@

View File

@ -1,4 +1,4 @@
From c9f4d39e4d82c6184244bcb0930fb9e217bfd216 Mon Sep 17 00:00:00 2001
From 1950fa644d4c5e34543c88115d259bc2133591ef Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Sat, 23 Sep 2017 21:07:20 +0200
Subject: [PATCH] Disable logger prefix for various plugins bypassing the
@ -11,7 +11,7 @@ log. Disable the logger prefix for these plugins so the messages
show up correctly.
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 9f8334376..6711e6dff 100644
index 9f8334376f..6711e6dff9 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -5,7 +5,8 @@

View File

@ -1,11 +1,11 @@
From 356e3a97ae6553c4cdbd3dc780da703fe717a246 Mon Sep 17 00:00:00 2001
From 246163fe2f7e4f715d94d4a759d31cc34fba3d75 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Sep 2017 17:21:44 -0400
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 f7d487bb6..b743d4f5e 100644
index 579c551f95..5e3ca96871 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;
@ -17,7 +17,7 @@ index f7d487bb6..b743d4f5e 100644
import co.aikar.timings.MinecraftTimings; // Paper
// CraftBukkit end
@@ -912,7 +914,34 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -913,7 +915,34 @@ public class PlayerConnection implements PacketListenerPlayIn {
d8 = d5 - this.p;
d9 = d6 - this.q;
if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) {

View File

@ -1,4 +1,4 @@
From cf4ab77812dee87bc6c484bfe8bf228acc25ff79 Mon Sep 17 00:00:00 2001
From 78d292bb028979a78ee9567c774e6d97f4aa24f7 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 5 Oct 2017 01:54:07 +0100
Subject: [PATCH] handle PacketPlayInKeepAlive async
@ -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 b743d4f5e..f658be09c 100644
index 5e3ca96871..0cb68a8553 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2513,14 +2513,18 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2476,14 +2476,18 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {

View File

@ -1,4 +1,4 @@
From 49d2d347eb0097c129e8ac08eb90979d6db794b2 Mon Sep 17 00:00:00 2001
From 7792dcfee7c0a9197d18e8cd965acffb0fa7e5f3 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Tue, 10 Oct 2017 18:45:20 +0200
Subject: [PATCH] Expose client protocol version and virtual host
@ -6,7 +6,7 @@ Subject: [PATCH] Expose client protocol version and virtual host
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java b/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java
new file mode 100644
index 000000000..5caca6439
index 0000000000..5caca6439d
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java
@@ -0,0 +1,50 @@
@ -61,7 +61,7 @@ index 000000000..5caca6439
+
+}
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index 66dda900b..07d85e535 100644
index 078b711c47..740c8d2728 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
@@ -15,6 +15,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
@ -84,13 +84,13 @@ index 66dda900b..07d85e535 100644
@Override
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index d4c59baf8..ae60f757e 100644
index 3ccf166366..e2d8ed88f0 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -62,6 +62,10 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
private float t;
private int u;
private boolean v;
@@ -60,6 +60,10 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
private float s;
private int t;
private boolean u;
+ // Paper start - NetworkClient implementation
+ public int protocolVersion;
+ public java.net.InetSocketAddress virtualHost;
@ -99,7 +99,7 @@ index d4c59baf8..ae60f757e 100644
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
this.h = enumprotocoldirection;
diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
index 4f008e472..8545146fb 100644
index 4f008e4723..8545146fb1 100644
--- a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
+++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
@@ -35,6 +35,7 @@ public class PacketHandshakingInSetProtocol implements Packet<PacketHandshakingI
@ -111,7 +111,7 @@ index 4f008e472..8545146fb 100644
return this.a;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d06415382..9d2a8a2da 100644
index d554054e86..de43559647 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -184,6 +184,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -1,4 +1,4 @@
From 4de4c0efd42b156dd967471f5919c14b99f148f8 Mon Sep 17 00:00:00 2001
From 284e000b1ea70ce686594d35c360f4bde826515b Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 15 Oct 2017 00:29:07 +0100
Subject: [PATCH] revert serverside behavior of keepalives
@ -17,7 +17,7 @@ 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 f658be09c..8c9d09e97 100644
index 0cb68a8553..1d140b3fe7 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 {

View File

@ -1,4 +1,4 @@
From c2b855ad1bdf8d35808470af87415eb11f9bf87b Mon Sep 17 00:00:00 2001
From 2367b8fc37274600701109e28bd28b6fe7f9ec73 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 31 Oct 2017 03:26:18 +0100
Subject: [PATCH] Send attack SoundEffects only to players who can see the
@ -6,10 +6,10 @@ 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 d1f01bb64..3b978528b 100644
index 9d1c3b0737..4cfe87d078 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -941,6 +941,15 @@ public abstract class EntityHuman extends EntityLiving {
@@ -956,6 +956,15 @@ public abstract class EntityHuman extends EntityLiving {
return super.isFrozen() || this.isSleeping();
}
@ -25,67 +25,68 @@ index d1f01bb64..3b978528b 100644
public void attack(Entity entity) {
if (entity.bs()) {
if (!entity.t(this)) {
@@ -965,7 +974,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -980,7 +989,7 @@ public abstract class EntityHuman extends EntityLiving {
int i = b0 + EnchantmentManager.b((EntityLiving) this);
if (this.isSprinting() && flag) {
- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_KNOCKBACK, this.getSoundCategory(), 1.0F, 1.0F);
- this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_KNOCKBACK, this.getSoundCategory(), 1.0F, 1.0F);
+ sendSoundEffect(this, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_KNOCKBACK, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility
++i;
flag1 = true;
}
@@ -1040,7 +1049,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1055,7 +1064,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_SWEEP, this.getSoundCategory(), 1.0F, 1.0F);
- 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.dF();
this.dE();
}
@@ -1068,15 +1077,15 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1083,15 +1092,15 @@ public abstract class EntityHuman extends EntityLiving {
}
if (flag2) {
- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_CRIT, this.getSoundCategory(), 1.0F, 1.0F);
- this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_CRIT, this.getSoundCategory(), 1.0F, 1.0F);
+ sendSoundEffect(this, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_CRIT, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility
this.a(entity);
}
if (!flag2 && !flag3) {
if (flag) {
- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_STRONG, this.getSoundCategory(), 1.0F, 1.0F);
- this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_STRONG, this.getSoundCategory(), 1.0F, 1.0F);
+ sendSoundEffect(this, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_STRONG, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility
} else {
- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_WEAK, this.getSoundCategory(), 1.0F, 1.0F);
- this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_WEAK, this.getSoundCategory(), 1.0F, 1.0F);
+ sendSoundEffect(this, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_WEAK, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility
}
}
@@ -1128,7 +1137,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1143,7 +1152,7 @@ public abstract class EntityHuman extends EntityLiving {
this.applyExhaustion(world.spigotConfig.combatExhaustion); // Spigot - Change to use configurable value
} else {
- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_NODAMAGE, this.getSoundCategory(), 1.0F, 1.0F);
- this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_NODAMAGE, this.getSoundCategory(), 1.0F, 1.0F);
+ sendSoundEffect(this, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_PLAYER_ATTACK_NODAMAGE, this.getSoundCategory(), 1.0F, 1.0F); // Paper - send while respecting visibility
if (flag4) {
entity.extinguish();
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 002fdd768..dc95fe907 100644
index 8add757cc8..22f1d9e27b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -671,6 +671,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
this.a(entityhuman, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, soundeffect, soundcategory, f, f1);
@@ -671,6 +671,11 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
this.playSound(entityhuman, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, soundeffect, soundcategory, f, f1);
}
+ // Paper start - OBFHELPER
+ public final void sendSoundEffect(@Nullable EntityHuman fromEntity, double x, double y, double z, SoundEffect soundeffect, SoundCategory soundcategory, float volume, float pitch) {
+ this.a(fromEntity, x, y, z, soundeffect, soundcategory, volume, pitch);
+ this.playSound(fromEntity, x, y, z, soundeffect, soundcategory, volume, pitch);
+ }
public abstract void a(@Nullable EntityHuman entityhuman, double d0, double d1, double d2, SoundEffect soundeffect, SoundCategory soundcategory, float f, float f1);
+ // Paper end
public abstract void playSound(@Nullable EntityHuman entityhuman, double d0, double d1, double d2, SoundEffect soundeffect, SoundCategory soundcategory, float f, float f1);
public abstract void a(@Nullable EntityHuman entityhuman, Entity entity, SoundEffect soundeffect, SoundCategory soundcategory, float f, float f1);
public abstract void playSound(@Nullable EntityHuman entityhuman, Entity entity, SoundEffect soundeffect, SoundCategory soundcategory, float f, float f1);
--
2.22.0

View File

@ -1,11 +1,11 @@
From fd01c1197ce06a475905315bb53b5b98534ad936 Mon Sep 17 00:00:00 2001
From af6cb20df0f7dcebfd2b343029e087749c1cc4c3 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 10 Nov 2017 23:03:12 -0500
Subject: [PATCH] Option for maximum exp value when merging orbs
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 4d0d4cbe4..b3d8fe9c6 100644
index 4d0d4cbe4e..b3d8fe9c68 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -333,4 +333,10 @@ public class PaperWorldConfig {
@ -20,7 +20,7 @@ index 4d0d4cbe4..b3d8fe9c6 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index a33a9fd79..85a9dd5ab 100644
index af1be62e2b..715a4acef8 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -529,16 +529,32 @@ public class CraftEventFactory {

View File

@ -1,11 +1,11 @@
From ac64242cb9351362f1c196aa499c09c4be763db4 Mon Sep 17 00:00:00 2001
From 37eb7bf78423b3149998c38df7884b3adc0704c2 Mon Sep 17 00:00:00 2001
From: pkt77 <parkerkt77@gmail.com>
Date: Fri, 10 Nov 2017 23:46:34 -0500
Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 31e3bf0ed..1157a9eb6 100644
index efc7617957..72adeb7271 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1,5 +1,6 @@
@ -30,7 +30,7 @@ index 31e3bf0ed..1157a9eb6 100644
if (!itemstack.isEmpty()) {
this.getAttributeMap().a(itemstack.a(enumitemslot));
diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java
index 02a7ae678..60b235f16 100644
index 02a7ae6785..60b235f16f 100644
--- a/src/main/java/net/minecraft/server/EnumItemSlot.java
+++ b/src/main/java/net/minecraft/server/EnumItemSlot.java
@@ -16,6 +16,7 @@ public enum EnumItemSlot {

View File

@ -1,4 +1,4 @@
From e3f535b6ef8adbd665651c6432177a7a079c5ac6 Mon Sep 17 00:00:00 2001
From 1ef9c95d02515c643df7f8ac642186f4e81ade43 Mon Sep 17 00:00:00 2001
From: killme <killme-git@ibts.me>
Date: Sun, 12 Nov 2017 19:40:01 +0100
Subject: [PATCH] Prevent logins from being processed when the player has
@ -6,7 +6,7 @@ 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 398f67f4b..fe912e0eb 100644
index c3ff7a6b8f..a2af5b4b29 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -56,7 +56,11 @@ public class LoginListener implements PacketLoginInListener {

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