From c9ef3d1cfc29eaea62134f546ce1cd7f21de4794 Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Thu, 12 Dec 2019 00:43:22 +0100 Subject: [PATCH] Patches 100-260 (#2729) --- ...-get-a-BlockState-without-a-snapshot.patch | 4 +- .../Ability-to-apply-mending-to-XP-API.patch | 6 +- ...e-PlayerProfile-in-AsyncPreLoginEven.patch | 2 +- ...to-control-if-armour-stands-can-move.patch | 2 +- .../Add-ArmorStand-Item-Meta.patch | 6 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 10 +- .../Add-EntityZapEvent.patch | 8 +- .../Add-PlayerArmorChangeEvent.patch | 6 +- .../Add-PlayerJumpEvent.patch | 6 +- .../Add-ProjectileCollideEvent.patch | 12 +- .../Add-UnknownCommandEvent.patch | 2 +- ...to-disable-ender-dragon-legacy-check.patch | 4 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- ...d-method-to-open-already-placed-sign.patch | 2 +- ...ke-parrots-stay-on-shoulders-despite.patch | 12 +- .../Add-server-name-parameter.patch | 2 +- .../Add-setPlayerProfile-API-for-Skulls.patch | 4 +- ...setting-for-proxy-online-mode-status.patch | 6 +- .../Add-source-to-PlayerExpChangeEvent.patch | 4 +- ...property-to-disable-book-size-limits.patch | 2 +- .../Allow-Reloading-of-Command-Aliases.patch | 2 +- ...Item-entities-with-World.spawnEntity.patch | 2 +- ...-a-custom-authentication-servers-dow.patch | 4 +- .../AsyncTabCompleteEvent.patch | 6 +- ...uto-fix-bad-Y-levels-on-player-login.patch | 2 +- .../Avoid-NPE-in-PathfinderGoalTempt.patch | 2 +- ...blocking-on-Network-Manager-creation.patch | 10 +- ...e-if-stack-size-above-max-stack-size.patch | 18 +- .../Basic-PlayerProfile-API.patch | 20 +- .../Block-Enderpearl-Travel-Exploit.patch | 4 +- ...player-logins-during-server-shutdown.patch | 2 +- .../Bound-Treasure-Maps-to-World-Border.patch | 4 +- .../Cache-user-authenticator-threads.patch | 117 ++++---- ...ServerListPingEvent-for-legacy-pings.patch | 4 +- .../Cap-Entity-Collisions.patch | 8 +- .../Chunk-registration-fixes.patch | 10 +- ...le-Alternative-LootPool-Luck-Formula.patch | 4 +- .../Configurable-Bed-Search-Radius.patch | 4 +- ...figurable-Cartographer-Treasure-Maps.patch | 20 +- .../Configurable-flying-kick-messages.patch | 4 +- ...onfigurable-packet-in-spam-threshold.patch | 4 +- ...urable-sprint-interruption-on-attack.patch | 4 +- ...le-Explicit-Network-Manager-Flushing.patch | 2 +- ...refix-for-various-plugins-bypassing-.patch | 2 +- .../Do-not-let-armorstands-drown.patch | 12 +- ...llow-entities-to-ride-themselves-572.patch | 2 +- ...ge-the-Entity-Random-seed-for-squids.patch | 4 +- .../Don-t-let-fishinghooks-use-portals.patch | 16 +- ...Chunks-from-Hoppers-and-other-things.patch | 33 --- ...e-profiles-that-have-no-UUID-and-no-.patch | 2 +- ...y-scoreboard-teams-to-scoreboard.dat.patch | 4 +- .../EnderDragon-Events.patch | 8 +- .../Enderman.teleportRandomly.patch | 12 +- .../EndermanAttackPlayerEvent.patch | 2 +- .../EndermanEscapeEvent.patch | 18 +- .../Enforce-Sync-Player-Saves.patch | 2 +- .../Entity-fromMobSpawner.patch | 6 +- ...ent-consumeArrow-and-getArrowItem-AP.patch | 10 +- .../Expand-Explosions-API.patch | 2 +- ...ld.spawnParticle-API-and-add-Builder.patch | 6 +- .../ExperienceOrbMergeEvent.patch | 2 +- ...PI-for-Reason-Source-Triggering-play.patch | 70 ++--- ...nt-protocol-version-and-virtual-host.patch | 10 +- .../Extend-Player-Interact-cancellation.patch | 2 +- ...r-redstone-torch-rapid-clock-removal.patch | 6 +- .../Fill-Profile-Property-Events.patch | 2 +- ...a-from-ArmorStand-and-SpawnEgg-items.patch | 4 +- ...e-EntityShootBowEvent-for-Illusioner.patch | 2 +- Spigot-Server-Patches/Firework-API-s.patch | 24 +- .../Fix-CraftEntity-hashCode.patch | 2 +- .../Fix-Double-World-Add-issues.patch | 2 +- .../Fix-Dragon-Server-Crashes.patch | 10 +- .../Fix-MC-117075-TE-Unload-Lag-Spike.patch | 4 +- ...ting-location-from-InventoryEnderChe.patch | 2 +- .../Fix-Old-Sign-Conversion.patch | 8 +- ...-allowed-colored-signs-to-be-created.patch | 2 +- .../Fix-this-stupid-bullshit.patch | 4 +- .../Flag-to-disable-the-channel-limit.patch | 2 +- ...n-prefixes-using-Log4J-configuration.patch | 6 +- ...ecipes-in-RecipeBook-to-avoid-data-e.patch | 6 +- ...plement-EntityKnockbackByEntityEvent.patch | 2 +- ...lement-EntityTeleportEndGatewayEvent.patch | 2 +- .../Implement-World.getEntity-UUID-API.patch | 2 +- ...mplement-ensureServerConversions-API.patch | 2 +- ...nt-extended-PaperServerListPingEvent.patch | 14 +- .../Implement-getI18NDisplayName.patch | 2 +- .../Improve-the-Saddle-API-for-Horses.patch | 6 +- .../Improved-Async-Task-Scheduler.patch | 4 +- .../Include-Log4J2-SLF4J-implementation.patch | 2 +- .../InventoryCloseEvent-Reason-API.patch | 18 +- .../Item-canEntityPickup.patch | 8 +- .../ItemStack-getMaxItemUseDuration.patch | 4 +- ...ivingEntity-Hand-Raised-Item-Use-API.patch | 24 +- .../LivingEntity-setKiller.patch | 8 +- ...-API-Replenishable-Lootables-Feature.patch | 12 +- ...ke-legacy-ping-handler-more-reliable.patch | 2 +- ...-max-squid-spawn-height-configurable.patch | 4 +- ...Make-player-data-saving-configurable.patch | 4 +- ...e-shield-blocking-delay-configurable.patch | 8 +- ...more-aggressive-in-the-chunk-unload-.patch | 17 +- ...mative-vehicle-moved-wrongly-message.patch | 2 +- ...awns-should-honor-nametags-and-leash.patch | 2 +- ...on-Wither-Death-sounds-to-same-world.patch | 14 +- ...ptimise-BlockState-s-hashCode-equals.patch | 8 +- .../Optimise-removeQueue.patch | 117 ++++---- .../Optimize-ItemStack.isEmpty.patch | 2 +- .../Optimize-RegistryID.c.patch | 2 +- .../Optimize-UserCache-Thread-Safe.patch | 6 +- ...imize-World.isLoaded-BlockPosition-Z.patch | 23 -- ...-maximum-exp-value-when-merging-orbs.patch | 4 +- ...tion-to-remove-corrupt-tile-entities.patch | 4 +- .../Optional-TNT-doesn-t-move-in-water.patch | 16 +- .../Player.setPlayerProfile-API.patch | 20 +- ...PlayerAdvancementCriterionGrantEvent.patch | 2 +- .../PlayerAttemptPickupItemEvent.patch | 2 +- .../PlayerElytraBoostEvent.patch | 4 +- .../PlayerLaunchProjectileEvent.patch | 260 ------------------ .../PlayerNaturallySpawnCreaturesEvent.patch | 2 +- .../PlayerPickupExperienceEvent.patch | 8 +- ...PlayerPickupItemEvent-setFlyAtPlayer.patch | 4 +- .../PlayerReadyArrowEvent.patch | 4 +- .../PlayerTeleportEndGatewayEvent.patch | 2 +- .../PreCreatureSpawnEvent.patch | 47 ++-- ...sted-Ice-from-loading-holding-chunks.patch | 13 +- ...vent-Pathfinding-out-of-World-Border.patch | 2 +- ...rom-being-processed-when-the-player-.patch | 2 +- ...ils-when-failing-to-save-player-data.patch | 2 +- .../Profile-Lookup-Events.patch | 2 +- .../ProfileWhitelistVerifyEvent.patch | 4 +- .../Properly-fix-item-duplication-bug.patch | 4 +- ...le-async-calls-to-restart-the-server.patch | 8 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 2 +- Spigot-Server-Patches/RangedEntity-API.patch | 16 +- ...nilla-entity-warnings-for-duplicates.patch | 2 +- ...ers-that-dismount-from-other-players.patch | 6 +- ...nventory-when-cancelling-PlayerInter.patch | 2 +- ...e-CraftScheduler-Async-Task-Debugger.patch | 2 +- ...ok-reference-on-Craft-Entity-removal.patch | 2 +- ...imer-when-spawner-event-is-cancelled.patch | 2 +- ...dEffects-only-to-players-who-can-see.patch | 36 +-- .../Shoulder-Entities-Release-API.patch | 6 +- .../Speedup-BlockPos-by-fixing-inlining.patch | 36 +-- .../String-based-Action-Bar-API.patch | 2 +- .../Tameable-getOwnerUniqueId-API.patch | 4 +- ...r-crits-helps-mitigate-hacked-client.patch | 4 +- ...ed-flag-on-cancel-of-Explosion-Event.patch | 4 +- ...ams-to-redirect-System.out-err-to-lo.patch | 4 +- ...oleAppender-for-console-improvements.patch | 14 +- .../Use-asynchronous-Log4j-2-loggers.patch | 2 +- .../Vex-getSummoner-API.patch | 4 +- .../WitchConsumePotionEvent.patch | 2 +- .../WitchReadyPotionEvent.patch | 8 +- .../WitchThrowPotionEvent.patch | 4 +- ...-more-information-to-Entity.toString.patch | 4 +- .../getPlayerUniqueId-API.patch | 2 +- .../handle-PacketPlayInKeepAlive-async.patch | 2 +- ...urable-option-to-disable-creeper-lin.patch | 6 +- ...rt-serverside-behavior-of-keepalives.patch | 2 +- ...e-implementations-for-captured-block.patch | 4 +- 159 files changed, 639 insertions(+), 954 deletions(-) delete mode 100644 Spigot-Server-Patches/Don-t-load-Chunks-from-Hoppers-and-other-things.patch delete mode 100644 Spigot-Server-Patches/Optimize-World.isLoaded-BlockPosition-Z.patch delete mode 100644 Spigot-Server-Patches/PlayerLaunchProjectileEvent.patch diff --git a/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch index 4c53282f07..789acba8f1 100644 --- a/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/API-to-get-a-BlockState-without-a-snapshot.patch @@ -13,7 +13,7 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index af6977dcd..c72b01386 100644 +index 630b27915..958279249 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -39,7 +39,7 @@ index af6977dcd..c72b01386 100644 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index d3e524093..da3c50c70 100644 +index 3d632543b..887ade5e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -0,0 +0,0 @@ public class CraftBlock implements Block { diff --git a/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch index f8bd950c00..6bfc57068a 100644 --- a/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/Ability-to-apply-mending-to-XP-API.patch @@ -10,7 +10,7 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java -index ed9aedc07..1d16919e6 100644 +index 1822178e8..fabc7a8dd 100644 --- a/src/main/java/net/minecraft/server/EnchantmentManager.java +++ b/src/main/java/net/minecraft/server/EnchantmentManager.java @@ -0,0 +0,0 @@ public class EnchantmentManager { @@ -26,7 +26,7 @@ index ed9aedc07..1d16919e6 100644 public static Entry b(Enchantment enchantment, EntityLiving entityliving) { Map map = enchantment.a(entityliving); diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index e6b810756..ba3e66f9e 100644 +index b3edb69a9..87c6b77ce 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { @@ -43,7 +43,7 @@ index e6b810756..ba3e66f9e 100644 return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3e8979dfe..a1481c5b8 100644 +index cade504af..c82de14eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index b2e22ccbd6..e22856e52a 100644 --- a/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-Server-Patches/Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index a2af5b4b29..a272a70303 100644 +index 828b64e41..0614976b8 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch index fb5be837a5..3455666282 100644 --- a/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/Spigot-Server-Patches/Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 2e7d966c2..3e78b152f 100644 +index 9d0b85d1c..37ce4d48b 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { diff --git a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch index 680775a571..9531a1686d 100644 --- a/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/Add-ArmorStand-Item-Meta.patch @@ -13,7 +13,7 @@ starting point for future additions in this area. Fixes GH-559 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java -index f700522840..3723faccac 100644 +index f70052284..3723facca 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -0,0 +0,0 @@ import org.bukkit.Material; @@ -267,7 +267,7 @@ index f700522840..3723faccac 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 479a5686aa..6a6b80b5bd 100644 +index 5ee968f2e..1eede4bcc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -288,7 +288,7 @@ index 479a5686aa..6a6b80b5bd 100644 } return HANDLED_TAGS; diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index b07a3051ca..919f2ffa91 100644 +index 630233960..3a82bede7 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java @@ -0,0 +0,0 @@ import java.util.ArrayList; diff --git a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 4b8b6b9700..2ec0e5e22e 100644 --- a/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6ada92379..924187413 100644 +index 5823b3740..3458333c9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -19,7 +19,7 @@ index 6ada92379..924187413 100644 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 649600b3e..db938da25 100644 +index df24bac3b..a2b09597f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -40,10 +40,10 @@ index 649600b3e..db938da25 100644 protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6226a8c1a..95c809ba9 100644 +index 39b136935..7fcc8c52d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean pvpMode; public boolean keepSpawnInMemory = true; public org.bukkit.generator.ChunkGenerator generator; @@ -52,7 +52,7 @@ index 6226a8c1a..95c809ba9 100644 public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3671b44fe..a5ba64a4c 100644 +index 5e6601d0f..110d6e571 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/Add-EntityZapEvent.patch b/Spigot-Server-Patches/Add-EntityZapEvent.patch index 430dd4d89f..923ad53736 100644 --- a/Spigot-Server-Patches/Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/Add-EntityZapEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityZapEvent diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java -index ee5bfd6f0c..7136e274af 100644 +index 5c24e22c7..8d277566e 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java @@ -0,0 +0,0 @@ public class EntityPig extends EntityAnimal { @@ -22,7 +22,7 @@ index ee5bfd6f0c..7136e274af 100644 if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) { return; diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 89065deb4f..dcd02930d9 100644 +index 27afee2e3..00300c6aa 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @@ -35,11 +35,11 @@ index 89065deb4f..dcd02930d9 100644 + } + // Paper end + - entitywitch.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch); + entitywitch.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch); entitywitch.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entitywitch)), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null); entitywitch.setNoAI(this.isNoAI()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 7936180b47..9af320a562 100644 +index de26145ee..ba14f66f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch index 7bb2bce09a..30ed6666e4 100644 --- a/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 46dfb3c498..74c1f7c447 100644 +index bf049bfc4..c03fcd2d3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ @@ -14,7 +14,7 @@ index 46dfb3c498..74c1f7c447 100644 +import com.destroystokyo.paper.event.player.PlayerArmorChangeEvent; import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; - import com.google.common.collect.Maps; + import com.google.common.collect.ImmutableSet; @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { ItemStack itemstack1 = this.getEquipment(enumitemslot); @@ -30,7 +30,7 @@ index 46dfb3c498..74c1f7c447 100644 if (!itemstack.isEmpty()) { this.getAttributeMap().a(itemstack.a(enumitemslot)); diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java -index 02a7ae6785..60b235f16f 100644 +index 02a7ae678..60b235f16 100644 --- a/src/main/java/net/minecraft/server/EnumItemSlot.java +++ b/src/main/java/net/minecraft/server/EnumItemSlot.java @@ -0,0 +0,0 @@ public enum EnumItemSlot { diff --git a/Spigot-Server-Patches/Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch index a838cbf787..26f192f76f 100644 --- a/Spigot-Server-Patches/Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 579c551f95..5e3ca96871 100644 +index 01ab2e151..399724d6a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; @@ -18,8 +18,8 @@ index 579c551f95..5e3ca96871 100644 // CraftBukkit end @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { - d8 = d5 - this.p; - d9 = d6 - this.q; + } + if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) { - this.player.jump(); + // Paper start - Add player jump event diff --git a/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch index 752e745897..751e777f12 100644 --- a/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/Add-ProjectileCollideEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ProjectileCollideEvent diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 2b829abac6..a9575d310b 100644 +index fc70d50ac..0c3664758 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -0,0 +0,0 @@ public abstract class EntityArrow extends Entity implements IProjectile { @@ -27,7 +27,7 @@ index 2b829abac6..a9575d310b 100644 this.a((MovingObjectPosition) object); this.impulse = true; diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java -index 1a9fee8da1..14c4394933 100644 +index 078cc2523..6756c79b3 100644 --- a/src/main/java/net/minecraft/server/EntityFireball.java +++ b/src/main/java/net/minecraft/server/EntityFireball.java @@ -0,0 +0,0 @@ public abstract class EntityFireball extends Entity { @@ -49,7 +49,7 @@ index 1a9fee8da1..14c4394933 100644 // CraftBukkit start - Fire ProjectileHitEvent diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 390f1a24d0..758559d35d 100644 +index 7a8b8b0d6..8ad0d0db1 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { @@ -71,11 +71,11 @@ index 390f1a24d0..758559d35d 100644 if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) { this.hooked = ((MovingObjectPositionEntity) movingobjectposition).getEntity(); diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index d1710259ce..5f0cb4c33d 100644 +index 2e4c9d426..724b78b5d 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -0,0 +0,0 @@ public abstract class EntityProjectile extends Entity implements IProjectile { - this.as = null; + this.ap = null; } - if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { @@ -93,7 +93,7 @@ index d1710259ce..5f0cb4c33d 100644 this.c(((MovingObjectPositionBlock) movingobjectposition).getBlockPosition()); } else { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 30492170b5..7f38d82a61 100644 +index 3c52b40a3..2bf53db88 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/Add-UnknownCommandEvent.patch index fcbf83460f..08e19d21dd 100644 --- a/Spigot-Server-Patches/Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/Add-UnknownCommandEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add UnknownCommandEvent diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7179692e11..344c99d107 100644 +index cd58906ad..202f6ad68 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import net.minecraft.server.WorldServer; diff --git a/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch index 420c0ae0a0..f9e7e56a3a 100644 --- a/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/Add-config-to-disable-ender-dragon-legacy-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add config to disable ender dragon legacy check diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6c3d074b8..bf08deb25 100644 +index 54bf1323e..f5cafbeca 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index 6c3d074b8..bf08deb25 100644 + } } diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 88a8e4abd..6700c8c65 100644 +index f2c0e06ba..032561f51 100644 --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java @@ -0,0 +0,0 @@ public class EnderDragonBattle { diff --git a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch index d8005ca551..8a0c87d2ee 100644 --- a/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index b5a50afd24..11d2a1013b 100644 +index 5a83fc21c..295b8390c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -20,7 +20,7 @@ index b5a50afd24..11d2a1013b 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ca6158dc73..8e6f23d278 100644 +index 811c33b90..77bb68605 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch index 966dfaba70..b604dafd28 100644 --- a/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/Add-method-to-open-already-placed-sign.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 6cce1928a..2f24b52dd 100644 +index a1397d142..cd8ad2704 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch index cf3fd54da1..b7e005160f 100644 --- a/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -11,7 +11,7 @@ I suspect Mojang may switch to this behavior before full release. To be converted into a Paper-API event at some point in the future? diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2d01984f0..42c4a9445 100644 +index e00e1e8f6..f151e43c3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -26,25 +26,25 @@ index 2d01984f0..42c4a9445 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 4ceac0a2f..c162c6b73 100644 +index 242d0df1c..673e2b79d 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { this.j(this.getShoulderEntityLeft()); this.j(this.getShoulderEntityRight()); - if (!this.world.isClientSide && (this.fallDistance > 0.5F || this.isInWater() || this.isPassenger()) || this.abilities.isFlying || this.isSleeping()) { + if (!this.world.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.isFlying || this.isSleeping()) { - this.releaseShoulderEntities(); + if (!this.world.paperConfig.parrotsHangOnBetter) this.releaseShoulderEntities(); // Paper - Hang on! } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 068827e2e..579c551f9 100644 +index cc6a2aaeb..01ab2e151 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { switch (packetplayinentityaction.c()) { - case START_SNEAKING: + case PRESS_SHIFT_KEY: this.player.setSneaking(true); + + // Paper start - Hang on! @@ -54,6 +54,6 @@ index 068827e2e..579c551f9 100644 + // Paper end + break; - case STOP_SNEAKING: + case RELEASE_SHIFT_KEY: this.player.setSneaking(false); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Add-server-name-parameter.patch b/Spigot-Server-Patches/Add-server-name-parameter.patch index d60b1953a4..f0467d41b9 100644 --- a/Spigot-Server-Patches/Add-server-name-parameter.patch +++ b/Spigot-Server-Patches/Add-server-name-parameter.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 484f1995a..ad1da9ddd 100644 +index 2481c1860..4a4e56e76 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { diff --git a/Spigot-Server-Patches/Add-setPlayerProfile-API-for-Skulls.patch b/Spigot-Server-Patches/Add-setPlayerProfile-API-for-Skulls.patch index 75d9e967b7..45d5b30ad7 100644 --- a/Spigot-Server-Patches/Add-setPlayerProfile-API-for-Skulls.patch +++ b/Spigot-Server-Patches/Add-setPlayerProfile-API-for-Skulls.patch @@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo which commonly cause rate limit issues with Mojang API diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java -index a4bc7f9701..2dd2f476f0 100644 +index a4bc7f970..2dd2f476f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java @@ -0,0 +0,0 @@ @@ -48,7 +48,7 @@ index a4bc7f9701..2dd2f476f0 100644 public BlockFace getRotation() { BlockData blockData = getBlockData(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 0136e1bfe1..aee97b9f03 100644 +index a83abc722..c29a78fd3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java @@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.inventory; diff --git a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch index 2fd96bbaea..dd24c2920f 100644 --- a/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/Add-setting-for-proxy-online-mode-status.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add setting for proxy online mode status diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index cbfe12734d..1daa2e4535 100644 +index 67f35fe66..53f96a157 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ import org.bukkit.configuration.InvalidConfigurationException; @@ -31,7 +31,7 @@ index cbfe12734d..1daa2e4535 100644 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 21a8ed3231..0794aff5b7 100644 +index 1422503e1..d3c2e1bed 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -0,0 +0,0 @@ public class NameReferencingFileConverter { @@ -45,7 +45,7 @@ index 21a8ed3231..0794aff5b7 100644 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6f6b0bea39..893d3e5c4c 100644 +index 09c62261a..08019fc94 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/Add-source-to-PlayerExpChangeEvent.patch index 5699e4b82d..f7583fbe31 100644 --- a/Spigot-Server-Patches/Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/Add-source-to-PlayerExpChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 332dc0e53a..eec6de9ad7 100644 +index f72bb0c13..0447800d9 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { @@ -18,7 +18,7 @@ index 332dc0e53a..eec6de9ad7 100644 this.die(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 9af320a562..30492170b5 100644 +index ba14f66f7..3c52b40a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ import org.bukkit.entity.ThrownPotion; diff --git a/Spigot-Server-Patches/Add-system-property-to-disable-book-size-limits.patch b/Spigot-Server-Patches/Add-system-property-to-disable-book-size-limits.patch index 53112db4ea..4b5d950af1 100644 --- a/Spigot-Server-Patches/Add-system-property-to-disable-book-size-limits.patch +++ b/Spigot-Server-Patches/Add-system-property-to-disable-book-size-limits.patch @@ -11,7 +11,7 @@ to make books with as much data as they want. Do not use this without limiting incoming data from packets in some other way. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index 804fe9499..7262920c1 100644 +index 0e89025a0..1bf74bdae 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -0,0 +0,0 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { diff --git a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch index 7e4ad70690..3fa9bfc134 100644 --- a/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/Allow-Reloading-of-Command-Aliases.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 893d3e5c4c..ca6158dc73 100644 +index 08019fc94..811c33b90 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch index 9f4a246b17..c0b3b15c32 100644 --- a/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,7 +8,7 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3726f240ce..515f94aa5d 100644 +index a66e4c3f1..6a7c088f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch index 37bac1f0f8..291f68c60a 100644 --- a/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/Allow-specifying-a-custom-authentication-servers-dow.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 11d2a1013b..11f08c2b73 100644 +index 295b8390c..5884b04f7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ @@ -27,7 +27,7 @@ index 11d2a1013b..11f08c2b73 100644 + } } diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 977a5009dd..c3ff7a6b8f 100644 +index 6f7c71579..a1be28390 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { diff --git a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch index c472de0e3c..1aa58f25a4 100644 --- a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch @@ -14,7 +14,7 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1d140b3fe7..6008613fae 100644 +index 9af8e947e..ad2a36627 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -72,7 +72,7 @@ index 1d140b3fe7..6008613fae 100644 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 308ae2e157..3938adf7c7 100644 +index 2f7769c00..9fe19fb59 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -85,7 +85,7 @@ index 308ae2e157..3938adf7c7 100644 return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions(); diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java -index 5510266fb1..a51202ed53 100644 +index 5510266fb..a51202ed5 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java +++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java @@ -0,0 +0,0 @@ public class ConsoleCommandCompleter implements Completer { diff --git a/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch index 4bec196251..c2f75efcf1 100644 --- a/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/Auto-fix-bad-Y-levels-on-player-login.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 2d29e9d86..7b0c89ce7 100644 +index a9827322c..3e958eaf8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/Avoid-NPE-in-PathfinderGoalTempt.patch b/Spigot-Server-Patches/Avoid-NPE-in-PathfinderGoalTempt.patch index 17ea5d998b..42235abef1 100644 --- a/Spigot-Server-Patches/Avoid-NPE-in-PathfinderGoalTempt.patch +++ b/Spigot-Server-Patches/Avoid-NPE-in-PathfinderGoalTempt.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Avoid NPE in PathfinderGoalTempt diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java -index fb395bcded..d1164dd682 100644 +index eafdcb916..d37a2fa0a 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java @@ -0,0 +0,0 @@ public class PathfinderGoalTempt extends PathfinderGoal { diff --git a/Spigot-Server-Patches/Avoid-blocking-on-Network-Manager-creation.patch b/Spigot-Server-Patches/Avoid-blocking-on-Network-Manager-creation.patch index 5ec8cd7362..00f2a482eb 100644 --- a/Spigot-Server-Patches/Avoid-blocking-on-Network-Manager-creation.patch +++ b/Spigot-Server-Patches/Avoid-blocking-on-Network-Manager-creation.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Avoid blocking on Network Manager creation Per Paper issue 294 diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java -index 7de96ae69d..379c79272b 100644 +index bd5563577..e6fac155d 100644 --- a/src/main/java/net/minecraft/server/ServerConnection.java +++ b/src/main/java/net/minecraft/server/ServerConnection.java @@ -0,0 +0,0 @@ public class ServerConnection { public volatile boolean c; private final List f = Collections.synchronizedList(Lists.newArrayList()); - private final List g = Collections.synchronizedList(Lists.newArrayList()); + private final List listeningChannels = Collections.synchronizedList(Lists.newArrayList()); + // Paper start - prevent blocking on adding a new network manager while the server is ticking + private final List pending = Collections.synchronizedList(Lists.newArrayList()); + private void addPending() { + synchronized (pending) { -+ this.g.addAll(pending); // Paper - OBFHELPER - List of network managers ++ this.listeningChannels.addAll(pending); + pending.clear(); + } + } @@ -29,14 +29,14 @@ index 7de96ae69d..379c79272b 100644 channel.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new LegacyPingHandler(ServerConnection.this)).addLast("splitter", new PacketSplitter()).addLast("decoder", new PacketDecoder(EnumProtocolDirection.SERVERBOUND)).addLast("prepender", new PacketPrepender()).addLast("encoder", new PacketEncoder(EnumProtocolDirection.CLIENTBOUND)); NetworkManager networkmanager = new NetworkManager(EnumProtocolDirection.SERVERBOUND); -- ServerConnection.this.g.add(networkmanager); +- ServerConnection.this.listeningChannels.add(networkmanager); + pending.add(networkmanager); // Paper channel.pipeline().addLast("packet_handler", networkmanager); networkmanager.setPacketListener(new HandshakeListener(ServerConnection.this.e, networkmanager)); } @@ -0,0 +0,0 @@ public class ServerConnection { - synchronized (this.g) { + synchronized (this.listeningChannels) { // Spigot Start + addPending(); // Paper // This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order diff --git a/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch index 2c7900f92b..98babad52a 100644 --- a/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch +++ b/Spigot-Server-Patches/Avoid-item-merge-if-stack-size-above-max-stack-size.patch @@ -5,18 +5,18 @@ Subject: [PATCH] Avoid item merge if stack size above max stack size diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index f1f86ef8b5..6e026d34f0 100644 +index fcc1c0993..5f46c7f86 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ public class EntityItem extends Entity { - } private void mergeNearby() { -+ // Paper start - avoid item merge if stack size above max stack size -+ ItemStack stack = getItemStack(); -+ if (stack.getCount() >= stack.getMaxStackSize()) return; -+ // Paper end - // Spigot start - double radius = world.spigotConfig.itemMerge; - List list = this.world.a(EntityItem.class, this.getBoundingBox().grow(radius, radius, radius), (entityitem) -> { + if (this.w()) { ++ // Paper start - avoid item merge if stack size above max stack size ++ ItemStack stack = getItemStack(); ++ if (stack.getCount() >= stack.getMaxStackSize()) return; ++ // Paper end + // Spigot start + double radius = world.spigotConfig.itemMerge; + List list = this.world.a(EntityItem.class, this.getBoundingBox().grow(radius, radius, radius), (entityitem) -> { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index 5195586594..c10f820d2f 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -7,7 +7,7 @@ Establishes base extension of profile systems for future edits too diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java new file mode 100644 -index 0000000000..b151a13c1b +index 000000000..b151a13c1 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java @@ -0,0 +0,0 @@ @@ -293,7 +293,7 @@ index 0000000000..b151a13c1b +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java new file mode 100644 -index 0000000000..25836b975b +index 000000000..25836b975 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java @@ -0,0 +0,0 @@ @@ -329,7 +329,7 @@ index 0000000000..25836b975b +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java new file mode 100644 -index 0000000000..3bcdb8f93f +index 000000000..3bcdb8f93 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java @@ -0,0 +0,0 @@ @@ -352,7 +352,7 @@ index 0000000000..3bcdb8f93f +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java new file mode 100644 -index 0000000000..4b2a67423f +index 000000000..4b2a67423 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java @@ -0,0 +0,0 @@ @@ -387,7 +387,7 @@ index 0000000000..4b2a67423f +} diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java new file mode 100644 -index 0000000000..3aceb0ea8a +index 000000000..3aceb0ea8 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java @@ -0,0 +0,0 @@ @@ -403,7 +403,7 @@ index 0000000000..3aceb0ea8a + } +} diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 1f6a126329..6d278a0da5 100644 +index 1f6a12632..6d278a0da 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -0,0 +0,0 @@ @@ -429,7 +429,7 @@ index 1f6a126329..6d278a0da5 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6c9a43d66b..6e6c662f95 100644 +index 7df3ae0ec..1ddb10741 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant @@ -23,7 +23,7 @@ index 464e1e101..7b2eace75 100644 if (structurestart != null && structurestart.e()) { diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 1388610a7..890258137 100644 +index 4ee13ac45..5f10c4338 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -0,0 +0,0 @@ public class WorldBorder { diff --git a/Spigot-Server-Patches/Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/Cache-user-authenticator-threads.patch index 120ac7bb69..73a88de264 100644 --- a/Spigot-Server-Patches/Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/Cache-user-authenticator-threads.patch @@ -4,65 +4,66 @@ Date: Wed, 23 Nov 2016 08:31:45 -0500 Subject: [PATCH] Cache user authenticator threads -diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 3db306655d..49df63d6de 100644 ---- a/src/main/java/net/minecraft/server/LoginListener.java -+++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { +diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java +index 3e958eaf8..bf74db31e 100644 +--- a/src/main/java/net/minecraft/server/EntityPlayer.java ++++ b/src/main/java/net/minecraft/server/EntityPlayer.java +@@ -0,0 +0,0 @@ import com.google.common.collect.Lists; + import com.mojang.authlib.GameProfile; + import com.mojang.datafixers.util.Either; + import io.netty.util.concurrent.Future; ++import java.util.ArrayDeque; // Paper + import java.util.Collection; ++import java.util.Deque; // Paper + import java.util.Iterator; + import java.util.List; + import java.util.OptionalInt; +@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + public PlayerConnection playerConnection; + public final MinecraftServer server; + public final PlayerInteractManager playerInteractManager; +- public final List removeQueue = Lists.newLinkedList(); ++ public final Deque removeQueue = new ArrayDeque<>(); // Paper + private final AdvancementDataPlayer advancementDataPlayer; + private final ServerStatisticManager serverStatisticManager; + private float lastHealthScored = Float.MIN_VALUE; +@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + while (!this.removeQueue.isEmpty()) { + int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE); + int[] aint = new int[i]; +- Iterator iterator = this.removeQueue.iterator(); ++ //Iterator iterator = this.removeQueue.iterator(); // Paper + int j = 0; - } - -+ // Paper start - Cache authenticator threads -+ private static final AtomicInteger threadId = new AtomicInteger(0); -+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool( -+ r -> new Thread(r, "User Authenticator #" + threadId.incrementAndGet()) -+ ); -+ // Paper end - // Spigot start - public void initUUID() - { -@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e)); - } else { - // Spigot start -- new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) { -- -+ // Paper start - Cache authenticator threads -+ authenticatorPool.execute(new Runnable() { - @Override - public void run() { - try { -@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex); - } - } -- }.start(); -+ }); +- while (iterator.hasNext() && j < i) { ++ // Paper start ++ /* while (iterator.hasNext() && j < i) { + aint[j++] = (Integer) iterator.next(); + iterator.remove(); ++ } */ ++ ++ Integer integer; ++ while (j < i && (integer = this.removeQueue.poll()) != null) { ++ aint[j++] = integer.intValue(); + } + // Paper end - // Spigot end + + this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } - -@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - this.loginKey = packetlogininencryptionbegin.a(privatekey); - this.g = LoginListener.EnumProtocolState.AUTHENTICATING; - this.networkManager.a(this.loginKey); -- Thread thread = new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) { -+ // Paper start - Cache authenticator threads -+ authenticatorPool.execute(new Runnable() { - public void run() { - GameProfile gameprofile = LoginListener.this.i; - -@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { - - return LoginListener.this.server.U() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; - } -- }; -- -- thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LoginListener.LOGGER)); -- thread.start(); -+ }); -+ // Paper end - } - } - +@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + this.lastHealthSent = -1.0F; + this.lastFoodSent = -1; + // this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit +- this.removeQueue.addAll(entityplayer.removeQueue); ++ // Paper start - Optimize remove queue - vanilla copies player objects, but CB doesn't. This method currently only ++ // Applies to the same player, so we need to not duplicate our removal queue. The rest of this method does "resetting" ++ // type logic so it does need to be called, maybe? This is silly. ++ //this.removeQueue.addAll(entityplayer.removeQueue); ++ if (this.removeQueue != entityplayer.removeQueue) { ++ this.removeQueue.addAll(entityplayer.removeQueue); ++ } ++ // Paper end + this.cm = entityplayer.cm; + this.cr = entityplayer.cr; + this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft()); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch b/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch index dc82b66b05..3875164b84 100644 --- a/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch +++ b/Spigot-Server-Patches/Call-PaperServerListPingEvent-for-legacy-pings.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Call PaperServerListPingEvent for legacy pings diff --git a/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java new file mode 100644 -index 0000000000..74c012fd40 +index 000000000..74c012fd4 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperLegacyStatusClient.java @@ -0,0 +0,0 @@ @@ -84,7 +84,7 @@ index 0000000000..74c012fd40 + +} diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java -index 063efe9bbe..4a49fe4cc6 100644 +index 063efe9bb..4a49fe4cc 100644 --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Cap-Entity-Collisions.patch b/Spigot-Server-Patches/Cap-Entity-Collisions.patch index ca2e3f8aab..4fc46e3db8 100644 --- a/Spigot-Server-Patches/Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/Cap-Entity-Collisions.patch @@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped. You can set this to 0 to disable collisions. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0d2537ab8..2d01984f0 100644 +index bf11448bc..e00e1e8f6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -27,7 +27,7 @@ index 0d2537ab8..2d01984f0 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f4188fc75..482864ac6 100644 +index 1619d9f41..fcfe8f550 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -39,7 +39,7 @@ index f4188fc75..482864ac6 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 6ba5e9840..79edb3b3c 100644 +index be85a76ac..6379b361a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { @@ -53,6 +53,6 @@ index 6ba5e9840..79edb3b3c 100644 + entity.numCollisions++; // Paper + numCollisions++; // Paper - this.D(entity); + this.C(entity); } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Chunk-registration-fixes.patch b/Spigot-Server-Patches/Chunk-registration-fixes.patch index 9598a38412..baf4817f01 100644 --- a/Spigot-Server-Patches/Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/Chunk-registration-fixes.patch @@ -8,16 +8,16 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 71130dd2e4..491c9c9170 100644 +index f606a7340..38e618c78 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { public void chunkCheck(Entity entity) { this.getMethodProfiler().enter("chunkCheck"); - int i = MathHelper.floor(entity.locX / 16.0D); -- int j = MathHelper.floor(entity.locY / 16.0D); -+ int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY / 16.0D))); // Paper - stay consistent with chunk add/remove behavior - int k = MathHelper.floor(entity.locZ / 16.0D); + int i = MathHelper.floor(entity.locX() / 16.0D); +- int j = MathHelper.floor(entity.locY() / 16.0D); ++ int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior; + int k = MathHelper.floor(entity.locZ() / 16.0D); if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) { -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch index 012d1fddee..1515b8e4c5 100644 --- a/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch @@ -36,7 +36,7 @@ This change will result in some major changes to fishing formulas. I would love to see this change in Vanilla, so Mojang please pull :) diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 4169ec9a58..eeef7d330b 100644 +index ba341e017..26ab855dc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -53,7 +53,7 @@ index 4169ec9a58..eeef7d330b 100644 + } } diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java -index 1016325bd7..2c979e0b74 100644 +index 3ed6a1e78..03398ce8f 100644 --- a/src/main/java/net/minecraft/server/LootSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.ArrayUtils; diff --git a/Spigot-Server-Patches/Configurable-Bed-Search-Radius.patch b/Spigot-Server-Patches/Configurable-Bed-Search-Radius.patch index c5b1f79ef8..5024156424 100644 --- a/Spigot-Server-Patches/Configurable-Bed-Search-Radius.patch +++ b/Spigot-Server-Patches/Configurable-Bed-Search-Radius.patch @@ -10,7 +10,7 @@ player at their bed should it of became obstructed. Defaults to vanilla 1. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bf08deb25..1ffcebd3c 100644 +index f5cafbeca..b4e5948cc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -30,7 +30,7 @@ index bf08deb25..1ffcebd3c 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockBed.java b/src/main/java/net/minecraft/server/BlockBed.java -index 43b5d00b0..b2525e2a2 100644 +index 794756342..06a35629a 100644 --- a/src/main/java/net/minecraft/server/BlockBed.java +++ b/src/main/java/net/minecraft/server/BlockBed.java @@ -0,0 +0,0 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { diff --git a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch index d6e9cc6c53..fee12c73e1 100644 --- a/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch +++ b/Spigot-Server-Patches/Configurable-Cartographer-Treasure-Maps.patch @@ -9,7 +9,7 @@ Also allow turning off treasure maps all together as they can eat up Map ID's which are limited in quantity. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5d7d6fa36..0d2537ab8 100644 +index ba8edcf7e..bf11448bc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -28,17 +28,17 @@ index 5d7d6fa36..0d2537ab8 100644 + } } diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java -index 8cee460bd..99374fe2a 100644 +index 3bcf0b385..4764ffef7 100644 --- a/src/main/java/net/minecraft/server/VillagerTrades.java +++ b/src/main/java/net/minecraft/server/VillagerTrades.java @@ -0,0 +0,0 @@ public class VillagerTrades { - @Override - public MerchantRecipe a(Entity entity, Random random) { - World world = entity.world; -- BlockPosition blockposition = world.a(this.b, new BlockPosition(entity), 100, true); -+ if (!world.paperConfig.enableTreasureMaps) return null; //Paper -+ BlockPosition blockposition = world.a(this.b, new BlockPosition(entity), 100, !world.paperConfig.treasureMapsAlreadyDiscovered); //Paper + return null; + } else { + WorldServer worldserver = (WorldServer) entity.world; +- BlockPosition blockposition = worldserver.a(this.b, new BlockPosition(entity), 100, true); ++ if (!worldserver.paperConfig.enableTreasureMaps) return null; //Paper ++ BlockPosition blockposition = worldserver.a(this.b, new BlockPosition(entity), 100, !worldserver.paperConfig.treasureMapsAlreadyDiscovered); //Paper - if (blockposition != null) { - ItemStack itemstack = ItemWorldMap.createFilledMapView(world, blockposition.getX(), blockposition.getZ(), (byte) 2, true, true); + if (blockposition != null) { + ItemStack itemstack = ItemWorldMap.createFilledMapView(worldserver, blockposition.getX(), blockposition.getZ(), (byte) 2, true, true); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/Configurable-flying-kick-messages.patch index 92da37999f..b793ef2351 100644 --- a/Spigot-Server-Patches/Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/Configurable-flying-kick-messages.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flying kick messages diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5d0645c82..b5a50afd2 100644 +index 010b17d2e..5a83fc21c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -21,7 +21,7 @@ index 5d0645c82..b5a50afd2 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index cfd34f516..bf09c3939 100644 +index 77cfec712..16b70221e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch index 138d843292..ffb519ad2b 100644 --- a/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/Configurable-packet-in-spam-threshold.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable packet in spam threshold diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 1daa2e4535..5d0645c829 100644 +index 53f96a157..010b17d2e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -23,7 +23,7 @@ index 1daa2e4535..5d0645c829 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 39662f1462..586d40a471 100644 +index 53d201c59..77cfec712 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch index a712433ff9..2b0b00718b 100644 --- a/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch +++ b/Spigot-Server-Patches/Configurable-sprint-interruption-on-attack.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable sprint interruption on attack If the sprint interruption is disabled players continue sprinting when they attack entities. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b87133fcf..c57f7e7e8 100644 +index 2607c4e5f..1d3120b9b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -20,7 +20,7 @@ index b87133fcf..c57f7e7e8 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 9df182def..ec99fb62b 100644 +index 205a842ee..4e91fdd69 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch b/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch index 0d7531545d..a8d301206b 100644 --- a/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch +++ b/Spigot-Server-Patches/Disable-Explicit-Network-Manager-Flushing.patch @@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread. Renable flushing by passing -Dpaper.explicit-flush=true diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index e2d8ed88f0..08e314af7c 100644 +index e2d8ed88f..08e314af7 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler> { diff --git a/Spigot-Server-Patches/Disable-logger-prefix-for-various-plugins-bypassing-.patch b/Spigot-Server-Patches/Disable-logger-prefix-for-various-plugins-bypassing-.patch index 2a30a18c72..627c592f62 100644 --- a/Spigot-Server-Patches/Disable-logger-prefix-for-various-plugins-bypassing-.patch +++ b/Spigot-Server-Patches/Disable-logger-prefix-for-various-plugins-bypassing-.patch @@ -11,7 +11,7 @@ log. Disable the logger prefix for these plugins so the messages show up correctly. diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 9f8334376f..6711e6dff9 100644 +index 9f8334376..6711e6dff 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch index 6566c07010..816740cf18 100644 --- a/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch +++ b/Spigot-Server-Patches/Do-not-let-armorstands-drown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not let armorstands drown diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 3e78b152f..9e6633a1b 100644 +index 37ce4d48b..80bf58b05 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving { @@ -20,22 +20,22 @@ index 3e78b152f..9e6633a1b 100644 // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 79edb3b3c..a016cbb21 100644 +index 6379b361a..f6cb18639 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { super.a(d0, flag, iblockdata, blockposition); } -+ public boolean canBreatheUnderwater() { return this.cm(); } // Paper - OBFHELPER - public boolean cm() { ++ public boolean canBreatheUnderwater() { return this.cB(); } // Paper - OBFHELPER + public boolean cB() { return this.getMonsterType() == EnumMonsterType.UNDEAD; } @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { if (this.isAlive()) { - if (this.a(TagsFluid.WATER) && this.world.getType(new BlockPosition(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ)).getBlock() != Blocks.BUBBLE_COLUMN) { -- if (!this.cm() && !MobEffectUtil.c(this) && !flag1) { + if (this.a(TagsFluid.WATER) && this.world.getType(new BlockPosition(this.locX(), this.getHeadY(), this.locZ())).getBlock() != Blocks.BUBBLE_COLUMN) { +- if (!this.cB() && !MobEffectUtil.c(this) && !flag1) { + if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden this.setAirTicks(this.l(this.getAirTicks())); if (this.getAirTicks() == -20) { diff --git a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch index 9165c89db3..a1d30eedbf 100644 --- a/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 187fea130..f2be5b5a3 100644 +index 63d44401a..1619d9f41 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/Don-t-change-the-Entity-Random-seed-for-squids.patch b/Spigot-Server-Patches/Don-t-change-the-Entity-Random-seed-for-squids.patch index 28e89f9f49..6f3f28aa2b 100644 --- a/Spigot-Server-Patches/Don-t-change-the-Entity-Random-seed-for-squids.patch +++ b/Spigot-Server-Patches/Don-t-change-the-Entity-Random-seed-for-squids.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't change the Entity Random seed for squids diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 735d1879a8..a4d2ff64d8 100644 +index 1c1ff2069..92efe4e7f 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { @@ -14,7 +14,7 @@ index 735d1879a8..a4d2ff64d8 100644 super(entitytypes, world); - this.random.setSeed((long) this.getId()); + //this.random.setSeed((long) this.getId()); // Paper - this.bF = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; + this.bC = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch index d28b4a23fe..53d9a4f28b 100644 --- a/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/Don-t-let-fishinghooks-use-portals.patch @@ -5,26 +5,26 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2a65a6685..187fea130 100644 +index e04b3f4e2..63d44401a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - public boolean af; + public boolean ac; public boolean impulse; public int portalCooldown; -- protected boolean ai; -+ protected boolean ai; public final boolean inPortal() { return this.ai; } // Paper - OBFHELPER - protected int aj; +- protected boolean af; ++ protected boolean af; public final boolean inPortal() { return this.af; } // Paper - OBFHELPER + protected int ag; public DimensionManager dimension; - protected BlockPosition al; + protected BlockPosition ai; diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 84e6d660d..74b726937 100644 +index b10de807e..7a8b8b0d6 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { this.setMot(this.getMot().a(0.92D)); - this.setPosition(this.locX, this.locY, this.locZ); + this.Z(); + + // Paper start - These shouldn't be going through portals + if (this.inPortal()) { diff --git a/Spigot-Server-Patches/Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/Don-t-load-Chunks-from-Hoppers-and-other-things.patch deleted file mode 100644 index 874c7d1f36..0000000000 --- a/Spigot-Server-Patches/Don-t-load-Chunks-from-Hoppers-and-other-things.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Thu, 3 Nov 2016 20:28:12 -0400 -Subject: [PATCH] Don't load Chunks from Hoppers and other things - -Hoppers call this to I guess "get the primary side" of a double sided chest. - -If the double sided chest crosses chunk lines, it causes the chunk to load. -This will end up causing sync chunk loads, which will unload with Chunk GC, -only to be reloaded again the next tick. - -This of course is undesirable, so just return the loaded side as "primary" -and treat it as a single chest if the other sides are unloaded - -diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 65b616481..8183a61c9 100644 ---- a/src/main/java/net/minecraft/server/BlockChest.java -+++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity implements IBlockWaterlogged { - return blockchest_chestfinder.b(tileentitychest); - } else { - BlockPosition blockposition1 = blockposition.shift(j(iblockdata)); -- IBlockData iblockdata1 = generatoraccess.getType(blockposition1); -+ // Paper start - don't load chunks if the other side of the chest is in unloaded chunk -+ IBlockData iblockdata1 = generatoraccess.getTypeIfLoaded(blockposition1); -+ if (iblockdata1 == null) { -+ return null; -+ } -+ // Paper end - - if (iblockdata1.getBlock() == iblockdata.getBlock()) { - BlockPropertyChestType blockpropertychesttype1 = (BlockPropertyChestType) iblockdata1.get(BlockChest.b); --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch index 0c5431bb16..68be7eea54 100644 --- a/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch +++ b/Spigot-Server-Patches/Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java -index ea0256755..b0d883d49 100644 +index 566f3db39..e8143eff4 100644 --- a/src/main/java/net/minecraft/server/UserCache.java +++ b/src/main/java/net/minecraft/server/UserCache.java @@ -0,0 +0,0 @@ public class UserCache { diff --git a/Spigot-Server-Patches/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch index 1eb4c796f9..5cfaec4d0a 100644 --- a/Spigot-Server-Patches/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch +++ b/Spigot-Server-Patches/Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index dc3438890..cbfe12734 100644 +index e4f0db64c..67f35fe66 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -19,7 +19,7 @@ index dc3438890..cbfe12734 100644 + } } diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java -index fab5962e2..de7ac6c20 100644 +index 1eab0c310..6bf66972f 100644 --- a/src/main/java/net/minecraft/server/PersistentScoreboard.java +++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java @@ -0,0 +0,0 @@ public class PersistentScoreboard extends PersistentBase { diff --git a/Spigot-Server-Patches/EnderDragon-Events.patch b/Spigot-Server-Patches/EnderDragon-Events.patch index c07f8836e0..706e703ede 100644 --- a/Spigot-Server-Patches/EnderDragon-Events.patch +++ b/Spigot-Server-Patches/EnderDragon-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EnderDragon Events diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java -index 98e15834ab..577d1d2070 100644 +index 40a8beff5..18fdcd453 100644 --- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java @@ -0,0 +0,0 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded @@ -29,7 +29,7 @@ index 98e15834ab..577d1d2070 100644 public void e() { if (this.d != null) { diff --git a/src/main/java/net/minecraft/server/DragonControllerStrafe.java b/src/main/java/net/minecraft/server/DragonControllerStrafe.java -index 14e20f4961..0b0815e113 100644 +index a2c36548c..a9d20ee3b 100644 --- a/src/main/java/net/minecraft/server/DragonControllerStrafe.java +++ b/src/main/java/net/minecraft/server/DragonControllerStrafe.java @@ -0,0 +0,0 @@ public class DragonControllerStrafe extends AbstractDragonController { @@ -43,7 +43,7 @@ index 14e20f4961..0b0815e113 100644 if (this.d != null) { while (!this.d.b()) { diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java -index 9dfa15fe2a..547698a2d4 100644 +index bc08b53fc..db43ac1cc 100644 --- a/src/main/java/net/minecraft/server/EntityDragonFireball.java +++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java @@ -0,0 +0,0 @@ public class EntityDragonFireball extends EntityFireball { @@ -51,7 +51,7 @@ index 9dfa15fe2a..547698a2d4 100644 } + if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(EntityLiving::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper - this.world.triggerEffect(2006, new BlockPosition(this.locX, this.locY, this.locZ), 0); + this.world.triggerEffect(2006, new BlockPosition(this), 0); this.world.addEntity(entityareaeffectcloud); + } else entityareaeffectcloud.die(); // Paper this.die(); diff --git a/Spigot-Server-Patches/Enderman.teleportRandomly.patch b/Spigot-Server-Patches/Enderman.teleportRandomly.patch index 3f44ea594c..3650d9e8c3 100644 --- a/Spigot-Server-Patches/Enderman.teleportRandomly.patch +++ b/Spigot-Server-Patches/Enderman.teleportRandomly.patch @@ -6,19 +6,19 @@ Subject: [PATCH] Enderman.teleportRandomly() Ability to trigger the vanilla "teleport randomly" mechanic of an enderman. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index de320f8885..7d2e00085a 100644 +index 60ff02770..6868ca415 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { super.mobTick(); } -+ public final boolean teleportRandomly() { return this.dV(); } // Paper - OBFHELPER - protected boolean dV() { - double d0 = this.locX + (this.random.nextDouble() - 0.5D) * 64.0D; - double d1 = this.locY + (double) (this.random.nextInt(64) - 32); ++ public final boolean teleportRandomly() { return this.eq(); } // Paper - OBFHELPER + protected boolean eq() { + if (!this.world.p_() && this.isAlive()) { + double d0 = this.locX() + (this.random.nextDouble() - 0.5D) * 64.0D; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java -index 970efabd37..0c5f359346 100644 +index 970efabd3..0c5f35934 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java @@ -0,0 +0,0 @@ public class CraftEnderman extends CraftMonster implements Enderman { diff --git a/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch b/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch index c4cdbfab6a..e7d83a7875 100644 --- a/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch +++ b/Spigot-Server-Patches/EndermanAttackPlayerEvent.patch @@ -8,7 +8,7 @@ Allow control over whether or not an enderman aggros a player. This allows you to override/extend the pumpkin/stare logic. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 7d2e00085a..639f55ed98 100644 +index 6868ca415..607d6da6a 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { diff --git a/Spigot-Server-Patches/EndermanEscapeEvent.patch b/Spigot-Server-Patches/EndermanEscapeEvent.patch index d4fd9e8abf..1a0d2bd85e 100644 --- a/Spigot-Server-Patches/EndermanEscapeEvent.patch +++ b/Spigot-Server-Patches/EndermanEscapeEvent.patch @@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player You may cancel this, enabling ranged attacks to damage the enderman for example. diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 99391c0562..de320f8885 100644 +index 4519be39a..60ff02770 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -33,28 +33,28 @@ index 99391c0562..de320f8885 100644 public boolean setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { if (!super.setGoalTarget(entityliving, reason, fireEvent)) { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { - if (this.world.J() && this.ticksLived >= this.bC + 600) { - float f = this.aF(); + if (this.world.J() && this.ticksLived >= this.bA + 600) { + float f = this.aI(); - if (f > 0.5F && this.world.f(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { + if (f > 0.5F && this.world.f(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper this.setGoalTarget((EntityLiving) null); - this.dV(); + this.eq(); } @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { } else if (!(damagesource instanceof EntityDamageSourceIndirect) && damagesource != DamageSource.FIREWORKS) { boolean flag = super.damageEntity(damagesource, f); -- if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0) { -+ if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && this.tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper - this.dV(); +- if (!this.world.p_() && damagesource.ignoresArmor() && this.random.nextInt(10) != 0) { ++ if (!this.world.p_() && damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && this.tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper + this.eq(); } return flag; } else { + if (this.tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start for (int i = 0; i < 64; ++i) { - if (this.dV()) { + if (this.eq()) { return true; } } @@ -77,7 +77,7 @@ index 99391c0562..de320f8885 100644 if (this.i.f((EntityHuman) this.c)) { - if (this.c.h((Entity) this.i) < 16.0D) { + if (this.c.h((Entity) this.i) < 16.0D && this.getEnderman().tryEscape(EndermanEscapeEvent.Reason.STARE)) { - this.i.dV(); + this.i.eq(); } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch index 6c8d4f18f9..65758df930 100644 --- a/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ee5297dc3..ccf8b7c70 100644 +index b7012b5b6..ce5bd2229 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Entity-fromMobSpawner.patch b/Spigot-Server-Patches/Entity-fromMobSpawner.patch index 8b1b9d3f2b..325baa9a51 100644 --- a/Spigot-Server-Patches/Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ 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 482864ac6..be4ebcadb 100644 +index fcfe8f550..7c4ab7fe7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -37,7 +37,7 @@ index 482864ac6..be4ebcadb 100644 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 13e62e3d7..4bd511dd7 100644 +index deb32db2b..8384a2cbf 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { @@ -49,7 +49,7 @@ index 13e62e3d7..4bd511dd7 100644 if ( entity.world.spigotConfig.nerfSpawnerMobs ) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 91c5bb511..09ca9a3eb 100644 +index bb07dec3c..495a7c464 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/Spigot-Server-Patches/EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-Server-Patches/EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch index 9dcf6cde71..5fe756f629 100644 --- a/Spigot-Server-Patches/EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch +++ b/Spigot-Server-Patches/EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API Adds ability to get what arrow was shot, and control if it should be consumed. diff --git a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -index 5c3628035..8f1b5a550 100644 +index d97558da3..fdeb8980d 100644 --- a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java +++ b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java @@ -0,0 +0,0 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR @@ -19,7 +19,7 @@ index 5c3628035..8f1b5a550 100644 event.getProjectile().remove(); return; diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java -index 0ea1bf4dc..90592fd38 100644 +index 4b07e18c7..71800b34b 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java @@ -0,0 +0,0 @@ public class ItemBow extends ItemProjectileWeapon { @@ -52,14 +52,14 @@ index 0ea1bf4dc..90592fd38 100644 @@ -0,0 +0,0 @@ public class ItemBow extends ItemProjectileWeapon { } - world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 1.0F, 1.0F / (ItemBow.i.nextFloat() * 0.4F + 1.2F) + f * 0.5F); + world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 1.0F, 1.0F / (ItemBow.i.nextFloat() * 0.4F + 1.2F) + f * 0.5F); - if (!flag1 && !entityhuman.abilities.canInstantlyBuild) { + if (!flag1 && !entityhuman.abilities.canInstantlyBuild && consumeArrow) { // Paper itemstack1.subtract(1); if (itemstack1.isEmpty()) { entityhuman.inventory.f(itemstack1); diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java -index 874d9f500..f0d784108 100644 +index 608be9e70..011efc6f5 100644 --- a/src/main/java/net/minecraft/server/ItemCrossbow.java +++ b/src/main/java/net/minecraft/server/ItemCrossbow.java @@ -0,0 +0,0 @@ public class ItemCrossbow extends ItemProjectileWeapon { @@ -72,7 +72,7 @@ index 874d9f500..f0d784108 100644 event.getProjectile().remove(); return; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 489943410..e58dac2c8 100644 +index 9b314eacc..94fbac5e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ import net.minecraft.server.GeneratorAccess; diff --git a/Spigot-Server-Patches/Expand-Explosions-API.patch b/Spigot-Server-Patches/Expand-Explosions-API.patch index 6c49e2f39d..e9f2ed52cc 100644 --- a/Spigot-Server-Patches/Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/Expand-Explosions-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 515f94aa5d..5db2a4cca2 100644 +index 6a7c088f9..a062e10fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch index bf95026e5f..942af476d2 100644 --- a/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ 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 491c9c9170..b9015cb8a7 100644 +index 38e618c78..4a2e66977 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { @@ -31,7 +31,7 @@ index 491c9c9170..b9015cb8a7 100644 + } + public int sendParticles(List receivers, EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { + // Paper end - PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, force, (float) d0, (float) d1, (float) d2, (float) d3, (float) d4, (float) d5, (float) d6, i); + PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, force, d0, d1, d2, (float) d3, (float) d4, (float) d5, (float) d6, i); // CraftBukkit end int j = 0; @@ -43,7 +43,7 @@ index 491c9c9170..b9015cb8a7 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 0e4f4cda0b..3726f240ce 100644 +index b7db32833..a66e4c3f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/ExperienceOrbMergeEvent.patch index ac3059b159..5466cfd148 100644 --- a/Spigot-Server-Patches/ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/ExperienceOrbMergeEvent.patch @@ -8,7 +8,7 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5257941e9..489943410 100644 +index e310f2afe..9b314eacc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index b429ebbdd5..66ac9aec69 100644 --- a/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -8,7 +8,7 @@ Adds lots of information about why this orb exists. Replaces isFromBottle() with logic that persists entity reloads too. diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 1426bd01ad..880fc52703 100644 +index e485d4a82..3e4fc4ee5 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -0,0 +0,0 @@ public class Block implements IMaterial { @@ -28,7 +28,7 @@ index 1426bd01ad..880fc52703 100644 } diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java -index 2d2cd09ad1..ed88e208d0 100644 +index 2d2cd09ad..ed88e208d 100644 --- a/src/main/java/net/minecraft/server/ContainerGrindstone.java +++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java @@ -0,0 +0,0 @@ public class ContainerGrindstone extends Container { @@ -41,20 +41,20 @@ index 2d2cd09ad1..ed88e208d0 100644 world.triggerEffect(1042, blockposition, 0); diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index cf857b88de..5fae347db2 100644 +index e0d240a89..07abcc1e2 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { int j = EntityExperienceOrb.getOrbValue(i); i -= j; -- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j)); -+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j, org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.killer, this)); // Paper +- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY(), this.locZ(), j)); ++ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY(), this.locZ(), j, org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.killer, this)); // Paper } } diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index eec6de9ad7..35f03947d6 100644 +index 0447800d9..d4275e733 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { @@ -134,99 +134,99 @@ index eec6de9ad7..35f03947d6 100644 @Override diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 758559d35d..2a351701b4 100644 +index 8ad0d0db1..8d48154e5 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { this.world.addEntity(entityitem); // CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop() if (playerFishEvent.getExpToDrop() > 0) { -- this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop())); -+ this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.owner, this)); // Paper +- this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX(), this.owner.locY() + 0.5D, this.owner.locZ() + 0.5D, playerFishEvent.getExpToDrop())); ++ this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX(), this.owner.locY() + 0.5D, this.owner.locZ() + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.owner, this)); // Paper } // CraftBukkit end if (itemstack1.getItem().a(TagsItem.FISHES)) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 5fa937aeae..6ba5e98400 100644 +index 191e7dfaf..be85a76ac 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { int j = EntityExperienceOrb.getOrbValue(i); i -= j; -- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j)); +- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY(), this.locZ(), j)); + EntityLiving attacker = killer != null ? killer : lastDamager; // Paper -+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j, this instanceof EntityPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this)); // Paper ++ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY(), this.locZ(), j, this instanceof EntityPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this)); // Paper } this.expToDrop = 0; - // CraftBukkit end + } diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java -index 4ac5cce062..05970c5644 100644 +index 0bfc0a773..ba2f90cc6 100644 --- a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java +++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java @@ -0,0 +0,0 @@ public class EntityThrownExpBottle extends EntityProjectileThrowable { int j = EntityExperienceOrb.getOrbValue(i); i -= j; -- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j)); -+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j, org.bukkit.entity.ExperienceOrb.SpawnReason.EXP_BOTTLE, getShooter(), this)); // Paper +- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY(), this.locZ(), j)); ++ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY(), this.locZ(), j, org.bukkit.entity.ExperienceOrb.SpawnReason.EXP_BOTTLE, getShooter(), this)); // Paper } this.die(); diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 25c7214ded..594cc70def 100644 +index c73cc9ae4..76296119a 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -0,0 +0,0 @@ public class EntityTurtle extends EntityAnimal { Random random = this.animal.getRandom(); if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { -- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, random.nextInt(7) + 1)); -+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, random.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper; +- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), random.nextInt(7) + 1)); ++ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), random.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper; } } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index dcd02930d9..8a5127c5d1 100644 +index 00300c6aa..4aa947e24 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -0,0 +0,0 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation } if (merchantrecipe.isRewardExp()) { -- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY + 0.5D, this.locZ, i)); -+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY + 0.5D, this.locZ, i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTrader(), this)); // Paper +- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY() + 0.5D, this.locZ(), i)); ++ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY() + 0.5D, this.locZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTrader(), this)); // Paper } } diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -index 1753c67aa9..a24e7127d7 100644 +index fa814814f..14ccf33c0 100644 --- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java +++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java @@ -0,0 +0,0 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { if (merchantrecipe.isRewardExp()) { int i = 3 + this.random.nextInt(4); -- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY + 0.5D, this.locZ, i)); -+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY + 0.5D, this.locZ, i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTrader(), this)); // Paper +- this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY() + 0.5D, this.locZ(), i)); ++ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX(), this.locY() + 0.5D, this.locZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTrader(), this)); // Paper } } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java -index 363a98bece..0cc34400be 100644 +index 1ab2668e9..2b708761d 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java @@ -0,0 +0,0 @@ public class PathfinderGoalBreed extends PathfinderGoal { if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { // CraftBukkit start - use event experience if (experience > 0) { -- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, experience)); -+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityageable)); // Paper +- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), experience)); ++ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityageable)); // Paper } // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index d4df766111..bce3844dd5 100644 +index 46154b281..56f249c43 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -0,0 +0,0 @@ public class PlayerInteractManager { @@ -239,7 +239,7 @@ index d4df766111..bce3844dd5 100644 return true; diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java -index d2698e847c..edc4a5c34e 100644 +index d2698e847..edc4a5c34 100644 --- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java +++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -252,20 +252,20 @@ index d2698e847c..edc4a5c34e 100644 public SlotFurnaceResult(EntityHuman entityhuman, IInventory iinventory, int i, int j, int k) { diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 0cb2e6d874..2bbd3663a7 100644 +index 2a51a241e..0419aea92 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java @@ -0,0 +0,0 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I while (i > 0) { j = EntityExperienceOrb.getOrbValue(i); i -= j; -- entityhuman.world.addEntity(new EntityExperienceOrb(entityhuman.world, entityhuman.locX, entityhuman.locY + 0.5D, entityhuman.locZ + 0.5D, j)); -+ entityhuman.world.addEntity(new EntityExperienceOrb(entityhuman.world, entityhuman.locX, entityhuman.locY + 0.5D, entityhuman.locZ + 0.5D, j, org.bukkit.entity.ExperienceOrb.SpawnReason.FURNACE, entityhuman)); // Paper +- entityhuman.world.addEntity(new EntityExperienceOrb(entityhuman.world, entityhuman.locX(), entityhuman.locY() + 0.5D, entityhuman.locZ() + 0.5D, j)); ++ entityhuman.world.addEntity(new EntityExperienceOrb(entityhuman.world, entityhuman.locX(), entityhuman.locY() + 0.5D, entityhuman.locZ() + 0.5D, j, org.bukkit.entity.ExperienceOrb.SpawnReason.FURNACE, entityhuman)); // Paper } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 63ef42d860..0e4f4cda0b 100644 +index ebe30cc21..b7db32833 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { @@ -278,7 +278,7 @@ index 63ef42d860..0e4f4cda0b 100644 entity = new EntityLightning(world, x, y, z, false); } else if (Firework.class.isAssignableFrom(clazz)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java -index 1b512cc45c..fbad045675 100644 +index 1b512cc45..fbad04567 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java @@ -0,0 +0,0 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb { diff --git a/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch index 70dc82e636..3de5218bd7 100644 --- a/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/Expose-client-protocol-version-and-virtual-host.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expose client protocol version and virtual host diff --git a/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java b/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java new file mode 100644 -index 0000000000..5caca6439d +index 000000000..5caca6439 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java @@ -0,0 +0,0 @@ @@ -61,7 +61,7 @@ index 0000000000..5caca6439d + +} diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 078b711c47..740c8d2728 100644 +index d0b9c6e3d..8928d93e4 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -0,0 +0,0 @@ public class HandshakeListener implements PacketHandshakingInListener { @@ -84,7 +84,7 @@ index 078b711c47..740c8d2728 100644 @Override diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 3ccf166366..e2d8ed88f0 100644 +index 3ccf16636..e2d8ed88f 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -99,7 +99,7 @@ index 3ccf166366..e2d8ed88f0 100644 public NetworkManager(EnumProtocolDirection enumprotocoldirection) { this.h = enumprotocoldirection; diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java -index 4f008e4723..8545146fb1 100644 +index 4f008e472..8545146fb 100644 --- a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java +++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java @@ -0,0 +0,0 @@ public class PacketHandshakingInSetProtocol implements Packet explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions diff --git a/Spigot-Server-Patches/Fill-Profile-Property-Events.patch b/Spigot-Server-Patches/Fill-Profile-Property-Events.patch index e00c8bd90f..b88b83919f 100644 --- a/Spigot-Server-Patches/Fill-Profile-Property-Events.patch +++ b/Spigot-Server-Patches/Fill-Profile-Property-Events.patch @@ -11,7 +11,7 @@ If Mojang API does need to be hit, event fire so you can get the results. This is useful for implementing a ProfileCache for Player Skulls diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java -index 4b2a67423f..61cfdf73c8 100644 +index 4b2a67423..61cfdf73c 100644 --- a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch index 9f19ee354c..3004f4e9b7 100644 --- a/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch +++ b/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 83d430ee5..5d7d6fa36 100644 +index fd1be52f3..ba8edcf7e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ package com.destroystokyo.paper; @@ -30,7 +30,7 @@ index 83d430ee5..5d7d6fa36 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 0f9fa4113..0a6d2b9b3 100644 +index 55d1b3529..2e908c749 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { diff --git a/Spigot-Server-Patches/Fire-EntityShootBowEvent-for-Illusioner.patch b/Spigot-Server-Patches/Fire-EntityShootBowEvent-for-Illusioner.patch index 2510984f05..ca4a12ab92 100644 --- a/Spigot-Server-Patches/Fire-EntityShootBowEvent-for-Illusioner.patch +++ b/Spigot-Server-Patches/Fire-EntityShootBowEvent-for-Illusioner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fire EntityShootBowEvent for Illusioner diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -index 2c320c8a43..cc37b5ff16 100644 +index 2ea0583a3..81b7cd06f 100644 --- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java +++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java @@ -0,0 +0,0 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan diff --git a/Spigot-Server-Patches/Firework-API-s.patch b/Spigot-Server-Patches/Firework-API-s.patch index 54846f01c0..27daed24ed 100644 --- a/Spigot-Server-Patches/Firework-API-s.patch +++ b/Spigot-Server-Patches/Firework-API-s.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java -index 8f4116cde..dbbb96ac5 100644 +index 4f51b9b65..278ef79d8 100644 --- a/src/main/java/net/minecraft/server/EntityFireworks.java +++ b/src/main/java/net/minecraft/server/EntityFireworks.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -18,7 +18,7 @@ index 8f4116cde..dbbb96ac5 100644 public class EntityFireworks extends Entity implements IProjectile { @@ -0,0 +0,0 @@ public class EntityFireworks extends Entity implements IProjectile { - public static final DataWatcherObject d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i); // PAIL + public static final DataWatcherObject SHOT_AT_ANGLE = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i); private int ticksFlown; public int expectedLifespan; - private EntityLiving ridingEntity; @@ -30,7 +30,7 @@ index 8f4116cde..dbbb96ac5 100644 @@ -0,0 +0,0 @@ public class EntityFireworks extends Entity implements IProjectile { } - nbttagcompound.setBoolean("ShotAtAngle", (Boolean) this.datawatcher.get(EntityFireworks.d)); + nbttagcompound.setBoolean("ShotAtAngle", (Boolean) this.datawatcher.get(EntityFireworks.SHOT_AT_ANGLE)); + // Paper start + if (this.spawningEntity != null) { + nbttagcompound.setUUID("SpawningEntity", this.spawningEntity); @@ -41,7 +41,7 @@ index 8f4116cde..dbbb96ac5 100644 @Override @@ -0,0 +0,0 @@ public class EntityFireworks extends Entity implements IProjectile { if (nbttagcompound.hasKey("ShotAtAngle")) { - this.datawatcher.set(EntityFireworks.d, nbttagcompound.getBoolean("ShotAtAngle")); + this.datawatcher.set(EntityFireworks.SHOT_AT_ANGLE, nbttagcompound.getBoolean("ShotAtAngle")); } - + // Paper start @@ -53,25 +53,25 @@ index 8f4116cde..dbbb96ac5 100644 @Override diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java -index 28d7fdeef..874d9f500 100644 +index 6f2f6b9f5..608be9e70 100644 --- a/src/main/java/net/minecraft/server/ItemCrossbow.java +++ b/src/main/java/net/minecraft/server/ItemCrossbow.java @@ -0,0 +0,0 @@ public class ItemCrossbow extends ItemProjectileWeapon { if (flag1) { - object = new EntityFireworks(world, itemstack1, entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight() - 0.15000000596046448D, entityliving.locZ, true); + object = new EntityFireworks(world, itemstack1, entityliving.locX(), entityliving.getHeadY() - 0.15000000596046448D, entityliving.locZ(), true); + ((EntityFireworks) object).spawningEntity = entityliving.getUniqueID(); // Paper } else { object = a(world, entityliving, itemstack, itemstack1); if (flag || f3 != 0.0F) { diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index 37caa79cb..aea46ffae 100644 +index 914297bad..76b253a50 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java @@ -0,0 +0,0 @@ public class ItemFireworks extends Item { - ItemStack itemstack = itemactioncontext.getItemStack(); Vec3D vec3d = itemactioncontext.j(); - EntityFireworks entityfireworks = new EntityFireworks(world, vec3d.x, vec3d.y, vec3d.z, itemstack); + EnumDirection enumdirection = itemactioncontext.getClickedFace(); + EntityFireworks entityfireworks = new EntityFireworks(world, vec3d.x + (double) enumdirection.getAdjacentX() * 0.15D, vec3d.y + (double) enumdirection.getAdjacentY() * 0.15D, vec3d.z + (double) enumdirection.getAdjacentZ() * 0.15D, itemstack); + entityfireworks.spawningEntity = itemactioncontext.getEntity().getUniqueID(); // Paper world.addEntity(entityfireworks); @@ -90,7 +90,7 @@ index 37caa79cb..aea46ffae 100644 itemstack.subtract(1); } diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 3f6d2676e..b1fd18151 100644 +index 75604dbc6..98deaba12 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { @@ -103,7 +103,7 @@ index 3f6d2676e..b1fd18151 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java -index d3cbad9a5..219a1e4c0 100644 +index 475b7b004..de74e7214 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.entity; @@ -128,7 +128,7 @@ index d3cbad9a5..219a1e4c0 100644 private final Random random = new Random(); @@ -0,0 +0,0 @@ public class CraftFirework extends CraftEntity implements Firework { public void setShotAtAngle(boolean shotAtAngle) { - getHandle().getDataWatcher().set(EntityFireworks.d, shotAtAngle); + getHandle().getDataWatcher().set(EntityFireworks.SHOT_AT_ANGLE, shotAtAngle); } + + // Paper start diff --git a/Spigot-Server-Patches/Fix-CraftEntity-hashCode.patch b/Spigot-Server-Patches/Fix-CraftEntity-hashCode.patch index 220ef51037..22071102c0 100644 --- a/Spigot-Server-Patches/Fix-CraftEntity-hashCode.patch +++ b/Spigot-Server-Patches/Fix-CraftEntity-hashCode.patch @@ -21,7 +21,7 @@ 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 09ca9a3eb..517e42218 100644 +index 495a7c464..915ccb180 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch index bbdb0d8c4f..58b0c50918 100644 --- a/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/Fix-Double-World-Add-issues.patch @@ -8,7 +8,7 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d50e804102..71130dd2e4 100644 +index ea9899889..f606a7340 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/Fix-Dragon-Server-Crashes.patch b/Spigot-Server-Patches/Fix-Dragon-Server-Crashes.patch index 63c382cb70..a8a13ecca8 100644 --- a/Spigot-Server-Patches/Fix-Dragon-Server-Crashes.patch +++ b/Spigot-Server-Patches/Fix-Dragon-Server-Crashes.patch @@ -7,16 +7,16 @@ If the dragon tries to find "ground" and hits a hole, or off edge, it will infinitely keep looking for non air and eventually crash. diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java -index a75128f966..98e15834ab 100644 +index c42de9771..40a8beff5 100644 --- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java @@ -0,0 +0,0 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded - double d2 = this.a.bA.locY + (double) (this.a.bA.getHeight() / 2.0F); + double d3 = d2; BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(d0, d2, d1); - while (this.a.world.isEmpty(blockposition_mutableblockposition)) { + while (this.a.world.isEmpty(blockposition_mutableblockposition ) && d2 > 0) { // Paper - --d2; - blockposition_mutableblockposition.c(d0, d2, d1); - } + --d3; + if (d3 < 0.0D) { + d3 = d2; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/Fix-MC-117075-TE-Unload-Lag-Spike.patch index d528af99f4..13fdc2a4af 100644 --- a/Spigot-Server-Patches/Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d6f04c823a..8add757cc8 100644 +index 312e32f1b..8cbad8362 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.enter("blockEntities"); timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { diff --git a/Spigot-Server-Patches/Fix-NPE-when-getting-location-from-InventoryEnderChe.patch b/Spigot-Server-Patches/Fix-NPE-when-getting-location-from-InventoryEnderChe.patch index 4f8a5f3732..77687a5d2b 100644 --- a/Spigot-Server-Patches/Fix-NPE-when-getting-location-from-InventoryEnderChe.patch +++ b/Spigot-Server-Patches/Fix-NPE-when-getting-location-from-InventoryEnderChe.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix NPE when getting location from InventoryEnderChest opened diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java -index 5a9ac3960d..fd31b9a6dc 100644 +index 5a9ac3960..fd31b9a6d 100644 --- a/src/main/java/net/minecraft/server/InventoryEnderChest.java +++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryHolder; diff --git a/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch index da0eb40a3b..c8d79bd464 100644 --- a/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch +++ b/Spigot-Server-Patches/Fix-Old-Sign-Conversion.patch @@ -9,7 +9,7 @@ Subject: [PATCH] Fix Old Sign Conversion This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java -index 7bcd9786a..775ec6389 100644 +index dad966825..8c411ff07 100644 --- a/src/main/java/net/minecraft/server/DefinedStructure.java +++ b/src/main/java/net/minecraft/server/DefinedStructure.java @@ -0,0 +0,0 @@ public class DefinedStructure { @@ -25,7 +25,7 @@ index 7bcd9786a..775ec6389 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index e1db24316..af6977dcd 100644 +index e2f3cec74..630b27915 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -0,0 +0,0 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -33,11 +33,11 @@ index e1db24316..af6977dcd 100644 // CraftBukkit end private static final Logger LOGGER = LogManager.getLogger(); + boolean isLoadingStructure = false; // Paper - private final TileEntityTypes b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER + private final TileEntityTypes tileType; public TileEntityTypes getTileEntityType() { return tileType; } // Paper - OBFHELPER @Nullable protected World world; diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 914f4e6da..ddf8f4659 100644 +index 4a48c09e9..03f6ddf00 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java @@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // diff --git a/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch index 971dbcb78b..4d219b7e57 100644 --- a/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6008613fae..89beac63aa 100644 +index ad2a36627..8757b6751 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch index 548d5eb402..b42de90ce6 100644 --- a/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch +++ b/Spigot-Server-Patches/Fix-this-stupid-bullshit.patch @@ -9,12 +9,12 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa and to provide some level of hint without being disruptive. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 486629a6d..56ac679b2 100644 +index b562e95dc..140b82275 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -28); + deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch index 80fdd8fea2..d83c74461a 100644 --- a/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a2ef3f59ee..2bba7f359d 100644 +index 87b715d69..4dc79ca4e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch index 6068a6bb1f..8393208b49 100644 --- a/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/pom.xml b/pom.xml -index a70c0ec07a..5ab1f29846 100644 +index e6395c773..026dcfdab 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -28,7 +28,7 @@ index a70c0ec07a..5ab1f29846 100644 org.apache.logging.log4j diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index d873256c01..783aa6db1f 100644 +index d873256c0..783aa6db1 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig @@ -41,7 +41,7 @@ index d873256c01..783aa6db1f 100644 public static int playerShuffle; diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml -index 08b6bb7f97..9f8334376f 100644 +index 08b6bb7f9..9f8334376 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch b/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch index 8ccabaa246..3cda620ca8 100644 --- a/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch +++ b/Spigot-Server-Patches/Ignore-Missing-Recipes-in-RecipeBook-to-avoid-data-e.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors This code was causing NPE's in saving player data, potentially related to reloads. diff --git a/src/main/java/net/minecraft/server/RecipeBookServer.java b/src/main/java/net/minecraft/server/RecipeBookServer.java -index 121e1fd538..0e66bdda8c 100644 +index 0203e26ec..aa6e5681f 100644 --- a/src/main/java/net/minecraft/server/RecipeBookServer.java +++ b/src/main/java/net/minecraft/server/RecipeBookServer.java @@ -0,0 +0,0 @@ public class RecipeBookServer extends RecipeBook { @@ -18,7 +18,7 @@ index 121e1fd538..0e66bdda8c 100644 + if (!recipe.isPresent()) continue; + // Paper end - nbttaglist.add(new NBTTagString(minecraftkey.toString())); + nbttaglist.add(NBTTagString.a(minecraftkey.toString())); } @@ -0,0 +0,0 @@ public class RecipeBookServer extends RecipeBook { @@ -29,6 +29,6 @@ index 121e1fd538..0e66bdda8c 100644 + if (!recipe.isPresent()) continue; + // Paper end - nbttaglist1.add(new NBTTagString(minecraftkey1.toString())); + nbttaglist1.add(NBTTagString.a(minecraftkey1.toString())); } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch index aa5dd0354e..0652b2859e 100644 --- a/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/Implement-EntityKnockbackByEntityEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index a873685e47..dfbd40a997 100644 +index 3f493f415..855afcd64 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/Implement-EntityTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/Implement-EntityTeleportEndGatewayEvent.patch index 9b28d208f3..74eba75715 100644 --- a/Spigot-Server-Patches/Implement-EntityTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/Implement-EntityTeleportEndGatewayEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index 7ca5f04733..15dccc905e 100644 +index 78fba7937..c71f76004 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -0,0 +0,0 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick diff --git a/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch index c8ce2d5fcb..4b72908b04 100644 --- a/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/Implement-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5db2a4cca2..67137d69c1 100644 +index a062e10fc..96ff39e13 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -0,0 +0,0 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch index a70fbeadda..689f54a895 100644 --- a/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/Implement-ensureServerConversions-API.patch @@ -7,7 +7,7 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index b15406014..bd04174c3 100644 +index c9b59fd8d..57f50cccf 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch index 2808d63b19..3818cc1d77 100644 --- a/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/Implement-extended-PaperServerListPingEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement extended PaperServerListPingEvent diff --git a/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java new file mode 100644 -index 0000000000..c1a8e295b6 +index 000000000..c1a8e295b --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java @@ -0,0 +0,0 @@ @@ -43,7 +43,7 @@ index 0000000000..c1a8e295b6 +} diff --git a/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java new file mode 100644 -index 0000000000..a2a409e635 +index 000000000..a2a409e63 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java @@ -0,0 +0,0 @@ @@ -60,7 +60,7 @@ index 0000000000..a2a409e635 +} diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java new file mode 100644 -index 0000000000..a85466bc7e +index 000000000..a85466bc7 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java @@ -0,0 +0,0 @@ @@ -177,7 +177,7 @@ index 0000000000..a85466bc7e + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6e6c662f95..8d2be704f9 100644 +index 1ddb10741..97a0a6924 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ @@ -200,7 +200,7 @@ index 6e6c662f95..8d2be704f9 100644 for (int k = 0; k < agameprofile.length; ++k) { diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java -index 2b08f285d1..295c9ac22d 100644 +index 658ea609c..4bb21c48b 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java @@ -0,0 +0,0 @@ public class PacketStatusListener implements PacketStatusInListener { @@ -223,7 +223,7 @@ index 2b08f285d1..295c9ac22d 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index aa125a52dc..ea52e89bd9 100644 +index aa125a52d..ea52e89bd 100644 --- a/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java @@ -0,0 +0,0 @@ public class ServerPing { @@ -248,7 +248,7 @@ index aa125a52dc..ea52e89bd9 100644 this.c = agameprofile; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 783aa6db1f..33767c85ca 100644 +index 783aa6db1..33767c85c 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch index ecdda5980e..8fc8f54177 100644 --- a/Spigot-Server-Patches/Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/Implement-getI18NDisplayName.patch @@ -25,7 +25,7 @@ index c0c13798f..601273933 100644 return this.c(s); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index bd04174c3..3cddf254a 100644 +index 57f50cccf..72cc4980e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { diff --git a/Spigot-Server-Patches/Improve-the-Saddle-API-for-Horses.patch b/Spigot-Server-Patches/Improve-the-Saddle-API-for-Horses.patch index 58a42eff2b..dd39b04570 100644 --- a/Spigot-Server-Patches/Improve-the-Saddle-API-for-Horses.patch +++ b/Spigot-Server-Patches/Improve-the-Saddle-API-for-Horses.patch @@ -7,7 +7,7 @@ Not all horses with Saddles have armor. This lets us break up the horses with sa and access their saddle state separately from an interface shared with Armor. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index 09016e3547..9952db3eb5 100644 +index 09016e354..9952db3eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -0,0 +0,0 @@ import net.minecraft.server.EntityHorseAbstract; @@ -27,7 +27,7 @@ index 09016e3547..9952db3eb5 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java -index 63991bf4be..9a47a1adc1 100644 +index 63991bf4b..9a47a1adc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java @@ -0,0 +0,0 @@ import net.minecraft.server.IInventory; @@ -41,7 +41,7 @@ index 63991bf4be..9a47a1adc1 100644 super(inventory); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java new file mode 100644 -index 0000000000..99cfbaf90b +index 000000000..99cfbaf90 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Improved-Async-Task-Scheduler.patch b/Spigot-Server-Patches/Improved-Async-Task-Scheduler.patch index 0bd442eaa0..0386faa530 100644 --- a/Spigot-Server-Patches/Improved-Async-Task-Scheduler.patch +++ b/Spigot-Server-Patches/Improved-Async-Task-Scheduler.patch @@ -32,7 +32,7 @@ operations are decoupled from the sync tasks queue. diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java new file mode 100644 -index 0000000000..3c1992e212 +index 000000000..3c1992e21 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncScheduler.java @@ -0,0 +0,0 @@ @@ -159,7 +159,7 @@ index 0000000000..3c1992e212 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index e102be583c..5db848de14 100644 +index e102be583..5db848de1 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler { diff --git a/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch b/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch index 420b16dfb8..3258e4c5b2 100644 --- a/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch +++ b/Spigot-Server-Patches/Include-Log4J2-SLF4J-implementation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Include Log4J2 SLF4J implementation diff --git a/pom.xml b/pom.xml -index d955106433..b7db74c9ba 100644 +index 026dcfdab..dbc425524 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index 318faa8047..793c2e4e37 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -7,11 +7,11 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index e1bd10579e..89915b3599 100644 +index 3917980b7..007934d8c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { - this.dA(); + this.dW(); super.tick(); if (!this.world.isClientSide && this.activeContainer != null && !this.activeContainer.canUse(this)) { - this.closeInventory(); @@ -34,7 +34,7 @@ index e1bd10579e..89915b3599 100644 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 88bc8b5312..1bb580e0e7 100644 +index 4e6601617..bb2a0b7e6 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -88,7 +88,7 @@ index 88bc8b5312..1bb580e0e7 100644 this.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 89beac63aa..b9793d4cc6 100644 +index 8757b6751..4f04410f9 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -101,7 +101,7 @@ index 89beac63aa..b9793d4cc6 100644 this.player.m(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a167843bfb..9e5cd22d7d 100644 +index 002f7e844..fd0f5c6f2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -114,7 +114,7 @@ index a167843bfb..9e5cd22d7d 100644 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b9015cb8a7..6ca7c88583 100644 +index 4a2e66977..004a06b4b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World { @@ -136,7 +136,7 @@ index b9015cb8a7..6ca7c88583 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 77efc43a5d..81cf5f47a7 100644 +index cd8ad2704..e169679c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -155,7 +155,7 @@ index 77efc43a5d..81cf5f47a7 100644 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e610c8aaed..ce35e6bbc2 100644 +index 4dc79ca4e..e45dd6cd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -168,7 +168,7 @@ index e610c8aaed..ce35e6bbc2 100644 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 8bd1dedcca..ade1d42f7e 100644 +index 94fbac5e4..7967222d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Item-canEntityPickup.patch b/Spigot-Server-Patches/Item-canEntityPickup.patch index 90251b8f15..36320feae6 100644 --- a/Spigot-Server-Patches/Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/Item-canEntityPickup.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 6e304492cf..a14d490ade 100644 +index dac3540c6..eadac07f6 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { EntityItem entityitem = (EntityItem) iterator.next(); - if (!entityitem.dead && !entityitem.getItemStack().isEmpty() && !entityitem.q()) { + if (!entityitem.dead && !entityitem.getItemStack().isEmpty() && !entityitem.p()) { + // Paper Start + if (!entityitem.canMobPickup) { + continue; @@ -21,7 +21,7 @@ index 6e304492cf..a14d490ade 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 0569ad9af8..c0b81223f1 100644 +index f657607a1..9973fc0b1 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ public class EntityItem extends Entity { @@ -33,7 +33,7 @@ index 0569ad9af8..c0b81223f1 100644 public EntityItem(EntityTypes entitytypes, World world) { super(entitytypes, world); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index cc593fbc99..3f552b5905 100644 +index cc593fbc9..3f552b590 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -0,0 +0,0 @@ public class CraftItem extends CraftEntity implements Item { diff --git a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch index d557521bef..f1c7abc5db 100644 --- a/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-Server-Patches/ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index d4ffaea7cb..f849a29e2a 100644 +index 2d0a8c58f..5fc7124dd 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { @@ -18,7 +18,7 @@ index d4ffaea7cb..f849a29e2a 100644 return this.getItem().f_(this); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index c45fe35e03..e6aac0cff0 100644 +index 410444747..553f60987 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -0,0 +0,0 @@ public final class CraftItemStack extends ItemStack { diff --git a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch index 1398825a43..345f795af8 100644 --- a/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,30 +6,30 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index dfbd40a99..e1972f793 100644 +index 855afcd64..470cbddeb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - private float bD; + private float bB; private int jumpTicks; - private float bF; + private float bD; - protected ItemStack activeItem; + public ItemStack activeItem; // Paper - public - protected int bo; - protected int bp; - private BlockPosition bG; + protected int bl; + protected int bm; + private BlockPosition bE; @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { return this.activeItem; } -+ public int getItemUseRemainingTime() { return this.dm(); } // Paper - OBFHELPER - public int dm() { - return this.bo; ++ public int getItemUseRemainingTime() { return this.dE(); } // Paper - OBFHELPER + public int dE() { + return this.bl; } -+ public int getHandRaisedTime() { return this.dn(); } // Paper - OBFHELPER - public int dn() { - return this.isHandRaised() ? this.activeItem.k() - this.dm() : 0; ++ public int getHandRaisedTime() { return this.dF(); } // Paper - OBFHELPER + public int dF() { + return this.isHandRaised() ? this.activeItem.k() - this.dE() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 67f275321..379239567 100644 diff --git a/Spigot-Server-Patches/LivingEntity-setKiller.patch b/Spigot-Server-Patches/LivingEntity-setKiller.patch index b02a6626c4..515652b4a0 100644 --- a/Spigot-Server-Patches/LivingEntity-setKiller.patch +++ b/Spigot-Server-Patches/LivingEntity-setKiller.patch @@ -5,18 +5,18 @@ Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index a016cbb21..46dfb3c49 100644 +index f6cb18639..bf049bfc4 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { - public float aN; - public float aO; + public float aL; + public float aM; public EntityHuman killer; - protected int lastDamageByPlayerTime; + public int lastDamageByPlayerTime; // Paper - protected -> public protected boolean killed; protected int ticksFarFromPlayer; - protected float aT; + protected float aR; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 7e9aff668..b8482c632 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch index a815efdfcc..909328c64b 100644 --- a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch @@ -11,7 +11,7 @@ This feature is good for long term worlds so that newer players do not suffer with "Every chest has been looted" diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bea878970..934097163 100644 +index d00e8155d..277f7618e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -520,19 +520,19 @@ index 000000000..d50410532 + } +} diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 36bfee227..4793bc7d8 100644 +index 167d22574..2e56c7f57 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; - } + }; + // Paper end + public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; public CraftEntity getBukkitEntity() { diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -index 676d67dc3..8e6e7ed60 100644 +index 72d0c53cd..fd8e8ae20 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java @@ -0,0 +0,0 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp @@ -591,7 +591,7 @@ index 676d67dc3..8e6e7ed60 100644 if (entityhuman != null) { diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index 56c7f9b4e..a12d49fc4 100644 +index 8f776e0df..04a6511ff 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; diff --git a/Spigot-Server-Patches/Make-legacy-ping-handler-more-reliable.patch b/Spigot-Server-Patches/Make-legacy-ping-handler-more-reliable.patch index 31807579a9..bf63ff68b6 100644 --- a/Spigot-Server-Patches/Make-legacy-ping-handler-more-reliable.patch +++ b/Spigot-Server-Patches/Make-legacy-ping-handler-more-reliable.patch @@ -28,7 +28,7 @@ respond to the request. [2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13 diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java -index 9ee5a1ff02..063efe9bbe 100644 +index 9ee5a1ff0..063efe9bb 100644 --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java @@ -0,0 +0,0 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter { diff --git a/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch index 5359a88cb2..79c803acf8 100644 --- a/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch +++ b/Spigot-Server-Patches/Make-max-squid-spawn-height-configurable.patch @@ -7,7 +7,7 @@ I don't know why upstream made only the minimum height configurable but whatever diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 063ba6a1d..aacce432b 100644 +index 671587631..e315a00cc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index 063ba6a1d..aacce432b 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index f8fa64959..735d1879a 100644 +index 8c4f3b2c2..1c1ff2069 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { diff --git a/Spigot-Server-Patches/Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/Make-player-data-saving-configurable.patch index 60ad580c21..0d6fab579f 100644 --- a/Spigot-Server-Patches/Make-player-data-saving-configurable.patch +++ b/Spigot-Server-Patches/Make-player-data-saving-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make player data saving configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 11f08c2b73..4169ec9a58 100644 +index 5884b04f7..ba341e017 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { @@ -23,7 +23,7 @@ index 11f08c2b73..4169ec9a58 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index a0254d8e51..e60e10c57d 100644 +index a0254d8e5..e60e10c57 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -0,0 +0,0 @@ public class WorldNBTStorage implements IPlayerFileData { diff --git a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch index ab32f083a4..babc0243bd 100644 --- a/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/Make-shield-blocking-delay-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cb8922329..6c3d074b8 100644 +index 585646ded..54bf1323e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,15 +19,15 @@ index cb8922329..6c3d074b8 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 74c1f7c44..a873685e4 100644 +index c03fcd2d3..3f493f415 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity { if (this.isHandRaised() && !this.activeItem.isEmpty()) { Item item = this.activeItem.getItem(); -- return item.e_(this.activeItem) != EnumAnimation.BLOCK ? false : item.f_(this.activeItem) - this.bo >= 5; -+ return item.e_(this.activeItem) != EnumAnimation.BLOCK ? false : item.f_(this.activeItem) - this.bo >= getShieldBlockingDelay(); // Paper - shieldBlockingDelay +- return item.e_(this.activeItem) != EnumAnimation.BLOCK ? false : item.f_(this.activeItem) - this.bl >= 5; ++ return item.e_(this.activeItem) != EnumAnimation.BLOCK ? false : item.f_(this.activeItem) - this.bl >= getShieldBlockingDelay(); // Paper - shieldBlockingDelay } else { return false; } diff --git a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch index 2deb858ab0..63f43bf5e2 100644 --- a/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch +++ b/Spigot-Server-Patches/Make-targetSize-more-aggressive-in-the-chunk-unload-.patch @@ -5,17 +5,17 @@ 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 14b0875eee..63140fb642 100644 +index 1d4eddd93..492d1538f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.v = new AtomicInteger(); + this.u = new AtomicInteger(); this.playerMap = new PlayerMap(); this.trackedEntities = new Int2ObjectOpenHashMap(); -- this.A = Queues.newConcurrentLinkedQueue(); -+ this.A = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper +- this.z = Queues.newConcurrentLinkedQueue(); ++ this.z = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper this.definedStructureManager = definedstructuremanager; - this.x = worldserver.getWorldProvider().getDimensionManager().a(file); + this.w = worldserver.getWorldProvider().getDimensionManager().a(file); this.world = worldserver; @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Spigot start @@ -30,10 +30,9 @@ index 14b0875eee..63140fb642 100644 Runnable runnable; -- while ((booleansupplier.getAsBoolean() || this.A.size() > 2000) && (runnable = (Runnable) this.A.poll()) != null) { -+ int queueTarget = Math.min(this.A.size() - 100, (int) (this.A.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Target this queue as well -+ -+ while ((booleansupplier.getAsBoolean() || this.A.size() > queueTarget) && (runnable = (Runnable) this.A.poll()) != null) { // Paper - Target this queue as well +- while ((booleansupplier.getAsBoolean() || this.z.size() > 2000) && (runnable = (Runnable) this.z.poll()) != null) { ++ int queueTarget = Math.min(this.z.size() - 100, (int) (this.z.size() * UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Target this queue as well ++ while ((booleansupplier.getAsBoolean() || this.z.size() > queueTarget) && (runnable = (Runnable) this.z.poll()) != null) { // Paper - Target this queue as well runnable.run(); } diff --git a/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch b/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch index 9647b43bdf..7268f650d2 100644 --- a/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch +++ b/Spigot-Server-Patches/More-informative-vehicle-moved-wrongly-message.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More informative vehicle moved wrongly message diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 046bcb27e3..39662f1462 100644 +index 8f182fcc8..53d201c59 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch b/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch index ac530bdf42..e5de07d00e 100644 --- a/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch +++ b/Spigot-Server-Patches/Ocelot-despawns-should-honor-nametags-and-leash.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java -index a6b15efd5d..edc5f696c0 100644 +index 062411455..d9a7b8ac1 100644 --- a/src/main/java/net/minecraft/server/EntityOcelot.java +++ b/src/main/java/net/minecraft/server/EntityOcelot.java @@ -0,0 +0,0 @@ public class EntityOcelot extends EntityAnimal { diff --git a/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch index e09bc487d5..3fab060a29 100644 --- a/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch +++ b/Spigot-Server-Patches/Only-send-Dragon-Wither-Death-sounds-to-same-world.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Only send Dragon/Wither Death sounds to same world Also fix view distance lookup diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 9ecbc8e3e..0421052d2 100644 +index e11ccdbd8..e0d240a89 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - if (this.bL == 1) { + if (this.bA == 1) { // CraftBukkit start - Use relative location for far away sounds // this.world.b(1028, new BlockPosition(this), 0); - int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; @@ -20,11 +20,11 @@ index 9ecbc8e3e..0421052d2 100644 + for (EntityPlayer player : ((WorldServer)world).getPlayers()) { + final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch + // Paper end - double deltaX = this.locX - player.locX; - double deltaZ = this.locZ - player.locZ; + double deltaX = this.locX() - player.locX(); + double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java -index 92acd504a..ee1b0a884 100644 +index 2edf466ee..2e95069c1 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java @@ -0,0 +0,0 @@ public class EntityWither extends EntityMonster implements IRangedEntity { @@ -38,7 +38,7 @@ index 92acd504a..ee1b0a884 100644 + for (EntityPlayer player : ((WorldServer)world).getPlayers()) { + final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch + // Paper end - double deltaX = this.locX - player.locX; - double deltaZ = this.locZ - player.locZ; + double deltaX = this.locX() - player.locX(); + double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimise-BlockState-s-hashCode-equals.patch b/Spigot-Server-Patches/Optimise-BlockState-s-hashCode-equals.patch index 67fe91437d..35660b91a3 100644 --- a/Spigot-Server-Patches/Optimise-BlockState-s-hashCode-equals.patch +++ b/Spigot-Server-Patches/Optimise-BlockState-s-hashCode-equals.patch @@ -9,7 +9,7 @@ object identity checks safely. Use a simpler optimized hashcode diff --git a/src/main/java/net/minecraft/server/BlockState.java b/src/main/java/net/minecraft/server/BlockState.java -index 77b25317a..be7e10d85 100644 +index 0ce77d923..00e67b567 100644 --- a/src/main/java/net/minecraft/server/BlockState.java +++ b/src/main/java/net/minecraft/server/BlockState.java @@ -0,0 +0,0 @@ public abstract class BlockState> implements IBlockState @@ -41,7 +41,7 @@ index 77b25317a..be7e10d85 100644 public int c() { diff --git a/src/main/java/net/minecraft/server/BlockStateBoolean.java b/src/main/java/net/minecraft/server/BlockStateBoolean.java -index 31cb8ac84..3f085c7d6 100644 +index d8738447d..7ca302b52 100644 --- a/src/main/java/net/minecraft/server/BlockStateBoolean.java +++ b/src/main/java/net/minecraft/server/BlockStateBoolean.java @@ -0,0 +0,0 @@ public class BlockStateBoolean extends BlockState { @@ -55,7 +55,7 @@ index 31cb8ac84..3f085c7d6 100644 return true; } else if (object instanceof BlockStateBoolean && super.equals(object)) { diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java -index 59d86fc66..82a1fac6f 100644 +index 1486d460c..7cdadc6b6 100644 --- a/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java @@ -0,0 +0,0 @@ public class BlockStateEnum & INamable> extends BlockState @@ -69,7 +69,7 @@ index 59d86fc66..82a1fac6f 100644 return true; } else if (object instanceof BlockStateEnum && super.equals(object)) { diff --git a/src/main/java/net/minecraft/server/BlockStateInteger.java b/src/main/java/net/minecraft/server/BlockStateInteger.java -index 6861c2b05..74ef69952 100644 +index 6f35c365f..0499a7170 100644 --- a/src/main/java/net/minecraft/server/BlockStateInteger.java +++ b/src/main/java/net/minecraft/server/BlockStateInteger.java @@ -0,0 +0,0 @@ public class BlockStateInteger extends BlockState { diff --git a/Spigot-Server-Patches/Optimise-removeQueue.patch b/Spigot-Server-Patches/Optimise-removeQueue.patch index d9e4678555..03f7c5dd60 100644 --- a/Spigot-Server-Patches/Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/Optimise-removeQueue.patch @@ -4,66 +4,65 @@ Date: Fri, 25 Nov 2016 13:22:40 +0000 Subject: [PATCH] Optimise removeQueue -diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8ba828a03..170f741d4 100644 ---- a/src/main/java/net/minecraft/server/EntityPlayer.java -+++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -0,0 +0,0 @@ import com.google.common.collect.Lists; - import com.mojang.authlib.GameProfile; - import com.mojang.datafixers.util.Either; - import io.netty.util.concurrent.Future; -+import java.util.ArrayDeque; // Paper - import java.util.Collection; -+import java.util.Deque; // Paper - import java.util.Iterator; - import java.util.List; - import java.util.OptionalInt; -@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - public PlayerConnection playerConnection; - public final MinecraftServer server; - public final PlayerInteractManager playerInteractManager; -- public final List removeQueue = Lists.newLinkedList(); -+ public final Deque removeQueue = new ArrayDeque<>(); // Paper - private final AdvancementDataPlayer advancementDataPlayer; - private final ServerStatisticManager serverStatisticManager; - private float lastHealthScored = Float.MIN_VALUE; -@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - while (!this.removeQueue.isEmpty()) { - int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE); - int[] aint = new int[i]; -- Iterator iterator = this.removeQueue.iterator(); -+ //Iterator iterator = this.removeQueue.iterator(); // Paper - int j = 0; +diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java +index 2480bc64b..3683fa298 100644 +--- a/src/main/java/net/minecraft/server/LoginListener.java ++++ b/src/main/java/net/minecraft/server/LoginListener.java +@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { -- while (iterator.hasNext() && j < i) { -+ // Paper start -+ /* while (iterator.hasNext() && j < i) { - aint[j++] = (Integer) iterator.next(); - iterator.remove(); -+ } */ -+ -+ Integer integer; -+ while (j < i && (integer = this.removeQueue.poll()) != null) { -+ aint[j++] = integer.intValue(); - } + } + ++ // Paper start - Cache authenticator threads ++ private static final AtomicInteger threadId = new AtomicInteger(0); ++ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool( ++ r -> new Thread(r, "User Authenticator #" + threadId.incrementAndGet()) ++ ); ++ // Paper end + // Spigot start + public void initUUID() + { +@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { + this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic(), this.e)); + } else { + // Spigot start +- new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) { +- ++ // Paper start - Cache authenticator threads ++ authenticatorPool.execute(new Runnable() { + @Override + public void run() { + try { +@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { + server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex); + } + } +- }.start(); ++ }); + // Paper end - - this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); + // Spigot end } -@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.lastHealthSent = -1.0F; - this.lastFoodSent = -1; - // this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit -- this.removeQueue.addAll(entityplayer.removeQueue); -+ // Paper start - Optimize remove queue - vanilla copies player objects, but CB doesn't. This method currently only -+ // Applies to the same player, so we need to not duplicate our removal queue. The rest of this method does "resetting" -+ // type logic so it does need to be called, maybe? This is silly. -+ //this.removeQueue.addAll(entityplayer.removeQueue); -+ if (this.removeQueue != entityplayer.removeQueue) { -+ this.removeQueue.addAll(entityplayer.removeQueue); -+ } -+ // Paper end - this.cp = entityplayer.cp; - this.cu = entityplayer.cu; - this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft()); + +@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { + this.loginKey = packetlogininencryptionbegin.a(privatekey); + this.g = LoginListener.EnumProtocolState.AUTHENTICATING; + this.networkManager.a(this.loginKey); +- Thread thread = new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) { ++ // Paper start - Cache authenticator threads ++ authenticatorPool.execute(new Runnable() { + public void run() { + GameProfile gameprofile = LoginListener.this.i; + +@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { + + return LoginListener.this.server.X() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; + } +- }; +- +- thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LoginListener.LOGGER)); +- thread.start(); ++ }); ++ // Paper end + } + } + -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch index ab9416dc7e..8e54dccdc5 100644 --- a/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/Optimize-ItemStack.isEmpty.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 5bc078d31..09d0de48e 100644 +index 0a1596ff0..2d0a8c58f 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -0,0 +0,0 @@ public final class ItemStack { diff --git a/Spigot-Server-Patches/Optimize-RegistryID.c.patch b/Spigot-Server-Patches/Optimize-RegistryID.c.patch index 2b1cebe559..60f2a49c7a 100644 --- a/Spigot-Server-Patches/Optimize-RegistryID.c.patch +++ b/Spigot-Server-Patches/Optimize-RegistryID.c.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize RegistryID.c() This is a frequent hotspot for world loading/saving. diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java -index e15d286710..e8a48b9a4c 100644 +index e15d28671..e8a48b9a4 100644 --- a/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java @@ -0,0 +0,0 @@ public class RegistryID implements Registry { diff --git a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch index 2994d24814..acb0e91eb1 100644 --- a/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch +++ b/Spigot-Server-Patches/Optimize-UserCache-Thread-Safe.patch @@ -10,7 +10,7 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 17b9e9a31d..6a2933f4ff 100644 +index 2a40bb0b8..38bf3ea44 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Fri, 2 Dec 2016 00:11:43 -0500 -Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z - -Reduce method invocations for World.isLoaded(BlockPosition)Z - -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4ce18f85b..cfdb6b57f 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose - return i < 0 || i >= 256; - } - -+ public boolean isLoaded(BlockPosition blockposition) { -+ return getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4) != null; // Paper -+ } -+ - // Paper start - public boolean isLoadedAndInBounds(BlockPosition blockposition) { - return getWorldBorder().isInBounds(blockposition) && getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4) != null; --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch index 965e584fea..427d7867d2 100644 --- a/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 891a52b2a..063ba6a1d 100644 +index c145e27cc..671587631 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -20,7 +20,7 @@ index 891a52b2a..063ba6a1d 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 7f38d82a6..a438e4320 100644 +index 2bf53db88..e310f2afe 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch index 7a121911ee..468e7a4189 100644 --- a/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Option to remove corrupt tile entities diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 300cc68a7..83d430ee5 100644 +index 1dbeb209e..fd1be52f3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index 300cc68a7..83d430ee5 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 85e17253d..1da80e244 100644 +index 034e8684d..1efddb533 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch index cbdec84c79..ac997601b8 100644 --- a/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/Optional-TNT-doesn-t-move-in-water.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optional TNT doesn't move in water diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 934097163..300cc68a7 100644 +index 277f7618e..1dbeb209e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ package com.destroystokyo.paper; @@ -32,13 +32,13 @@ index 934097163..300cc68a7 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4793bc7d8..0981e9c8c 100644 +index 2e56c7f57..e04b3f4e2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } - public boolean bE() { + public boolean bM() { + // Paper start + return this.pushedByWater(); + } @@ -49,12 +49,12 @@ index 4793bc7d8..0981e9c8c 100644 } diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index f2ee53ab9..dc0d944ea 100644 +index 7625dca00..75193e87d 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { - this.ay(); - this.world.addParticle(Particles.SMOKE, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D); + this.world.addParticle(Particles.SMOKE, this.locX(), this.locY() + 0.5D, this.locZ(), 0.0D, 0.0D, 0.0D); + } } - + // Paper start - Optional prevent TNT from moving in water @@ -82,7 +82,7 @@ index f2ee53ab9..dc0d944ea 100644 private void explode() { @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { - public Packet N() { + public Packet L() { return new PacketPlayOutSpawnEntity(this); } + @@ -94,7 +94,7 @@ index f2ee53ab9..dc0d944ea 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index f04a9d18c..cd7e0299a 100644 +index a13fd9b34..3ff7a7b4a 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -0,0 +0,0 @@ public class EntityTrackerEntry { diff --git a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch index 730d274960..d8d492a34c 100644 --- a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch @@ -6,20 +6,20 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 0ca5e7886b..778356381d 100644 +index eb8f3833e..205a842ee 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { - protected int bR; - protected final float bS = 0.02F; - private int bV; -- private final GameProfile bW; -+ private GameProfile bW; public final void setProfile(final GameProfile profile) { this.bW = profile; } // Paper - OBFHELPER - private ItemStack bY; - private final ItemCooldown bZ; + protected int bO; + protected final float bP = 0.02F; + private int bS; +- private final GameProfile bT; ++ private GameProfile bT; public final void setProfile(final GameProfile profile) { this.bT = profile; } // Paper - OBFHELPER + private ItemStack bV; + private final ItemCooldown bW; @Nullable diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index a272a70303..d6befec184 100644 +index 0614976b8..a985ae7ba 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { @@ -48,7 +48,7 @@ index a272a70303..d6befec184 100644 uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 854d6f7999..a2ef3f59ee 100644 +index c82de14eb..87b715d69 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/PlayerAdvancementCriterionGrantEvent.patch b/Spigot-Server-Patches/PlayerAdvancementCriterionGrantEvent.patch index d4ce494b02..af0bff3efd 100644 --- a/Spigot-Server-Patches/PlayerAdvancementCriterionGrantEvent.patch +++ b/Spigot-Server-Patches/PlayerAdvancementCriterionGrantEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAdvancementCriterionGrantEvent diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -index 4040eb3b3f..b7f1f39a16 100644 +index 4407e760c..fe5bea363 100644 --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java @@ -0,0 +0,0 @@ public class AdvancementDataPlayer { diff --git a/Spigot-Server-Patches/PlayerAttemptPickupItemEvent.patch b/Spigot-Server-Patches/PlayerAttemptPickupItemEvent.patch index 68ca67b411..239c12e448 100644 --- a/Spigot-Server-Patches/PlayerAttemptPickupItemEvent.patch +++ b/Spigot-Server-Patches/PlayerAttemptPickupItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 1baff88c4a..f1f86ef8b5 100644 +index 4b2e19f30..fcc1c0993 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ import javax.annotation.Nullable; diff --git a/Spigot-Server-Patches/PlayerElytraBoostEvent.patch b/Spigot-Server-Patches/PlayerElytraBoostEvent.patch index 419d1a2d47..b1272aba2d 100644 --- a/Spigot-Server-Patches/PlayerElytraBoostEvent.patch +++ b/Spigot-Server-Patches/PlayerElytraBoostEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerElytraBoostEvent diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index aea46ffae5..9e86ef4ce2 100644 +index 76b253a50..a43e52889 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java @@ -0,0 +0,0 @@ public class ItemFireworks extends Item { @@ -28,5 +28,5 @@ index aea46ffae5..9e86ef4ce2 100644 + // Paper end } - return new InteractionResultWrapper<>(EnumInteractionResult.SUCCESS, entityhuman.b(enumhand)); + return InteractionResultWrapper.a(entityhuman.b(enumhand)); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/PlayerLaunchProjectileEvent.patch deleted file mode 100644 index e12c3eb7eb..0000000000 --- a/Spigot-Server-Patches/PlayerLaunchProjectileEvent.patch +++ /dev/null @@ -1,260 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: BillyGalbreath -Date: Sat, 21 Jul 2018 03:11:03 -0500 -Subject: [PATCH] PlayerLaunchProjectileEvent - - -diff --git a/src/main/java/net/minecraft/server/ItemEgg.java b/src/main/java/net/minecraft/server/ItemEgg.java -index 7cc3c33b0..b92d39600 100644 ---- a/src/main/java/net/minecraft/server/ItemEgg.java -+++ b/src/main/java/net/minecraft/server/ItemEgg.java -@@ -0,0 +0,0 @@ public class ItemEgg extends Item { - public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { - ItemStack itemstack = entityhuman.b(enumhand); - -+ /* // Paper start - moved down - if (!entityhuman.abilities.canInstantlyBuild) { - itemstack.subtract(1); - } - - world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.i.nextFloat() * 0.4F + 0.8F)); -+ */ // Paper end - if (!world.isClientSide) { - EntityEgg entityegg = new EntityEgg(world, entityhuman); - - entityegg.setItem(itemstack); - entityegg.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F); -- world.addEntity(entityegg); -+ // Paper start -+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entityegg.getBukkitEntity()); -+ if (event.callEvent() && world.addEntity(entityegg)) { -+ if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { -+ itemstack.subtract(1); -+ } else if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ -+ world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (Entity.SHARED_RANDOM.nextFloat() * 0.4F + 0.8F)); -+ } else { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); -+ } -+ // Paper end - } - - entityhuman.b(StatisticList.ITEM_USED.b(this)); -diff --git a/src/main/java/net/minecraft/server/ItemEnderPearl.java b/src/main/java/net/minecraft/server/ItemEnderPearl.java -index e4a9e4b7b..570abc8b2 100644 ---- a/src/main/java/net/minecraft/server/ItemEnderPearl.java -+++ b/src/main/java/net/minecraft/server/ItemEnderPearl.java -@@ -0,0 +0,0 @@ public class ItemEnderPearl extends Item { - - entityenderpearl.setItem(itemstack); - entityenderpearl.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F); -- if (!world.addEntity(entityenderpearl)) { -+ // Paper start -+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entityenderpearl.getBukkitEntity()); -+ if (event.callEvent() && world.addEntity(entityenderpearl)) { -+ if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { -+ itemstack.subtract(1); -+ } else if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ -+ world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (Entity.SHARED_RANDOM.nextFloat() * 0.4F + 0.8F)); -+ entityhuman.getCooldownTracker().setCooldown(this, 20); -+ } else { -+ // Paper end - if (entityhuman instanceof EntityPlayer) { - ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); - } -@@ -0,0 +0,0 @@ public class ItemEnderPearl extends Item { - } - } - -- if (!entityhuman.abilities.canInstantlyBuild) { -- itemstack.subtract(1); -- } -- -- world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemEnderPearl.i.nextFloat() * 0.4F + 0.8F)); -- entityhuman.getCooldownTracker().a(this, 20); -- // CraftBukkit end -+// // Paper start - moved up -+// if (!entityhuman.abilities.canInstantlyBuild) { -+// itemstack.subtract(1); -+// } -+// -+// world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemEnderPearl.i.nextFloat() * 0.4F + 0.8F)); -+// entityhuman.getCooldownTracker().a(this, 20); -+// // CraftBukkit end -+// // Paper end - - entityhuman.b(StatisticList.ITEM_USED.b(this)); - return new InteractionResultWrapper<>(EnumInteractionResult.SUCCESS, itemstack); -diff --git a/src/main/java/net/minecraft/server/ItemExpBottle.java b/src/main/java/net/minecraft/server/ItemExpBottle.java -index 8d557cd85..2a0aded65 100644 ---- a/src/main/java/net/minecraft/server/ItemExpBottle.java -+++ b/src/main/java/net/minecraft/server/ItemExpBottle.java -@@ -0,0 +0,0 @@ public class ItemExpBottle extends Item { - @Override - public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { - ItemStack itemstack = entityhuman.b(enumhand); -- -+ /* // Paper start - if (!entityhuman.abilities.canInstantlyBuild) { - itemstack.subtract(1); - } - - world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F)); -+ */ // Paper end - if (!world.isClientSide) { - EntityThrownExpBottle entitythrownexpbottle = new EntityThrownExpBottle(world, entityhuman); - - entitythrownexpbottle.setItem(itemstack); - entitythrownexpbottle.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.7F, 1.0F); -- world.addEntity(entitythrownexpbottle); -+ // Paper start -+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entitythrownexpbottle.getBukkitEntity()); -+ if (event.callEvent() && world.addEntity(entitythrownexpbottle)) { -+ if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { -+ itemstack.subtract(1); -+ } else if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ -+ world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (Entity.SHARED_RANDOM.nextFloat() * 0.4F + 0.8F)); -+ } else { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); -+ } -+ // Paper end - } - - entityhuman.b(StatisticList.ITEM_USED.b(this)); -diff --git a/src/main/java/net/minecraft/server/ItemLingeringPotion.java b/src/main/java/net/minecraft/server/ItemLingeringPotion.java -index 1bddb7801..ca3f9f8cc 100644 ---- a/src/main/java/net/minecraft/server/ItemLingeringPotion.java -+++ b/src/main/java/net/minecraft/server/ItemLingeringPotion.java -@@ -0,0 +0,0 @@ public class ItemLingeringPotion extends ItemPotion { - @Override - public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { - ItemStack itemstack = entityhuman.b(enumhand); -+ /* // Paper start - ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); - - world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F)); -+ */ // Paper end - if (!world.isClientSide) { -+ -+ // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet -+ ItemStack itemstack1 = itemstack.cloneItemStack(); -+ if (!entityhuman.abilities.canInstantlyBuild) { -+ itemstack1.setCount(1); -+ } -+ // Paper end - EntityPotion entitypotion = new EntityPotion(world, entityhuman); - - entitypotion.setItem(itemstack1); - entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F); -- world.addEntity(entitypotion); -+ // Paper start -+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entitypotion.getBukkitEntity()); -+ if (event.callEvent() && world.addEntity(entitypotion)) { -+ if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { -+ itemstack.subtract(1); -+ } else if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ -+ world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (Entity.SHARED_RANDOM.nextFloat() * 0.4F + 0.8F)); -+ } else { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); -+ } -+ // Paper end - } - - entityhuman.b(StatisticList.ITEM_USED.b(this)); -diff --git a/src/main/java/net/minecraft/server/ItemSnowball.java b/src/main/java/net/minecraft/server/ItemSnowball.java -index f5387a74a..bbd22596e 100644 ---- a/src/main/java/net/minecraft/server/ItemSnowball.java -+++ b/src/main/java/net/minecraft/server/ItemSnowball.java -@@ -0,0 +0,0 @@ public class ItemSnowball extends Item { - - entitysnowball.setItem(itemstack); - entitysnowball.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F); -- if (world.addEntity(entitysnowball)) { -- if (!entityhuman.abilities.canInstantlyBuild) { -+ // Paper start -+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entitysnowball.getBukkitEntity()); -+ if (event.callEvent() && world.addEntity(entitysnowball)) { -+ if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { - itemstack.subtract(1); -+ } else if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); - } - -- world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemSnowball.i.nextFloat() * 0.4F + 0.8F)); -- } else if (entityhuman instanceof EntityPlayer) { -- ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (Entity.SHARED_RANDOM.nextFloat() * 0.4F + 0.8F)); -+ } else { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ return new InteractionResultWrapper<>(EnumInteractionResult.FAIL, itemstack); - } - } - // CraftBukkit end -diff --git a/src/main/java/net/minecraft/server/ItemSplashPotion.java b/src/main/java/net/minecraft/server/ItemSplashPotion.java -index bb9e60659..4460ddc6d 100644 ---- a/src/main/java/net/minecraft/server/ItemSplashPotion.java -+++ b/src/main/java/net/minecraft/server/ItemSplashPotion.java -@@ -0,0 +0,0 @@ public class ItemSplashPotion extends ItemPotion { - @Override - public InteractionResultWrapper a(World world, EntityHuman entityhuman, EnumHand enumhand) { - ItemStack itemstack = entityhuman.b(enumhand); -+ /* // Paper start - ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1); - - world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F)); -+ */ // Paper end - if (!world.isClientSide) { - EntityPotion entitypotion = new EntityPotion(world, entityhuman); -+ // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet -+ ItemStack itemstack1 = itemstack.cloneItemStack(); -+ if (!entityhuman.abilities.canInstantlyBuild) { -+ itemstack1.setCount(1); -+ } -+ // Paper end - - entitypotion.setItem(itemstack1); - entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F); -- world.addEntity(entitypotion); -+ // Paper start -+ com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entitypotion.getBukkitEntity()); -+ if (event.callEvent() && world.addEntity(entitypotion)) { -+ if (event.shouldConsume() && !entityhuman.abilities.canInstantlyBuild) { -+ itemstack.subtract(1); -+ } else if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ -+ world.playSound((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (Entity.SHARED_RANDOM.nextFloat() * 0.4F + 0.8F)); -+ } else { -+ if (entityhuman instanceof EntityPlayer) { -+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); -+ } -+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack); -+ } -+ // Paper end - } - - entityhuman.b(StatisticList.ITEM_USED.b(this)); --- \ No newline at end of file diff --git a/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch index 9252546b0c..f1aacc6083 100644 --- a/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/PlayerNaturallySpawnCreaturesEvent.patch @@ -9,7 +9,7 @@ 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 6a3a66e7d..649600b3e 100644 +index 492d1538f..df24bac3b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/PlayerPickupExperienceEvent.patch b/Spigot-Server-Patches/PlayerPickupExperienceEvent.patch index dc75f5670c..6d8157171b 100644 --- a/Spigot-Server-Patches/PlayerPickupExperienceEvent.patch +++ b/Spigot-Server-Patches/PlayerPickupExperienceEvent.patch @@ -6,16 +6,16 @@ Subject: [PATCH] PlayerPickupExperienceEvent Allows plugins to cancel a player picking up an experience orb diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java -index 35f03947d..e6b810756 100644 +index d4275e733..b3edb69a9 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity { @Override public void pickup(EntityHuman entityhuman) { if (!this.world.isClientSide) { -- if (this.d == 0 && entityhuman.bF == 0) { -+ if (this.d == 0 && entityhuman.bF == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(((EntityPlayer) entityhuman).getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - entityhuman.bF = 2; +- if (this.d == 0 && entityhuman.bC == 0) { ++ if (this.d == 0 && entityhuman.bC == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(((EntityPlayer) entityhuman).getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper + entityhuman.bC = 2; entityhuman.receive(this, 1); Entry entry = EnchantmentManager.b(Enchantments.MENDING, (EntityLiving) entityhuman); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/PlayerPickupItemEvent-setFlyAtPlayer.patch b/Spigot-Server-Patches/PlayerPickupItemEvent-setFlyAtPlayer.patch index 4da6c98ff0..6c9710f861 100644 --- a/Spigot-Server-Patches/PlayerPickupItemEvent-setFlyAtPlayer.patch +++ b/Spigot-Server-Patches/PlayerPickupItemEvent-setFlyAtPlayer.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 27decbd06..17c291569 100644 +index 9973fc0b1..4b2e19f30 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -0,0 +0,0 @@ public class EntityItem extends Entity { @@ -34,7 +34,7 @@ index 27decbd06..17c291569 100644 @@ -0,0 +0,0 @@ public class EntityItem extends Entity { // CraftBukkit end - if (this.pickupDelay == 0 && (this.owner == null || 6000 - this.age <= 200 || this.owner.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) { + if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) { - entityhuman.receive(this, i); + // Paper Start + if (flyAtPlayer) { diff --git a/Spigot-Server-Patches/PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/PlayerReadyArrowEvent.patch index 71eafda43c..24d8ec159e 100644 --- a/Spigot-Server-Patches/PlayerReadyArrowEvent.patch +++ b/Spigot-Server-Patches/PlayerReadyArrowEvent.patch @@ -7,11 +7,11 @@ Called when a player is firing a bow and the server is choosing an arrow to use. Plugins can skip selection of certain arrows and control which is used. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index dfd004f02..5a95fe160 100644 +index 4e91fdd69..3917980b7 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { - return (EntitySize) EntityHuman.b.getOrDefault(entitypose, EntityHuman.bs); + return (EntitySize) EntityHuman.b.getOrDefault(entitypose, EntityHuman.bp); } + // Paper start diff --git a/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch index 15647d88fb..e8006880be 100644 --- a/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/PlayerTeleportEndGatewayEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent Allows you to access the Gateway being used in a teleport event diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java -index 2f44cf89f..1783f5914 100644 +index b907a3c4d..78fba7937 100644 --- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java +++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java @@ -0,0 +0,0 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick diff --git a/Spigot-Server-Patches/PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/PreCreatureSpawnEvent.patch index 8d1e562123..ca0e9336a4 100644 --- a/Spigot-Server-Patches/PreCreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/PreCreatureSpawnEvent.patch @@ -15,40 +15,39 @@ instead and save a lot of server resources. See: https://github.com/PaperMC/Paper/issues/917 diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 59bd9ccd70..6f5d8b0315 100644 +index 258e96ba5..fe8bc7f75 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { double d5 = j >= 3 ? nbttaglist.h(2) : (double) blockposition.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; - if (world.c(((EntityTypes) optional.get()).a(d3, d4, d5)) && EntityPositionTypes.a((EntityTypes) optional.get(), world.getMinecraftWorld(), EnumMobSpawn.SPAWNER, new BlockPosition(d3, d4, d5), world.getRandom())) { -+ // Paper start -+ EntityTypes entityType = optional.get(); -+ String key = EntityTypes.getName(entityType).getKey(); + if (world.a(((EntityTypes) optional.get()).a(d3, d4, d5)) && EntityPositionTypes.a((EntityTypes) optional.get(), world.getMinecraftWorld(), EnumMobSpawn.SPAWNER, new BlockPosition(d3, d4, d5), world.getRandom())) { ++ // Paper start ++ EntityTypes entityType = optional.get(); ++ String key = EntityTypes.getName(entityType).getKey(); + -+ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key); -+ if (type != null) { -+ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; -+ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( -+ MCUtil.toLocation(world, d3, d4, d5), -+ type, -+ org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER -+ ); -+ if (!event.callEvent()) { -+ flag = true; -+ if (event.shouldAbortSpawn()) { -+ break; ++ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key); ++ if (type != null) { ++ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; ++ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( ++ MCUtil.toLocation(world, d3, d4, d5), ++ type, ++ org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER ++ ); ++ if (!event.callEvent()) { ++ flag = true; ++ if (event.shouldAbortSpawn()) { ++ break; ++ } ++ continue; + } -+ continue; + } -+ } -+ // Paper end -+ ++ // Paper end Entity entity = EntityTypes.a(nbttagcompound, world, (entity1) -> { entity1.setPositionRotation(d3, d4, d5, entity1.yaw, entity1.pitch); return entity1; diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 9c065c9997..30da877d53 100644 +index 02157d051..487114367 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -61,7 +60,7 @@ index 9c065c9997..30da877d53 100644 while (true) { @@ -0,0 +0,0 @@ public final class SpawnerCreature { - if (a(entitypositiontypes_surface, (IWorldReader) world, (BlockPosition) blockposition_mutableblockposition, entitytypes) && EntityPositionTypes.a(entitytypes, world, EnumMobSpawn.NATURAL, blockposition_mutableblockposition, world.random) && world.c(entitytypes.a((double) f, (double) k, (double) f1))) { + if (a(entitypositiontypes_surface, (IWorldReader) worldserver, (BlockPosition) blockposition_mutableblockposition, entitytypes) && EntityPositionTypes.a(entitytypes, worldserver, EnumMobSpawn.NATURAL, blockposition_mutableblockposition, worldserver.random) && worldserver.a(entitytypes.a((double) f, (double) k, (double) f1))) { EntityInsentient entityinsentient; + // Paper start @@ -84,6 +83,6 @@ index 9c065c9997..30da877d53 100644 + // Paper end + try { - Entity entity = entitytypes.a(world); + Entity entity = entitytypes.a((World) worldserver); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch index 18ce4d752a..7ad059e0d3 100644 --- a/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch +++ b/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch @@ -5,19 +5,20 @@ Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java -index 39c3bbc9cf..881dfb1235 100644 +index 5e414138e..638a0aa5a 100644 --- a/src/main/java/net/minecraft/server/BlockIceFrost.java +++ b/src/main/java/net/minecraft/server/BlockIceFrost.java @@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce { EnumDirection enumdirection = aenumdirection[j]; blockposition_pooledblockposition.g(blockposition).c(enumdirection); -- IBlockData iblockdata1 = world.getType(blockposition_pooledblockposition); -+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition_pooledblockposition); // Paper - don't load chunks +- IBlockData iblockdata1 = worldserver.getType(blockposition_pooledblockposition); +- ++ IBlockData iblockdata1 = worldserver.getTypeIfLoaded(blockposition_pooledblockposition); // Paper - don't load chunks + if (iblockdata1 == null) continue; // Paper - - if (iblockdata1.getBlock() == this && !this.e(iblockdata1, world, blockposition_pooledblockposition)) { - world.getBlockTickList().a(blockposition_pooledblockposition, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay + if (iblockdata1.getBlock() == this && !this.e(iblockdata1, (World) worldserver, blockposition_pooledblockposition)) { + worldserver.getBlockTickList().a(blockposition_pooledblockposition, this, MathHelper.nextInt(random, worldserver.paperConfig.frostedIceDelayMin, worldserver.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay + } @@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce { EnumDirection enumdirection = aenumdirection[l]; diff --git a/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch index 8619224b27..d90045ccfe 100644 --- a/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch +++ b/Spigot-Server-Patches/Prevent-Pathfinding-out-of-World-Border.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Pathfinding out of World Border This prevents Entities from trying to run outside of the World Border diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 126c05adc7..be6aa59749 100644 +index 39a0c45bb..bdd092e49 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -0,0 +0,0 @@ public abstract class NavigationAbstract { diff --git a/Spigot-Server-Patches/Prevent-logins-from-being-processed-when-the-player-.patch b/Spigot-Server-Patches/Prevent-logins-from-being-processed-when-the-player-.patch index 103c8019c0..ded4e72afb 100644 --- a/Spigot-Server-Patches/Prevent-logins-from-being-processed-when-the-player-.patch +++ b/Spigot-Server-Patches/Prevent-logins-from-being-processed-when-the-player-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent logins from being processed when the player has diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index c3ff7a6b8f..a2af5b4b29 100644 +index a1be28390..828b64e41 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener { diff --git a/Spigot-Server-Patches/Print-Error-details-when-failing-to-save-player-data.patch b/Spigot-Server-Patches/Print-Error-details-when-failing-to-save-player-data.patch index b47bfe3476..05eb5823d6 100644 --- a/Spigot-Server-Patches/Print-Error-details-when-failing-to-save-player-data.patch +++ b/Spigot-Server-Patches/Print-Error-details-when-failing-to-save-player-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Print Error details when failing to save player data diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index e60e10c57d..350ac42d6b 100644 +index e60e10c57..350ac42d6 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -0,0 +0,0 @@ public class WorldNBTStorage implements IPlayerFileData { diff --git a/Spigot-Server-Patches/Profile-Lookup-Events.patch b/Spigot-Server-Patches/Profile-Lookup-Events.patch index 8aa926e60a..1707dabd5b 100644 --- a/Spigot-Server-Patches/Profile-Lookup-Events.patch +++ b/Spigot-Server-Patches/Profile-Lookup-Events.patch @@ -7,7 +7,7 @@ Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in p profiles that had to be looked up. diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java -index 3bcdb8f93f..bb9894318e 100644 +index 3bcdb8f93..bb9894318 100644 --- a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java +++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch index 6e6ed4bf5e..59525a286c 100644 --- a/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/ProfileWhitelistVerifyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6a77707983..a167843bfb 100644 +index 308bc3baf..002f7e844 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -46,5 +46,5 @@ index 6a77707983..a167843bfb 100644 + // Paper end public boolean isOp(GameProfile gameprofile) { - return this.operators.d(gameprofile) || this.server.b(gameprofile) && this.server.getWorldServer(DimensionManager.OVERWORLD).getWorldData().t() || this.u; + return this.operators.d(gameprofile) || this.server.a(gameprofile) && this.server.getWorldServer(DimensionManager.OVERWORLD).getWorldData().t() || this.u; -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch index ed9b98410e..50fbd29200 100644 --- a/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/Properly-fix-item-duplication-bug.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 170f741d4..88bc8b531 100644 +index bf74db31e..4e6601617 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -19,7 +19,7 @@ index 170f741d4..88bc8b531 100644 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 13c1d9b91..068827e2e 100644 +index 16b70221e..cc6a2aaeb 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch index 6a6177b1a2..c990fbb340 100644 --- a/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/Properly-handle-async-calls-to-restart-the-server.patch @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6a2933f4ff..f621350ea6 100644 +index 38bf3ea44..a180ba6b0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0); +- @Deprecated - private final int a; +- @Deprecated - private final int b; +- @Deprecated - private final int c; // Paper start + protected int x; @@ -75,6 +78,12 @@ index 7cb46d7a9c..e96428bb2b 100644 - return this.c; + return this.z; } + + public BaseBlockPosition down() { +@@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable { + public BaseBlockPosition shift(EnumDirection enumdirection, int i) { + return i == 0 ? this : new BaseBlockPosition(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i); + } + // Paper end public BaseBlockPosition d(BaseBlockPosition baseblockposition) { @@ -82,7 +91,7 @@ index 7cb46d7a9c..e96428bb2b 100644 } public boolean a(BaseBlockPosition baseblockposition, double d0) { -- return this.distanceSquared((double) baseblockposition.a, (double) baseblockposition.b, (double) baseblockposition.c, false) < d0 * d0; +- return this.distanceSquared((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ(), false) < d0 * d0; + return this.distanceSquared((double) baseblockposition.x, (double) baseblockposition.y, (double) baseblockposition.z, false) < d0 * d0; // Paper } @@ -91,9 +100,9 @@ index 7cb46d7a9c..e96428bb2b 100644 } public int n(BaseBlockPosition baseblockposition) { -- float f = (float) Math.abs(baseblockposition.getX() - this.a); -- float f1 = (float) Math.abs(baseblockposition.getY() - this.b); -- float f2 = (float) Math.abs(baseblockposition.getZ() - this.c); +- float f = (float) Math.abs(baseblockposition.getX() - this.getX()); +- float f1 = (float) Math.abs(baseblockposition.getY() - this.getY()); +- float f2 = (float) Math.abs(baseblockposition.getZ() - this.getZ()); + float f = (float) Math.abs(baseblockposition.getX() - this.x); // Paper + float f1 = (float) Math.abs(baseblockposition.getY() - this.y); // Paper + float f2 = (float) Math.abs(baseblockposition.getZ() - this.z); // Paper @@ -101,7 +110,7 @@ index 7cb46d7a9c..e96428bb2b 100644 return (int) (f + f1 + f2); } diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 2eabaaeba2..04f754d2c1 100644 +index 1cdf0346f..5a505b753 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -114,19 +123,12 @@ index 2eabaaeba2..04f754d2c1 100644 protected int b; protected int c; protected int d; -- // Paper start -+ - @Override - public boolean isValidLocation() { - return b >= -30000000 && d >= -30000000 && b < 30000000 && d < 30000000 && c >= 0 && c < 256; -@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali - public boolean isInvalidYLocation() { - return c < 0 || c >= 256; - } +- + */ - // Paper end - ++ // Paper end public MutableBlockPosition() { + this(0, 0, 0); + } @@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali } diff --git a/Spigot-Server-Patches/String-based-Action-Bar-API.patch b/Spigot-Server-Patches/String-based-Action-Bar-API.patch index 1a0f24037c..28b3923b8c 100644 --- a/Spigot-Server-Patches/String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/String-based-Action-Bar-API.patch @@ -42,7 +42,7 @@ index c96f3ed17..1f6a12632 100644 public static boolean isMainThread() { return MinecraftServer.getServer().isMainThread(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d854d4844..d06415382 100644 +index 534e2756d..1c5007015 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/Tameable-getOwnerUniqueId-API.patch b/Spigot-Server-Patches/Tameable-getOwnerUniqueId-API.patch index 8565e1b537..5cd34f0587 100644 --- a/Spigot-Server-Patches/Tameable-getOwnerUniqueId-API.patch +++ b/Spigot-Server-Patches/Tameable-getOwnerUniqueId-API.patch @@ -7,7 +7,7 @@ This is faster if all you need is the UUID, as .getOwner() will cause an OfflinePlayer to be loaded from disk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java -index 9952db3eb5..1aea5f3f05 100644 +index 9952db3eb..1aea5f3f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -0,0 +0,0 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac @@ -21,7 +21,7 @@ index 9952db3eb5..1aea5f3f05 100644 return getHandle().getOwnerUUID(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java -index 5dfa40dda1..407b95cafd 100644 +index 5dfa40dda..407b95caf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -0,0 +0,0 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat diff --git a/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch index 3bc81b6d00..30bc957ec5 100644 --- a/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/Spigot-Server-Patches/Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index aacce432b..b87133fcf 100644 +index e315a00cc..2607c4e5f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index aacce432b..b87133fcf 100644 private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 90e5dd3e7..570974024 100644 +index fd7de143e..eb8f3833e 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch index d5cf32be7a..be03552873 100644 --- a/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch +++ b/Spigot-Server-Patches/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event Otherwise the creeper infinite explodes diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 100a1a10c9..ae4dd98ee1 100644 +index dabe40c5f..317c1998e 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { @@ -15,7 +15,7 @@ index 100a1a10c9..ae4dd98ee1 100644 private static final DataWatcherObject POWERED = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); - private static final DataWatcherObject d = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); + private static final DataWatcherObject d = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); private static final DataWatcherObject isIgnitedDW = d; // Paper OBFHELPER - private int bz; + private int bw; private int fuseTicks; public int maxFuseTicks = 30; @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { diff --git a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch b/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch index 17b2416821..ef7fc2f6c7 100644 --- a/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch +++ b/Spigot-Server-Patches/Use-Log4j-IOStreams-to-redirect-System.out-err-to-lo.patch @@ -12,7 +12,7 @@ results in a separate line, even though it should not result in a line break. Log4j's implementation handles it correctly. diff --git a/pom.xml b/pom.xml -index 58b14a740e..a70c0ec07a 100644 +index f716e9870..e6395c773 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -28,7 +28,7 @@ index 58b14a740e..a70c0ec07a 100644 org.ow2.asm asm diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 92d0aa6d66..c6eb88c34b 100644 +index dfe806291..6e95a0452 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index f8511cbe96..30d11d11e1 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -19,7 +19,7 @@ Other changes: configuration diff --git a/pom.xml b/pom.xml -index 04b0dd9a7..58b14a740 100644 +index ae1de6d01..f716e9870 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ @@ -143,7 +143,7 @@ index 000000000..685deaa0e + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 895049287..92d0aa6d6 100644 +index a5a8bad4f..dfe806291 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -185,7 +185,7 @@ index 895049287..92d0aa6d6 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 759c71397..6c9a43d66 100644 +index a180ba6b0..7df3ae0ec 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate; @@ -244,7 +244,7 @@ index 759c71397..6c9a43d66 100644 public KeyPair getKeyPair() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d23e4e5e3..6a7770798 100644 +index 1eb53f67e..308bc3baf 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -256,9 +256,9 @@ index d23e4e5e3..6a7770798 100644 + minecraftserver.console = new com.destroystokyo.paper.console.TerminalConsoleCommandSender(); // Paper // CraftBukkit end - this.k = new GameProfileBanList(PlayerList.a); + this.k = new GameProfileBanList(PlayerList.b); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8e6f23d27..4c94e85e4 100644 +index 77bb68605..cd58906ad 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ import java.util.function.Consumer; @@ -284,7 +284,7 @@ index 8e6f23d27..4c94e85e4 100644 @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 78534c307..b0bb086a9 100644 +index 4a4e56e76..b562e95dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ import java.util.logging.Logger; diff --git a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch index 956850769c..06502378d4 100644 --- a/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch +++ b/Spigot-Server-Patches/Use-asynchronous-Log4j-2-loggers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use asynchronous Log4j 2 loggers diff --git a/pom.xml b/pom.xml -index 2990c04b8..beda5dc8a 100644 +index dbc425524..d10c219e3 100644 --- a/pom.xml +++ b/pom.xml @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/Vex-getSummoner-API.patch b/Spigot-Server-Patches/Vex-getSummoner-API.patch index 4bb16ca960..6458b244c0 100644 --- a/Spigot-Server-Patches/Vex-getSummoner-API.patch +++ b/Spigot-Server-Patches/Vex-getSummoner-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Vex#getSummoner API Get's the NPC that summoned this Vex diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index 7c164531b3..25aea53150 100644 +index cd9fb3aab..a46730460 100644 --- a/src/main/java/net/minecraft/server/EntityVex.java +++ b/src/main/java/net/minecraft/server/EntityVex.java @@ -0,0 +0,0 @@ public class EntityVex extends EntityMonster { @@ -18,7 +18,7 @@ index 7c164531b3..25aea53150 100644 return this.c; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java -index 737a37b6fe..169c951ec3 100644 +index 737a37b6f..169c951ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java @@ -0,0 +0,0 @@ diff --git a/Spigot-Server-Patches/WitchConsumePotionEvent.patch b/Spigot-Server-Patches/WitchConsumePotionEvent.patch index 4ad47a20c4..2c53fb3d2d 100644 --- a/Spigot-Server-Patches/WitchConsumePotionEvent.patch +++ b/Spigot-Server-Patches/WitchConsumePotionEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] WitchConsumePotionEvent Fires when a witch consumes the potion in their hand diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 6b50d5334d..189263bf75 100644 +index ddff0b578..aa9011171 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { diff --git a/Spigot-Server-Patches/WitchReadyPotionEvent.patch b/Spigot-Server-Patches/WitchReadyPotionEvent.patch index d9ff6bfb18..4f806eb0ff 100644 --- a/Spigot-Server-Patches/WitchReadyPotionEvent.patch +++ b/Spigot-Server-Patches/WitchReadyPotionEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] WitchReadyPotionEvent diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 0a40e2ff1b..ff4e73fff3 100644 +index 1f2759e95..be6ecfb08 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { @@ -18,7 +18,7 @@ index 0a40e2ff1b..ff4e73fff3 100644 + org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion)); + this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack)); + // Paper end - this.bB = this.getItemInMainHand().k(); - this.s(true); - this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); + this.by = this.getItemInMainHand().k(); + this.t(true); + this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/WitchThrowPotionEvent.patch b/Spigot-Server-Patches/WitchThrowPotionEvent.patch index 7ba7bb63f0..678324e557 100644 --- a/Spigot-Server-Patches/WitchThrowPotionEvent.patch +++ b/Spigot-Server-Patches/WitchThrowPotionEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] WitchThrowPotionEvent Fired when a witch throws a potion at a player diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index 189263bf75..0a40e2ff1b 100644 +index aa9011171..1f2759e95 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -0,0 +0,0 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { @@ -27,5 +27,5 @@ index 189263bf75..0a40e2ff1b 100644 + // Paper end entitypotion.pitch -= -20.0F; entitypotion.shoot(d0, d1 + (double) (f1 * 0.2F), d2, 0.75F, 8.0F); - this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_WITCH_THROW, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); + this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_THROW, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); -- \ No newline at end of file diff --git a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch index de57e95841..416c910495 100644 --- a/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/add-more-information-to-Entity.toString.patch @@ -6,14 +6,14 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index be4ebcadb7..6ada923797 100644 +index 7c4ab7fe7..5823b3740 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public String toString() { -- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getDisplayName().getText(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX, this.locY, this.locZ); +- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", this.getClass().getSimpleName(), this.getDisplayName().getText(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX(), this.locY(), this.locZ()); + return String.format(Locale.ROOT, "%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information } diff --git a/Spigot-Server-Patches/getPlayerUniqueId-API.patch b/Spigot-Server-Patches/getPlayerUniqueId-API.patch index 73242d7bcc..b9ad5322dd 100644 --- a/Spigot-Server-Patches/getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/getPlayerUniqueId-API.patch @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3938adf7c7..8b5765e619 100644 +index 9fe19fb59..296a11f14 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch index a4a193a6b8..67cd169456 100644 --- a/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/handle-PacketPlayInKeepAlive-async.patch @@ -15,7 +15,7 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5e3ca96871..0cb68a8553 100644 +index 399724d6a..a4660f2b8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch b/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch index edca4e6c64..97ccfc7539 100644 --- a/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/Spigot-Server-Patches/provide-a-configurable-option-to-disable-creeper-lin.patch @@ -6,7 +6,7 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 42c4a9445..891a52b2a 100644 +index f151e43c3..c145e27cc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index 42c4a9445..891a52b2a 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 53b1e2ac0..100a1a10c 100644 +index 859b52845..dabe40c5f 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { @@ -30,7 +30,7 @@ index 53b1e2ac0..100a1a10c 100644 - if (!collection.isEmpty()) { + if (!collection.isEmpty() && !world.paperConfig.disableCreeperLingeringEffect) { // Paper - EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX, this.locY, this.locZ); + EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX(), this.locY(), this.locZ()); entityareaeffectcloud.setSource(this); // CraftBukkit -- \ No newline at end of file diff --git a/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch index 6604d55952..45e6c39572 100644 --- a/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch +++ b/Spigot-Server-Patches/revert-serverside-behavior-of-keepalives.patch @@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 0cb68a8553..1d140b3fe7 100644 +index a4660f2b8..9af8e947e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/use-CB-BlockState-implementations-for-captured-block.patch index ac5bd23ba6..4197a92cff 100644 --- a/Spigot-Server-Patches/use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/use-CB-BlockState-implementations-for-captured-block.patch @@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 22f1d9e27b..e780f7af40 100644 +index 117939bb7..39b136935 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start - capture blockstates CraftBlockState blockstate = null; if (this.captureBlockStates) {