From 44d032f1e9d5a297d2f3fd934bad6ed8cf926069 Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Thu, 12 Dec 2019 17:20:43 +0100 Subject: [PATCH] Houston, we got a patch (#2731) * Houston, we got a patch * is this the end of the beginning or the beginning of the end --- .../0197-Tameable-getOwnerUniqueId-API.patch | 2 +- ....patch => 0293-Improve-death-events.patch} | 124 +++++++++--------- ...w-chests-to-be-placed-with-NBT-data.patch} | 12 +- ...I.patch => 0295-Mob-Pathfinding-API.patch} | 28 ++-- ...nt-chunk-loading-from-Fluid-Flowing.patch} | 21 ++- ...for-CanPlaceOn-and-CanDestroy-NBT-v.patch} | 14 +- ...nt-Mob-AI-Rules-from-Loading-Chunks.patch} | 35 ++--- ...ning-from-loading-generating-chunks.patch} | 10 +- ...-Biome-Mob-Lookups-for-Mob-Spawning.patch} | 26 ++-- ...t-furnace-cook-speed-multiplier-API.patch} | 8 +- ...0302-Support-Overriding-World-Seeds.patch} | 24 ++-- ...h => 0303-Optimize-Server-World-Map.patch} | 12 +- ....patch => 0304-PreSpawnerSpawnEvent.patch} | 28 ++-- ...rseException-in-Entity-and-TE-names.patch} | 26 ++-- ... 0306-Avoid-dimension-id-collisions.patch} | 8 +- ...=> 0307-Honor-EntityAgeable.ageLock.patch} | 8 +- ...le-connection-throttle-kick-message.patch} | 10 +- ...> 0309-Hook-into-CB-plugin-rewrites.patch} | 6 +- ...10-Allow-setting-the-vex-s-summoner.patch} | 8 +- ...I.patch => 0311-Add-sun-related-API.patch} | 26 ++-- ...wned-for-Villager-Aggression-Config.patch} | 10 +- ...-Johnny.patch => 0313-Here-s-Johnny.patch} | 12 +- ...Turtle-API.patch => 0314-Turtle-API.patch} | 74 +++++------ ...it-lightning-strike-effect-distance.patch} | 34 ++--- ...her-worlds-for-shooter-of-projectil.patch} | 16 +-- ...Call-player-spectator-target-events.patch} | 28 ++-- ...-Add-Velocity-IP-Forwarding-Support.patch} | 26 ++-- ...PI.patch => 0319-Add-more-Witch-API.patch} | 44 +++---- ...MC-93764.patch => 0320-Fix-MC-93764.patch} | 6 +- ...vent-players-from-moving-into-unloa.patch} | 38 +++--- ...2-Reset-players-airTicks-on-respawn.patch} | 16 +-- ...-area-unicode-characters-from-signs.patch} | 20 +-- ...after-profile-lookups-if-not-needed.patch} | 6 +- ...le-thread-count-default-for-bootstr.patch} | 6 +- ...=> 0326-Optimize-World-Time-Updates.patch} | 8 +- ...tore-custom-InventoryHolder-support.patch} | 6 +- ...=> 0328-Use-Vanilla-Minecart-Speeds.patch} | 8 +- ...0329-Fix-SpongeAbsortEvent-handling.patch} | 6 +- ...-allow-digging-into-unloaded-chunks.patch} | 8 +- ...=> 0331-Optimize-redstone-algorithm.patch} | 16 +-- ...ntity-dismount-during-teleportation.patch} | 30 ++--- ...mits.patch => 0333-Book-Size-Limits.patch} | 14 +- ...lid-item-for-enchantment-checks-on-b.patch | 33 ----- ...ult-permission-message-configurable.patch} | 14 +- ...I.patch => 0335-Add-more-Zombie-API.patch} | 28 ++-- ...revent-rayTrace-from-loading-chunks.patch} | 6 +- ...-Large-Packets-disconnecting-client.patch} | 20 +-- ...world-storage-in-CraftOfflinePlayer.patch} | 6 +- ...0339-Add-PlayerConnectionCloseEvent.patch} | 8 +- ...revent-Enderman-from-loading-chunks.patch} | 20 +-- ...replace-OfflinePlayer-getLastPlayed.patch} | 22 ++-- ...tch => 0342-Fix-PlayerEditBookEvent.patch} | 8 +- ...ehicle-tracking-issue-on-disconnect.patch} | 12 +- ...nRetractEvent-for-all-empty-pistons.patch} | 12 +- ...remove-from-being-called-on-Players.patch} | 10 +- ...ent.patch => 0346-BlockDestroyEvent.patch} | 8 +- ...m-Shapeless-Custom-Crafting-Recipes.patch} | 6 +- ...h => 0348-Fix-sign-edit-memory-leak.patch} | 18 +-- ... 0349-Limit-Client-Sign-length-more.patch} | 8 +- ...onvertSigns-boolean-every-sign-save.patch} | 10 +- ...Signs-in-Chunks-creating-too-large-.patch} | 20 +-- ...-Fix-Whitelist-On-Off-inconsistency.patch} | 12 +- ...t-tick-at-start-of-drowning-process.patch} | 12 +- ...ggleEvent-when-whitelist-is-toggled.patch} | 8 +- ...55-Add-LivingEntity-getTargetEntity.patch} | 24 ++-- ...ngth-when-serialising-BungeeCord-te.patch} | 6 +- ...=> 0357-Entity-getEntitySpawnReason.patch} | 28 ++-- ...ty-Metadata-for-all-tracked-players.patch} | 12 +- ...tch => 0359-Fire-event-on-GS4-query.patch} | 10 +- ...60-Implement-PlayerPostRespawnEvent.patch} | 12 +- ...for-pickupDelay-breaks-picking-up-i.patch} | 10 +- ...-and-setters-for-EntityItem-owner-a.patch} | 6 +- ...ts.patch => 0363-Server-Tick-Events.patch} | 10 +- ...364-PlayerDeathEvent-getItemsToKeep.patch} | 6 +- ...Optimize-Captured-TileEntity-Lookup.patch} | 10 +- ...API.patch => 0366-Add-Heightmap-API.patch} | 12 +- ...> 0367-Mob-Spawner-API-Enhancements.patch} | 8 +- ...ayer-View-Distance-API-placeholders.patch} | 24 ++-- ...-to-changed-postToMainThread-method.patch} | 8 +- ...-item-frames-are-modified-MC-123450.patch} | 8 +- ...sPrimaryThread-and-MinecraftServer-.patch} | 12 +- ...-entity-loss-due-to-unloaded-chunks.patch} | 18 +-- ... 0373-Duplicate-UUID-Resolve-Option.patch} | 43 +++--- ...74-improve-CraftWorld-isChunkLoaded.patch} | 12 +- ...e-Keep-Spawn-Loaded-range-per-world.patch} | 20 +-- ...-some-generation-concurrency-issues.patch} | 58 ++++---- ...ityAreaEffectCloud-from-going-negat.patch} | 6 +- ....patch => 0378-ChunkMapDistance-CME.patch} | 10 +- ...0379-Implement-CraftBlockSoundGroup.patch} | 42 +++--- ...d.patch => 0380-Chunk-debug-command.patch} | 28 ++-- ...ch => 0381-incremental-chunk-saving.patch} | 26 ++-- ...ptions-from-dispenser-entity-spawns.patch} | 6 +- ...te-location-if-we-failed-to-read-it.patch} | 4 +- ...ad-in-DataPaletteBlock-lock-failure.patch} | 6 +- ...tatus-cache-when-saving-protochunks.patch} | 8 +- ...7-Anti-Xray.patch => 0386-Anti-Xray.patch} | 100 +++++++------- ...l-Spawned-mobs-towards-natural-spaw.patch} | 10 +- ...urable-projectile-relative-velocity.patch} | 10 +- ...being-ticked-when-notifying-navigat.patch} | 12 +- ...h => 0390-offset-item-frame-ticking.patch} | 6 +- ...pper-searches-if-there-are-no-items.patch} | 43 +++--- ...56852.patch => 0392-Fixed-MC-156852.patch} | 11 +- ...ement-alternative-item-despawn-rate.patch} | 22 ++-- ...f-we-have-a-custom-Bukkit-generator.patch} | 24 ++-- ...-158900.patch => 0395-Fix-MC-158900.patch} | 8 +- ...ment-optional-per-player-mob-spawns.patch} | 88 ++++++------- ...revent-consuming-the-wrong-itemstack.patch | 48 +++++++ ...ssanger-entities-once-from-spawners.patch} | 6 +- ... => 0399-Fix-nether-portal-creation.patch} | 6 +- ...gs.patch => 0400-Generator-Settings.patch} | 14 +- ...o-tick-instant-grow-farms-MC-113809.patch} | 74 +++++------ ...-161754.patch => 0402-Fix-MC-161754.patch} | 6 +- ...e-improvement-for-Chunk.getEntities.patch} | 6 +- ...anging-entities-that-are-not-ItemFr.patch} | 8 +- ...05-Expose-the-internal-current-tick.patch} | 8 +- ...sneak-when-changing-worlds-MC-10657.patch} | 14 +- ...-option-to-disable-pillager-patrols.patch} | 8 +- ...r-when-player-hand-set-to-empty-typ.patch} | 12 +- ...revent-consuming-the-wrong-itemstack.patch | 48 ------- ...423-Backport-MC-160177-fix-from-1.15.patch | 34 ----- ...354-Allow-Saving-of-Oversized-Chunks.patch | 0 ...76-Handle-bad-chunks-more-gracefully.patch | 0 ...393-Fix-World-isChunkGenerated-calls.patch | 0 ...etChunkIfLoadedImmediately-in-places.patch | 0 ...sh-on-save-flag-for-reliable-regionf.patch | 0 ...09-Asynchronous-chunk-IO-and-loading.patch | 0 .../1.15}/0410-Reduce-sync-loads.patch | 0 .../0412-Improve-POI-data-saving-logic.patch | 0 128 files changed, 1116 insertions(+), 1172 deletions(-) rename Spigot-Server-Patches/{0300-Improve-death-events.patch => 0293-Improve-death-events.patch} (85%) rename Spigot-Server-Patches/{0301-Allow-chests-to-be-placed-with-NBT-data.patch => 0294-Allow-chests-to-be-placed-with-NBT-data.patch} (84%) rename Spigot-Server-Patches/{0302-Mob-Pathfinding-API.patch => 0295-Mob-Pathfinding-API.patch} (93%) rename Spigot-Server-Patches/{0303-Prevent-chunk-loading-from-Fluid-Flowing.patch => 0296-Prevent-chunk-loading-from-Fluid-Flowing.patch} (87%) rename Spigot-Server-Patches/{0304-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch => 0297-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch} (98%) rename Spigot-Server-Patches/{0305-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch => 0298-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch} (69%) rename Spigot-Server-Patches/{0306-Prevent-mob-spawning-from-loading-generating-chunks.patch => 0299-Prevent-mob-spawning-from-loading-generating-chunks.patch} (87%) rename Spigot-Server-Patches/{0307-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch => 0300-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch} (76%) rename Spigot-Server-Patches/{0308-Implement-furnace-cook-speed-multiplier-API.patch => 0301-Implement-furnace-cook-speed-multiplier-API.patch} (96%) rename Spigot-Server-Patches/{0309-Support-Overriding-World-Seeds.patch => 0302-Support-Overriding-World-Seeds.patch} (89%) rename Spigot-Server-Patches/{0310-Optimize-Server-World-Map.patch => 0303-Optimize-Server-World-Map.patch} (97%) rename Spigot-Server-Patches/{0311-PreSpawnerSpawnEvent.patch => 0304-PreSpawnerSpawnEvent.patch} (50%) rename Spigot-Server-Patches/{0312-Catch-JsonParseException-in-Entity-and-TE-names.patch => 0305-Catch-JsonParseException-in-Entity-and-TE-names.patch} (84%) rename Spigot-Server-Patches/{0313-Avoid-dimension-id-collisions.patch => 0306-Avoid-dimension-id-collisions.patch} (85%) rename Spigot-Server-Patches/{0314-Honor-EntityAgeable.ageLock.patch => 0307-Honor-EntityAgeable.ageLock.patch} (74%) rename Spigot-Server-Patches/{0315-Configurable-connection-throttle-kick-message.patch => 0308-Configurable-connection-throttle-kick-message.patch} (92%) rename Spigot-Server-Patches/{0316-Hook-into-CB-plugin-rewrites.patch => 0309-Hook-into-CB-plugin-rewrites.patch} (98%) rename Spigot-Server-Patches/{0317-Allow-setting-the-vex-s-summoner.patch => 0310-Allow-setting-the-vex-s-summoner.patch} (90%) rename Spigot-Server-Patches/{0318-Add-sun-related-API.patch => 0311-Add-sun-related-API.patch} (75%) rename Spigot-Server-Patches/{0319-Check-Drowned-for-Villager-Aggression-Config.patch => 0312-Check-Drowned-for-Villager-Aggression-Config.patch} (87%) rename Spigot-Server-Patches/{0320-Here-s-Johnny.patch => 0313-Here-s-Johnny.patch} (83%) rename Spigot-Server-Patches/{0321-Turtle-API.patch => 0314-Turtle-API.patch} (77%) rename Spigot-Server-Patches/{0322-Limit-lightning-strike-effect-distance.patch => 0315-Limit-lightning-strike-effect-distance.patch} (70%) rename Spigot-Server-Patches/{0323-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch => 0316-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch} (73%) rename Spigot-Server-Patches/{0324-Call-player-spectator-target-events.patch => 0317-Call-player-spectator-target-events.patch} (71%) rename Spigot-Server-Patches/{0325-Add-Velocity-IP-Forwarding-Support.patch => 0318-Add-Velocity-IP-Forwarding-Support.patch} (96%) rename Spigot-Server-Patches/{0326-Add-more-Witch-API.patch => 0319-Add-more-Witch-API.patch} (86%) rename Spigot-Server-Patches/{0327-Fix-MC-93764.patch => 0320-Fix-MC-93764.patch} (85%) rename Spigot-Server-Patches/{0328-Add-option-to-prevent-players-from-moving-into-unloa.patch => 0321-Add-option-to-prevent-players-from-moving-into-unloa.patch} (74%) rename Spigot-Server-Patches/{0329-Reset-players-airTicks-on-respawn.patch => 0322-Reset-players-airTicks-on-respawn.patch} (72%) rename Spigot-Server-Patches/{0330-Strip-private-area-unicode-characters-from-signs.patch => 0323-Strip-private-area-unicode-characters-from-signs.patch} (87%) rename Spigot-Server-Patches/{0331-Don-t-sleep-after-profile-lookups-if-not-needed.patch => 0324-Don-t-sleep-after-profile-lookups-if-not-needed.patch} (93%) rename Spigot-Server-Patches/{0332-Use-more-reasonable-thread-count-default-for-bootstr.patch => 0325-Use-more-reasonable-thread-count-default-for-bootstr.patch} (88%) rename Spigot-Server-Patches/{0334-Optimize-World-Time-Updates.patch => 0326-Optimize-World-Time-Updates.patch} (93%) rename Spigot-Server-Patches/{0335-Restore-custom-InventoryHolder-support.patch => 0327-Restore-custom-InventoryHolder-support.patch} (94%) rename Spigot-Server-Patches/{0336-Use-Vanilla-Minecart-Speeds.patch => 0328-Use-Vanilla-Minecart-Speeds.patch} (85%) rename Spigot-Server-Patches/{0337-Fix-SpongeAbsortEvent-handling.patch => 0329-Fix-SpongeAbsortEvent-handling.patch} (95%) rename Spigot-Server-Patches/{0338-Don-t-allow-digging-into-unloaded-chunks.patch => 0330-Don-t-allow-digging-into-unloaded-chunks.patch} (86%) rename Spigot-Server-Patches/{0339-Optimize-redstone-algorithm.patch => 0331-Optimize-redstone-algorithm.patch} (99%) rename Spigot-Server-Patches/{0340-force-entity-dismount-during-teleportation.patch => 0332-force-entity-dismount-during-teleportation.patch} (87%) rename Spigot-Server-Patches/{0341-Book-Size-Limits.patch => 0333-Book-Size-Limits.patch} (93%) delete mode 100644 Spigot-Server-Patches/0333-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch rename Spigot-Server-Patches/{0342-Make-the-default-permission-message-configurable.patch => 0334-Make-the-default-permission-message-configurable.patch} (87%) rename Spigot-Server-Patches/{0343-Add-more-Zombie-API.patch => 0335-Add-more-Zombie-API.patch} (88%) rename Spigot-Server-Patches/{0344-Prevent-rayTrace-from-loading-chunks.patch => 0336-Prevent-rayTrace-from-loading-chunks.patch} (93%) rename Spigot-Server-Patches/{0345-Handle-Large-Packets-disconnecting-client.patch => 0337-Handle-Large-Packets-disconnecting-client.patch} (91%) rename Spigot-Server-Patches/{0346-Lazy-init-world-storage-in-CraftOfflinePlayer.patch => 0338-Lazy-init-world-storage-in-CraftOfflinePlayer.patch} (96%) rename Spigot-Server-Patches/{0347-Add-PlayerConnectionCloseEvent.patch => 0339-Add-PlayerConnectionCloseEvent.patch} (97%) rename Spigot-Server-Patches/{0348-Prevent-Enderman-from-loading-chunks.patch => 0340-Prevent-Enderman-from-loading-chunks.patch} (67%) rename Spigot-Server-Patches/{0349-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch => 0341-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch} (91%) rename Spigot-Server-Patches/{0350-Fix-PlayerEditBookEvent.patch => 0342-Fix-PlayerEditBookEvent.patch} (90%) rename Spigot-Server-Patches/{0351-Workaround-for-vehicle-tracking-issue-on-disconnect.patch => 0343-Workaround-for-vehicle-tracking-issue-on-disconnect.patch} (76%) rename Spigot-Server-Patches/{0352-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch => 0344-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch} (90%) rename Spigot-Server-Patches/{0353-Block-Entity-remove-from-being-called-on-Players.patch => 0345-Block-Entity-remove-from-being-called-on-Players.patch} (87%) rename Spigot-Server-Patches/{0355-BlockDestroyEvent.patch => 0346-BlockDestroyEvent.patch} (90%) rename Spigot-Server-Patches/{0356-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch => 0347-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch} (96%) rename Spigot-Server-Patches/{0357-Fix-sign-edit-memory-leak.patch => 0348-Fix-sign-edit-memory-leak.patch} (82%) rename Spigot-Server-Patches/{0358-Limit-Client-Sign-length-more.patch => 0349-Limit-Client-Sign-length-more.patch} (94%) rename Spigot-Server-Patches/{0359-Don-t-check-ConvertSigns-boolean-every-sign-save.patch => 0350-Don-t-check-ConvertSigns-boolean-every-sign-save.patch} (83%) rename Spigot-Server-Patches/{0360-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch => 0351-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch} (87%) rename Spigot-Server-Patches/{0361-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch => 0352-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch} (91%) rename Spigot-Server-Patches/{0362-Set-Zombie-last-tick-at-start-of-drowning-process.patch => 0353-Set-Zombie-last-tick-at-start-of-drowning-process.patch} (76%) rename Spigot-Server-Patches/{0363-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch => 0354-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch} (78%) rename Spigot-Server-Patches/{0364-Add-LivingEntity-getTargetEntity.patch => 0355-Add-LivingEntity-getTargetEntity.patch} (92%) rename Spigot-Server-Patches/{0365-Use-proper-max-length-when-serialising-BungeeCord-te.patch => 0356-Use-proper-max-length-when-serialising-BungeeCord-te.patch} (94%) rename Spigot-Server-Patches/{0366-Entity-getEntitySpawnReason.patch => 0357-Entity-getEntitySpawnReason.patch} (86%) rename Spigot-Server-Patches/{0367-Update-entity-Metadata-for-all-tracked-players.patch => 0358-Update-entity-Metadata-for-all-tracked-players.patch} (86%) rename Spigot-Server-Patches/{0368-Fire-event-on-GS4-query.patch => 0359-Fire-event-on-GS4-query.patch} (98%) rename Spigot-Server-Patches/{0369-Implement-PlayerPostRespawnEvent.patch => 0360-Implement-PlayerPostRespawnEvent.patch} (86%) rename Spigot-Server-Patches/{0370-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => 0361-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (85%) rename Spigot-Server-Patches/{0371-Implement-getters-and-setters-for-EntityItem-owner-a.patch => 0362-Implement-getters-and-setters-for-EntityItem-owner-a.patch} (92%) rename Spigot-Server-Patches/{0372-Server-Tick-Events.patch => 0363-Server-Tick-Events.patch} (84%) rename Spigot-Server-Patches/{0373-PlayerDeathEvent-getItemsToKeep.patch => 0364-PlayerDeathEvent-getItemsToKeep.patch} (96%) rename Spigot-Server-Patches/{0374-Optimize-Captured-TileEntity-Lookup.patch => 0365-Optimize-Captured-TileEntity-Lookup.patch} (82%) rename Spigot-Server-Patches/{0375-Add-Heightmap-API.patch => 0366-Add-Heightmap-API.patch} (88%) rename Spigot-Server-Patches/{0377-Mob-Spawner-API-Enhancements.patch => 0367-Mob-Spawner-API-Enhancements.patch} (96%) rename Spigot-Server-Patches/{0378-Per-Player-View-Distance-API-placeholders.patch => 0368-Per-Player-View-Distance-API-placeholders.patch} (86%) rename Spigot-Server-Patches/{0379-Fix-CB-call-to-changed-postToMainThread-method.patch => 0369-Fix-CB-call-to-changed-postToMainThread-method.patch} (80%) rename Spigot-Server-Patches/{0380-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => 0370-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (90%) rename Spigot-Server-Patches/{0381-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch => 0371-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch} (87%) rename Spigot-Server-Patches/{0382-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch => 0372-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch} (71%) rename Spigot-Server-Patches/{0383-Duplicate-UUID-Resolve-Option.patch => 0373-Duplicate-UUID-Resolve-Option.patch} (92%) rename Spigot-Server-Patches/{0384-improve-CraftWorld-isChunkLoaded.patch => 0374-improve-CraftWorld-isChunkLoaded.patch} (79%) rename Spigot-Server-Patches/{0385-Configurable-Keep-Spawn-Loaded-range-per-world.patch => 0375-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (96%) rename Spigot-Server-Patches/{0386-Fix-some-generation-concurrency-issues.patch => 0376-Fix-some-generation-concurrency-issues.patch} (83%) rename Spigot-Server-Patches/{0387-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch => 0377-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch} (89%) rename Spigot-Server-Patches/{0388-ChunkMapDistance-CME.patch => 0378-ChunkMapDistance-CME.patch} (90%) rename Spigot-Server-Patches/{0389-Implement-CraftBlockSoundGroup.patch => 0379-Implement-CraftBlockSoundGroup.patch} (81%) rename Spigot-Server-Patches/{0390-Chunk-debug-command.patch => 0380-Chunk-debug-command.patch} (96%) rename Spigot-Server-Patches/{0391-incremental-chunk-saving.patch => 0381-incremental-chunk-saving.patch} (94%) rename Spigot-Server-Patches/{0392-Catch-exceptions-from-dispenser-entity-spawns.patch => 0382-Catch-exceptions-from-dispenser-entity-spawns.patch} (92%) rename Spigot-Server-Patches/{0394-Show-blockstate-location-if-we-failed-to-read-it.patch => 0383-Show-blockstate-location-if-we-failed-to-read-it.patch} (95%) rename Spigot-Server-Patches/{0395-Log-other-thread-in-DataPaletteBlock-lock-failure.patch => 0384-Log-other-thread-in-DataPaletteBlock-lock-failure.patch} (96%) rename Spigot-Server-Patches/{0396-Use-ChunkStatus-cache-when-saving-protochunks.patch => 0385-Use-ChunkStatus-cache-when-saving-protochunks.patch} (87%) rename Spigot-Server-Patches/{0397-Anti-Xray.patch => 0386-Anti-Xray.patch} (97%) rename Spigot-Server-Patches/{0398-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => 0387-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (92%) rename Spigot-Server-Patches/{0400-Configurable-projectile-relative-velocity.patch => 0388-Configurable-projectile-relative-velocity.patch} (95%) rename Spigot-Server-Patches/{0401-Mark-entities-as-being-ticked-when-notifying-navigat.patch => 0389-Mark-entities-as-being-ticked-when-notifying-navigat.patch} (73%) rename Spigot-Server-Patches/{0402-offset-item-frame-ticking.patch => 0390-offset-item-frame-ticking.patch} (88%) rename Spigot-Server-Patches/{0404-Avoid-hopper-searches-if-there-are-no-items.patch => 0391-Avoid-hopper-searches-if-there-are-no-items.patch} (82%) rename Spigot-Server-Patches/{0405-Fixed-MC-156852.patch => 0392-Fixed-MC-156852.patch} (70%) rename Spigot-Server-Patches/{0406-Implement-alternative-item-despawn-rate.patch => 0393-Implement-alternative-item-despawn-rate.patch} (92%) rename Spigot-Server-Patches/{0407-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch => 0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch} (64%) rename Spigot-Server-Patches/{0408-Fix-MC-158900.patch => 0395-Fix-MC-158900.patch} (89%) rename Spigot-Server-Patches/{0411-implement-optional-per-player-mob-spawns.patch => 0396-implement-optional-per-player-mob-spawns.patch} (93%) create mode 100644 Spigot-Server-Patches/0397-Prevent-consuming-the-wrong-itemstack.patch rename Spigot-Server-Patches/{0414-only-add-passanger-entities-once-from-spawners.patch => 0398-only-add-passanger-entities-once-from-spawners.patch} (89%) rename Spigot-Server-Patches/{0415-Fix-nether-portal-creation.patch => 0399-Fix-nether-portal-creation.patch} (91%) rename Spigot-Server-Patches/{0416-Generator-Settings.patch => 0400-Generator-Settings.patch} (88%) rename Spigot-Server-Patches/{0417-Fix-zero-tick-instant-grow-farms-MC-113809.patch => 0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch} (59%) rename Spigot-Server-Patches/{0418-Fix-MC-161754.patch => 0402-Fix-MC-161754.patch} (90%) rename Spigot-Server-Patches/{0419-Performance-improvement-for-Chunk.getEntities.patch => 0403-Performance-improvement-for-Chunk.getEntities.patch} (93%) rename Spigot-Server-Patches/{0420-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch => 0404-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch} (89%) rename Spigot-Server-Patches/{0421-Expose-the-internal-current-tick.patch => 0405-Expose-the-internal-current-tick.patch} (79%) rename Spigot-Server-Patches/{0422-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch => 0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch} (78%) rename Spigot-Server-Patches/{0424-Add-option-to-disable-pillager-patrols.patch => 0407-Add-option-to-disable-pillager-patrols.patch} (90%) rename Spigot-Server-Patches/{0425-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch => 0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch} (85%) delete mode 100644 Spigot-Server-Patches/0413-Prevent-consuming-the-wrong-itemstack.patch delete mode 100644 Spigot-Server-Patches/0423-Backport-MC-160177-fix-from-1.15.patch rename {Spigot-Server-Patches => removed/1.15}/0354-Allow-Saving-of-Oversized-Chunks.patch (100%) rename {Spigot-Server-Patches => removed/1.15}/0376-Handle-bad-chunks-more-gracefully.patch (100%) rename {Spigot-Server-Patches => removed/1.15}/0393-Fix-World-isChunkGenerated-calls.patch (100%) rename {Spigot-Server-Patches => removed/1.15}/0399-Use-getChunkIfLoadedImmediately-in-places.patch (100%) rename {Spigot-Server-Patches => removed/1.15}/0403-Preserve-old-flush-on-save-flag-for-reliable-regionf.patch (100%) rename {Spigot-Server-Patches => removed/1.15}/0409-Asynchronous-chunk-IO-and-loading.patch (100%) rename {Spigot-Server-Patches => removed/1.15}/0410-Reduce-sync-loads.patch (100%) rename {Spigot-Server-Patches => removed/1.15}/0412-Improve-POI-data-saving-logic.patch (100%) diff --git a/Spigot-Server-Patches/0197-Tameable-getOwnerUniqueId-API.patch b/Spigot-Server-Patches/0197-Tameable-getOwnerUniqueId-API.patch index 7f8133802b..b9052a7da4 100644 --- a/Spigot-Server-Patches/0197-Tameable-getOwnerUniqueId-API.patch +++ b/Spigot-Server-Patches/0197-Tameable-getOwnerUniqueId-API.patch @@ -1,4 +1,4 @@ -From eda073002e6ae458f54b520c7b6c600ab5bdad3a Mon Sep 17 00:00:00 2001 +From 2d9fdd1cb99d883bc8c08484c733055f154d8b8d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 24 Feb 2018 01:14:55 -0500 Subject: [PATCH] Tameable#getOwnerUniqueId API diff --git a/Spigot-Server-Patches/0300-Improve-death-events.patch b/Spigot-Server-Patches/0293-Improve-death-events.patch similarity index 85% rename from Spigot-Server-Patches/0300-Improve-death-events.patch rename to Spigot-Server-Patches/0293-Improve-death-events.patch index 2d56625555..1de6624f80 100644 --- a/Spigot-Server-Patches/0300-Improve-death-events.patch +++ b/Spigot-Server-Patches/0293-Improve-death-events.patch @@ -1,4 +1,4 @@ -From a6322d454a796a41b41c58f049dcbcda5ace0fcf Mon Sep 17 00:00:00 2001 +From 7b45772c16bd065ecea3697a44803236cf706216 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 21 Aug 2018 01:39:35 +0100 Subject: [PATCH] Improve death events @@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java -index 84c3ea9d00..f563a7b630 100644 +index 6daa400d2..38fe29f8a 100644 --- a/src/main/java/net/minecraft/server/CombatTracker.java +++ b/src/main/java/net/minecraft/server/CombatTracker.java @@ -175,6 +175,7 @@ public class CombatTracker { @@ -27,10 +27,10 @@ index 84c3ea9d00..f563a7b630 100644 int i = this.f ? 300 : 100; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7811beb807..f9b097fd6f 100644 +index 75343a438..b03316bc8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1517,6 +1517,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1503,6 +1503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return false; } @@ -38,19 +38,19 @@ index 7811beb807..f9b097fd6f 100644 public void a(Entity entity, int i, DamageSource damagesource) { if (entity instanceof EntityPlayer) { CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); -@@ -2410,6 +2411,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2413,6 +2414,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance = 0.0F; } + public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER public void b(EntityLiving entityliving) {} - protected void i(double d0, double d1, double d2) { + protected void k(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 85fc48371d..02595cfccd 100644 +index b51662ee9..e6032e3ed 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java -@@ -690,7 +690,8 @@ public class EntityArmorStand extends EntityLiving { +@@ -706,7 +706,8 @@ public class EntityArmorStand extends EntityLiving { @Override public void killEntity() { @@ -61,10 +61,10 @@ index 85fc48371d..02595cfccd 100644 } diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java -index e22e99df38..ca38ccf768 100644 +index ac8eaffb9..7495af8e3 100644 --- a/src/main/java/net/minecraft/server/EntityFox.java +++ b/src/main/java/net/minecraft/server/EntityFox.java -@@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal { +@@ -571,15 +571,25 @@ public class EntityFox extends EntityAnimal { } @Override @@ -94,7 +94,7 @@ index e22e99df38..ca38ccf768 100644 public static boolean a(EntityFox entityfox, EntityLiving entityliving) { diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java -index 2483cfd28a..2a988366cd 100644 +index 80717ad9a..53aac5bcc 100644 --- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java @@ -55,11 +55,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract { @@ -119,19 +119,19 @@ index 2483cfd28a..2a988366cd 100644 public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b09712ca91..1e53af2cce 100644 +index ac85a5d23..c6bd68919 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity { +@@ -89,7 +89,7 @@ public abstract class EntityLiving extends Entity { + protected float aT; + protected float aU; protected float aV; - protected float aW; - protected float aX; -- protected int aY; -+ protected int aY; protected int getKillCount() { return this.aY; } // Paper - OBFHELPER +- protected int aW; ++ protected int aW; protected int getKillCount() { return this.aW; } // Paper - OBFHELPER public float lastDamage; protected boolean jumping; - public float bb; -@@ -128,6 +128,7 @@ public abstract class EntityLiving extends Entity { + public float aZ; +@@ -131,6 +131,7 @@ public abstract class EntityLiving extends Entity { public boolean collides = true; public boolean canPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper @@ -139,7 +139,7 @@ index b09712ca91..1e53af2cce 100644 @Override public float getBukkitYaw() { -@@ -1185,13 +1186,17 @@ public abstract class EntityLiving extends Entity { +@@ -1137,13 +1138,17 @@ public abstract class EntityLiving extends Entity { if (this.getHealth() <= 0.0F) { if (!this.f(damagesource)) { @@ -148,11 +148,11 @@ index b09712ca91..1e53af2cce 100644 + //SoundEffect soundeffect = this.getSoundDeath(); - if (flag1 && soundeffect != null) { -- this.a(soundeffect, this.getSoundVolume(), this.cV()); +- this.a(soundeffect, this.getSoundVolume(), this.dn()); - } -+ //if (flag1 && soundeffect != null) { -+ // this.a(soundeffect, this.getSoundVolume(), this.cV()); -+ //} ++// if (flag1 && soundeffect != null) { ++// this.a(soundeffect, this.getSoundVolume(), this.dn()); ++// } + this.silentDeath = !flag1; // mark entity as dying silently + // Paper end @@ -161,17 +161,17 @@ index b09712ca91..1e53af2cce 100644 } } else if (flag1) { this.c(damagesource); -@@ -1329,6 +1334,7 @@ public abstract class EntityLiving extends Entity { +@@ -1281,6 +1286,7 @@ public abstract class EntityLiving extends Entity { Entity entity = damagesource.getEntity(); EntityLiving entityliving = this.getKillingEntity(); + /* // Paper - move down to make death event cancellable - if (this.aY >= 0 && entityliving != null) { - entityliving.a(this, this.aY, damagesource); + if (this.aW >= 0 && entityliving != null) { + entityliving.a(this, this.aW, damagesource); } -@@ -1340,14 +1346,32 @@ public abstract class EntityLiving extends Entity { +@@ -1292,16 +1298,36 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { - this.dy(); + this.entityWakeup(); } + */ // Paper @@ -198,15 +198,7 @@ index b09712ca91..1e53af2cce 100644 + } + // Paper end + - boolean flag = false; - -- if (entityliving instanceof EntityWither) { -+ if (this.killed && entityliving instanceof EntityWither) { - if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { - BlockPosition blockposition = new BlockPosition(this.locX, this.locY, this.locZ); - IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); -@@ -1366,12 +1390,15 @@ public abstract class EntityLiving extends Entity { - } + this.f(entityliving); } + if (this.killed) { // Paper @@ -216,16 +208,29 @@ index b09712ca91..1e53af2cce 100644 } } +@@ -1309,7 +1335,7 @@ public abstract class EntityLiving extends Entity { + if (!this.world.isClientSide) { + boolean flag = false; + +- if (entityliving instanceof EntityWither) { ++ if (this.killed && entityliving instanceof EntityWither) { // Paper + if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { + BlockPosition blockposition = new BlockPosition(this); + IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); +@@ -1330,7 +1356,8 @@ public abstract class EntityLiving extends Entity { + } + } + - protected void d(DamageSource damagesource) { + protected org.bukkit.event.entity.EntityDeathEvent processDeath(DamageSource damagesource) { return d(damagesource); } // Paper - OBFHELPER + protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper Entity entity = damagesource.getEntity(); int i; -@@ -1384,21 +1411,24 @@ public abstract class EntityLiving extends Entity { +@@ -1343,22 +1370,25 @@ public abstract class EntityLiving extends Entity { boolean flag = this.lastDamageByPlayerTime > 0; - this.cF(); // CraftBukkit - from below // PAIL + this.dropInventory(); // CraftBukkit - from below + org.bukkit.event.entity.EntityDeathEvent deathEvent; // Paper if (this.isDropExperience() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { this.a(damagesource, flag); @@ -242,16 +247,17 @@ index b09712ca91..1e53af2cce 100644 + this.postDeathDropItems(deathEvent); // Paper + this.drops = new ArrayList<>(); // Paper -- // this.cF();// CraftBukkit - moved up + // this.dropInventory();// CraftBukkit - moved up +- this.dropExperience(); + return deathEvent; // Paper } - protected void cF() {} + protected void dropInventory() {} + protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) {} // Paper - method for post death logic that cannot be ran before the event is potentially cancelled - protected void dropDeathLoot(DamageSource damagesource, int i, boolean flag) {} - -@@ -1449,6 +1479,7 @@ public abstract class EntityLiving extends Entity { + // CraftBukkit start + public int getExpReward() { +@@ -1437,6 +1467,7 @@ public abstract class EntityLiving extends Entity { return SoundEffects.ENTITY_GENERIC_HURT; } @@ -259,7 +265,7 @@ index b09712ca91..1e53af2cce 100644 @Nullable protected SoundEffect getSoundDeath() { return SoundEffects.ENTITY_GENERIC_DEATH; -@@ -1898,10 +1929,12 @@ public abstract class EntityLiving extends Entity { +@@ -1919,10 +1950,12 @@ public abstract class EntityLiving extends Entity { } @@ -268,12 +274,12 @@ index b09712ca91..1e53af2cce 100644 return 1.0F; } -+ public float getSoundPitch() { return cV();} // Paper - OBFHELPER - protected float cV() { ++ public float getSoundPitch() { return dn();} // Paper - OBFHELPER + protected float dn() { return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 7e37164c0e..1b35e6c478 100644 +index bb2a0b7e6..26096afbe 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -303,7 +309,7 @@ index 7e37164c0e..1b35e6c478 100644 // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { -@@ -686,8 +699,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -669,8 +682,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } } @@ -324,10 +330,10 @@ index 7e37164c0e..1b35e6c478 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -index 73cb64e09d..9f317ff2e8 100644 +index 90fdf89c8..b761a41dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -@@ -806,6 +806,22 @@ public enum CraftSound { +@@ -821,6 +821,22 @@ public enum CraftSound { WEATHER_RAIN_ABOVE("weather.rain.above"); private final String minecraftKey; @@ -351,10 +357,10 @@ index 73cb64e09d..9f317ff2e8 100644 this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2c99a1e9df..e9458dc65f 100644 +index 9e0be10d7..ad70bd5ba 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1722,7 +1722,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1706,7 +1706,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { @@ -372,10 +378,10 @@ index 2c99a1e9df..e9458dc65f 100644 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 84c292168e..dc15703fd4 100644 +index 844781f4e..4fb1092ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -745,9 +745,16 @@ public class CraftEventFactory { +@@ -744,9 +744,16 @@ public class CraftEventFactory { public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List drops) { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); @@ -392,7 +398,7 @@ index 84c292168e..dc15703fd4 100644 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -763,8 +770,15 @@ public class CraftEventFactory { +@@ -762,8 +769,15 @@ public class CraftEventFactory { CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); @@ -408,7 +414,7 @@ index 84c292168e..dc15703fd4 100644 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -781,6 +795,31 @@ public class CraftEventFactory { +@@ -780,6 +794,31 @@ public class CraftEventFactory { return event; } @@ -441,5 +447,5 @@ index 84c292168e..dc15703fd4 100644 * Server methods */ -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0301-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0294-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 84% rename from Spigot-Server-Patches/0301-Allow-chests-to-be-placed-with-NBT-data.patch rename to Spigot-Server-Patches/0294-Allow-chests-to-be-placed-with-NBT-data.patch index 7051fcbf92..a5f5994fa6 100644 --- a/Spigot-Server-Patches/0301-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/Spigot-Server-Patches/0294-Allow-chests-to-be-placed-with-NBT-data.patch @@ -1,14 +1,14 @@ -From d59739ffc3b8c3667e141de7d76a1a1d8ea6c478 Mon Sep 17 00:00:00 2001 +From 4b88c16c6b5fde287c99a5871c991940d9da6e34 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 8 Sep 2018 18:43:31 -0500 Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 1e23d77e72..0e164840fd 100644 +index 627fa465c..df85f9df0 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -235,6 +235,7 @@ public final class ItemStack { +@@ -240,6 +240,7 @@ public final class ItemStack { enuminteractionresult = EnumInteractionResult.FAIL; // cancel placement // PAIL: Remove this when MC-99075 fixed placeEvent.getPlayer().updateInventory(); @@ -17,10 +17,10 @@ index 1e23d77e72..0e164840fd 100644 for (BlockState blockstate : blocks) { blockstate.update(true, false); diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 387e366130..6c10f0eb89 100644 +index c4766f729..b22bd06e2 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java -@@ -309,7 +309,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic +@@ -292,7 +292,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic // CraftBukkit start @Override public boolean isFilteredNBT() { @@ -30,5 +30,5 @@ index 387e366130..6c10f0eb89 100644 // CraftBukkit end } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0302-Mob-Pathfinding-API.patch b/Spigot-Server-Patches/0295-Mob-Pathfinding-API.patch similarity index 93% rename from Spigot-Server-Patches/0302-Mob-Pathfinding-API.patch rename to Spigot-Server-Patches/0295-Mob-Pathfinding-API.patch index 45ae7b958c..b02505352b 100644 --- a/Spigot-Server-Patches/0302-Mob-Pathfinding-API.patch +++ b/Spigot-Server-Patches/0295-Mob-Pathfinding-API.patch @@ -1,4 +1,4 @@ -From 704ea2a6a85fe0adb3aced77df21d1a6407b8ffc Mon Sep 17 00:00:00 2001 +From 04757b158488f08a5246b3278c20ab84447ce9f5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 9 Sep 2018 13:30:00 -0400 Subject: [PATCH] Mob Pathfinding API @@ -7,7 +7,7 @@ Implements Pathfinding API for mobs diff --git a/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java new file mode 100644 -index 0000000000..f68a07cb96 +index 000000000..f68a07cb9 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java @@ -0,0 +1,111 @@ @@ -123,10 +123,10 @@ index 0000000000..f68a07cb96 + } +} diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index be6aa59749..66e10108d6 100644 +index bdd092e49..1cb03d464 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -72,7 +72,7 @@ public abstract class NavigationAbstract { +@@ -80,7 +80,7 @@ public abstract class NavigationAbstract { } @Nullable @@ -135,7 +135,7 @@ index be6aa59749..66e10108d6 100644 return this.a(new BlockPosition(d0, d1, d2), i); } -@@ -92,7 +92,7 @@ public abstract class NavigationAbstract { +@@ -100,7 +100,7 @@ public abstract class NavigationAbstract { } @Nullable @@ -144,7 +144,7 @@ index be6aa59749..66e10108d6 100644 return this.a(ImmutableSet.of(new BlockPosition(entity)), entity, 16, true, i); // Paper } -@@ -156,6 +156,7 @@ public abstract class NavigationAbstract { +@@ -164,6 +164,7 @@ public abstract class NavigationAbstract { return pathentity != null && this.a(pathentity, d0); } @@ -152,17 +152,17 @@ index be6aa59749..66e10108d6 100644 public boolean a(@Nullable PathEntity pathentity, double d0) { if (pathentity == null) { this.c = null; -@@ -179,7 +180,7 @@ public abstract class NavigationAbstract { +@@ -191,7 +192,7 @@ public abstract class NavigationAbstract { } } - @Nullable + @Nullable public PathEntity getPathEntity() { return l(); } @Nullable // Paper - OBFHELPER - public PathEntity l() { + public PathEntity k() { return this.c; } -@@ -265,6 +266,7 @@ public abstract class NavigationAbstract { - return this.c == null || this.c.b(); +@@ -281,6 +282,7 @@ public abstract class NavigationAbstract { + return !this.m(); } + public void stopPathfinding() { o(); } // Paper - OBFHELPER @@ -170,7 +170,7 @@ index be6aa59749..66e10108d6 100644 this.c = null; } diff --git a/src/main/java/net/minecraft/server/PathEntity.java b/src/main/java/net/minecraft/server/PathEntity.java -index 312352ef84..dcb4e25080 100644 +index 312352ef8..dcb4e2508 100644 --- a/src/main/java/net/minecraft/server/PathEntity.java +++ b/src/main/java/net/minecraft/server/PathEntity.java @@ -5,13 +5,14 @@ import javax.annotation.Nullable; @@ -210,7 +210,7 @@ index 312352ef84..dcb4e25080 100644 return new Vec3D((double) pathpoint.a, (double) pathpoint.b, (double) pathpoint.c); diff --git a/src/main/java/net/minecraft/server/PathPoint.java b/src/main/java/net/minecraft/server/PathPoint.java -index b1db95daa9..18cdd2a6f2 100644 +index b1db95daa..18cdd2a6f 100644 --- a/src/main/java/net/minecraft/server/PathPoint.java +++ b/src/main/java/net/minecraft/server/PathPoint.java @@ -2,9 +2,9 @@ package net.minecraft.server; @@ -227,7 +227,7 @@ index b1db95daa9..18cdd2a6f2 100644 public int d = -1; public float e; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -index 5bf1cd06fa..53c2d154ed 100644 +index 5bf1cd06f..53c2d154e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java @@ -12,8 +12,11 @@ import org.bukkit.loot.LootTable; @@ -243,5 +243,5 @@ index 5bf1cd06fa..53c2d154ed 100644 public void setTarget(LivingEntity target) { EntityInsentient entity = getHandle(); -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0303-Prevent-chunk-loading-from-Fluid-Flowing.patch b/Spigot-Server-Patches/0296-Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 87% rename from Spigot-Server-Patches/0303-Prevent-chunk-loading-from-Fluid-Flowing.patch rename to Spigot-Server-Patches/0296-Prevent-chunk-loading-from-Fluid-Flowing.patch index f539166817..c66caa7fe0 100644 --- a/Spigot-Server-Patches/0303-Prevent-chunk-loading-from-Fluid-Flowing.patch +++ b/Spigot-Server-Patches/0296-Prevent-chunk-loading-from-Fluid-Flowing.patch @@ -1,11 +1,11 @@ -From 9a0285ff8bc70129a1256d0813806e88022e95da Mon Sep 17 00:00:00 2001 +From 7600f648eac18172b02d46255fb5b67062c99bba Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 10 Sep 2018 23:36:16 -0400 Subject: [PATCH] Prevent chunk loading from Fluid Flowing diff --git a/src/main/java/net/minecraft/server/FluidTypeFlowing.java b/src/main/java/net/minecraft/server/FluidTypeFlowing.java -index 3e9433e283..4660b95389 100644 +index 3099a5e65..376dca188 100644 --- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java +++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java @@ -178,7 +178,8 @@ public abstract class FluidTypeFlowing extends FluidType { @@ -25,10 +25,10 @@ index 3e9433e283..4660b95389 100644 - IBlockData iblockdata1 = iworldreader.getType(blockposition1); + IBlockData iblockdata1 = iworldreader.getTypeIfLoaded(blockposition1); // Paper + if (iblockdata1 == null) continue; // Paper - Fluid fluid = iblockdata1.p(); + Fluid fluid = iblockdata1.getFluid(); if (fluid.getType().a((FluidType) this) && this.a(enumdirection, (IBlockAccess) iworldreader, blockposition, iblockdata, blockposition1, iblockdata1)) { -@@ -322,11 +324,19 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -322,11 +324,18 @@ public abstract class FluidTypeFlowing extends FluidType { if (enumdirection1 != enumdirection) { BlockPosition blockposition2 = blockposition.shift(enumdirection1); short short0 = a(blockposition1, blockposition2); @@ -42,24 +42,23 @@ index 3e9433e283..4660b95389 100644 + continue; + } -- return Pair.of(iblockdata1, iblockdata1.p()); +- return Pair.of(iblockdata1, iblockdata1.getFluid()); - }); -+ pair = Pair.of(iblockdatax, iblockdatax.p()); ++ pair = Pair.of(iblockdatax, iblockdatax.getFluid()); + short2objectmap.put(short0, pair); -+ + } + // Paper end IBlockData iblockdata1 = (IBlockData) pair.getFirst(); Fluid fluid = (Fluid) pair.getSecond(); -@@ -398,11 +408,16 @@ public abstract class FluidTypeFlowing extends FluidType { +@@ -398,11 +407,16 @@ public abstract class FluidTypeFlowing extends FluidType { EnumDirection enumdirection = (EnumDirection) iterator.next(); BlockPosition blockposition1 = blockposition.shift(enumdirection); short short0 = a(blockposition, blockposition1); - Pair pair = (Pair) short2objectmap.computeIfAbsent(short0, (j) -> { - IBlockData iblockdata1 = iworldreader.getType(blockposition1); - -- return Pair.of(iblockdata1, iblockdata1.p()); +- return Pair.of(iblockdata1, iblockdata1.getFluid()); - }); + // Paper start + Pair pair = (Pair) short2objectmap.get(short0); @@ -67,7 +66,7 @@ index 3e9433e283..4660b95389 100644 + IBlockData iblockdatax = iworldreader.getTypeIfLoaded(blockposition1); + if (iblockdatax == null) continue; + -+ pair = Pair.of(iblockdatax, iblockdatax.p()); ++ pair = Pair.of(iblockdatax, iblockdatax.getFluid()); + short2objectmap.put(short0, pair); + } + // Paper end @@ -75,5 +74,5 @@ index 3e9433e283..4660b95389 100644 Fluid fluid = (Fluid) pair.getSecond(); Fluid fluid1 = this.a(iworldreader, blockposition1, iblockdata1); -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0304-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0297-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 98% rename from Spigot-Server-Patches/0304-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to Spigot-Server-Patches/0297-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index cd1039d1fc..654dbd1fe3 100644 --- a/Spigot-Server-Patches/0304-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0297-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -1,11 +1,11 @@ -From 34de30524211d83dc0fd34cab29214ee64d1e9a5 Mon Sep 17 00:00:00 2001 +From 35dce37a959e9f4b9b98f03437efbc13ac47a19c Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 12 Sep 2018 18:53:55 +0300 Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values diff --git a/src/main/java/net/minecraft/server/ArgumentBlock.java b/src/main/java/net/minecraft/server/ArgumentBlock.java -index 005ebec266..97d85f8451 100644 +index 005ebec26..97d85f845 100644 --- a/src/main/java/net/minecraft/server/ArgumentBlock.java +++ b/src/main/java/net/minecraft/server/ArgumentBlock.java @@ -43,7 +43,7 @@ public class ArgumentBlock { @@ -32,7 +32,7 @@ index 005ebec266..97d85f8451 100644 this.s = this::l; if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 6a6b80b5bd..dbb4e5258c 100644 +index 1eede4bcc..8a9a48bb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -87,6 +87,12 @@ import org.bukkit.persistence.PersistentDataContainer; @@ -283,10 +283,10 @@ index 6a6b80b5bd..dbb4e5258c 100644 // Paper end )); } -@@ -1482,4 +1626,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - return spigot; +@@ -1460,4 +1604,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } - // Spigot end + // Paper end + + // Paper start - Implement an API for CanPlaceOn and CanDestroy NBT values + @Override + @SuppressWarnings("deprecation") @@ -432,5 +432,5 @@ index 6a6b80b5bd..dbb4e5258c 100644 + // Paper end } -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0305-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0298-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 69% rename from Spigot-Server-Patches/0305-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to Spigot-Server-Patches/0298-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index e0fe15188a..ed813ebfb6 100644 --- a/Spigot-Server-Patches/0305-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/Spigot-Server-Patches/0298-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch @@ -1,11 +1,11 @@ -From a52dd455c6715e7f965b20e0a7fc6eb099534676 Mon Sep 17 00:00:00 2001 +From 98a6492a6e15d8b51e48189c1d71aa7f1dbf34f7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 10 Sep 2018 23:56:36 -0400 Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java -index bf8ca9b32a..7ccb3d5c06 100644 +index bf8ca9b32..7ccb3d5c0 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java @@ -12,11 +12,13 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget { @@ -52,26 +52,27 @@ index bf8ca9b32a..7ccb3d5c06 100644 return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).getBlock() == this.g && ichunkaccess.getType(blockposition.up()).isAir() && ichunkaccess.getType(blockposition.up(2)).isAir(); } diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -index 6e4da70b7e..643dc0241d 100644 +index d4cd50918..d6a3b9933 100644 --- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java +++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -@@ -99,6 +99,7 @@ public class RandomPositionGenerator { +@@ -109,6 +109,7 @@ public class RandomPositionGenerator { } - blockposition2 = new BlockPosition((double) l + entitycreature.locX, (double) i1 + entitycreature.locY, (double) j1 + entitycreature.locZ); + blockposition2 = new BlockPosition((double) k1 + entitycreature.locX(), (double) l1 + entitycreature.locY(), (double) i2 + entitycreature.locZ()); + if (!entitycreature.world.isLoaded(blockposition2)) continue; // Paper - if ((!flag1 || entitycreature.a(blockposition2)) && navigationabstract.a(blockposition2)) { - if (!flag) { - blockposition2 = a(blockposition2, entitycreature); -@@ -165,6 +166,7 @@ public class RandomPositionGenerator { - } + if (blockposition2.getY() >= 0 && blockposition2.getY() <= entitycreature.world.getBuildHeight() && (!flag3 || entitycreature.a(blockposition2)) && (!flag2 || navigationabstract.a(blockposition2))) { + if (flag1) { + blockposition2 = a(blockposition2, random.nextInt(l + 1) + i1, entitycreature.world.getBuildHeight(), (blockposition3) -> { +@@ -116,7 +117,8 @@ public class RandomPositionGenerator { + }); + } - private static boolean b(BlockPosition blockposition, EntityCreature entitycreature) { -- return entitycreature.world.getFluid(blockposition).a(TagsFluid.WATER); -+ Fluid fluid = entitycreature.world.getFluidIfLoaded(blockposition); // Paper -+ return fluid != null && fluid.a(TagsFluid.WATER); // Paper - } - } +- if (flag || !entitycreature.world.getFluid(blockposition2).a(TagsFluid.WATER)) { ++ Fluid fluid = entitycreature.world.getFluidIfLoaded(blockposition2); // Paper ++ if (flag || (fluid != null && !fluid.a(TagsFluid.WATER))) { // Paper + PathType pathtype = PathfinderNormal.b(entitycreature.world, blockposition2.getX(), blockposition2.getY(), blockposition2.getZ()); + + if (entitycreature.a(pathtype) == 0.0F) { -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0306-Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/0299-Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 87% rename from Spigot-Server-Patches/0306-Prevent-mob-spawning-from-loading-generating-chunks.patch rename to Spigot-Server-Patches/0299-Prevent-mob-spawning-from-loading-generating-chunks.patch index 7517f61e89..c9d327df9d 100644 --- a/Spigot-Server-Patches/0306-Prevent-mob-spawning-from-loading-generating-chunks.patch +++ b/Spigot-Server-Patches/0299-Prevent-mob-spawning-from-loading-generating-chunks.patch @@ -1,4 +1,4 @@ -From f7605c9bff97df59f2c1358da42b9323c190506f Mon Sep 17 00:00:00 2001 +From 9df1428b0a73a35c6958d1019b4c4c85fbf503ff Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 12 Sep 2018 21:12:57 -0400 Subject: [PATCH] Prevent mob spawning from loading/generating chunks @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks also prevents if out of world border bounds diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 30da877d53..c6ea37ffbd 100644 +index 487114367..bcca7faed 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -25,9 +25,9 @@ public final class SpawnerCreature { @@ -23,13 +23,13 @@ index 30da877d53..c6ea37ffbd 100644 @@ -55,7 +55,7 @@ public final class SpawnerCreature { if (entityhuman != null) { - double d0 = entityhuman.e((double) f, (double) k, (double) f1); + double d0 = entityhuman.g((double) f, (double) k, (double) f1); - if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D)) { + if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D) && world.isLoadedAndInBounds(blockposition_mutableblockposition)) { // Paper - don't load chunks for mob spawn ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition_mutableblockposition); - if (Objects.equals(chunkcoordintpair, chunk.getPos()) || world.getChunkProvider().a(chunkcoordintpair)) { + if (Objects.equals(chunkcoordintpair, chunk.getPos()) || worldserver.getChunkProvider().a(chunkcoordintpair)) { -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0307-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0300-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 76% rename from Spigot-Server-Patches/0307-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to Spigot-Server-Patches/0300-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch index 7e5eb8bbe6..e25240601c 100644 --- a/Spigot-Server-Patches/0307-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch +++ b/Spigot-Server-Patches/0300-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch @@ -1,4 +1,4 @@ -From a1855af5bfbd26f05e23c83c4c1c8accd9b8aa08 Mon Sep 17 00:00:00 2001 +From 91a26f5f31fbdf3cf220efe39c89eb72e51ecbf2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 12 Sep 2018 21:47:01 -0400 Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning @@ -6,28 +6,28 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning Uses an EnumMap as well as a Set paired List for O(1) contains calls. diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index 65daa76bc1..a86ece8344 100644 +index 253890e53..0102a170d 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -39,7 +39,7 @@ public abstract class BiomeBase { - protected final Map>> r = Maps.newHashMap(); - protected final List> s = Lists.newArrayList(); +@@ -40,7 +40,7 @@ public abstract class BiomeBase { + protected final Map>> r = Maps.newHashMap(); + protected final List> s = Lists.newArrayList(); protected final Map, WorldGenFeatureConfiguration> t = Maps.newHashMap(); -- private final Map> u = Maps.newHashMap(); -+ private final java.util.EnumMap> u = Maps.newEnumMap(EnumCreatureType.class); // Paper - private final ThreadLocal v = ThreadLocal.withInitial(() -> { +- private final Map> v = Maps.newHashMap(); ++ private final java.util.EnumMap> v = Maps.newEnumMap(EnumCreatureType.class); // Paper + private final ThreadLocal w = ThreadLocal.withInitial(() -> { return (Long2FloatLinkedOpenHashMap) SystemUtils.a(() -> { Long2FloatLinkedOpenHashMap long2floatlinkedopenhashmap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) { -@@ -96,7 +96,7 @@ public abstract class BiomeBase { +@@ -92,7 +92,7 @@ public abstract class BiomeBase { for (j = 0; j < i; ++j) { EnumCreatureType enumcreaturetype = aenumcreaturetype[j]; -- this.u.put(enumcreaturetype, Lists.newArrayList()); -+ this.u.put(enumcreaturetype, new MobList()); // Paper +- this.v.put(enumcreaturetype, Lists.newArrayList()); ++ this.v.put(enumcreaturetype, new MobList()); // Paper } } else { -@@ -324,6 +324,38 @@ public abstract class BiomeBase { +@@ -327,6 +327,38 @@ public abstract class BiomeBase { return this.m; } @@ -67,5 +67,5 @@ index 65daa76bc1..a86ece8344 100644 @Nullable -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0308-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-Server-Patches/0301-Implement-furnace-cook-speed-multiplier-API.patch similarity index 96% rename from Spigot-Server-Patches/0308-Implement-furnace-cook-speed-multiplier-API.patch rename to Spigot-Server-Patches/0301-Implement-furnace-cook-speed-multiplier-API.patch index 16dab11b0c..f0ea8ea6f0 100644 --- a/Spigot-Server-Patches/0308-Implement-furnace-cook-speed-multiplier-API.patch +++ b/Spigot-Server-Patches/0301-Implement-furnace-cook-speed-multiplier-API.patch @@ -1,4 +1,4 @@ -From 5015d83a985138b9e361b014247e9b1ba72ff012 Mon Sep 17 00:00:00 2001 +From 253390f4641cc1babe1d2d77815a1308708f91c3 Mon Sep 17 00:00:00 2001 From: Tassu Date: Thu, 13 Sep 2018 08:45:21 +0300 Subject: [PATCH] Implement furnace cook speed multiplier API @@ -6,7 +6,7 @@ Subject: [PATCH] Implement furnace cook speed multiplier API Signed-off-by: Tassu diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 2bbd3663a7..55b5646103 100644 +index 0419aea92..04849c3da 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java @@ -8,6 +8,7 @@ import java.util.Map; @@ -57,7 +57,7 @@ index 2bbd3663a7..55b5646103 100644 this.cookTimeTotal = this.getRecipeCookingTime(); this.burn(irecipe); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java -index 9cc67915ca..1ce10ea049 100644 +index 9cc67915c..1ce10ea04 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java @@ -63,4 +63,18 @@ public class CraftFurnace extends CraftContainer @@ -80,5 +80,5 @@ index 9cc67915ca..1ce10ea049 100644 + // Paper end } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0309-Support-Overriding-World-Seeds.patch b/Spigot-Server-Patches/0302-Support-Overriding-World-Seeds.patch similarity index 89% rename from Spigot-Server-Patches/0309-Support-Overriding-World-Seeds.patch rename to Spigot-Server-Patches/0302-Support-Overriding-World-Seeds.patch index c0d581d43b..432caee5ff 100644 --- a/Spigot-Server-Patches/0309-Support-Overriding-World-Seeds.patch +++ b/Spigot-Server-Patches/0302-Support-Overriding-World-Seeds.patch @@ -1,4 +1,4 @@ -From 044c8aa6b91e58d8fc010647b88818f4b52ec6d7 Mon Sep 17 00:00:00 2001 +From 0eed64a0b976bed022de7e3687e5ba6b90175684 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Sep 2018 23:05:31 -0400 Subject: [PATCH] Support Overriding World Seeds @@ -15,7 +15,7 @@ This seed will end up being saved to the world data file, so it is a permanent change in that it won't go back if you remove it from paper.yml diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index a13c8c68b6..ea3695b021 100644 +index 214b577b3..559e6b42b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -11,6 +11,7 @@ import java.lang.reflect.Modifier; @@ -25,8 +25,8 @@ index a13c8c68b6..ea3695b021 100644 +import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.logging.Level; - import java.util.logging.Logger; -@@ -20,6 +21,7 @@ import com.google.common.collect.Lists; + import java.util.regex.Pattern; +@@ -19,6 +20,7 @@ import com.google.common.collect.Lists; import net.minecraft.server.MinecraftServer; import org.bukkit.Bukkit; import org.bukkit.command.Command; @@ -34,7 +34,7 @@ index a13c8c68b6..ea3695b021 100644 import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; import co.aikar.timings.Timings; -@@ -334,4 +336,23 @@ public class PaperConfig { +@@ -310,4 +312,23 @@ public class PaperConfig { } tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit); } @@ -59,10 +59,10 @@ index a13c8c68b6..ea3695b021 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8b08ebb7d5..ab72e5cd36 100644 +index 206a4ad64..ec575bc8f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -372,7 +372,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 17 Sep 2018 23:37:31 -0400 Subject: [PATCH] Optimize Server World Map @@ -21,7 +21,7 @@ known NMS used methods, but we can add more if naughty plugins are found later. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldMap.java b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java new file mode 100644 -index 0000000000..6bb2f98b45 +index 000000000..6bb2f98b4 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java @@ -0,0 +1,191 @@ @@ -217,7 +217,7 @@ index 0000000000..6bb2f98b45 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index de423de63b..a5447c6501 100644 +index ec575bc8f..3120f91de 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -88,7 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Tue, 18 Sep 2018 23:53:23 +0100 Subject: [PATCH] PreSpawnerSpawnEvent @@ -9,24 +9,24 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for spawners. diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 6f5d8b0315..079099e308 100644 +index fe8bc7f75..90ca1ee14 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -@@ -110,11 +110,11 @@ public abstract class MobSpawnerAbstract { +@@ -111,11 +111,11 @@ public abstract class MobSpawnerAbstract { - 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( + 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( + com.destroystokyo.paper.event.entity.PreSpawnerSpawnEvent event; + event = new com.destroystokyo.paper.event.entity.PreSpawnerSpawnEvent( - MCUtil.toLocation(world, d3, d4, d5), - type, -- org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER + MCUtil.toLocation(world, d3, d4, d5), + type, +- org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER + MCUtil.toLocation(world, blockposition) - ); - if (!event.callEvent()) { - flag = true; + ); + if (!event.callEvent()) { + flag = true; -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0312-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0305-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 84% rename from Spigot-Server-Patches/0312-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to Spigot-Server-Patches/0305-Catch-JsonParseException-in-Entity-and-TE-names.patch index 21b102270e..79b793bdd8 100644 --- a/Spigot-Server-Patches/0312-Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/Spigot-Server-Patches/0305-Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -1,4 +1,4 @@ -From a58127d969be71a3373e822df2131aa53a36b9c1 Mon Sep 17 00:00:00 2001 +From d0753d8956404e8627cbd646846915a2d24b124c Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 22 Sep 2018 15:56:59 -0400 Subject: [PATCH] Catch JsonParseException in Entity and TE names @@ -13,24 +13,24 @@ Shulkers) may need to be changed in order for it to re-save properly No more crashing though. diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -index 6d85cd508e..23a69ba571 100644 +index e6bf34ab0..c447cf1ae 100644 --- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java +++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java -@@ -56,7 +56,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { +@@ -59,7 +59,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener { this.command = nbttagcompound.getString("Command"); this.successCount = nbttagcompound.getInt("SuccessCount"); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { -- this.customName = IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName")); -+ this.customName = MCUtil.getBaseComponentFromNbt("CustomName", nbttagcompound); // Paper - Catch ParseException +- this.setName(IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName"))); ++ this.setName(MCUtil.getBaseComponentFromNbt("CustomName", nbttagcompound)); // Paper - Catch ParseException } if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f9b097fd6f..4833a9652a 100644 +index b03316bc8..5d31068d7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1701,7 +1701,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - this.setPosition(this.locX, this.locY, this.locZ); +@@ -1679,7 +1679,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + this.Z(); this.setYawPitch(this.yaw, this.pitch); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { - this.setCustomName(IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName"))); @@ -39,7 +39,7 @@ index f9b097fd6f..4833a9652a 100644 this.setCustomNameVisible(nbttagcompound.getBoolean("CustomNameVisible")); diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 6d278a0da5..ec3732193f 100644 +index 6d278a0da..ec3732193 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -339,4 +339,19 @@ public final class MCUtil { @@ -63,10 +63,10 @@ index 6d278a0da5..ec3732193f 100644 + } } diff --git a/src/main/java/net/minecraft/server/TileEntityBanner.java b/src/main/java/net/minecraft/server/TileEntityBanner.java -index 560330ba05..bfc58a7754 100644 +index 21a2415fb..7a911c5a5 100644 --- a/src/main/java/net/minecraft/server/TileEntityBanner.java +++ b/src/main/java/net/minecraft/server/TileEntityBanner.java -@@ -57,7 +57,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity { +@@ -59,7 +59,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity { public void load(NBTTagCompound nbttagcompound) { super.load(nbttagcompound); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { @@ -76,7 +76,7 @@ index 560330ba05..bfc58a7754 100644 if (this.hasWorld()) { diff --git a/src/main/java/net/minecraft/server/TileEntityContainer.java b/src/main/java/net/minecraft/server/TileEntityContainer.java -index 473ec2cbde..ab6b86e4e9 100644 +index 473ec2cbd..ab6b86e4e 100644 --- a/src/main/java/net/minecraft/server/TileEntityContainer.java +++ b/src/main/java/net/minecraft/server/TileEntityContainer.java @@ -17,7 +17,7 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento @@ -89,5 +89,5 @@ index 473ec2cbde..ab6b86e4e9 100644 } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0313-Avoid-dimension-id-collisions.patch b/Spigot-Server-Patches/0306-Avoid-dimension-id-collisions.patch similarity index 85% rename from Spigot-Server-Patches/0313-Avoid-dimension-id-collisions.patch rename to Spigot-Server-Patches/0306-Avoid-dimension-id-collisions.patch index 2d77cb4007..99daf47869 100644 --- a/Spigot-Server-Patches/0313-Avoid-dimension-id-collisions.patch +++ b/Spigot-Server-Patches/0306-Avoid-dimension-id-collisions.patch @@ -1,4 +1,4 @@ -From 40b719adffacc70145b5dbf5d85a72ae16cb3ab3 Mon Sep 17 00:00:00 2001 +From dee157487f5d414b061a794695a77f9a9b7d608a Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 25 Sep 2018 06:53:43 +0200 Subject: [PATCH] Avoid dimension id collisions @@ -8,10 +8,10 @@ we would reuse an existing dimension id, if some other dimension was unloaded before. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b0f4ef1b48..d0834ecaab 100644 +index 1ca9a7724..e1c9a9e12 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -976,7 +976,7 @@ public final class CraftServer implements Server { +@@ -977,7 +977,7 @@ public final class CraftServer implements Server { boolean used = false; do { for (WorldServer server : console.getWorlds()) { @@ -21,5 +21,5 @@ index b0f4ef1b48..d0834ecaab 100644 dimension++; break; -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0314-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0307-Honor-EntityAgeable.ageLock.patch similarity index 74% rename from Spigot-Server-Patches/0314-Honor-EntityAgeable.ageLock.patch rename to Spigot-Server-Patches/0307-Honor-EntityAgeable.ageLock.patch index c5666e8699..0d7fd631c9 100644 --- a/Spigot-Server-Patches/0314-Honor-EntityAgeable.ageLock.patch +++ b/Spigot-Server-Patches/0307-Honor-EntityAgeable.ageLock.patch @@ -1,14 +1,14 @@ -From eb84a6f42dcb8f78011c1ee226fccf9b8b0de9af Mon Sep 17 00:00:00 2001 +From ea4806f775effd2a9c1215f777d111d66136048f Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 23 Sep 2018 20:59:53 -0500 Subject: [PATCH] Honor EntityAgeable.ageLock diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java -index da9740a99e..e87754ef33 100644 +index cec938436..3d27f0964 100644 --- a/src/main/java/net/minecraft/server/EntityAgeable.java +++ b/src/main/java/net/minecraft/server/EntityAgeable.java -@@ -85,6 +85,7 @@ public abstract class EntityAgeable extends EntityCreature { +@@ -101,6 +101,7 @@ public abstract class EntityAgeable extends EntityCreature { } public void setAge(int i, boolean flag) { @@ -17,5 +17,5 @@ index da9740a99e..e87754ef33 100644 int k = j; -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0315-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0308-Configurable-connection-throttle-kick-message.patch similarity index 92% rename from Spigot-Server-Patches/0315-Configurable-connection-throttle-kick-message.patch rename to Spigot-Server-Patches/0308-Configurable-connection-throttle-kick-message.patch index a1286a8da0..8029ff0d37 100644 --- a/Spigot-Server-Patches/0315-Configurable-connection-throttle-kick-message.patch +++ b/Spigot-Server-Patches/0308-Configurable-connection-throttle-kick-message.patch @@ -1,14 +1,14 @@ -From d68529932751226e348fd0d0a70944b5d377471c Mon Sep 17 00:00:00 2001 +From c8494207b2d8832450cbc1ffcdef06b06b67b764 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 2 Oct 2018 09:57:50 +0100 Subject: [PATCH] Configurable connection throttle kick message diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ea3695b021..d2c039ea2f 100644 +index 559e6b42b..092bff78a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -275,6 +275,11 @@ public class PaperConfig { +@@ -274,6 +274,11 @@ public class PaperConfig { authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); } @@ -21,7 +21,7 @@ index ea3695b021..d2c039ea2f 100644 private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 740c8d2728..9a8e5e1213 100644 +index 8928d93e4..0532f975b 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -38,7 +38,7 @@ public class HandshakeListener implements PacketHandshakingInListener { @@ -34,5 +34,5 @@ index 740c8d2728..9a8e5e1213 100644 this.b.close(chatmessage); return; -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0316-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0309-Hook-into-CB-plugin-rewrites.patch similarity index 98% rename from Spigot-Server-Patches/0316-Hook-into-CB-plugin-rewrites.patch rename to Spigot-Server-Patches/0309-Hook-into-CB-plugin-rewrites.patch index 3d07ca4769..15466734c5 100644 --- a/Spigot-Server-Patches/0316-Hook-into-CB-plugin-rewrites.patch +++ b/Spigot-Server-Patches/0309-Hook-into-CB-plugin-rewrites.patch @@ -1,4 +1,4 @@ -From 02060c548e5b7d6bf496c45852af3eb2e5b68aed Mon Sep 17 00:00:00 2001 +From c1dff6a365bdb99e77f4a3368d97154e430f6eb8 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 3 Oct 2018 20:09:18 -0400 Subject: [PATCH] Hook into CB plugin rewrites @@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're debugging in an IDE pre-relocate. diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 467b2d9385..61f1023557 100644 +index 467b2d938..61f102355 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -6,7 +6,9 @@ import java.io.FileOutputStream; @@ -187,5 +187,5 @@ index 467b2d9385..61f1023557 100644 { if ( owner.equals( "org/bukkit/Material" ) ) -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0317-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0310-Allow-setting-the-vex-s-summoner.patch similarity index 90% rename from Spigot-Server-Patches/0317-Allow-setting-the-vex-s-summoner.patch rename to Spigot-Server-Patches/0310-Allow-setting-the-vex-s-summoner.patch index 43b8379dc6..3ee871e7ad 100644 --- a/Spigot-Server-Patches/0317-Allow-setting-the-vex-s-summoner.patch +++ b/Spigot-Server-Patches/0310-Allow-setting-the-vex-s-summoner.patch @@ -1,11 +1,11 @@ -From ee9f9908fd798f679cf6abb2f07048c9a24ac6c5 Mon Sep 17 00:00:00 2001 +From f0c8d8c630bd407f3a3d028b5482d0c73fe1e0d6 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 6 Oct 2018 21:47:44 -0500 Subject: [PATCH] Allow setting the vex's summoner diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java -index 25aea53150..51c05376da 100644 +index a46730460..cf274666c 100644 --- a/src/main/java/net/minecraft/server/EntityVex.java +++ b/src/main/java/net/minecraft/server/EntityVex.java @@ -133,6 +133,7 @@ public class EntityVex extends EntityMonster { @@ -17,7 +17,7 @@ index 25aea53150..51c05376da 100644 this.c = entityinsentient; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java -index 169c951ec3..2f7df3074f 100644 +index 169c951ec..2f7df3074 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java @@ -23,6 +23,10 @@ public class CraftVex extends CraftMonster implements Vex { @@ -32,5 +32,5 @@ index 169c951ec3..2f7df3074f 100644 @Override -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0318-Add-sun-related-API.patch b/Spigot-Server-Patches/0311-Add-sun-related-API.patch similarity index 75% rename from Spigot-Server-Patches/0318-Add-sun-related-API.patch rename to Spigot-Server-Patches/0311-Add-sun-related-API.patch index e3a11834dd..b046e375db 100644 --- a/Spigot-Server-Patches/0318-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0311-Add-sun-related-API.patch @@ -1,38 +1,38 @@ -From 0c04ae960b9a3046050c46705f321599882c1353 Mon Sep 17 00:00:00 2001 +From 97dd941a53daeecad5edbeb9e55cd4d5c858e6b3 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 00:54:21 -0500 Subject: [PATCH] Add sun related API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index a14d490ade..09112a8b0e 100644 +index eadac07f6..cbaed08f5 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1327,6 +1327,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1334,6 +1334,7 @@ public abstract class EntityInsentient extends EntityLiving { return flag; } -+ public boolean isInDaylight() { return this.dS(); } // Paper - OBFHELPER - protected boolean dS() { ++ public boolean isInDaylight() { return this.en(); } // Paper - OBFHELPER + protected boolean en() { if (this.world.J() && !this.world.isClientSide) { - float f = this.aF(); + float f = this.aI(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c60279da8f..1c3285f5c0 100644 +index 9c23060bb..8e3367435 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -705,6 +705,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -619,6 +619,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } } + public boolean isDayTime() { return J(); } // Paper - OBFHELPER public boolean J() { - return this.u < 4; + return this.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD && this.c < 4; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index dc0a07c7cd..78a2c47c5a 100644 +index 182322752..578fe8d19 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -840,6 +840,13 @@ public class CraftWorld implements World { +@@ -855,6 +855,13 @@ public class CraftWorld implements World { } } @@ -47,7 +47,7 @@ index dc0a07c7cd..78a2c47c5a 100644 public boolean createExplosion(double x, double y, double z, float power) { return createExplosion(x, y, z, power, false, true); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -index 53c2d154ed..56c233872b 100644 +index 53c2d154e..56c233872 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java @@ -68,4 +68,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { @@ -63,5 +63,5 @@ index 53c2d154ed..56c233872b 100644 + // Paper end } -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0319-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0312-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 87% rename from Spigot-Server-Patches/0319-Check-Drowned-for-Villager-Aggression-Config.patch rename to Spigot-Server-Patches/0312-Check-Drowned-for-Villager-Aggression-Config.patch index 4357f17216..ac49823389 100644 --- a/Spigot-Server-Patches/0319-Check-Drowned-for-Villager-Aggression-Config.patch +++ b/Spigot-Server-Patches/0312-Check-Drowned-for-Villager-Aggression-Config.patch @@ -1,22 +1,22 @@ -From f1045e50a6d0e1f641e87f570c4788665cd991e0 Mon Sep 17 00:00:00 2001 +From ddc7cc6102fac211c5920f559f1b9262cacdc429 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Wed, 10 Oct 2018 21:22:44 -0500 Subject: [PATCH] Check Drowned for Villager Aggression Config diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java -index fd10cf318a..6f0094e6dc 100644 +index 255b3d0cd..3a1928b22 100644 --- a/src/main/java/net/minecraft/server/EntityDrowned.java +++ b/src/main/java/net/minecraft/server/EntityDrowned.java @@ -29,7 +29,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D)); this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityDrowned.class})).a(EntityPigZombie.class)); - this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::h)); + this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::i)); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); + if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); // Paper this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); - this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bz)); + this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bw)); } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0320-Here-s-Johnny.patch b/Spigot-Server-Patches/0313-Here-s-Johnny.patch similarity index 83% rename from Spigot-Server-Patches/0320-Here-s-Johnny.patch rename to Spigot-Server-Patches/0313-Here-s-Johnny.patch index 25040c98f4..30b13627e6 100644 --- a/Spigot-Server-Patches/0320-Here-s-Johnny.patch +++ b/Spigot-Server-Patches/0313-Here-s-Johnny.patch @@ -1,24 +1,24 @@ -From 186a68036e63b03e928028f0bdd395b904103c7e Mon Sep 17 00:00:00 2001 +From b2d086efee4196e70746de334a8c1d94383ea371 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 12 Oct 2018 01:37:22 -0500 Subject: [PATCH] Here's Johnny! diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java -index 06918b8c91..ffbd6e9269 100644 +index 73ecdd22e..c974c02e9 100644 --- a/src/main/java/net/minecraft/server/EntityVindicator.java +++ b/src/main/java/net/minecraft/server/EntityVindicator.java @@ -11,7 +11,7 @@ public class EntityVindicator extends EntityIllagerAbstract { private static final Predicate b = (enumdifficulty) -> { return enumdifficulty == EnumDifficulty.NORMAL || enumdifficulty == EnumDifficulty.HARD; }; -- private boolean bz; -+ private boolean bz; public boolean isJohnny() { return bz; } public void setJohnny(boolean johnny) { bz = johnny; } // Paper - OBFHELPER +- private boolean bw; ++ private boolean bw; public boolean isJohnny() { return bw; } public void setJohnny(boolean johnny) { bw = johnny; } // Paper - OBFHELPER public EntityVindicator(EntityTypes entitytypes, World world) { super(entitytypes, world); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java -index 951d479298..5ff957ced7 100644 +index 951d47929..5ff957ced 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java @@ -25,4 +25,14 @@ public class CraftVindicator extends CraftIllager implements Vindicator { @@ -37,5 +37,5 @@ index 951d479298..5ff957ced7 100644 + // Paper end } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0321-Turtle-API.patch b/Spigot-Server-Patches/0314-Turtle-API.patch similarity index 77% rename from Spigot-Server-Patches/0321-Turtle-API.patch rename to Spigot-Server-Patches/0314-Turtle-API.patch index fc2aa9df49..d94b7b5f26 100644 --- a/Spigot-Server-Patches/0321-Turtle-API.patch +++ b/Spigot-Server-Patches/0314-Turtle-API.patch @@ -1,84 +1,84 @@ -From de12d9eb27172c21844363f2e66700833e43290f Mon Sep 17 00:00:00 2001 +From 12c4f15acb42676902c300c55bfb56bf8d025f3b Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 29 Sep 2018 16:08:23 -0500 Subject: [PATCH] Turtle API diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 594cc70def..0bd80e5623 100644 +index 76296119a..dd02cb348 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java -@@ -26,51 +26,63 @@ public class EntityTurtle extends EntityAnimal { - this.K = 1.0F; +@@ -27,51 +27,63 @@ public class EntityTurtle extends EntityAnimal { + this.H = 1.0F; } + public final void setHome(BlockPosition pos) { g(pos); } // Paper - OBFHELPER public void g(BlockPosition blockposition) { - this.datawatcher.set(EntityTurtle.bA, blockposition); + this.datawatcher.set(EntityTurtle.bx, blockposition); } -+ public final BlockPosition getHome() { return this.dX(); } // Paper - OBFHELPER - private BlockPosition dX() { - return (BlockPosition) this.datawatcher.get(EntityTurtle.bA); ++ public final BlockPosition getHome() { return this.es(); } // Paper - OBFHELPER + private BlockPosition es() { + return (BlockPosition) this.datawatcher.get(EntityTurtle.bx); } + public final void setTravelPos(BlockPosition pos) { this.h(pos); } // Paper - OBFHELPER private void h(BlockPosition blockposition) { - this.datawatcher.set(EntityTurtle.bD, blockposition); + this.datawatcher.set(EntityTurtle.bA, blockposition); } -+ public final BlockPosition getTravelPos() { return this.dY(); } // Paper - OBFHELPER - private BlockPosition dY() { - return (BlockPosition) this.datawatcher.get(EntityTurtle.bD); ++ public final BlockPosition getTravelPos() { return this.et(); } // Paper - OBFHELPER + private BlockPosition et() { + return (BlockPosition) this.datawatcher.get(EntityTurtle.bA); } -+ public final boolean hasEgg() { return this.dV(); } // Paper - OBFHELPER - public boolean dV() { - return (Boolean) this.datawatcher.get(EntityTurtle.bB); ++ public final boolean hasEgg() { return this.eq(); } // Paper - OBFHELPER + public boolean eq() { + return (Boolean) this.datawatcher.get(EntityTurtle.by); } + public final void setHasEgg(boolean hasEgg) { this.r(hasEgg); } // Paper - OBFHELPER private void r(boolean flag) { - this.datawatcher.set(EntityTurtle.bB, flag); + this.datawatcher.set(EntityTurtle.by, flag); } -+ public final boolean isDigging() { return this.dW(); } // Paper - OBFHELPER - public boolean dW() { - return (Boolean) this.datawatcher.get(EntityTurtle.bC); ++ public final boolean isDigging() { return this.er(); } // Paper - OBFHELPER + public boolean er() { + return (Boolean) this.datawatcher.get(EntityTurtle.bz); } + public final void setDigging(boolean digging) { this.s(digging); } // Paper - OBFHELPER private void s(boolean flag) { - this.bG = flag ? 1 : 0; - this.datawatcher.set(EntityTurtle.bC, flag); + this.bD = flag ? 1 : 0; + this.datawatcher.set(EntityTurtle.bz, flag); } -+ public final boolean isGoingHome() { return this.dZ(); } // Paper - OBFHELPER - private boolean dZ() { - return (Boolean) this.datawatcher.get(EntityTurtle.bE); ++ public final boolean isGoingHome() { return this.eu(); } // Paper - OBFHELPER + private boolean eu() { + return (Boolean) this.datawatcher.get(EntityTurtle.bB); } + public final void setGoingHome(boolean goingHome) { this.t(goingHome); } // Paper - OBFHELPER private void t(boolean flag) { - this.datawatcher.set(EntityTurtle.bE, flag); + this.datawatcher.set(EntityTurtle.bB, flag); } -+ public final boolean isTravelling() { return this.ee(); } // Paper - OBFHELPER - private boolean ee() { - return (Boolean) this.datawatcher.get(EntityTurtle.bF); ++ public final boolean isTravelling() { return this.ez(); } // Paper - OBFHELPER + private boolean ez() { + return (Boolean) this.datawatcher.get(EntityTurtle.bC); } + public final void setTravelling(boolean travelling) { this.u(travelling); } // Paper - OBFHELPER private void u(boolean flag) { - this.datawatcher.set(EntityTurtle.bF, flag); + this.datawatcher.set(EntityTurtle.bC, flag); } -@@ -441,14 +453,17 @@ public class EntityTurtle extends EntityAnimal { +@@ -443,14 +455,17 @@ public class EntityTurtle extends EntityAnimal { if (!this.g.isInWater() && this.k()) { - if (this.g.bG < 1) { + if (this.g.bD < 1) { - this.g.s(true); + this.g.setDigging(new com.destroystokyo.paper.event.entity.TurtleStartDiggingEvent((org.bukkit.entity.Turtle) this.g.getBukkitEntity(), MCUtil.toLocation(this.g.world, this.e)).callEvent()); // Paper - } else if (this.g.bG > 200) { + } else if (this.g.bD > 200) { World world = this.g.world; // CraftBukkit start @@ -93,17 +93,17 @@ index 594cc70def..0bd80e5623 100644 } // CraftBukkit end this.g.r(false); -@@ -583,7 +598,7 @@ public class EntityTurtle extends EntityAnimal { +@@ -585,7 +600,7 @@ public class EntityTurtle extends EntityAnimal { @Override public boolean a() { -- return this.a.isBaby() ? false : (this.a.dV() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.dX().a((IPosition) this.a.getPositionVector(), 64.0D))); -+ return this.a.isBaby() ? false : (this.a.dW() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.dY().a((IPosition) this.a.getPositionVector(), 64.0D))) && new com.destroystokyo.paper.event.entity.TurtleGoHomeEvent((org.bukkit.entity.Turtle) this.a.getBukkitEntity()).callEvent(); // Paper +- return this.a.isBaby() ? false : (this.a.eq() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.es().a((IPosition) this.a.getPositionVector(), 64.0D))); ++ return this.a.isBaby() ? false : (this.a.eq() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.es().a((IPosition) this.a.getPositionVector(), 64.0D))) && new com.destroystokyo.paper.event.entity.TurtleGoHomeEvent((org.bukkit.entity.Turtle) this.a.getBukkitEntity()).callEvent(); // Paper } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java -index 123a2c75ca..8edcf7af65 100644 +index 123a2c75c..8edcf7af6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java @@ -1,6 +1,8 @@ @@ -153,5 +153,5 @@ index 123a2c75ca..8edcf7af65 100644 + // Paper end } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0322-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0315-Limit-lightning-strike-effect-distance.patch similarity index 70% rename from Spigot-Server-Patches/0322-Limit-lightning-strike-effect-distance.patch rename to Spigot-Server-Patches/0315-Limit-lightning-strike-effect-distance.patch index 9f2894e888..20737c3208 100644 --- a/Spigot-Server-Patches/0322-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0315-Limit-lightning-strike-effect-distance.patch @@ -1,18 +1,17 @@ -From 14201322b20e2e04e8cd67161dae08b5527b4606 Mon Sep 17 00:00:00 2001 +From bbf14ec267b75fbde5ce1f4ebc529c36e19c2717 Mon Sep 17 00:00:00 2001 From: Trigary Date: Fri, 14 Sep 2018 17:42:08 +0200 Subject: [PATCH] Limit lightning strike effect distance diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4a4e9d715..3b24fbdbf 100644 +index e49318a19..fe3e78f36 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -239,6 +239,28 @@ public class PaperWorldConfig { - skeleHorseSpawnChance = 0.01D; // Vanilla value +@@ -240,6 +240,28 @@ public class PaperWorldConfig { } } -+ + + public double sqrMaxThunderDistance; + public double sqrMaxLightningImpactSoundDistance; + public double maxLightningFlashDistance; @@ -34,16 +33,17 @@ index 4a4e9d715..3b24fbdbf 100644 + maxLightningFlashDistance = 512; // Vanilla value + } + } - ++ public int fixedInhabitedTime; private void fixedInhabitedTime() { + if (PaperConfig.version < 16) { diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index 2ceee79cf..27bf271bb 100644 +index 7c518983a..0bd67395e 100644 --- a/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java @@ -64,6 +64,17 @@ public class EntityLightning extends Entity { - 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; + // Paper start - Limit lightning strike effect distance + if (distanceSquared <= this.world.paperConfig.sqrMaxLightningImpactSoundDistance) { @@ -58,29 +58,29 @@ index 2ceee79cf..27bf271bb 100644 + // Paper end if (distanceSquared > viewDistance * viewDistance) { double deltaLength = Math.sqrt(distanceSquared); - double relativeX = player.locX + (deltaX / deltaLength) * viewDistance; + double relativeX = player.locX() + (deltaX / deltaLength) * viewDistance; @@ -74,7 +85,7 @@ public class EntityLightning extends Entity { } } // CraftBukkit end -- this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); -+ //this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); // Paper - Limit lightning strike effect distance (the packet is now sent from inside the loop) +- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); ++ //this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); // Paper - Limit lightning strike effect distance (the packet is now sent from inside the loop) } --this.lifeTicks; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 8b55879c6..dbd357f1a 100644 +index a0c714129..ecfcecfdc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1251,7 +1251,7 @@ public class WorldServer extends World { +@@ -1250,7 +1250,7 @@ public class WorldServer extends World { } // CraftBukkit end this.globalEntityList.add(entitylightning); -- this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX, entitylightning.locY, entitylightning.locZ, 512.0D, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension -+ this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX, entitylightning.locY, entitylightning.locZ, paperConfig.maxLightningFlashDistance, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension, limit lightning strike effect distance +- this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX(), entitylightning.locY(), entitylightning.locZ(), 512.0D, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension ++ this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX(), entitylightning.locY(), entitylightning.locZ(), paperConfig.maxLightningFlashDistance, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension, limit lightning strike effect distance } @Override -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0323-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0316-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 73% rename from Spigot-Server-Patches/0323-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to Spigot-Server-Patches/0316-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index a4857e9f09..762813d161 100644 --- a/Spigot-Server-Patches/0323-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/Spigot-Server-Patches/0316-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -1,4 +1,4 @@ -From a58314dd18e49eda089384652ff34d7a44979f0e Mon Sep 17 00:00:00 2001 +From 2712bfcea985f2a16ab20b0bc1ecd45ec8732ee5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 17 Oct 2018 19:17:27 -0400 Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles @@ -11,12 +11,12 @@ If the projectile fails to find the shooter in the current world, check other worlds. diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index f2f4b2d929..18d28a151a 100644 +index 9eed1dce3..6c091b680 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java -@@ -213,11 +213,21 @@ public abstract class EntityProjectile extends Entity implements IProjectile { +@@ -209,6 +209,16 @@ public abstract class EntityProjectile extends Entity implements IProjectile { public EntityLiving getShooter() { - if (this.shooter == null && this.shooterId != null && this.world instanceof WorldServer) { + if ((this.shooter == null || this.shooter.dead) && this.shooterId != null && this.world instanceof WorldServer) { Entity entity = ((WorldServer) this.world).getEntity(this.shooterId); + // Paper start - MC-50319 - shooter might be in another world (arrows through portals) + if (entity == null) { @@ -31,12 +31,6 @@ index f2f4b2d929..18d28a151a 100644 if (entity instanceof EntityLiving) { this.shooter = (EntityLiving) entity; - } else { -- this.shooterId = null; -+ //this.shooterId = null; // Paper - don't unset shooterId - } - } - -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0324-Call-player-spectator-target-events.patch b/Spigot-Server-Patches/0317-Call-player-spectator-target-events.patch similarity index 71% rename from Spigot-Server-Patches/0324-Call-player-spectator-target-events.patch rename to Spigot-Server-Patches/0317-Call-player-spectator-target-events.patch index 969ead82a7..ade48aafdd 100644 --- a/Spigot-Server-Patches/0324-Call-player-spectator-target-events.patch +++ b/Spigot-Server-Patches/0317-Call-player-spectator-target-events.patch @@ -1,23 +1,23 @@ -From 4d2f78285608aa6230d078f39bb3f4f6a85735b9 Mon Sep 17 00:00:00 2001 +From c3dbf581a251e2eef711756f72f023013dae9245 Mon Sep 17 00:00:00 2001 From: Caleb Bassham Date: Fri, 28 Sep 2018 02:32:19 -0500 Subject: [PATCH] Call player spectator target events diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 898089983..ad5dcab78 100644 +index 26096afbe..bdb73b68a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - private EnumChatVisibility ck; - private boolean cl = true; - private long cm = SystemUtils.getMonotonicMillis(); + private EnumChatVisibility ch; + private boolean ci = true; + private long cj = SystemUtils.getMonotonicMillis(); - private Entity spectatedEntity; + private Entity spectatedEntity; private void setSpectatorTargetField(Entity e) { this.spectatedEntity = e; } // Paper - OBFHELPER public boolean worldChangeInvuln; - private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER + private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER private final RecipeBookServer recipeBook; -@@ -1581,15 +1581,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1556,15 +1556,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } @@ -29,7 +29,7 @@ index 898089983..ad5dcab78 100644 - this.spectatedEntity = (Entity) (entity == null ? this : entity); - if (entity1 != this.spectatedEntity) { - this.playerConnection.sendPacket(new PacketPlayOutCamera(this.spectatedEntity)); -- this.playerConnection.a(this.spectatedEntity.locX, this.spectatedEntity.locY, this.spectatedEntity.locZ, this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit +- this.playerConnection.a(this.spectatedEntity.locX(), this.spectatedEntity.locY(), this.spectatedEntity.locZ(), this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit + if (newSpectatorTarget == null) { + newSpectatorTarget = this; } @@ -53,11 +53,19 @@ index 898089983..ad5dcab78 100644 + setSpectatorTargetField(newSpectatorTarget); + + this.playerConnection.sendPacket(new PacketPlayOutCamera(newSpectatorTarget)); -+ this.playerConnection.a(this.spectatedEntity.locX, this.spectatedEntity.locY, this.spectatedEntity.locZ, this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit ++ this.playerConnection.a(this.spectatedEntity.locY(), this.spectatedEntity.locY(), this.spectatedEntity.locZ(), this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit + // Paper end } + @Override +@@ -1572,7 +1592,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + if (this.portalCooldown > 0 && !this.worldChangeInvuln) { + --this.portalCooldown; + } +- + } + @Override -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0325-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0318-Add-Velocity-IP-Forwarding-Support.patch similarity index 96% rename from Spigot-Server-Patches/0325-Add-Velocity-IP-Forwarding-Support.patch rename to Spigot-Server-Patches/0318-Add-Velocity-IP-Forwarding-Support.patch index 853c468b40..f355fcbde1 100644 --- a/Spigot-Server-Patches/0325-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0318-Add-Velocity-IP-Forwarding-Support.patch @@ -1,4 +1,4 @@ -From 2a1652d5c16477c05e7937b1df54b8c091267a63 Mon Sep 17 00:00:00 2001 +From 520dedf2e368085a97f21d0490d96ba949b7c2b4 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 8 Oct 2018 14:36:14 -0400 Subject: [PATCH] Add Velocity IP Forwarding Support @@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13 login plugin message packet. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index d2c039ea2f..63d8602927 100644 +index 092bff78a..7e85a0224 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -8,6 +8,7 @@ import java.io.IOException; @@ -25,7 +25,7 @@ index d2c039ea2f..63d8602927 100644 import java.util.HashMap; import java.util.List; import java.util.Map; -@@ -246,7 +247,7 @@ public class PaperConfig { +@@ -245,7 +246,7 @@ public class PaperConfig { } public static boolean isProxyOnlineMode() { @@ -34,7 +34,7 @@ index d2c039ea2f..63d8602927 100644 } public static int packetInSpamThreshold = 300; -@@ -360,4 +361,18 @@ public class PaperConfig { +@@ -336,4 +337,18 @@ public class PaperConfig { } } } @@ -55,7 +55,7 @@ index d2c039ea2f..63d8602927 100644 } diff --git a/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java new file mode 100644 -index 0000000000..fdd8708f97 +index 000000000..fdd8708f9 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java @@ -0,0 +1,67 @@ @@ -127,7 +127,7 @@ index 0000000000..fdd8708f97 + } +} diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index d6befec184..41b2c90c3a 100644 +index a985ae7ba..c3d57461d 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -42,6 +42,7 @@ public class LoginListener implements PacketLoginInListener { @@ -203,7 +203,7 @@ index d6befec184..41b2c90c3a 100644 } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 08e314af7c..046196d54d 100644 +index 08e314af7..046196d54 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -216,7 +216,7 @@ index 08e314af7c..046196d54d 100644 public java.util.UUID spoofedUUID; public com.mojang.authlib.properties.Property[] spoofedProfile; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index fa2d3ce8cb..dac560c63f 100644 +index 93ae6dcd7..fb9186b3f 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -140,6 +140,7 @@ public class PacketDataSerializer extends ByteBuf { @@ -244,7 +244,7 @@ index fa2d3ce8cb..dac560c63f 100644 int j = this.i(); diff --git a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java -index 4d1f441395..c1ca6f9501 100644 +index 4d1f44139..c1ca6f950 100644 --- a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java +++ b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java @@ -4,8 +4,8 @@ import java.io.IOException; @@ -259,7 +259,7 @@ index 4d1f441395..c1ca6f9501 100644 public PacketLoginInCustomPayload() {} diff --git a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java -index ae74dc9e18..7eb230f1b2 100644 +index ae74dc9e1..7eb230f1b 100644 --- a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java +++ b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java @@ -10,6 +10,14 @@ public class PacketLoginOutCustomPayload implements Packet Date: Fri, 12 Oct 2018 14:10:46 -0500 Subject: [PATCH] Add more Witch API diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java -index ff4e73fff3..0b849f37c5 100644 +index be6ecfb08..f1a4c10ad 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -1,5 +1,11 @@ @@ -24,26 +24,26 @@ index ff4e73fff3..0b849f37c5 100644 public class EntityWitch extends EntityRaider implements IRangedEntity { private static final UUID b = UUID.fromString("5CD17E52-A79A-43D3-A529-90FDE04B181E"); -- private static final AttributeModifier bz = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false); -+ private static final AttributeModifier bz = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false); private static final AttributeModifier DRINKING_SPEED = bz; // Paper - OBFHELPER - private static final DataWatcherObject bA = DataWatcher.a(EntityWitch.class, DataWatcherRegistry.i); -- private int bB; -+ private int bB; public int getPotionUseTimeLeft() { return bB; } public void setPotionUseTimeLeft(int timeLeft) { bB = timeLeft; } // Paper - OBFHELPER - private PathfinderGoalNearestHealableRaider bC; - private PathfinderGoalNearestAttackableTargetWitch bD; +- private static final AttributeModifier bw = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false); ++ private static final AttributeModifier bw = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false); private static final AttributeModifier DRINKING_SPEED = bz; // Paper - OBFHELPER + private static final DataWatcherObject bx = DataWatcher.a(EntityWitch.class, DataWatcherRegistry.i); +- private int by; ++ private int by; public int getPotionUseTimeLeft() { return by; } public void setPotionUseTimeLeft(int timeLeft) { by = timeLeft; } // Paper - OBFHELPER + private PathfinderGoalNearestHealableRaider bz; + private PathfinderGoalNearestAttackableTargetWitch bA; @@ -56,10 +62,12 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { return SoundEffects.ENTITY_WITCH_DEATH; } -+ public void setDrinkingPotion(boolean drinkingPotion) { s(drinkingPotion); } // Paper - OBFHELPER - public void s(boolean flag) { - this.getDataWatcher().set(EntityWitch.bA, flag); ++ public void setDrinkingPotion(boolean drinkingPotion) { t(drinkingPotion); } // Paper - OBFHELPER + public void t(boolean flag) { + this.getDataWatcher().set(EntityWitch.bx, flag); } + public boolean isDrinkingPotion() { return l(); } // Paper - OBFHELPER public boolean l() { - return (Boolean) this.getDataWatcher().get(EntityWitch.bA); + return (Boolean) this.getDataWatcher().get(EntityWitch.bx); } @@ -121,18 +129,20 @@ public class EntityWitch extends EntityRaider implements IRangedEntity { } @@ -67,13 +67,13 @@ index ff4e73fff3..0b849f37c5 100644 +// attributeinstance.addModifier(EntityWitch.bz); + this.setDrinkingPotion(PotionUtil.addPotionToItemStack(new ItemStack(Items.POTION), potionregistry)); // 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); - AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); - -- attributeinstance.removeModifier(EntityWitch.bz); -- attributeinstance.addModifier(EntityWitch.bz); +- attributeinstance.removeModifier(EntityWitch.bw); +- attributeinstance.addModifier(EntityWitch.bw); } } @@ -86,7 +86,7 @@ index ff4e73fff3..0b849f37c5 100644 + setSlot(EnumItemSlot.MAINHAND, CraftItemStack.asNMSCopy(WitchReadyPotionEvent.process((Witch) getBukkitEntity(), CraftItemStack.asCraftMirror(potion)))); + setPotionUseTimeLeft(getItemInMainHand().getItemUseMaxDuration()); + setDrinkingPotion(true); -+ world.sendSoundEffect(null, locX, locY, locZ, SoundEffects.ENTITY_WITCH_DRINK, getSoundCategory(), 1.0F, 0.8F + random.nextFloat() * 0.4F); ++ world.sendSoundEffect(null, locX(), locY(), locZ(), SoundEffects.ENTITY_WITCH_DRINK, getSoundCategory(), 1.0F, 0.8F + random.nextFloat() * 0.4F); + AttributeInstance attributeinstance = getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); + attributeinstance.removeModifier(EntityWitch.DRINKING_SPEED); + attributeinstance.addModifier(EntityWitch.DRINKING_SPEED); @@ -94,10 +94,10 @@ index ff4e73fff3..0b849f37c5 100644 + // Paper end + @Override - public SoundEffect dV() { + public SoundEffect eq() { return SoundEffects.ENTITY_WITCH_CELEBRATE; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java -index bae107e76e..b43a2bbd5b 100644 +index bae107e76..b43a2bbd5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java @@ -1,12 +1,18 @@ @@ -146,5 +146,5 @@ index bae107e76e..b43a2bbd5b 100644 + // Paper end } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0327-Fix-MC-93764.patch b/Spigot-Server-Patches/0320-Fix-MC-93764.patch similarity index 85% rename from Spigot-Server-Patches/0327-Fix-MC-93764.patch rename to Spigot-Server-Patches/0320-Fix-MC-93764.patch index c06640b216..55cd04a3f5 100644 --- a/Spigot-Server-Patches/0327-Fix-MC-93764.patch +++ b/Spigot-Server-Patches/0320-Fix-MC-93764.patch @@ -1,11 +1,11 @@ -From 2a0f99a82bad43467508e0b49046f76ba3df9e0d Mon Sep 17 00:00:00 2001 +From b38436d03816c855f097ca257d05d9bf16b7ce93 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Fri, 19 Oct 2018 19:38:45 -0500 Subject: [PATCH] Fix MC-93764 diff --git a/src/main/java/net/minecraft/server/WorldProviderTheEnd.java b/src/main/java/net/minecraft/server/WorldProviderTheEnd.java -index 715faef171..b97408cffa 100644 +index 9d4fcf8bc..4b9760709 100644 --- a/src/main/java/net/minecraft/server/WorldProviderTheEnd.java +++ b/src/main/java/net/minecraft/server/WorldProviderTheEnd.java @@ -27,7 +27,7 @@ public class WorldProviderTheEnd extends WorldProvider { @@ -18,5 +18,5 @@ index 715faef171..b97408cffa 100644 @Override -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0328-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0321-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 74% rename from Spigot-Server-Patches/0328-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0321-Add-option-to-prevent-players-from-moving-into-unloa.patch index 6f56dac190..6d01b2d69a 100644 --- a/Spigot-Server-Patches/0328-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0321-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -1,4 +1,4 @@ -From a07c0dd20ed878f0b680301efe4a1389be54f8af Mon Sep 17 00:00:00 2001 +From 50b3ce124cd8ee5a083bbca9b1dfc9ba2e4e0599 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Mon, 22 Oct 2018 17:34:10 +0200 Subject: [PATCH] Add option to prevent players from moving into unloaded @@ -6,12 +6,12 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3b24fbdbf..c7ff264cb 100644 +index fe3e78f36..4bcba0a2b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -434,4 +434,9 @@ public class PaperWorldConfig { - this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick); - log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default"); + waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5); + log("Water over lava flow speed: " + waterOverLavaFlowSpeed); } + + public boolean preventMovingIntoUnloadedChunks = false; @@ -20,10 +20,10 @@ index 3b24fbdbf..c7ff264cb 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a814d8cae..b0fd4d800 100644 +index 77c375f71..ccad0a601 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -348,6 +348,13 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -351,6 +351,13 @@ public class PlayerConnection implements PacketListenerPlayIn { } speed *= 2f; // TODO: Get the speed of the vehicle instead of the player @@ -37,25 +37,25 @@ index a814d8cae..b0fd4d800 100644 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) { // CraftBukkit end PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8); -@@ -892,9 +899,9 @@ public class PlayerConnection implements PacketListenerPlayIn { - double d1 = this.player.locY; - double d2 = this.player.locZ; - double d3 = this.player.locY; -- double d4 = packetplayinflying.a(this.player.locX); -+ double d4 = packetplayinflying.a(this.player.locX);double toX = d4; // Paper - OBFHELPER - double d5 = packetplayinflying.b(this.player.locY); -- double d6 = packetplayinflying.c(this.player.locZ); -+ double d6 = packetplayinflying.c(this.player.locZ);double toZ = d6; // Paper - OBFHELPER +@@ -900,9 +907,9 @@ public class PlayerConnection implements PacketListenerPlayIn { + double d1 = this.player.locY(); + double d2 = this.player.locZ(); + double d3 = this.player.locY(); +- double d4 = packetplayinflying.a(this.player.locX()); ++ double d4 = packetplayinflying.a(this.player.locX());double toX = d4; // Paper - OBFHELPER + double d5 = packetplayinflying.b(this.player.locY()); +- double d6 = packetplayinflying.c(this.player.locZ()); ++ double d6 = packetplayinflying.c(this.player.locZ());double toZ = d6; // Paper - OBFHELPER float f = packetplayinflying.a(this.player.yaw); float f1 = packetplayinflying.b(this.player.pitch); double d7 = d4 - this.l; -@@ -933,6 +940,12 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -941,6 +948,12 @@ public class PlayerConnection implements PacketListenerPlayIn { } else { speed = player.abilities.walkSpeed * 10f; } + // Paper start - Prevent moving into unloaded chunks -+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4)) { -+ this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet()); ++ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX() != toX || this.player.locZ() != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4)) { ++ this.internalTeleport(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch, Collections.emptySet()); + return; + } + // Paper end @@ -63,5 +63,5 @@ index a814d8cae..b0fd4d800 100644 if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean(GameRules.DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isGliding())) { float f2 = this.player.isGliding() ? 300.0F : 100.0F; -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0329-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0322-Reset-players-airTicks-on-respawn.patch similarity index 72% rename from Spigot-Server-Patches/0329-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0322-Reset-players-airTicks-on-respawn.patch index ad996cb41d..101d5e472b 100644 --- a/Spigot-Server-Patches/0329-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0322-Reset-players-airTicks-on-respawn.patch @@ -1,26 +1,26 @@ -From b6859fecadd83ec887760612d07fdc7b8791df9d Mon Sep 17 00:00:00 2001 +From fe691a23845cf0576a6a8e257623a97a102876bb Mon Sep 17 00:00:00 2001 From: GreenMeanie Date: Sat, 20 Oct 2018 22:34:02 -0400 Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4833a9652..19bbcc043 100644 +index 5d31068d7..365984bb8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2323,6 +2323,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2326,6 +2326,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } -+ public int getMaxAirTicks() { return bp(); } // Paper - OBFHELPER - public int bp() { ++ public int getMaxAirTicks() { return bw(); } // Paper - OBFHELPER + public int bw() { return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ad5dcab78..ff398e5ed 100644 +index bdb73b68a..c15543a5c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1869,6 +1869,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1832,6 +1832,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); @@ -29,5 +29,5 @@ index ad5dcab78..ff398e5ed 100644 this.fallDistance = 0; this.foodData = new FoodMetaData(this); -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0330-Strip-private-area-unicode-characters-from-signs.patch b/Spigot-Server-Patches/0323-Strip-private-area-unicode-characters-from-signs.patch similarity index 87% rename from Spigot-Server-Patches/0330-Strip-private-area-unicode-characters-from-signs.patch rename to Spigot-Server-Patches/0323-Strip-private-area-unicode-characters-from-signs.patch index 98944d0070..bebea1236d 100644 --- a/Spigot-Server-Patches/0330-Strip-private-area-unicode-characters-from-signs.patch +++ b/Spigot-Server-Patches/0323-Strip-private-area-unicode-characters-from-signs.patch @@ -1,4 +1,4 @@ -From 1d67c5e8d1a1d69e96fb7c06a41f3942d5afbb9a Mon Sep 17 00:00:00 2001 +From 29a2005d88440d66d642aa51165df37c50873f75 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 23 Oct 2018 20:53:43 -0400 Subject: [PATCH] Strip private area unicode characters from signs @@ -20,11 +20,11 @@ think of no reason to use it. Fixes GH-1571 diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 74fede54e1..1b01792730 100644 +index 03f6ddf00..4c2273497 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java -@@ -14,6 +14,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // - private final String[] k = new String[4]; +@@ -11,6 +11,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // + private final String[] g = new String[4]; private EnumColor color; + // Paper start - Strip invalid unicode from signs on load @@ -35,7 +35,7 @@ index 74fede54e1..1b01792730 100644 public TileEntitySign() { super(TileEntityTypes.SIGN); this.color = EnumColor.BLACK; -@@ -36,6 +41,12 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -33,6 +38,12 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // // CraftBukkit end nbttagcompound.setString("Color", this.color.b()); @@ -48,7 +48,7 @@ index 74fede54e1..1b01792730 100644 return nbttagcompound; } -@@ -45,6 +56,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -42,6 +53,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // super.load(nbttagcompound); this.color = EnumColor.a(nbttagcompound.getString("Color"), EnumColor.BLACK); @@ -60,7 +60,7 @@ index 74fede54e1..1b01792730 100644 // CraftBukkit start - Add an option to convert signs correctly // This is done with a flag instead of all the time because // we have no way to tell whether a sign is from 1.7.10 or 1.8 -@@ -57,6 +73,19 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -54,6 +70,19 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // s = "\"\""; } @@ -80,8 +80,8 @@ index 74fede54e1..1b01792730 100644 try { //IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); // Paper - move down - the old format might throw a json error -@@ -83,6 +112,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // - this.k[i] = null; +@@ -80,6 +109,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // + this.g[i] = null; } + if (ranUnicodeRemoval) this.privateUnicodeRemoved = true; // Paper - Flag to write NBT @@ -89,5 +89,5 @@ index 74fede54e1..1b01792730 100644 public void a(int i, IChatBaseComponent ichatbasecomponent) { -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0331-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0324-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 93% rename from Spigot-Server-Patches/0331-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to Spigot-Server-Patches/0324-Don-t-sleep-after-profile-lookups-if-not-needed.patch index c793484a7e..632477bf62 100644 --- a/Spigot-Server-Patches/0331-Don-t-sleep-after-profile-lookups-if-not-needed.patch +++ b/Spigot-Server-Patches/0324-Don-t-sleep-after-profile-lookups-if-not-needed.patch @@ -1,4 +1,4 @@ -From 2e468b10d36cc2a5c93163aeea1eb27af12ad9be Mon Sep 17 00:00:00 2001 +From d6d90a38d970a46fe21fb229e52ce11f24fb313c Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Oct 2018 20:25:05 -0400 Subject: [PATCH] Don't sleep after profile lookups if not needed @@ -7,7 +7,7 @@ Mojang was sleeping even if we had no more requests to go after the current one finished, resulting in 100ms lost per profile lookup diff --git a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java -index 71e48e87b4..23f1447cfc 100644 +index 71e48e87b..23f1447cf 100644 --- a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java +++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java @@ -42,6 +42,7 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository { @@ -32,5 +32,5 @@ index 71e48e87b4..23f1447cfc 100644 try { Thread.sleep(DELAY_BETWEEN_PAGES); -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0332-Use-more-reasonable-thread-count-default-for-bootstr.patch b/Spigot-Server-Patches/0325-Use-more-reasonable-thread-count-default-for-bootstr.patch similarity index 88% rename from Spigot-Server-Patches/0332-Use-more-reasonable-thread-count-default-for-bootstr.patch rename to Spigot-Server-Patches/0325-Use-more-reasonable-thread-count-default-for-bootstr.patch index f08ff3de12..eeb5b4b9e3 100644 --- a/Spigot-Server-Patches/0332-Use-more-reasonable-thread-count-default-for-bootstr.patch +++ b/Spigot-Server-Patches/0325-Use-more-reasonable-thread-count-default-for-bootstr.patch @@ -1,11 +1,11 @@ -From adfe280f2c3a2298566c1977081665f1e032f17c Mon Sep 17 00:00:00 2001 +From 1d32757ed24265d2a95f3aa707691a352a02b4b2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Oct 2018 23:14:38 -0400 Subject: [PATCH] Use more reasonable thread count default for bootstrap diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java -index 538ed5bb9b..35594821ce 100644 +index 7e224ebef..dc6d03062 100644 --- a/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java @@ -66,7 +66,7 @@ public class SystemUtils { @@ -18,5 +18,5 @@ index 538ed5bb9b..35594821ce 100644 if (i <= 0) { -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0334-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0326-Optimize-World-Time-Updates.patch similarity index 93% rename from Spigot-Server-Patches/0334-Optimize-World-Time-Updates.patch rename to Spigot-Server-Patches/0326-Optimize-World-Time-Updates.patch index e9cff2e107..0a6def5ef8 100644 --- a/Spigot-Server-Patches/0334-Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/0326-Optimize-World-Time-Updates.patch @@ -1,4 +1,4 @@ -From 1fd27d18045b686f8e5af4caf00cce897e9fb136 Mon Sep 17 00:00:00 2001 +From 8088dd2c577b40267e6d2beb9c9ed3919b8e19d7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 2 Nov 2018 23:11:51 -0400 Subject: [PATCH] Optimize World Time Updates @@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 40260dbd48..a7b63ab421 100644 +index 3120f91de..8fc55d31a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1147,12 +1147,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 5 Nov 2018 04:23:51 +0000 Subject: [PATCH] Restore custom InventoryHolder support @@ -17,7 +17,7 @@ will always work as intended in the past, those without will create implementati based inventories. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java -index 9957ed0402..ae280dd40b 100644 +index 9957ed040..ae280dd40 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java @@ -39,10 +39,20 @@ public final class CraftInventoryCreator { @@ -42,5 +42,5 @@ index 9957ed0402..ae280dd40b 100644 } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0336-Use-Vanilla-Minecart-Speeds.patch b/Spigot-Server-Patches/0328-Use-Vanilla-Minecart-Speeds.patch similarity index 85% rename from Spigot-Server-Patches/0336-Use-Vanilla-Minecart-Speeds.patch rename to Spigot-Server-Patches/0328-Use-Vanilla-Minecart-Speeds.patch index 9726745a18..9dcc343c7c 100644 --- a/Spigot-Server-Patches/0336-Use-Vanilla-Minecart-Speeds.patch +++ b/Spigot-Server-Patches/0328-Use-Vanilla-Minecart-Speeds.patch @@ -1,4 +1,4 @@ -From afad9f309b019f52a937784669996c434d9d8c0a Mon Sep 17 00:00:00 2001 +From 0009fc84267605a552dfa51dbc975e2dcb50acea Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 8 Nov 2018 21:33:09 -0500 Subject: [PATCH] Use Vanilla Minecart Speeds @@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds CraftBukkit changed the values on flying speed, restore back to vanilla diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index e1a684b370..6df2930e2d 100644 +index 1b64ad824..4388186db 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -@@ -35,9 +35,9 @@ public abstract class EntityMinecartAbstract extends Entity { +@@ -59,9 +59,9 @@ public abstract class EntityMinecartAbstract extends Entity { private double derailedX = 0.5; private double derailedY = 0.5; private double derailedZ = 0.5; @@ -23,5 +23,5 @@ index e1a684b370..6df2930e2d 100644 // CraftBukkit end -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0337-Fix-SpongeAbsortEvent-handling.patch b/Spigot-Server-Patches/0329-Fix-SpongeAbsortEvent-handling.patch similarity index 95% rename from Spigot-Server-Patches/0337-Fix-SpongeAbsortEvent-handling.patch rename to Spigot-Server-Patches/0329-Fix-SpongeAbsortEvent-handling.patch index e3c2b2f502..fa06912177 100644 --- a/Spigot-Server-Patches/0337-Fix-SpongeAbsortEvent-handling.patch +++ b/Spigot-Server-Patches/0329-Fix-SpongeAbsortEvent-handling.patch @@ -1,4 +1,4 @@ -From baf72ff0e019bc0e5195cebbd153b519f3ed2711 Mon Sep 17 00:00:00 2001 +From 3446daf325b2c2ee999a5dfc9f7e1f0395d074db Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 10 Nov 2018 05:15:21 +0000 Subject: [PATCH] Fix SpongeAbsortEvent handling @@ -6,7 +6,7 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling Only process drops when the block is actually going to be removed diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index f687e86c4..e077359b0 100644 +index 2262a8253..46490a943 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -472,7 +472,7 @@ public class Block implements IMaterial { @@ -37,5 +37,5 @@ index 685a30f3f..9edf937a6 100644 } world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag()); -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0338-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0330-Don-t-allow-digging-into-unloaded-chunks.patch similarity index 86% rename from Spigot-Server-Patches/0338-Don-t-allow-digging-into-unloaded-chunks.patch rename to Spigot-Server-Patches/0330-Don-t-allow-digging-into-unloaded-chunks.patch index 3ec0f6f014..cc7335c12d 100644 --- a/Spigot-Server-Patches/0338-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0330-Don-t-allow-digging-into-unloaded-chunks.patch @@ -1,14 +1,14 @@ -From df1b6feb04b62e6ff414815fdc5746fec3bd584f Mon Sep 17 00:00:00 2001 +From 77a88c318a96133abb83de1f3713a713e95039bb Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 11 Nov 2018 21:01:09 +0000 Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 9eb6982508..45c2777552 100644 +index ccad0a601..d263897da 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1259,6 +1259,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1271,6 +1271,11 @@ public class PlayerConnection implements PacketListenerPlayIn { case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: @@ -21,5 +21,5 @@ index 9eb6982508..45c2777552 100644 return; default: -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0339-Optimize-redstone-algorithm.patch b/Spigot-Server-Patches/0331-Optimize-redstone-algorithm.patch similarity index 99% rename from Spigot-Server-Patches/0339-Optimize-redstone-algorithm.patch rename to Spigot-Server-Patches/0331-Optimize-redstone-algorithm.patch index e578671343..18305eb6bb 100644 --- a/Spigot-Server-Patches/0339-Optimize-redstone-algorithm.patch +++ b/Spigot-Server-Patches/0331-Optimize-redstone-algorithm.patch @@ -1,4 +1,4 @@ -From 0834959b160570b5a53a63d118ae4c460e857aed Mon Sep 17 00:00:00 2001 +From 96fb816d07d1115f2a2dd941c55277d4c248ff14 Mon Sep 17 00:00:00 2001 From: theosib Date: Thu, 27 Sep 2018 01:43:35 -0600 Subject: [PATCH] Optimize redstone algorithm @@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee Just added Bukkit's event system and took a few liberties with dead code and comment misspellings. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c7ff264cb..1ad6d6483 100644 +index 4bcba0a2b..3b1289099 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -439,4 +439,14 @@ public class PaperWorldConfig { @@ -956,7 +956,7 @@ index 000000000..cf5661f1c + } +} diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -index cffb8de4f..337c03d1d 100644 +index 5bf2fc0b3..52a4982ec 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java @@ -1,5 +1,7 @@ @@ -968,7 +968,7 @@ index cffb8de4f..337c03d1d 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -22,8 +24,8 @@ public class BlockRedstoneWire extends Block { - public static final BlockStateInteger POWER = BlockProperties.as; + public static final BlockStateInteger POWER = BlockProperties.at; public static final Map> f = Maps.newEnumMap(ImmutableMap.of(EnumDirection.NORTH, BlockRedstoneWire.NORTH, EnumDirection.EAST, BlockRedstoneWire.EAST, EnumDirection.SOUTH, BlockRedstoneWire.SOUTH, EnumDirection.WEST, BlockRedstoneWire.WEST)); protected static final VoxelShape[] g = new VoxelShape[]{Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)}; - private boolean h = true; @@ -1124,10 +1124,10 @@ index cffb8de4f..337c03d1d 100644 c(iblockdata, world, blockposition); world.a(blockposition, false); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index dc0d89ee6..6189935bd 100644 +index 8e3367435..e8f83627c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -594,6 +594,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -526,6 +526,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } @@ -1135,7 +1135,7 @@ index dc0d89ee6..6189935bd 100644 public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (!this.isClientSide) { IBlockData iblockdata = this.getType(blockposition); -@@ -1358,6 +1359,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -1275,6 +1276,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); } @@ -1144,5 +1144,5 @@ index dc0d89ee6..6189935bd 100644 int i = 0; EnumDirection[] aenumdirection = World.a; -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0340-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0332-force-entity-dismount-during-teleportation.patch similarity index 87% rename from Spigot-Server-Patches/0340-force-entity-dismount-during-teleportation.patch rename to Spigot-Server-Patches/0332-force-entity-dismount-during-teleportation.patch index 443afa398b..411cd6467a 100644 --- a/Spigot-Server-Patches/0340-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0332-force-entity-dismount-during-teleportation.patch @@ -1,4 +1,4 @@ -From 6e02846e06a944ed0bd1612330a2edee3e68a319 Mon Sep 17 00:00:00 2001 +From 62b0d0ae1bef673ce8fc4c925dea50a12b56701c Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 15 Nov 2018 13:38:37 +0000 Subject: [PATCH] force entity dismount during teleportation @@ -20,10 +20,10 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 19bbcc043..75da08596 100644 +index 365984bb8..0f2480521 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2045,12 +2045,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2027,12 +2027,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } @@ -41,7 +41,7 @@ index 19bbcc043..75da08596 100644 } } -@@ -2101,7 +2104,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2083,7 +2086,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return true; // CraftBukkit } @@ -53,7 +53,7 @@ index 19bbcc043..75da08596 100644 if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { -@@ -2111,7 +2117,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2093,7 +2099,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { VehicleExitEvent event = new VehicleExitEvent( (Vehicle) getBukkitEntity(), @@ -62,7 +62,7 @@ index 19bbcc043..75da08596 100644 ); Bukkit.getPluginManager().callEvent(event); CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); -@@ -2122,7 +2128,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2104,7 +2110,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end // Spigot start @@ -72,10 +72,10 @@ index 19bbcc043..75da08596 100644 if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 2342ea481..8a66b1dc5 100644 +index 78e48f478..4bb24de9d 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -953,9 +953,11 @@ public abstract class EntityHuman extends EntityLiving { +@@ -968,9 +968,11 @@ public abstract class EntityHuman extends EntityLiving { return -0.35D; } @@ -91,11 +91,11 @@ index 2342ea481..8a66b1dc5 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1e53af2cc..d23968a7c 100644 +index c6bd68919..317321395 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2673,11 +2673,13 @@ public abstract class EntityLiving extends Entity { - return ((Byte) this.datawatcher.get(EntityLiving.ar) & 4) != 0; +@@ -2732,11 +2732,13 @@ public abstract class EntityLiving extends Entity { + return ((Byte) this.datawatcher.get(EntityLiving.ao) & 4) != 0; } - @Override @@ -109,13 +109,13 @@ index 1e53af2cc..d23968a7c 100644 - super.stopRiding(); + super.stopRiding(suppressCancellation); // Paper - suppress if (entity != null && entity != this.getVehicle() && !this.world.isClientSide) { - this.B(entity); + this.a(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 517bbf602..8eb662cef 100644 +index c15543a5c..f41fd576d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1002,11 +1002,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -985,11 +985,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } @@ -133,5 +133,5 @@ index 517bbf602..8eb662cef 100644 if (entity1 != entity && this.playerConnection != null) { -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0341-Book-Size-Limits.patch b/Spigot-Server-Patches/0333-Book-Size-Limits.patch similarity index 93% rename from Spigot-Server-Patches/0341-Book-Size-Limits.patch rename to Spigot-Server-Patches/0333-Book-Size-Limits.patch index 8fc5894f5b..0f3ba3fe04 100644 --- a/Spigot-Server-Patches/0341-Book-Size-Limits.patch +++ b/Spigot-Server-Patches/0333-Book-Size-Limits.patch @@ -1,4 +1,4 @@ -From 81fc0d1616ca012b5475bedecbe3755cacb579ca Mon Sep 17 00:00:00 2001 +From af6bf25c3137de313e090306d566b020ac70ef46 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 16 Nov 2018 23:08:50 -0500 Subject: [PATCH] Book Size Limits @@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 63d8602927..8feb0efdcd 100644 +index 7e85a0224..30f35304a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -375,4 +375,11 @@ public class PaperConfig { +@@ -351,4 +351,11 @@ public class PaperConfig { velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8); } } @@ -22,7 +22,7 @@ index 63d8602927..8feb0efdcd 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 45c2777552..04b3791f36 100644 +index d263897da..e5db2de26 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -14,6 +14,7 @@ import java.util.Iterator; @@ -33,7 +33,7 @@ index 45c2777552..04b3791f36 100644 import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -787,6 +788,42 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -795,6 +796,42 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInBEdit packetplayinbedit) { @@ -73,9 +73,9 @@ index 45c2777552..04b3791f36 100644 + } + } + // Paper end - // CraftBukkit start PlayerConnectionUtils.ensureMainThread(packetplayinbedit, this, this.player.getWorldServer()); + // CraftBukkit start if (this.lastBookTick + 20 > MinecraftServer.currentTick) { -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0333-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch b/Spigot-Server-Patches/0333-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch deleted file mode 100644 index 9a207275eb..0000000000 --- a/Spigot-Server-Patches/0333-MC-136865-Use-valid-item-for-enchantment-checks-on-b.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e8401927cb5951f9f934619dc3b1afa8be467dab Mon Sep 17 00:00:00 2001 -From: MisterVector -Date: Thu, 1 Nov 2018 14:50:05 -0700 -Subject: [PATCH] MC-136865: Use valid item for enchantment checks on block - break - -When an itemstack runs out of durability, the amount is reduced to -0 which then marks the item as invalid. This causes the last unit -of durability to not apply enchantments as the enchantment level -check sees the item as a dud. - -keep the clone of the item used to a non empty value so it represents -the item used. - -diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index a898535d1b..f953bd7ceb 100644 ---- a/src/main/java/net/minecraft/server/PlayerInteractManager.java -+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -352,9 +352,10 @@ public class PlayerInteractManager { - ItemStack itemstack = this.player.getItemInMainHand(); - boolean flag1 = this.player.hasBlock(iblockdata); - -+ ItemStack itemstack1 = flag && flag1 && event.isDropItems() && !itemstack.isEmpty() ? itemstack.cloneItemStack() : ItemStack.a; // Paper - MC-136865 - clone before use - itemstack.a(this.world, iblockdata, blockposition, this.player); - if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items -- ItemStack itemstack1 = itemstack.isEmpty() ? ItemStack.a : itemstack.cloneItemStack(); -+ //ItemStack itemstack1 = itemstack.isEmpty() ? ItemStack.a : itemstack.cloneItemStack(); // Paper - MC-136865 - move up - - block.a(this.world, this.player, blockposition, iblockdata, tileentity, itemstack1); - } --- -2.22.0 - diff --git a/Spigot-Server-Patches/0342-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0334-Make-the-default-permission-message-configurable.patch similarity index 87% rename from Spigot-Server-Patches/0342-Make-the-default-permission-message-configurable.patch rename to Spigot-Server-Patches/0334-Make-the-default-permission-message-configurable.patch index 0ea1b184e7..c646f4762a 100644 --- a/Spigot-Server-Patches/0342-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0334-Make-the-default-permission-message-configurable.patch @@ -1,14 +1,14 @@ -From baf1582d76a61343a81f2fb410f50b28e5e74d46 Mon Sep 17 00:00:00 2001 +From ebbe338096c77f671dec0bb6d35054d802bcddb8 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 18 Nov 2018 19:49:56 +0000 Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 8feb0efdcd..81987e4ad9 100644 +index 30f35304a..546a1cfe0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -21,6 +21,7 @@ import java.util.regex.Pattern; +@@ -20,6 +20,7 @@ import java.util.regex.Pattern; import com.google.common.collect.Lists; import net.minecraft.server.MinecraftServer; import org.bukkit.Bukkit; @@ -16,7 +16,7 @@ index 8feb0efdcd..81987e4ad9 100644 import org.bukkit.command.Command; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; -@@ -281,6 +282,11 @@ public class PaperConfig { +@@ -280,6 +281,11 @@ public class PaperConfig { connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage); } @@ -29,10 +29,10 @@ index 8feb0efdcd..81987e4ad9 100644 private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index dfa78653aa..b89486beb1 100644 +index 7e810e008..58b343259 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2138,6 +2138,11 @@ public final class CraftServer implements Server { +@@ -2141,6 +2141,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } @@ -45,5 +45,5 @@ index dfa78653aa..b89486beb1 100644 public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) { return createProfile(uuid, null); -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0343-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0335-Add-more-Zombie-API.patch similarity index 88% rename from Spigot-Server-Patches/0343-Add-more-Zombie-API.patch rename to Spigot-Server-Patches/0335-Add-more-Zombie-API.patch index 2a22e5bab6..e2bd490144 100644 --- a/Spigot-Server-Patches/0343-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0335-Add-more-Zombie-API.patch @@ -1,14 +1,14 @@ -From f907156715854ece053295bfc0ec77b0b0ee8ea6 Mon Sep 17 00:00:00 2001 +From fc21da59d50e0969a0d038aaf58676bbaa01f4ef Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 04:29:59 -0500 Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 09112a8b0..d00e99cdb 100644 +index cbaed08f5..6bad1687f 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1247,6 +1247,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1253,6 +1253,8 @@ public abstract class EntityInsentient extends EntityLiving { this.datawatcher.set(EntityInsentient.b, flag ? (byte) (b0 | 2) : (byte) (b0 & -3)); } @@ -18,11 +18,11 @@ index 09112a8b0..d00e99cdb 100644 byte b0 = (Byte) this.datawatcher.get(EntityInsentient.b); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 832375f27..cdaa7f636 100644 +index c8e4dcdac..1c2c05ae3 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -33,6 +33,7 @@ public class EntityZombie extends EntityMonster { - private int bF; + private int bC; public int drownedConversionTime; private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field + private boolean shouldBurnInDay = true; // Paper @@ -48,15 +48,15 @@ index 832375f27..cdaa7f636 100644 + } + // Paper end + - protected void ea() { + protected void ev() { this.b(EntityTypes.DROWNED); this.world.a((EntityHuman) null, 1040, new BlockPosition(this), 0); -@@ -258,10 +267,17 @@ public class EntityZombie extends EntityMonster { +@@ -292,10 +301,17 @@ public class EntityZombie extends EntityMonster { } } -+ public boolean shouldBurnInDay() { return I_(); } // Paper - OBFHELPER - protected boolean I_() { ++ public boolean shouldBurnInDay() { return K_(); } // Paper - OBFHELPER + protected boolean K_() { - return true; + return shouldBurnInDay; } @@ -70,15 +70,15 @@ index 832375f27..cdaa7f636 100644 @Override public boolean damageEntity(DamageSource damagesource, float f) { if (super.damageEntity(damagesource, f)) { -@@ -379,6 +395,7 @@ public class EntityZombie extends EntityMonster { - nbttagcompound.setBoolean("CanBreakDoors", this.ed()); - nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bF : -1); +@@ -413,6 +429,7 @@ public class EntityZombie extends EntityMonster { + nbttagcompound.setBoolean("CanBreakDoors", this.ey()); + nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bC : -1); nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1); + nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper } @Override -@@ -393,7 +410,11 @@ public class EntityZombie extends EntityMonster { +@@ -427,7 +444,11 @@ public class EntityZombie extends EntityMonster { if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) { this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime")); } @@ -138,5 +138,5 @@ index 0429cf020..c4320dbb6 100644 + // Paper end } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0344-Prevent-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/0336-Prevent-rayTrace-from-loading-chunks.patch similarity index 93% rename from Spigot-Server-Patches/0344-Prevent-rayTrace-from-loading-chunks.patch rename to Spigot-Server-Patches/0336-Prevent-rayTrace-from-loading-chunks.patch index 54a64c68db..beffd0bb5f 100644 --- a/Spigot-Server-Patches/0344-Prevent-rayTrace-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0336-Prevent-rayTrace-from-loading-chunks.patch @@ -1,4 +1,4 @@ -From ff3dab598aaddf30e1de92362c108cefd4556caf Mon Sep 17 00:00:00 2001 +From 28c7246755b0d632c7fb7ced86c8d915acf5cad6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 26 Nov 2018 19:21:58 -0500 Subject: [PATCH] Prevent rayTrace from loading chunks @@ -7,7 +7,7 @@ ray tracing into an unloaded chunk should be treated as a miss this saves a ton of lag for when AI tries to raytrace near unloaded chunks. diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java -index 0dff023529..29cdc00875 100644 +index 0dff02352..29cdc0087 100644 --- a/src/main/java/net/minecraft/server/IBlockAccess.java +++ b/src/main/java/net/minecraft/server/IBlockAccess.java @@ -41,7 +41,15 @@ public interface IBlockAccess { @@ -28,5 +28,5 @@ index 0dff023529..29cdc00875 100644 Vec3D vec3d = raytrace1.b(); Vec3D vec3d1 = raytrace1.a(); -- -2.22.1 +2.17.1 diff --git a/Spigot-Server-Patches/0345-Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/0337-Handle-Large-Packets-disconnecting-client.patch similarity index 91% rename from Spigot-Server-Patches/0345-Handle-Large-Packets-disconnecting-client.patch rename to Spigot-Server-Patches/0337-Handle-Large-Packets-disconnecting-client.patch index 05129a6631..b02c4c45e0 100644 --- a/Spigot-Server-Patches/0345-Handle-Large-Packets-disconnecting-client.patch +++ b/Spigot-Server-Patches/0337-Handle-Large-Packets-disconnecting-client.patch @@ -1,4 +1,4 @@ -From b99dd3033f3933d54f796e9b0deabf828e7380b4 Mon Sep 17 00:00:00 2001 +From 1489b2b551819fbd5dc80491d34ad50655279569 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 27 Nov 2018 21:18:06 -0500 Subject: [PATCH] Handle Large Packets disconnecting client @@ -7,7 +7,7 @@ If a players inventory is too big to send in a single packet, split the inventory set into multiple packets instead. diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 046196d54d..d4aad8a5b7 100644 +index 046196d54..d4aad8a5b 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -97,6 +97,15 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -27,7 +27,7 @@ index 046196d54d..d4aad8a5b7 100644 NetworkManager.LOGGER.debug("Skipping packet due to errors", throwable.getCause()); } else { diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java -index 601d4d0fa2..2d8e6a2f4a 100644 +index 601d4d0fa..2d8e6a2f4 100644 --- a/src/main/java/net/minecraft/server/Packet.java +++ b/src/main/java/net/minecraft/server/Packet.java @@ -10,6 +10,12 @@ public interface Packet { @@ -44,7 +44,7 @@ index 601d4d0fa2..2d8e6a2f4a 100644 return false; } diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index 63c4dbd327..b0cfef52cb 100644 +index 63c4dbd32..b0cfef52c 100644 --- a/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java @@ -49,7 +49,31 @@ public class PacketEncoder extends MessageToByteEncoder> { @@ -80,20 +80,20 @@ index 63c4dbd327..b0cfef52cb 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index d19a30ad87..58eccd9c63 100644 +index 1fcbbd698..a0b87f89d 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -@@ -68,7 +68,7 @@ public class PacketPlayOutMapChunk implements Packet { - this.d = packetdataserializer.l(); +@@ -79,7 +79,7 @@ public class PacketPlayOutMapChunk implements Packet { + int i = packetdataserializer.i(); - if (i > 2097152) { + if (i > 2097152) { // Paper - if this changes, update PacketEncoder throw new RuntimeException("Chunk Packet trying to allocate too much memory on read."); } else { - this.e = new byte[i]; + this.f = new byte[i]; diff --git a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java -index f7c3655671..631234324d 100644 +index f7c365567..631234324 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java @@ -9,6 +9,15 @@ public class PacketPlayOutWindowItems implements Packet { @@ -113,5 +113,5 @@ index f7c3655671..631234324d 100644 public PacketPlayOutWindowItems(int i, NonNullList nonnulllist) { -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0346-Lazy-init-world-storage-in-CraftOfflinePlayer.patch b/Spigot-Server-Patches/0338-Lazy-init-world-storage-in-CraftOfflinePlayer.patch similarity index 96% rename from Spigot-Server-Patches/0346-Lazy-init-world-storage-in-CraftOfflinePlayer.patch rename to Spigot-Server-Patches/0338-Lazy-init-world-storage-in-CraftOfflinePlayer.patch index 4d6ea2639b..588b031255 100644 --- a/Spigot-Server-Patches/0346-Lazy-init-world-storage-in-CraftOfflinePlayer.patch +++ b/Spigot-Server-Patches/0338-Lazy-init-world-storage-in-CraftOfflinePlayer.patch @@ -1,4 +1,4 @@ -From 362f1022d736a4af384ee4d726362fcfa97f11d2 Mon Sep 17 00:00:00 2001 +From 9d1b272b4ccf35d5f84c79ca400de67e0a6b3d3b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 11 Dec 2018 22:25:07 -0500 Subject: [PATCH] Lazy init world storage in CraftOfflinePlayer @@ -8,7 +8,7 @@ worlds loaded. This is typically a rare occurrence but probably one that should be covered as best we can. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -index 6a448c02ec..c1ef1c950d 100644 +index 6a448c02e..c1ef1c950 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java @@ -25,12 +25,12 @@ import org.bukkit.plugin.Plugin; @@ -61,5 +61,5 @@ index 6a448c02ec..c1ef1c950d 100644 @Override -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0347-Add-PlayerConnectionCloseEvent.patch b/Spigot-Server-Patches/0339-Add-PlayerConnectionCloseEvent.patch similarity index 97% rename from Spigot-Server-Patches/0347-Add-PlayerConnectionCloseEvent.patch rename to Spigot-Server-Patches/0339-Add-PlayerConnectionCloseEvent.patch index 2289d55fc1..620f1132b9 100644 --- a/Spigot-Server-Patches/0347-Add-PlayerConnectionCloseEvent.patch +++ b/Spigot-Server-Patches/0339-Add-PlayerConnectionCloseEvent.patch @@ -1,4 +1,4 @@ -From 2371a7cce1890e7c955d0dff71803eacbcaf0c16 Mon Sep 17 00:00:00 2001 +From 95881a068c457b9003d460c0c67d42489eb36a26 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 7 Oct 2018 12:05:28 -0700 Subject: [PATCH] Add PlayerConnectionCloseEvent @@ -34,7 +34,7 @@ how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent is undefined. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 41b2c90c3a..a8773037e5 100644 +index c3d57461d..a6b22254a 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -35,9 +35,9 @@ public class LoginListener implements PacketLoginInListener { @@ -50,7 +50,7 @@ index 41b2c90c3a..a8773037e5 100644 private SecretKey loginKey; private EntityPlayer l; diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index d4aad8a5b7..b1dededc15 100644 +index d4aad8a5b..b1dededc1 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -336,6 +336,26 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -81,5 +81,5 @@ index d4aad8a5b7..b1dededc15 100644 } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0348-Prevent-Enderman-from-loading-chunks.patch b/Spigot-Server-Patches/0340-Prevent-Enderman-from-loading-chunks.patch similarity index 67% rename from Spigot-Server-Patches/0348-Prevent-Enderman-from-loading-chunks.patch rename to Spigot-Server-Patches/0340-Prevent-Enderman-from-loading-chunks.patch index fee2280793..879b3140a6 100644 --- a/Spigot-Server-Patches/0348-Prevent-Enderman-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0340-Prevent-Enderman-from-loading-chunks.patch @@ -1,26 +1,26 @@ -From 27a2999cffd04b8c7d4310a2aba040bad333a70a Mon Sep 17 00:00:00 2001 +From 861bb451159a101b782480f03f81c74306d73d5b Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 18 Dec 2018 02:15:08 +0000 Subject: [PATCH] Prevent Enderman from loading chunks diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java -index 2d29da8560..a94ed1ae08 100644 +index 9783576e3..13507edbc 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java -@@ -325,7 +325,8 @@ public class EntityEnderman extends EntityMonster { - int j = MathHelper.floor(this.enderman.locY + random.nextDouble() * 3.0D); - int k = MathHelper.floor(this.enderman.locZ - 2.0D + random.nextDouble() * 4.0D); +@@ -344,7 +344,8 @@ public class EntityEnderman extends EntityMonster { + int j = MathHelper.floor(this.enderman.locY() + random.nextDouble() * 3.0D); + int k = MathHelper.floor(this.enderman.locZ() - 2.0D + random.nextDouble() * 4.0D); BlockPosition blockposition = new BlockPosition(i, j, k); - IBlockData iblockdata = world.getType(blockposition); + IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper + if (iblockdata == null) return; // Paper Block block = iblockdata.getBlock(); - Vec3D vec3d = new Vec3D((double) MathHelper.floor(this.enderman.locX) + 0.5D, (double) j + 0.5D, (double) MathHelper.floor(this.enderman.locZ) + 0.5D); + Vec3D vec3d = new Vec3D((double) MathHelper.floor(this.enderman.locX()) + 0.5D, (double) j + 0.5D, (double) MathHelper.floor(this.enderman.locZ()) + 0.5D); Vec3D vec3d1 = new Vec3D((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D); -@@ -367,7 +368,8 @@ public class EntityEnderman extends EntityMonster { - int j = MathHelper.floor(this.a.locY + random.nextDouble() * 2.0D); - int k = MathHelper.floor(this.a.locZ - 1.0D + random.nextDouble() * 2.0D); +@@ -386,7 +387,8 @@ public class EntityEnderman extends EntityMonster { + int j = MathHelper.floor(this.a.locY() + random.nextDouble() * 2.0D); + int k = MathHelper.floor(this.a.locZ() - 1.0D + random.nextDouble() * 2.0D); BlockPosition blockposition = new BlockPosition(i, j, k); - IBlockData iblockdata = world.getType(blockposition); + IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper @@ -29,5 +29,5 @@ index 2d29da8560..a94ed1ae08 100644 IBlockData iblockdata1 = world.getType(blockposition1); IBlockData iblockdata2 = Block.getValidBlockForPosition(getEnderman().getCarried(), getEnderman().world, blockposition); // Paper - Fix MC-124320 -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0349-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0341-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 91% rename from Spigot-Server-Patches/0349-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to Spigot-Server-Patches/0341-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 741612d293..268ec3e5bf 100644 --- a/Spigot-Server-Patches/0349-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0341-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -1,4 +1,4 @@ -From fbf880a67801f0006d7f2a5b73b0703723cee401 Mon Sep 17 00:00:00 2001 +From b4e64a666d6bf724ad14dd41c6a2dd510080066d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Jan 2019 00:35:43 -0600 Subject: [PATCH] Add APIs to replace OfflinePlayer#getLastPlayed @@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and documented as to their purpose. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d3886a6e04..2d4021784f 100644 +index f41fd576d..1665a302a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -75,6 +75,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -28,7 +28,7 @@ index d3886a6e04..2d4021784f 100644 public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 049d702cb9..52aa83f51f 100644 +index e46436623..659ce2181 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -94,6 +94,7 @@ public abstract class PlayerList { @@ -38,9 +38,9 @@ index 049d702cb9..52aa83f51f 100644 + entityplayer.loginTime = System.currentTimeMillis(); // Paper GameProfile gameprofile = entityplayer.getProfile(); UserCache usercache = this.server.getUserCache(); - GameProfile gameprofile1 = usercache.a(gameprofile.getId()); + GameProfile gameprofile1 = usercache.getProfile(gameprofile.getId()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -index c1ef1c950d..3824180ee5 100644 +index c1ef1c950..3824180ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java @@ -256,6 +256,61 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa @@ -106,10 +106,10 @@ index c1ef1c950d..3824180ee5 100644 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3d60e98749..ea4e569e5a 100644 +index ad70bd5ba..04fc8e233 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -140,6 +140,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -139,6 +139,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index 3d60e98749..ea4e569e5a 100644 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1373,6 +1374,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1357,6 +1358,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 3d60e98749..ea4e569e5a 100644 public void readExtraData(NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.hasKey("bukkit")) { -@@ -1395,6 +1408,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1379,6 +1392,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(NBTTagCompound nbttagcompound) { @@ -145,7 +145,7 @@ index 3d60e98749..ea4e569e5a 100644 if (!nbttagcompound.hasKey("bukkit")) { nbttagcompound.set("bukkit", new NBTTagCompound()); } -@@ -1409,6 +1424,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1393,6 +1408,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.setLong("firstPlayed", getFirstPlayed()); data.setLong("lastPlayed", System.currentTimeMillis()); data.setString("lastKnownName", handle.getName()); @@ -163,5 +163,5 @@ index 3d60e98749..ea4e569e5a 100644 @Override -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0350-Fix-PlayerEditBookEvent.patch b/Spigot-Server-Patches/0342-Fix-PlayerEditBookEvent.patch similarity index 90% rename from Spigot-Server-Patches/0350-Fix-PlayerEditBookEvent.patch rename to Spigot-Server-Patches/0342-Fix-PlayerEditBookEvent.patch index a59c26a28a..477a49689c 100644 --- a/Spigot-Server-Patches/0350-Fix-PlayerEditBookEvent.patch +++ b/Spigot-Server-Patches/0342-Fix-PlayerEditBookEvent.patch @@ -1,4 +1,4 @@ -From 44ae12a7d53c10c379fa90acf6bca14230a83b4a Mon Sep 17 00:00:00 2001 +From 0838a4fbce101df7c999ae363a80966f4254b181 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Sun, 16 Dec 2018 13:07:33 +1100 Subject: [PATCH] Fix PlayerEditBookEvent @@ -10,10 +10,10 @@ it impossible to properly cancel the event or modify the book meta cancelled writing diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 04b3791f36..4a1565f4f7 100644 +index e5db2de26..c3feccbd6 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -863,9 +863,11 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -871,9 +871,11 @@ public class PlayerConnection implements PacketListenerPlayIn { itemstack2.a("pages", (NBTBase) nbttaglist); this.player.a(packetplayinbedit.d(), CraftEventFactory.handleEditBookEvent(player, enumitemslot, itemstack1, itemstack2)); // CraftBukkit } else { @@ -29,5 +29,5 @@ index 04b3791f36..4a1565f4f7 100644 } -- -2.22.0 +2.17.1 diff --git a/Spigot-Server-Patches/0351-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/0343-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 76% rename from Spigot-Server-Patches/0351-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to Spigot-Server-Patches/0343-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index 6f3df30bac..7311c76aa5 100644 --- a/Spigot-Server-Patches/0351-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/Spigot-Server-Patches/0343-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -1,16 +1,16 @@ -From 106f0064d5e764347eee78651e53800010b5359c Mon Sep 17 00:00:00 2001 +From 30cdc7bfec8a09f2ea963c30f8bb5eb46456e1a7 Mon Sep 17 00:00:00 2001 From: connorhartley Date: Mon, 7 Jan 2019 14:43:48 -0600 Subject: [PATCH] Workaround for vehicle tracking issue on disconnect diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3897411e7..21b02aeca 100644 +index 1665a302a..cc9e69651 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1292,6 +1292,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1261,6 +1261,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void n() { - this.ct = true; + this.cq = true; this.ejectPassengers(); + + // Paper start - Workaround an issue where the vehicle doesn't track the passenger disconnection dismount. @@ -20,8 +20,8 @@ index 3897411e7..21b02aeca 100644 + // Paper end + if (this.isSleeping()) { - this.wakeup(true, false, false); + this.wakeup(true, false); } -- -2.23.0 +2.17.1 diff --git a/Spigot-Server-Patches/0352-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch b/Spigot-Server-Patches/0344-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch similarity index 90% rename from Spigot-Server-Patches/0352-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch rename to Spigot-Server-Patches/0344-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch index 7356c9f2cf..18eb2295a6 100644 --- a/Spigot-Server-Patches/0352-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch +++ b/Spigot-Server-Patches/0344-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch @@ -1,4 +1,4 @@ -From cc9dd8d543e2fe21fb8323e6e61f5a69511c9717 Mon Sep 17 00:00:00 2001 +From 111d5782c3a945f09b0deeaba4f2bc486ef688ea Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 31 Jan 2019 16:33:36 -0500 Subject: [PATCH] Fire BlockPistonRetractEvent for all empty pistons @@ -24,10 +24,10 @@ Instead we opt to remove the check entirely so that the event fires for all piston types. diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java -index e883c7ac98..de804348f3 100644 +index 1170a2810..b29525c40 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java -@@ -121,7 +121,7 @@ public class BlockPiston extends BlockDirectional { +@@ -122,7 +122,7 @@ public class BlockPiston extends BlockDirectional { } // CraftBukkit start @@ -36,7 +36,7 @@ index e883c7ac98..de804348f3 100644 org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.of(), CraftBlock.notchToBlockFace(enumdirection)); world.getServer().getPluginManager().callEvent(event); -@@ -129,7 +129,7 @@ public class BlockPiston extends BlockDirectional { +@@ -130,7 +130,7 @@ public class BlockPiston extends BlockDirectional { if (event.isCancelled()) { return; } @@ -44,7 +44,7 @@ index e883c7ac98..de804348f3 100644 + //} // Paper // PAIL: checkME - what happened to setTypeAndData? // CraftBukkit end - world.playBlockAction(blockposition, this, b0, enumdirection.a()); + world.playBlockAction(blockposition, this, b0, enumdirection.b()); -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0353-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0345-Block-Entity-remove-from-being-called-on-Players.patch similarity index 87% rename from Spigot-Server-Patches/0353-Block-Entity-remove-from-being-called-on-Players.patch rename to Spigot-Server-Patches/0345-Block-Entity-remove-from-being-called-on-Players.patch index 83e63c292a..68f99cb7de 100644 --- a/Spigot-Server-Patches/0353-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0345-Block-Entity-remove-from-being-called-on-Players.patch @@ -1,4 +1,4 @@ -From 58a6589c6b293c796a0b9f5ae7840bda4912a497 Mon Sep 17 00:00:00 2001 +From 830cd5873ebed9e73f0216f8fedf7d2bd04224e4 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 4 Feb 2019 23:33:24 -0500 Subject: [PATCH] Block Entity#remove from being called on Players @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ea4e569e5a..15c874fc82 100644 +index 04fc8e233..4b847ddd8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1974,6 +1974,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1958,6 +1958,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetCooldown(); } @@ -28,9 +28,9 @@ index ea4e569e5a..15c874fc82 100644 + super.remove(); + } + } - //Paper end + // Paper end // Spigot start -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0355-BlockDestroyEvent.patch b/Spigot-Server-Patches/0346-BlockDestroyEvent.patch similarity index 90% rename from Spigot-Server-Patches/0355-BlockDestroyEvent.patch rename to Spigot-Server-Patches/0346-BlockDestroyEvent.patch index b7fb22d8b0..9835f80cb0 100644 --- a/Spigot-Server-Patches/0355-BlockDestroyEvent.patch +++ b/Spigot-Server-Patches/0346-BlockDestroyEvent.patch @@ -1,4 +1,4 @@ -From 5cf46619cee7f54e790731dc27455a63ed09046a Mon Sep 17 00:00:00 2001 +From 5520641b69e980691db06799793a50b52fd497ca Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 6 Feb 2019 00:20:33 -0500 Subject: [PATCH] BlockDestroyEvent @@ -11,10 +11,10 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ef561cd95b..dad0c893fd 100644 +index e8f83627c..61a3ddc4d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -524,8 +524,20 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -456,8 +456,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return false; } else { Fluid fluid = this.getFluid(blockposition); @@ -37,5 +37,5 @@ index ef561cd95b..dad0c893fd 100644 TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? this.getTileEntity(blockposition) : null; -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0356-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch b/Spigot-Server-Patches/0347-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch similarity index 96% rename from Spigot-Server-Patches/0356-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch rename to Spigot-Server-Patches/0347-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch index 966bee56d8..956259f31a 100644 --- a/Spigot-Server-Patches/0356-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch +++ b/Spigot-Server-Patches/0347-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch @@ -1,4 +1,4 @@ -From b5b1f6e3dc91f247f2ad51aaeb653c27366f0644 Mon Sep 17 00:00:00 2001 +From 307884933b37b55fe6d6817fc76c784338ae9fc6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Jan 2019 00:08:15 -0500 Subject: [PATCH] Fix Custom Shapeless Custom Crafting Recipes @@ -10,7 +10,7 @@ This made the Bukkit RecipeChoice API not work for Shapeless. This reimplements vanilla logic using the same test logic as Shaped diff --git a/src/main/java/net/minecraft/server/ShapelessRecipes.java b/src/main/java/net/minecraft/server/ShapelessRecipes.java -index 070fc1e3ec..691e697d68 100644 +index fe03a35cc..fb481e658 100644 --- a/src/main/java/net/minecraft/server/ShapelessRecipes.java +++ b/src/main/java/net/minecraft/server/ShapelessRecipes.java @@ -63,16 +63,46 @@ public class ShapelessRecipes implements RecipeCrafting { @@ -64,5 +64,5 @@ index 070fc1e3ec..691e697d68 100644 public ItemStack a(InventoryCrafting inventorycrafting) { -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0357-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0348-Fix-sign-edit-memory-leak.patch similarity index 82% rename from Spigot-Server-Patches/0357-Fix-sign-edit-memory-leak.patch rename to Spigot-Server-Patches/0348-Fix-sign-edit-memory-leak.patch index f2c6fd1316..38f590022c 100644 --- a/Spigot-Server-Patches/0357-Fix-sign-edit-memory-leak.patch +++ b/Spigot-Server-Patches/0348-Fix-sign-edit-memory-leak.patch @@ -1,4 +1,4 @@ -From beebdba19e6511374001cd8844b683177acca066 Mon Sep 17 00:00:00 2001 +From 69e589820919b6e3f2c4d15ac01e7809e34d2542 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 Feb 2019 00:15:28 -0500 Subject: [PATCH] Fix sign edit memory leak @@ -6,10 +6,10 @@ Subject: [PATCH] Fix sign edit memory leak when a player edits a sign, a reference to their Entity is never cleand up. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4a1565f4f7..6030766099 100644 +index c3feccbd6..c54e1c9a0 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2535,7 +2535,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2545,7 +2545,7 @@ public class PlayerConnection implements PacketListenerPlayIn { TileEntitySign tileentitysign = (TileEntitySign) tileentity; @@ -19,10 +19,10 @@ index 4a1565f4f7..6030766099 100644 this.sendPacket(tileentity.getUpdatePacket()); // CraftBukkit return; diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index 1b01792730..c7aa3b350a 100644 +index 4c2273497..f051f2d3c 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java -@@ -17,6 +17,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -14,6 +14,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // // Paper start - Strip invalid unicode from signs on load private static final boolean keepInvalidUnicode = Boolean.getBoolean("Paper.keepInvalidUnicode"); // Allow people to keep their bad unicode if they really want it private boolean privateUnicodeRemoved = false; @@ -30,18 +30,18 @@ index 1b01792730..c7aa3b350a 100644 // Paper end public TileEntitySign() { -@@ -141,7 +142,10 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -138,7 +139,10 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // } public void a(EntityHuman entityhuman) { -- this.j = entityhuman; +- this.c = entityhuman; + // Paper start -+ //this.g = entityhuman; ++ //this.c = entityhuman; + signEditor = entityhuman != null ? entityhuman.getUniqueID() : null; + // Paper end } public EntityHuman f() { -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0358-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0349-Limit-Client-Sign-length-more.patch similarity index 94% rename from Spigot-Server-Patches/0358-Limit-Client-Sign-length-more.patch rename to Spigot-Server-Patches/0349-Limit-Client-Sign-length-more.patch index e75f5792ff..aff92dd8ae 100644 --- a/Spigot-Server-Patches/0358-Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/0349-Limit-Client-Sign-length-more.patch @@ -1,4 +1,4 @@ -From a1a2b52dc73803c37e1cdfc526200f9dc242593e Mon Sep 17 00:00:00 2001 +From 885df137b3ddc82c61dd104a09c06484a77ee036 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Feb 2019 22:18:40 -0500 Subject: [PATCH] Limit Client Sign length more @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6030766099..b030269f0a 100644 +index c54e1c9a0..bd2ee459f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -103,6 +103,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -33,7 +33,7 @@ index 6030766099..b030269f0a 100644 private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { -@@ -2551,6 +2552,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2561,6 +2562,15 @@ public class PlayerConnection implements PacketListenerPlayIn { String[] lines = new String[4]; for (int i = 0; i < astring.length; ++i) { @@ -50,5 +50,5 @@ index 6030766099..b030269f0a 100644 } SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0359-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/Spigot-Server-Patches/0350-Don-t-check-ConvertSigns-boolean-every-sign-save.patch similarity index 83% rename from Spigot-Server-Patches/0359-Don-t-check-ConvertSigns-boolean-every-sign-save.patch rename to Spigot-Server-Patches/0350-Don-t-check-ConvertSigns-boolean-every-sign-save.patch index 1b16980cc0..e0722f4b7c 100644 --- a/Spigot-Server-Patches/0359-Don-t-check-ConvertSigns-boolean-every-sign-save.patch +++ b/Spigot-Server-Patches/0350-Don-t-check-ConvertSigns-boolean-every-sign-save.patch @@ -1,4 +1,4 @@ -From 78e1b7306f6b982a5d69a09cde244cf3e28a9043 Mon Sep 17 00:00:00 2001 +From 41f9d0be57621cbc16042166cd33d910b614614b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 2 Mar 2019 11:11:29 -0500 Subject: [PATCH] Don't check ConvertSigns boolean every sign save @@ -7,10 +7,10 @@ property lookups arent super cheap. they synchronize, validate and check security managers. diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java -index c7aa3b350a..0a8d9b52dd 100644 +index f051f2d3c..5eb86c434 100644 --- a/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java -@@ -18,6 +18,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -15,6 +15,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // private static final boolean keepInvalidUnicode = Boolean.getBoolean("Paper.keepInvalidUnicode"); // Allow people to keep their bad unicode if they really want it private boolean privateUnicodeRemoved = false; public java.util.UUID signEditor; @@ -18,7 +18,7 @@ index c7aa3b350a..0a8d9b52dd 100644 // Paper end public TileEntitySign() { -@@ -36,7 +37,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // +@@ -33,7 +34,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { // } // CraftBukkit start @@ -28,5 +28,5 @@ index c7aa3b350a..0a8d9b52dd 100644 } // CraftBukkit end -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0360-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch b/Spigot-Server-Patches/0351-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch similarity index 87% rename from Spigot-Server-Patches/0360-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch rename to Spigot-Server-Patches/0351-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch index cf101ec1ee..e5bddf4c6a 100644 --- a/Spigot-Server-Patches/0360-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch +++ b/Spigot-Server-Patches/0351-Handle-Excessive-Signs-in-Chunks-creating-too-large-.patch @@ -1,4 +1,4 @@ -From 331562f54c78c10872ec4960edd8b36dd7a6619b Mon Sep 17 00:00:00 2001 +From 954930d0c2cb54bb03e013fcc8f71d96e686b435 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 2 Mar 2019 14:55:01 -0500 Subject: [PATCH] Handle Excessive Signs in Chunks creating too large of @@ -11,7 +11,7 @@ Use -DPaper.excessiveSignsLimit=500 to configure that limit, or -1 to disable the limit and let your players be abused. diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index b1dededc15..e156804f7a 100644 +index b1dededc1..e156804f7 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -212,6 +212,15 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -31,7 +31,7 @@ index b1dededc15..e156804f7a 100644 private void sendPacketQueue() { this.o(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java -index 2d8e6a2f4a..8d0965a053 100644 +index 2d8e6a2f4..8d0965a05 100644 --- a/src/main/java/net/minecraft/server/Packet.java +++ b/src/main/java/net/minecraft/server/Packet.java @@ -11,6 +11,7 @@ public interface Packet { @@ -43,10 +43,10 @@ index 2d8e6a2f4a..8d0965a053 100644 return false; } diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index 58eccd9c63..ef71a1feb3 100644 +index a0b87f89d..47710067a 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -@@ -20,6 +20,15 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -23,6 +23,15 @@ public class PacketPlayOutMapChunk implements Packet { public PacketPlayOutMapChunk() {} @@ -62,15 +62,15 @@ index 58eccd9c63..ef71a1feb3 100644 public PacketPlayOutMapChunk(Chunk chunk, int i) { ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); -@@ -42,6 +51,7 @@ public class PacketPlayOutMapChunk implements Packet { - this.c = this.a(new PacketDataSerializer(this.i()), chunk, i); - this.f = Lists.newArrayList(); +@@ -49,6 +58,7 @@ public class PacketPlayOutMapChunk implements Packet { + this.c = this.a(new PacketDataSerializer(this.j()), chunk, i); + this.g = Lists.newArrayList(); iterator = chunk.getTileEntities().entrySet().iterator(); + int totalSigns = 0; // Paper while (iterator.hasNext()) { entry = (Entry) iterator.next(); -@@ -50,6 +60,14 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -57,6 +67,14 @@ public class PacketPlayOutMapChunk implements Packet { int j = blockposition.getY() >> 4; if (this.f() || (i & 1 << j) != 0) { @@ -86,5 +86,5 @@ index 58eccd9c63..ef71a1feb3 100644 if (tileentity instanceof TileEntitySkull) { TileEntitySkull.sanitizeTileEntityUUID(nbttagcompound); } // Paper -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0361-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0352-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch similarity index 91% rename from Spigot-Server-Patches/0361-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch rename to Spigot-Server-Patches/0352-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index 09b1033eba..bc02f19d12 100644 --- a/Spigot-Server-Patches/0361-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0352-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -1,4 +1,4 @@ -From f936e3036737be2b1248454ca5569fb2d32f4a2c Mon Sep 17 00:00:00 2001 +From 35b6aeaf8f660351da0c23de6d030fed32b8ca97 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 2 Mar 2019 16:12:35 -0500 Subject: [PATCH] MC-145260: Fix Whitelist On/Off inconsistency @@ -11,7 +11,7 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java -index 8570e38f42..c97be42dd7 100644 +index 8570e38f4..c97be42dd 100644 --- a/src/main/java/net/minecraft/server/JsonList.java +++ b/src/main/java/net/minecraft/server/JsonList.java @@ -64,6 +64,7 @@ public class JsonList> { @@ -23,7 +23,7 @@ index 8570e38f42..c97be42dd7 100644 this.e = flag; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 52aa83f51f..0da3f95f89 100644 +index 659ce2181..62d807597 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -62,7 +62,7 @@ public abstract class PlayerList { @@ -35,7 +35,7 @@ index 52aa83f51f..0da3f95f89 100644 protected final int maxPlayers; private int viewDistance; private EnumGamemode t; -@@ -899,9 +899,9 @@ public abstract class PlayerList { +@@ -900,9 +900,9 @@ public abstract class PlayerList { } public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) { boolean isOp = this.operators.d(gameprofile); @@ -47,7 +47,7 @@ index 52aa83f51f..0da3f95f89 100644 event.callEvent(); if (!event.isWhitelisted()) { if (loginEvent != null) { -@@ -1030,11 +1030,11 @@ public abstract class PlayerList { +@@ -1031,11 +1031,11 @@ public abstract class PlayerList { } public boolean getHasWhitelist() { @@ -62,5 +62,5 @@ index 52aa83f51f..0da3f95f89 100644 public List b(String s) { -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0362-Set-Zombie-last-tick-at-start-of-drowning-process.patch b/Spigot-Server-Patches/0353-Set-Zombie-last-tick-at-start-of-drowning-process.patch similarity index 76% rename from Spigot-Server-Patches/0362-Set-Zombie-last-tick-at-start-of-drowning-process.patch rename to Spigot-Server-Patches/0353-Set-Zombie-last-tick-at-start-of-drowning-process.patch index 48296a275f..d998f5e4fa 100644 --- a/Spigot-Server-Patches/0362-Set-Zombie-last-tick-at-start-of-drowning-process.patch +++ b/Spigot-Server-Patches/0353-Set-Zombie-last-tick-at-start-of-drowning-process.patch @@ -1,4 +1,4 @@ -From 8dbeb44fd71b383d5ce9432eb6cc52ebccecfe1e Mon Sep 17 00:00:00 2001 +From d757d0f8136435c7603b9d6b3480b0a6196c95dd Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 4 Mar 2019 02:23:28 -0500 Subject: [PATCH] Set Zombie last tick at start of drowning process @@ -6,17 +6,17 @@ Subject: [PATCH] Set Zombie last tick at start of drowning process Fixes GH-1887 diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index cdaa7f636..99b2e7815 100644 +index 1c2c05ae3..7d882d9c7 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -169,6 +169,7 @@ public class EntityZombie extends EntityMonster { - ++this.bF; - if (this.bF >= 600) { + ++this.bC; + if (this.bC >= 600) { this.startDrownedConversion(300); + this.lastTick = MinecraftServer.currentTick; // Paper - Make sure this is set at start of process - GH-1887 } } else { - this.bF = -1; + this.bC = -1; -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0363-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0354-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 78% rename from Spigot-Server-Patches/0363-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to Spigot-Server-Patches/0354-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index cb3eb06943..3052f4ab01 100644 --- a/Spigot-Server-Patches/0363-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0354-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -1,14 +1,14 @@ -From 2247e4c12ed86bbd819042f1bfe93d01b4f1651a Mon Sep 17 00:00:00 2001 +From eb331fa777642613a299d6f552419119f496b88b Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 13 Mar 2019 20:08:09 +0200 Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0da3f95f89..65df0e7c8c 100644 +index 62d807597..9d715d891 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1034,6 +1034,7 @@ public abstract class PlayerList { +@@ -1035,6 +1035,7 @@ public abstract class PlayerList { } public void setHasWhitelist(boolean flag) { @@ -17,5 +17,5 @@ index 0da3f95f89..65df0e7c8c 100644 } -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0364-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0355-Add-LivingEntity-getTargetEntity.patch similarity index 92% rename from Spigot-Server-Patches/0364-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0355-Add-LivingEntity-getTargetEntity.patch index 092a8df487..668edd07a0 100644 --- a/Spigot-Server-Patches/0364-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0355-Add-LivingEntity-getTargetEntity.patch @@ -1,4 +1,4 @@ -From d6ac301c41ce6cf739582b3dc2d2c250de86f591 Mon Sep 17 00:00:00 2001 +From 2739e42d97f124c9d29111cdb5a4f71fb7531336 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 22 Sep 2018 00:33:08 -0500 Subject: [PATCH] Add LivingEntity#getTargetEntity @@ -46,30 +46,30 @@ index 4f60b931a..c950139c0 100644 double[] adouble = new double[]{1.0D}; double d0 = vec3d1.x - vec3d.x; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 75da08596..046e7e031 100644 +index 0f2480521..2e8aedf5f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1497,6 +1497,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1475,6 +1475,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.c(f - 90.0F, f1); } + public final Vec3D getEyePosition(float partialTicks) { return j(partialTicks); } // Paper - OBFHELPER - public Vec3D j(float f) { + public final Vec3D j(float f) { if (f == 1.0F) { - return new Vec3D(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ); -@@ -2144,6 +2145,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + return new Vec3D(this.locX(), this.getHeadY(), this.locZ()); +@@ -2126,6 +2127,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.getPassengers().size() < 1; } -+ public final float getCollisionBorderSize() { return aS(); } // Paper - OBFHELPER - public float aS() { ++ public final float getCollisionBorderSize() { return aV(); } // Paper - OBFHELPER + public float aV() { return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d23968a7c..31d14b19b 100644 +index 317321395..1b5acf77e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3229,6 +3229,37 @@ public abstract class EntityLiving extends Entity { +@@ -3304,6 +3304,37 @@ public abstract class EntityLiving extends Entity { return world.rayTrace(raytrace); } @@ -108,7 +108,7 @@ index d23968a7c..31d14b19b 100644 public int getShieldBlockingDelay() { diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 9bf191945..56488b78d 100644 +index c1f462d9d..498f38109 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -18,6 +18,7 @@ public final class IEntitySelector { @@ -158,5 +158,5 @@ index 6f4c6c589..b27fd44dc 100644 @Override -- -2.22.1 +2.24.1 diff --git a/Spigot-Server-Patches/0365-Use-proper-max-length-when-serialising-BungeeCord-te.patch b/Spigot-Server-Patches/0356-Use-proper-max-length-when-serialising-BungeeCord-te.patch similarity index 94% rename from Spigot-Server-Patches/0365-Use-proper-max-length-when-serialising-BungeeCord-te.patch rename to Spigot-Server-Patches/0356-Use-proper-max-length-when-serialising-BungeeCord-te.patch index ab47e97809..cc766d5ce8 100644 --- a/Spigot-Server-Patches/0365-Use-proper-max-length-when-serialising-BungeeCord-te.patch +++ b/Spigot-Server-Patches/0356-Use-proper-max-length-when-serialising-BungeeCord-te.patch @@ -1,4 +1,4 @@ -From 346fc5c87003b5fafdddc35030c4b74e02beed34 Mon Sep 17 00:00:00 2001 +From 8bf37391928514c6346d1f8bc0c7453fecce0746 Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 20 Mar 2019 21:19:29 -0700 Subject: [PATCH] Use proper max length when serialising BungeeCord text @@ -6,7 +6,7 @@ Subject: [PATCH] Use proper max length when serialising BungeeCord text diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java -index 0ab611564e..f7b2095bb7 100644 +index 0ab611564..f7b2095bb 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java @@ -3,7 +3,7 @@ package net.minecraft.server; @@ -31,5 +31,5 @@ index 0ab611564e..f7b2095bb7 100644 // Paper end } else { -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0366-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0357-Entity-getEntitySpawnReason.patch similarity index 86% rename from Spigot-Server-Patches/0366-Entity-getEntitySpawnReason.patch rename to Spigot-Server-Patches/0357-Entity-getEntitySpawnReason.patch index 18bee84d3e..7fe19b2358 100644 --- a/Spigot-Server-Patches/0366-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0357-Entity-getEntitySpawnReason.patch @@ -1,4 +1,4 @@ -From 0231190c616327c55a18f288e22e0a0f383c5073 Mon Sep 17 00:00:00 2001 +From b75ffe98136f18b12833b85396623dd3f66b421d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 00:24:52 -0400 Subject: [PATCH] Entity#getEntitySpawnReason @@ -10,18 +10,18 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 046e7e031c..f87514a200 100644 +index 2e8aedf5f..96b0917a3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -68,6 +68,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } }; List entitySlice = null; + public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason; // Paper end - static boolean isLevelAtLeast(NBTTagCompound tag, int level) { - return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; -@@ -1642,6 +1643,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + + public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper +@@ -1628,6 +1629,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -31,7 +31,7 @@ index 046e7e031c..f87514a200 100644 // Save entity's from mob spawner status if (spawnedViaMobSpawner) { nbttagcompound.setBoolean("Paper.FromMobSpawner", true); -@@ -1776,6 +1780,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1754,6 +1758,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -59,10 +59,10 @@ index 046e7e031c..f87514a200 100644 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 65df0e7c8c..abddc8895e 100644 +index 9d715d891..49437f212 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -250,7 +250,7 @@ public abstract class PlayerList { +@@ -251,7 +251,7 @@ public abstract class PlayerList { // CraftBukkit start WorldServer finalWorldServer = worldserver; Entity entity = EntityTypes.a(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> { @@ -72,10 +72,10 @@ index 65df0e7c8c..abddc8895e 100644 }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index dbd357f1a3..628ad8b839 100644 +index ecfcecfdc..63e7f2bce 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -978,6 +978,7 @@ public class WorldServer extends World { +@@ -977,6 +977,7 @@ public class WorldServer extends World { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -84,10 +84,10 @@ index dbd357f1a3..628ad8b839 100644 if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 517e422180..31db42e9fb 100644 +index 915ccb180..dfa15372b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1054,5 +1054,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1051,5 +1051,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean fromMobSpawner() { return getHandle().spawnedViaMobSpawner; } @@ -99,5 +99,5 @@ index 517e422180..31db42e9fb 100644 // Paper end } -- -2.22.1 +2.24.1 diff --git a/Spigot-Server-Patches/0367-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0358-Update-entity-Metadata-for-all-tracked-players.patch similarity index 86% rename from Spigot-Server-Patches/0367-Update-entity-Metadata-for-all-tracked-players.patch rename to Spigot-Server-Patches/0358-Update-entity-Metadata-for-all-tracked-players.patch index bfc670c665..fe536f9333 100644 --- a/Spigot-Server-Patches/0367-Update-entity-Metadata-for-all-tracked-players.patch +++ b/Spigot-Server-Patches/0358-Update-entity-Metadata-for-all-tracked-players.patch @@ -1,14 +1,14 @@ -From 3408da94a3a428e0304b92ff3cdbd81bfc5df56e Mon Sep 17 00:00:00 2001 +From 077d7c29117573df85c77b5aa71d54f66ee94684 Mon Sep 17 00:00:00 2001 From: AgentTroll Date: Fri, 22 Mar 2019 22:24:03 -0700 Subject: [PATCH] Update entity Metadata for all tracked players diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index cd7e0299ac..460c687d3e 100644 +index 3ff7a7b4a..3a88c9a67 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -@@ -379,6 +379,12 @@ public class EntityTrackerEntry { +@@ -387,6 +387,12 @@ public class EntityTrackerEntry { return PacketPlayOutEntity.a(this.xLoc, this.yLoc, this.zLoc); } @@ -22,10 +22,10 @@ index cd7e0299ac..460c687d3e 100644 this.f.accept(packet); if (this.tracker instanceof EntityPlayer) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b030269f0a..79054b4519 100644 +index bd2ee459f..17eeecaf4 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1995,7 +1995,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2005,7 +2005,7 @@ public class PlayerConnection implements PacketListenerPlayIn { if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) { // Refresh the current entity metadata @@ -35,5 +35,5 @@ index b030269f0a..79054b4519 100644 if (event.isCancelled()) { -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0368-Fire-event-on-GS4-query.patch b/Spigot-Server-Patches/0359-Fire-event-on-GS4-query.patch similarity index 98% rename from Spigot-Server-Patches/0368-Fire-event-on-GS4-query.patch rename to Spigot-Server-Patches/0359-Fire-event-on-GS4-query.patch index b8c7632560..f3fb234ef1 100644 --- a/Spigot-Server-Patches/0368-Fire-event-on-GS4-query.patch +++ b/Spigot-Server-Patches/0359-Fire-event-on-GS4-query.patch @@ -1,11 +1,11 @@ -From 5f7d0017011a5ee2a1f0915926e5cc1b464d6abd Mon Sep 17 00:00:00 2001 +From 6b8d1c804d7bcb659c31061330a031032d71c2a7 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 17 Mar 2019 21:46:56 +0200 Subject: [PATCH] Fire event on GS4 query diff --git a/src/main/java/net/minecraft/server/RemoteConnectionThread.java b/src/main/java/net/minecraft/server/RemoteConnectionThread.java -index 66bfbcf02b..d821ef9a75 100644 +index 66bfbcf02..d821ef9a7 100644 --- a/src/main/java/net/minecraft/server/RemoteConnectionThread.java +++ b/src/main/java/net/minecraft/server/RemoteConnectionThread.java @@ -15,7 +15,7 @@ public abstract class RemoteConnectionThread implements Runnable { @@ -26,7 +26,7 @@ index 66bfbcf02b..d821ef9a75 100644 return this.b.getPlayerCount(); } diff --git a/src/main/java/net/minecraft/server/RemoteStatusListener.java b/src/main/java/net/minecraft/server/RemoteStatusListener.java -index a556a71334..67e94a6f07 100644 +index 16bb89af0..1b084f211 100644 --- a/src/main/java/net/minecraft/server/RemoteStatusListener.java +++ b/src/main/java/net/minecraft/server/RemoteStatusListener.java @@ -21,19 +21,19 @@ public class RemoteStatusListener extends RemoteConnectionThread { @@ -184,7 +184,7 @@ index a556a71334..67e94a6f07 100644 } } diff --git a/src/main/java/net/minecraft/server/RemoteStatusReply.java b/src/main/java/net/minecraft/server/RemoteStatusReply.java -index 848b5c3f0e..73efea7e13 100644 +index 848b5c3f0..73efea7e1 100644 --- a/src/main/java/net/minecraft/server/RemoteStatusReply.java +++ b/src/main/java/net/minecraft/server/RemoteStatusReply.java @@ -18,15 +18,27 @@ public class RemoteStatusReply { @@ -216,5 +216,5 @@ index 848b5c3f0e..73efea7e13 100644 this.b.writeShort(Short.reverseBytes(short0)); } -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0369-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0360-Implement-PlayerPostRespawnEvent.patch similarity index 86% rename from Spigot-Server-Patches/0369-Implement-PlayerPostRespawnEvent.patch rename to Spigot-Server-Patches/0360-Implement-PlayerPostRespawnEvent.patch index 2103ec3393..22ea01013e 100644 --- a/Spigot-Server-Patches/0369-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0360-Implement-PlayerPostRespawnEvent.patch @@ -1,14 +1,14 @@ -From 7b7c6d55b413eeb9a74ac496314f5670f4b884cd Mon Sep 17 00:00:00 2001 +From 80f6b71d88fd3e543e30dd3f8b5be133ae925d35 Mon Sep 17 00:00:00 2001 From: MisterVector Date: Fri, 26 Oct 2018 21:31:00 -0700 Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index abddc8895e..a183bb450d 100644 +index 49437f212..68e089a4b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -637,9 +637,14 @@ public abstract class PlayerList { +@@ -638,9 +638,14 @@ public abstract class PlayerList { // this.a(entityplayer1, entityplayer, worldserver); // CraftBukkit - removed @@ -24,7 +24,7 @@ index abddc8895e..a183bb450d 100644 CraftWorld cworld = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld); if (cworld != null && blockposition != null) { Optional optional = EntityHuman.getBed(cworld.getHandle(), blockposition, flag1); -@@ -672,6 +677,7 @@ public abstract class PlayerList { +@@ -673,6 +678,7 @@ public abstract class PlayerList { location = respawnEvent.getRespawnLocation(); if (!flag) entityplayer.reset(); // SPIGOT-4785 @@ -32,7 +32,7 @@ index abddc8895e..a183bb450d 100644 } else { location.setWorld(server.getWorldServer(dimensionmanager).getWorld()); } -@@ -733,6 +739,13 @@ public abstract class PlayerList { +@@ -734,6 +740,13 @@ public abstract class PlayerList { if (entityplayer.playerConnection.isDisconnected()) { this.savePlayerFile(entityplayer); } @@ -47,5 +47,5 @@ index abddc8895e..a183bb450d 100644 return entityplayer1; } -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0370-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0361-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 85% rename from Spigot-Server-Patches/0370-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to Spigot-Server-Patches/0361-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch index a26410309f..5e683e75c5 100644 --- a/Spigot-Server-Patches/0370-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch +++ b/Spigot-Server-Patches/0361-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch @@ -1,4 +1,4 @@ -From b4ca29ecbed23d7c2d09e89fa3e224678f4a141c Mon Sep 17 00:00:00 2001 +From 69bf21627466c0f99fe7a6f3acb17c13a5926a5d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 18:09:20 -0400 Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items @@ -6,10 +6,10 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items vanilla checks for == 0 diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 6e026d34f0..2091698953 100644 +index 5f46c7f86..a0d1e7fd2 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java -@@ -59,6 +59,7 @@ public class EntityItem extends Entity { +@@ -60,6 +60,7 @@ public class EntityItem extends Entity { // CraftBukkit start - Use wall time for pickup and despawn timers int elapsedTicks = MinecraftServer.currentTick - this.lastTick; if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; @@ -17,7 +17,7 @@ index 6e026d34f0..2091698953 100644 if (this.age != -32768) this.age += elapsedTicks; this.lastTick = MinecraftServer.currentTick; // CraftBukkit end -@@ -145,6 +146,7 @@ public class EntityItem extends Entity { +@@ -146,6 +147,7 @@ public class EntityItem extends Entity { // CraftBukkit start - Use wall time for pickup and despawn timers int elapsedTicks = MinecraftServer.currentTick - this.lastTick; if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; @@ -26,5 +26,5 @@ index 6e026d34f0..2091698953 100644 this.lastTick = MinecraftServer.currentTick; // CraftBukkit end -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0371-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/0362-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 92% rename from Spigot-Server-Patches/0371-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-Server-Patches/0362-Implement-getters-and-setters-for-EntityItem-owner-a.patch index 8d2d4f9ea4..a369e41dae 100644 --- a/Spigot-Server-Patches/0371-Implement-getters-and-setters-for-EntityItem-owner-a.patch +++ b/Spigot-Server-Patches/0362-Implement-getters-and-setters-for-EntityItem-owner-a.patch @@ -1,4 +1,4 @@ -From 3a20b44acacbc7b96b475d29da37133f72475b63 Mon Sep 17 00:00:00 2001 +From dd55113d530d2bb27380c70856539f37a0c50f41 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 6 Oct 2018 20:54:23 -0500 Subject: [PATCH] Implement getters and setters for EntityItem owner and @@ -6,7 +6,7 @@ Subject: [PATCH] Implement getters and setters for EntityItem owner and diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index 3f552b5905..cb756b1ba0 100644 +index 3f552b590..cb756b1ba 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -8,6 +8,11 @@ import org.bukkit.entity.EntityType; @@ -51,5 +51,5 @@ index 3f552b5905..cb756b1ba0 100644 @Override -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0372-Server-Tick-Events.patch b/Spigot-Server-Patches/0363-Server-Tick-Events.patch similarity index 84% rename from Spigot-Server-Patches/0372-Server-Tick-Events.patch rename to Spigot-Server-Patches/0363-Server-Tick-Events.patch index 9e8f3e1ffb..250e350020 100644 --- a/Spigot-Server-Patches/0372-Server-Tick-Events.patch +++ b/Spigot-Server-Patches/0363-Server-Tick-Events.patch @@ -1,4 +1,4 @@ -From ff943edcb4161947dfae5545652ab4b9c2415a9a Mon Sep 17 00:00:00 2001 +From 8274ef9fa1e61024cc18be25d3d0c7e549229617 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Mar 2019 22:48:45 -0400 Subject: [PATCH] Server Tick Events @@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a7b63ab421..24dccfb7a1 100644 +index 8fc55d31a..c023848c7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1072,6 +1072,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Wed, 27 Mar 2019 23:01:33 -0400 Subject: [PATCH] PlayerDeathEvent#getItemsToKeep @@ -8,7 +8,7 @@ Exposes a mutable array on items a player should keep on death Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4 diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index a191d6246..18695d9b5 100644 +index cc9e69651..ca2398386 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -510,6 +510,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -73,5 +73,5 @@ index a191d6246..18695d9b5 100644 this.setSpectatorTarget(this); // Remove spectated target -- -2.22.0 +2.24.1 diff --git a/Spigot-Server-Patches/0374-Optimize-Captured-TileEntity-Lookup.patch b/Spigot-Server-Patches/0365-Optimize-Captured-TileEntity-Lookup.patch similarity index 82% rename from Spigot-Server-Patches/0374-Optimize-Captured-TileEntity-Lookup.patch rename to Spigot-Server-Patches/0365-Optimize-Captured-TileEntity-Lookup.patch index 4a29a5cf18..61442cd87b 100644 --- a/Spigot-Server-Patches/0374-Optimize-Captured-TileEntity-Lookup.patch +++ b/Spigot-Server-Patches/0365-Optimize-Captured-TileEntity-Lookup.patch @@ -1,4 +1,4 @@ -From 44377891791b199d2a2e184c905942fe07ae24a5 Mon Sep 17 00:00:00 2001 +From bed92ef07ed1a7c0514c36dd12f20aaba86cbc66 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 6 Apr 2019 10:16:48 -0400 Subject: [PATCH] Optimize Captured TileEntity Lookup @@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to just do a get call since the value can never be null. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index dad0c893f..dd2a9c6e5 100644 +index 61a3ddc4d..dfc695084 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1082,12 +1082,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -1000,12 +1000,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return null; } else { // CraftBukkit start @@ -29,7 +29,7 @@ index dad0c893f..dd2a9c6e5 100644 + //TileEntity tileentity = null; // Paper - move up if (this.tickingTileEntities) { - tileentity = this.A(blockposition); + tileentity = this.e(blockposition); -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0375-Add-Heightmap-API.patch b/Spigot-Server-Patches/0366-Add-Heightmap-API.patch similarity index 88% rename from Spigot-Server-Patches/0375-Add-Heightmap-API.patch rename to Spigot-Server-Patches/0366-Add-Heightmap-API.patch index 4ba08ee37a..bbb5c5629e 100644 --- a/Spigot-Server-Patches/0375-Add-Heightmap-API.patch +++ b/Spigot-Server-Patches/0366-Add-Heightmap-API.patch @@ -1,14 +1,14 @@ -From 8cf24e97fb891543763665534d39638d6b324a0d Mon Sep 17 00:00:00 2001 +From 67f62dfa1ad2c6ea8104461749bd2b43b94bb366 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 1 Jan 2019 02:22:01 -0800 Subject: [PATCH] Add Heightmap API diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index dd2a9c6e59..e3b4e30e65 100644 +index dfc695084..10bb06489 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -663,8 +663,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -577,8 +577,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } } @@ -20,10 +20,10 @@ index dd2a9c6e59..e3b4e30e65 100644 if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 78a2c47c5a..95fdc3bf64 100644 +index 578fe8d19..12362d560 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -339,6 +339,29 @@ public class CraftWorld implements World { +@@ -340,6 +340,29 @@ public class CraftWorld implements World { return world.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(x, 0, z)).getY(); } @@ -54,5 +54,5 @@ index 78a2c47c5a..95fdc3bf64 100644 public Location getSpawnLocation() { BlockPosition spawn = world.getSpawn(); -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0377-Mob-Spawner-API-Enhancements.patch b/Spigot-Server-Patches/0367-Mob-Spawner-API-Enhancements.patch similarity index 96% rename from Spigot-Server-Patches/0377-Mob-Spawner-API-Enhancements.patch rename to Spigot-Server-Patches/0367-Mob-Spawner-API-Enhancements.patch index 978d94299b..b495858e28 100644 --- a/Spigot-Server-Patches/0377-Mob-Spawner-API-Enhancements.patch +++ b/Spigot-Server-Patches/0367-Mob-Spawner-API-Enhancements.patch @@ -1,14 +1,14 @@ -From e44fa7d596b9d2d5a3f39a0d377d0f9606248d9c Mon Sep 17 00:00:00 2001 +From 30d0d58e6914e05dbcb03e73d6d87c8848013bfc Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Fri, 19 Apr 2019 12:41:13 -0500 Subject: [PATCH] Mob Spawner API Enhancements diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index 079099e30..b05f6c2f2 100644 +index 90ca1ee14..b179893a1 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -@@ -46,6 +46,7 @@ public abstract class MobSpawnerAbstract { +@@ -47,6 +47,7 @@ public abstract class MobSpawnerAbstract { this.mobs.clear(); // CraftBukkit - SPIGOT-3496, MC-92282 } @@ -103,5 +103,5 @@ index 5c4c3c70c..e78e3804b 100644 + // Paper end } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0378-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0368-Per-Player-View-Distance-API-placeholders.patch similarity index 86% rename from Spigot-Server-Patches/0378-Per-Player-View-Distance-API-placeholders.patch rename to Spigot-Server-Patches/0368-Per-Player-View-Distance-API-placeholders.patch index e7c062678d..11b680f9f0 100644 --- a/Spigot-Server-Patches/0378-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0368-Per-Player-View-Distance-API-placeholders.patch @@ -1,4 +1,4 @@ -From 169c744e147e554e58feafd2c9ccb990eb99e5fa Mon Sep 17 00:00:00 2001 +From d5f010e8360f67f7b54f41e19be07f238fee2896 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 6 May 2019 01:29:25 -0400 Subject: [PATCH] Per-Player View Distance API placeholders @@ -7,10 +7,10 @@ I hope to look at this more in-depth soon. It appears doable. However this should not block the update. diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index c2f35f89d..c8c74f2b3 100644 +index 3df8e30ec..9acdd6e56 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java -@@ -570,9 +570,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { +@@ -579,9 +579,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { // CraftBukkit start - Use relative location for far away sounds // this.world.b(1028, new BlockPosition(this), 0); // Paper start @@ -20,10 +20,10 @@ index c2f35f89d..c8c74f2b3 100644 - final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch + //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(); diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java -index 18151acd5..8b3052b11 100644 +index 2e95069c1..8977c3516 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java @@ -208,9 +208,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity { @@ -36,13 +36,13 @@ index 18151acd5..8b3052b11 100644 - final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch + //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(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9fa55ef6f..e920545df 100644 +index 4b847ddd8..049ebf4c4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1983,6 +1983,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1967,6 +1967,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } @@ -56,9 +56,9 @@ index 9fa55ef6f..e920545df 100644 + public void setViewDistance(int viewDistance) { + throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement"); // TODO + } - //Paper end + // Paper end // Spigot start -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0379-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0369-Fix-CB-call-to-changed-postToMainThread-method.patch similarity index 80% rename from Spigot-Server-Patches/0379-Fix-CB-call-to-changed-postToMainThread-method.patch rename to Spigot-Server-Patches/0369-Fix-CB-call-to-changed-postToMainThread-method.patch index c3470e45f8..606f916efc 100644 --- a/Spigot-Server-Patches/0379-Fix-CB-call-to-changed-postToMainThread-method.patch +++ b/Spigot-Server-Patches/0369-Fix-CB-call-to-changed-postToMainThread-method.patch @@ -1,14 +1,14 @@ -From 77e3bff66143458b16f6ddfb0510d254faecf0c4 Mon Sep 17 00:00:00 2001 +From 84cd561af5130ce02ebfdbe04339b9e1765fe28d Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Fri, 10 May 2019 18:38:19 +0100 Subject: [PATCH] Fix CB call to changed postToMainThread method diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 37b97438c..4a16d6c14 100644 +index 17eeecaf4..8c54022e0 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -283,7 +283,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -286,7 +286,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.networkManager.getClass(); // CraftBukkit - Don't wait @@ -18,5 +18,5 @@ index 37b97438c..4a16d6c14 100644 @Override -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0380-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/Spigot-Server-Patches/0370-Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 90% rename from Spigot-Server-Patches/0380-Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to Spigot-Server-Patches/0370-Fix-sounds-when-item-frames-are-modified-MC-123450.patch index 45c7bd5fe9..f9cc4c0d9c 100644 --- a/Spigot-Server-Patches/0380-Fix-sounds-when-item-frames-are-modified-MC-123450.patch +++ b/Spigot-Server-Patches/0370-Fix-sounds-when-item-frames-are-modified-MC-123450.patch @@ -1,4 +1,4 @@ -From 0af4cd795675fc8e5128e0648464aab87edf887c Mon Sep 17 00:00:00 2001 +From 81e5cb6c7eadf2b99c00fca4c658e92efb7ca794 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Sat, 27 Apr 2019 20:00:43 +0100 Subject: [PATCH] Fix sounds when item frames are modified (MC-123450) @@ -6,10 +6,10 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450) This also fixes the adding sound playing when the item frame direction is changed. diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java -index 6f6837ec4..b078435c6 100644 +index 9b1e07452..f8a2f32f1 100644 --- a/src/main/java/net/minecraft/server/EntityItemFrame.java +++ b/src/main/java/net/minecraft/server/EntityItemFrame.java -@@ -226,7 +226,7 @@ public class EntityItemFrame extends EntityHanging { +@@ -224,7 +224,7 @@ public class EntityItemFrame extends EntityHanging { } this.getDataWatcher().set(EntityItemFrame.ITEM, itemstack); @@ -32,5 +32,5 @@ index 799036f26..9ad180d94 100644 this.entity = frame; } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0381-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0371-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch similarity index 87% rename from Spigot-Server-Patches/0381-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch rename to Spigot-Server-Patches/0371-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 2d40ea824f..43eacd21cc 100644 --- a/Spigot-Server-Patches/0381-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0371-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -1,4 +1,4 @@ -From 046a05122f1c0f770d9264ec32064c9631b3f9bf Mon Sep 17 00:00:00 2001 +From 80988fcf00fd1246ec08ce046e879c533490e166 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 13 May 2019 21:10:59 -0700 Subject: [PATCH] Fix CraftServer#isPrimaryThread and MinecraftServer @@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled synchronously when the server gets shut down. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 24dccfb7a1..ee02001700 100644 +index c023848c7..443e727dc 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2171,7 +2171,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 28 Sep 2018 21:49:53 -0400 Subject: [PATCH] Fix issues with entity loss due to unloaded chunks @@ -19,27 +19,27 @@ This change ensures the chunks are always loaded when entities are added to the world, or a valid entity moves between chunks. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 628ad8b839..cc2c139904 100644 +index 63e7f2bce..0138738b3 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -675,7 +675,7 @@ public class WorldServer extends World { +@@ -684,7 +684,7 @@ public class WorldServer extends World { this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY); } -- if (!entity.bU() && !this.isChunkLoaded(i, k)) { -+ if (!entity.valid && !entity.bU() && !this.isChunkLoaded(i, k)) { // Paper - always load chunks to register valid entities location +- if (!entity.cc() && !this.isChunkLoaded(i, k)) { ++ if (!entity.valid && !entity.cc() && !this.isChunkLoaded(i, k)) { // Paper - always load chunks to register valid entities location entity.inChunk = false; } else { this.getChunkAt(i, k).a(entity); -@@ -1010,7 +1010,7 @@ public class WorldServer extends World { +@@ -1009,7 +1009,7 @@ public class WorldServer extends World { return false; } // CraftBukkit end -- IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX / 16.0D), MathHelper.floor(entity.locZ / 16.0D), ChunkStatus.FULL, entity.attachedToPlayer); -+ IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX / 16.0D), MathHelper.floor(entity.locZ / 16.0D), ChunkStatus.FULL, true); // Paper - always load chunks for entity adds +- IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX() / 16.0D), MathHelper.floor(entity.locZ() / 16.0D), ChunkStatus.FULL, entity.attachedToPlayer); ++ IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX() / 16.0D), MathHelper.floor(entity.locZ() / 16.0D), ChunkStatus.FULL, true); // Paper - always load chunks for entity adds if (!(ichunkaccess instanceof Chunk)) { return false; -- -2.22.1 +2.24.1 diff --git a/Spigot-Server-Patches/0383-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0373-Duplicate-UUID-Resolve-Option.patch similarity index 92% rename from Spigot-Server-Patches/0383-Duplicate-UUID-Resolve-Option.patch rename to Spigot-Server-Patches/0373-Duplicate-UUID-Resolve-Option.patch index 6ee69f4524..0ffd66110d 100644 --- a/Spigot-Server-Patches/0383-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0373-Duplicate-UUID-Resolve-Option.patch @@ -1,4 +1,4 @@ -From 8b9d55b7935238a4142c03140a818bbdfc72dc5e Mon Sep 17 00:00:00 2001 +From 6e44f48dc3266fee79360c7400a2f371543c7de8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:27:34 -0400 Subject: [PATCH] Duplicate UUID Resolve Option @@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cf9470057..2cf5ef8b7 100644 +index 3b1289099..14fa5fdb7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -449,4 +449,43 @@ public class PaperWorldConfig { @@ -81,31 +81,31 @@ index cf9470057..2cf5ef8b7 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 09e010e67..ee8f80174 100644 +index c7c600b80..64c327669 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -397,6 +397,7 @@ public class Chunk implements IChunkAccess { +@@ -391,6 +391,7 @@ public class Chunk implements IChunkAccess { if (i != this.loc.x || j != this.loc.z) { Chunk.LOGGER.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.loc.x, this.loc.z, entity); entity.dead = true; + return; // Paper } - int k = MathHelper.floor(entity.locY / 16.0D); + int k = MathHelper.floor(entity.locY() / 16.0D); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f87514a20..55c73ffca 100644 +index 96b0917a3..f0d1a5b14 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2728,6 +2728,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2735,6 +2735,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke }); } + public void setUUID(UUID uuid) { a(uuid); } // Paper - OBFHELPER public void a(UUID uuid) { this.uniqueID = uuid; - this.ap = this.uniqueID.toString(); + this.am = this.uniqueID.toString(); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index db938da25..82b7d328a 100644 +index a2b09597f..5fd001170 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1,6 +1,7 @@ @@ -116,11 +116,12 @@ index db938da25..82b7d328a 100644 import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.ComparisonChain; // Paper -@@ -22,13 +23,16 @@ import java.io.File; +@@ -22,14 +23,17 @@ import java.io.File; import java.io.IOException; import java.io.Writer; import java.util.ArrayList; +import java.util.HashMap; // Paper + import java.util.Collection; import java.util.Iterator; import java.util.List; +import java.util.Map; // Paper @@ -133,7 +134,7 @@ index db938da25..82b7d328a 100644 import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.Executor; -@@ -593,19 +597,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -594,19 +598,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot @@ -200,7 +201,7 @@ index db938da25..82b7d328a 100644 if (list == null) { list = Lists.newArrayList(new Entity[]{entity}); } else { -@@ -613,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -614,6 +654,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } } @@ -209,19 +210,19 @@ index db938da25..82b7d328a 100644 if (list != null) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index cc2c13990..29bb795f7 100644 +index 0138738b3..d59eee27a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -2,6 +2,8 @@ package net.minecraft.server; - - import co.aikar.timings.TimingHistory; - import co.aikar.timings.Timings; +@@ -3,6 +3,8 @@ package net.minecraft.server; + import com.google.common.annotations.VisibleForTesting; + import co.aikar.timings.TimingHistory; // Paper + import co.aikar.timings.Timings; // Paper + -+import com.destroystokyo.paper.PaperWorldConfig; ++import com.destroystokyo.paper.PaperWorldConfig; // Paper import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -1037,8 +1039,23 @@ public class WorldServer extends World { +@@ -1036,8 +1038,23 @@ public class WorldServer extends World { if (entity1 == null) { return false; } else { @@ -247,7 +248,7 @@ index cc2c13990..29bb795f7 100644 return true; } } -@@ -1177,7 +1194,7 @@ public class WorldServer extends World { +@@ -1176,7 +1193,7 @@ public class WorldServer extends World { } Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); @@ -257,5 +258,5 @@ index cc2c13990..29bb795f7 100644 logger.error("Overwrote an existing entity " + old + " with " + entity); if (DEBUG_ENTITIES) { -- -2.24.0 +2.24.1 diff --git a/Spigot-Server-Patches/0384-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0374-improve-CraftWorld-isChunkLoaded.patch similarity index 79% rename from Spigot-Server-Patches/0384-improve-CraftWorld-isChunkLoaded.patch rename to Spigot-Server-Patches/0374-improve-CraftWorld-isChunkLoaded.patch index 86a9539f7a..3574a28c44 100644 --- a/Spigot-Server-Patches/0384-improve-CraftWorld-isChunkLoaded.patch +++ b/Spigot-Server-Patches/0374-improve-CraftWorld-isChunkLoaded.patch @@ -1,4 +1,4 @@ -From f84670030019a4d9d6287a8dbdcc63e25d7f50f0 Mon Sep 17 00:00:00 2001 +From 5c3534a9d83d87e197cb35ab9b6bd5c6ba667e2d Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 21 May 2019 02:34:04 +0100 Subject: [PATCH] improve CraftWorld#isChunkLoaded @@ -9,10 +9,10 @@ waiting for the execution queue to get to our request; We can just query the chunk status and get a response now, vs having to wait diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 95fdc3bf64..f2a68ec360 100644 +index 12362d560..29c14c707 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -403,14 +403,13 @@ public class CraftWorld implements World { +@@ -404,14 +404,13 @@ public class CraftWorld implements World { @Override public boolean isChunkLoaded(int x, int z) { @@ -24,11 +24,11 @@ index 95fdc3bf64..f2a68ec360 100644 @Override public boolean isChunkGenerated(int x, int z) { try { -- return isChunkLoaded(x, z) || world.getChunkProvider().playerChunkMap.chunkExists(new ChunkCoordIntPair(x, z)); -+ return world.getChunkProvider().getChunkAtIfCachedImmediately(x, z) != null || world.getChunkProvider().playerChunkMap.chunkExists(new ChunkCoordIntPair(x, z)); // Paper +- return isChunkLoaded(x, z) || world.getChunkProvider().playerChunkMap.read(new ChunkCoordIntPair(x, z)) != null; ++ return world.getChunkProvider().getChunkAtIfCachedImmediately(x, z) != null || world.getChunkProvider().playerChunkMap.read(new ChunkCoordIntPair(x, z)) != null; // Paper (TODO check if the first part can be removed) } catch (IOException ex) { throw new RuntimeException(ex); } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0385-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0375-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 96% rename from Spigot-Server-Patches/0385-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to Spigot-Server-Patches/0375-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 53b3a4bdac..a35098ecda 100644 --- a/Spigot-Server-Patches/0385-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0375-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From 56cea870900e4546d9979bc37bf98f70f31af32f Mon Sep 17 00:00:00 2001 +From ee1545f6f3c072ea6581746932140afd43ddb8d5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 13 Sep 2014 23:14:43 -0400 Subject: [PATCH] Configurable Keep Spawn Loaded range per world @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index acc84eec1..9ff115294 100644 +index 14fa5fdb7..332f20ce8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -488,4 +488,10 @@ public class PaperWorldConfig { @@ -21,10 +21,10 @@ index acc84eec1..9ff115294 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ee0200170..a6f112bd0 100644 +index 443e727dc..0a7648381 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -577,6 +577,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 24 May 2019 07:53:16 +0100 Subject: [PATCH] Fix some generation concurrency issues diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e3b4e30e6..10c149fae 100644 +index 10bb06489..9ad76ab32 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -101,6 +101,23 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -100,6 +100,23 @@ public abstract class World implements GeneratorAccess, AutoCloseable { private int tileTickPosition; public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here @@ -33,7 +33,7 @@ index e3b4e30e6..10c149fae 100644 public CraftWorld getWorld() { return this.world; diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java -index ddf726867..c2188ceef 100644 +index b34a0683a..e002ed53f 100644 --- a/src/main/java/net/minecraft/server/WorldGenStronghold.java +++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java @@ -10,10 +10,12 @@ import javax.annotation.Nullable; @@ -42,20 +42,20 @@ index ddf726867..c2188ceef 100644 + /* // Paper start - no shared state private boolean a; - private ChunkCoordIntPair[] aS; - private final List aT = Lists.newArrayList(); - private long aU; -+ */ + private ChunkCoordIntPair[] aq; + private final List ar = Lists.newArrayList(); + private long as; ++ */ public WorldGenStronghold(Function, ? extends WorldGenFeatureEmptyConfiguration> function) { super(function); @@ -21,16 +23,22 @@ public class WorldGenStronghold extends StructureGenerator chunkgenerator, Random random, int i, int j) { + public boolean a(BiomeManager biomemanager, ChunkGenerator chunkgenerator, Random random, int i, int j, BiomeBase biomebase) { + // Paper start + /* - if (this.aU != chunkgenerator.getSeed()) { + if (this.as != chunkgenerator.getSeed()) { this.d(); } + */ @@ -71,7 +71,7 @@ index ddf726867..c2188ceef 100644 + }} + // Paper end -- ChunkCoordIntPair[] achunkcoordintpair = this.aS; +- ChunkCoordIntPair[] achunkcoordintpair = this.aq; + ChunkCoordIntPair[] achunkcoordintpair = world.strongholdCoords; // Paper int k = achunkcoordintpair.length; @@ -82,9 +82,9 @@ index ddf726867..c2188ceef 100644 private void d() { + /* // Paper this.a = false; - this.aS = null; - this.aT.clear(); -+ */ // Paper + this.aq = null; + this.ar.clear(); ++ */ // Paper } @Override @@ -101,7 +101,7 @@ index ddf726867..c2188ceef 100644 } else { + // Paper start - no shared state + /* - if (this.aU != world.getSeed()) { + if (this.as != world.getSeed()) { this.d(); } + */ @@ -120,7 +120,7 @@ index ddf726867..c2188ceef 100644 BlockPosition blockposition1 = null; BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); double d0 = Double.MAX_VALUE; -- ChunkCoordIntPair[] achunkcoordintpair = this.aS; +- ChunkCoordIntPair[] achunkcoordintpair = this.aq; + ChunkCoordIntPair[] achunkcoordintpair = world.strongholdCoords; // Paper int j = achunkcoordintpair.length; @@ -129,8 +129,8 @@ index ddf726867..c2188ceef 100644 } private void a(ChunkGenerator chunkgenerator) { -- this.aU = chunkgenerator.getSeed(); -+ //this.aU = chunkgenerator.getSeed(); // Paper +- this.as = chunkgenerator.getSeed(); ++ //this.as = chunkgenerator.getSeed(); // Paper List list = Lists.newArrayList(); Iterator iterator = IRegistry.BIOME.iterator(); @@ -138,17 +138,17 @@ index ddf726867..c2188ceef 100644 int j = chunkgenerator.getSettings().f(); int k = chunkgenerator.getSettings().g(); -- this.aS = new ChunkCoordIntPair[j]; +- this.aq = new ChunkCoordIntPair[j]; + ChunkCoordIntPair[] strongholdCoords = chunkgenerator.getWorld().strongholdCoords = new ChunkCoordIntPair[j]; // Paper int l = 0; -- Iterator iterator1 = this.aT.iterator(); +- Iterator iterator1 = this.ar.iterator(); + Iterator iterator1 = chunkgenerator.getWorld().strongholdStuctures.iterator(); // Paper while (iterator1.hasNext()) { StructureStart structurestart = (StructureStart) iterator1.next(); -- if (l < this.aS.length) { -- this.aS[l++] = new ChunkCoordIntPair(structurestart.f(), structurestart.g()); +- if (l < this.aq.length) { +- this.aq[l++] = new ChunkCoordIntPair(structurestart.f(), structurestart.g()); + if (l < strongholdCoords.length) { // Paper + strongholdCoords[l++] = new ChunkCoordIntPair(structurestart.f(), structurestart.g()); // Paper } @@ -158,12 +158,12 @@ index ddf726867..c2188ceef 100644 double d0 = random.nextDouble() * 3.141592653589793D * 2.0D; int i1 = l; -- if (l < this.aS.length) { +- if (l < this.aq.length) { + if (l < strongholdCoords.length) { // Paper int j1 = 0; int k1 = 0; -- for (int l1 = 0; l1 < this.aS.length; ++l1) { +- for (int l1 = 0; l1 < this.aq.length; ++l1) { + for (int l1 = 0; l1 < strongholdCoords.length; ++l1) { // Paper double d1 = (double) (4 * i + i * k1 * 6) + (random.nextDouble() - 0.5D) * (double) i * 2.5D; int i2 = (int) Math.round(Math.cos(d0) * d1); @@ -172,7 +172,7 @@ index ddf726867..c2188ceef 100644 } if (l1 >= i1) { -- this.aS[l1] = new ChunkCoordIntPair(i2, j2); +- this.aq[l1] = new ChunkCoordIntPair(i2, j2); + strongholdCoords[l1] = new ChunkCoordIntPair(i2, j2); // Paper } @@ -181,8 +181,8 @@ index ddf726867..c2188ceef 100644 ++k1; j1 = 0; k += 2 * k / (k1 + 1); -- k = Math.min(k, this.aS.length - l1); -+ k = Math.min(k, strongholdCoords.length - l1); +- k = Math.min(k, this.aq.length - l1); ++ k = Math.min(k, strongholdCoords.length - l1); // Paper d0 += random.nextDouble() * 3.141592653589793D * 2.0D; } } @@ -190,11 +190,11 @@ index ddf726867..c2188ceef 100644 this.a(chunkgenerator.getSeaLevel(), this.d, 10); } while (this.b.isEmpty() || worldgenstrongholdpieces_worldgenstrongholdstart.b == null); -- ((WorldGenStronghold) this.k()).aT.add(this); +- ((WorldGenStronghold) this.l()).ar.add(this); + chunkgenerator.getWorld().strongholdStuctures.add(this); // Paper - this worries me, this is never cleared, even in vanilla (world seed never changes "world", and that appears to be the only relevant world) } } } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0387-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch b/Spigot-Server-Patches/0377-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch similarity index 89% rename from Spigot-Server-Patches/0387-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch rename to Spigot-Server-Patches/0377-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch index bc38b0088d..6e1228b641 100644 --- a/Spigot-Server-Patches/0387-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch +++ b/Spigot-Server-Patches/0377-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch @@ -1,4 +1,4 @@ -From 829f83cc7a910c4c2b7669b98d26324284495d20 Mon Sep 17 00:00:00 2001 +From 6e461a1d9d95e3f023050c86cf602b587c5ab9f5 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Mon, 27 May 2019 17:35:39 -0500 Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative @@ -6,7 +6,7 @@ Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative diff --git a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java -index 3a8e10533..fe527aba5 100644 +index e8f3e55fd..44289c230 100644 --- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java +++ b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java @@ -175,6 +175,12 @@ public class EntityAreaEffectCloud extends Entity { @@ -23,5 +23,5 @@ index 3a8e10533..fe527aba5 100644 if (this.world.isClientSide) { ParticleParam particleparam = this.getParticle(); -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0388-ChunkMapDistance-CME.patch b/Spigot-Server-Patches/0378-ChunkMapDistance-CME.patch similarity index 90% rename from Spigot-Server-Patches/0388-ChunkMapDistance-CME.patch rename to Spigot-Server-Patches/0378-ChunkMapDistance-CME.patch index c1e3bc7236..be5ace0dd9 100644 --- a/Spigot-Server-Patches/0388-ChunkMapDistance-CME.patch +++ b/Spigot-Server-Patches/0378-ChunkMapDistance-CME.patch @@ -1,14 +1,14 @@ -From f740ce691e50b45b0fb0b729ce92c5e1ead81226 Mon Sep 17 00:00:00 2001 +From b138edb74998577db55d22d2f38ebd72a698fda2 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 29 May 2019 04:01:22 +0100 Subject: [PATCH] ChunkMapDistance CME diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 101eb58ac..63a688725 100644 +index a35f0e18b..8c1945687 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java -@@ -36,7 +36,7 @@ public abstract class ChunkMapDistance { +@@ -33,7 +33,7 @@ public abstract class ChunkMapDistance { private final ChunkMapDistance.a e = new ChunkMapDistance.a(); private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); private final ChunkMapDistance.c g = new ChunkMapDistance.c(33); @@ -17,7 +17,7 @@ index 101eb58ac..63a688725 100644 private final ChunkTaskQueueSorter i; private final Mailbox> j; private final Mailbox k; -@@ -99,26 +99,12 @@ public abstract class ChunkMapDistance { +@@ -94,26 +94,12 @@ public abstract class ChunkMapDistance { ; } @@ -50,5 +50,5 @@ index 101eb58ac..63a688725 100644 } else { if (!this.l.isEmpty()) { -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0389-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0379-Implement-CraftBlockSoundGroup.patch similarity index 81% rename from Spigot-Server-Patches/0389-Implement-CraftBlockSoundGroup.patch rename to Spigot-Server-Patches/0379-Implement-CraftBlockSoundGroup.patch index ecbe446a38..663f2d6684 100644 --- a/Spigot-Server-Patches/0389-Implement-CraftBlockSoundGroup.patch +++ b/Spigot-Server-Patches/0379-Implement-CraftBlockSoundGroup.patch @@ -1,4 +1,4 @@ -From c2bb45f28211e458441b8898073e13cc9cf3cb52 Mon Sep 17 00:00:00 2001 +From fe324f134505b5c854c8ad4e6be09292e86586ff Mon Sep 17 00:00:00 2001 From: simpleauthority Date: Tue, 28 May 2019 03:48:51 -0700 Subject: [PATCH] Implement CraftBlockSoundGroup @@ -49,10 +49,10 @@ index 000000000..99f99330d + } +} diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 9fd1b4915..21f734a73 100644 +index 8fb0b5af0..276f207a8 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -271,6 +271,7 @@ public class IBlockData extends BlockDataAbstract implements +@@ -275,6 +275,7 @@ public class IBlockData extends BlockDataAbstract implements return this.getBlock().isTicking(this); } @@ -61,45 +61,45 @@ index 9fd1b4915..21f734a73 100644 return this.getBlock().getStepSound(this); } diff --git a/src/main/java/net/minecraft/server/SoundEffectType.java b/src/main/java/net/minecraft/server/SoundEffectType.java -index 5460d409b..ccd5b0529 100644 +index b774d2d8d..0184bf3fc 100644 --- a/src/main/java/net/minecraft/server/SoundEffectType.java +++ b/src/main/java/net/minecraft/server/SoundEffectType.java -@@ -26,10 +26,10 @@ public class SoundEffectType { - public static final SoundEffectType v = new SoundEffectType(1.0F, 1.0F, SoundEffects.BLOCK_LANTERN_BREAK, SoundEffects.BLOCK_LANTERN_STEP, SoundEffects.BLOCK_LANTERN_PLACE, SoundEffects.BLOCK_LANTERN_HIT, SoundEffects.BLOCK_LANTERN_FALL); - public final float w; +@@ -27,10 +27,10 @@ public class SoundEffectType { + public static final SoundEffectType w = new SoundEffectType(1.0F, 1.0F, SoundEffects.BLOCK_LANTERN_BREAK, SoundEffects.BLOCK_LANTERN_STEP, SoundEffects.BLOCK_LANTERN_PLACE, SoundEffects.BLOCK_LANTERN_HIT, SoundEffects.BLOCK_LANTERN_FALL); public final float x; -- private final SoundEffect y; -+ private final SoundEffect y; public final SoundEffect getBreakSound() { return this.y; } // Paper - OBFHELPER - private final SoundEffect z; + public final float y; +- private final SoundEffect z; ++ private final SoundEffect z; public final SoundEffect getBreakSound() { return this.z; } // Paper - OBFHELPER private final SoundEffect A; -- private final SoundEffect B; -+ private final SoundEffect B; public final SoundEffect getHitSound() { return this.B; } // Paper - OBFHELPER - private final SoundEffect C; + private final SoundEffect B; +- private final SoundEffect C; ++ private final SoundEffect C; public final SoundEffect getHitSound() { return this.B; } // Paper - OBFHELPER + private final SoundEffect D; public SoundEffectType(float f, float f1, SoundEffect soundeffect, SoundEffect soundeffect1, SoundEffect soundeffect2, SoundEffect soundeffect3, SoundEffect soundeffect4) { -@@ -50,14 +50,17 @@ public class SoundEffectType { - return this.x; +@@ -51,14 +51,17 @@ public class SoundEffectType { + return this.y; } + public final SoundEffect getStepSound() { return this.d(); } // Paper - OBFHELPER public SoundEffect d() { - return this.z; + return this.A; } + public final SoundEffect getPlaceSound() { return this.e(); } // Paper - OBFHELPER public SoundEffect e() { - return this.A; + return this.B; } + public final SoundEffect getFallSound() { return this.g(); } // Paper - OBFHELPER public SoundEffect g() { - return this.C; + return this.D; } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index da3c50c70..d9749adb7 100644 +index 887ade5e8..aef8dd169 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -694,4 +694,11 @@ public class CraftBlock implements Block { +@@ -696,4 +696,11 @@ public class CraftBlock implements Block { AxisAlignedBB aabb = shape.getBoundingBox(); return new BoundingBox(getX() + aabb.minX, getY() + aabb.minY, getZ() + aabb.minZ, getX() + aabb.maxX, getY() + aabb.maxY, getZ() + aabb.maxZ); } @@ -112,5 +112,5 @@ index da3c50c70..d9749adb7 100644 + // Paper end } -- -2.24.0 +2.24.1 diff --git a/Spigot-Server-Patches/0390-Chunk-debug-command.patch b/Spigot-Server-Patches/0380-Chunk-debug-command.patch similarity index 96% rename from Spigot-Server-Patches/0390-Chunk-debug-command.patch rename to Spigot-Server-Patches/0380-Chunk-debug-command.patch index ae8bd6f69e..d0823a3108 100644 --- a/Spigot-Server-Patches/0390-Chunk-debug-command.patch +++ b/Spigot-Server-Patches/0380-Chunk-debug-command.patch @@ -1,4 +1,4 @@ -From 088a41c5187b453e76e79602312b89ae1bcfac13 Mon Sep 17 00:00:00 2001 +From 1126822c11025916fb4dc7d2d43da654baa53c60 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 1 Jun 2019 13:00:55 -0700 Subject: [PATCH] Chunk debug command @@ -185,7 +185,7 @@ index d704fc79c..09efbf725 100644 * Ported from MinecraftForge - author: LexManos - License: LGPLv2.1 */ diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 0ce2d6d0f..162700313 100644 +index 038b7b68d..9b2bafdbd 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -22,7 +22,7 @@ import org.apache.logging.log4j.Logger; @@ -399,7 +399,7 @@ index ec3732193..23d1935dd 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 7407c1a56..14a176d61 100644 +index 3c6fe0596..43d9a5634 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -26,7 +26,7 @@ public class PlayerChunk { @@ -412,10 +412,10 @@ index 7407c1a56..14a176d61 100644 private int dirtyCount; private int r; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 67d011745..493770bf6 100644 +index 5fd001170..827831aab 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -57,7 +57,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -58,7 +58,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final Long2ObjectLinkedOpenHashMap updatingChunks = new Long2ObjectLinkedOpenHashMap(); public volatile Long2ObjectLinkedOpenHashMap visibleChunks; private final Long2ObjectLinkedOpenHashMap pendingUnload; @@ -424,17 +424,17 @@ index 67d011745..493770bf6 100644 public final WorldServer world; private final LightEngineThreaded lightEngine; private final IAsyncTaskHandler executor; -@@ -70,7 +70,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -71,7 +71,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final Mailbox> mailboxWorldGen; private final Mailbox> mailboxMain; public final WorldLoadListener worldLoadListener; - public final PlayerChunkMap.a chunkDistanceManager; + public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER - private final AtomicInteger v; + private final AtomicInteger u; private final DefinedStructureManager definedStructureManager; - private final File x; + private final File w; diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java -index 0430ca535..badbe6c19 100644 +index 77bb6b092..7a8397815 100644 --- a/src/main/java/net/minecraft/server/Ticket.java +++ b/src/main/java/net/minecraft/server/Ticket.java @@ -6,8 +6,8 @@ public final class Ticket implements Comparable> { @@ -442,13 +442,13 @@ index 0430ca535..badbe6c19 100644 private final TicketType a; private final int b; - public final T identifier; -- private final long d; +- private long d; + public final T identifier; public final T getObjectReason() { return this.identifier; } // Paper - OBFHELPER -+ private final long d; public final long getCreationTick() { return this.d; } // Paper - OBFHELPER ++ private long d; public final long getCreationTick() { return this.d; } // Paper - OBFHELPER - protected Ticket(TicketType tickettype, int i, T t0, long j) { + protected Ticket(TicketType tickettype, int i, T t0) { this.a = tickettype; -@@ -52,6 +52,7 @@ public final class Ticket implements Comparable> { +@@ -51,6 +51,7 @@ public final class Ticket implements Comparable> { return this.a; } @@ -457,5 +457,5 @@ index 0430ca535..badbe6c19 100644 return this.b; } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0391-incremental-chunk-saving.patch b/Spigot-Server-Patches/0381-incremental-chunk-saving.patch similarity index 94% rename from Spigot-Server-Patches/0391-incremental-chunk-saving.patch rename to Spigot-Server-Patches/0381-incremental-chunk-saving.patch index c07e61d733..0fff4ebda9 100644 --- a/Spigot-Server-Patches/0391-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0381-incremental-chunk-saving.patch @@ -1,11 +1,11 @@ -From 789d6e1227d70f686850dd8e954de4106a9cc709 Mon Sep 17 00:00:00 2001 +From 36505b571ac2b7a8b2353960f29c818d5e880384 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 9 Jun 2019 03:53:22 +0100 Subject: [PATCH] incremental chunk saving diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9ff115294..e98b1f243 100644 +index 332f20ce8..f5ed0a698 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -494,4 +494,19 @@ public class PaperWorldConfig { @@ -29,7 +29,7 @@ index 9ff115294..e98b1f243 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index ee8f80174..2003522d9 100644 +index 64c327669..14ec31f0a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess { @@ -39,10 +39,10 @@ index ee8f80174..2003522d9 100644 - private long lastSaved; + public long lastSaved; // Paper private volatile boolean s; - private long t; + private long inhabitedTime; @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 02dfd91c5..8689e0f9f 100644 +index 9b2bafdbd..f138b112f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -335,6 +335,15 @@ public class ChunkProviderServer extends IChunkProvider { @@ -62,10 +62,10 @@ index 02dfd91c5..8689e0f9f 100644 public void close() throws IOException { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a6f112bd0..5238a1a7c 100644 +index 0a7648381..8e15aba7f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -165,6 +165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; @@ -73,7 +73,7 @@ index a6f112bd0..5238a1a7c 100644 public File bukkitDataPackFolder; public CommandDispatcher vanillaCommandDispatcher; private boolean forceTicks; -@@ -1108,14 +1109,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 493770bf6..2be6fa0f0 100644 +index 827831aab..4379434f6 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -297,6 +297,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -298,6 +298,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { super.close(); } @@ -149,11 +149,11 @@ index 493770bf6..2be6fa0f0 100644 if (flag) { List list = (List) this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).peek(PlayerChunk::m).collect(Collectors.toList()); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3acea575d..7c5349b17 100644 +index c28c0431a..0fd3cb54b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -791,11 +791,44 @@ public class WorldServer extends World { - return this.worldProvider.d(); + return this.worldProvider.c(); } + // Paper start - derived from below @@ -199,5 +199,5 @@ index 3acea575d..7c5349b17 100644 if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0392-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0382-Catch-exceptions-from-dispenser-entity-spawns.patch similarity index 92% rename from Spigot-Server-Patches/0392-Catch-exceptions-from-dispenser-entity-spawns.patch rename to Spigot-Server-Patches/0382-Catch-exceptions-from-dispenser-entity-spawns.patch index 335959bc28..0b36e786d6 100644 --- a/Spigot-Server-Patches/0392-Catch-exceptions-from-dispenser-entity-spawns.patch +++ b/Spigot-Server-Patches/0382-Catch-exceptions-from-dispenser-entity-spawns.patch @@ -1,11 +1,11 @@ -From a911f20edaee814e98234f9f00ab408520f5fa70 Mon Sep 17 00:00:00 2001 +From d10bee4a09233c43f6d1f101d41dc95f26b8de53 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 10 Jun 2019 09:36:40 +0100 Subject: [PATCH] Catch exceptions from dispenser entity spawns diff --git a/src/main/java/net/minecraft/server/IDispenseBehavior.java b/src/main/java/net/minecraft/server/IDispenseBehavior.java -index 976c72208..fe3d9d5fa 100644 +index 8c4a8b4ba..83877d672 100644 --- a/src/main/java/net/minecraft/server/IDispenseBehavior.java +++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java @@ -163,7 +163,14 @@ public interface IDispenseBehavior { @@ -24,5 +24,5 @@ index 976c72208..fe3d9d5fa 100644 // CraftBukkit end return itemstack; -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0394-Show-blockstate-location-if-we-failed-to-read-it.patch b/Spigot-Server-Patches/0383-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 95% rename from Spigot-Server-Patches/0394-Show-blockstate-location-if-we-failed-to-read-it.patch rename to Spigot-Server-Patches/0383-Show-blockstate-location-if-we-failed-to-read-it.patch index 13a8b31656..27da1fe003 100644 --- a/Spigot-Server-Patches/0394-Show-blockstate-location-if-we-failed-to-read-it.patch +++ b/Spigot-Server-Patches/0383-Show-blockstate-location-if-we-failed-to-read-it.patch @@ -1,4 +1,4 @@ -From 95a4a73b24ce202917135f029e05fdbea3566a74 Mon Sep 17 00:00:00 2001 +From 07551ce735f8c62bc07a180b666ea6ad9368e404 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 15 Jun 2019 10:28:25 -0700 Subject: [PATCH] Show blockstate location if we failed to read it @@ -33,5 +33,5 @@ index f6401e2cd..3e22d558e 100644 public final boolean snapshotDisabled; // Paper -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0395-Log-other-thread-in-DataPaletteBlock-lock-failure.patch b/Spigot-Server-Patches/0384-Log-other-thread-in-DataPaletteBlock-lock-failure.patch similarity index 96% rename from Spigot-Server-Patches/0395-Log-other-thread-in-DataPaletteBlock-lock-failure.patch rename to Spigot-Server-Patches/0384-Log-other-thread-in-DataPaletteBlock-lock-failure.patch index a269d74fbc..56e3cca2cf 100644 --- a/Spigot-Server-Patches/0395-Log-other-thread-in-DataPaletteBlock-lock-failure.patch +++ b/Spigot-Server-Patches/0384-Log-other-thread-in-DataPaletteBlock-lock-failure.patch @@ -1,4 +1,4 @@ -From 62aa6178ba9d9f06db5d13ef1d6382cd8b16b5c6 Mon Sep 17 00:00:00 2001 +From 6b453ebf22ad7ede563e5cd0560b097e264d115b Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 21 Jun 2019 14:42:48 -0700 Subject: [PATCH] Log other thread in DataPaletteBlock lock failure @@ -22,7 +22,7 @@ index 000000000..a3b174618 + } +} diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index a3bb2e877..1e2bca1e0 100644 +index d5f5a5187..2c1d1b1a5 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java @@ -22,14 +22,17 @@ public class DataPaletteBlock implements DataPaletteExpandable { @@ -47,5 +47,5 @@ index a3bb2e877..1e2bca1e0 100644 crashreportsystemdetails.a("Thread dumps", (Object) s); -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0396-Use-ChunkStatus-cache-when-saving-protochunks.patch b/Spigot-Server-Patches/0385-Use-ChunkStatus-cache-when-saving-protochunks.patch similarity index 87% rename from Spigot-Server-Patches/0396-Use-ChunkStatus-cache-when-saving-protochunks.patch rename to Spigot-Server-Patches/0385-Use-ChunkStatus-cache-when-saving-protochunks.patch index 7e39539f83..761c4de0b2 100644 --- a/Spigot-Server-Patches/0396-Use-ChunkStatus-cache-when-saving-protochunks.patch +++ b/Spigot-Server-Patches/0385-Use-ChunkStatus-cache-when-saving-protochunks.patch @@ -1,4 +1,4 @@ -From ed1c70806a105bbdab1a54def039ed2e4f4307b4 Mon Sep 17 00:00:00 2001 +From dc460bf237dd914ca9485c60ffde346f290fa9fc Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 22 Jun 2019 04:20:47 -0700 Subject: [PATCH] Use ChunkStatus cache when saving protochunks @@ -7,10 +7,10 @@ The cache should contain the chunk status when saving. If not it will load it. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index eb49e9021..b04657356 100644 +index 4379434f6..93729eea2 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -774,8 +774,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -775,8 +775,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { NBTTagCompound nbttagcompound; if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) { @@ -24,5 +24,5 @@ index eb49e9021..b04657356 100644 } -- -2.24.0 +2.24.1 diff --git a/Spigot-Server-Patches/0397-Anti-Xray.patch b/Spigot-Server-Patches/0386-Anti-Xray.patch similarity index 97% rename from Spigot-Server-Patches/0397-Anti-Xray.patch rename to Spigot-Server-Patches/0386-Anti-Xray.patch index c3c19172c0..8dfc5a1d64 100644 --- a/Spigot-Server-Patches/0397-Anti-Xray.patch +++ b/Spigot-Server-Patches/0386-Anti-Xray.patch @@ -1,11 +1,11 @@ -From a226c1b147367c8bd55c5f0e9327ac1ee156837c Mon Sep 17 00:00:00 2001 +From 9dd828c0ae7071fcab9994e1c2e8c35c2b46b132 Mon Sep 17 00:00:00 2001 From: stonar96 Date: Mon, 20 Aug 2018 03:03:58 +0200 Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 55b78f54c..cfc4156bc 100644 +index f5ed0a698..363676348 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,11 @@ @@ -1181,7 +1181,7 @@ index 000000000..37093419c + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2003522d9..d604f96c1 100644 +index 14ec31f0a..863a2222f 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -315,7 +315,7 @@ public class Chunk implements IChunkAccess { @@ -1194,10 +1194,10 @@ index 2003522d9..d604f96c1 100644 } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 73f93e494..a02807411 100644 +index 6371f2f5b..17cacafe7 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -74,7 +74,7 @@ public class ChunkRegionLoader { +@@ -57,7 +57,7 @@ public class ChunkRegionLoader { byte b0 = nbttagcompound2.getByte("Y"); if (nbttagcompound2.hasKeyOfType("Palette", 9) && nbttagcompound2.hasKeyOfType("BlockStates", 12)) { @@ -1206,17 +1206,17 @@ index 73f93e494..a02807411 100644 chunksection.getBlocks().a(nbttagcompound2.getList("Palette", 10), nbttagcompound2.getLongArray("BlockStates")); chunksection.recalcBlockCounts(); -@@ -132,7 +132,7 @@ public class ChunkRegionLoader { +@@ -115,7 +115,7 @@ public class ChunkRegionLoader { loadEntities(nbttagcompound1, chunk); }); } else { - ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1); + ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, worldserver); // Paper - Anti-Xray + protochunk.a(biomestorage); object = protochunk; - protochunk.a(abiomebase); diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index ca2bf8b77..584b3e639 100644 +index 0d5deee36..4526527ac 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java @@ -6,21 +6,31 @@ public class ChunkSection { @@ -1227,7 +1227,7 @@ index ca2bf8b77..584b3e639 100644 + short nonEmptyBlockCount; // Paper - private -> package-private private short tickingBlockCount; private short e; - final DataPaletteBlock blockIds; // Paper - package + final DataPaletteBlock blockIds; public ChunkSection(int i) { - this(i, (short) 0, (short) 0, (short) 0); @@ -1255,7 +1255,7 @@ index ca2bf8b77..584b3e639 100644 public IBlockData getType(int i, int j, int k) { diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 1e2bca1e0..8fba1e2f3 100644 +index 2c1d1b1a5..44aed6727 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java @@ -3,6 +3,7 @@ package net.minecraft.server; @@ -1440,7 +1440,7 @@ index e156804f7..96a785af2 100644 public void a() { this.o(); diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index ef71a1feb..483317608 100644 +index 47710067a..654474341 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -1,5 +1,6 @@ @@ -1450,10 +1450,10 @@ index ef71a1feb..483317608 100644 import com.google.common.collect.Lists; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; -@@ -17,8 +18,11 @@ public class PacketPlayOutMapChunk implements Packet { - private byte[] e; private byte[] getData() { return this.e; } // Paper - OBFHELPER - private List f; - private boolean g; +@@ -20,8 +21,11 @@ public class PacketPlayOutMapChunk implements Packet { + private byte[] f; private byte[] getData() { return this.f; } // Paper - OBFHELPER + private List g; + private boolean h; + private volatile boolean ready; // Paper - Async-Anti-Xray - Ready flag for the network manager - public PacketPlayOutMapChunk() {} @@ -1463,7 +1463,7 @@ index ef71a1feb..483317608 100644 // Paper start private final java.util.List extraPackets = new java.util.ArrayList<>(); -@@ -30,6 +34,12 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -33,6 +37,12 @@ public class PacketPlayOutMapChunk implements Packet { } // Paper end public PacketPlayOutMapChunk(Chunk chunk, int i) { @@ -1476,41 +1476,37 @@ index ef71a1feb..483317608 100644 ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); this.a = chunkcoordintpair.x; -@@ -48,7 +58,12 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -55,7 +65,12 @@ public class PacketPlayOutMapChunk implements Packet { } - this.e = new byte[this.a(chunk, i)]; -- this.c = this.a(new PacketDataSerializer(this.i()), chunk, i); + this.f = new byte[this.a(chunk, i)]; +- this.c = this.a(new PacketDataSerializer(this.j()), chunk, i); + // Paper start - Anti-Xray - Add chunk packet info + if (chunkPacketInfo != null) { + chunkPacketInfo.setData(this.getData()); + } + // Paper end -+ this.c = this.writeChunk(new PacketDataSerializer(this.i()), chunk, i, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info - this.f = Lists.newArrayList(); ++ this.c = this.writeChunk(new PacketDataSerializer(this.j()), chunk, i, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info + this.g = Lists.newArrayList(); iterator = chunk.getTileEntities().entrySet().iterator(); int totalSigns = 0; // Paper -@@ -74,9 +89,19 @@ public class PacketPlayOutMapChunk implements Packet { - this.f.add(nbttagcompound); +@@ -82,7 +97,15 @@ public class PacketPlayOutMapChunk implements Packet { } } -+ chunk.world.chunkPacketBlockController.modifyBlocks(this, chunkPacketInfo, forceLoad, null); // Paper - Anti-Xray - Modify blocks -+ } + // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag + public boolean isReady() { + return this.ready; - } - ++ } ++ + public void setReady(boolean ready) { + this.ready = ready; -+ } + } + // Paper end -+ + @Override public void a(PacketDataSerializer packetdataserializer) throws IOException { - this.a = packetdataserializer.readInt(); -@@ -135,6 +160,11 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -150,6 +173,11 @@ public class PacketPlayOutMapChunk implements Packet { public int writeChunk(PacketDataSerializer packetDataSerializer, Chunk chunk, int chunkSectionSelector) { return this.a(packetDataSerializer, chunk, chunkSectionSelector); } // Paper - OBFHELPER public int a(PacketDataSerializer packetdataserializer, Chunk chunk, int i) { @@ -1522,7 +1518,7 @@ index ef71a1feb..483317608 100644 int j = 0; ChunkSection[] achunksection = chunk.getSections(); int k = 0; -@@ -146,7 +176,8 @@ public class PacketPlayOutMapChunk implements Packet { +@@ -159,9 +187,12 @@ public class PacketPlayOutMapChunk implements Packet { if (chunksection != Chunk.a && (!this.f() || !chunksection.c()) && (i & 1 << k) != 0) { j |= 1 << k; @@ -1531,12 +1527,16 @@ index ef71a1feb..483317608 100644 + chunksection.getBlocks().writeDataPaletteBlock(packetdataserializer, chunkPacketInfo, k); // Paper - Anti-Xray - Add chunk packet info } } ++ chunk.world.chunkPacketBlockController.modifyBlocks(this, chunkPacketInfo, forceLoad, null); // Paper - Anti-Xray - Modify blocks ++ } + return j; + } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 98590e233..af934ef8b 100644 +index 43d9a5634..615d27863 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -176,6 +176,11 @@ public class PlayerChunk { +@@ -163,6 +163,11 @@ public class PlayerChunk { World world = chunk.getWorld(); if (this.dirtyCount == 64) { @@ -1548,7 +1548,7 @@ index 98590e233..af934ef8b 100644 this.s = -1; } -@@ -208,7 +213,7 @@ public class PlayerChunk { +@@ -195,7 +200,7 @@ public class PlayerChunk { this.a(world, blockposition); } } else if (this.dirtyCount == 64) { @@ -1558,10 +1558,10 @@ index 98590e233..af934ef8b 100644 this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, chunk), false); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index b04657356..a5df9fee6 100644 +index 93729eea2..fc6436c4f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -539,7 +539,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -540,7 +540,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunkMap.LOGGER.error("Couldn't load chunk {}", chunkcoordintpair, exception); } @@ -1570,7 +1570,7 @@ index b04657356..a5df9fee6 100644 }, this.executor); } -@@ -1247,7 +1247,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1201,7 +1201,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private void a(EntityPlayer entityplayer, Packet[] apacket, Chunk chunk) { if (apacket[0] == null) { @@ -1580,10 +1580,10 @@ index b04657356..a5df9fee6 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index a36aba015..f04fc366f 100644 +index 18ff6dd68..8720dd120 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -253,6 +253,8 @@ public class PlayerInteractManager { +@@ -264,6 +264,8 @@ public class PlayerInteractManager { } } @@ -1591,12 +1591,12 @@ index a36aba015..f04fc366f 100644 + this.world.chunkPacketBlockController.onPlayerLeftClickBlock(this, blockposition, enumdirection); // Paper - Anti-Xray } - public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype) { + public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype, String s) { diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index 6bdd7dda0..7bad12eb0 100644 +index 39339fa27..f376e2106 100644 --- a/src/main/java/net/minecraft/server/ProtoChunk.java +++ b/src/main/java/net/minecraft/server/ProtoChunk.java -@@ -44,16 +44,28 @@ public class ProtoChunk implements IChunkAccess { +@@ -45,16 +45,28 @@ public class ProtoChunk implements IChunkAccess { private long s; private final Map t; private volatile boolean u; @@ -1626,7 +1626,7 @@ index 6bdd7dda0..7bad12eb0 100644 this.f = Maps.newEnumMap(HeightMap.Type.class); this.g = ChunkStatus.EMPTY; this.h = Maps.newHashMap(); -@@ -206,7 +218,7 @@ public class ProtoChunk implements IChunkAccess { +@@ -207,7 +219,7 @@ public class ProtoChunk implements IChunkAccess { public ChunkSection a(int i) { if (this.j[i] == Chunk.a) { @@ -1636,7 +1636,7 @@ index 6bdd7dda0..7bad12eb0 100644 return this.j[i]; diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java -index 157ca6a7e..9c114d2d3 100644 +index a905a29e7..335b64435 100644 --- a/src/main/java/net/minecraft/server/TicketType.java +++ b/src/main/java/net/minecraft/server/TicketType.java @@ -21,6 +21,7 @@ public class TicketType { @@ -1648,7 +1648,7 @@ index 157ca6a7e..9c114d2d3 100644 public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3f71ca9e4..e31ffdb0d 100644 +index 9ad76ab32..39725335d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1660,7 +1660,7 @@ index 3f71ca9e4..e31ffdb0d 100644 import com.destroystokyo.paper.event.server.ServerExceptionEvent; import com.destroystokyo.paper.exception.ServerInternalException; import com.google.common.base.MoreObjects; -@@ -93,6 +95,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -92,6 +94,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper @@ -1668,7 +1668,7 @@ index 3f71ca9e4..e31ffdb0d 100644 public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPosition lastPhysicsProblem; // Spigot -@@ -134,6 +137,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -133,6 +136,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper @@ -1676,7 +1676,7 @@ index 3f71ca9e4..e31ffdb0d 100644 this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit -@@ -414,6 +418,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -346,6 +350,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit end IBlockData iblockdata1 = chunk.setType(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag @@ -1710,5 +1710,5 @@ index 7772d5900..4570ed999 100644 return section; } -- -2.24.0 +2.24.1 diff --git a/Spigot-Server-Patches/0398-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0387-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 92% rename from Spigot-Server-Patches/0398-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to Spigot-Server-Patches/0387-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index d6cd0ef1b7..71bc8bb402 100644 --- a/Spigot-Server-Patches/0398-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/Spigot-Server-Patches/0387-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -1,4 +1,4 @@ -From 7dff966d78ac7e89c7b4ecfe65bdfc6fca5e4584 Mon Sep 17 00:00:00 2001 +From 960288ec426082f000ad1defb38518f42a70a6a0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 01:01:32 -0400 Subject: [PATCH] Only count Natural Spawned mobs towards natural spawn mob @@ -17,7 +17,7 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e9d1b47ad..59671c5c3 100644 +index 363676348..0a7e6fff1 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -514,6 +514,16 @@ public class PaperWorldConfig { @@ -38,10 +38,10 @@ index e9d1b47ad..59671c5c3 100644 public boolean asynchronous; public EngineMode engineMode; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7c5349b17..0761f705b 100644 +index 0fd3cb54b..a5cce8f4e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -934,6 +934,13 @@ public class WorldServer extends World { +@@ -933,6 +933,13 @@ public class WorldServer extends World { EnumCreatureType enumcreaturetype = entity.getEntityType().e(); if (enumcreaturetype != EnumCreatureType.MISC && this.getChunkProvider().b(entity)) { @@ -56,5 +56,5 @@ index 7c5349b17..0761f705b 100644 } } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0400-Configurable-projectile-relative-velocity.patch b/Spigot-Server-Patches/0388-Configurable-projectile-relative-velocity.patch similarity index 95% rename from Spigot-Server-Patches/0400-Configurable-projectile-relative-velocity.patch rename to Spigot-Server-Patches/0388-Configurable-projectile-relative-velocity.patch index 88689cfca9..7b7809139a 100644 --- a/Spigot-Server-Patches/0400-Configurable-projectile-relative-velocity.patch +++ b/Spigot-Server-Patches/0388-Configurable-projectile-relative-velocity.patch @@ -1,4 +1,4 @@ -From 6343919aa4c2103ca7f080a2c485ad1fcb300119 Mon Sep 17 00:00:00 2001 +From 291a6e7746ad8a74727c820e144e634197bcd63d Mon Sep 17 00:00:00 2001 From: Lucavon Date: Tue, 23 Jul 2019 20:29:20 -0500 Subject: [PATCH] Configurable projectile relative velocity @@ -25,7 +25,7 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 59671c5c3..56ca65819 100644 +index 0a7e6fff1..097b623fd 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -562,4 +562,9 @@ public class PaperWorldConfig { @@ -39,7 +39,7 @@ index 59671c5c3..56ca65819 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index a9575d310..5f3e1ccb4 100644 +index 0c3664758..288259e49 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -85,7 +85,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { @@ -52,7 +52,7 @@ index a9575d310..5f3e1ccb4 100644 @Override diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 18d28a151..bd4ca73f6 100644 +index 6c091b680..f5c8074dc 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -43,7 +43,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile { @@ -65,5 +65,5 @@ index 18d28a151..bd4ca73f6 100644 @Override -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0401-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0389-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 73% rename from Spigot-Server-Patches/0401-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to Spigot-Server-Patches/0389-Mark-entities-as-being-ticked-when-notifying-navigat.patch index 06f437ea4a..247d58f9cf 100644 --- a/Spigot-Server-Patches/0401-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0389-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -1,22 +1,22 @@ -From b117edd7ceca8c12db41bab25d92b3f5ad64d3ec Mon Sep 17 00:00:00 2001 +From e645f66b705efad107d9836e81944d476077750b Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 28 Jul 2019 00:51:11 +0100 Subject: [PATCH] Mark entities as being ticked when notifying navigation diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0761f705be..5df9b0ffda 100644 +index a5cce8f4e..8ea9b34a1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1371,6 +1371,7 @@ public class WorldServer extends World { +@@ -1370,6 +1370,7 @@ public class WorldServer extends World { VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition); if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) { + boolean wasTicking = this.tickingEntities; this.tickingEntities = true; // Paper - Iterator iterator = this.H.iterator(); + Iterator iterator = this.navigators.iterator(); while (iterator.hasNext()) { -@@ -1381,6 +1382,7 @@ public class WorldServer extends World { +@@ -1380,6 +1381,7 @@ public class WorldServer extends World { } } @@ -25,5 +25,5 @@ index 0761f705be..5df9b0ffda 100644 } -- -2.22.1 +2.24.1 diff --git a/Spigot-Server-Patches/0402-offset-item-frame-ticking.patch b/Spigot-Server-Patches/0390-offset-item-frame-ticking.patch similarity index 88% rename from Spigot-Server-Patches/0402-offset-item-frame-ticking.patch rename to Spigot-Server-Patches/0390-offset-item-frame-ticking.patch index 94676f7b94..4bd253dcf7 100644 --- a/Spigot-Server-Patches/0402-offset-item-frame-ticking.patch +++ b/Spigot-Server-Patches/0390-offset-item-frame-ticking.patch @@ -1,11 +1,11 @@ -From 5523a5eb1fe8396a208694a2650d268ec0a8e999 Mon Sep 17 00:00:00 2001 +From a4df21cb5dc107cff27108049b3a49e2af89bc65 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Tue, 30 Jul 2019 03:17:16 +0500 Subject: [PATCH] offset item frame ticking diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java -index 3b282a18a..2b4a849f4 100644 +index e9cde9c6e..04864a36e 100644 --- a/src/main/java/net/minecraft/server/EntityHanging.java +++ b/src/main/java/net/minecraft/server/EntityHanging.java @@ -15,7 +15,7 @@ public abstract class EntityHanging extends Entity { @@ -18,5 +18,5 @@ index 3b282a18a..2b4a849f4 100644 protected EnumDirection direction; -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0404-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0391-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 82% rename from Spigot-Server-Patches/0404-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0391-Avoid-hopper-searches-if-there-are-no-items.patch index 0608558ffe..ea801a86a0 100644 --- a/Spigot-Server-Patches/0404-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0391-Avoid-hopper-searches-if-there-are-no-items.patch @@ -1,4 +1,4 @@ -From 60e6a269e9cf67ebe769d2e6885a9afcf826187b Mon Sep 17 00:00:00 2001 +From f3e7d4a4a9eaa8387255e654db4d164c6cc0cc5b Mon Sep 17 00:00:00 2001 From: CullanP Date: Thu, 3 Mar 2016 02:13:38 -0600 Subject: [PATCH] Avoid hopper searches if there are no items @@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index d604f96c1..67dc837f4 100644 +index 863a2222f..f2a04cb6a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -84,6 +84,10 @@ public class Chunk implements IChunkAccess { @@ -27,8 +27,8 @@ index d604f96c1..67dc837f4 100644 + private final int[] inventoryEntityCounts = new int[16]; // Paper end - public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeBase[] abiomebase, ChunkConverter chunkconverter, TickList ticklist, TickList ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer consumer) { -@@ -436,6 +440,13 @@ public class Chunk implements IChunkAccess { + public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage, ChunkConverter chunkconverter, TickList ticklist, TickList ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer consumer) { +@@ -430,6 +434,13 @@ public class Chunk implements IChunkAccess { entity.chunkY = k; entity.chunkZ = this.loc.z; this.entitySlices[k].add(entity); @@ -42,7 +42,7 @@ index d604f96c1..67dc837f4 100644 entity.entitySlice = this.entitySlices[k]; // Paper this.markDirty(); // Paper } -@@ -466,6 +477,11 @@ public class Chunk implements IChunkAccess { +@@ -460,6 +471,11 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } @@ -54,23 +54,7 @@ index d604f96c1..67dc837f4 100644 entityCounts.decrement(entity.getMinecraftKeyString()); this.markDirty(); // Paper // Paper end -@@ -715,6 +731,15 @@ public class Chunk implements IChunkAccess { - for (int k = i; k <= j; ++k) { - Iterator iterator = this.entitySlices[k].iterator(); // Spigot - -+ // Paper start - Don't search for inventories if we have none, and that is all we want -+ /* -+ * We check if they want inventories by seeing if it is the static `IEntitySelector.c` -+ * -+ * Make sure the inventory selector stays in sync. -+ * It should be the one that checks `var1 instanceof IInventory && var1.isAlive()` -+ */ -+ if (predicate == IEntitySelector.isInventory() && inventoryEntityCounts[k] <= 0) continue; -+ // Paper end - while (iterator.hasNext()) { - Entity entity = (Entity) iterator.next(); - if (entity.shouldBeRemoved) continue; // Paper -@@ -734,7 +759,18 @@ public class Chunk implements IChunkAccess { +@@ -727,9 +743,29 @@ public class Chunk implements IChunkAccess { i = MathHelper.clamp(i, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); @@ -88,9 +72,20 @@ index d604f96c1..67dc837f4 100644 + if (counts != null && counts[k] <= 0) continue; // Paper - Don't check a chunk if it doesn't have the type we are looking for Iterator iterator = this.entitySlices[k].iterator(); // Spigot ++ // Paper start - Don't search for inventories if we have none, and that is all we want ++ /* ++ * We check if they want inventories by seeing if it is the static `IEntitySelector.c` ++ * ++ * Make sure the inventory selector stays in sync. ++ * It should be the one that checks `var1 instanceof IInventory && var1.isAlive()` ++ */ ++ if (predicate == IEntitySelector.isInventory() && inventoryEntityCounts[k] <= 0) continue; ++ // Paper end while (iterator.hasNext()) { + T t0 = (T) iterator.next(); // CraftBukkit - decompile error + if (t0.shouldBeRemoved) continue; // Paper diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 56488b78d..56739e6ed 100644 +index 498f38109..a2d1ef360 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -11,6 +11,7 @@ public final class IEntitySelector { @@ -102,5 +97,5 @@ index 56488b78d..56739e6ed 100644 return entity instanceof IInventory && entity.isAlive(); }; -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0405-Fixed-MC-156852.patch b/Spigot-Server-Patches/0392-Fixed-MC-156852.patch similarity index 70% rename from Spigot-Server-Patches/0405-Fixed-MC-156852.patch rename to Spigot-Server-Patches/0392-Fixed-MC-156852.patch index e85c66986d..d3ff46d3f1 100644 --- a/Spigot-Server-Patches/0405-Fixed-MC-156852.patch +++ b/Spigot-Server-Patches/0392-Fixed-MC-156852.patch @@ -1,4 +1,4 @@ -From abe28371a0b9968f867f90f5f1c8a49f52c49588 Mon Sep 17 00:00:00 2001 +From 9090684e6b50628d9833921e66027887c7906bde Mon Sep 17 00:00:00 2001 From: TheGreatKetchup Date: Thu, 1 Aug 2019 21:24:30 -0400 Subject: [PATCH] Fixed MC-156852 @@ -12,17 +12,18 @@ issue in 1.8-1.12. Originally solved by Gnembon on MC-5694 at bugs.mojang.com diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index e5e9de542..c96564a59 100644 +index 8720dd120..cc77dd8e5 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -218,6 +218,7 @@ public class PlayerInteractManager { +@@ -223,7 +223,7 @@ public class PlayerInteractManager { int j = (int) (f * 10.0F); this.world.a(this.player.getId(), blockposition, j); +- this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(blockposition, this.world.getType(blockposition), packetplayinblockdig_enumplayerdigtype, true, "actual start of destroying")); + this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition)); // Paper - fixes MC-156852 - this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(blockposition, this.world.getType(blockposition), packetplayinblockdig_enumplayerdigtype, true)); this.l = j; } + } else if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.STOP_DESTROY_BLOCK) { -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0406-Implement-alternative-item-despawn-rate.patch b/Spigot-Server-Patches/0393-Implement-alternative-item-despawn-rate.patch similarity index 92% rename from Spigot-Server-Patches/0406-Implement-alternative-item-despawn-rate.patch rename to Spigot-Server-Patches/0393-Implement-alternative-item-despawn-rate.patch index 9f6f78685f..b0e5b21350 100644 --- a/Spigot-Server-Patches/0406-Implement-alternative-item-despawn-rate.patch +++ b/Spigot-Server-Patches/0393-Implement-alternative-item-despawn-rate.patch @@ -1,11 +1,11 @@ -From ded4f6aae9c22c6a493c2eb1074a86d26f017cd0 Mon Sep 17 00:00:00 2001 +From b0adc134e06f684b0d3fa9a17033c9eee9906da0 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Mon, 3 Jun 2019 02:02:39 -0400 Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 56ca65819..b1ad22c9f 100644 +index 097b623fd..d0f5b2ab7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,12 +1,17 @@ @@ -80,10 +80,10 @@ index 56ca65819..b1ad22c9f 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index bc7e706d1..df26cef6a 100644 +index a0d1e7fd2..e61af3f5e 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java -@@ -5,6 +5,7 @@ import java.util.List; +@@ -6,6 +6,7 @@ import java.util.Objects; import java.util.UUID; import javax.annotation.Nullable; // CraftBukkit start @@ -91,7 +91,7 @@ index bc7e706d1..df26cef6a 100644 import org.bukkit.event.entity.EntityPickupItemEvent; import org.bukkit.event.player.PlayerPickupItemEvent; // CraftBukkit end -@@ -127,7 +128,7 @@ public class EntityItem extends Entity { +@@ -128,7 +129,7 @@ public class EntityItem extends Entity { } } @@ -100,7 +100,7 @@ index bc7e706d1..df26cef6a 100644 // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -151,7 +152,7 @@ public class EntityItem extends Entity { +@@ -152,7 +153,7 @@ public class EntityItem extends Entity { this.lastTick = MinecraftServer.currentTick; // CraftBukkit end @@ -109,10 +109,10 @@ index bc7e706d1..df26cef6a 100644 // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -474,9 +475,16 @@ public class EntityItem extends Entity { +@@ -478,9 +479,16 @@ public class EntityItem extends Entity { - public void u() { - this.p(); + public void s() { + this.o(); - this.age = world.spigotConfig.itemDespawnRate - 1; // Spigot + this.age = this.getDespawnRate() - 1; // Spigot // Paper } @@ -125,8 +125,8 @@ index bc7e706d1..df26cef6a 100644 + // Paper end + @Override - public Packet N() { + public Packet L() { return new PacketPlayOutSpawnEntity(this); -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0407-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch similarity index 64% rename from Spigot-Server-Patches/0407-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename to Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index 098dd17a46..4e70964051 100644 --- a/Spigot-Server-Patches/0407-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/Spigot-Server-Patches/0394-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -1,4 +1,4 @@ -From d4d1dd1858ad3f51cd07eaac1ff5d799d50b1b79 Mon Sep 17 00:00:00 2001 +From 89e83fa62fab94319e8639bbdadf0c9656bcaef1 Mon Sep 17 00:00:00 2001 From: Paul Sauve Date: Sun, 14 Jul 2019 21:05:03 -0500 Subject: [PATCH] Do less work if we have a custom Bukkit generator @@ -7,23 +7,30 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 5df9b0ffda..1330956655 100644 +index 8ea9b34a1..7b89b509a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -698,12 +698,6 @@ public class WorldServer extends World { +@@ -707,12 +707,13 @@ public class WorldServer extends World { } else if (this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { this.worldData.setSpawn(BlockPosition.ZERO.up()); } else { -- WorldChunkManager worldchunkmanager = this.chunkProvider.getChunkGenerator().getWorldChunkManager(); +- WorldChunkManager worldchunkmanager = this.getChunkProvider().getChunkGenerator().getWorldChunkManager(); - List list = worldchunkmanager.a(); - Random random = new Random(this.getSeed()); -- BlockPosition blockposition = worldchunkmanager.a(0, 0, 256, list, random); +- BlockPosition blockposition = worldchunkmanager.a(0, this.getSeaLevel(), 0, 256, list, random); - ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); - ++// Paper start - moved down ++// WorldChunkManager worldchunkmanager = this.getChunkProvider().getChunkGenerator().getWorldChunkManager(); ++// List list = worldchunkmanager.a(); ++// Random random = new Random(this.getSeed()); ++// BlockPosition blockposition = worldchunkmanager.a(0, this.getSeaLevel(), 0, 256, list, random); ++// ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); ++// Paper end // CraftBukkit start if (this.generator != null) { Random rand = new Random(this.getSeed()); -@@ -720,6 +714,14 @@ public class WorldServer extends World { +@@ -729,6 +730,13 @@ public class WorldServer extends World { } // CraftBukkit end @@ -31,13 +38,12 @@ index 5df9b0ffda..1330956655 100644 + WorldChunkManager worldchunkmanager = this.chunkProvider.getChunkGenerator().getWorldChunkManager(); + List list = worldchunkmanager.a(); + Random random = new Random(this.getSeed()); -+ BlockPosition blockposition = worldchunkmanager.a(0, 0, 256, list, random); ++ BlockPosition blockposition = worldchunkmanager.a(0, this.getSeaLevel(), 0, 256, list, random); + ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); + // Paper end -+ if (blockposition == null) { WorldServer.LOGGER.warn("Unable to find spawn biome"); } -- -2.22.1 +2.24.1 diff --git a/Spigot-Server-Patches/0408-Fix-MC-158900.patch b/Spigot-Server-Patches/0395-Fix-MC-158900.patch similarity index 89% rename from Spigot-Server-Patches/0408-Fix-MC-158900.patch rename to Spigot-Server-Patches/0395-Fix-MC-158900.patch index b026d997c5..3522aaf552 100644 --- a/Spigot-Server-Patches/0408-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0395-Fix-MC-158900.patch @@ -1,4 +1,4 @@ -From 4d67d77e8ac19306f0e4ce1d95f4607ec4901b17 Mon Sep 17 00:00:00 2001 +From 239628e9cf816978cd8a390b2584aa8d484f279e Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 13 Aug 2019 06:35:17 -0700 Subject: [PATCH] Fix MC-158900 @@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a183bb450..3cb443c4f 100644 +index 68e089a4b..f702619aa 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -512,8 +512,10 @@ public abstract class PlayerList { +@@ -513,8 +513,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); @@ -24,5 +24,5 @@ index a183bb450..3cb443c4f 100644 chatmessage = new ChatMessage("multiplayer.disconnect.banned.reason", new Object[]{gameprofilebanentry.getReason()}); if (gameprofilebanentry.getExpires() != null) { -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0411-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0396-implement-optional-per-player-mob-spawns.patch similarity index 93% rename from Spigot-Server-Patches/0411-implement-optional-per-player-mob-spawns.patch rename to Spigot-Server-Patches/0396-implement-optional-per-player-mob-spawns.patch index 7771a54d53..a38774f2cb 100644 --- a/Spigot-Server-Patches/0411-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0396-implement-optional-per-player-mob-spawns.patch @@ -1,33 +1,33 @@ -From 8eaa4bebd35c694f61907c6e728661f8e7ec4899 Mon Sep 17 00:00:00 2001 +From 3fae95d22e640e7029c5a134c308f1a677c17b85 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Mon, 19 Aug 2019 01:27:58 +0500 Subject: [PATCH] implement optional per player mob spawns diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index 8de6c4816..ddec62fbf 100644 +index 3a79cde59..431534f4f 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -@@ -74,6 +74,8 @@ public class WorldTimingsHandler { - public final Timing chunkUnloadPOISerialization; - public final Timing chunkUnloadDataSave; +@@ -63,6 +63,8 @@ public class WorldTimingsHandler { + public final Timing chunkRangeCheckBig; + public final Timing chunkRangeCheckSmall; + public final Timing playerMobDistanceMapUpdate; + public WorldTimingsHandler(World server) { String name = server.worldData.getName() +" - "; -@@ -144,6 +146,8 @@ public class WorldTimingsHandler { - chunkUnloadPrepareSave = Timings.ofSafe(name + "Chunk unload - Async Save Prepare"); - chunkUnloadPOISerialization = Timings.ofSafe(name + "Chunk unload - POI Data Serialization"); - chunkUnloadDataSave = Timings.ofSafe(name + "Chunk unload - Data Serialization"); +@@ -122,6 +124,8 @@ public class WorldTimingsHandler { + miscMobSpawning = Timings.ofSafe(name + "Mob spawning - Misc"); + chunkRangeCheckBig = Timings.ofSafe(name + "Chunk Tick Range - Big"); + chunkRangeCheckSmall = Timings.ofSafe(name + "Chunk Tick Range - Small"); + + playerMobDistanceMapUpdate = Timings.ofSafe(name + "Per Player Mob Spawning - Distance Map Update"); } public static Timing getTickList(WorldServer worldserver, String timingsType) { diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b1ad22c9f..09c8ea2ed 100644 +index d0f5b2ab7..f63525d67 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -620,4 +620,9 @@ public class PaperWorldConfig { @@ -547,10 +547,10 @@ index 000000000..4f13d3ff8 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 8d7971ad8..e7539dd79 100644 +index f138b112f..109c6ada8 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -555,7 +555,22 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -408,7 +408,22 @@ public class ChunkProviderServer extends IChunkProvider { this.world.timings.countNaturalMobs.startTiming(); // Paper - timings int l = this.chunkMapDistance.b(); EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values(); @@ -574,12 +574,12 @@ index 8d7971ad8..e7539dd79 100644 this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings this.world.getMethodProfiler().exit(); -@@ -620,8 +635,23 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -473,8 +488,23 @@ public class ChunkProviderServer extends IChunkProvider { if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) { int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits - if (object2intmap.getInt(enumcreaturetype) <= k1) { -- SpawnerCreature.a(enumcreaturetype, (World) this.world, chunk, blockposition); +- SpawnerCreature.a(enumcreaturetype, this.world, chunk, blockposition); + // Paper start - only allow spawns upto the limit per chunk and update count afterwards + int currEntityCount = worldMobCount[enumcreaturetype.ordinal()]; + int difference = k1 - currEntityCount; @@ -601,7 +601,7 @@ index 8d7971ad8..e7539dd79 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 106b1ffe0..fa79d0bed 100644 +index ca2398386..19ba79c65 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -80,6 +80,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -624,43 +624,43 @@ index 106b1ffe0..fa79d0bed 100644 } // Yes, this doesn't match Vanilla, but it's the best we can do for now. -@@ -1773,6 +1779,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.playerConnection.sendPacket(new PacketPlayOutUnloadChunk(chunkcoordintpair.x, chunkcoordintpair.z)); +@@ -1736,6 +1742,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + } -+ public SectionPosition getPlayerMapSection() { return this.M(); } // Paper - OBFHELPER - public SectionPosition M() { - return this.cv; ++ public SectionPosition getPlayerMapSection() { return this.K(); } // Paper - OBFHELPER + public SectionPosition K() { + return this.cs; } diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index a7fc34f85..612b9b7e3 100644 +index d49ad0308..2fb04e3e9 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -253,6 +253,7 @@ public class EntityTypes { - return this.be; +@@ -254,6 +254,7 @@ public class EntityTypes { + return this.bf; } + public EnumCreatureType getEnumCreatureType() { return this.e(); } // Paper - OBFHELPER public EnumCreatureType e() { - return this.ba; + return this.bb; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 31d106f95..59e74900f 100644 +index fc6436c4f..67a909859 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -77,7 +77,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -78,7 +78,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final PlayerMap playerMap; public final Int2ObjectMap trackedEntities; - private final Queue A; + private final Queue z; - private int viewDistance; + int viewDistance; // Paper - private -> package private + public final com.destroystokyo.paper.util.PlayerMobDistanceMap playerMobDistanceMap; // Paper // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback() public final CallbackExecutor callbackExecutor = new CallbackExecutor(); -@@ -135,6 +136,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.m = supplier; - this.n = new VillagePlace(new File(this.x, "poi"), datafixer, this.world); // Paper +@@ -136,6 +137,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + this.l = supplier; + this.m = new VillagePlace(new File(this.w, "poi"), datafixer); this.setViewDistance(i); + this.playerMobDistanceMap = this.world.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper + } @@ -684,7 +684,7 @@ index 31d106f95..59e74900f 100644 private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index c6ea37ffb..9d4a96ae4 100644 +index bcca7faed..57ce02a97 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -3,6 +3,7 @@ package net.minecraft.server; @@ -700,15 +700,15 @@ index c6ea37ffb..9d4a96ae4 100644 private static final Logger LOGGER = LogManager.getLogger(); + // Paper start - add maxSpawns parameter and return spawned mobs - public static void a(EnumCreatureType enumcreaturetype, World world, Chunk chunk, BlockPosition blockposition) { -+ spawnMobs(enumcreaturetype, world, chunk, blockposition, Integer.MAX_VALUE, null); + public static void a(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, BlockPosition blockposition) { ++ spawnMobs(enumcreaturetype, worldserver, chunk, blockposition, Integer.MAX_VALUE, null); + } -+ public static int spawnMobs(EnumCreatureType enumcreaturetype, World world, Chunk chunk, BlockPosition blockposition, int maxSpawns, Consumer trackEntity) { ++ public static int spawnMobs(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, BlockPosition blockposition, int maxSpawns, Consumer trackEntity) { + // Paper end - ChunkGenerator chunkgenerator = world.getChunkProvider().getChunkGenerator(); + ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator(); - int i = 0; + int i = 0; // Paper - force diff on name change - BlockPosition blockposition1 = getRandomPosition(world, chunk); + BlockPosition blockposition1 = getRandomPosition(worldserver, chunk); int j = blockposition1.getX(); int k = blockposition1.getY(); @@ -88,7 +94,7 @@ public final class SpawnerCreature { @@ -728,11 +728,11 @@ index c6ea37ffb..9d4a96ae4 100644 + return i; // Paper } - entityinsentient.setPositionRotation((double) f, (double) k, (double) f1, world.random.nextFloat() * 360.0F, 0.0F); + entityinsentient.setPositionRotation((double) f, (double) k, (double) f1, worldserver.random.nextFloat() * 360.0F, 0.0F); @@ -115,12 +121,16 @@ public final class SpawnerCreature { - groupdataentity = entityinsentient.prepare(world, world.getDamageScaler(new BlockPosition(entityinsentient)), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null); + groupdataentity = entityinsentient.prepare(worldserver, worldserver.getDamageScaler(new BlockPosition(entityinsentient)), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null); // CraftBukkit start - if (world.addEntity(entityinsentient, SpawnReason.NATURAL)) { + if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) { - ++i; + ++i; // Paper - force diff on name change ++i2; @@ -742,7 +742,7 @@ index c6ea37ffb..9d4a96ae4 100644 } + if (i >= maxSpawns) { return i; } // Paper // CraftBukkit end - if (i >= entityinsentient.dC()) { + if (i >= entityinsentient.getMaxSpawnGroup()) { - return; + return i; // Paper } @@ -757,10 +757,10 @@ index c6ea37ffb..9d4a96ae4 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 71939e808..bd1e4dbae 100644 +index 7b89b509a..fd42390d4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -999,7 +999,20 @@ public class WorldServer extends World { +@@ -923,7 +923,20 @@ public class WorldServer extends World { } public Object2IntMap l() { @@ -782,7 +782,7 @@ index 71939e808..bd1e4dbae 100644 ObjectIterator objectiterator = this.entitiesById.values().iterator(); while (objectiterator.hasNext()) { -@@ -1024,11 +1037,16 @@ public class WorldServer extends World { +@@ -948,11 +961,16 @@ public class WorldServer extends World { continue; } // Paper end @@ -802,5 +802,5 @@ index 71939e808..bd1e4dbae 100644 @Override -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0397-Prevent-consuming-the-wrong-itemstack.patch b/Spigot-Server-Patches/0397-Prevent-consuming-the-wrong-itemstack.patch new file mode 100644 index 0000000000..36385f4d18 --- /dev/null +++ b/Spigot-Server-Patches/0397-Prevent-consuming-the-wrong-itemstack.patch @@ -0,0 +1,48 @@ +From fb0baab3741afc9ca8a94a729e69c0d0cd9270de Mon Sep 17 00:00:00 2001 +From: kickash32 +Date: Mon, 19 Aug 2019 19:42:35 +0500 +Subject: [PATCH] Prevent consuming the wrong itemstack + + +diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java +index 1b5acf77e..d04ea03bc 100644 +--- a/src/main/java/net/minecraft/server/EntityLiving.java ++++ b/src/main/java/net/minecraft/server/EntityLiving.java +@@ -2890,10 +2890,13 @@ public abstract class EntityLiving extends Entity { + this.datawatcher.set(EntityLiving.ao, (byte) j); + } + +- public void c(EnumHand enumhand) { ++ // Paper start -- OBFHELPER and forwarder to method with forceUpdate parameter ++ public void c(EnumHand enumhand) { this.updateActiveItem(enumhand, false); } ++ public void updateActiveItem(EnumHand enumhand, boolean forceUpdate) { ++ // Paper end + ItemStack itemstack = this.b(enumhand); + +- if (!itemstack.isEmpty() && !this.isHandRaised()) { ++ if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag + this.activeItem = itemstack; + this.bl = itemstack.k(); + if (!this.world.isClientSide) { +@@ -2969,6 +2972,7 @@ public abstract class EntityLiving extends Entity { + this.clearActiveItem(); + } else { + if (!this.activeItem.isEmpty() && this.isHandRaised()) { ++ this.updateActiveItem(this.getRaisedHand(), true); // Paper + this.b(this.activeItem, 16); + // CraftBukkit start - fire PlayerItemConsumeEvent + ItemStack itemstack; +@@ -2999,8 +3003,8 @@ public abstract class EntityLiving extends Entity { + this.a(this.getRaisedHand(), itemstack); + // CraftBukkit end + this.dH(); +- // Paper start - if the replacement is anything but the default, update the client inventory +- if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { ++ // Paper start ++ if (this instanceof EntityPlayer) { + ((EntityPlayer) this).getBukkitEntity().updateInventory(); + } + // Paper end +-- +2.24.1 + diff --git a/Spigot-Server-Patches/0414-only-add-passanger-entities-once-from-spawners.patch b/Spigot-Server-Patches/0398-only-add-passanger-entities-once-from-spawners.patch similarity index 89% rename from Spigot-Server-Patches/0414-only-add-passanger-entities-once-from-spawners.patch rename to Spigot-Server-Patches/0398-only-add-passanger-entities-once-from-spawners.patch index 5e7527e559..170bdb0a0b 100644 --- a/Spigot-Server-Patches/0414-only-add-passanger-entities-once-from-spawners.patch +++ b/Spigot-Server-Patches/0398-only-add-passanger-entities-once-from-spawners.patch @@ -1,11 +1,11 @@ -From 4eec7762acaae4f806f7994f8df930551948f357 Mon Sep 17 00:00:00 2001 +From c87228b4a333ccebd69a817b127b39cf09d18a14 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Wed, 21 Aug 2019 23:57:32 +0500 Subject: [PATCH] only add passanger entities once from spawners diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index b05f6c2f2..a4e6be549 100644 +index b179893a1..b96f6461d 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -195,7 +195,7 @@ public abstract class MobSpawnerAbstract { @@ -18,5 +18,5 @@ index b05f6c2f2..a4e6be549 100644 while (iterator.hasNext()) { -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0415-Fix-nether-portal-creation.patch b/Spigot-Server-Patches/0399-Fix-nether-portal-creation.patch similarity index 91% rename from Spigot-Server-Patches/0415-Fix-nether-portal-creation.patch rename to Spigot-Server-Patches/0399-Fix-nether-portal-creation.patch index c1327091da..0e8bedae51 100644 --- a/Spigot-Server-Patches/0415-Fix-nether-portal-creation.patch +++ b/Spigot-Server-Patches/0399-Fix-nether-portal-creation.patch @@ -1,11 +1,11 @@ -From 0d5ae679315fa7cceb874e2cc7013ed76c81bdd7 Mon Sep 17 00:00:00 2001 +From d0f11a5cd0400709f143f80aafd4432f51bd5b06 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Mon, 9 Sep 2019 13:21:17 +1000 Subject: [PATCH] Fix nether portal creation diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java -index 88fbfc01b..f66f8b323 100644 +index 60330f753..c22dbbfbe 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java @@ -38,6 +38,11 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { @@ -21,5 +21,5 @@ index 88fbfc01b..f66f8b323 100644 state.setData(data); list.put(position, state); -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0416-Generator-Settings.patch b/Spigot-Server-Patches/0400-Generator-Settings.patch similarity index 88% rename from Spigot-Server-Patches/0416-Generator-Settings.patch rename to Spigot-Server-Patches/0400-Generator-Settings.patch index 101c116ea2..6bd734bfc1 100644 --- a/Spigot-Server-Patches/0416-Generator-Settings.patch +++ b/Spigot-Server-Patches/0400-Generator-Settings.patch @@ -1,11 +1,11 @@ -From cb364d0e7fd693372db414ea9de36c7081dfe2f8 Mon Sep 17 00:00:00 2001 +From d2c96cd65fa38113fc91591b2d62bbbad12e019c Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 02:17:54 -0600 Subject: [PATCH] Generator Settings diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 09c8ea2ed..7723b1c15 100644 +index f63525d67..fd9bedf5a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -625,4 +625,9 @@ public class PaperWorldConfig { @@ -19,10 +19,10 @@ index 09c8ea2ed..7723b1c15 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -index 096866b2b..338b67c3c 100644 +index af81a8414..2268fbdd8 100644 --- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java +++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -@@ -198,8 +198,8 @@ public abstract class ChunkGeneratorAbstract +@@ -211,8 +211,8 @@ public abstract class ChunkGeneratorAbstract int i = ichunkaccess.getPos().d(); int j = ichunkaccess.getPos().e(); T t0 = this.getSettings(); @@ -33,7 +33,7 @@ index 096866b2b..338b67c3c 100644 Iterator iterator = BlockPosition.b(i, 0, j, i + 15, 0, j + 15).iterator(); while (iterator.hasNext()) { -@@ -208,7 +208,7 @@ public abstract class ChunkGeneratorAbstract +@@ -221,7 +221,7 @@ public abstract class ChunkGeneratorAbstract if (l > 0) { for (i1 = l; i1 >= l - 4; --i1) { @@ -42,7 +42,7 @@ index 096866b2b..338b67c3c 100644 ichunkaccess.setType(blockposition_mutableblockposition.d(blockposition.getX(), i1, blockposition.getZ()), Blocks.BEDROCK.getBlockData(), false); } } -@@ -216,7 +216,7 @@ public abstract class ChunkGeneratorAbstract +@@ -229,7 +229,7 @@ public abstract class ChunkGeneratorAbstract if (k < 256) { for (i1 = k + 4; i1 >= k; --i1) { @@ -52,5 +52,5 @@ index 096866b2b..338b67c3c 100644 } } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0417-Fix-zero-tick-instant-grow-farms-MC-113809.patch b/Spigot-Server-Patches/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch similarity index 59% rename from Spigot-Server-Patches/0417-Fix-zero-tick-instant-grow-farms-MC-113809.patch rename to Spigot-Server-Patches/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch index 699694878a..4a7daf9bbd 100644 --- a/Spigot-Server-Patches/0417-Fix-zero-tick-instant-grow-farms-MC-113809.patch +++ b/Spigot-Server-Patches/0401-Fix-zero-tick-instant-grow-farms-MC-113809.patch @@ -1,11 +1,11 @@ -From 0bf48165d5c0504425d76d328c1f74a143af541e Mon Sep 17 00:00:00 2001 +From 8dde5baf395c8b4ee38e7908a3831db9539829d4 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Sun, 15 Sep 2019 11:32:32 -0500 Subject: [PATCH] Fix zero-tick instant grow farms MC-113809 diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7723b1c15..af07f9a16 100644 +index fd9bedf5a..8648d9e3d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -573,6 +573,11 @@ public class PaperWorldConfig { @@ -21,79 +21,79 @@ index 7723b1c15..af07f9a16 100644 public Map altItemDespawnRateMap; private void altItemDespawnRate() { diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index e077359b0..619237d68 100644 +index 46490a943..54a61283e 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -44,6 +44,7 @@ public class Block implements IMaterial { - private final float frictionFactor; +@@ -46,6 +46,7 @@ public class Block implements IMaterial { + private final float g; protected final BlockStateList blockStateList; private IBlockData blockData; + public boolean randomTick = false; // Paper - fix MC-113809 protected final boolean v; - private final boolean g; - @Nullable + private final boolean i; + private final boolean j; diff --git a/src/main/java/net/minecraft/server/BlockBamboo.java b/src/main/java/net/minecraft/server/BlockBamboo.java -index ffb65776c..3a9c3b54a 100644 +index c482aad3e..02c548dd9 100644 --- a/src/main/java/net/minecraft/server/BlockBamboo.java +++ b/src/main/java/net/minecraft/server/BlockBamboo.java @@ -85,6 +85,7 @@ public class BlockBamboo extends Block implements IBlockFragilePlantElement { - if (!iblockdata.canPlace(world, blockposition)) { - world.b(blockposition, true); + if (!iblockdata.canPlace(worldserver, blockposition)) { + worldserver.b(blockposition, true); } else if ((Integer) iblockdata.get(BlockBamboo.f) == 0) { -+ if (world.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809 - if (world.random.nextInt(Math.max(1, (int) (100.0F / world.spigotConfig.bambooModifier) * 3)) == 0 && world.isEmpty(blockposition.up()) && world.getLightLevel(blockposition.up(), 0) >= 9) { // Spigot - int i = this.b((IBlockAccess) world, blockposition) + 1; ++ if (worldserver.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809 + if (random.nextInt(Math.max(1, (int) (100.0F / worldserver.spigotConfig.bambooModifier) * 3)) == 0 && worldserver.isEmpty(blockposition.up()) && worldserver.getLightLevel(blockposition.up(), 0) >= 9) { // Spigot + int i = this.b(worldserver, blockposition) + 1; diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java -index 29f9ff6c1..124b4b4b0 100644 +index 4c82fe335..728491dd9 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java @@ -21,6 +21,7 @@ public class BlockCactus extends Block { - if (!iblockdata.canPlace(world, blockposition)) { - world.b(blockposition, true); + if (!iblockdata.canPlace(worldserver, blockposition)) { + worldserver.b(blockposition, true); } else { + if (world.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809 BlockPosition blockposition1 = blockposition.up(); - if (world.isEmpty(blockposition1)) { + if (worldserver.isEmpty(blockposition1)) { diff --git a/src/main/java/net/minecraft/server/BlockChorusFlower.java b/src/main/java/net/minecraft/server/BlockChorusFlower.java -index 74fa4889f..cde2524ca 100644 +index d70b52cad..ff0ba15f8 100644 --- a/src/main/java/net/minecraft/server/BlockChorusFlower.java +++ b/src/main/java/net/minecraft/server/BlockChorusFlower.java @@ -22,6 +22,7 @@ public class BlockChorusFlower extends Block { - if (!iblockdata.canPlace(world, blockposition)) { - world.b(blockposition, true); + if (!iblockdata.canPlace(worldserver, blockposition)) { + worldserver.b(blockposition, true); } else { + if (world.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809 BlockPosition blockposition1 = blockposition.up(); - if (world.isEmpty(blockposition1) && blockposition1.getY() < 256) { + if (worldserver.isEmpty(blockposition1) && blockposition1.getY() < 256) { diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java -index ff674a9d5..a4850c070 100644 +index baa2ed2b6..083b7ee59 100644 --- a/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java @@ -23,6 +23,7 @@ public class BlockReed extends Block { - if (!iblockdata.canPlace(world, blockposition)) { - world.b(blockposition, true); - } else if (world.isEmpty(blockposition.up())) { -+ if (world.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809 + if (!iblockdata.canPlace(worldserver, blockposition)) { + worldserver.b(blockposition, true); + } else if (worldserver.isEmpty(blockposition.up())) { ++ if (worldserver.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809 int i; - for (i = 1; world.getType(blockposition.down(i)).getBlock() == this; ++i) { + for (i = 1; worldserver.getType(blockposition.down(i)).getBlock() == this; ++i) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index bd1e4dbae..5b18f4bd5 100644 +index fd42390d4..4c53f8063 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -568,7 +568,9 @@ public class WorldServer extends World { - IBlockData iblockdata = chunksection.getType(blockposition2.getX() - j, blockposition2.getY() - j1, blockposition2.getZ() - k); +@@ -603,7 +603,9 @@ public class WorldServer extends World { + IBlockData iblockdata = this.getType(nextticklistentry.a); - if (iblockdata.q()) { -+ iblockdata.getBlock().randomTick = true; // Paper - fix MC-113809 - iblockdata.b((World) this, blockposition2, this.random); -+ iblockdata.getBlock().randomTick = false; // Paper - fix MC-113809 - } + if (iblockdata.getBlock() == nextticklistentry.b()) { ++ iblockdata.getBlock().randomTick = true; // Paper - fix MC-113809 + iblockdata.a(this, nextticklistentry.a, this.random); ++ iblockdata.getBlock().randomTick = false; // Paper - fix MC-113809 + } - Fluid fluid = iblockdata.p(); + } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0418-Fix-MC-161754.patch b/Spigot-Server-Patches/0402-Fix-MC-161754.patch similarity index 90% rename from Spigot-Server-Patches/0418-Fix-MC-161754.patch rename to Spigot-Server-Patches/0402-Fix-MC-161754.patch index 827c23efdd..9d07182440 100644 --- a/Spigot-Server-Patches/0418-Fix-MC-161754.patch +++ b/Spigot-Server-Patches/0402-Fix-MC-161754.patch @@ -1,4 +1,4 @@ -From d6a9c5f2f9984186ade4958586b8b8443f4b2492 Mon Sep 17 00:00:00 2001 +From 73a0d079796aba53e42b420ff913425da4ac2ded Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 24 Sep 2019 16:03:00 -0700 Subject: [PATCH] Fix MC-161754 @@ -9,7 +9,7 @@ We can use an entity valid check since this method is invoked for each inventory iteraction (thanks to CB) and on player tick (vanilla). diff --git a/src/main/java/net/minecraft/server/ContainerHorse.java b/src/main/java/net/minecraft/server/ContainerHorse.java -index d1b9482d6..ad4e0a45c 100644 +index c95ce0124..18e1ae7f0 100644 --- a/src/main/java/net/minecraft/server/ContainerHorse.java +++ b/src/main/java/net/minecraft/server/ContainerHorse.java @@ -76,7 +76,7 @@ public class ContainerHorse extends Container { @@ -22,5 +22,5 @@ index d1b9482d6..ad4e0a45c 100644 @Override -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0419-Performance-improvement-for-Chunk.getEntities.patch b/Spigot-Server-Patches/0403-Performance-improvement-for-Chunk.getEntities.patch similarity index 93% rename from Spigot-Server-Patches/0419-Performance-improvement-for-Chunk.getEntities.patch rename to Spigot-Server-Patches/0403-Performance-improvement-for-Chunk.getEntities.patch index 5c9f9ceba0..e0bcd089d5 100644 --- a/Spigot-Server-Patches/0419-Performance-improvement-for-Chunk.getEntities.patch +++ b/Spigot-Server-Patches/0403-Performance-improvement-for-Chunk.getEntities.patch @@ -1,4 +1,4 @@ -From 62af6667746cc668375eb2e6f02352fbcded8c7c Mon Sep 17 00:00:00 2001 +From f723f1253331573ac4ce13e7d058525122971fa9 Mon Sep 17 00:00:00 2001 From: wea_ondara Date: Thu, 10 Oct 2019 11:29:42 +0200 Subject: [PATCH] Performance improvement for Chunk.getEntities @@ -10,7 +10,7 @@ operation. This patch will reduce the load of plugins which for example implement custom moblimits and depend on Chunk.getEntities(). diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index b4551614..373bea4b 100644 +index 9dcba4d15..c8b49a389 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -110,14 +110,14 @@ public class CraftChunk implements Chunk { @@ -34,5 +34,5 @@ index b4551614..373bea4b 100644 return entities; -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0420-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0404-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch similarity index 89% rename from Spigot-Server-Patches/0420-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch rename to Spigot-Server-Patches/0404-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch index e0f2c454ca..a02c72897b 100644 --- a/Spigot-Server-Patches/0420-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch +++ b/Spigot-Server-Patches/0404-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch @@ -1,4 +1,4 @@ -From c41ab1dad3a063b15b9ceb44645c0ef99ffbae24 Mon Sep 17 00:00:00 2001 +From 8783648a82e2eab90215942e6d11e39754345399 Mon Sep 17 00:00:00 2001 From: MisterErwin Date: Wed, 30 Oct 2019 16:57:54 +0100 Subject: [PATCH] Fix spawning of hanging entities that are not ItemFrames and @@ -6,10 +6,10 @@ Subject: [PATCH] Fix spawning of hanging entities that are not ItemFrames and diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 243722b6..f33d9c8b 100644 +index b1ae19be7..cd519a546 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1784,7 +1784,12 @@ public class CraftWorld implements World { +@@ -1755,7 +1755,12 @@ public class CraftWorld implements World { height = 9; } @@ -24,5 +24,5 @@ index 243722b6..f33d9c8b 100644 for (BlockFace dir : faces) { IBlockData nmsBlock = world.getType(pos.shift(CraftBlock.blockFaceToNotch(dir))); -- -2.17.1 +2.24.1 diff --git a/Spigot-Server-Patches/0421-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0405-Expose-the-internal-current-tick.patch similarity index 79% rename from Spigot-Server-Patches/0421-Expose-the-internal-current-tick.patch rename to Spigot-Server-Patches/0405-Expose-the-internal-current-tick.patch index d066fed5c3..e5c7e6b7d5 100644 --- a/Spigot-Server-Patches/0421-Expose-the-internal-current-tick.patch +++ b/Spigot-Server-Patches/0405-Expose-the-internal-current-tick.patch @@ -1,14 +1,14 @@ -From 5d158ba458c8dd5ccb0e16d44fd3b9c97a776734 Mon Sep 17 00:00:00 2001 +From 5e78d0d353c8f2ff964045c24f4d4cda5db56677 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sat, 20 Apr 2019 19:47:34 -0500 Subject: [PATCH] Expose the internal current tick diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7a8ab7d40..105d31906 100644 +index 18b76ed0f..f3da3a82d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2161,5 +2161,10 @@ public final class CraftServer implements Server { +@@ -2164,5 +2164,10 @@ public final class CraftServer implements Server { } return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name); } @@ -20,5 +20,5 @@ index 7a8ab7d40..105d31906 100644 // Paper end } -- -2.23.0 +2.24.1 diff --git a/Spigot-Server-Patches/0422-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch similarity index 78% rename from Spigot-Server-Patches/0422-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch rename to Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index 5fb51bd71e..6aa94b373f 100644 --- a/Spigot-Server-Patches/0422-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0406-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -1,14 +1,14 @@ -From 0d0548d6c0dae5a044a5e52dcf56c6a4a1eb7a73 Mon Sep 17 00:00:00 2001 +From e67d6afa674eaf53579e5776b5726d5984fda48e Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Wed, 9 Oct 2019 21:51:43 -0500 Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 7801879c8..8541dbe8d 100644 +index 19ba79c65..453f02561 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -963,6 +963,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -946,6 +946,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; @@ -18,18 +18,18 @@ index 7801879c8..8541dbe8d 100644 PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3cb443c4f..4ba349e1a 100644 +index f702619aa..7b79ee4fe 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -728,6 +728,8 @@ public abstract class PlayerList { +@@ -729,6 +729,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobEffect)); } + entityplayer.setSneaking(false); // Paper - fix MC-10657 + // Fire advancement trigger - entityplayer.b(((CraftWorld) fromWorld).getHandle()); + entityplayer.triggerDimensionAdvancements(((CraftWorld) fromWorld).getHandle()); -- -2.23.0.rc1 +2.24.1 diff --git a/Spigot-Server-Patches/0424-Add-option-to-disable-pillager-patrols.patch b/Spigot-Server-Patches/0407-Add-option-to-disable-pillager-patrols.patch similarity index 90% rename from Spigot-Server-Patches/0424-Add-option-to-disable-pillager-patrols.patch rename to Spigot-Server-Patches/0407-Add-option-to-disable-pillager-patrols.patch index 3eda1022c6..3ecb56e24f 100644 --- a/Spigot-Server-Patches/0424-Add-option-to-disable-pillager-patrols.patch +++ b/Spigot-Server-Patches/0407-Add-option-to-disable-pillager-patrols.patch @@ -1,11 +1,11 @@ -From 9a9694a16a2e8c10e03e2f7782a0ff6bbc86a9b3 Mon Sep 17 00:00:00 2001 +From 7ef6304dd7223769140767de11372d070f6c7728 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Wed, 9 Oct 2019 21:46:15 -0500 Subject: [PATCH] Add option to disable pillager patrols diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3e5571f7d..68d36a512 100644 +index 8648d9e3d..917dc6253 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -635,4 +635,9 @@ public class PaperWorldConfig { @@ -19,7 +19,7 @@ index 3e5571f7d..68d36a512 100644 + } } diff --git a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java -index a9d32ebdf..44c70e047 100644 +index 59161143b..f155179ad 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java +++ b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java @@ -9,6 +9,7 @@ public class MobSpawnerPatrol { @@ -31,5 +31,5 @@ index a9d32ebdf..44c70e047 100644 return 0; } else { -- -2.24.0 +2.24.1 diff --git a/Spigot-Server-Patches/0425-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 85% rename from Spigot-Server-Patches/0425-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch index fc4798a4b1..5a9f4f63e3 100644 --- a/Spigot-Server-Patches/0425-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch +++ b/Spigot-Server-Patches/0408-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch @@ -1,4 +1,4 @@ -From 2076e011a05ccc5f7ac008f55cabb56d0f478766 Mon Sep 17 00:00:00 2001 +From 265310d0510556ead2756e093e16cf2b1dfa35ba Mon Sep 17 00:00:00 2001 From: Lukasz Derlatka Date: Mon, 11 Nov 2019 16:08:13 +0100 Subject: [PATCH] Fix AssertionError when player hand set to empty type @@ -7,10 +7,10 @@ Fixes an AssertionError when setting the player's item in hand to null or a new Fixes GH-2718 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f675ad2f5..addbafe66 100644 +index d04ea03bc..5431f8a8d 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1864,6 +1864,7 @@ public abstract class EntityLiving extends Entity { +@@ -1885,6 +1885,7 @@ public abstract class EntityLiving extends Entity { return this.getEquipment(EnumItemSlot.OFFHAND); } @@ -19,10 +19,10 @@ index f675ad2f5..addbafe66 100644 if (enumhand == EnumHand.MAIN_HAND) { return this.getEquipment(EnumItemSlot.MAINHAND); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ae17cdf23..c9872cbd0 100644 +index 8c54022e0..c559a7b95 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1413,6 +1413,10 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1429,6 +1429,10 @@ public class PlayerConnection implements PacketListenerPlayIn { if (cancelled) { this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524 } else { @@ -34,5 +34,5 @@ index ae17cdf23..c9872cbd0 100644 } // CraftBukkit end -- -2.24.0 +2.24.1 diff --git a/Spigot-Server-Patches/0413-Prevent-consuming-the-wrong-itemstack.patch b/Spigot-Server-Patches/0413-Prevent-consuming-the-wrong-itemstack.patch deleted file mode 100644 index e16ac98ea2..0000000000 --- a/Spigot-Server-Patches/0413-Prevent-consuming-the-wrong-itemstack.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 472240ae22f9124fb83cc5e7a5225deaa178a535 Mon Sep 17 00:00:00 2001 -From: kickash32 -Date: Mon, 19 Aug 2019 19:42:35 +0500 -Subject: [PATCH] Prevent consuming the wrong itemstack - - -diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 31d14b19b..f675ad2f5 100644 ---- a/src/main/java/net/minecraft/server/EntityLiving.java -+++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2822,10 +2822,13 @@ public abstract class EntityLiving extends Entity { - this.datawatcher.set(EntityLiving.ar, (byte) j); - } - -- public void c(EnumHand enumhand) { -+ // Paper start -- OBFHELPER and forwarder to method with forceUpdate parameter -+ public void c(EnumHand enumhand) { this.updateActiveItem(enumhand, false); } -+ public void updateActiveItem(EnumHand enumhand, boolean forceUpdate) { -+ // Paper end - ItemStack itemstack = this.b(enumhand); - -- if (!itemstack.isEmpty() && !this.isHandRaised()) { -+ if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag - this.activeItem = itemstack; - this.bo = itemstack.k(); - if (!this.world.isClientSide) { -@@ -2898,6 +2901,7 @@ public abstract class EntityLiving extends Entity { - - protected void q() { - if (!this.activeItem.isEmpty() && this.isHandRaised()) { -+ this.updateActiveItem(this.getRaisedHand(), true); // Paper - PlayerItemConsumeEvent event = null; // Paper - this.b(this.activeItem, 16); - // CraftBukkit start - fire PlayerItemConsumeEvent -@@ -2928,8 +2932,8 @@ public abstract class EntityLiving extends Entity { - this.a(this.getRaisedHand(), itemstack); - // CraftBukkit end - this.dp(); -- // Paper start - if the replacement is anything but the default, update the client inventory -- if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) { -+ // Paper start -+ if (this instanceof EntityPlayer) { - ((EntityPlayer) this).getBukkitEntity().updateInventory(); - } - // Paper end --- -2.23.0 - diff --git a/Spigot-Server-Patches/0423-Backport-MC-160177-fix-from-1.15.patch b/Spigot-Server-Patches/0423-Backport-MC-160177-fix-from-1.15.patch deleted file mode 100644 index 7a2342f9c5..0000000000 --- a/Spigot-Server-Patches/0423-Backport-MC-160177-fix-from-1.15.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 5b2cfa47f19b2dfb4aeb6af81cc7309de224ff27 Mon Sep 17 00:00:00 2001 -From: Gerrygames -Date: Thu, 21 Nov 2019 14:56:51 +0100 -Subject: [PATCH] Backport MC-160177 fix from 1.15 - - -diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index bc03a82b..c77e812b 100644 ---- a/src/main/java/net/minecraft/server/PlayerInteractManager.java -+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java -@@ -86,14 +86,17 @@ public class PlayerInteractManager { - this.l = -1; - this.e = false; - } else { -- this.a(iblockdata, this.g); -+ this.a(iblockdata, this.g, this.lastDigTick); // Paper - pass lastDigTick as an argument - } - } - - } - -- private float a(IBlockData iblockdata, BlockPosition blockposition) { -- int i = this.currentTick - this.k; -+ // Paper start - Add startTick parameter and use it -+ private float a(IBlockData iblockdata, BlockPosition blockposition) { return this.a(iblockdata, blockposition, this.k); } -+ private float a(IBlockData iblockdata, BlockPosition blockposition, int startTick) { -+ int i = this.currentTick - startTick; -+ // Paper end - float f = iblockdata.getDamage(this.player, this.player.world, blockposition) * (float) (i + 1); - int j = (int) (f * 10.0F); - --- -2.24.0 - diff --git a/Spigot-Server-Patches/0354-Allow-Saving-of-Oversized-Chunks.patch b/removed/1.15/0354-Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from Spigot-Server-Patches/0354-Allow-Saving-of-Oversized-Chunks.patch rename to removed/1.15/0354-Allow-Saving-of-Oversized-Chunks.patch diff --git a/Spigot-Server-Patches/0376-Handle-bad-chunks-more-gracefully.patch b/removed/1.15/0376-Handle-bad-chunks-more-gracefully.patch similarity index 100% rename from Spigot-Server-Patches/0376-Handle-bad-chunks-more-gracefully.patch rename to removed/1.15/0376-Handle-bad-chunks-more-gracefully.patch diff --git a/Spigot-Server-Patches/0393-Fix-World-isChunkGenerated-calls.patch b/removed/1.15/0393-Fix-World-isChunkGenerated-calls.patch similarity index 100% rename from Spigot-Server-Patches/0393-Fix-World-isChunkGenerated-calls.patch rename to removed/1.15/0393-Fix-World-isChunkGenerated-calls.patch diff --git a/Spigot-Server-Patches/0399-Use-getChunkIfLoadedImmediately-in-places.patch b/removed/1.15/0399-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 100% rename from Spigot-Server-Patches/0399-Use-getChunkIfLoadedImmediately-in-places.patch rename to removed/1.15/0399-Use-getChunkIfLoadedImmediately-in-places.patch diff --git a/Spigot-Server-Patches/0403-Preserve-old-flush-on-save-flag-for-reliable-regionf.patch b/removed/1.15/0403-Preserve-old-flush-on-save-flag-for-reliable-regionf.patch similarity index 100% rename from Spigot-Server-Patches/0403-Preserve-old-flush-on-save-flag-for-reliable-regionf.patch rename to removed/1.15/0403-Preserve-old-flush-on-save-flag-for-reliable-regionf.patch diff --git a/Spigot-Server-Patches/0409-Asynchronous-chunk-IO-and-loading.patch b/removed/1.15/0409-Asynchronous-chunk-IO-and-loading.patch similarity index 100% rename from Spigot-Server-Patches/0409-Asynchronous-chunk-IO-and-loading.patch rename to removed/1.15/0409-Asynchronous-chunk-IO-and-loading.patch diff --git a/Spigot-Server-Patches/0410-Reduce-sync-loads.patch b/removed/1.15/0410-Reduce-sync-loads.patch similarity index 100% rename from Spigot-Server-Patches/0410-Reduce-sync-loads.patch rename to removed/1.15/0410-Reduce-sync-loads.patch diff --git a/Spigot-Server-Patches/0412-Improve-POI-data-saving-logic.patch b/removed/1.15/0412-Improve-POI-data-saving-logic.patch similarity index 100% rename from Spigot-Server-Patches/0412-Improve-POI-data-saving-logic.patch rename to removed/1.15/0412-Improve-POI-data-saving-logic.patch