From 027575df7fc506dd43f76569fd5b954cf48e2f1a Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 5 May 2019 14:39:51 -0700 Subject: [PATCH] Fix some issues on the list --- Spigot-Server-Patches/0004-MC-Utils.patch | 18 ++---------- ...to-current-Chunk-for-Entity-and-Bloc.patch | 16 +++-------- Spigot-Server-Patches/0009-Timings-v2.patch | 19 +++++++------ ...figurable-baby-zombie-movement-speed.patch | 6 ++-- .../0023-Entity-Origin-API.patch | 22 +++++++++++++-- ...sition-the-first-time-an-entity-is-s.patch | 8 +++--- .../0051-Add-velocity-warnings.patch | 6 ++-- .../0053-Add-exception-reporting-event.patch | 28 +++++++++---------- ...Entity-AddTo-RemoveFrom-World-Events.patch | 12 ++++---- ...ityRegainHealthEvent-isFastRegen-API.patch | 8 +++--- ...more-aggressive-in-the-chunk-unload-.patch | 6 ++-- .../0164-Entity-fromMobSpawner.patch | 10 +++---- ...7-PlayerNaturallySpawnCreaturesEvent.patch | 6 ++-- ...ld.spawnParticle-API-and-add-Builder.patch | 8 +++--- .../0235-Fix-CraftEntity-hashCode.patch | 6 ++-- ...ups-for-Entity-TileEntity-Current-Ch.patch | 8 +++--- .../0264-Don-t-save-Proto-Chunks.patch | 6 ++-- ...ead-Entities-in-entityList-iteration.patch | 20 ++++++------- ...ets-from-world-player-list-not-serve.patch | 12 ++++---- ...mit-lightning-strike-effect-distance.patch | 10 +++---- ...ble-thread-count-default-for-bootstr.patch | 6 ++-- .../0373-Entity-getEntitySpawnReason.patch | 8 +++--- 22 files changed, 123 insertions(+), 126 deletions(-) diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 4036062ac4..e86bbaba8d 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -1,4 +1,4 @@ -From c7ab123052eb2cb770ab48a8f386f23623d6a533 Mon Sep 17 00:00:00 2001 +From fe856f842c339f1366c793bd3a787c9f6d1e0d69 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 Subject: [PATCH] MC Utils @@ -775,22 +775,10 @@ 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 b3799ab564..6827936435 100644 +index b3799ab564..5fae5a1233 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java -@@ -45,7 +45,11 @@ public class SystemUtils { - return Collectors.toMap(Entry::getKey, Entry::getValue); - } - -+<<<<<<< HEAD - public static > String a(IBlockState iblockstate, T object) { // Paper - decompile fix -+======= -+ public static > String a(IBlockState iblockstate, T object) { -+>>>>>>> e706ce5c69... MC Utils - return iblockstate.a(object); // Paper - decompile fix - } - -@@ -58,7 +62,7 @@ public class SystemUtils { +@@ -58,7 +58,7 @@ public class SystemUtils { } public static long getMonotonicNanos() { 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 3bbf3422f2..d63d6c9f5b 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 48e532b68eaeb75a39035b463d664c258fe0b005 Mon Sep 17 00:00:00 2001 +From f51b5f65d158341dd5a12fc57a5d9bb6d70cf3a1 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 @@ -166,18 +166,10 @@ index 94fbf228d2..42303f5b39 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 ee34d42160..c1ad2626a7 100644 +index ee34d42160..cebbdec741 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -6,6 +6,7 @@ import com.google.common.collect.Lists; - import java.util.List; - import java.util.Set; - import java.util.UUID; -+<<<<<<< HEAD - import net.minecraft.server.AxisAlignedBB; - import net.minecraft.server.BlockPosition; - import net.minecraft.server.DamageSource; -@@ -137,6 +138,7 @@ import net.minecraft.server.EntityZombieVillager; +@@ -137,6 +137,7 @@ import net.minecraft.server.EntityZombieVillager; import net.minecraft.server.EnumChatFormat; import net.minecraft.server.IChatBaseComponent; import net.minecraft.server.NBTTagCompound; @@ -185,7 +177,7 @@ index ee34d42160..c1ad2626a7 100644 import org.bukkit.EntityEffect; import org.bukkit.Location; import org.bukkit.Server; -@@ -173,6 +175,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -173,6 +174,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { this.entity = entity; } diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 65de4031d9..247ddcc65e 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From fbc132e334e42bb567b29510dc0827ab0f16521d Mon Sep 17 00:00:00 2001 +From 87ac79ba576c04901783ab5e163826a361488db7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -789,7 +789,7 @@ index 741105fb6c..277fa64e24 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 4d8491c760..c08a1a6e51 100644 +index 4d8491c760..a44525304d 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1,6 +1,8 @@ @@ -801,7 +801,7 @@ index 4d8491c760..c08a1a6e51 100644 import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.mojang.datafixers.DataFixer; -@@ -248,6 +250,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -248,6 +250,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { playerchunk = new PlayerChunk(new ChunkCoordIntPair(i), j, this.lightEngine, this.q, this); } @@ -814,8 +814,9 @@ index 4d8491c760..c08a1a6e51 100644 + } + + -+ Chunk neighbor = getUpdatingChunk(ChunkCoordIntPair.pair(currentChunkPair.x + x, currentChunkPair.z + z)) -+ if (neighbor != null) { ++ PlayerChunk neighborPlayer = getUpdatingChunk(ChunkCoordIntPair.pair(currentChunkPair.x + x, currentChunkPair.z + z)); ++ if (neighborPlayer != null) { ++ Chunk neighbor = neighborPlayer.getChunk(); + neighbor.setNeighborLoaded(-x, -z); + playerchunk.getChunk().setNeighborLoaded(x, z); + } @@ -825,7 +826,7 @@ index 4d8491c760..c08a1a6e51 100644 this.updatingChunks.put(i, playerchunk); this.updatingChunksModified = true; } -@@ -350,6 +369,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -350,6 +370,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.a(i, playerchunk, event); // CraftBukkit } else { if (this.g.remove(i, playerchunk) && ichunkaccess != null) { @@ -850,7 +851,7 @@ index 4d8491c760..c08a1a6e51 100644 // CraftBukkit start if (event == null) { this.saveChunk(ichunkaccess); -@@ -424,7 +461,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -424,7 +462,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }); return completablefuture.thenComposeAsync((either) -> { @@ -859,7 +860,7 @@ index 4d8491c760..c08a1a6e51 100644 try { CompletableFuture> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> { return this.b(playerchunk); -@@ -904,6 +941,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -904,6 +942,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunkMap.EntityTracker playerchunkmap_entitytracker; ObjectIterator objectiterator; @@ -867,7 +868,7 @@ index 4d8491c760..c08a1a6e51 100644 for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) { playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); -@@ -921,9 +959,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -921,9 +960,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { playerchunkmap_entitytracker.e = sectionposition1; } } diff --git a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch index fabf83a7b6..1862712f36 100644 --- a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch @@ -1,4 +1,4 @@ -From 5ca07131699fd9580f9c2c4fb0a39186c2f221c7 Mon Sep 17 00:00:00 2001 +From 0c5a8cdfb123a2b2f985cbbc6105e593eb35aba1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:09:16 -0600 Subject: [PATCH] Configurable baby zombie movement speed @@ -20,7 +20,7 @@ index 098bd3fba8..55d8e74f82 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 21df3ef2c3..d9d9938602 100644 +index 21df3ef2c3..c3ce3daca6 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -19,7 +19,7 @@ public class EntityZombie extends EntityMonster { @@ -28,7 +28,7 @@ index 21df3ef2c3..d9d9938602 100644 protected static final IAttribute d = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance"); private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); - private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE); -+ private final AttributeModifier babyModifier = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier = c;// Paper - Remove static - Make baby speed configurable ++ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier babyModifier = this.c; // Paper - remove static - Make baby speed configurable private static final DataWatcherObject bz = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject bA = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); public static final DataWatcherObject DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); diff --git a/Spigot-Server-Patches/0023-Entity-Origin-API.patch b/Spigot-Server-Patches/0023-Entity-Origin-API.patch index 5c86fb021b..0eca083d46 100644 --- a/Spigot-Server-Patches/0023-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0023-Entity-Origin-API.patch @@ -1,4 +1,4 @@ -From 9ce6c64ce6774a54002489191fab5795f70b1567 Mon Sep 17 00:00:00 2001 +From 6ca1200c22d2e6055bdedabe5c6b11c83b110374 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 23:45:08 -0600 Subject: [PATCH] Entity Origin API @@ -100,11 +100,27 @@ index ce510c4867..b7c94fe238 100644 public double h(int i) { if (i >= 0 && i < this.list.size()) { NBTBase nbtbase = (NBTBase) this.list.get(i); +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index d54d58e1ee..742e7d793e 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -1101,6 +1101,11 @@ public class WorldServer extends World { + this.I.add(((EntityInsentient) entity).getNavigation()); + } + entity.valid = true; // CraftBukkit ++ // Paper start - Set origin location when the entity is being added to the world ++ if (entity.origin == null) { ++ entity.origin = entity.getBukkitEntity().getLocation(); ++ } ++ // Paper end + } + + } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index c1ad2626a7..852de0d625 100644 +index cebbdec741..d20c05265a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -945,4 +945,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -944,4 +944,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return spigot; } // Spigot end 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 index 22dd58a448..818d9c8412 100644 --- 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 @@ -1,4 +1,4 @@ -From 76aeea2b3b5c1bbedf0aa2793199f6c5d3a23769 Mon Sep 17 00:00:00 2001 +From 696f64b5a8f1a08651b60d9ebd499c623b2e41d9 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 @@ -77,10 +77,10 @@ index 315c3d9165..aaf3a54b08 100644 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 +index a44525304d..f49575b3ab 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 { +@@ -1057,10 +1057,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final Entity tracker; private final int trackingDistance; private SectionPosition e; @@ -97,7 +97,7 @@ index c08a1a6e51..528d0f0cd2 100644 this.tracker = entity; this.trackingDistance = i; this.e = SectionPosition.a(entity); -@@ -1141,7 +1145,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1142,7 +1146,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId())); // CraftBukkit end diff --git a/Spigot-Server-Patches/0051-Add-velocity-warnings.patch b/Spigot-Server-Patches/0051-Add-velocity-warnings.patch index 8ecc264d84..cc9fbc2561 100644 --- a/Spigot-Server-Patches/0051-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0051-Add-velocity-warnings.patch @@ -1,4 +1,4 @@ -From e37717afd97ae4f98d32fda26f0c0cc1b1d78dc1 Mon Sep 17 00:00:00 2001 +From f030cae6bc568729c3bdb652614b9265f2df84a7 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:48:12 -0600 Subject: [PATCH] Add velocity warnings @@ -17,10 +17,10 @@ index 1c96beab7d..01d5a49cf7 100644 static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 852de0d625..5d9b4a58e2 100644 +index d20c05265a..fb2047bffa 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -397,10 +397,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -396,10 +396,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public void setVelocity(Vector velocity) { Preconditions.checkArgument(velocity != null, "velocity"); velocity.checkFinite(); diff --git a/Spigot-Server-Patches/0053-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0053-Add-exception-reporting-event.patch index e862da51a8..aab2aa7ae7 100644 --- a/Spigot-Server-Patches/0053-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0053-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From 3d0ef86c30ca141473b5286f5cb72d1a75413804 Mon Sep 17 00:00:00 2001 +From 132e8398b585be26653081f5ad7d9b558b9c0484 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 000000000..f699ce18c +index 0000000000..f699ce18ca --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java @@ -0,0 +1,38 @@ @@ -49,7 +49,7 @@ index 000000000..f699ce18c + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 1cf5e388e..c4103680d 100644 +index 1cf5e388e4..c4103680d4 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,6 @@ @@ -80,7 +80,7 @@ index 1cf5e388e..c4103680d 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 4f0fbe4a0..2dd1c28fa 100644 +index 4f0fbe4a0d..2dd1c28fab 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -14,6 +14,9 @@ import java.util.concurrent.Executor; @@ -94,7 +94,7 @@ index 4f0fbe4a0..2dd1c28fa 100644 public class ChunkProviderServer extends IChunkProvider { diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 1dd793d2f..61ea2818b 100644 +index 1dd793d2fb..61ea2818b1 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -1,5 +1,6 @@ @@ -121,10 +121,10 @@ index 1dd793d2f..61ea2818b 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 528d0f0cd..be903252b 100644 +index f49575b3ab..26125fe27a 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -621,6 +621,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -622,6 +622,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.world.checkSession(); } catch (ExceptionWorldConflict exceptionworldconflict) { PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict); @@ -132,7 +132,7 @@ index 528d0f0cd..be903252b 100644 return; } -@@ -647,6 +648,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -648,6 +649,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.write(chunkcoordintpair, nbttagcompound); } catch (Exception exception) { PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception); @@ -141,7 +141,7 @@ index 528d0f0cd..be903252b 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index d4a9af975..88b5aa3a5 100644 +index d4a9af975d..88b5aa3a51 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -1,5 +1,6 @@ @@ -168,7 +168,7 @@ index d4a9af975..88b5aa3a5 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 9d4febfbb..7e58e4714 100644 +index 9d4febfbb6..7e58e4714a 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -8,6 +8,7 @@ import org.apache.logging.log4j.LogManager; @@ -196,7 +196,7 @@ index 9d4febfbb..7e58e4714 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index d004494ae..d3ed749e1 100644 +index d004494aea..d3ed749e1c 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -1,5 +1,7 @@ @@ -216,7 +216,7 @@ index d004494ae..d3ed749e1 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 25e5216e2..01f510588 100644 +index 25e5216e25..01f5105884 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -255,7 +255,7 @@ index 25e5216e2..01f510588 100644 return; // Paper end diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index 3c5b3fe10..47a4ea998 100644 +index 3c5b3fe101..47a4ea9985 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -113,6 +113,7 @@ public class WorldPersistentData { @@ -267,7 +267,7 @@ index 3c5b3fe10..47a4ea998 100644 } finally { if (pushbackinputstream != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index d99634062..86a5ee8aa 100644 +index d99634062b..86a5ee8aac 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicInteger; diff --git a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch index 2a8f0565bd..6e86550a5a 100644 --- a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch @@ -1,22 +1,22 @@ -From 30a0f8ece5268608ed4328b4c2f6aeb9066b6689 Mon Sep 17 00:00:00 2001 +From d647d04ede2b5474f0cb91095508711bd941a00c Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:32:58 -0400 Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3bd624569..ab2ca1c32 100644 +index 7923808ff1..0fee51ac4a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1102,6 +1102,7 @@ public class WorldServer extends World { - this.I.add(((EntityInsentient) entity).getNavigation()); +@@ -1107,6 +1107,7 @@ public class WorldServer extends World { + entity.origin = entity.getBukkitEntity().getLocation(); } - entity.valid = true; // CraftBukkit + // Paper end + new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } } -@@ -1111,6 +1112,7 @@ public class WorldServer extends World { +@@ -1116,6 +1117,7 @@ public class WorldServer extends World { if (this.tickingEntities) { throw new IllegalStateException("Removing entity while ticking!"); } else { diff --git a/Spigot-Server-Patches/0096-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0096-EntityRegainHealthEvent-isFastRegen-API.patch index dca1633a46..ee03ea638a 100644 --- a/Spigot-Server-Patches/0096-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/0096-EntityRegainHealthEvent-isFastRegen-API.patch @@ -1,4 +1,4 @@ -From c246fe0efb76eae003ec61c0992ff8c4e4f3ae07 Mon Sep 17 00:00:00 2001 +From 80ed9953dd7370d6d04450471ef7049d4463ead8 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 01:43:11 -0500 Subject: [PATCH] EntityRegainHealthEvent isFastRegen API @@ -6,7 +6,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 5ae701488..780287f91 100644 +index 5ae7014887..482d6f7c62 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -963,10 +963,16 @@ public abstract class EntityLiving extends Entity { @@ -23,12 +23,12 @@ index 5ae701488..780287f91 100644 if (f1 > 0.0F) { - EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason); -+ EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason, isFastRegen); ++ EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason, isFastRegen); // Paper // Suppress during worldgen if (this.valid) { this.world.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java -index da07530d9..d184422fb 100644 +index da07530d99..d184422fbe 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -69,7 +69,7 @@ public class FoodMetaData { diff --git a/Spigot-Server-Patches/0148-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0148-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 1c0d2da491..98630558b6 100644 --- a/Spigot-Server-Patches/0148-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/0148-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -1,14 +1,14 @@ -From ee00b8612da19fa628bc39473263d4bb4a124bf2 Mon Sep 17 00:00:00 2001 +From 4d3fd62b7ff11893c01e2d58f9d6ca7c483d6573 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 7 Feb 2017 16:55:35 -0600 Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index be903252b..89a00ff8d 100644 +index 26125fe27a..9fe34782ed 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -314,7 +314,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -315,7 +315,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Spigot start org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant; activityAccountant.startActivity(0.5); diff --git a/Spigot-Server-Patches/0164-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0164-Entity-fromMobSpawner.patch index e1b790b755..1bae83746d 100644 --- a/Spigot-Server-Patches/0164-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0164-Entity-fromMobSpawner.patch @@ -1,11 +1,11 @@ -From f58c0fe41a80304f921ac5c534d2227aba155c0b Mon Sep 17 00:00:00 2001 +From aff8505a2edba9a9deb67a83ea1bcfd2809cf2d4 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 18 Jun 2017 18:17:05 -0500 Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ee7fe30c7..c28b498a2 100644 +index ee7fe30c7b..c28b498a2a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -181,6 +181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -37,7 +37,7 @@ index ee7fe30c7..c28b498a2 100644 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 6499d27e6..2b2af2daa 100644 +index 6499d27e63..2b2af2daa7 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -133,6 +133,7 @@ public abstract class MobSpawnerAbstract { @@ -49,10 +49,10 @@ index 6499d27e6..2b2af2daa 100644 if ( entity.world.spigotConfig.nerfSpawnerMobs ) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 5d9b4a58e..e0ae72bbc 100644 +index fb2047bffa..ac94d05733 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -983,5 +983,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -982,5 +982,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { Location origin = getHandle().origin; return origin == null ? null : origin.clone(); } diff --git a/Spigot-Server-Patches/0197-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0197-PlayerNaturallySpawnCreaturesEvent.patch index 76d164eea4..62a9e87e82 100644 --- a/Spigot-Server-Patches/0197-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0197-PlayerNaturallySpawnCreaturesEvent.patch @@ -1,4 +1,4 @@ -From 3755330b8b9222b50364f326b08619837d0865d2 Mon Sep 17 00:00:00 2001 +From 6f02cf46c9ae0b5b0516064e1bf23686d2966915 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 17:36:02 -0500 Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent @@ -9,10 +9,10 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 89a00ff8d..3fab45aa9 100644 +index 9fe34782ed..7273323e36 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -735,11 +735,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -736,11 +736,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int chunkRange = world.spigotConfig.mobSpawnRange; chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; diff --git a/Spigot-Server-Patches/0226-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0226-Expand-World.spawnParticle-API-and-add-Builder.patch index a5dd810dfd..27fc43e9c8 100644 --- a/Spigot-Server-Patches/0226-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0226-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -1,4 +1,4 @@ -From 587bf039a8a66b88900cf9ea3a7ad8c8f1ebb434 Mon Sep 17 00:00:00 2001 +From 81e3c774d217a1ae6db10ce67433a11e855a3629 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 15 Aug 2017 22:29:12 -0400 Subject: [PATCH] Expand World.spawnParticle API and add Builder @@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index bbf676958..e400cc05d 100644 +index 2e78e4af95..35190f6be8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1334,12 +1334,17 @@ public class WorldServer extends World { +@@ -1339,12 +1339,17 @@ public class WorldServer extends World { } public int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { @@ -34,7 +34,7 @@ index bbf676958..e400cc05d 100644 if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3fbc48150..ab54624d6 100644 +index 3fbc481500..ab54624d60 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1942,11 +1942,17 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0235-Fix-CraftEntity-hashCode.patch b/Spigot-Server-Patches/0235-Fix-CraftEntity-hashCode.patch index 2a4c554eca..9a8e7e10d9 100644 --- a/Spigot-Server-Patches/0235-Fix-CraftEntity-hashCode.patch +++ b/Spigot-Server-Patches/0235-Fix-CraftEntity-hashCode.patch @@ -1,4 +1,4 @@ -From f528a12b1b3b67cfd3718621f96e1db6c24590c9 Mon Sep 17 00:00:00 2001 +From 8cb1169a6d40a9fa1a52f2fa5324867dd93e2c28 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 10 Jun 2018 20:20:15 -0400 Subject: [PATCH] Fix CraftEntity hashCode @@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle() However, replaced it too to make it clearer of intent. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index e0ae72bbc..65621f966 100644 +index ac94d05733..0119c96066 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -686,14 +686,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -685,14 +685,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return false; } final CraftEntity other = (CraftEntity) obj; diff --git a/Spigot-Server-Patches/0250-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch b/Spigot-Server-Patches/0250-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch index ea4ea049d0..2f04eea316 100644 --- a/Spigot-Server-Patches/0250-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch +++ b/Spigot-Server-Patches/0250-Avoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patch @@ -1,4 +1,4 @@ -From 9c190db2972a8f21254928867c46fb46f765ea81 Mon Sep 17 00:00:00 2001 +From a0e89fc9bdcb2d541f5b95d942149be5eb65e23a 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,7 +10,7 @@ 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/World.java b/src/main/java/net/minecraft/server/World.java -index 3737fca81..6bd181565 100644 +index 3737fca817..6bd181565f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -759,7 +759,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -45,7 +45,7 @@ index 3737fca81..6bd181565 100644 chunk.setTileEntity(tileentity1.getPosition(), tileentity1); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 79be8cfa3..af62ab182 100644 +index 459b7646a9..8cbb61bb8a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1068,7 +1068,7 @@ public class WorldServer extends World { @@ -57,7 +57,7 @@ index 79be8cfa3..af62ab182 100644 if (entity instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) entity; -@@ -1122,9 +1122,12 @@ public class WorldServer extends World { +@@ -1127,9 +1127,12 @@ public class WorldServer extends World { } private void removeEntityFromChunk(Entity entity) { diff --git a/Spigot-Server-Patches/0264-Don-t-save-Proto-Chunks.patch b/Spigot-Server-Patches/0264-Don-t-save-Proto-Chunks.patch index 4f103eb6d7..0f762649c0 100644 --- a/Spigot-Server-Patches/0264-Don-t-save-Proto-Chunks.patch +++ b/Spigot-Server-Patches/0264-Don-t-save-Proto-Chunks.patch @@ -1,4 +1,4 @@ -From f29752f88bfc321f53e982778b9fa3004aaeca8b Mon Sep 17 00:00:00 2001 +From 993e0fdb99639953f4e7e22f238212b333997dd0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jul 2018 21:21:41 -0400 Subject: [PATCH] Don't save Proto Chunks @@ -8,10 +8,10 @@ the loadChunk method refuses to acknoledge they exists, and will restart a new chunk generation process to begin with, so saving them serves no benefit. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 3fab45aa9..26fd5dd1e 100644 +index 7273323e36..184a42e149 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -614,6 +614,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -615,6 +615,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public void saveChunk(IChunkAccess ichunkaccess, boolean save) { diff --git a/Spigot-Server-Patches/0274-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0274-Ignore-Dead-Entities-in-entityList-iteration.patch index 8a370b371f..fbb6d90253 100644 --- a/Spigot-Server-Patches/0274-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0274-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -1,4 +1,4 @@ -From bdc5870e89f2c479df6e0f68daedc579cdc60179 Mon Sep 17 00:00:00 2001 +From f4f84a5fc9331648ef73054255e7b40b0eee2c48 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 28 Jul 2018 12:18:27 -0400 Subject: [PATCH] Ignore Dead Entities in entityList iteration @@ -11,7 +11,7 @@ This will ensure that dead entities are skipped from iteration since they shouldn't of been in the list in the first place. diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index f38179e98..8e1bda4de 100644 +index f38179e983..8e1bda4de9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -176,6 +176,7 @@ public class PaperCommand extends Command { @@ -23,7 +23,7 @@ index f38179e98..8e1bda4de 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/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0c8a2ac90..21fae98c1 100644 +index 0c8a2ac902..21fae98c10 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -665,6 +665,7 @@ public class Chunk implements IChunkAccess { @@ -51,7 +51,7 @@ index 0c8a2ac90..21fae98c1 100644 if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check list.add(t0); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4648a93b0..33b2dd3ff 100644 +index 4648a93b0f..33b2dd3ff8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -123,6 +123,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -63,7 +63,7 @@ index 4648a93b0..33b2dd3ff 100644 private float av; private float aw; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3e41c080d..3bfe40bb6 100644 +index ece9900aac..716f3b7db5 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -843,6 +843,7 @@ public class WorldServer extends World { @@ -74,15 +74,15 @@ index 3e41c080d..3bfe40bb6 100644 // CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs if (entity instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) entity; -@@ -1131,6 +1132,7 @@ public class WorldServer extends World { - this.I.add(((EntityInsentient) entity).getNavigation()); +@@ -1136,6 +1137,7 @@ public class WorldServer extends World { + entity.origin = entity.getBukkitEntity().getLocation(); } - entity.valid = true; // CraftBukkit + // Paper end + entity.shouldBeRemoved = false; // Paper - shouldn't be removed after being re-added new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } -@@ -1145,6 +1147,7 @@ public class WorldServer extends World { +@@ -1150,6 +1152,7 @@ public class WorldServer extends World { this.removeEntityFromChunk(entity); this.entitiesById.remove(entity.getId()); this.unregisterEntity(entity); @@ -91,7 +91,7 @@ index 3e41c080d..3bfe40bb6 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f8870f37b..03148879f 100644 +index f8870f37bb..03148879f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -805,6 +805,7 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0292-Send-nearby-packets-from-world-player-list-not-serve.patch b/Spigot-Server-Patches/0292-Send-nearby-packets-from-world-player-list-not-serve.patch index 06b3488a15..199fcad9d2 100644 --- a/Spigot-Server-Patches/0292-Send-nearby-packets-from-world-player-list-not-serve.patch +++ b/Spigot-Server-Patches/0292-Send-nearby-packets-from-world-player-list-not-serve.patch @@ -1,11 +1,11 @@ -From 2984fd06f892aa0807e3c492261b4eb8b5200f2a Mon Sep 17 00:00:00 2001 +From 785f521dcc34233bfddbcdca33ad1c485330b1ab Mon Sep 17 00:00:00 2001 From: Mystiflow Date: Fri, 6 Jul 2018 13:21:30 +0100 Subject: [PATCH] Send nearby packets from world player list not server list diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6d464a3dc..823329268 100644 +index 6d464a3dc2..8233292688 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -919,8 +919,25 @@ public abstract class PlayerList { @@ -46,10 +46,10 @@ index 6d464a3dc..823329268 100644 double d5 = d1 - entityplayer.locY; double d6 = d2 - entityplayer.locZ; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3bfe40bb6..ffa5a0bee 100644 +index 716f3b7db5..1c1a847e4f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1183,7 +1183,7 @@ public class WorldServer extends World { +@@ -1188,7 +1188,7 @@ public class WorldServer extends World { } // CraftBukkit end this.globalEntityList.add(entitylightning); @@ -58,7 +58,7 @@ index 3bfe40bb6..ffa5a0bee 100644 } @Override -@@ -1318,8 +1318,8 @@ public class WorldServer extends World { +@@ -1323,8 +1323,8 @@ public class WorldServer extends World { BlockActionData blockactiondata = (BlockActionData) this.J.removeFirst(); if (this.a(blockactiondata)) { @@ -70,7 +70,7 @@ index 3bfe40bb6..ffa5a0bee 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 03148879f..e336813bd 100644 +index 03148879f4..e336813bdc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1817,7 +1817,7 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0330-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0330-Limit-lightning-strike-effect-distance.patch index cfbb6c5b59..7c5505b56f 100644 --- a/Spigot-Server-Patches/0330-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0330-Limit-lightning-strike-effect-distance.patch @@ -1,11 +1,11 @@ -From 9987394561bd9b42c7871e0b7e79e9b42132bc4b Mon Sep 17 00:00:00 2001 +From 1af98558db80ae6bb1362e8f8446bff29736d4fd Mon Sep 17 00:00:00 2001 From: Trigary Date: Fri, 14 Sep 2018 17:42:08 +0200 Subject: [PATCH] Limit lightning strike effect distance diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2c27be63e..fb44fccc9 100644 +index 2c27be63ea..fb44fccc92 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -234,6 +234,28 @@ public class PaperWorldConfig { @@ -38,7 +38,7 @@ index 2c27be63e..fb44fccc9 100644 public boolean firePhysicsEventForRedstone = false; private void firePhysicsEventForRedstone() { diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index adf68d165..fbcda86b3 100644 +index adf68d1650..fbcda86b38 100644 --- a/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java @@ -64,6 +64,17 @@ public class EntityLightning extends Entity { @@ -69,10 +69,10 @@ index adf68d165..fbcda86b3 100644 --this.lifeTicks; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ffa5a0bee..6d8fb1290 100644 +index 1c1a847e4f..ef706f66e4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1183,7 +1183,7 @@ public class WorldServer extends World { +@@ -1188,7 +1188,7 @@ public class WorldServer extends World { } // CraftBukkit end this.globalEntityList.add(entitylightning); diff --git a/Spigot-Server-Patches/0340-Use-more-reasonable-thread-count-default-for-bootstr.patch b/Spigot-Server-Patches/0340-Use-more-reasonable-thread-count-default-for-bootstr.patch index ed202b2f7e..9dac8a7926 100644 --- a/Spigot-Server-Patches/0340-Use-more-reasonable-thread-count-default-for-bootstr.patch +++ b/Spigot-Server-Patches/0340-Use-more-reasonable-thread-count-default-for-bootstr.patch @@ -1,14 +1,14 @@ -From 4695bc2677c6882ebf9e3495083c3e136c5d63b8 Mon Sep 17 00:00:00 2001 +From 7c8038f69b3869f7cd7f9746c0e45720ef2164bf Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Oct 2018 23:14:38 -0400 Subject: [PATCH] Use more reasonable thread count default for bootstrap diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 6827936435..983d1b132e 100644 +index 5fae5a1233..6bc576f10f 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java -@@ -70,7 +70,7 @@ public class SystemUtils { +@@ -66,7 +66,7 @@ public class SystemUtils { } private static ExecutorService k() { diff --git a/Spigot-Server-Patches/0373-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0373-Entity-getEntitySpawnReason.patch index 133c107f4e..b504137887 100644 --- a/Spigot-Server-Patches/0373-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0373-Entity-getEntitySpawnReason.patch @@ -1,4 +1,4 @@ -From 726f4cc81771f7b6e8762a1f109a4214b8eee0ea Mon Sep 17 00:00:00 2001 +From e294e9bfa44c71ce198af03348d27b48949fb2c7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 00:24:52 -0400 Subject: [PATCH] Entity#getEntitySpawnReason @@ -72,7 +72,7 @@ index 7d93715424..3d1c910ccf 100644 }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6d8fb12903..c555478e82 100644 +index ef706f66e4..a296b0c2c7 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -939,6 +939,7 @@ public class WorldServer extends World { @@ -84,10 +84,10 @@ index 6d8fb12903..c555478e82 100644 if (entity.dead) { // Paper start diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 65621f9661..1a5b62cf4b 100644 +index 0119c96066..ed5217b4ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -989,5 +989,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -988,5 +988,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean fromMobSpawner() { return getHandle().spawnedViaMobSpawner; }