From 9ac7577de31b7ff6a0bad07b9caca9c24b84aea7 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 27 Aug 2018 11:07:22 -0400 Subject: [PATCH] Update upstream CB --- Spigot-Server-Patches/0004-MC-Utils.patch | 42 ++++++++--------- ...to-current-Chunk-for-Entity-and-Bloc.patch | 16 +++---- ...ts-for-each-Entity-Block-Entity-Type.patch | 8 ++-- ...ve-invalid-mob-spawner-tile-entities.patch | 6 +-- .../0028-Lighting-Queue.patch | 22 ++++----- ...opper-searches-if-there-are-no-items.patch | 12 ++--- .../0057-Add-exception-reporting-event.patch | 26 +++++------ .../0070-Add-World-Util-Methods.patch | 8 ++-- ...5-Configurable-Chunk-Inhabited-Timer.patch | 8 ++-- .../0136-Auto-Save-Improvements.patch | 20 ++++---- ...tion-to-remove-corrupt-tile-entities.patch | 10 ++-- ...mplement-ensureServerConversions-API.patch | 6 +-- .../0196-Implement-getI18NDisplayName.patch | 8 ++-- .../0233-Add-ArmorStand-Item-Meta.patch | 16 +++---- .../0284-InventoryCloseEvent-Reason-API.patch | 22 ++++----- ...ups-for-Entity-TileEntity-Current-Ch.patch | 8 ++-- .../0299-Duplicate-UUID-Resolve-Option.patch | 16 +++---- ...-anytime-entities-change-to-guarante.patch | 8 ++-- ...dd-some-Debug-to-Chunk-Entity-slices.patch | 12 ++--- ...on-t-call-getItemMeta-on-hasItemMeta.patch | 8 ++-- .../0326-Entity-add-to-world-fixes.patch | 12 ++--- Spigot-Server-Patches/0347-Anti-Xray.patch | 46 +++++++++---------- work/CraftBukkit | 2 +- 23 files changed, 171 insertions(+), 171 deletions(-) diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index e832df7562..42cff91894 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -1,11 +1,11 @@ -From 909c0b4ade17b19a8f79bd39ca8a28d0ae7c1027 Mon Sep 17 00:00:00 2001 +From 00a8a9abe20b6993d8063665ac50086f2a36b3d4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 Subject: [PATCH] MC Utils diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 9f3aa24590..ca5c56c2b6 100644 +index 9f3aa2459..ca5c56c2b 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -10,7 +10,7 @@ import org.apache.logging.log4j.Logger; @@ -42,7 +42,7 @@ index 9f3aa24590..ca5c56c2b6 100644 return this.c(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 542b2aaf4d..35cb5ca575 100644 +index fe5328ef4..b7c40d5ce 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit @@ -54,7 +54,7 @@ index 542b2aaf4d..35cb5ca575 100644 private final ChunkSection[] sections; private final BiomeBase[] f; private final boolean[] g; -@@ -692,6 +692,7 @@ public class Chunk implements IChunkAccess { +@@ -699,6 +699,7 @@ public class Chunk implements IChunkAccess { return this.a(blockposition, Chunk.EnumTileEntityState.CHECK); } @@ -63,7 +63,7 @@ index 542b2aaf4d..35cb5ca575 100644 public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java -index 34586bca65..b0c004b1f2 100644 +index 34586bca6..b0c004b1f 100644 --- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java +++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java @@ -24,6 +24,8 @@ public class ChunkCoordIntPair { @@ -76,7 +76,7 @@ index 34586bca65..b0c004b1f2 100644 return (long) i & 4294967295L | ((long) j & 4294967295L) << 32; } diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 3b6b3b9a99..22af9c1885 100644 +index 3b6b3b9a9..22af9c188 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java @@ -16,7 +16,7 @@ import org.apache.logging.log4j.Logger; @@ -89,7 +89,7 @@ index 3b6b3b9a99..22af9c1885 100644 private final IChunkLoader e; private final IAsyncTaskHandler f; diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java -index d24ec3d53c..9e83610f1a 100644 +index d24ec3d53..9e83610f1 100644 --- a/src/main/java/net/minecraft/server/DataBits.java +++ b/src/main/java/net/minecraft/server/DataBits.java @@ -60,6 +60,7 @@ public class DataBits { @@ -101,7 +101,7 @@ index d24ec3d53c..9e83610f1a 100644 return this.a; } diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java -index dae40b9cde..0be0b0ef51 100644 +index dae40b9cd..0be0b0ef5 100644 --- a/src/main/java/net/minecraft/server/DataPalette.java +++ b/src/main/java/net/minecraft/server/DataPalette.java @@ -4,8 +4,10 @@ import javax.annotation.Nullable; @@ -116,7 +116,7 @@ index dae40b9cde..0be0b0ef51 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 030ec87047..575f9b5587 100644 +index 030ec8704..575f9b558 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java @@ -9,7 +9,7 @@ import java.util.stream.Collectors; @@ -158,7 +158,7 @@ index 030ec87047..575f9b5587 100644 this.b(); 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 2c6fbd1d6f..3790039f18 100644 +index 2c6fbd1d6..3790039f1 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -6,6 +6,7 @@ import org.bukkit.event.entity.EntityUnleashEvent; @@ -170,7 +170,7 @@ index 2c6fbd1d6f..3790039f18 100644 private float b; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index fd050c5f32..91c4785889 100644 +index fd050c5f3..91c478588 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -122,6 +122,7 @@ public abstract class EntityLiving extends Entity { @@ -182,7 +182,7 @@ index fd050c5f32..91c4785889 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 96e0122150..a3449e9a8d 100644 +index 96e012215..a3449e9a8 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -194,7 +194,7 @@ index 96e0122150..a3449e9a8d 100644 super(entitytypes, world); this.b_ = 5; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 17bfa356f1..5c1ab6a0b6 100644 +index 17bfa356f..5c1ab6a0b 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -3,6 +3,7 @@ package net.minecraft.server; @@ -245,7 +245,7 @@ index 17bfa356f1..5c1ab6a0b6 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index c54275bc2f..318c4204df 100644 +index c54275bc2..318c4204d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -26,6 +26,7 @@ import org.bukkit.TreeType; @@ -276,7 +276,7 @@ index c54275bc2f..318c4204df 100644 } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java new file mode 100644 -index 0000000000..9f9341c98f +index 000000000..9f9341c98 --- /dev/null +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +1,296 @@ @@ -577,7 +577,7 @@ index 0000000000..9f9341c98f + } +} diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 7fc9b5ff32..e658816c24 100644 +index 7fc9b5ff3..e658816c2 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -24,7 +24,7 @@ public class NBTTagCompound implements NBTBase { @@ -613,7 +613,7 @@ index 7fc9b5ff32..e658816c24 100644 - } } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 0afaea8109..26da897243 100644 +index 0afaea810..26da89724 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -654,7 +654,7 @@ index 0afaea8109..26da897243 100644 public QueuedPacket(Packet packet, @Nullable GenericFutureListener> genericfuturelistener) { this.a = packet; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index d04afceb70..a63a5811d6 100644 +index d04afceb7..a63a5811d 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -33,6 +33,7 @@ public class PacketDataSerializer extends ByteBuf { @@ -666,7 +666,7 @@ index d04afceb70..a63a5811d6 100644 for (int j = 1; j < 5; ++j) { if ((i & -1 << j * 7) == 0) { diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index a8363f47b3..33436ac65b 100644 +index a8363f47b..33436ac65 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -13,7 +13,7 @@ public class PacketPlayOutMapChunk implements Packet { @@ -687,7 +687,7 @@ index a8363f47b3..33436ac65b 100644 int j = 0; ChunkSection[] achunksection = chunk.getSections(); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 43bd6aba9d..7dee734a70 100644 +index 43bd6aba9..7dee734a7 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -68,9 +68,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -704,7 +704,7 @@ index 43bd6aba9d..7dee734a70 100644 private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java -index 7cc7eb7735..a804a67e16 100644 +index 7cc7eb773..a804a67e1 100644 --- a/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java @@ -56,6 +56,7 @@ public class RegistryBlockID implements Registry { // Paper - decompile fix diff --git a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index 77b9792b85..8ab61d1c91 100644 --- a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -1,4 +1,4 @@ -From 67a6288644176621a491a96d0d283fe92ee3f6c7 Mon Sep 17 00:00:00 2001 +From 5a02faef031b464f7df6fa511f9adc8ffa8562ec Mon Sep 17 00:00:00 2001 From: Aikar 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 35cb5ca575..85f33c140e 100644 +index b7c40d5ce..238139c73 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -33,7 +33,7 @@ public class Chunk implements IChunkAccess { @@ -60,7 +60,7 @@ index 35cb5ca575..85f33c140e 100644 this.p = Maps.newHashMap(); this.q = Maps.newHashMap(); this.r = new ShortList[16]; -@@ -645,6 +668,9 @@ public class Chunk implements IChunkAccess { +@@ -652,6 +675,9 @@ public class Chunk implements IChunkAccess { entity.af = k; entity.ag = this.locZ; this.entitySlices[k].add(entity); @@ -70,7 +70,7 @@ index 35cb5ca575..85f33c140e 100644 } public void a(HeightMap.Type heightmap_type, long[] along) { -@@ -663,8 +689,12 @@ public class Chunk implements IChunkAccess { +@@ -670,8 +696,12 @@ public class Chunk implements IChunkAccess { if (i >= this.entitySlices.length) { i = this.entitySlices.length - 1; } @@ -85,7 +85,7 @@ index 35cb5ca575..85f33c140e 100644 } public boolean c(BlockPosition blockposition) { -@@ -830,6 +860,7 @@ public class Chunk implements IChunkAccess { +@@ -837,6 +867,7 @@ public class Chunk implements IChunkAccess { } } // Spigot End @@ -94,7 +94,7 @@ index 35cb5ca575..85f33c140e 100644 // Do not pass along players, as doing so can get them stuck outside of time. // (which for example disables inventory icon updates and prevents block breaking) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 044f7b5aa0..591ae114cf 100644 +index 044f7b5aa..591ae114c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -147,7 +147,7 @@ index 044f7b5aa0..591ae114cf 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 7390061bf0..c69209497b 100644 +index 7390061bf..c69209497 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -41,6 +41,15 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -167,7 +167,7 @@ index 7390061bf0..c69209497b 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 b542b17fd0..9fc7ac8c02 100644 +index b542b17fd..9fc7ac8c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -9,6 +9,7 @@ import java.util.UUID; diff --git a/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch index 0874696ceb..6deb7422da 100644 --- a/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch +++ b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch @@ -1,4 +1,4 @@ -From 3e64fc7d6db1a903430d4313f4da4d84173428c4 Mon Sep 17 00:00:00 2001 +From 097b3586b9c38d4afc2e8cf3ae9b0ecb16e5df7c Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 02:13:59 -0400 Subject: [PATCH] Store counts for each Entity/Block Entity Type @@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type Opens door for future patches to optimize performance diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 85f33c140e..bcafd86fb8 100644 +index 238139c73..eb0411ec8 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -63,15 +63,19 @@ public class Chunk implements IChunkAccess { @@ -37,7 +37,7 @@ index 85f33c140e..bcafd86fb8 100644 } return removed; } -@@ -670,6 +675,7 @@ public class Chunk implements IChunkAccess { +@@ -677,6 +682,7 @@ public class Chunk implements IChunkAccess { this.entitySlices[k].add(entity); // Paper start entity.setCurrentChunk(this); @@ -45,7 +45,7 @@ index 85f33c140e..bcafd86fb8 100644 // Paper end } -@@ -694,6 +700,7 @@ public class Chunk implements IChunkAccess { +@@ -701,6 +707,7 @@ public class Chunk implements IChunkAccess { return; } entity.setCurrentChunk(null); diff --git a/Spigot-Server-Patches/0019-Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/0019-Remove-invalid-mob-spawner-tile-entities.patch index ddc61cf234..29745d24d8 100644 --- a/Spigot-Server-Patches/0019-Remove-invalid-mob-spawner-tile-entities.patch +++ b/Spigot-Server-Patches/0019-Remove-invalid-mob-spawner-tile-entities.patch @@ -1,14 +1,14 @@ -From d221792884ce8965482fa88f3e5b5374a300964a Mon Sep 17 00:00:00 2001 +From 251b37e314fbc058339d37db98b0e8cf6c34c236 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 15:08:03 -0600 Subject: [PATCH] Remove invalid mob spawner tile entities diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index bcafd86fb8..8507392628 100644 +index eb0411ec8..4622e92b0 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -773,6 +773,10 @@ public class Chunk implements IChunkAccess { +@@ -780,6 +780,10 @@ public class Chunk implements IChunkAccess { tileentity.z(); this.tileEntities.put(blockposition, tileentity); // CraftBukkit start diff --git a/Spigot-Server-Patches/0028-Lighting-Queue.patch b/Spigot-Server-Patches/0028-Lighting-Queue.patch index ddd8695dc4..0d164eb22b 100644 --- a/Spigot-Server-Patches/0028-Lighting-Queue.patch +++ b/Spigot-Server-Patches/0028-Lighting-Queue.patch @@ -1,4 +1,4 @@ -From f8ed7cd4c678343912efeb6d8e785f1be0b92c5f Mon Sep 17 00:00:00 2001 +From 59b57105332ca92c3b777cb704d08541bc89049e Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 00:52:31 -0600 Subject: [PATCH] Lighting Queue @@ -6,7 +6,7 @@ Subject: [PATCH] Lighting Queue This provides option to queue lighting updates to ensure they do not cause the server lag diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index 145cb274b0..eff9dcf54f 100644 +index 145cb274b..eff9dcf54 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -50,6 +50,8 @@ public class WorldTimingsHandler { @@ -28,7 +28,7 @@ index 145cb274b0..eff9dcf54f 100644 public static Timing getTickList(WorldServer worldserver, String timingsType) { diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 39d565db1f..f0d1ae630e 100644 +index 39d565db1..f0d1ae630 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -130,4 +130,10 @@ public class PaperWorldConfig { @@ -43,7 +43,7 @@ index 39d565db1f..f0d1ae630e 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8507392628..d2412624e1 100644 +index 4622e92b0..d4bebddab 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -90,6 +90,7 @@ public class Chunk implements IChunkAccess { @@ -68,7 +68,7 @@ index 8507392628..d2412624e1 100644 for (int i = 0; i < 16; ++i) { for (int j = 0; j < 16; ++j) { if (this.g[i + j * 16]) { -@@ -523,6 +531,7 @@ public class Chunk implements IChunkAccess { +@@ -530,6 +538,7 @@ public class Chunk implements IChunkAccess { if (flag1) { this.initLighting(); } else { @@ -76,7 +76,7 @@ index 8507392628..d2412624e1 100644 int i1 = iblockdata.b(this.world, blockposition); int j1 = iblockdata1.b(this.world, blockposition); -@@ -530,6 +539,7 @@ public class Chunk implements IChunkAccess { +@@ -537,6 +546,7 @@ public class Chunk implements IChunkAccess { if (i1 != j1 && (i1 < j1 || this.getBrightness(EnumSkyBlock.SKY, blockposition) > 0 || this.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 0)) { this.c(i, k); } @@ -84,7 +84,7 @@ index 8507392628..d2412624e1 100644 } TileEntity tileentity; -@@ -1300,6 +1310,16 @@ public class Chunk implements IChunkAccess { +@@ -1307,6 +1317,16 @@ public class Chunk implements IChunkAccess { return this.D == 8; } @@ -102,7 +102,7 @@ index 8507392628..d2412624e1 100644 IMMEDIATE, QUEUED, CHECK; diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 0034956af9..1379b574ef 100644 +index 0034956af..1379b574e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -314,6 +314,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -114,7 +114,7 @@ index 0034956af9..1379b574ef 100644 // Update neighbor counts for (int x = -2; x < 3; x++) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e8c3dcc244..c47f56ed8d 100644 +index e8c3dcc24..c47f56ed8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -886,7 +886,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -136,7 +136,7 @@ index e8c3dcc244..c47f56ed8d 100644 } diff --git a/src/main/java/net/minecraft/server/PaperLightingQueue.java b/src/main/java/net/minecraft/server/PaperLightingQueue.java new file mode 100644 -index 0000000000..60562f1fd2 +index 000000000..60562f1fd --- /dev/null +++ b/src/main/java/net/minecraft/server/PaperLightingQueue.java @@ -0,0 +1,92 @@ @@ -233,7 +233,7 @@ index 0000000000..60562f1fd2 + } +} diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0b38093f91..93d1449750 100644 +index 929875340..0fe8a97f2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -335,7 +335,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/0048-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0048-Avoid-hopper-searches-if-there-are-no-items.patch index ae8a9aba13..225e2d6ea1 100644 --- a/Spigot-Server-Patches/0048-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0048-Avoid-hopper-searches-if-there-are-no-items.patch @@ -1,4 +1,4 @@ -From 1df9f23dc917c635bee6505b3ea3d08e0179f328 Mon Sep 17 00:00:00 2001 +From abe0eee68d380641a40195a483dceb26caa084e9 Mon Sep 17 00:00:00 2001 From: CullanP Date: Thu, 3 Mar 2016 02:13:38 -0600 Subject: [PATCH] Avoid hopper searches if there are no items @@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index d2412624e1..ef09ac7873 100644 +index d4bebddab..d41cd7a6e 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -91,6 +91,10 @@ public class Chunk implements IChunkAccess { @@ -28,7 +28,7 @@ index d2412624e1..ef09ac7873 100644 // Paper end public boolean areNeighborsLoaded(final int radius) { switch (radius) { -@@ -684,6 +688,11 @@ public class Chunk implements IChunkAccess { +@@ -691,6 +695,11 @@ public class Chunk implements IChunkAccess { entity.ag = this.locZ; this.entitySlices[k].add(entity); // Paper start @@ -40,7 +40,7 @@ index d2412624e1..ef09ac7873 100644 entity.setCurrentChunk(this); entityCounts.increment(entity.getMinecraftKeyString()); // Paper end -@@ -709,6 +718,11 @@ public class Chunk implements IChunkAccess { +@@ -716,6 +725,11 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } @@ -52,7 +52,7 @@ index d2412624e1..ef09ac7873 100644 entity.setCurrentChunk(null); entityCounts.decrement(entity.getMinecraftKeyString()); // Paper end -@@ -911,6 +925,15 @@ public class Chunk implements IChunkAccess { +@@ -918,6 +932,15 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[k].isEmpty()) { Iterator iterator = this.entitySlices[k].iterator(); @@ -68,7 +68,7 @@ index d2412624e1..ef09ac7873 100644 while (iterator.hasNext()) { Entity entity1 = (Entity) iterator.next(); -@@ -947,7 +970,18 @@ public class Chunk implements IChunkAccess { +@@ -954,7 +977,18 @@ public class Chunk implements IChunkAccess { i = MathHelper.clamp(i, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); diff --git a/Spigot-Server-Patches/0057-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0057-Add-exception-reporting-event.patch index 452048ee4b..770f6be573 100644 --- a/Spigot-Server-Patches/0057-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0057-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From 5e1e6450f4fda96b2b9ab63bd59a16dad95fba6e Mon Sep 17 00:00:00 2001 +From 46bd7a802f08c9106ebb2057d140b8f59e423e7e Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java new file mode 100644 -index 0000000000..93397188b7 +index 000000000..93397188b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java @@ -0,0 +1,38 @@ @@ -50,7 +50,7 @@ index 0000000000..93397188b7 +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index ef09ac7873..1131a092af 100644 +index d41cd7a6e..68f845986 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,6 @@ @@ -68,7 +68,7 @@ index ef09ac7873..1131a092af 100644 public IBlockData getType(BlockPosition blockposition) { return this.getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ()); } -@@ -802,10 +804,15 @@ public class Chunk implements IChunkAccess { +@@ -809,10 +811,15 @@ public class Chunk implements IChunkAccess { this.tileEntities.remove(blockposition); // Paper end } else { @@ -89,7 +89,7 @@ index ef09ac7873..1131a092af 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 1379b574ef..6b041f06e4 100644 +index 1379b574e..6b041f06e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -15,6 +15,7 @@ import java.util.function.BooleanSupplier; @@ -118,7 +118,7 @@ index 1379b574ef..6b041f06e4 100644 } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 1d830dff64..58d971cf20 100644 +index 1d830dff6..58d971cf2 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -1,5 +1,6 @@ @@ -145,7 +145,7 @@ index 1d830dff64..58d971cf20 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 31899549d5..cc7cad8be4 100644 +index 31899549d..cc7cad8be 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -1,5 +1,6 @@ @@ -172,7 +172,7 @@ index 31899549d5..cc7cad8be4 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index d18921271f..e5115863ec 100644 +index d18921271..e5115863e 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -1,5 +1,6 @@ @@ -191,7 +191,7 @@ index d18921271f..e5115863ec 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 9e24b77ad1..f32191c5a2 100644 +index 9e24b77ad..f32191c5a 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager; @@ -219,7 +219,7 @@ index 9e24b77ad1..f32191c5a2 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index e649d662ae..560edb523f 100644 +index e649d662a..560edb523 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -1,5 +1,7 @@ @@ -239,7 +239,7 @@ index e649d662ae..560edb523f 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9fb87914ff..879f2fe844 100644 +index 8af8cf2ee..561bcd07b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,6 +1,8 @@ @@ -276,7 +276,7 @@ index 9fb87914ff..879f2fe844 100644 this.tileEntityListTick.remove(tileTickPosition--); continue; diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index 65931bfb5f..625335c60f 100644 +index 65931bfb5..625335c60 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -138,6 +138,7 @@ public class WorldPersistentData { @@ -288,7 +288,7 @@ index 65931bfb5f..625335c60f 100644 throw throwable1; } finally { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 93b9134d6e..26753fac5e 100644 +index 93b9134d6..26753fac5 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -15,6 +15,9 @@ import java.util.concurrent.atomic.AtomicReference; diff --git a/Spigot-Server-Patches/0070-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0070-Add-World-Util-Methods.patch index 760b94ecae..13d1ae9fd5 100644 --- a/Spigot-Server-Patches/0070-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0070-Add-World-Util-Methods.patch @@ -1,4 +1,4 @@ -From 486b51b81a7ca05e4cdd916e72e92986452a7acb Mon Sep 17 00:00:00 2001 +From 7199d360b2976d395fa21c26781e12591a4e5b61 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 20:16:03 -0400 Subject: [PATCH] Add World Util Methods @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 1131a092af..d86b925f0d 100644 +index 68f845986..dcd122d8b 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -632,6 +632,7 @@ public class Chunk implements IChunkAccess { +@@ -639,6 +639,7 @@ public class Chunk implements IChunkAccess { } } @@ -18,7 +18,7 @@ index 1131a092af..d86b925f0d 100644 return this.a(blockposition, i, this.world.o().g()); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 879f2fe844..fd6f070417 100644 +index 561bcd07b..94872593b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -84,7 +84,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/0085-Configurable-Chunk-Inhabited-Timer.patch b/Spigot-Server-Patches/0085-Configurable-Chunk-Inhabited-Timer.patch index 23d6385035..87a8cb6869 100644 --- a/Spigot-Server-Patches/0085-Configurable-Chunk-Inhabited-Timer.patch +++ b/Spigot-Server-Patches/0085-Configurable-Chunk-Inhabited-Timer.patch @@ -1,4 +1,4 @@ -From 4faf295c8925f103c186ca0a838540d4c658c75a Mon Sep 17 00:00:00 2001 +From fadc3cb3c1ae9baacfdfdc169ed24262494175c2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:46:14 -0400 Subject: [PATCH] Configurable Chunk Inhabited Timer @@ -9,7 +9,7 @@ aspects of vanilla gameplay to this factor. For people who want all chunks to be treated equally, you can disable the timer. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5f3156af60..f62faf81e7 100644 +index 59436c208..d8447d9e7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -225,4 +225,9 @@ public class PaperWorldConfig { @@ -23,10 +23,10 @@ index 5f3156af60..f62faf81e7 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 30dc4fb6df..0ef1a8c7d3 100644 +index dee1f7bfe..5390396d5 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -1239,7 +1239,7 @@ public class Chunk implements IChunkAccess { +@@ -1246,7 +1246,7 @@ public class Chunk implements IChunkAccess { } public long m() { diff --git a/Spigot-Server-Patches/0136-Auto-Save-Improvements.patch b/Spigot-Server-Patches/0136-Auto-Save-Improvements.patch index 5770338ac8..a4f8164e55 100644 --- a/Spigot-Server-Patches/0136-Auto-Save-Improvements.patch +++ b/Spigot-Server-Patches/0136-Auto-Save-Improvements.patch @@ -1,4 +1,4 @@ -From e036b4c10f2ddfe4dd643eff683210b672f63c9d Mon Sep 17 00:00:00 2001 +From ffcfdd3d820dcf5c9815ae991dfe81407434908e Mon Sep 17 00:00:00 2001 From: Aikar 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 aa0e3c757d..c1845d6811 100644 +index aa0e3c757..c1845d681 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -255,4 +255,15 @@ public class PaperConfig { @@ -32,7 +32,7 @@ index aa0e3c757d..c1845d6811 100644 + } } diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 547ab09627..78a3188274 100644 +index 547ab0962..78a318827 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 547ab09627..78a3188274 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2efb870dd6..6c766f2bf7 100644 +index 3c9c3cd41..8d1264879 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -50,9 +50,9 @@ public class Chunk implements IChunkAccess { @@ -79,7 +79,7 @@ index 2efb870dd6..6c766f2bf7 100644 private int y; private long z; private int A; -@@ -1021,11 +1021,11 @@ public class Chunk implements IChunkAccess { +@@ -1028,11 +1028,11 @@ public class Chunk implements IChunkAccess { if (this.v && this.world.getTime() != this.lastSaved || this.x) { return true; } @@ -96,7 +96,7 @@ index 2efb870dd6..6c766f2bf7 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 7417660e4d..7a972f4187 100644 +index 7417660e4..7a972f418 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -241,7 +241,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -109,7 +109,7 @@ index 7417660e4d..7a972f4187 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 96d7be49d8..2c4fc9f3e6 100644 +index 96d7be49d..2c4fc9f3e 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -37,6 +37,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -121,7 +121,7 @@ index 96d7be49d8..2c4fc9f3e6 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 25946d2d79..ee13260af7 100644 +index 25946d2d7..ee13260af 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -147,6 +147,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -168,7 +168,7 @@ index 25946d2d79..ee13260af7 100644 this.methodProfiler.a("snooper"); if (getSnooperEnabled() && !this.i.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 02dbb8c6c3..73d72ef7e3 100644 +index 02dbb8c6c..73d72ef7e 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,7 +207,7 @@ index 02dbb8c6c3..73d72ef7e3 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 4be3a6ae94..59b5a04581 100644 +index 4be3a6ae9..59b5a0458 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -872,8 +872,9 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0141-Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/0141-Option-to-remove-corrupt-tile-entities.patch index 8c21ccf286..4e7c93d94c 100644 --- a/Spigot-Server-Patches/0141-Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/0141-Option-to-remove-corrupt-tile-entities.patch @@ -1,11 +1,11 @@ -From 562484f0d056b6dc66bb41aff08825166baaf62e Mon Sep 17 00:00:00 2001 +From 4f4d6ef8142abef5a025ef5f24c1568518ca72e7 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 5 Oct 2016 16:27:36 -0500 Subject: [PATCH] Option to remove corrupt tile entities diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 78a3188274..79260172d9 100644 +index 78a318827..79260172d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -318,4 +318,9 @@ public class PaperWorldConfig { @@ -19,10 +19,10 @@ index 78a3188274..79260172d9 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6c766f2bf7..fa549cc372 100644 +index 8d1264879..6bbb737df 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -826,6 +826,12 @@ public class Chunk implements IChunkAccess { +@@ -833,6 +833,12 @@ public class Chunk implements IChunkAccess { "Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16)); e.printStackTrace(); ServerInternalException.reportInternalException(e); @@ -35,7 +35,7 @@ index 6c766f2bf7..fa549cc372 100644 // Paper end // CraftBukkit end } -@@ -835,6 +841,7 @@ public class Chunk implements IChunkAccess { +@@ -842,6 +848,7 @@ public class Chunk implements IChunkAccess { this.h.put(new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z")), nbttagcompound); } diff --git a/Spigot-Server-Patches/0195-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0195-Implement-ensureServerConversions-API.patch index 9fe6b5c76c..288335404d 100644 --- a/Spigot-Server-Patches/0195-Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/0195-Implement-ensureServerConversions-API.patch @@ -1,4 +1,4 @@ -From 9eec798ed47a25bd4d1975b924ebe06a5a6d873a Mon Sep 17 00:00:00 2001 +From 9f5de8050e5b90630710b446ab20e501afadc369 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 May 2016 22:43:12 -0400 Subject: [PATCH] Implement ensureServerConversions API @@ -7,10 +7,10 @@ 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 6998fddc5a..f7e11412a5 100644 +index 5fc0283b2..be5f922cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -289,4 +289,10 @@ public final class CraftItemFactory implements ItemFactory { +@@ -295,4 +295,10 @@ public final class CraftItemFactory implements ItemFactory { public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { return ((CraftMetaItem) meta).updateMaterial(material); } diff --git a/Spigot-Server-Patches/0196-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0196-Implement-getI18NDisplayName.patch index a3e48f8a35..e957342671 100644 --- a/Spigot-Server-Patches/0196-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0196-Implement-getI18NDisplayName.patch @@ -1,4 +1,4 @@ -From 78dfcf390705aa37a32ced73608183c4e3b4c51a Mon Sep 17 00:00:00 2001 +From 792f97956c253f4eae704aa180c5eac621b3a9b0 Mon Sep 17 00:00:00 2001 From: Aikar 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 4361b2cee5..f81887c661 100644 +index 4361b2cee..f81887c66 100644 --- a/src/main/java/net/minecraft/server/LocaleLanguage.java +++ b/src/main/java/net/minecraft/server/LocaleLanguage.java @@ -44,10 +44,12 @@ public class LocaleLanguage { @@ -25,10 +25,10 @@ index 4361b2cee5..f81887c661 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 f7e11412a5..3dbe9d81ea 100644 +index be5f922cb..caaed7cf0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -294,5 +294,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -300,5 +300,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/Spigot-Server-Patches/0233-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0233-Add-ArmorStand-Item-Meta.patch index fed8fd1e2c..c5e3facf39 100644 --- a/Spigot-Server-Patches/0233-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0233-Add-ArmorStand-Item-Meta.patch @@ -1,4 +1,4 @@ -From ca55a9c7f338b7af991f01fc6be66f21adedf9a6 Mon Sep 17 00:00:00 2001 +From b967d150c450a863735c634e3c5a7836e5d50772 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 27 Jan 2018 17:04:14 -0500 Subject: [PATCH] Add ArmorStand Item Meta @@ -13,10 +13,10 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 3dbe9d81ea..22b9674da3 100644 +index caaed7cf0..2672b004d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -185,6 +185,8 @@ public final class CraftItemFactory implements ItemFactory { +@@ -191,6 +191,8 @@ public final class CraftItemFactory implements ItemFactory { return meta instanceof CraftMetaSpawnEgg ? meta : new CraftMetaSpawnEgg(meta); case KNOWLEDGE_BOOK: return meta instanceof CraftMetaKnowledgeBook ? meta : new CraftMetaKnowledgeBook(meta); @@ -26,10 +26,10 @@ index 3dbe9d81ea..22b9674da3 100644 case CHEST: case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 69425e838f..bdd4bf5151 100644 +index 2733cda40..e7daa9507 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -397,6 +397,8 @@ public final class CraftItemStack extends ItemStack { +@@ -403,6 +403,8 @@ public final class CraftItemStack extends ItemStack { return new CraftMetaSpawnEgg(item.getTag()); case KNOWLEDGE_BOOK: return new CraftMetaKnowledgeBook(item.getTag()); @@ -40,7 +40,7 @@ index 69425e838f..bdd4bf5151 100644 case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java new file mode 100644 -index 0000000000..0e8acf12e4 +index 000000000..0e8acf12e --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -0,0 +1,309 @@ @@ -354,7 +354,7 @@ index 0000000000..0e8acf12e4 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 3fd2088039..360e1fd54c 100644 +index 3fd208803..360e1fd54 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -136,6 +136,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @@ -383,7 +383,7 @@ index 3fd2088039..360e1fd54c 100644 } return HANDLED_TAGS; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index 00f89f2296..ef9d40b8a0 100644 +index 00f89f229..ef9d40b8a 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -6,6 +6,7 @@ import static org.hamcrest.Matchers.*; diff --git a/Spigot-Server-Patches/0284-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0284-InventoryCloseEvent-Reason-API.patch index 1ff244df67..e56f1b785a 100644 --- a/Spigot-Server-Patches/0284-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0284-InventoryCloseEvent-Reason-API.patch @@ -1,4 +1,4 @@ -From 6d03d929461139332ef62d052a6daa7bc7c7eee2 Mon Sep 17 00:00:00 2001 +From 90654cfcc3c8c6b4d80c09dac65e13f583b50e63 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 3 Jul 2018 21:56:23 -0400 Subject: [PATCH] InventoryCloseEvent Reason API @@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index fa549cc372..5599025d66 100644 +index 6bbb737df..614fce444 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -893,7 +893,7 @@ public class Chunk implements IChunkAccess { +@@ -900,7 +900,7 @@ public class Chunk implements IChunkAccess { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -19,7 +19,7 @@ index fa549cc372..5599025d66 100644 } } } -@@ -918,7 +918,7 @@ public class Chunk implements IChunkAccess { +@@ -925,7 +925,7 @@ public class Chunk implements IChunkAccess { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -29,7 +29,7 @@ index fa549cc372..5599025d66 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 6ae76477c0..f2bce333d9 100644 +index 6ae76477c..f2bce333d 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -153,7 +153,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -56,7 +56,7 @@ index 6ae76477c0..f2bce333d9 100644 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 49470bf5f0..781c8abc39 100644 +index 49470bf5f..781c8abc3 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -355,7 +355,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -110,7 +110,7 @@ index 49470bf5f0..781c8abc39 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a7bdb9737b..4fc5e4b7b3 100644 +index a7bdb9737..4fc5e4b7b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -2051,7 +2051,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -123,7 +123,7 @@ index a7bdb9737b..4fc5e4b7b3 100644 this.player.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 304cae655d..6d511b6230 100644 +index 304cae655..6d511b623 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -422,7 +422,7 @@ public abstract class PlayerList { @@ -136,7 +136,7 @@ index 304cae655d..6d511b6230 100644 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 92fe80316f..70a4dbe26b 100644 +index 92fe80316..70a4dbe26 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -412,8 +412,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -155,7 +155,7 @@ index 92fe80316f..70a4dbe26b 100644 public boolean isBlocking() { return getHandle().isBlocking(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 88caea739c..b7144c5d2f 100644 +index 88caea739..b7144c5d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -727,7 +727,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -168,7 +168,7 @@ index 88caea739c..b7144c5d2f 100644 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index ea2faf9539..9fb1b75413 100644 +index ea2faf953..9fb1b7541 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -913,8 +913,19 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0285-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch b/Spigot-Server-Patches/0285-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch index acbfd29905..ec70badf06 100644 --- a/Spigot-Server-Patches/0285-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch +++ b/Spigot-Server-Patches/0285-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch @@ -1,4 +1,4 @@ -From cf4f60a3cd37583140595aeb2da25a3a2bbb73b9 Mon Sep 17 00:00:00 2001 +From 771d740dc6145e2bf73fc418477e9e8c292479a3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 03:39:51 -0400 Subject: [PATCH] Avoid Chunk Lookups for Entity/TileEntity Current Chunk @@ -10,10 +10,10 @@ to the object directly on the Entity/TileEntity object we can directly grab. Use that local value instead to reduce lookups in many hot places. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 5599025d66..37716447c2 100644 +index 614fce444..e806d13d2 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -718,6 +718,7 @@ public class Chunk implements IChunkAccess { +@@ -725,6 +725,7 @@ public class Chunk implements IChunkAccess { ((HeightMap) this.heightMap.get(heightmap_type)).a(along); } @@ -22,7 +22,7 @@ index 5599025d66..37716447c2 100644 this.a(entity, entity.af); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 32c8fb4531..27d84e3ba9 100644 +index be6d21e4c..ba1fb577a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1245,12 +1245,15 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc diff --git a/Spigot-Server-Patches/0299-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0299-Duplicate-UUID-Resolve-Option.patch index 27691a0377..d10969fa30 100644 --- a/Spigot-Server-Patches/0299-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0299-Duplicate-UUID-Resolve-Option.patch @@ -1,4 +1,4 @@ -From 6b2efbb1443f37b298c2417b94875d1dfbe894e0 Mon Sep 17 00:00:00 2001 +From b3a484e0fc3c9e8585afb8d8b9e4a7d3b8ad70e2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:27:34 -0400 Subject: [PATCH] Duplicate UUID Resolve Option @@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fb2467636a..3aa6f031f3 100644 +index fb2467636..3aa6f031f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -433,4 +433,47 @@ public class PaperWorldConfig { @@ -85,7 +85,7 @@ index fb2467636a..3aa6f031f3 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 37716447c2..4eb08553c6 100644 +index e806d13d2..3bddc5f9b 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,10 @@ @@ -107,7 +107,7 @@ index 37716447c2..4eb08553c6 100644 public final int locX; public final int locZ; private boolean l; -@@ -686,6 +692,7 @@ public class Chunk implements IChunkAccess { +@@ -693,6 +699,7 @@ public class Chunk implements IChunkAccess { if (i != this.locX || j != this.locZ) { Chunk.d.warn("Wrong location! ({}, {}) should be ({}, {}), {}", Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(this.locX), Integer.valueOf(this.locZ), entity); entity.die(); @@ -115,7 +115,7 @@ index 37716447c2..4eb08553c6 100644 } int k = MathHelper.floor(entity.locY / 16.0D); -@@ -862,6 +869,51 @@ public class Chunk implements IChunkAccess { +@@ -869,6 +876,51 @@ public class Chunk implements IChunkAccess { for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot @@ -168,7 +168,7 @@ index 37716447c2..4eb08553c6 100644 this.world.a(entityslice.stream().filter((entity) -> { return !(entity instanceof EntityHuman); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d974cb5c61..d86a23d71d 100644 +index ffd88adcf..89a83548b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2718,6 +2718,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -180,7 +180,7 @@ index d974cb5c61..d86a23d71d 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 27d84e3ba9..2ad02b0a61 100644 +index ba1fb577a..ae7e17231 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -75,7 +75,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -193,7 +193,7 @@ index 27d84e3ba9..2ad02b0a61 100644 public final List tileEntityListTick = Lists.newArrayList(); private final List c = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 8e8cf659f8..6579387623 100644 +index 8e8cf659f..657938762 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -41,7 +41,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0306-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch b/Spigot-Server-Patches/0306-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch index cd7b14ea7e..328641e111 100644 --- a/Spigot-Server-Patches/0306-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch +++ b/Spigot-Server-Patches/0306-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch @@ -1,4 +1,4 @@ -From 609b90d3e67f3dd186e4cd7fd802a7b53d5da412 Mon Sep 17 00:00:00 2001 +From f73216e0e600cedf96b49f3fc04cbb5e43a2f412 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:18:31 -0400 Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it @@ -6,10 +6,10 @@ Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 4eb08553c6..404b7d21c2 100644 +index 3bddc5f9b..33ce24479 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -711,6 +711,7 @@ public class Chunk implements IChunkAccess { +@@ -718,6 +718,7 @@ public class Chunk implements IChunkAccess { entity.ag = this.locZ; this.entitySlices[k].add(entity); // Paper start @@ -17,7 +17,7 @@ index 4eb08553c6..404b7d21c2 100644 if (entity instanceof EntityItem) { itemCounts[k]++; } else if (entity instanceof IInventory) { -@@ -742,6 +743,7 @@ public class Chunk implements IChunkAccess { +@@ -749,6 +750,7 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } diff --git a/Spigot-Server-Patches/0307-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0307-Add-some-Debug-to-Chunk-Entity-slices.patch index 99d396cd5e..38eac3179a 100644 --- a/Spigot-Server-Patches/0307-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0307-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -1,4 +1,4 @@ -From bb0df40633fb71648d08dc23220231ef2eec19cd Mon Sep 17 00:00:00 2001 +From c6e17840efbbe99481a355f085e8044eb0a2fb52 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:44:23 -0400 Subject: [PATCH] Add some Debug to Chunk Entity slices @@ -9,10 +9,10 @@ This should hopefully avoid duplicate entities ever being created if the entity was to end up in 2 different chunk slices diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 404b7d21c2..7b6b8f4824 100644 +index 33ce24479..e8af8f419 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -709,8 +709,34 @@ public class Chunk implements IChunkAccess { +@@ -716,8 +716,34 @@ public class Chunk implements IChunkAccess { entity.ae = this.locX; entity.af = k; entity.ag = this.locZ; @@ -48,7 +48,7 @@ index 404b7d21c2..7b6b8f4824 100644 this.markDirty(); if (entity instanceof EntityItem) { itemCounts[k]++; -@@ -740,9 +766,13 @@ public class Chunk implements IChunkAccess { +@@ -747,9 +773,13 @@ public class Chunk implements IChunkAccess { i = this.entitySlices.length - 1; } // Paper start @@ -64,7 +64,7 @@ index 404b7d21c2..7b6b8f4824 100644 this.markDirty(); if (entity instanceof EntityItem) { itemCounts[i]--; -@@ -979,6 +1009,7 @@ public class Chunk implements IChunkAccess { +@@ -986,6 +1016,7 @@ public class Chunk implements IChunkAccess { } // Spigot End entity.setCurrentChunk(null); // Paper @@ -73,7 +73,7 @@ index 404b7d21c2..7b6b8f4824 100644 // Do not pass along players, as doing so can get them stuck outside of time. // (which for example disables inventory icon updates and prevents block breaking) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4a2faa314e..f5d5f38232 100644 +index 9339b3255..f2eb479ad 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -64,6 +64,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0312-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0312-Don-t-call-getItemMeta-on-hasItemMeta.patch index edc17e4721..26f34c15f6 100644 --- a/Spigot-Server-Patches/0312-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/Spigot-Server-Patches/0312-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -1,4 +1,4 @@ -From 0ed60fd7f609781ed5996993d982914ee61eff27 Mon Sep 17 00:00:00 2001 +From 945bdf171a8349bce6b68345835351323d8e35a5 Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Thu, 26 Jul 2018 14:10:23 +0200 Subject: [PATCH] Don't call getItemMeta on hasItemMeta @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 911463f5b2..974321df82 100644 +index d6e6b9bed..3966769c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -519,7 +519,7 @@ public final class CraftItemStack extends ItemStack { +@@ -525,7 +525,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { @@ -24,7 +24,7 @@ index 911463f5b2..974321df82 100644 static boolean hasItemMeta(net.minecraft.server.ItemStack item) { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index ef9d40b8a0..a161993876 100644 +index ef9d40b8a..a16199387 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -5,6 +5,7 @@ import static org.hamcrest.Matchers.*; diff --git a/Spigot-Server-Patches/0326-Entity-add-to-world-fixes.patch b/Spigot-Server-Patches/0326-Entity-add-to-world-fixes.patch index 45c50c7e61..391322758c 100644 --- a/Spigot-Server-Patches/0326-Entity-add-to-world-fixes.patch +++ b/Spigot-Server-Patches/0326-Entity-add-to-world-fixes.patch @@ -1,4 +1,4 @@ -From 9dc4ad8cef4b26e7d210716d9c96fb367193b6b6 Mon Sep 17 00:00:00 2001 +From e21552089e29786bf85bcfd9fdf5d1d61f614af1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Aug 2018 22:47:46 -0400 Subject: [PATCH] Entity add to world fixes @@ -14,10 +14,10 @@ Fix this by differing entity add to world for all entities at the same time the original entity is dead, overwrite it as the logic does for unloaod queued entities. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 7b6b8f4824..eed37198b0 100644 +index e8af8f419..56c378341 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -898,6 +898,7 @@ public class Chunk implements IChunkAccess { +@@ -905,6 +905,7 @@ public class Chunk implements IChunkAccess { this.world.a(this.tileEntities.values()); List[] aentityslice = this.entitySlices; // Spigot int i = aentityslice.length; @@ -25,7 +25,7 @@ index 7b6b8f4824..eed37198b0 100644 for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot -@@ -945,12 +946,11 @@ public class Chunk implements IChunkAccess { +@@ -952,12 +953,11 @@ public class Chunk implements IChunkAccess { thisChunk.put(entity.uniqueID, entity); } } @@ -42,7 +42,7 @@ index 7b6b8f4824..eed37198b0 100644 // CraftBukkit start org.bukkit.Server server = this.world.getServer(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 26007862ab..4ea31bc201 100644 +index b2b182c58..f99cdf100 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1089,6 +1089,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -68,7 +68,7 @@ index 26007862ab..4ea31bc201 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 6579387623..788ab40d0e 100644 +index 657938762..788ab40d0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -987,7 +987,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0347-Anti-Xray.patch b/Spigot-Server-Patches/0347-Anti-Xray.patch index 8f981cd81a..a69e1e3466 100644 --- a/Spigot-Server-Patches/0347-Anti-Xray.patch +++ b/Spigot-Server-Patches/0347-Anti-Xray.patch @@ -1,11 +1,11 @@ -From 349718eb80d6bb44b5bc6f411058af66381bd318 Mon Sep 17 00:00:00 2001 +From 2f0929b908a4efcd1d3315902bb2b90bfbff13f9 Mon Sep 17 00:00:00 2001 From: stonar96 Date: Mon, 20 Aug 2018 03:03:58 +0200 Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 19f4c61cdc..3acb1ff9fd 100644 +index 19f4c61cd..3acb1ff9f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,10 @@ @@ -49,7 +49,7 @@ index 19f4c61cdc..3acb1ff9fd 100644 } diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java new file mode 100644 -index 0000000000..1ba8477bf9 +index 000000000..1ba8477bf --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java @@ -0,0 +1,45 @@ @@ -100,7 +100,7 @@ index 0000000000..1ba8477bf9 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java new file mode 100644 -index 0000000000..65d3e88c3b +index 000000000..65d3e88c3 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java @@ -0,0 +1,670 @@ @@ -776,7 +776,7 @@ index 0000000000..65d3e88c3b +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java new file mode 100644 -index 0000000000..41618994b4 +index 000000000..41618994b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java @@ -0,0 +1,81 @@ @@ -863,7 +863,7 @@ index 0000000000..41618994b4 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java new file mode 100644 -index 0000000000..e255a45fa3 +index 000000000..e255a45fa --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java @@ -0,0 +1,29 @@ @@ -898,7 +898,7 @@ index 0000000000..e255a45fa3 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java new file mode 100644 -index 0000000000..cc586827aa +index 000000000..cc586827a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java @@ -0,0 +1,56 @@ @@ -960,7 +960,7 @@ index 0000000000..cc586827aa +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java new file mode 100644 -index 0000000000..37093419cf +index 000000000..37093419c --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java @@ -0,0 +1,84 @@ @@ -1049,10 +1049,10 @@ index 0000000000..37093419cf + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index eed37198b0..b88d232c85 100644 +index 56c378341..f3d9211ba 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -534,7 +534,7 @@ public class Chunk implements IChunkAccess { +@@ -541,7 +541,7 @@ public class Chunk implements IChunkAccess { return null; } @@ -1061,7 +1061,7 @@ index eed37198b0..b88d232c85 100644 this.sections[j >> 4] = chunksection; flag1 = j >= l; } -@@ -634,7 +634,7 @@ public class Chunk implements IChunkAccess { +@@ -641,7 +641,7 @@ public class Chunk implements IChunkAccess { return; } @@ -1071,7 +1071,7 @@ index eed37198b0..b88d232c85 100644 this.initLighting(); } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 68a3169c31..6a33bbb231 100644 +index 867b0db77..06968974c 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -843,7 +843,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { @@ -1093,7 +1093,7 @@ index 68a3169c31..6a33bbb231 100644 chunksection.getBlocks().a(nbttagcompound, "Palette", "BlockStates"); chunksection.a(new NibbleArray(nbttagcompound.getByteArray("BlockLight"))); diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index 233cbb6d60..8c116b74c5 100644 +index 233cbb6d6..8c116b74c 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java @@ -13,9 +13,15 @@ public class ChunkSection { @@ -1114,7 +1114,7 @@ index 233cbb6d60..8c116b74c5 100644 if (flag) { this.skyLight = new NibbleArray(); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java -index 99e752ddd6..c2dd61248d 100644 +index 95eb1a84a..34019bd1b 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java @@ -42,7 +42,7 @@ public class ChunkTaskScheduler extends Scheduler> { @@ -1334,7 +1334,7 @@ index f8facddb40..b2afec5e4b 100644 public void a() { this.o(); diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 6321010246..d0ff96812e 100644 +index 632101024..d0ff96812 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -1,5 +1,6 @@ @@ -1423,7 +1423,7 @@ index 6321010246..d0ff96812e 100644 if (flag) { packetdataserializer.writeBytes(chunksection.getSkyLightArray().asBytes()); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index f8d8a44a88..e7d465fb8a 100644 +index f8d8a44a8..e7d465fb8 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -108,6 +108,8 @@ public class PlayerChunk { @@ -1454,7 +1454,7 @@ index f8d8a44a88..e7d465fb8a 100644 } else { this.a((Packet) (new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk))); diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index cae24961fd..a9690fb1c3 100644 +index cae24961f..a9690fb1c 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -206,6 +206,8 @@ public class PlayerInteractManager { @@ -1467,7 +1467,7 @@ index cae24961fd..a9690fb1c3 100644 public void a(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index 541435d3e5..0b4f0d2414 100644 +index 541435d3e..0b4f0d241 100644 --- a/src/main/java/net/minecraft/server/ProtoChunk.java +++ b/src/main/java/net/minecraft/server/ProtoChunk.java @@ -44,12 +44,24 @@ public class ProtoChunk implements IChunkAccess { @@ -1533,7 +1533,7 @@ index 541435d3e5..0b4f0d2414 100644 if (enumskyblock == EnumSkyBlock.SKY) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2a7abae942..17b5ef00f5 100644 +index 20bead54b..49809372d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,6 +1,8 @@ @@ -1564,13 +1564,13 @@ index 2a7abae942..17b5ef00f5 100644 @@ -404,6 +408,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc // CraftBukkit end - IBlockData iblockdata1 = chunk.a(blockposition, iblockdata, (i & 64) != 0); + IBlockData iblockdata1 = chunk.a(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag + this.chunkPacketBlockController.onBlockChange(this, blockposition, iblockdata, iblockdata1, i); // Paper - Anti-Xray if (iblockdata1 == null) { // CraftBukkit start - remove blockstate if failed diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -index c26f0ed16b..f6915d32ab 100644 +index c26f0ed16..f6915d32a 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java @@ -17,9 +17,11 @@ import org.bukkit.material.MaterialData; diff --git a/work/CraftBukkit b/work/CraftBukkit index f598574711..4228a56c0d 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit f5985747113f69decf936726bd609e55611ab465 +Subproject commit 4228a56c0dcb17c9c1333619d2faa21f6c02bfc1