From 7e6db27085fd9409a3865e14e202c8e4cd1dc81d Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 25 Apr 2019 07:53:51 +0100 Subject: [PATCH] Aim towards real 1.14 --- Spigot-API-Patches/0001-POM-changes.patch | 6 +- Spigot-Server-Patches/0001-POM-Changes.patch | 10 +- .../0002-Paper-config-files.patch | 14 +-- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 17 +-- Spigot-Server-Patches/0004-MC-Utils.patch | 34 +++--- ...-MinecraftKey-Information-to-Objects.patch | 14 +-- ...to-current-Chunk-for-Entity-and-Bloc.patch | 12 +- Spigot-Server-Patches/0009-Timings-v2.patch | 58 ++++----- ...ck-and-tnt-entities-at-the-specified.patch | 6 +- ...ient-crashes-server-lists-and-Mojang.patch | 12 +- ...021-Further-improve-server-tick-loop.patch | 8 +- .../0023-Entity-Origin-API.patch | 12 +- ...nfigurable-top-of-nether-void-damage.patch | 10 +- ...=> 0031-Disable-explosion-knockback.patch} | 29 +++-- ...under.patch => 0032-Disable-thunder.patch} | 24 ++-- ....patch => 0033-Disable-ice-and-snow.patch} | 24 ++-- ...-Configurable-mob-spawner-tick-rate.patch} | 18 +-- ...sition-the-first-time-an-entity-is-s.patch | 111 ++++++++++++++++++ ...patch => 0036-Add-BeaconEffectEvent.patch} | 17 ++- ...igurable-container-update-tick-rate.patch} | 18 +-- ...0038-Use-UserCache-for-player-heads.patch} | 16 +-- .../0039-Disable-spigot-tick-limiters.patch | 24 ++++ ...=> 0040-Add-PlayerInitialSpawnEvent.patch} | 10 +- ...rable-Disabling-Cat-Chest-Detection.patch} | 16 +-- .../0041-Disable-spigot-tick-limiters.patch | 39 ------ ...2-Ensure-commands-are-not-ran-async.patch} | 26 ++-- ...hunks-are-slime-spawn-chunks-toggle.patch} | 18 +-- ....patch => 0044-Optimize-Pathfinding.patch} | 10 +- ...sition-the-first-time-an-entity-is-s.patch | 0 .../0032-Add-player-view-distance-API.patch | 0 scripts/remap.sh | 2 +- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 35 files changed, 351 insertions(+), 272 deletions(-) rename Spigot-Server-Patches/{0033-Disable-explosion-knockback.patch => 0031-Disable-explosion-knockback.patch} (76%) rename Spigot-Server-Patches/{0034-Disable-thunder.patch => 0032-Disable-thunder.patch} (55%) rename Spigot-Server-Patches/{0035-Disable-ice-and-snow.patch => 0033-Disable-ice-and-snow.patch} (53%) rename Spigot-Server-Patches/{0036-Configurable-mob-spawner-tick-rate.patch => 0034-Configurable-mob-spawner-tick-rate.patch} (79%) create mode 100644 Spigot-Server-Patches/0035-Send-absolute-position-the-first-time-an-entity-is-s.patch rename Spigot-Server-Patches/{0038-Add-BeaconEffectEvent.patch => 0036-Add-BeaconEffectEvent.patch} (79%) rename Spigot-Server-Patches/{0039-Configurable-container-update-tick-rate.patch => 0037-Configurable-container-update-tick-rate.patch} (79%) rename Spigot-Server-Patches/{0040-Use-UserCache-for-player-heads.patch => 0038-Use-UserCache-for-player-heads.patch} (63%) create mode 100644 Spigot-Server-Patches/0039-Disable-spigot-tick-limiters.patch rename Spigot-Server-Patches/{0042-Add-PlayerInitialSpawnEvent.patch => 0040-Add-PlayerInitialSpawnEvent.patch} (84%) rename Spigot-Server-Patches/{0043-Configurable-Disabling-Cat-Chest-Detection.patch => 0041-Configurable-Disabling-Cat-Chest-Detection.patch} (61%) delete mode 100644 Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch rename Spigot-Server-Patches/{0044-Ensure-commands-are-not-ran-async.patch => 0042-Ensure-commands-are-not-ran-async.patch} (89%) rename Spigot-Server-Patches/{0045-All-chunks-are-slime-spawn-chunks-toggle.patch => 0043-All-chunks-are-slime-spawn-chunks-toggle.patch} (61%) rename Spigot-Server-Patches/{0046-Optimize-Pathfinding.patch => 0044-Optimize-Pathfinding.patch} (85%) rename {Spigot-Server-Patches => removed}/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch (100%) rename {Spigot-Server-Patches => removed/1.14}/0032-Add-player-view-distance-API.patch (100%) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index c94df844eb..a7d98de86e 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -1,11 +1,11 @@ -From 37ba5cd5b415edd8e09513708652069efc410ddf Mon Sep 17 00:00:00 2001 +From b8ddb776d61410ee76eb2bad75c5f904ff8cce5d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 00:16:08 +0100 Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 4118252f..0a61b4d9 100644 +index 75681af7..ec6e4d14 100644 --- a/pom.xml +++ b/pom.xml @@ -3,33 +3,29 @@ @@ -22,7 +22,7 @@ index 4118252f..0a61b4d9 100644 + + com.destroystokyo.paper + paper-api - 1.14-pre5-SNAPSHOT + 1.14-R0.1-SNAPSHOT jar - Spigot-API diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index f030572812..2c4f6cf1b7 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 8b6209091a2f9f450324bb0ea704277985d61686 Mon Sep 17 00:00:00 2001 +From f754c4b64a90c21d79e2cfa1dc797acd66be8d59 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:40:33 -0600 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 3b89529f28..9d5a4ce991 100644 +index 982ac22e8e..099d7218c9 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,14 @@ @@ -16,9 +16,9 @@ index 3b89529f28..9d5a4ce991 100644 - spigot + paper jar - 1.14-pre5-SNAPSHOT + 1.14-R0.1-SNAPSHOT - Spigot -- http://www.spigotmc.org +- https://www.spigotmc.org/ + Paper + https://papermc.io @@ -27,7 +27,7 @@ index 3b89529f28..9d5a4ce991 100644 + UTF-8 unknown - 1.14-pre5 + 1.14 @@ -22,16 +21,16 @@ diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index eedae56888..b374956b5f 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -1,4 +1,4 @@ -From c94a16a6e4f1498e7bc54b2043915211a590b586 Mon Sep 17 00:00:00 2001 +From 3772a276f6566458d67baefb11a255c09b8ad02d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:02:09 -0600 Subject: [PATCH] Paper config files @@ -535,10 +535,10 @@ index e1ba833f3e..b60956218d 100644 this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals); this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 43dc487eaa..cec990f357 100644 +index bc9894f84e..0819f56a62 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -132,9 +132,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -131,9 +131,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { private static final DataWatcherObject aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); protected static final DataWatcherObject X = DataWatcher.a(Entity.class, DataWatcherRegistry.s); public boolean inChunk; @@ -552,7 +552,7 @@ index 43dc487eaa..cec990f357 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index e2a844c786..2ee4069173 100644 +index ee43aa24d2..01d9ed69c5 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils; @@ -575,7 +575,7 @@ index e2a844c786..2ee4069173 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f31f407fa1..28fa346b7f 100644 +index 84155573df..83fdea893c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -86,6 +86,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -596,7 +596,7 @@ index f31f407fa1..28fa346b7f 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 83ab4245da..93246f464b 100644 +index dcdd3b002d..9021ab34fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -751,6 +751,7 @@ public final class CraftServer implements Server { @@ -651,7 +651,7 @@ index 83ab4245da..93246f464b 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index b61c06e32a..e34abd0c1f 100644 +index ae320c2bb1..fd02ba1916 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -127,6 +127,14 @@ public class Main { diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 2a7b24930b..c2842adab0 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -1,11 +1,11 @@ -From ea2cb0f4f240fb9536382b71b44f412193744ebc Mon Sep 17 00:00:00 2001 +From 4718559989fd4efabfb66513b7755d6f262bee1b Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 19:36:20 -0400 Subject: [PATCH] MC Dev fixes diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index 8f640f0c24..2831c03a69 100644 +index 26fa6e7b64..9a839d6540 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java @@ -42,7 +42,7 @@ public abstract class BiomeBase { @@ -27,18 +27,9 @@ index 8f640f0c24..2831c03a69 100644 public List> e() { diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index dc823e88a5..3745f66de5 100644 +index f0ff70980d..dd47e9cbe4 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger; - @Immutable - public class BlockPosition extends BaseBlockPosition implements MinecraftSerializable { - -- private static final Logger b = LogManager.getLogger(); -+ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used - public static final BlockPosition ZERO = new BlockPosition(0, 0, 0); - private static final int c = 1 + MathHelper.e(MathHelper.c(30000000)); - private static final int d = BlockPosition.c; @@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali OfInt ofint = dynamic.asIntStream().spliterator(); int[] aint = new int[3]; @@ -149,7 +140,7 @@ index 4cb78c6a3f..e15d286710 100644 this.f = 0; diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index 096277de1c..d484e626d2 100644 +index b251a1d7d9..3c5b3fe101 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -37,7 +37,7 @@ public class WorldPersistentData { diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 8cb5d26664..7ed6f763da 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -1,4 +1,4 @@ -From 134acc6c6f13c7533bbf99adc73fc208aec957e9 Mon Sep 17 00:00:00 2001 +From 377267c02ec794832c8ccf0ba2f3608a5b9a9207 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 Subject: [PATCH] MC Utils @@ -20,7 +20,7 @@ index 2f2b103641..b1900ba364 100644 void b(UUID uuid); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 3745f66de5..01061f219f 100644 +index dd47e9cbe4..c927d524a8 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -120,6 +120,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -57,13 +57,13 @@ index 3745f66de5..01061f219f 100644 return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2d40f03b1a..0f031e862b 100644 +index fc54888fa0..8f789c91f7 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -32,7 +32,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent; public class Chunk implements IChunkAccess { - private static final Logger b = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); - public static final ChunkSection a = null; + public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER private final ChunkSection[] sections; @@ -189,7 +189,7 @@ index 4720632641..afa03ce6f2 100644 // CraftBukkit start - fire event setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3e16632e24..d31c1c989c 100644 +index c1bb7a88ae..f86e6a4c51 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -126,6 +126,7 @@ public abstract class EntityLiving extends Entity { @@ -213,7 +213,7 @@ index 6ab4c78b35..76142d5dc2 100644 super(entitytypes, world); this.f = 5; diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 2ee4069173..0f2604a3d5 100644 +index 01d9ed69c5..65ad9243f8 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -5,6 +5,7 @@ import com.mojang.datafixers.types.Type; @@ -225,13 +225,13 @@ index 2ee4069173..0f2604a3d5 100644 import java.util.function.Function; import java.util.stream.Stream; diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index cc9851edbc..80a2da51da 100644 +index e975265a28..aa6a58dd88 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent; public final class ItemStack { - private static final Logger c = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); - public static final ItemStack a = new ItemStack((Item) null); + public static final ItemStack a = new ItemStack((Item) null);public static final ItemStack NULL_ITEM = a; // Paper - OBFHELPER public static final DecimalFormat b = F(); @@ -249,7 +249,7 @@ index cc9851edbc..80a2da51da 100644 @Deprecated private Item item; private NBTTagCompound tag; -@@ -588,6 +597,17 @@ public final class ItemStack { +@@ -591,6 +600,17 @@ public final class ItemStack { return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList(); } @@ -267,7 +267,7 @@ index cc9851edbc..80a2da51da 100644 public void setTag(@Nullable NBTTagCompound nbttagcompound) { this.tag = nbttagcompound; } -@@ -672,6 +692,7 @@ public final class ItemStack { +@@ -675,6 +695,7 @@ public final class ItemStack { return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false; } @@ -275,7 +275,7 @@ index cc9851edbc..80a2da51da 100644 public void a(String s, NBTBase nbtbase) { this.getOrCreateTag().set(s, nbtbase); } -@@ -745,6 +766,7 @@ public final class ItemStack { +@@ -748,6 +769,7 @@ public final class ItemStack { // CraftBukkit start @Deprecated public void setItem(Item item) { @@ -606,12 +606,12 @@ index 0000000000..c97e116aaf + } +} diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index dfa33f0336..cc25ea7401 100644 +index e16a579b55..3f6d2676e7 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -23,7 +23,7 @@ public class NBTTagCompound implements NBTBase { - private static final Logger f = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+"); - private final Map map = Maps.newHashMap(); + public final Map map = Maps.newHashMap(); // Paper @@ -635,7 +635,7 @@ index dfa33f0336..cc25ea7401 100644 return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 94e6a3db4c..fca496a00a 100644 +index fe6854d0e4..2db7229e91 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -43,7 +43,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -688,13 +688,13 @@ index db2fe836c2..0d67676f7d 100644 for (int j = 1; j < 5; ++j) { if ((i & -1 << j * 7) == 0) { diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index d54177bdcc..2aa805eef1 100644 +index 90223deae3..63c4dbd327 100644 --- a/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java @@ -42,6 +42,7 @@ public class PacketEncoder extends MessageToByteEncoder> { packet.b(packetdataserializer); } catch (Throwable throwable) { - PacketEncoder.a.error(throwable); + PacketEncoder.LOGGER.error(throwable); + throwable.printStackTrace(); // Paper - WHAT WAS IT? WHO DID THIS TO YOU? WHAT DID YOU SEE? if (packet.a()) { throw new SkipEncodeException(throwable); @@ -784,7 +784,7 @@ index 4efcb8b595..60948afa4e 100644 return this.b.size(); } diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index ea90a01830..59e7d907ef 100644 +index 41a5d1dc29..7060402126 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java @@ -45,8 +45,8 @@ public class SystemUtils { diff --git a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch index 99cc95d2e1..4cb2a4e6e2 100644 --- a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch @@ -1,4 +1,4 @@ -From 46fe3ad03c1a6e865b265c93a1d00dc98c5e7be4 Mon Sep 17 00:00:00 2001 +From aeb013fd8fa88372a085b1e30e1c081c87db0298 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 4 Jul 2018 01:40:13 -0400 Subject: [PATCH] Add MinecraftKey Information to Objects @@ -19,10 +19,10 @@ index 2e79b0b5ff..f38179e983 100644 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index cec990f357..d636965800 100644 +index 0819f56a62..89e54089c2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -47,7 +47,7 @@ import org.bukkit.event.entity.EntityPortalEvent; +@@ -46,7 +46,7 @@ import org.bukkit.event.entity.EntityPortalEvent; import org.bukkit.plugin.PluginManager; // CraftBukkit end @@ -31,7 +31,7 @@ index cec990f357..d636965800 100644 // CraftBukkit start private static final int CURRENT_LEVEL = 2; -@@ -1664,12 +1664,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -1663,12 +1663,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { return true; } @@ -65,7 +65,7 @@ index cec990f357..d636965800 100644 protected abstract void a(NBTTagCompound nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 0f2604a3d5..fae259ac70 100644 +index 65ad9243f8..9aed0d6b82 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -238,6 +238,7 @@ public class EntityTypes { @@ -92,7 +92,7 @@ index 0000000000..743142d030 + } +} diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index df46dbcacc..319be67501 100644 +index 888c9605c8..94fbf228d2 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger; @@ -103,7 +103,7 @@ index df46dbcacc..319be67501 100644 +public abstract class TileEntity implements KeyedObject { // Paper public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot - private static final Logger a = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); - private final TileEntityTypes b; + private final TileEntityTypes b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER @Nullable 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 2db09b3199..3bbf3422f2 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 117ce0bb3764d81b944e8a9455f9da22c01d732c Mon Sep 17 00:00:00 2001 +From 48e532b68eaeb75a39035b463d664c258fe0b005 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 0f031e862b..7fa141f52c 100644 +index 8f789c91f7..15be6bb33f 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -36,7 +36,7 @@ public class Chunk implements IChunkAccess { @@ -93,10 +93,10 @@ index 0f031e862b..7fa141f52c 100644 @Override diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d636965800..e2b37ed1a0 100644 +index 89e54089c2..53f8e6811a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -131,7 +131,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -130,7 +130,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke private static final DataWatcherObject aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i); private static final DataWatcherObject aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i); protected static final DataWatcherObject X = DataWatcher.a(Entity.class, DataWatcherRegistry.s); @@ -105,7 +105,7 @@ index d636965800..e2b37ed1a0 100644 public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER -@@ -1665,6 +1665,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1664,6 +1664,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper start @@ -146,7 +146,7 @@ index d636965800..e2b37ed1a0 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 319be67501..12f359a6ba 100644 +index 94fbf228d2..42303f5b39 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -42,6 +42,15 @@ public abstract class TileEntity implements KeyedObject { // Paper diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 0d7030914b..65de4031d9 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From acaccffc57a71f1aa4ecc97947903de8ad5b238b Mon Sep 17 00:00:00 2001 +From fbc132e334e42bb567b29510dc0827ab0f16521d Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -299,7 +299,7 @@ index 5518ec1e54..7691409f6c 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index c6d536226b..15dac7b94e 100644 +index 8b91e27c66..fd23d45346 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -24,6 +24,15 @@ public class Block implements IMaterial { @@ -319,7 +319,7 @@ index c6d536226b..15dac7b94e 100644 private final float frictionFactor; protected final BlockStateList blockStateList; diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2b29fe837b..89bce93c61 100644 +index 9cce929c3e..1a2cc0258a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -89,6 +89,29 @@ public class Chunk implements IChunkAccess { @@ -369,7 +369,7 @@ index 2b29fe837b..89bce93c61 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 416f8e080c..5ee9824ba2 100644 +index 845ad7427b..4f0fbe4a0d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -186,7 +186,9 @@ public class ChunkProviderServer extends IChunkProvider { @@ -406,7 +406,7 @@ index 416f8e080c..5ee9824ba2 100644 @Override diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index c91347c644..8ac0e67e35 100644 +index d084d24a01..0fed039f34 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -1,5 +1,6 @@ @@ -480,7 +480,7 @@ index 46e7737ca3..a3ef943066 100644 return this.b; } diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java -index ed4b189d7e..2d2a4c9825 100644 +index 42e01136d9..b7c1d7671e 100644 --- a/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java @@ -100,7 +100,7 @@ public class CustomFunctionData implements IResourcePackListener { @@ -546,10 +546,10 @@ index b60956218d..19e2df3098 100644 return waitable.get(); } catch (java.util.concurrent.ExecutionException e) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e2b37ed1a0..2d07bfa879 100644 +index 53f8e6811a..114a851f0f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -30,7 +30,8 @@ import org.bukkit.command.CommandSender; +@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Hanging; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Vehicle; @@ -559,7 +559,7 @@ index e2b37ed1a0..2d07bfa879 100644 import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; -@@ -159,7 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -158,7 +159,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public boolean valid; public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 @@ -568,7 +568,7 @@ index e2b37ed1a0..2d07bfa879 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -475,7 +476,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -474,7 +475,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public void move(EnumMoveType enummovetype, Vec3D vec3d) { @@ -576,7 +576,7 @@ index e2b37ed1a0..2d07bfa879 100644 if (this.noclip) { this.a(this.getBoundingBox().b(vec3d)); this.recalcPosition(); -@@ -640,7 +640,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -639,7 +639,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.getMethodProfiler().exit(); } @@ -585,7 +585,7 @@ index e2b37ed1a0..2d07bfa879 100644 protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d31c1c989c..d89dbf1745 100644 +index f86e6a4c51..85567a7072 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -661,7 +661,7 @@ index d31c1c989c..d89dbf1745 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e35d4808bf..7b102e155d 100644 +index 741105fb6c..277fa64e24 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1,5 +1,7 @@ @@ -789,7 +789,7 @@ index e35d4808bf..7b102e155d 100644 this.methodProfiler.exit(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 95ba254479..5d13e7ad36 100644 +index 4d8491c760..c08a1a6e51 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1,6 +1,8 @@ @@ -850,7 +850,7 @@ index 95ba254479..5d13e7ad36 100644 // CraftBukkit start if (event == null) { this.saveChunk(ichunkaccess); -@@ -418,7 +455,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -424,7 +461,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }); return completablefuture.thenComposeAsync((either) -> { @@ -859,7 +859,7 @@ index 95ba254479..5d13e7ad36 100644 try { CompletableFuture> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> { return this.b(playerchunk); -@@ -898,6 +935,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -904,6 +941,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunkMap.EntityTracker playerchunkmap_entitytracker; ObjectIterator objectiterator; @@ -867,7 +867,7 @@ index 95ba254479..5d13e7ad36 100644 for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) { playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); -@@ -915,9 +953,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -921,9 +959,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { playerchunkmap_entitytracker.e = sectionposition1; } } @@ -961,7 +961,7 @@ index c8d2c81c58..aefc3eb19c 100644 throw CancelledPacketHandleException.INSTANCE; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 993306e8e7..e6c03908cb 100644 +index b0c6b1385d..7939208a5a 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -971,7 +971,7 @@ index 993306e8e7..e6c03908cb 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -888,10 +889,11 @@ public abstract class PlayerList { +@@ -892,10 +893,11 @@ public abstract class PlayerList { } public void savePlayers() { @@ -1038,7 +1038,7 @@ index 537e610797..b48e5b51a0 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 12f359a6ba..b5e0ba3909 100644 +index 42303f5b39..456afbf079 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -4,12 +4,13 @@ import javax.annotation.Nullable; @@ -1054,11 +1054,11 @@ index 12f359a6ba..b5e0ba3909 100644 - public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot + public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper - private static final Logger a = LogManager.getLogger(); + private static final Logger LOGGER = LogManager.getLogger(); private final TileEntityTypes b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER @Nullable diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 28fa346b7f..eabcab0244 100644 +index 83fdea893c..738d9da8ce 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,7 @@ @@ -1122,7 +1122,7 @@ index 28fa346b7f..eabcab0244 100644 // Spigot end } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1ec8272ff3..4fdbb8cd57 100644 +index 20900593af..d54d58e1ee 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1,5 +1,7 @@ @@ -1154,7 +1154,7 @@ index 1ec8272ff3..4fdbb8cd57 100644 this.I = Sets.newHashSet(); this.siegeManager = new VillageSiege(this); this.J = new ObjectLinkedOpenHashSet(); -@@ -442,6 +443,7 @@ public class WorldServer extends World { +@@ -327,6 +328,7 @@ public class WorldServer extends World { org.spigotmc.ActivationRange.activateEntities(this); // Spigot timings.entityTick.startTiming(); // Spigot @@ -1162,7 +1162,7 @@ index 1ec8272ff3..4fdbb8cd57 100644 while (objectiterator.hasNext()) { Entry entry = (Entry) objectiterator.next(); Entity entity1 = (Entity) entry.getValue(); -@@ -545,6 +547,7 @@ public class WorldServer extends World { +@@ -430,6 +432,7 @@ public class WorldServer extends World { } gameprofilerfiller.exitEnter("tickBlocks"); @@ -1170,7 +1170,7 @@ index 1ec8272ff3..4fdbb8cd57 100644 if (i > 0) { ChunkSection[] achunksection = chunk.getSections(); int l = achunksection.length; -@@ -576,7 +579,7 @@ public class WorldServer extends World { +@@ -461,7 +464,7 @@ public class WorldServer extends World { } } } @@ -1179,7 +1179,7 @@ index 1ec8272ff3..4fdbb8cd57 100644 gameprofilerfiller.exit(); } -@@ -869,6 +872,7 @@ public class WorldServer extends World { +@@ -754,6 +757,7 @@ public class WorldServer extends World { if (!flag1) { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit @@ -1187,7 +1187,7 @@ index 1ec8272ff3..4fdbb8cd57 100644 if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); } -@@ -878,7 +882,10 @@ public class WorldServer extends World { +@@ -763,7 +767,10 @@ public class WorldServer extends World { iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); } @@ -1199,7 +1199,7 @@ index 1ec8272ff3..4fdbb8cd57 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 93246f464b..95d0075d57 100644 +index 9021ab34fa..672a647960 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1922,12 +1922,31 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 09d92a93a7..77424a5e9f 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -1,4 +1,4 @@ -From 658e764bcd49c33fd09b0bcf5cc42014f7599b19 Mon Sep 17 00:00:00 2001 +From 4c5ba563e76ce1ad1703efc25ef3952b56e373e6 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 14:14:15 -0600 Subject: [PATCH] Drop falling block and tnt entities at the specified height @@ -24,10 +24,10 @@ index 3f734327c0..1ed58f4bba 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2d07bfa879..7191861e81 100644 +index 114a851f0f..ca21afc199 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1770,6 +1770,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1769,6 +1769,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.a(itemstack, 0.0F); } diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index ce51e7dec9..3f615896ff 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -1,4 +1,4 @@ -From d054764b7c89587e26af504433d4ce408277a3be Mon Sep 17 00:00:00 2001 +From d6da37cf3560528b02e72e0b5c08747103db3fcf Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index d05fee962a..61c02c530b 100644 +index 3f35a28ba1..cf00f35a5b 100644 --- a/src/main/java/net/minecraft/server/EULA.java +++ b/src/main/java/net/minecraft/server/EULA.java @@ -70,7 +70,7 @@ public class EULA { @@ -19,7 +19,7 @@ index d05fee962a..61c02c530b 100644 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7b102e155d..89ad19e59c 100644 +index 277fa64e24..33e8030def 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1264,7 +1264,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Tue, 1 Mar 2016 23:09:29 -0600 Subject: [PATCH] Further improve server tick loop @@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 89ad19e59c..7dfe1f0a3c 100644 +index 33e8030def..48286867fe 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -150,7 +150,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Tue, 1 Mar 2016 23:45:08 -0600 Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7191861e81..c813b59af5 100644 +index ca21afc199..af019fc3f1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -161,6 +161,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper @@ -16,7 +16,7 @@ index 7191861e81..c813b59af5 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -1529,6 +1530,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1528,6 +1529,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } } @@ -28,7 +28,7 @@ index 7191861e81..c813b59af5 100644 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); -@@ -1650,6 +1656,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1649,6 +1655,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end @@ -42,7 +42,7 @@ index 7191861e81..c813b59af5 100644 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1727,6 +1740,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1726,6 +1739,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected abstract void b(NBTTagCompound nbttagcompound); diff --git a/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch index 1cbcd7a430..df80f1b92d 100644 --- a/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0025-Configurable-top-of-nether-void-damage.patch @@ -1,4 +1,4 @@ -From ff3266a66baaf6940a31d4a26742cf8cf7479b79 Mon Sep 17 00:00:00 2001 +From 1ab46ee6d9339d3bcd0aeb14a5bf5167779f3bda Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:58:50 -0600 Subject: [PATCH] Configurable top of nether void damage @@ -29,10 +29,10 @@ index 1ed58f4bba..a797a57671 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c813b59af5..494c6cb4aa 100644 +index af019fc3f1..49245b5c5f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -385,9 +385,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -384,9 +384,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance *= 0.5F; } @@ -48,7 +48,7 @@ index c813b59af5..494c6cb4aa 100644 if (!this.world.isClientSide) { this.setFlag(0, this.fireTicks > 0); -@@ -397,6 +403,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -396,6 +402,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.world.getMethodProfiler().exit(); } @@ -66,7 +66,7 @@ index c813b59af5..494c6cb4aa 100644 protected void E() { if (this.portalCooldown > 0) { --this.portalCooldown; -@@ -464,6 +481,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -463,6 +480,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fireTicks = 0; } diff --git a/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch b/Spigot-Server-Patches/0031-Disable-explosion-knockback.patch similarity index 76% rename from Spigot-Server-Patches/0033-Disable-explosion-knockback.patch rename to Spigot-Server-Patches/0031-Disable-explosion-knockback.patch index a900bdf472..5cd22293c9 100644 --- a/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/0031-Disable-explosion-knockback.patch @@ -1,14 +1,14 @@ -From cf24658d7888f1e4ca7faa4fa85c90cf87f3da29 Mon Sep 17 00:00:00 2001 +From 8f2350f0a8682976968073072d82217c8b358034 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:48:03 -0600 Subject: [PATCH] Disable explosion knockback diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a39451c69a..65a99b2a4b 100644 +index a5ec0bc0e0..6a307d5dd6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -159,4 +159,9 @@ public class PaperWorldConfig { +@@ -151,4 +151,9 @@ public class PaperWorldConfig { optimizeExplosions = getBoolean("optimize-explosions", false); log("Optimize explosions: " + optimizeExplosions); } @@ -19,10 +19,10 @@ index a39451c69a..65a99b2a4b 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b092b0fa23..c5cc0b471b 100644 +index 85567a7072..d85172e728 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1006,6 +1006,7 @@ public abstract class EntityLiving extends Entity { +@@ -1112,6 +1112,7 @@ public abstract class EntityLiving extends Entity { } } @@ -30,7 +30,7 @@ index b092b0fa23..c5cc0b471b 100644 if (flag1) { if (flag) { this.world.broadcastEntityEffect(this, (byte) 29); -@@ -1022,6 +1023,7 @@ public abstract class EntityLiving extends Entity { +@@ -1130,6 +1131,7 @@ public abstract class EntityLiving extends Entity { b0 = 2; } @@ -38,20 +38,20 @@ index b092b0fa23..c5cc0b471b 100644 this.world.broadcastEntityEffect(this, b0); } -@@ -1045,6 +1047,8 @@ public abstract class EntityLiving extends Entity { +@@ -1153,6 +1155,8 @@ public abstract class EntityLiving extends Entity { } } + if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback + if (this.getHealth() <= 0.0F) { - if (!this.e(damagesource)) { - SoundEffect soundeffect = this.cs(); + if (!this.f(damagesource)) { + SoundEffect soundeffect = this.getSoundDeath(); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 3e44b2d549..5591ccb3b0 100644 +index bcff117619..6eeff4ce59 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java -@@ -153,7 +153,7 @@ public class Explosion { +@@ -188,14 +188,14 @@ public class Explosion { double d14 = d13; if (entity instanceof EntityLiving) { @@ -59,13 +59,12 @@ index 3e44b2d549..5591ccb3b0 100644 + d14 = entity instanceof EntityHuman && world.paperConfig.disableExplosionKnockback ? 0 : EnchantmentProtection.a((EntityLiving) entity, d13); // Paper - Disable explosion knockback } - entity.motX += d8 * d14; -@@ -162,7 +162,7 @@ public class Explosion { + entity.setMot(entity.getMot().add(d8 * d14, d9 * d14, d10 * d14)); if (entity instanceof EntityHuman) { EntityHuman entityhuman = (EntityHuman) entity; -- if (!entityhuman.isSpectator() && (!entityhuman.u() || !entityhuman.abilities.isFlying)) { -+ if (!entityhuman.isSpectator() && (!entityhuman.u() && !world.paperConfig.disableExplosionKnockback || !entityhuman.abilities.isFlying)) { // Paper - Disable explosion knockback +- if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.abilities.isFlying)) { ++ if (!entityhuman.isSpectator() && (!entityhuman.isCreative() && !world.paperConfig.disableExplosionKnockback || !entityhuman.abilities.isFlying)) { // Paper - Disable explosion knockback this.l.put(entityhuman, new Vec3D(d8 * d13, d9 * d13, d10 * d13)); } } diff --git a/Spigot-Server-Patches/0034-Disable-thunder.patch b/Spigot-Server-Patches/0032-Disable-thunder.patch similarity index 55% rename from Spigot-Server-Patches/0034-Disable-thunder.patch rename to Spigot-Server-Patches/0032-Disable-thunder.patch index 406f14eb45..60eb008adc 100644 --- a/Spigot-Server-Patches/0034-Disable-thunder.patch +++ b/Spigot-Server-Patches/0032-Disable-thunder.patch @@ -1,14 +1,14 @@ -From 51dcc0bca12b8920ea29368566fd594a27f02dd8 Mon Sep 17 00:00:00 2001 +From 8f5a51d97b15c8de7f1074f14eeb26e09ad4effe Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:52:43 -0600 Subject: [PATCH] Disable thunder diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 65a99b2a4b..0ba604ffcf 100644 +index 6a307d5dd6..bf0cd6a8b4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -164,4 +164,9 @@ public class PaperWorldConfig { +@@ -156,4 +156,9 @@ public class PaperWorldConfig { private void disableExplosionKnockback(){ disableExplosionKnockback = getBoolean("disable-explosion-knockback", false); } @@ -19,18 +19,18 @@ index 65a99b2a4b..0ba604ffcf 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 5a7087c758..716c3ddb8c 100644 +index d54d58e1ee..3b90e8b613 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -474,7 +474,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { - int l; - BlockPosition blockposition; +@@ -393,7 +393,7 @@ public class WorldServer extends World { + gameprofilerfiller.enter("thunder"); + BlockPosition blockposition; -- if (flag && flag1 && this.random.nextInt(100000) == 0) { -+ if (!this.paperConfig.disableThunder && flag && flag1 && this.random.nextInt(100000) == 0) { // Paper - Disable thunder - this.m = this.m * 3 + 1013904223; - l = this.m >> 2; - blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); +- if (flag && this.U() && this.random.nextInt(100000) == 0) { ++ if (!this.paperConfig.disableThunder && flag && this.U() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder + blockposition = this.a(this.a(j, 0, k, 15)); + if (this.isRainingAt(blockposition)) { + DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); -- 2.21.0 diff --git a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0033-Disable-ice-and-snow.patch similarity index 53% rename from Spigot-Server-Patches/0035-Disable-ice-and-snow.patch rename to Spigot-Server-Patches/0033-Disable-ice-and-snow.patch index 9c3aecc788..c1182e0c9b 100644 --- a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0033-Disable-ice-and-snow.patch @@ -1,14 +1,14 @@ -From c5a235ad0ea3ac72b8ec52709c4501dc9e484467 Mon Sep 17 00:00:00 2001 +From cad96100cef4ebf55c54ec59470634f0af438a13 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:57:24 -0600 Subject: [PATCH] Disable ice and snow diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0ba604ffcf..8b3c7b05c3 100644 +index bf0cd6a8b4..8db5c3f3fe 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -169,4 +169,9 @@ public class PaperWorldConfig { +@@ -161,4 +161,9 @@ public class PaperWorldConfig { private void disableThunder() { disableThunder = getBoolean("disable-thunder", false); } @@ -19,18 +19,18 @@ index 0ba604ffcf..8b3c7b05c3 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 716c3ddb8c..ed6f3afcfe 100644 +index 3b90e8b613..e176c63fed 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -496,7 +496,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { - } +@@ -413,7 +413,7 @@ public class WorldServer extends World { + } - this.methodProfiler.exitEnter("iceandsnow"); -- if (this.random.nextInt(16) == 0) { -+ if (!this.paperConfig.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow - this.m = this.m * 3 + 1013904223; - l = this.m >> 2; - blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); + gameprofilerfiller.exitEnter("iceandsnow"); +- if (this.random.nextInt(16) == 0) { ++ if (!this.paperConfig.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow + blockposition = this.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, this.a(j, 0, k, 15)); + BlockPosition blockposition1 = blockposition.down(); + BiomeBase biomebase = this.getBiome(blockposition); -- 2.21.0 diff --git a/Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch b/Spigot-Server-Patches/0034-Configurable-mob-spawner-tick-rate.patch similarity index 79% rename from Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch rename to Spigot-Server-Patches/0034-Configurable-mob-spawner-tick-rate.patch index 9047eed1da..1cbeaa306b 100644 --- a/Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch +++ b/Spigot-Server-Patches/0034-Configurable-mob-spawner-tick-rate.patch @@ -1,14 +1,14 @@ -From 0debd2105cbb41e08ad37942d0b964e14b8d703d Mon Sep 17 00:00:00 2001 +From 7b29308aadabc42681f9c94fba7ac381947d1f01 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 15:03:53 -0600 Subject: [PATCH] Configurable mob spawner tick rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 8b3c7b05c3..7c16ec9970 100644 +index 8db5c3f3fe..e4e00e2e1c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -174,4 +174,9 @@ public class PaperWorldConfig { +@@ -166,4 +166,9 @@ public class PaperWorldConfig { private void disableIceAndSnow(){ disableIceAndSnow = getBoolean("disable-ice-and-snow", false); } @@ -19,10 +19,10 @@ index 8b3c7b05c3..7c16ec9970 100644 + } } diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index cc0371b4aa..ce43b4bc52 100644 +index 4db5fd641f..6499d27e63 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -@@ -22,6 +22,7 @@ public abstract class MobSpawnerAbstract { +@@ -23,6 +23,7 @@ public abstract class MobSpawnerAbstract { public int maxNearbyEntities = 6; public int requiredPlayerRange = 16; public int spawnRange = 4; @@ -30,7 +30,7 @@ index cc0371b4aa..ce43b4bc52 100644 public MobSpawnerAbstract() {} -@@ -51,6 +52,10 @@ public abstract class MobSpawnerAbstract { +@@ -52,6 +53,10 @@ public abstract class MobSpawnerAbstract { } public void c() { @@ -41,9 +41,9 @@ index cc0371b4aa..ce43b4bc52 100644 if (!this.h()) { this.f = this.e; } else { -@@ -64,18 +69,18 @@ public abstract class MobSpawnerAbstract { - this.a().addParticle(Particles.M, d0, d1, d2, 0.0D, 0.0D, 0.0D); - this.a().addParticle(Particles.y, d0, d1, d2, 0.0D, 0.0D, 0.0D); +@@ -66,18 +71,18 @@ public abstract class MobSpawnerAbstract { + world.addParticle(Particles.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D); + world.addParticle(Particles.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D); if (this.spawnDelay > 0) { - --this.spawnDelay; + this.spawnDelay -= tickDelay; // Paper diff --git a/Spigot-Server-Patches/0035-Send-absolute-position-the-first-time-an-entity-is-s.patch b/Spigot-Server-Patches/0035-Send-absolute-position-the-first-time-an-entity-is-s.patch new file mode 100644 index 0000000000..22dd58a448 --- /dev/null +++ b/Spigot-Server-Patches/0035-Send-absolute-position-the-first-time-an-entity-is-s.patch @@ -0,0 +1,111 @@ +From 76aeea2b3b5c1bbedf0aa2793199f6c5d3a23769 Mon Sep 17 00:00:00 2001 +From: Jedediah Smith +Date: Wed, 2 Mar 2016 23:13:07 -0600 +Subject: [PATCH] Send absolute position the first time an entity is seen + + +diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java +index 315c3d9165..aaf3a54b08 100644 +--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java ++++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java +@@ -2,6 +2,7 @@ package net.minecraft.server; + + import java.util.Collection; + import java.util.Collections; ++import java.util.HashSet; + import java.util.Iterator; + import java.util.List; + import java.util.Set; +@@ -21,7 +22,7 @@ public class EntityTrackerEntry { + private final Entity tracker; + private final int d; + private final boolean e; +- private final Consumer> f; ++ private final Consumer> f; private Consumer> getPacketConsumer() { return f; } // Paper - OBFHELPER + private long xLoc; + private long yLoc; + private long zLoc; +@@ -36,8 +37,23 @@ public class EntityTrackerEntry { + private boolean r; + // CraftBukkit start + private final Set trackedPlayers; ++ // Paper start ++ private java.util.Map trackedPlayerMap = null; ++ ++ /** ++ * Requested in https://github.com/PaperMC/Paper/issues/1537 to allow intercepting packets ++ */ ++ public void sendPlayerPacket(EntityPlayer player, Packet packet) { ++ player.playerConnection.sendPacket(packet); ++ } ++ ++ public EntityTrackerEntry(WorldServer worldserver, Entity entity, int i, boolean flag, Consumer> consumer, java.util.Map trackedPlayers) { ++ this(worldserver, entity, i, flag, consumer, trackedPlayers.keySet()); ++ trackedPlayerMap = trackedPlayers; ++ } + + public EntityTrackerEntry(WorldServer worldserver, Entity entity, int i, boolean flag, Consumer> consumer, Set trackedPlayers) { ++ // Paper end + this.trackedPlayers = trackedPlayers; + // CraftBukkit end + this.m = Vec3D.a; +@@ -159,7 +175,25 @@ public class EntityTrackerEntry { + } + + if (packet1 != null) { +- this.f.accept(packet1); ++ // paper start ++ if (trackedPlayerMap == null || packet1 instanceof PacketPlayOutEntityTeleport) { ++ this.f.accept((packet1)); ++ } else { ++ PacketPlayOutEntityTeleport teleportPacket = null; ++ ++ for (java.util.Map.Entry viewer : trackedPlayerMap.entrySet()) { ++ if (viewer.getValue()) { ++ viewer.setValue(false); ++ if (teleportPacket == null) { ++ teleportPacket = new PacketPlayOutEntityTeleport(this.tracker); ++ } ++ sendPlayerPacket(viewer.getKey(), teleportPacket); ++ } else { ++ sendPlayerPacket(viewer.getKey(), packet1); ++ } ++ } ++ } ++ // Paper end + } + + this.c(); +diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java +index c08a1a6e51..528d0f0cd2 100644 +--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java ++++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +@@ -1056,10 +1056,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private final Entity tracker; + private final int trackingDistance; + private SectionPosition e; +- public final Set trackedPlayers = Sets.newHashSet(); ++ // Paper start ++ // Replace trackedPlayers Set with a Map. The value is true until the player receives ++ // their first update (which is forced to have absolute coordinates), false afterward. ++ public java.util.Map trackedPlayerMap = new java.util.HashMap<>(); ++ public Set trackedPlayers = trackedPlayerMap.keySet(); + + public EntityTracker(Entity entity, int i, int j, boolean flag) { +- this.trackerEntry = new EntityTrackerEntry(PlayerChunkMap.this.world, entity, j, flag, this::broadcast, trackedPlayers); // CraftBukkit ++ this.trackerEntry = new EntityTrackerEntry(PlayerChunkMap.this.world, entity, j, flag, this::broadcast, trackedPlayerMap); // CraftBukkit // Paper + this.tracker = entity; + this.trackingDistance = i; + this.e = SectionPosition.a(entity); +@@ -1141,7 +1145,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId())); + // CraftBukkit end + +- if (flag1 && this.trackedPlayers.add(entityplayer)) { ++ if (flag1 && this.trackedPlayerMap.put(entityplayer, true) == null) { // Paper + this.trackerEntry.b(entityplayer); + } + } else if (this.trackedPlayers.remove(entityplayer)) { +-- +2.21.0 + diff --git a/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch b/Spigot-Server-Patches/0036-Add-BeaconEffectEvent.patch similarity index 79% rename from Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch rename to Spigot-Server-Patches/0036-Add-BeaconEffectEvent.patch index bb18f0afc8..06f2ee307b 100644 --- a/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch +++ b/Spigot-Server-Patches/0036-Add-BeaconEffectEvent.patch @@ -1,27 +1,26 @@ -From fc85165d72c6b28d04036eaf70235f61b59f55e7 Mon Sep 17 00:00:00 2001 +From bcf9690c17928aade39c3cf8769f9cdbd33b7cc3 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 23:30:53 -0600 Subject: [PATCH] Add BeaconEffectEvent diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java -index fecd65ddb8..c6bd54a2c9 100644 +index 8837dc4542..87f77bb86b 100644 --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java -@@ -15,6 +15,12 @@ import org.bukkit.entity.HumanEntity; +@@ -14,6 +14,11 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil; + import org.bukkit.entity.HumanEntity; import org.bukkit.potion.PotionEffect; // CraftBukkit end - +// Paper start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.entity.Player; +import com.destroystokyo.paper.event.block.BeaconEffectEvent; +// Paper end -+ - public class TileEntityBeacon extends TileEntityContainer implements IWorldInventory, ITickable { - public static final MobEffectList[][] a = new MobEffectList[][] { { MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, { MobEffects.RESISTANCE, MobEffects.JUMP}, { MobEffects.INCREASE_DAMAGE}, { MobEffects.REGENERATION}}; -@@ -129,14 +135,31 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven + public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable { + +@@ -235,14 +240,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic } private void applyEffect(List list, MobEffectList effects, int i, int b0) { @@ -54,7 +53,7 @@ index fecd65ddb8..c6bd54a2c9 100644 } } } -@@ -158,10 +181,10 @@ public class TileEntityBeacon extends TileEntityContainer implements IWorldInven +@@ -265,10 +287,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic int i = getLevel(); List list = getHumansInRange(); diff --git a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/0037-Configurable-container-update-tick-rate.patch similarity index 79% rename from Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch rename to Spigot-Server-Patches/0037-Configurable-container-update-tick-rate.patch index 08503052a8..fe5df936fc 100644 --- a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0037-Configurable-container-update-tick-rate.patch @@ -1,14 +1,14 @@ -From c016580d4adc343720538d924999686d912bb2f2 Mon Sep 17 00:00:00 2001 +From 0e0cdbb47aad3fb40ef01d000940577277963df4 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 23:34:44 -0600 Subject: [PATCH] Configurable container update tick rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7c16ec9970..4266a87fe3 100644 +index e4e00e2e1c..d663b15ceb 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -179,4 +179,9 @@ public class PaperWorldConfig { +@@ -171,4 +171,9 @@ public class PaperWorldConfig { private void mobSpawnerTickRate() { mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1); } @@ -19,25 +19,25 @@ index 7c16ec9970..4266a87fe3 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index c4a55c6a1f..2665faa6c5 100644 +index fbde752052..dbb9a9a694 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -68,6 +68,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - public boolean f; +@@ -71,6 +71,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + public boolean e; public int ping; public boolean viewingCredits; + private int containerUpdateDelay; // Paper // CraftBukkit start public String displayName; -@@ -332,7 +333,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -348,7 +349,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { --this.noDamageTicks; } -- this.activeContainer.b(); +- this.activeContainer.c(); + // Paper start - Configurable container update tick rate + if (--containerUpdateDelay <= 0) { -+ this.activeContainer.b(); ++ this.activeContainer.c(); + containerUpdateDelay = world.paperConfig.containerUpdateTickRate; + } + // Paper end diff --git a/Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/0038-Use-UserCache-for-player-heads.patch similarity index 63% rename from Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch rename to Spigot-Server-Patches/0038-Use-UserCache-for-player-heads.patch index d48086a969..9c67e08f0d 100644 --- a/Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch +++ b/Spigot-Server-Patches/0038-Use-UserCache-for-player-heads.patch @@ -1,29 +1,21 @@ -From db5b2b692a6b6ca59d07f50beca322e56c5ee3dc Mon Sep 17 00:00:00 2001 +From f21af7ce096c13e137b69a2704cf76b7a80ae5b4 Mon Sep 17 00:00:00 2001 From: Techcable Date: Wed, 2 Mar 2016 23:42:37 -0600 Subject: [PATCH] Use UserCache for player heads diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 210c10b317..2ad3acf43b 100644 +index 63ec8d06e4..f270532763 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -6,6 +6,7 @@ import net.minecraft.server.GameProfileSerializer; - import net.minecraft.server.NBTBase; - import net.minecraft.server.NBTTagCompound; - import net.minecraft.server.TileEntitySkull; -+import net.minecraft.server.*; - - import org.bukkit.Bukkit; - import org.bukkit.Material; -@@ -155,7 +156,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -152,7 +152,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { if (name == null) { profile = null; } else { - profile = new GameProfile(null, name); + // Paper start - Use Online Players Skull + GameProfile newProfile = null; -+ EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name); ++ net.minecraft.server.EntityPlayer player = net.minecraft.server.MinecraftServer.getServer().getPlayerList().getPlayer(name); + if (player != null) newProfile = player.getProfile(); + if (newProfile == null) newProfile = new GameProfile(null, name); + profile = newProfile; diff --git a/Spigot-Server-Patches/0039-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0039-Disable-spigot-tick-limiters.patch new file mode 100644 index 0000000000..e224203721 --- /dev/null +++ b/Spigot-Server-Patches/0039-Disable-spigot-tick-limiters.patch @@ -0,0 +1,24 @@ +From ca2b0215ad7c6097f7b59f8884a6c7ae71f25438 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Wed, 2 Mar 2016 23:45:17 -0600 +Subject: [PATCH] Disable spigot tick limiters + + +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index ee953c880e..48360c2b47 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -650,9 +650,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose + // Spigot start + // Iterator iterator = this.tileEntityListTick.iterator(); + int tilesThisCycle = 0; +- for (tileLimiter.initTick(); +- tilesThisCycle < tileEntityListTick.size() && (tilesThisCycle % 10 != 0 || tileLimiter.shouldContinue()); +- tileTickPosition++, tilesThisCycle++) { ++ for (tileTickPosition = 0; tileTickPosition < tileEntityListTick.size(); tileTickPosition++) { // Paper - Disable tick limiters + tileTickPosition = (tileTickPosition < tileEntityListTick.size()) ? tileTickPosition : 0; + TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition); + // Spigot start +-- +2.21.0 + diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0040-Add-PlayerInitialSpawnEvent.patch similarity index 84% rename from Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch rename to Spigot-Server-Patches/0040-Add-PlayerInitialSpawnEvent.patch index 862f9a5826..e0ad1fc21d 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0040-Add-PlayerInitialSpawnEvent.patch @@ -1,4 +1,4 @@ -From 12c382750154c7f56762076b755c2c1b122fc188 Mon Sep 17 00:00:00 2001 +From 5edd0028e03561e889fdde9dcea3cdd732dc6ba3 Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Thu, 3 Mar 2016 00:09:38 -0600 Subject: [PATCH] Add PlayerInitialSpawnEvent @@ -6,13 +6,14 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent For modifying a player's initial spawn location as they join the server diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3a83819d56..c2061e9596 100644 +index 7939208a5a..f904e1c28d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -109,6 +109,21 @@ public abstract class PlayerList { +@@ -109,7 +109,22 @@ public abstract class PlayerList { } // CraftBukkit end +- entityplayer.spawnIn(worldserver); + // Paper start - support PlayerInitialSpawnEvent + Location originalLoc = new Location(entityplayer.world.getWorld(), entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); + com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent event = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(entityplayer.getBukkitEntity(), originalLoc); @@ -28,9 +29,10 @@ index 3a83819d56..c2061e9596 100644 + entityplayer.dimension = ((CraftWorld) newLoc.getWorld()).getHandle().dimension; + // Paper end + - entityplayer.spawnIn(this.server.getWorldServer(entityplayer.dimension)); ++ entityplayer.spawnIn(((CraftWorld) newLoc.getWorld()).getHandle()); entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); String s1 = "local"; + -- 2.21.0 diff --git a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch b/Spigot-Server-Patches/0041-Configurable-Disabling-Cat-Chest-Detection.patch similarity index 61% rename from Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch rename to Spigot-Server-Patches/0041-Configurable-Disabling-Cat-Chest-Detection.patch index eb1688fc8a..39b0a140c7 100644 --- a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch +++ b/Spigot-Server-Patches/0041-Configurable-Disabling-Cat-Chest-Detection.patch @@ -1,4 +1,4 @@ -From 89cdf80156325f331b71f544198fa7be8cb71d8d Mon Sep 17 00:00:00 2001 +From c453ea6fa9dccc9e8c61d9f07842f5364377539e Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:13:45 -0600 Subject: [PATCH] Configurable Disabling Cat Chest Detection @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Disabling Cat Chest Detection Offers a gameplay feature to stop cats from blocking chests diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4266a87fe3..4641eaf2f8 100644 +index d663b15ceb..2782970393 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -184,4 +184,9 @@ public class PaperWorldConfig { +@@ -176,4 +176,9 @@ public class PaperWorldConfig { private void containerUpdateTickRate() { containerUpdateTickRate = getInt("container-update-tick-rate", 1); } @@ -20,19 +20,19 @@ index 4266a87fe3..4641eaf2f8 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 5e1a3df2b3..e94786138e 100644 +index 6b1c64e8f3..ee9d91a8c1 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -232,6 +232,11 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC +@@ -280,6 +280,11 @@ public class BlockChest extends BlockTileEntity implements IBlockWaterlogged { } - private boolean b(World world, BlockPosition blockposition) { + private static boolean b(GeneratorAccess generatoraccess, BlockPosition blockposition) { + // Paper start - Option to disable chest cat detection -+ if (world.paperConfig.disableChestCatDetection) { ++ if (((World) generatoraccess).paperConfig.disableChestCatDetection) { + return false; + } + // Paper end - List list = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))); + List list = generatoraccess.a(EntityCat.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))); if (!list.isEmpty()) { -- diff --git a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch deleted file mode 100644 index 9f72df2673..0000000000 --- a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f9b732ac79ee53385cc92bf38ea541f45a7c304c Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Wed, 2 Mar 2016 23:45:17 -0600 -Subject: [PATCH] Disable spigot tick limiters - - -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 20990cbfdd..a80acbb6a5 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -1124,10 +1124,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc - // CraftBukkit start - Use field for loop variable - co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper - int entitiesThisCycle = 0; -- if (tickPosition < 0) tickPosition = 0; -- for (entityLimiter.initTick(); -- entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue()); -- tickPosition++, entitiesThisCycle++) { -+ // Paper start - Disable tick limiters -+ //if (tickPosition < 0) tickPosition = 0; -+ for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) { -+ // Paper end - tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0; - entity = (Entity) this.entityList.get(this.tickPosition); - // CraftBukkit end -@@ -1191,9 +1191,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc - // Spigot start - // Iterator iterator = this.tileEntityListTick.iterator(); - int tilesThisCycle = 0; -- for (tileLimiter.initTick(); -- tilesThisCycle < tileEntityListTick.size() && (tilesThisCycle % 10 != 0 || tileLimiter.shouldContinue()); -- tileTickPosition++, tilesThisCycle++) { -+ for (tileTickPosition = 0; tileTickPosition < tileEntityListTick.size(); tileTickPosition++) { // Paper - Disable tick limiters - tileTickPosition = (tileTickPosition < tileEntityListTick.size()) ? tileTickPosition : 0; - TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition); - // Spigot start --- -2.21.0 - diff --git a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0042-Ensure-commands-are-not-ran-async.patch similarity index 89% rename from Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch rename to Spigot-Server-Patches/0042-Ensure-commands-are-not-ran-async.patch index 4e02f9052a..19fe189cce 100644 --- a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0042-Ensure-commands-are-not-ran-async.patch @@ -1,4 +1,4 @@ -From afe18ef667aa63c426197f85c3785aa7e2e36e46 Mon Sep 17 00:00:00 2001 +From b65da8135d73b3be5877239a3751c4dcd150f97f Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:17:12 -0600 Subject: [PATCH] Ensure commands are not ran async @@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b9e6a3275c..9a83e5fc0b 100644 +index 287bba3f6c..9d7bbafe02 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1533,6 +1533,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1579,6 +1579,29 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (!async && s.startsWith("/")) { @@ -45,13 +45,13 @@ index b9e6a3275c..9a83e5fc0b 100644 + } + // Paper End this.handleCommand(s); - } else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) { + } else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) { // Do nothing, this is coming from a plugin diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7b4af7a904..c6e6ae4fe7 100644 +index de592ae851..9c54d151df 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -701,6 +701,29 @@ public final class CraftServer implements Server { +@@ -704,6 +704,29 @@ public final class CraftServer implements Server { Validate.notNull(commandLine, "CommandLine cannot be null"); org.spigotmc.AsyncCatcher.catchOp( "command dispatch" ); // Spigot @@ -82,19 +82,19 @@ index 7b4af7a904..c6e6ae4fe7 100644 return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index a0cdd2317c..984df4083d 100644 +index ddef523ea8..70f8d42992 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -@@ -14,6 +14,7 @@ public class ServerShutdownThread extends Thread { +@@ -13,6 +13,7 @@ public class ServerShutdownThread extends Thread { public void run() { try { org.spigotmc.AsyncCatcher.enabled = false; // Spigot + org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper - server.stop(); - } catch (ExceptionWorldConflict ex) { - ex.printStackTrace(); + server.close(); + } finally { + try { diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java -index 4b3aa85c97..e44c230165 100644 +index aeed769725..9f7d2ef932 100644 --- a/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java @@ -6,6 +6,7 @@ public class AsyncCatcher @@ -106,7 +106,7 @@ index 4b3aa85c97..e44c230165 100644 public static void catchOp(String reason) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index f4e088c134..944151d140 100644 +index e7b953ca31..ccea803f58 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -43,6 +43,7 @@ public class RestartCommand extends Command diff --git a/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0043-All-chunks-are-slime-spawn-chunks-toggle.patch similarity index 61% rename from Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch rename to Spigot-Server-Patches/0043-All-chunks-are-slime-spawn-chunks-toggle.patch index 4e011efaed..6cf6c89326 100644 --- a/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/0043-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -1,14 +1,14 @@ -From 6aa2b20662a0a6df004590d4434b3b20490ff225 Mon Sep 17 00:00:00 2001 +From 3eec776d3820e492a821d9cb3d2ad417cf1935cf Mon Sep 17 00:00:00 2001 From: vemacs Date: Thu, 3 Mar 2016 01:19:22 -0600 Subject: [PATCH] All chunks are slime spawn chunks toggle diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4641eaf2f8..05d2d50e54 100644 +index 2782970393..be91b11242 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -189,4 +189,9 @@ public class PaperWorldConfig { +@@ -181,4 +181,9 @@ public class PaperWorldConfig { private void disableChestCatDetection() { disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false); } @@ -19,18 +19,18 @@ index 4641eaf2f8..05d2d50e54 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index aa23cdff12..f92bf02b87 100644 +index 3140a49e1c..8115b1e4ec 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java -@@ -267,7 +267,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { +@@ -276,7 +276,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { } ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition); -- boolean flag1 = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot -+ boolean flag1 = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - add allChunksAreSlime +- boolean flag = SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot ++ boolean flag = world.paperConfig.allChunksAreSlimeChunks || SeededRandom.a(chunkcoordintpair.x, chunkcoordintpair.z, generatoraccess.getSeed(), world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - if (this.random.nextInt(10) == 0 && flag1 && this.locY < 40.0D) { - return super.a(generatoraccess, flag); + if (this.random.nextInt(10) == 0 && flag && this.locY < 40.0D) { + return super.a(generatoraccess, enummobspawn); -- 2.21.0 diff --git a/Spigot-Server-Patches/0046-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0044-Optimize-Pathfinding.patch similarity index 85% rename from Spigot-Server-Patches/0046-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0044-Optimize-Pathfinding.patch index a199148d71..4ca99fc272 100644 --- a/Spigot-Server-Patches/0046-Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/0044-Optimize-Pathfinding.patch @@ -1,4 +1,4 @@ -From b72883726c3c140cd0459d8241c7e6c03873bab0 Mon Sep 17 00:00:00 2001 +From d20d85eabbc58677092cd028741797484a981d24 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:02:07 -0600 Subject: [PATCH] Optimize Pathfinding @@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 2d788ef663..60b5068e32 100644 +index ca30e08ff4..2ced8dedd1 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -122,10 +122,26 @@ public abstract class NavigationAbstract { +@@ -116,10 +116,26 @@ public abstract class NavigationAbstract { } public boolean a(Entity entity, double d0) { @@ -38,10 +38,10 @@ index 2d788ef663..60b5068e32 100644 public boolean a(@Nullable PathEntity pathentity, double d0) { if (pathentity == null) { -@@ -258,6 +274,7 @@ public abstract class NavigationAbstract { +@@ -252,6 +268,7 @@ public abstract class NavigationAbstract { } - public void q() { + public void o() { + this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations this.c = null; } diff --git a/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch b/removed/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch similarity index 100% rename from Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch rename to removed/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch diff --git a/Spigot-Server-Patches/0032-Add-player-view-distance-API.patch b/removed/1.14/0032-Add-player-view-distance-API.patch similarity index 100% rename from Spigot-Server-Patches/0032-Add-player-view-distance-API.patch rename to removed/1.14/0032-Add-player-view-distance-API.patch diff --git a/scripts/remap.sh b/scripts/remap.sh index 3765142085..0d9d64d4bb 100755 --- a/scripts/remap.sh +++ b/scripts/remap.sh @@ -54,7 +54,7 @@ fi echo "Applying member mappings..." if [ ! -f "$jarpath-m.jar" ]; then - java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null + java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --auto-member LOGGER --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null if [ "$?" != "0" ]; then echo "Failed to apply member mappings." exit 1 diff --git a/work/BuildData b/work/BuildData index 601818a24e..df66507184 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit 601818a24e1d39ea5c09cbf82932fad6031c44b7 +Subproject commit df665071847a0ace1b4b7149f504e5bb8eca992c diff --git a/work/Bukkit b/work/Bukkit index 3735f9d0ad..73c2356795 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 3735f9d0ad8295565d59db84f49446589f580da0 +Subproject commit 73c235679573768d11aca47ce7e9bc4051004f19 diff --git a/work/CraftBukkit b/work/CraftBukkit index 364b6fbb73..724ec10f33 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 364b6fbb73176d276a110f4ce4217979ad7ee6a4 +Subproject commit 724ec10f3358924e348e96fe51dffe41c91780e5 diff --git a/work/Spigot b/work/Spigot index 6dbf995f13..066994b8ae 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 6dbf995f13ca29e311d686e963973905388a29b3 +Subproject commit 066994b8aef9c7e7c0bf800e346eb30efa76835a