Remove redstone checks for BlockPhysicsEvent as it wasnt working, general optimize

Just make it ignore the event fires when no plugin is listening to it.
This commit is contained in:
Aikar 2019-02-25 20:38:55 -05:00
parent c33018eae2
commit 0a76e7d1aa
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE
20 changed files with 252 additions and 229 deletions

View file

@ -0,0 +1,82 @@
From 941df3324d3654d4b28b0eae444131154ec25ba0 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
Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/BlockPlant.java b/src/main/java/net/minecraft/server/BlockPlant.java
index 0e4037ea21..736f794fd1 100644
--- a/src/main/java/net/minecraft/server/BlockPlant.java
+++ b/src/main/java/net/minecraft/server/BlockPlant.java
@@ -15,7 +15,7 @@ public class BlockPlant extends Block {
public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
// CraftBukkit start
if (!iblockdata.canPlace(generatoraccess, blockposition)) {
- if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(generatoraccess, blockposition).isCancelled()) {
+ if (generatoraccess instanceof WorldServer && ((WorldServer) generatoraccess).hasPhysicsEvent && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(generatoraccess, blockposition).isCancelled()) { // Paper
return Blocks.AIR.getBlockData();
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTallPlant.java b/src/main/java/net/minecraft/server/BlockTallPlant.java
index 77782bf1c1..39d449c28e 100644
--- a/src/main/java/net/minecraft/server/BlockTallPlant.java
+++ b/src/main/java/net/minecraft/server/BlockTallPlant.java
@@ -49,7 +49,7 @@ public class BlockTallPlant extends BlockPlant {
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) {
// CraftBukkit start
- if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) {
+ if (((WorldServer)world).hasPhysicsEvent && org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) { // Paper
return;
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f488c37f73..ee45d3705b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1001,6 +1001,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
// CraftBukkit - dropTickTime
for (Iterator iterator = this.getWorlds().iterator(); iterator.hasNext();) {
WorldServer worldserver = (WorldServer) iterator.next();
+ worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
i = SystemUtils.getMonotonicNanos();
if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit
this.methodProfiler.a(() -> {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b398dd1b57..87ea698eec 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -486,7 +486,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// CraftBukkit start
iblockdata1.b(this, blockposition, j); // Don't call an event for the old block to limit event spam
CraftWorld world = ((WorldServer) this).getWorld();
- if (world != null) {
+ if (world != null && ((WorldServer)this).hasPhysicsEvent) { // Paper
BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata));
this.getServer().getPluginManager().callEvent(event);
@@ -620,7 +620,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
try {
// CraftBukkit start
CraftWorld world = ((WorldServer) this).getWorld();
- if (world != null) {
+ if (world != null && ((WorldServer)this).hasPhysicsEvent) { // Paper
BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata), world.getBlockAt(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ()));
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 aaeb888a8c..639068d2dc 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -33,6 +33,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
public class WorldServer extends World implements IAsyncTaskHandler {
private static final Logger a = LogManager.getLogger();
+ boolean hasPhysicsEvent = true; // Paper
private final MinecraftServer server;
public EntityTracker tracker;
private final PlayerChunkMap manager;
--
2.20.1

View file

@ -1,62 +0,0 @@
From e4828c1d88a44e164ad5fa96cca06dc18c8488ad Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 19:55:45 -0400
Subject: [PATCH] Option to disable BlockPhysicsEvent for Redstone
Not sure of any reason a plugin would need to act on a Physics event
for redstone. There is a BlockRedstoneEvent that plugins can also use
for accessing redstone activity.
Defaulting this to false will provide substantial performance improvement
by saving millions of event calls on redstone heavy servers.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 0faef7cf2..deb4ec254 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -228,4 +228,9 @@ public class PaperWorldConfig {
skeleHorseSpawnChance = 0.01D; // Vanilla value
}
}
+
+ public boolean firePhysicsEventForRedstone = false;
+ private void firePhysicsEventForRedstone() {
+ firePhysicsEventForRedstone = getBoolean("fire-physics-event-for-redstone", firePhysicsEventForRedstone);
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b398dd1b5..e34732c35 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -620,7 +620,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
try {
// CraftBukkit start
CraftWorld world = ((WorldServer) this).getWorld();
- if (world != null) {
+ if (world != null && !((WorldServer)this).stopPhysicsEvent) { // Paper
BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata), world.getBlockAt(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ()));
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 aaeb888a8..1d46b8967 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -33,6 +33,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
public class WorldServer extends World implements IAsyncTaskHandler {
private static final Logger a = LogManager.getLogger();
+ boolean stopPhysicsEvent = false; // Paper
private final MinecraftServer server;
public EntityTracker tracker;
private final PlayerChunkMap manager;
@@ -660,6 +661,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
IBlockData iblockdata = this.getType(nextticklistentry.a);
if (iblockdata.getBlock() == nextticklistentry.a()) {
+ stopPhysicsEvent = !paperConfig.firePhysicsEventForRedstone && (iblockdata.getBlock() instanceof BlockDiodeAbstract || iblockdata.getBlock() instanceof BlockRedstoneTorch); // Paper
iblockdata.a((World) this, nextticklistentry.a, this.random);
}
--
2.20.1

View file

@ -1,4 +1,4 @@
From 3e8049326274357d86f1e05f315785243963d2e6 Mon Sep 17 00:00:00 2001
From 1d5190a00dcb30b662df5214303fc3ed91ef1600 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:46:14 -0400
Subject: [PATCH] Configurable Chunk Inhabited Time
@ -11,14 +11,19 @@ For people who want all chunks to be treated equally, you can chose a fixed valu
This allows to fine-tune vanilla gameplay.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index deb4ec254..d2559f7c4 100644
index 0faef7cf28..d2559f7c48 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -233,4 +233,14 @@ public class PaperWorldConfig {
private void firePhysicsEventForRedstone() {
firePhysicsEventForRedstone = getBoolean("fire-physics-event-for-redstone", firePhysicsEventForRedstone);
@@ -228,4 +228,19 @@ public class PaperWorldConfig {
skeleHorseSpawnChance = 0.01D; // Vanilla value
}
}
+
+ public boolean firePhysicsEventForRedstone = false;
+ private void firePhysicsEventForRedstone() {
+ firePhysicsEventForRedstone = getBoolean("fire-physics-event-for-redstone", firePhysicsEventForRedstone);
+ }
+
+ public int fixedInhabitedTime;
+ private void fixedInhabitedTime() {
+ if (PaperConfig.version < 16) {
@ -30,7 +35,7 @@ index deb4ec254..d2559f7c4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 182a637ad..0421f8f95 100644
index 182a637add..0421f8f959 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1289,7 +1289,7 @@ public class Chunk implements IChunkAccess {

View file

@ -1,4 +1,4 @@
From 90af54dc5fdbc87a6926de923a351e5d2bb8d48c Mon Sep 17 00:00:00 2001
From 67dbf6e8151d0938692306062ad09bdc3fd830bc 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,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6841fc2bd..d54a112e5 100644
index b87520d834..78b60d0e35 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -68,6 +68,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
@ -26,7 +26,7 @@ index 6841fc2bd..d54a112e5 100644
this.ac = new ResourceManager(EnumResourcePackType.SERVER_DATA);
this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new);
this.ag = new CraftingManager();
@@ -1824,7 +1827,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@@ -1825,7 +1828,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
// CraftBukkit start
@Deprecated
public static MinecraftServer getServer() {

View file

@ -1,4 +1,4 @@
From c566e08769d6f447d3fa5e17095b6d9d3038f8c7 Mon Sep 17 00:00:00 2001
From 245ce5906974836db86776d813d9f2828e31a085 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 19 Sep 2016 23:16:39 -0400
Subject: [PATCH] Auto Save Improvements
@ -12,7 +12,7 @@ Re-introduce a cap per tick for auto save (Spigot disabled the vanilla cap) and
Adds incremental player auto saving too
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 51b0dd972..9f8b43d2a 100644
index 4e07ab0fef..a4853e04be 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -269,4 +269,15 @@ public class PaperConfig {
@ -32,7 +32,7 @@ index 51b0dd972..9f8b43d2a 100644
+ }
}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index d8f258105..47bfb5b62 100644
index d8f2581058..47bfb5b626 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;
@ -64,7 +64,7 @@ index d8f258105..47bfb5b62 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index ddccdc939..0d70ce797 100644
index ddccdc9390..0d70ce797f 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -53,9 +53,9 @@ public class Chunk implements IChunkAccess {
@ -96,7 +96,7 @@ index ddccdc939..0d70ce797 100644
public boolean isEmpty() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index d0bf0f72d..fbc69b5ba 100644
index d0bf0f72da..fbc69b5ba5 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -243,7 +243,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -109,7 +109,7 @@ index d0bf0f72d..fbc69b5ba 100644
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 749e41aed..97714be6d 100644
index 3ea9dd740d..77b90f62c3 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -34,6 +34,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -121,7 +121,7 @@ index 749e41aed..97714be6d 100644
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7e1711b2f..a5047084e 100644
index 7ffb061414..6283c774d6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -143,6 +143,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -168,7 +168,7 @@ index 7e1711b2f..a5047084e 100644
this.methodProfiler.enter("snooper");
if (getSnooperEnabled() && !this.snooper.d() && this.ticks > 100) { // Spigot
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 79641a73a..fe6649224 100644
index 79641a73a8..fe6649224a 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -341,6 +341,7 @@ public abstract class PlayerList {
@ -207,10 +207,10 @@ index 79641a73a..fe6649224 100644
public WhiteList getWhitelist() {
return this.whitelist;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 1d46b8967..1e7e503eb 100644
index 639068d2dc..49c5b0b5cc 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -856,8 +856,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -855,8 +855,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
ChunkProviderServer chunkproviderserver = this.getChunkProvider();
if (chunkproviderserver.d()) {
@ -221,7 +221,7 @@ index 1d46b8967..1e7e503eb 100644
if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
}
@@ -866,6 +867,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -865,6 +866,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (iprogressupdate != null) {
iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0]));
}

View file

@ -1,4 +1,4 @@
From 66d518cbb0f9e226707ef7d0fbe875e3c7b999a1 Mon Sep 17 00:00:00 2001
From 92acd3d67e0f18d63ba3530d82b25028307c0b8c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 26 Sep 2016 01:51:30 -0400
Subject: [PATCH] Disable Vanilla Chunk GC
@ -6,10 +6,10 @@ Subject: [PATCH] Disable Vanilla Chunk GC
Bukkit has its own system for this.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 48d70624c..b17069e41 100644
index 49c5b0b5cc..15736f7575 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -873,6 +873,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -872,6 +872,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.a(flag);
timings.worldSaveChunks.stopTiming(); // Paper
// CraftBukkit - ArrayList -> Collection
@ -17,7 +17,7 @@ index 48d70624c..b17069e41 100644
java.util.Collection<Chunk> list = chunkproviderserver.a();
Iterator iterator = list.iterator();
@@ -882,7 +883,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -881,7 +882,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) {
chunkproviderserver.unload(chunk);
}

View file

@ -1,4 +1,4 @@
From f0887ada1c154f79950b0326777dec68ebee521e Mon Sep 17 00:00:00 2001
From 7cf14855f60627ca3c791907f9c73b3f76dde838 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 0305674eb..bf1c2ab82 100644
index 3791b72807..7d626a7d27 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,10 +41,27 @@
@ -75,7 +75,7 @@ index 0305674eb..bf1c2ab82 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..688b4715e
index 0000000000..688b4715eb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
@@ -0,0 +1,40 @@
@ -121,7 +121,7 @@ index 000000000..688b4715e
+}
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 4e9ef43b4..5bb1ea880 100644
index 4e9ef43b45..5bb1ea880a 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -79,6 +79,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -185,7 +185,7 @@ index 4e9ef43b4..5bb1ea880 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 dd910b16d..e046c2e33 100644
index db511c1fe8..c6ecdf6e8e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -56,7 +56,6 @@ import org.apache.commons.lang3.Validate;
@ -233,7 +233,7 @@ index dd910b16d..e046c2e33 100644
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1361,7 +1364,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@@ -1362,7 +1365,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
}
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
@ -243,7 +243,7 @@ index dd910b16d..e046c2e33 100644
public KeyPair E() {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 9d44dcb3b..8bb3fef21 100644
index 9d44dcb3b2..8bb3fef21e 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -77,8 +77,7 @@ public abstract class PlayerList {
@ -257,7 +257,7 @@ index 9d44dcb3b..8bb3fef21 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 ebfdc6213..89ff2fb53 100644
index e238e760a7..9cf2ee957b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -146,8 +146,8 @@ import java.nio.ByteBuffer;
@ -285,7 +285,7 @@ index ebfdc6213..89ff2fb53 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 5c62e990a..b174a4efa 100644
index 5c62e990ab..b174a4efae 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -14,7 +14,7 @@ import java.util.logging.Logger;
@ -327,7 +327,7 @@ index 5c62e990a..b174a4efa 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 26a2fb894..000000000
index 26a2fb8942..0000000000
--- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ /dev/null
@@ -1,74 +0,0 @@
@ -406,7 +406,7 @@ index 26a2fb894..000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
index 33e8ea02c..1e3aae3b8 100644
index 33e8ea02c4..1e3aae3b8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
@@ -8,17 +8,27 @@ import java.util.logging.Level;
@ -485,7 +485,7 @@ index 33e8ea02c..1e3aae3b8 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index 984df4083..bbb5a84f3 100644
index 984df4083d..bbb5a84f36 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -20,7 +20,7 @@ public class ServerShutdownThread extends Thread {
@ -499,7 +499,7 @@ index 984df4083..bbb5a84f3 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 b64097113..000000000
index b640971130..0000000000
--- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
+++ /dev/null
@@ -1,54 +0,0 @@
@ -558,7 +558,7 @@ index b64097113..000000000
- }
-}
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 5cee8f00e..08b6bb7f9 100644
index 5cee8f00ef..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 fa4b49523d6aa9a9413d4ee4ad864e91dab1cb19 Mon Sep 17 00:00:00 2001
From 73c73fe9767a2693a0718ed12093fb413ca905b7 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
@ -429,10 +429,10 @@ index e1af5c4885..0ef5ad1165 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 e046c2e334..f5ad783c5c 100644
index c6ecdf6e8e..5517c5fe81 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1185,7 +1185,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@@ -1186,7 +1186,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
*/ // CraftBukkit end
String s1 = "."; // PAIL?
@ -441,7 +441,7 @@ index e046c2e334..f5ad783c5c 100644
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
UserCache usercache = new UserCache(gameprofilerepository, new File(s1, MinecraftServer.a.getName()));
@@ -1634,6 +1634,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@@ -1635,6 +1635,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
this.G = i;
}

View file

@ -1,4 +1,4 @@
From 3b8c3dfe31ca21cb9577cb9eb83cd5069b33d73c Mon Sep 17 00:00:00 2001
From ac4056b8b9841f0fa81703e72634c60229c838f9 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 22 Jul 2017 15:22:59 +0100
Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt
@ -6,7 +6,7 @@ Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b17069e41..44b003325 100644
index 15736f7575..ee09f4c5a0 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -217,6 +217,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {

View file

@ -1,4 +1,4 @@
From e27d17d03ec3969445e890a1fb1b2f6c4c9369ef Mon Sep 17 00:00:00 2001
From 6aa64df4448fff5553dc2362aee471c55842754d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 15 Aug 2017 22:29:12 -0400
Subject: [PATCH] Expand World.spawnParticle API and add Builder
@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index e5ac50e88..2920a276c 100644
index ee09f4c5a0..e4730352d3 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1184,12 +1184,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1183,12 +1183,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
@ -34,7 +34,7 @@ index e5ac50e88..2920a276c 100644
if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 36d27c2a3..d06496762 100644
index 36d27c2a3e..d064967620 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1761,11 +1761,17 @@ public class CraftWorld implements World {

View file

@ -1,4 +1,4 @@
From d997ef86055ea6799457b447b3a0afd5919a94fb Mon Sep 17 00:00:00 2001
From fc66da2297c31678b873891cfc210bafde45c4e2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 10 Jun 2018 20:04:42 -0400
Subject: [PATCH] Properly remove entities on dimension teleport
@ -35,10 +35,10 @@ index e64d032b7f..f54e9784c4 100644
this.world.methodProfiler.enter("reposition");
/* CraftBukkit start - Handled in calculateTarget
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 2920a276ca..a30b8e2cb3 100644
index e4730352d3..c08ee62e84 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -998,6 +998,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -997,6 +997,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
protected void c(Entity entity) {

View file

@ -1,4 +1,4 @@
From cb8325e11e171ac89a60cac088300ac085687172 Mon Sep 17 00:00:00 2001
From 22931a13533f9de81b52b12373d1c87a8f8ebdd3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:08:05 -0400
Subject: [PATCH] Re-add vanilla entity warnings for duplicates
@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data...
We should kind of know about these things you know.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a30b8e2cb..ac8c7e6c4 100644
index c08ee62e84..85a30652c4 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -964,7 +964,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -963,7 +963,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.g.remove(entity1);
} else {
if (!(entity instanceof EntityHuman)) {

View file

@ -1,4 +1,4 @@
From cdaad3be415687f19b4ccaab36655985e943c5a0 Mon Sep 17 00:00:00 2001
From 2a6ac85ccce508cb601bdb5bbedafa7aaca97a8f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 08:25:40 -0400
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index d98bb4c6d..aee88f718 100644
index 1b76a8e25e..5701f535e4 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -18,7 +18,7 @@ index d98bb4c6d..aee88f718 100644
if (bukkitEntity == null) {
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 84efc1cc3..601fe77c5 100644
index 59656f31af..f3894a8a0d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -110,6 +110,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -30,7 +30,7 @@ index 84efc1cc3..601fe77c5 100644
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index ac8c7e6c4..a4895bd55 100644
index 85a30652c4..6d1f70b39e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -51,6 +51,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -43,7 +43,7 @@ index ac8c7e6c4..a4895bd55 100644
// Add env and gen to constructor
public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, PersistentCollection persistentcollection, WorldData worlddata, DimensionManager dimensionmanager, MethodProfiler methodprofiler, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
@@ -952,7 +955,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -951,7 +954,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
private boolean j(Entity entity) {
if (entity.dead) {
@ -57,7 +57,7 @@ index ac8c7e6c4..a4895bd55 100644
return false;
} else {
UUID uuid = entity.getUniqueID();
@@ -964,8 +972,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -963,8 +971,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.g.remove(entity1);
} else {
if (!(entity instanceof EntityHuman)) {
@ -75,7 +75,7 @@ index ac8c7e6c4..a4895bd55 100644
return false;
}
@@ -982,7 +997,25 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -981,7 +996,25 @@ public class WorldServer extends World implements IAsyncTaskHandler {
protected void b(Entity entity) {
super.b(entity);
this.entitiesById.a(entity.getId(), entity);

View file

@ -1,4 +1,4 @@
From a26662d070c24ebf90d5d8f440e20d12cf04e5cc Mon Sep 17 00:00:00 2001
From 1aa2e1b1e6793a709bf930c2fc4149ebdcbbc2be Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 14:27:34 -0400
Subject: [PATCH] Duplicate UUID Resolve Option
@ -175,7 +175,7 @@ index 5701f535e4..e16fd4e5e9 100644
this.uniqueID = uuid;
this.au = this.uniqueID.toString();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 601fe77c51..4df291f0d6 100644
index f3894a8a0d..8a0687a529 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -70,7 +70,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -188,7 +188,7 @@ index 601fe77c51..4df291f0d6 100644
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
private final List<TileEntity> c = Lists.newArrayList();
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a4895bd55d..a896f8fe46 100644
index 6d1f70b39e..293818b196 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -37,7 +37,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -200,7 +200,7 @@ index a4895bd55d..a896f8fe46 100644
public boolean savingDisabled;
private boolean J;
private int emptyTime;
@@ -972,7 +972,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -971,7 +971,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.g.remove(entity1);
} else {
if (!(entity instanceof EntityHuman)) {
@ -209,7 +209,7 @@ index a4895bd55d..a896f8fe46 100644
WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper
WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper
@@ -1003,7 +1003,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1002,7 +1002,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);

View file

@ -1,4 +1,4 @@
From e3b5379cd5d3c1a87616e9bec80bdb6b9dfbac86 Mon Sep 17 00:00:00 2001
From 90b8557b107d2a011e2a7bb73e5519e78f8436cc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 3 Aug 2018 22:47:46 -0400
Subject: [PATCH] Entity add to world fixes
@ -53,7 +53,7 @@ index 1c9e2cb1ce..d22e83f3c6 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 74e1f48105..db130852f8 100644
index cf739ae2e5..7f255db567 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1037,6 +1037,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -79,10 +79,10 @@ index 74e1f48105..db130852f8 100644
this.b(entity);
});
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a896f8fe46..609be457ab 100644
index 293818b196..4cda6cee2b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -968,7 +968,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -967,7 +967,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.entitiesByUUID.containsKey(uuid)) {
Entity entity1 = (Entity) this.entitiesByUUID.get(uuid);

View file

@ -1,11 +1,11 @@
From b653e9300499fcf6392f38e8505dab6517d08ebe Mon Sep 17 00:00:00 2001
From 96564e1f1dc17ab53657d29a4ec10c5c15235605 Mon Sep 17 00:00:00 2001
From: Mystiflow <mystiflow@gmail.com>
Date: Fri, 6 Jul 2018 13:21:30 +0100
Subject: [PATCH] Send nearby packets from world player list not server list
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ddaa73e83..ec760325b 100644
index ddaa73e83d..ec760325ba 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1201,8 +1201,25 @@ public abstract class PlayerList {
@ -46,7 +46,7 @@ index ddaa73e83..ec760325b 100644
double d5 = d1 - entityplayer.locY;
double d6 = d2 - entityplayer.locZ;
diff --git a/src/main/java/net/minecraft/server/WorldManager.java b/src/main/java/net/minecraft/server/WorldManager.java
index b4225b58e..0ba0eb661 100644
index b4225b58ec..0ba0eb661b 100644
--- a/src/main/java/net/minecraft/server/WorldManager.java
+++ b/src/main/java/net/minecraft/server/WorldManager.java
@@ -35,8 +35,8 @@ public class WorldManager implements IWorldAccess {
@ -95,10 +95,10 @@ index b4225b58e..0ba0eb661 100644
if (entityplayer != null && entityplayer.world == this.world && entityplayer.getId() != i) {
double d0 = (double) blockposition.getX() - entityplayer.locX;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 609be457a..a9fffa544 100644
index 4cda6cee2b..0ff3fe03dd 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1065,7 +1065,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1064,7 +1064,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
// CraftBukkit end
if (super.strikeLightning(entity)) {
@ -107,7 +107,7 @@ index 609be457a..a9fffa544 100644
return true;
} else {
return false;
@@ -1125,8 +1125,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1124,8 +1124,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
BlockActionData blockactiondata = (BlockActionData) this.d.removeFirst();
if (this.a(blockactiondata)) {
@ -119,7 +119,7 @@ index 609be457a..a9fffa544 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3fdd12ec0..e0b466d0c 100644
index 3fdd12ec08..e0b466d0c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1636,7 +1636,7 @@ public class CraftWorld implements World {

View file

@ -1,4 +1,4 @@
From cfcab7a04827487d90952a733d878d4eaa6a8a28 Mon Sep 17 00:00:00 2001
From cf94efd4b2ec72c0468fb8c4131008b329395979 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Apr 2016 22:09:52 -0400
Subject: [PATCH] Optimize Hoppers
@ -11,7 +11,7 @@ Subject: [PATCH] Optimize Hoppers
* Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 10efe6b3d..6feea98b6 100644
index 10efe6b3d9..6feea98b6b 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -420,6 +420,15 @@ public class PaperWorldConfig {
@ -31,7 +31,7 @@ index 10efe6b3d..6feea98b6 100644
private void disableSprintInterruptionOnAttack() {
disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 76f80e7eb..3451ea3da 100644
index 91a9f1bbb4..914da48a23 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -464,8 +464,9 @@ public final class ItemStack {
@ -47,21 +47,19 @@ index 76f80e7eb..3451ea3da 100644
itemstack.d(this.B());
if (this.tag != null) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e993b4da6..41c9dccab 100644
index 4565a56b3f..38c0201acb 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1046,7 +1046,8 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
// CraftBukkit - dropTickTime
@@ -1048,6 +1048,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
for (Iterator iterator = this.getWorlds().iterator(); iterator.hasNext();) {
- WorldServer worldserver = (WorldServer) iterator.next();
+ WorldServer worldserver = (WorldServer) iterator.next();
WorldServer worldserver = (WorldServer) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
+ TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
i = SystemUtils.getMonotonicNanos();
if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit
this.methodProfiler.a(() -> {
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 29fe031d8..d67fd92d9 100644
index 29fe031d85..d67fd92d9d 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -52,6 +52,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
@ -81,7 +79,7 @@ index 29fe031d8..d67fd92d9 100644
this.world.b(this.position, this);
if (!this.f.isAir()) {
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 559eedfa6..7303a6fdd 100644
index 559eedfa66..7303a6fdda 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -189,6 +189,154 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi

View file

@ -1,4 +1,4 @@
From 379679e1a5e01a0aa54cb0c5c369b5fc287e600d Mon Sep 17 00:00:00 2001
From f645c65426b1c050e692e50fe2088047aeb8d462 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 16:55:04 -0400
Subject: [PATCH] Async Chunk Loading and Generation
@ -43,7 +43,7 @@ reading or writing to the chunk will be safe, so plugins still
should not be touching chunks asynchronously!
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 359c538f3..942520088 100644
index 359c538f32..942520088e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -376,4 +376,57 @@ public class PaperConfig {
@ -106,7 +106,7 @@ index 359c538f3..942520088 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java b/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java
new file mode 100644
index 000000000..8f18c2869
index 0000000000..8f18c28695
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/PriorityQueuedExecutor.java
@@ -0,0 +1,347 @@
@ -458,7 +458,7 @@ index 000000000..8f18c2869
+
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 1d006bad1..a002aabf3 100644
index 1d006bad16..a002aabf31 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -190,6 +190,7 @@ public class Chunk implements IChunkAccess {
@ -470,7 +470,7 @@ index 1d006bad1..a002aabf3 100644
Iterator iterator = protochunk.s().iterator();
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
index 2021c0d02..154ab09e0 100644
index 2021c0d02e..154ab09e0c 100644
--- a/src/main/java/net/minecraft/server/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/ChunkMap.java
@@ -14,9 +14,17 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
@ -562,7 +562,7 @@ index 2021c0d02..154ab09e0 100644
public void putAll(Map<? extends Long, ? extends Chunk> map) {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 186cfda7e..781e06877 100644
index 186cfda7e4..781e068770 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -33,12 +33,12 @@ public class ChunkProviderServer implements IChunkProvider {
@ -713,7 +713,7 @@ index 186cfda7e..781e06877 100644
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index d938eb374..51df075b4 100644
index d938eb3749..51df075b44 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -119,7 +119,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -740,7 +740,7 @@ index d938eb374..51df075b4 100644
completion = new Supplier<NBTTagCompound>() {
public NBTTagCompound get() {
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 2af07ae59..9c6844d44 100644
index 2af07ae592..9c6844d441 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -25,7 +25,17 @@ public class ChunkSection {
@ -762,7 +762,7 @@ index 2af07ae59..9c6844d44 100644
public IBlockData getType(int i, int j, int k) {
return (IBlockData) this.blockIds.a(i, j, k);
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
index d3898599f..8f061f5ca 100644
index d3898599f8..8f061f5ca3 100644
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
@@ -17,13 +17,14 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
@ -833,7 +833,7 @@ index d3898599f..8f061f5ca 100644
protected ProtoChunk a(ChunkCoordIntPair chunkcoordintpair, ChunkStatus chunkstatus, Map<ChunkCoordIntPair, ProtoChunk> map) {
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
index 454903a0e..dcbcb655c 100644
index 454903a0e7..dcbcb655c5 100644
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
@@ -3,7 +3,7 @@ package net.minecraft.server;
@ -921,7 +921,7 @@ index 454903a0e..dcbcb655c 100644
// Paper start - Anti-Xray - Support default methods
diff --git a/src/main/java/net/minecraft/server/DefinedStructureManager.java b/src/main/java/net/minecraft/server/DefinedStructureManager.java
index f5a6387f2..f45685099 100644
index f5a6387f27..f456850997 100644
--- a/src/main/java/net/minecraft/server/DefinedStructureManager.java
+++ b/src/main/java/net/minecraft/server/DefinedStructureManager.java
@@ -21,7 +21,7 @@ import org.apache.logging.log4j.Logger;
@ -934,7 +934,7 @@ index f5a6387f2..f45685099 100644
private final MinecraftServer d;
private final java.nio.file.Path e;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index a4c5b0b5b..b572e535a 100644
index a4c5b0b5b5..b572e535ac 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -207,7 +207,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -947,7 +947,7 @@ index a4c5b0b5b..b572e535a 100644
this.aJ = Sets.newHashSet();
this.aL = new double[] { 0.0D, 0.0D, 0.0D};
diff --git a/src/main/java/net/minecraft/server/IChunkLoader.java b/src/main/java/net/minecraft/server/IChunkLoader.java
index 4698ee99f..dfb45cc4e 100644
index 4698ee99f8..dfb45cc4ea 100644
--- a/src/main/java/net/minecraft/server/IChunkLoader.java
+++ b/src/main/java/net/minecraft/server/IChunkLoader.java
@@ -6,6 +6,8 @@ import javax.annotation.Nullable;
@ -960,7 +960,7 @@ index 4698ee99f..dfb45cc4e 100644
Chunk a(GeneratorAccess generatoraccess, int i, int j, Consumer<Chunk> consumer) throws IOException;
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
index 8bb2593aa..67bb28954 100644
index 8bb2593aa9..67bb289545 100644
--- a/src/main/java/net/minecraft/server/MathHelper.java
+++ b/src/main/java/net/minecraft/server/MathHelper.java
@@ -7,7 +7,7 @@ import java.util.function.IntPredicate;
@ -981,7 +981,7 @@ index 8bb2593aa..67bb28954 100644
f %= 360.0F;
if (f >= 180.0F) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 68743a6b7..1dbb03a9a 100644
index d2ee4e5781..236fbafeb5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -499,6 +499,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -1064,14 +1064,14 @@ index 68743a6b7..1dbb03a9a 100644
@@ -1049,6 +1047,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
// CraftBukkit - dropTickTime
for (Iterator iterator = this.getWorlds().iterator(); iterator.hasNext();) {
WorldServer worldserver = (WorldServer) iterator.next();
WorldServer worldserver = (WorldServer) iterator.next();
+ PaperAsyncChunkProvider.processMainThreadQueue(worldserver); // Paper
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
i = SystemUtils.getMonotonicNanos();
if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/PaperAsyncChunkProvider.java b/src/main/java/net/minecraft/server/PaperAsyncChunkProvider.java
new file mode 100644
index 000000000..851756d65
index 0000000000..851756d65e
--- /dev/null
+++ b/src/main/java/net/minecraft/server/PaperAsyncChunkProvider.java
@@ -0,0 +1,658 @@
@ -1734,7 +1734,7 @@ index 000000000..851756d65
+
+}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 240f59066..e4cf8548d 100644
index 240f590666..e4cf8548d3 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -22,6 +22,52 @@ public class PlayerChunk {
@ -1832,7 +1832,7 @@ index 240f59066..e4cf8548d 100644
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 679488a3c..b7dda8e28 100644
index 679488a3cf..b7dda8e282 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -25,10 +25,10 @@ public class PlayerChunkMap {
@ -1892,7 +1892,7 @@ index 679488a3c..b7dda8e28 100644
private void e() {
diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
index de6dd4fed..da6df06d8 100644
index de6dd4fed7..da6df06d84 100644
--- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
+++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
@@ -34,7 +34,7 @@ public class RegionLimitedWorldAccess implements GeneratorAccess {
@ -1905,7 +1905,7 @@ index de6dd4fed..da6df06d8 100644
this.m = world.getChunkProvider().getChunkGenerator().getSettings();
this.i = world.getSeaLevel();
diff --git a/src/main/java/net/minecraft/server/SchedulerBatch.java b/src/main/java/net/minecraft/server/SchedulerBatch.java
index 8e909d9ca..f214a74a2 100644
index 8e909d9caf..f214a74a29 100644
--- a/src/main/java/net/minecraft/server/SchedulerBatch.java
+++ b/src/main/java/net/minecraft/server/SchedulerBatch.java
@@ -10,6 +10,7 @@ public class SchedulerBatch<K, T extends SchedulerTask<K, T>, R> {
@ -1960,7 +1960,7 @@ index 8e909d9ca..f214a74a2 100644
}
}
diff --git a/src/main/java/net/minecraft/server/StructurePiece.java b/src/main/java/net/minecraft/server/StructurePiece.java
index d9def7135..945a005e9 100644
index d9def71353..945a005e90 100644
--- a/src/main/java/net/minecraft/server/StructurePiece.java
+++ b/src/main/java/net/minecraft/server/StructurePiece.java
@@ -16,7 +16,7 @@ public abstract class StructurePiece {
@ -1995,7 +1995,7 @@ index d9def7135..945a005e9 100644
}
diff --git a/src/main/java/net/minecraft/server/StructureStart.java b/src/main/java/net/minecraft/server/StructureStart.java
index 284e96710..8b08efe1f 100644
index 284e96710a..8b08efe1f4 100644
--- a/src/main/java/net/minecraft/server/StructureStart.java
+++ b/src/main/java/net/minecraft/server/StructureStart.java
@@ -7,7 +7,7 @@ import java.util.Random;
@ -2056,7 +2056,7 @@ index 284e96710..8b08efe1f 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1e030783b..a6176c805 100644
index 9bfc5db39e..2224eeab27 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -41,7 +41,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@ -2153,7 +2153,7 @@ index 1e030783b..a6176c805 100644
if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); return true; } // Paper
if (!CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java
index 69d8a25bd..d0eaa9e9f 100644
index 69d8a25bdf..d0eaa9e9f8 100644
--- a/src/main/java/net/minecraft/server/WorldGenStronghold.java
+++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java
@@ -10,23 +10,28 @@ import javax.annotation.Nullable;
@ -2306,10 +2306,10 @@ index 69d8a25bd..d0eaa9e9f 100644
}
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a9fffa544..19ce77c4a 100644
index 0ff3fe03dd..9b5509dce3 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -715,7 +715,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -714,7 +714,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed());
}
@ -2319,7 +2319,7 @@ index a9fffa544..19ce77c4a 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fac42f8e5..59b1628e5 100644
index fac42f8e5c..59b1628e5a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1021,8 +1021,12 @@ public final class CraftServer implements Server {
@ -2347,7 +2347,7 @@ index fac42f8e5..59b1628e5 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 95fe3a91b..b5a87cfaf 100644
index 95fe3a91bf..b5a87cfaf6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -163,6 +163,16 @@ public class CraftWorld implements World {
@ -2385,7 +2385,7 @@ index 95fe3a91b..b5a87cfaf 100644
if (isChunkLoaded(chunkCoordX + x, chunkCoordZ + z)) {
unloadChunk(chunkCoordX + x, chunkCoordZ + z);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 054ebc82b..2e0b4de83 100644
index 054ebc82bd..2e0b4de83b 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -82,6 +82,7 @@ public class CraftEventFactory {
@ -2447,7 +2447,7 @@ index 054ebc82b..2e0b4de83 100644
if (!event.isCancelled()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
index 9c917370a..a299092a5 100644
index 9c917370ae..a299092a58 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
@@ -21,6 +21,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator<GeneratorSettin

View file

@ -1,11 +1,11 @@
From c2829c83506f017fd6cd1f60c3a8c8a5b010f2e7 Mon Sep 17 00:00:00 2001
From 8eaa1a8c45655ea01da92e0863dd5d91cb67442b Mon Sep 17 00:00:00 2001
From: Trigary <trigary0@gmail.com>
Date: Fri, 14 Sep 2018 17:42:08 +0200
Subject: [PATCH] Limit lightning strike effect distance
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index e04204055..30985cdfc 100644
index e042040557..30985cdfc7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -237,6 +237,28 @@ public class PaperWorldConfig {
@ -38,7 +38,7 @@ index e04204055..30985cdfc 100644
public boolean firePhysicsEventForRedstone = false;
private void firePhysicsEventForRedstone() {
diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java
index 7781babf5..50f620009 100644
index 7781babf51..50f6200095 100644
--- a/src/main/java/net/minecraft/server/EntityLightning.java
+++ b/src/main/java/net/minecraft/server/EntityLightning.java
@@ -60,6 +60,17 @@ public class EntityLightning extends EntityWeather {
@ -69,10 +69,10 @@ index 7781babf5..50f620009 100644
--this.lifeTicks;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 19ce77c4a..8e23d060d 100644
index 9b5509dce3..409b507446 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1065,7 +1065,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1064,7 +1064,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
// CraftBukkit end
if (super.strikeLightning(entity)) {

View file

@ -1,11 +1,11 @@
From 8ef50e53eb21e4734663edd60681e84771c9b1a7 Mon Sep 17 00:00:00 2001
From 1955b4cdc7a21f0fba4df7983c37d6ec439f1a05 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 4 Oct 2018 10:08:02 -0500
Subject: [PATCH] Use EntityTypes for living entities
diff --git a/src/main/java/net/minecraft/server/BlockMonsterEggs.java b/src/main/java/net/minecraft/server/BlockMonsterEggs.java
index 5a0cc6d05..d385f647e 100644
index 5a0cc6d058..d385f647e7 100644
--- a/src/main/java/net/minecraft/server/BlockMonsterEggs.java
+++ b/src/main/java/net/minecraft/server/BlockMonsterEggs.java
@@ -35,7 +35,7 @@ public class BlockMonsterEggs extends Block {
@ -18,7 +18,7 @@ index 5a0cc6d05..d385f647e 100644
entitysilverfish.setPositionRotation((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
world.addEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason
diff --git a/src/main/java/net/minecraft/server/BlockPumpkinCarved.java b/src/main/java/net/minecraft/server/BlockPumpkinCarved.java
index 75622fbdf..265369984 100644
index 75622fbdf8..2653699840 100644
--- a/src/main/java/net/minecraft/server/BlockPumpkinCarved.java
+++ b/src/main/java/net/minecraft/server/BlockPumpkinCarved.java
@@ -52,7 +52,7 @@ public class BlockPumpkinCarved extends BlockFacingHorizontal {
@ -40,7 +40,7 @@ index 75622fbdf..265369984 100644
entityirongolem.setPlayerCreated(true);
entityirongolem.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.05D, (double) blockposition2.getZ() + 0.5D, 0.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/BlockTurtleEgg.java b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
index 0f0872c1e..1c1bf85a0 100644
index 0f0872c1e0..1c1bf85a0e 100644
--- a/src/main/java/net/minecraft/server/BlockTurtleEgg.java
+++ b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
@@ -94,7 +94,7 @@ public class BlockTurtleEgg extends Block {
@ -53,7 +53,7 @@ index 0f0872c1e..1c1bf85a0 100644
entityturtle.setAgeRaw(-24000);
entityturtle.g(blockposition);
diff --git a/src/main/java/net/minecraft/server/BlockWitherSkull.java b/src/main/java/net/minecraft/server/BlockWitherSkull.java
index 93bf32dc1..e6063bb46 100644
index 93bf32dc1a..e6063bb462 100644
--- a/src/main/java/net/minecraft/server/BlockWitherSkull.java
+++ b/src/main/java/net/minecraft/server/BlockWitherSkull.java
@@ -52,7 +52,7 @@ public class BlockWitherSkull extends BlockSkull {
@ -66,7 +66,7 @@ index 93bf32dc1..e6063bb46 100644
entitywither.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.55D, (double) blockposition2.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index aad7ce93f..09eabf123 100644
index aad7ce93f6..09eabf1235 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -412,7 +412,7 @@ public class EnderDragonBattle {
@ -79,7 +79,7 @@ index aad7ce93f..09eabf123 100644
entityenderdragon.getDragonControllerManager().setControllerPhase(DragonControllerPhase.HOLDING_PATTERN);
entityenderdragon.setPositionRotation(0.0D, 128.0D, 0.0D, this.d.random.nextFloat() * 360.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java
index ee159e0a8..070a9e7b1 100644
index ee159e0a81..070a9e7b14 100644
--- a/src/main/java/net/minecraft/server/EntityChicken.java
+++ b/src/main/java/net/minecraft/server/EntityChicken.java
@@ -96,7 +96,7 @@ public class EntityChicken extends EntityAnimal {
@ -92,7 +92,7 @@ index ee159e0a8..070a9e7b1 100644
public boolean f(ItemStack itemstack) {
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index 5874d2993..cc53e915d 100644
index 5874d2993c..cc53e915d7 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -88,7 +88,7 @@ public class EntityCow extends EntityAnimal {
@ -105,7 +105,7 @@ index 5874d2993..cc53e915d 100644
public float getHeadHeight() {
diff --git a/src/main/java/net/minecraft/server/EntityEnderPearl.java b/src/main/java/net/minecraft/server/EntityEnderPearl.java
index 961afa5c4..a372f6508 100644
index 961afa5c42..a372f6508f 100644
--- a/src/main/java/net/minecraft/server/EntityEnderPearl.java
+++ b/src/main/java/net/minecraft/server/EntityEnderPearl.java
@@ -74,7 +74,7 @@ public class EntityEnderPearl extends EntityProjectile {
@ -118,7 +118,7 @@ index 961afa5c4..a372f6508 100644
entityendermite.setPlayerSpawned(true);
entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java
index 963b6fbb9..fc20bbe27 100644
index 963b6fbb9c..fc20bbe272 100644
--- a/src/main/java/net/minecraft/server/EntityEvoker.java
+++ b/src/main/java/net/minecraft/server/EntityEvoker.java
@@ -188,8 +188,7 @@ public class EntityEvoker extends EntityIllagerWizard {
@ -132,7 +132,7 @@ index 963b6fbb9..fc20bbe27 100644
entityvex.prepare(EntityEvoker.this.world.getDamageScaler(blockposition), (GroupDataEntity) null, (NBTTagCompound) null);
entityvex.a((EntityInsentient) EntityEvoker.this);
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index 4e8a97c55..1b9425f3e 100644
index 4e8a97c557..1b9425f3e6 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -208,11 +208,11 @@ public class EntityHorse extends EntityHorseAbstract {
@ -150,7 +150,7 @@ index 4e8a97c55..1b9425f3e 100644
int j;
diff --git a/src/main/java/net/minecraft/server/EntityHorseDonkey.java b/src/main/java/net/minecraft/server/EntityHorseDonkey.java
index 72eed22eb..65c40e72b 100644
index 72eed22eb9..65c40e72bf 100644
--- a/src/main/java/net/minecraft/server/EntityHorseDonkey.java
+++ b/src/main/java/net/minecraft/server/EntityHorseDonkey.java
@@ -33,7 +33,7 @@ public class EntityHorseDonkey extends EntityHorseChestedAbstract {
@ -163,7 +163,7 @@ index 72eed22eb..65c40e72b 100644
this.a(entityageable, (EntityHorseAbstract) object);
return (EntityAgeable) object;
diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
index eae2b2665..0a092acdf 100644
index eae2b26655..0a092acdfe 100644
--- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
+++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
@@ -134,7 +134,7 @@ public class EntityHorseSkeleton extends EntityHorseAbstract {
@ -176,7 +176,7 @@ index eae2b2665..0a092acdf 100644
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
diff --git a/src/main/java/net/minecraft/server/EntityHorseZombie.java b/src/main/java/net/minecraft/server/EntityHorseZombie.java
index c23bc72fc..a1873f557 100644
index c23bc72fc8..a1873f557c 100644
--- a/src/main/java/net/minecraft/server/EntityHorseZombie.java
+++ b/src/main/java/net/minecraft/server/EntityHorseZombie.java
@@ -41,7 +41,7 @@ public class EntityHorseZombie extends EntityHorseAbstract {
@ -189,7 +189,7 @@ index c23bc72fc..a1873f557 100644
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java
index 5e1976871..82a32c61e 100644
index 5e19768710..82a32c61ed 100644
--- a/src/main/java/net/minecraft/server/EntityLlama.java
+++ b/src/main/java/net/minecraft/server/EntityLlama.java
@@ -285,7 +285,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
@ -202,7 +202,7 @@ index 5e1976871..82a32c61e 100644
this.a(entityageable, (EntityHorseAbstract) entityllama);
EntityLlama entityllama1 = (EntityLlama) entityageable;
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java
index dde9f1e61..638dbe978 100644
index dde9f1e61e..638dbe978d 100644
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
@@ -40,7 +40,7 @@ public class EntityMushroomCow extends EntityCow {
@ -224,7 +224,7 @@ index dde9f1e61..638dbe978 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java
index ba074c10c..13c84bda8 100644
index ba074c10c6..13c84bda84 100644
--- a/src/main/java/net/minecraft/server/EntityOcelot.java
+++ b/src/main/java/net/minecraft/server/EntityOcelot.java
@@ -154,7 +154,7 @@ public class EntityOcelot extends EntityTameableAnimal {
@ -246,7 +246,7 @@ index ba074c10c..13c84bda8 100644
entityocelot.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
entityocelot.setAgeRaw(-24000);
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index 9dc2d8be2..d1689dc33 100644
index 9dc2d8be27..d1689dc33a 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -153,7 +153,7 @@ public class EntityPig extends EntityAnimal {
@ -268,7 +268,7 @@ index 9dc2d8be2..d1689dc33 100644
public boolean f(ItemStack itemstack) {
diff --git a/src/main/java/net/minecraft/server/EntityPolarBear.java b/src/main/java/net/minecraft/server/EntityPolarBear.java
index a02020d5f..dbb534c9c 100644
index a02020d5fc..dbb534c9cd 100644
--- a/src/main/java/net/minecraft/server/EntityPolarBear.java
+++ b/src/main/java/net/minecraft/server/EntityPolarBear.java
@@ -18,7 +18,7 @@ public class EntityPolarBear extends EntityAnimal {
@ -281,7 +281,7 @@ index a02020d5f..dbb534c9c 100644
public boolean f(ItemStack itemstack) {
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
index e545b1c9b..d6bac06a7 100644
index e545b1c9b3..d6bac06a7a 100644
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
@@ -251,7 +251,7 @@ public class EntityRabbit extends EntityAnimal {
@ -294,7 +294,7 @@ index e545b1c9b..d6bac06a7 100644
if (this.random.nextInt(20) != 0) {
diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java
index f7a25c148..c35d1eef4 100644
index f7a25c1483..c35d1eef43 100644
--- a/src/main/java/net/minecraft/server/EntitySheep.java
+++ b/src/main/java/net/minecraft/server/EntitySheep.java
@@ -247,7 +247,7 @@ public class EntitySheep extends EntityAnimal {
@ -307,7 +307,7 @@ index f7a25c148..c35d1eef4 100644
entitysheep1.setColor(this.a((EntityAnimal) this, (EntityAnimal) entitysheep));
return entitysheep1;
diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java
index a42b8d554..9ef1c9baf 100644
index a42b8d554f..9ef1c9baf2 100644
--- a/src/main/java/net/minecraft/server/EntitySpider.java
+++ b/src/main/java/net/minecraft/server/EntitySpider.java
@@ -111,7 +111,7 @@ public class EntitySpider extends EntityMonster {
@ -320,7 +320,7 @@ index a42b8d554..9ef1c9baf 100644
entityskeleton.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null);
diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java
index a533e0eb5..270b95082 100644
index a533e0eb5b..270b950820 100644
--- a/src/main/java/net/minecraft/server/EntityTurtle.java
+++ b/src/main/java/net/minecraft/server/EntityTurtle.java
@@ -218,7 +218,7 @@ public class EntityTurtle extends EntityAnimal {
@ -333,7 +333,7 @@ index a533e0eb5..270b95082 100644
public boolean f(ItemStack itemstack) {
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index d74bfa120..24ca35119 100644
index d74bfa1201..24ca351194 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -269,6 +269,7 @@ public class EntityTypes<T extends Entity> {
@ -345,7 +345,7 @@ index d74bfa120..24ca35119 100644
public T a(World world) {
return this.aT.apply(world); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index f01e776fe..40b3ffd8c 100644
index f01e776fe5..40b3ffd8ca 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -592,7 +592,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@ -367,7 +367,7 @@ index f01e776fe..40b3ffd8c 100644
// Paper start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, entitylightning, entitywitch).isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
index 4f1696d01..46d8e0a1f 100644
index 4f1696d018..46d8e0a1f4 100644
--- a/src/main/java/net/minecraft/server/EntityWolf.java
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
@@ -342,7 +342,7 @@ public class EntityWolf extends EntityTameableAnimal {
@ -380,7 +380,7 @@ index 4f1696d01..46d8e0a1f 100644
if (uuid != null) {
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 7998b80c1..81cc0c3b3 100644
index 7998b80c17..81cc0c3b33 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -208,7 +208,7 @@ public class EntityZombie extends EntityMonster {
@ -420,7 +420,7 @@ index 7998b80c1..81cc0c3b3 100644
entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
entitychicken1.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null);
diff --git a/src/main/java/net/minecraft/server/EntityZombieHusk.java b/src/main/java/net/minecraft/server/EntityZombieHusk.java
index 85d402965..0cca7b6d5 100644
index 85d402965b..0cca7b6d51 100644
--- a/src/main/java/net/minecraft/server/EntityZombieHusk.java
+++ b/src/main/java/net/minecraft/server/EntityZombieHusk.java
@@ -54,7 +54,7 @@ public class EntityZombieHusk extends EntityZombie {
@ -433,7 +433,7 @@ index 85d402965..0cca7b6d5 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java
index 86e5fbcda..fb96743af 100644
index 86e5fbcdab..fb96743af2 100644
--- a/src/main/java/net/minecraft/server/EntityZombieVillager.java
+++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java
@@ -118,7 +118,7 @@ public class EntityZombieVillager extends EntityZombie {
@ -446,7 +446,7 @@ index 86e5fbcda..fb96743af 100644
entityvillager.u(this);
entityvillager.setProfession(this.getProfession());
diff --git a/src/main/java/net/minecraft/server/ItemArmorStand.java b/src/main/java/net/minecraft/server/ItemArmorStand.java
index 576b3c565..4dd0e39ec 100644
index 576b3c5650..4dd0e39ec3 100644
--- a/src/main/java/net/minecraft/server/ItemArmorStand.java
+++ b/src/main/java/net/minecraft/server/ItemArmorStand.java
@@ -34,7 +34,7 @@ public class ItemArmorStand extends Item {
@ -459,7 +459,7 @@ index 576b3c565..4dd0e39ec 100644
entityarmorstand.setPositionRotation(d0 + 0.5D, d1, d2 + 0.5D, f, 0.0F);
diff --git a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
index 5ddf66eef..bb7e072ee 100644
index 5ddf66eef5..bb7e072ee1 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
@@ -59,7 +59,7 @@ public class MobSpawnerPhantom {
@ -472,7 +472,7 @@ index 5ddf66eef..bb7e072ee 100644
entityphantom.setPositionRotation(blockposition1, 0.0F, 0.0F);
groupdataentity = entityphantom.prepare(difficultydamagescaler, groupdataentity, (NBTTagCompound) null);
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
index d4fdcbdfd..887e4461f 100644
index d4fdcbdfd6..887e4461f3 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
@@ -36,7 +36,7 @@ public class PathfinderGoalHorseTrap extends PathfinderGoal {
@ -494,7 +494,7 @@ index d4fdcbdfd..887e4461f 100644
entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null);
entityskeleton.setPosition(entityhorseabstract.locX, entityhorseabstract.locY, entityhorseabstract.locZ);
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 0ac1fb53a..509d62f6b 100644
index 0ac1fb53a4..509d62f6b6 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -134,7 +134,7 @@ public class VillageSiege {
@ -507,7 +507,7 @@ index 0ac1fb53a..509d62f6b 100644
} catch (Exception exception) {
exception.printStackTrace();
diff --git a/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java b/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java
index 94b21693e..0a223cfe5 100644
index 94b21693e2..0a223cfe5a 100644
--- a/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java
+++ b/src/main/java/net/minecraft/server/WorldGenEndCityPieces.java
@@ -270,7 +270,7 @@ public class WorldGenEndCityPieces {
@ -520,7 +520,7 @@ index 94b21693e..0a223cfe5 100644
entityshulker.setPosition((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D);
entityshulker.g(blockposition);
diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java b/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java
index 2def56b06..abeb4aa02 100644
index 2def56b067..abeb4aa025 100644
--- a/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java
+++ b/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java
@@ -154,8 +154,7 @@ public class WorldGenFeatureOceanRuinPieces {
@ -534,7 +534,7 @@ index 2def56b06..abeb4aa02 100644
entitydrowned.setPositionRotation(blockposition, 0.0F, 0.0F);
entitydrowned.prepare(generatoraccess.getDamageScaler(blockposition), (GroupDataEntity) null, (NBTTagCompound) null);
diff --git a/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java b/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java
index 0e7aed09d..493a86e1b 100644
index 0e7aed09d1..493a86e1bf 100644
--- a/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java
+++ b/src/main/java/net/minecraft/server/WorldGenMonumentPieces.java
@@ -1800,7 +1800,7 @@ public class WorldGenMonumentPieces {
@ -556,7 +556,7 @@ index 0e7aed09d..493a86e1b 100644
entityguardianelder.heal(entityguardianelder.getMaxHealth());
entityguardianelder.setPositionRotation((double) l + 0.5D, (double) i1, (double) j1 + 0.5D, 0.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/WorldGenVillagePieces.java b/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
index 5fa2987d2..967e33b3d 100644
index 5fa2987d2a..967e33b3d7 100644
--- a/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
+++ b/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
@@ -1640,7 +1640,7 @@ public class WorldGenVillagePieces {
@ -578,7 +578,7 @@ index 5fa2987d2..967e33b3d 100644
entityvillager.setPositionRotation((double) j1 + 0.5D, (double) k1, (double) l1 + 0.5D, 0.0F, 0.0F);
entityvillager.setProfession(this.c(i1, generatoraccess.m().nextInt(6)));
diff --git a/src/main/java/net/minecraft/server/WorldGenWitchHut.java b/src/main/java/net/minecraft/server/WorldGenWitchHut.java
index efb0379ce..3d8193c47 100644
index efb0379ce3..3d8193c477 100644
--- a/src/main/java/net/minecraft/server/WorldGenWitchHut.java
+++ b/src/main/java/net/minecraft/server/WorldGenWitchHut.java
@@ -81,7 +81,7 @@ public class WorldGenWitchHut extends WorldGenScatteredPiece {
@ -591,7 +591,7 @@ index efb0379ce..3d8193c47 100644
entitywitch.di();
entitywitch.setPositionRotation((double) j + 0.5D, (double) i, (double) k + 0.5D, 0.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java b/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java
index 11010d8e1..4eb746ebb 100644
index 11010d8e12..4eb746ebb0 100644
--- a/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java
+++ b/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java
@@ -23,14 +23,14 @@ public class WorldGenWoodlandMansionPieces {
@ -639,7 +639,7 @@ index 11010d8e1..4eb746ebb 100644
entityvindicator.setPositionRotation(blockposition, 0.0F, 0.0F);
entityvindicator.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityvindicator)), (GroupDataEntity) null, (NBTTagCompound) null);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8e23d060d..6671d7180 100644
index 409b507446..a4fc1e5e21 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -494,7 +494,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -652,7 +652,7 @@ index 8e23d060d..6671d7180 100644
entityhorseskeleton.s(true);
entityhorseskeleton.setAgeRaw(0);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e33135ada..6ed7c9355 100644
index e33135adaa..6ed7c93550 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1181,153 +1181,153 @@ public class CraftWorld implements World {