From b59e2a51de6cef42c00fd04a0aec8ce7b8030b13 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 11 May 2016 22:07:46 -0400 Subject: [PATCH] Paper 1.9.4 Update --- Spigot-API-Patches/0001-POM-changes.patch | 8 +- Spigot-Server-Patches/0001-POM-Changes.patch | 10 +- .../0002-Paper-config-files.patch | 8 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 51 +-- Spigot-Server-Patches/0004-MC-Utils.patch | 8 +- Spigot-Server-Patches/0005-Timings-v2.patch | 146 +++---- ...6-Vanished-players-don-t-have-rights.patch | 22 +- ...0007-Configurable-squid-spawn-ranges.patch | 14 +- ...ctus-and-reed-natural-growth-heights.patch | 10 +- ...figurable-baby-zombie-movement-speed.patch | 16 +- ...010-Configurable-fishing-time-ranges.patch | 14 +- .../0011-Allow-nerfed-mobs-to-jump.patch | 14 +- ...2-Toggle-for-player-interact-limiter.patch | 8 +- .../0013-Player-Exhaustion-Multipliers.patch | 14 +- ...-despawn-distances-for-living-entiti.patch | 8 +- ...ck-and-tnt-entities-at-the-specified.patch | 8 +- ...ient-crashes-server-lists-and-Mojang.patch | 8 +- .../0019-Player-affects-spawning-API.patch | 46 +-- ...ve-invalid-mob-spawner-tile-entities.patch | 8 +- .../0022-Optimize-TileEntity-Ticking.patch | 22 +- ...023-Further-improve-server-tick-loop.patch | 12 +- ...024-Only-refresh-abilities-if-needed.patch | 8 +- .../0025-Add-async-chunk-load-API.patch | 10 +- .../0026-Entity-Origin-API.patch | 34 +- ...event-tile-entity-and-entity-crashes.patch | 18 +- ...nfigurable-top-of-nether-void-damage.patch | 12 +- ...e-before-converting-and-renaming-pla.patch | 10 +- .../0031-Lighting-Queue.patch | 50 +-- .../0033-Configurable-end-credits.patch | 20 +- ...-explosions-processing-dead-entities.patch | 8 +- .../0035-Generator-Settings.patch | 40 +- .../0036-Optimize-explosions.patch | 14 +- .../0038-Fast-draining.patch | 23 +- .../0039-Configurable-lava-flow-speed.patch | 8 +- .../0040-Add-player-view-distance-API.patch | 60 +-- .../0041-Disable-explosion-knockback.patch | 14 +- .../0042-Disable-thunder.patch | 8 +- .../0043-Disable-ice-and-snow.patch | 8 +- .../0045-Configurable-TNT-cannon-fix.patch | 319 --------------- ...ition-the-first-time-an-entity-is-s.patch} | 6 +- ...patch => 0046-Add-BeaconEffectEvent.patch} | 8 +- ...igurable-container-update-tick-rate.patch} | 18 +- ...me-times-creating-air-instead-of-co.patch} | 8 +- ...0049-Use-UserCache-for-player-heads.patch} | 4 +- ...> 0050-Disable-spigot-tick-limiters.patch} | 10 +- ...igurable-Chunk-IO-Thread-Base-Count.patch} | 4 +- ...on-File-s-when-checking-if-chunk-ex.patch} | 8 +- ...-t-create-a-chunk-just-to-unload-it.patch} | 10 +- ...=> 0054-Add-PlayerInitialSpawnEvent.patch} | 8 +- ...=> 0055-Disable-chest-cat-detection.patch} | 12 +- ...6-Ensure-commands-are-not-ran-async.patch} | 8 +- ...hunks-are-slime-spawn-chunks-toggle.patch} | 20 +- ...ort-to-tab-completers-vanilla-featu.patch} | 12 +- ....patch => 0059-Optimize-Pathfinding.patch} | 12 +- ...patch => 0060-Optimize-getBlockData.patch} | 8 +- ...pper-searches-if-there-are-no-items.patch} | 14 +- ...ch => 0062-Expose-server-CommandMap.patch} | 4 +- ...-informative-in-maxHealth-exception.patch} | 6 +- ...ord-chat-API-from-spigot-subclasses.patch} | 6 +- ...0065-Player-Tab-List-and-Title-APIs.patch} | 12 +- ...> 0066-Ensure-inv-drag-is-in-bounds.patch} | 8 +- ...ntation-of-tile-entity-removal-list.patch} | 12 +- ...d-configurable-portal-search-radius.patch} | 16 +- ...patch => 0069-Add-velocity-warnings.patch} | 6 +- ...-inter-world-teleportation-glitches.patch} | 12 +- ... 0071-Add-exception-reporting-event.patch} | 50 +-- ...don-t-need-to-when-cerealising-text.patch} | 4 +- ...reboards-for-non-players-by-default.patch} | 22 +- ...-Speedup-BlockPos-by-fixing-inlining.patch | 223 ----------- ...orking-with-arrows-stuck-in-living-.patch} | 14 +- ... => 0075-Complete-resource-pack-API.patch} | 12 +- ...e-add-Spigot-s-hopper-check-feature.patch} | 12 +- ... 0077-Chunk-save-queue-improvements.patch} | 20 +- ....patch => 0078-Chunk-Save-Reattempt.patch} | 8 +- ...ding-permissions.yml-before-plugins.patch} | 4 +- ...low-Reloading-of-Custom-Permissions.patch} | 4 +- ...h => 0081-Remove-Metadata-on-reload.patch} | 4 +- ...patch => 0082-Undead-horse-leashing.patch} | 12 +- ...h => 0083-Fix-Furnace-cook-time-bug.patch} | 8 +- ...84-Handle-Item-Meta-Inconsistencies.patch} | 4 +- ...rable-Non-Player-Arrow-Despawn-Rate.patch} | 20 +- ...atch => 0086-Add-World-Util-Methods.patch} | 12 +- ...7-Optimized-Light-Level-Comparisons.patch} | 24 +- ...88-Optimize-BlockStateList-BlockData.patch | 45 --- ...0088-Pass-world-to-Village-creation.patch} | 8 +- ...-Custom-replacement-for-eaten-items.patch} | 14 +- ... 0090-Set-health-before-death-event.patch} | 6 +- ...h-absorb-values-and-repair-bad-data.patch} | 16 +- ...tch-Async-PlayerChunkMap-operations.patch} | 8 +- ...e-mode-in-whitelist-command-as-well.patch} | 10 +- ...tch => 0094-Fix-SkullCache-case-bug.patch} | 8 +- ...ch => 0095-Waving-banner-workaround.patch} | 4 +- ...96-Use-a-Shared-Random-for-Entities.patch} | 10 +- ...> 0097-Don-t-teleport-dead-entities.patch} | 8 +- .../0097-Optimize-Chunk-Unload-Queue.patch | 364 ------------------ ...patch => 0098-Optimize-Chunk-Access.patch} | 29 +- ...e-spawn-chances-for-skeleton-horses.patch} | 12 +- ...ptimize-isValidLocation-for-inlining.patch | 79 ++++ ...-correct-item-in-arrow-pickup-event.patch} | 10 +- ... 0102-Fix-cooked-fish-legacy-import.patch} | 4 +- ...infinite-loop-in-BlockPosition-iter.patch} | 18 +- ... 0104-Access-items-by-EquipmentSlot.patch} | 4 +- ...ptimize-isValidLocation-for-inlining.patch | 122 ------ ...eck-async-remove-unused-vars-GH-159.patch} | 6 +- ...able-BlockPhysicsEvent-for-Redstone.patch} | 20 +- ...ntity-AddTo-RemoveFrom-World-Events.patch} | 10 +- ...-Configurable-Chunk-Inhabited-Timer.patch} | 16 +- ...t.patch => 0109-EntityPathfindEvent.patch} | 14 +- ...-BlockFromToEvent-from-loading-chun.patch} | 6 +- ... 0111-Minecart-drop-name-workaround.patch} | 8 +- ...ce-IO-ops-opening-a-new-region-file.patch} | 4 +- ...gionFileCache-and-make-configurable.patch} | 4 +- ...h => 0114-Add-getEntity-by-UUID-API.patch} | 8 +- ...h => 0115-Use-Optimized-Collections.patch} | 32 +- ...Do-not-load-chunks-for-light-checks.patch} | 8 +- ...117-Add-PlayerUseUnknownEntityEvent.patch} | 8 +- ...DebugInfo-not-initialized-on-client.patch} | 8 +- ...Configurable-Grass-Spread-Tick-Rate.patch} | 12 +- ...e-Keep-Spawn-Loaded-range-per-world.patch} | 20 +- ...-BlockPlaceEvent-triggering-physics.patch} | 8 +- ...m-reload-spawn-chunks-in-nether-end.patch} | 8 +- ...3-Remove-Debug-checks-from-DataBits.patch} | 4 +- ...illa-per-world-scoreboard-coloring-.patch} | 12 +- ...d-for-setting-passengers-on-players.patch} | 8 +- ...e-PlayerConnection-on-teleporting-p.patch} | 12 +- ...emove-unused-World-Tile-Entity-List.patch} | 14 +- ... 0128-Don-t-tick-Skulls-unused-code.patch} | 8 +- .../0129-16w14a-memory-cleanup.patch | 49 --- ...layers-not-being-kicked-on-shutdown.patch} | 8 +- ... 0130-Configurable-Player-Collision.patch} | 6 +- ...nt-to-allow-plugins-to-handle-clien.patch} | 8 +- ...mobs-should-only-spawn-in-the-water.patch} | 8 +- ...ix-Bugs-with-Spigot-Mob-Spawn-Logic.patch} | 8 +- ...number-of-attempts-at-spawning-mobs.patch} | 10 +- ...> 0135-Configurable-RCON-IP-address.patch} | 4 +- ...36-Prevent-Fire-from-loading-chunks.patch} | 12 +- ...7-Implement-PlayerLocaleChangeEvent.patch} | 24 +- ...tyRegainHealthEvent-isFastRegen-API.patch} | 10 +- ...to-configure-frosted_ice-properties.patch} | 12 +- ...-Vehicle-Event-Cancellation-Changes.patch} | 34 +- ...patch => 0141-Arrow-pickup-rule-API.patch} | 4 +- ...t-additions-and-mark-entities-remov.patch} | 10 +- ...dispenser-dropper-furnace-placement.patch} | 20 +- ...144-Reimplement-PlayerEditBookEvent.patch} | 20 +- ...mprove-Minecraft-Hopper-Performance.patch} | 18 +- ...possibility-for-getServer-singleton.patch} | 12 +- ...tem-frames-performance-and-bug-fixe.patch} | 30 +- ...API-Replenishable-Lootables-Feature.patch} | 48 +-- ...-Do-not-load-chunks-for-pathfinding.patch} | 6 +- ...> 0150-Entity-Tracking-Improvements.patch} | 10 +- ...-scoreboard-teams-to-scoreboard.dat.patch} | 6 +- scripts/importmcdev.sh | 4 +- scripts/rebuildPatches.sh | 15 +- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 157 files changed, 1103 insertions(+), 2166 deletions(-) delete mode 100644 Spigot-Server-Patches/0045-Configurable-TNT-cannon-fix.patch rename Spigot-Server-Patches/{0046-Send-absolute-position-the-first-time-an-entity-is-s.patch => 0045-Send-absolute-position-the-first-time-an-entity-is-s.patch} (97%) rename Spigot-Server-Patches/{0047-Add-BeaconEffectEvent.patch => 0046-Add-BeaconEffectEvent.patch} (93%) rename Spigot-Server-Patches/{0048-Configurable-container-update-tick-rate.patch => 0047-Configurable-container-update-tick-rate.patch} (79%) rename Spigot-Server-Patches/{0049-Fix-lava-water-some-times-creating-air-instead-of-co.patch => 0048-Fix-lava-water-some-times-creating-air-instead-of-co.patch} (81%) rename Spigot-Server-Patches/{0050-Use-UserCache-for-player-heads.patch => 0049-Use-UserCache-for-player-heads.patch} (95%) rename Spigot-Server-Patches/{0051-Disable-spigot-tick-limiters.patch => 0050-Disable-spigot-tick-limiters.patch} (89%) rename Spigot-Server-Patches/{0052-Configurable-Chunk-IO-Thread-Base-Count.patch => 0051-Configurable-Chunk-IO-Thread-Base-Count.patch} (95%) rename Spigot-Server-Patches/{0053-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch => 0052-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch} (92%) rename Spigot-Server-Patches/{0054-Don-t-create-a-chunk-just-to-unload-it.patch => 0053-Don-t-create-a-chunk-just-to-unload-it.patch} (81%) rename Spigot-Server-Patches/{0055-Add-PlayerInitialSpawnEvent.patch => 0054-Add-PlayerInitialSpawnEvent.patch} (91%) rename Spigot-Server-Patches/{0056-Disable-chest-cat-detection.patch => 0055-Disable-chest-cat-detection.patch} (86%) rename Spigot-Server-Patches/{0057-Ensure-commands-are-not-ran-async.patch => 0056-Ensure-commands-are-not-ran-async.patch} (96%) rename Spigot-Server-Patches/{0058-All-chunks-are-slime-spawn-chunks-toggle.patch => 0057-All-chunks-are-slime-spawn-chunks-toggle.patch} (75%) rename Spigot-Server-Patches/{0059-Add-Location-support-to-tab-completers-vanilla-featu.patch => 0058-Add-Location-support-to-tab-completers-vanilla-featu.patch} (96%) rename Spigot-Server-Patches/{0060-Optimize-Pathfinding.patch => 0059-Optimize-Pathfinding.patch} (83%) rename Spigot-Server-Patches/{0061-Optimize-getBlockData.patch => 0060-Optimize-getBlockData.patch} (88%) rename Spigot-Server-Patches/{0062-Avoid-hopper-searches-if-there-are-no-items.patch => 0061-Avoid-hopper-searches-if-there-are-no-items.patch} (92%) rename Spigot-Server-Patches/{0063-Expose-server-CommandMap.patch => 0062-Expose-server-CommandMap.patch} (89%) rename Spigot-Server-Patches/{0064-Be-a-bit-more-informative-in-maxHealth-exception.patch => 0063-Be-a-bit-more-informative-in-maxHealth-exception.patch} (92%) rename Spigot-Server-Patches/{0065-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch => 0064-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch} (94%) rename Spigot-Server-Patches/{0066-Player-Tab-List-and-Title-APIs.patch => 0065-Player-Tab-List-and-Title-APIs.patch} (96%) rename Spigot-Server-Patches/{0067-Ensure-inv-drag-is-in-bounds.patch => 0066-Ensure-inv-drag-is-in-bounds.patch} (84%) rename Spigot-Server-Patches/{0068-Change-implementation-of-tile-entity-removal-list.patch => 0067-Change-implementation-of-tile-entity-removal-list.patch} (92%) rename Spigot-Server-Patches/{0069-Add-configurable-portal-search-radius.patch => 0068-Add-configurable-portal-search-radius.patch} (86%) rename Spigot-Server-Patches/{0070-Add-velocity-warnings.patch => 0069-Add-velocity-warnings.patch} (92%) rename Spigot-Server-Patches/{0071-Fix-inter-world-teleportation-glitches.patch => 0070-Fix-inter-world-teleportation-glitches.patch} (90%) rename Spigot-Server-Patches/{0072-Add-exception-reporting-event.patch => 0071-Add-exception-reporting-event.patch} (94%) rename Spigot-Server-Patches/{0074-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch => 0072-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch} (95%) rename Spigot-Server-Patches/{0075-Disable-Scoreboards-for-non-players-by-default.patch => 0073-Disable-Scoreboards-for-non-players-by-default.patch} (81%) delete mode 100644 Spigot-Server-Patches/0073-Speedup-BlockPos-by-fixing-inlining.patch rename Spigot-Server-Patches/{0076-Add-methods-for-working-with-arrows-stuck-in-living-.patch => 0074-Add-methods-for-working-with-arrows-stuck-in-living-.patch} (83%) rename Spigot-Server-Patches/{0077-Complete-resource-pack-API.patch => 0075-Complete-resource-pack-API.patch} (94%) rename Spigot-Server-Patches/{0078-Re-add-Spigot-s-hopper-check-feature.patch => 0076-Re-add-Spigot-s-hopper-check-feature.patch} (84%) rename Spigot-Server-Patches/{0079-Chunk-save-queue-improvements.patch => 0077-Chunk-save-queue-improvements.patch} (93%) rename Spigot-Server-Patches/{0080-Chunk-Save-Reattempt.patch => 0078-Chunk-Save-Reattempt.patch} (93%) rename Spigot-Server-Patches/{0081-Default-loading-permissions.yml-before-plugins.patch => 0079-Default-loading-permissions.yml-before-plugins.patch} (96%) rename Spigot-Server-Patches/{0082-Allow-Reloading-of-Custom-Permissions.patch => 0080-Allow-Reloading-of-Custom-Permissions.patch} (94%) rename Spigot-Server-Patches/{0083-Remove-Metadata-on-reload.patch => 0081-Remove-Metadata-on-reload.patch} (93%) rename Spigot-Server-Patches/{0084-Undead-horse-leashing.patch => 0082-Undead-horse-leashing.patch} (83%) rename Spigot-Server-Patches/{0085-Fix-Furnace-cook-time-bug.patch => 0083-Fix-Furnace-cook-time-bug.patch} (86%) rename Spigot-Server-Patches/{0086-Handle-Item-Meta-Inconsistencies.patch => 0084-Handle-Item-Meta-Inconsistencies.patch} (99%) rename Spigot-Server-Patches/{0087-Configurable-Non-Player-Arrow-Despawn-Rate.patch => 0085-Configurable-Non-Player-Arrow-Despawn-Rate.patch} (76%) rename Spigot-Server-Patches/{0089-Add-World-Util-Methods.patch => 0086-Add-World-Util-Methods.patch} (91%) rename Spigot-Server-Patches/{0090-Optimized-Light-Level-Comparisons.patch => 0087-Optimized-Light-Level-Comparisons.patch} (93%) delete mode 100644 Spigot-Server-Patches/0088-Optimize-BlockStateList-BlockData.patch rename Spigot-Server-Patches/{0091-Pass-world-to-Village-creation.patch => 0088-Pass-world-to-Village-creation.patch} (93%) rename Spigot-Server-Patches/{0092-Custom-replacement-for-eaten-items.patch => 0089-Custom-replacement-for-eaten-items.patch} (81%) rename Spigot-Server-Patches/{0093-Set-health-before-death-event.patch => 0090-Set-health-before-death-event.patch} (94%) rename Spigot-Server-Patches/{0094-handle-NaN-health-absorb-values-and-repair-bad-data.patch => 0091-handle-NaN-health-absorb-values-and-repair-bad-data.patch} (84%) rename Spigot-Server-Patches/{0095-Catch-Async-PlayerChunkMap-operations.patch => 0092-Catch-Async-PlayerChunkMap-operations.patch} (84%) rename Spigot-Server-Patches/{0096-Support-offline-mode-in-whitelist-command-as-well.patch => 0093-Support-offline-mode-in-whitelist-command-as-well.patch} (94%) rename Spigot-Server-Patches/{0098-Fix-SkullCache-case-bug.patch => 0094-Fix-SkullCache-case-bug.patch} (84%) rename Spigot-Server-Patches/{0099-Waving-banner-workaround.patch => 0095-Waving-banner-workaround.patch} (94%) rename Spigot-Server-Patches/{0100-Use-a-Shared-Random-for-Entities.patch => 0096-Use-a-Shared-Random-for-Entities.patch} (85%) rename Spigot-Server-Patches/{0101-Don-t-teleport-dead-entities.patch => 0097-Don-t-teleport-dead-entities.patch} (83%) delete mode 100644 Spigot-Server-Patches/0097-Optimize-Chunk-Unload-Queue.patch rename Spigot-Server-Patches/{0102-Optimize-Chunk-Access.patch => 0098-Optimize-Chunk-Access.patch} (71%) rename Spigot-Server-Patches/{0103-Configurable-spawn-chances-for-skeleton-horses.patch => 0099-Configurable-spawn-chances-for-skeleton-horses.patch} (87%) create mode 100644 Spigot-Server-Patches/0100-Optimize-isValidLocation-for-inlining.patch rename Spigot-Server-Patches/{0105-Use-correct-item-in-arrow-pickup-event.patch => 0101-Use-correct-item-in-arrow-pickup-event.patch} (86%) rename Spigot-Server-Patches/{0106-Fix-cooked-fish-legacy-import.patch => 0102-Fix-cooked-fish-legacy-import.patch} (93%) rename Spigot-Server-Patches/{0107-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch => 0103-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch} (90%) rename Spigot-Server-Patches/{0108-Access-items-by-EquipmentSlot.patch => 0104-Access-items-by-EquipmentSlot.patch} (96%) delete mode 100644 Spigot-Server-Patches/0104-Optimize-isValidLocation-for-inlining.patch rename Spigot-Server-Patches/{0109-Check-async-remove-unused-vars-GH-159.patch => 0105-Check-async-remove-unused-vars-GH-159.patch} (93%) rename Spigot-Server-Patches/{0110-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch => 0106-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch} (88%) rename Spigot-Server-Patches/{0111-Entity-AddTo-RemoveFrom-World-Events.patch => 0107-Entity-AddTo-RemoveFrom-World-Events.patch} (79%) rename Spigot-Server-Patches/{0112-Configurable-Chunk-Inhabited-Timer.patch => 0108-Configurable-Chunk-Inhabited-Timer.patch} (79%) rename Spigot-Server-Patches/{0113-EntityPathfindEvent.patch => 0109-EntityPathfindEvent.patch} (84%) rename Spigot-Server-Patches/{0114-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch => 0110-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch} (96%) rename Spigot-Server-Patches/{0115-Minecart-drop-name-workaround.patch => 0111-Minecart-drop-name-workaround.patch} (85%) rename Spigot-Server-Patches/{0116-Reduce-IO-ops-opening-a-new-region-file.patch => 0112-Reduce-IO-ops-opening-a-new-region-file.patch} (96%) rename Spigot-Server-Patches/{0117-Sanitise-RegionFileCache-and-make-configurable.patch => 0113-Sanitise-RegionFileCache-and-make-configurable.patch} (97%) rename Spigot-Server-Patches/{0118-Add-getEntity-by-UUID-API.patch => 0114-Add-getEntity-by-UUID-API.patch} (92%) rename Spigot-Server-Patches/{0119-Use-Optimized-Collections.patch => 0115-Use-Optimized-Collections.patch} (66%) rename Spigot-Server-Patches/{0120-Do-not-load-chunks-for-light-checks.patch => 0116-Do-not-load-chunks-for-light-checks.patch} (83%) rename Spigot-Server-Patches/{0121-Add-PlayerUseUnknownEntityEvent.patch => 0117-Add-PlayerUseUnknownEntityEvent.patch} (91%) rename Spigot-Server-Patches/{0122-Fix-reducedDebugInfo-not-initialized-on-client.patch => 0118-Fix-reducedDebugInfo-not-initialized-on-client.patch} (87%) rename Spigot-Server-Patches/{0123-Configurable-Grass-Spread-Tick-Rate.patch => 0119-Configurable-Grass-Spread-Tick-Rate.patch} (86%) rename Spigot-Server-Patches/{0124-Configurable-Keep-Spawn-Loaded-range-per-world.patch => 0120-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (90%) rename Spigot-Server-Patches/{0125-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch => 0121-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch} (80%) rename Spigot-Server-Patches/{0126-Don-t-spam-reload-spawn-chunks-in-nether-end.patch => 0122-Don-t-spam-reload-spawn-chunks-in-nether-end.patch} (88%) rename Spigot-Server-Patches/{0127-Remove-Debug-checks-from-DataBits.patch => 0123-Remove-Debug-checks-from-DataBits.patch} (95%) rename Spigot-Server-Patches/{0128-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch => 0124-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch} (89%) rename Spigot-Server-Patches/{0130-Workaround-for-setting-passengers-on-players.patch => 0125-Workaround-for-setting-passengers-on-players.patch} (86%) rename Spigot-Server-Patches/{0131-SPIGOT-1903-Update-PlayerConnection-on-teleporting-p.patch => 0126-SPIGOT-1903-Update-PlayerConnection-on-teleporting-p.patch} (83%) rename Spigot-Server-Patches/{0132-Remove-unused-World-Tile-Entity-List.patch => 0127-Remove-unused-World-Tile-Entity-List.patch} (90%) rename Spigot-Server-Patches/{0133-Don-t-tick-Skulls-unused-code.patch => 0128-Don-t-tick-Skulls-unused-code.patch} (81%) delete mode 100644 Spigot-Server-Patches/0129-16w14a-memory-cleanup.patch rename Spigot-Server-Patches/{0134-Fix-some-players-not-being-kicked-on-shutdown.patch => 0129-Fix-some-players-not-being-kicked-on-shutdown.patch} (86%) rename Spigot-Server-Patches/{0135-Configurable-Player-Collision.patch => 0130-Configurable-Player-Collision.patch} (92%) rename Spigot-Server-Patches/{0136-Add-handshake-event-to-allow-plugins-to-handle-clien.patch => 0131-Add-handshake-event-to-allow-plugins-to-handle-clien.patch} (94%) rename Spigot-Server-Patches/{0137-Water-mobs-should-only-spawn-in-the-water.patch => 0132-Water-mobs-should-only-spawn-in-the-water.patch} (89%) rename Spigot-Server-Patches/{0138-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch => 0133-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch} (95%) rename Spigot-Server-Patches/{0139-Allow-capping-number-of-attempts-at-spawning-mobs.patch => 0134-Allow-capping-number-of-attempts-at-spawning-mobs.patch} (92%) rename Spigot-Server-Patches/{0140-Configurable-RCON-IP-address.patch => 0135-Configurable-RCON-IP-address.patch} (93%) rename Spigot-Server-Patches/{0141-Prevent-Fire-from-loading-chunks.patch => 0136-Prevent-Fire-from-loading-chunks.patch} (87%) rename Spigot-Server-Patches/{0142-Implement-PlayerLocaleChangeEvent.patch => 0137-Implement-PlayerLocaleChangeEvent.patch} (72%) rename Spigot-Server-Patches/{0143-EntityRegainHealthEvent-isFastRegen-API.patch => 0138-EntityRegainHealthEvent-isFastRegen-API.patch} (91%) rename Spigot-Server-Patches/{0144-Add-ability-to-configure-frosted_ice-properties.patch => 0139-Add-ability-to-configure-frosted_ice-properties.patch} (90%) rename Spigot-Server-Patches/{0145-Vehicle-Event-Cancellation-Changes.patch => 0140-Vehicle-Event-Cancellation-Changes.patch} (78%) rename Spigot-Server-Patches/{0146-Arrow-pickup-rule-API.patch => 0141-Arrow-pickup-rule-API.patch} (96%) rename Spigot-Server-Patches/{0147-Check-entity-count-additions-and-mark-entities-remov.patch => 0142-Check-entity-count-additions-and-mark-entities-remov.patch} (94%) rename Spigot-Server-Patches/{0148-SPIGOT-1401-Fix-dispenser-dropper-furnace-placement.patch => 0143-SPIGOT-1401-Fix-dispenser-dropper-furnace-placement.patch} (78%) rename Spigot-Server-Patches/{0149-Reimplement-PlayerEditBookEvent.patch => 0144-Reimplement-PlayerEditBookEvent.patch} (87%) rename Spigot-Server-Patches/{0150-Improve-Minecraft-Hopper-Performance.patch => 0145-Improve-Minecraft-Hopper-Performance.patch} (85%) rename Spigot-Server-Patches/{0151-remove-null-possibility-for-getServer-singleton.patch => 0146-remove-null-possibility-for-getServer-singleton.patch} (85%) rename Spigot-Server-Patches/{0152-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch => 0147-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch} (89%) rename Spigot-Server-Patches/{0153-LootTable-API-Replenishable-Lootables-Feature.patch => 0148-LootTable-API-Replenishable-Lootables-Feature.patch} (95%) rename Spigot-Server-Patches/{0154-Do-not-load-chunks-for-pathfinding.patch => 0149-Do-not-load-chunks-for-pathfinding.patch} (80%) rename Spigot-Server-Patches/{0155-Entity-Tracking-Improvements.patch => 0150-Entity-Tracking-Improvements.patch} (95%) rename Spigot-Server-Patches/{0156-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch => 0151-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch} (90%) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index 740c7e362b..5e8250343b 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -1,11 +1,11 @@ -From a0243fa99d5017189d33a96c3a7dd8838245d915 Mon Sep 17 00:00:00 2001 +From 40a793d76f1bb04ad6d9d6cbbadb2a04024ed1b3 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 17:16:08 -0600 Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 662379f..a03865f 100644 +index 0ab9e14..79498ae 100644 --- a/pom.xml +++ b/pom.xml @@ -4,35 +4,37 @@ @@ -24,7 +24,7 @@ index 662379f..a03865f 100644 - spigot-api + com.destroystokyo.paper + paper-api - 1.9.2-R0.1-SNAPSHOT + 1.9.4-R0.1-SNAPSHOT jar - Spigot-API @@ -95,5 +95,5 @@ index 662379f..a03865f 100644 maven-shade-plugin 2.4.1 -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index f39056eaa8..3c0e90bbe6 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 99e0482b0bdb8105b8a6d5a6220ece2edcc25190 Mon Sep 17 00:00:00 2001 +From 91ee9a57d18f73a2947465b971dc8e81c0b3fae2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:40:33 -0600 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index d775f7b..8899e3a 100644 +index 95a9224..90fde44 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ @@ -17,7 +17,7 @@ index d775f7b..8899e3a 100644 + com.destroystokyo.paper + paper jar - 1.9.2-R0.1-SNAPSHOT + 1.9.4-R0.1-SNAPSHOT - Spigot - http://www.spigotmc.org + Paper @@ -26,7 +26,7 @@ index d775f7b..8899e3a 100644 UTF-8 @@ -15,21 +15,22 @@ - 1_9_R1 + 1_9_R2 git-Bukkit- - 1.6 @@ -184,5 +184,5 @@ index 9304637..674096c 100644 if (stream != null) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index da1193b113..4042d5608d 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -1,4 +1,4 @@ -From 9ba541352fa628a6a285572dbbd59a83389b5d14 Mon Sep 17 00:00:00 2001 +From 41aae67ada140ebfe2b2c0fcbd5eb9172943b696 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:02:09 -0600 Subject: [PATCH] Paper config files @@ -250,10 +250,10 @@ index 0000000..2d50237 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index b542536..328857d 100644 +index c956362..6750d85 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -180,6 +180,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -179,6 +179,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings")); org.spigotmc.SpigotConfig.registerCommands(); // Spigot end @@ -265,7 +265,7 @@ index b542536..328857d 100644 DedicatedServer.LOGGER.info("Generating keypair"); this.a(MinecraftEncryption.b()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c386a60..f38b256 100644 +index a7ab03d..4dd6777 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -125,6 +125,8 @@ public abstract class World implements IBlockAccess { diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index 564c4db20b..f016e3d8c6 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -1,27 +1,27 @@ -From 6c59912ddf9adcda60b7bd1f59ac2624b4674946 Mon Sep 17 00:00:00 2001 +From 9fec88bf2a25d685dedd4338cbd7bec7df280fd7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 19:36:20 -0400 Subject: [PATCH] MC Dev fixes diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index e54e7b7..47c9f69 100644 +index f02fc60..d60e755 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -87,7 +87,7 @@ public class BaseBlockPosition implements Comparable { +@@ -89,7 +89,7 @@ public class BaseBlockPosition implements Comparable { return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString(); } - public int compareTo(Object object) { + public int compareTo(BaseBlockPosition object) { // Paper - decompile fix - return this.i((BaseBlockPosition) object); + return this.l((BaseBlockPosition) object); } } diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index be4b871..5ca8125 100644 +index 75e98d2..36952ae 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -47,7 +47,7 @@ public abstract class BiomeBase { +@@ -49,7 +49,7 @@ public abstract class BiomeBase { protected List x; public static int a(BiomeBase biomebase) { @@ -29,40 +29,9 @@ index be4b871..5ca8125 100644 + return BiomeBase.REGISTRY_ID.a(biomebase); // Paper - decompile fix } - public static BiomeBase a(int i) { -diff --git a/src/main/java/net/minecraft/server/BlockStateList.java b/src/main/java/net/minecraft/server/BlockStateList.java -index 8df8b04..19ea22f 100644 ---- a/src/main/java/net/minecraft/server/BlockStateList.java -+++ b/src/main/java/net/minecraft/server/BlockStateList.java -@@ -83,7 +83,7 @@ public class BlockStateList { - if (!BlockStateList.a.matcher(s).matches()) { - throw new IllegalArgumentException("Block: " + block.getClass() + " has invalidly named property: " + s); - } else { -- Iterator iterator = iblockstate.c().iterator(); -+ Iterator iterator = iblockstate.c().iterator(); // Paper - decompile fix - - String s1; - -@@ -92,7 +92,7 @@ public class BlockStateList { - return s; - } - -- Comparable comparable = (Comparable) iterator.next(); -+ T comparable = iterator.next(); // Paper - decompile fix - - s1 = iblockstate.a(comparable); - } while (BlockStateList.a.matcher(s1).matches()); -@@ -154,7 +154,7 @@ public class BlockStateList { - if (!this.b.containsKey(iblockstate)) { - throw new IllegalArgumentException("Cannot get property " + iblockstate + " as it does not exist in " + this.a.t()); - } else { -- return (Comparable) iblockstate.b().cast(this.b.get(iblockstate)); -+ return iblockstate.b().cast(this.b.get(iblockstate)); // Paper - decompile fix - } - } - + @Nullable diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java -index 156922a..f2feee5 100644 +index f900ff9..95a9c77 100644 --- a/src/main/java/net/minecraft/server/CommandAbstract.java +++ b/src/main/java/net/minecraft/server/CommandAbstract.java @@ -212,7 +212,7 @@ public abstract class CommandAbstract implements ICommand { @@ -74,7 +43,7 @@ index 156922a..f2feee5 100644 } else { throw new ExceptionEntityNotFound(); } -@@ -551,7 +551,7 @@ public abstract class CommandAbstract implements ICommand { +@@ -554,7 +554,7 @@ public abstract class CommandAbstract implements ICommand { return this.getCommand().compareTo(icommand.getCommand()); } @@ -97,5 +66,5 @@ index f5bcbdb..3190cad 100644 for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) { final String entryName = clazzEntry.getName(); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index aba4e6b65f..c8cfd6019b 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -1,4 +1,4 @@ -From 20642f167afea36583aae227bf7fb18ced1a1f57 Mon Sep 17 00:00:00 2001 +From 510ca29c8152d471740af9cf9bd99f3f9c0af690 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:55:47 -0400 Subject: [PATCH] MC Utils @@ -131,10 +131,10 @@ index 0000000..ffd3152 + } +} diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 8e944a4..d9835cf 100644 +index c01cecb..7fa49dd 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java -@@ -13,7 +13,7 @@ import java.util.concurrent.Callable; +@@ -13,7 +13,7 @@ import javax.annotation.Nullable; public class NBTTagCompound extends NBTBase { @@ -154,9 +154,9 @@ index 8e944a4..d9835cf 100644 } + public UUID getUUID(String prefix) { return a(prefix); } // Paper // OBFHELPER + @Nullable public UUID a(String s) { return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least")); - } diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java index 256614d..e86ca6c 100644 --- a/src/main/java/net/minecraft/server/NBTTagList.java diff --git a/Spigot-Server-Patches/0005-Timings-v2.patch b/Spigot-Server-Patches/0005-Timings-v2.patch index 6ba419ab97..dee19e8627 100644 --- a/Spigot-Server-Patches/0005-Timings-v2.patch +++ b/Spigot-Server-Patches/0005-Timings-v2.patch @@ -1,11 +1,11 @@ -From 6e216f2da974c97aca67d7852e0a00976366ddc2 Mon Sep 17 00:00:00 2001 +From 5e8f9b65bb21ee111ac18d14817827fbfa6ad44e Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 diff --git a/pom.xml b/pom.xml -index 8899e3a..8bc1a26 100644 +index 90fde44..c31ee8f 100644 --- a/pom.xml +++ b/pom.xml @@ -65,6 +65,12 @@ @@ -215,7 +215,7 @@ index 0000000..11dd692 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 32abf12..891423d 100644 +index 4f4377e..252c6c3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit; @@ -259,10 +259,10 @@ index 32abf12..891423d 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 1d2f580..6005d03 100644 +index 8cee6fa..3212255 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -32,6 +32,15 @@ public class Block { +@@ -33,6 +33,15 @@ public class Block { protected final BlockStateList blockStateList; private IBlockData blockData; private String name; @@ -279,10 +279,10 @@ index 1d2f580..6005d03 100644 public static int getId(Block block) { return Block.REGISTRY.a(block); // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 328857d..42752d9 100644 +index 6750d85..70994d4 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -22,7 +22,7 @@ import java.io.PrintStream; +@@ -21,7 +21,7 @@ import java.io.PrintStream; import org.apache.logging.log4j.Level; import org.bukkit.craftbukkit.LoggerOutputStream; @@ -291,7 +291,7 @@ index 328857d..42752d9 100644 import org.bukkit.event.server.ServerCommandEvent; import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; -@@ -428,7 +428,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -427,7 +427,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } public void aL() { @@ -300,7 +300,7 @@ index 328857d..42752d9 100644 while (!this.serverCommandQueue.isEmpty()) { ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0); -@@ -443,7 +443,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -442,7 +442,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer // CraftBukkit end } @@ -310,7 +310,7 @@ index 328857d..42752d9 100644 public boolean aa() { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2983756..54367ef 100644 +index 6ad99b0..62ada23 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -24,7 +24,8 @@ import org.bukkit.block.BlockFace; @@ -323,7 +323,7 @@ index 2983756..54367ef 100644 import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; -@@ -140,7 +141,7 @@ public abstract class Entity implements ICommandListener { +@@ -141,7 +142,7 @@ public abstract class Entity implements ICommandListener { public boolean valid; // CraftBukkit public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 @@ -332,7 +332,7 @@ index 2983756..54367ef 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -462,7 +463,6 @@ public abstract class Entity implements ICommandListener { +@@ -464,7 +465,6 @@ public abstract class Entity implements ICommandListener { } public void move(double d0, double d1, double d2) { @@ -340,7 +340,7 @@ index 2983756..54367ef 100644 if (this.noclip) { this.a(this.getBoundingBox().c(d0, d1, d2)); this.recalcPosition(); -@@ -803,7 +803,6 @@ public abstract class Entity implements ICommandListener { +@@ -805,7 +805,6 @@ public abstract class Entity implements ICommandListener { this.world.methodProfiler.b(); } @@ -349,10 +349,10 @@ index 2983756..54367ef 100644 public void recalcPosition() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 09d6bd5..9fc46b1 100644 +index 5f84a70..4d7be74 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -25,7 +25,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; +@@ -26,7 +26,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; import org.bukkit.event.player.PlayerItemConsumeEvent; // CraftBukkit end @@ -361,15 +361,15 @@ index 09d6bd5..9fc46b1 100644 public abstract class EntityLiving extends Entity { -@@ -1698,7 +1698,6 @@ public abstract class EntityLiving extends Entity { +@@ -1707,7 +1707,6 @@ public abstract class EntityLiving extends Entity { } public void m() { - SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot super.m(); - this.cu(); + this.cv(); if (!this.world.isClientSide) { -@@ -1771,9 +1770,7 @@ public abstract class EntityLiving extends Entity { +@@ -1780,9 +1779,7 @@ public abstract class EntityLiving extends Entity { } } @@ -379,24 +379,24 @@ index 09d6bd5..9fc46b1 100644 double d0 = this.locX - this.lastX; double d1 = this.locZ - this.lastZ; float f = (float) (d0 * d0 + d1 * d1); -@@ -1842,8 +1839,6 @@ public abstract class EntityLiving extends Entity { +@@ -1851,8 +1848,6 @@ public abstract class EntityLiving extends Entity { } else { - this.bo = 0; + this.bp = 0; } - - SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot } protected float h(float f, float f1) { -@@ -1908,7 +1903,6 @@ public abstract class EntityLiving extends Entity { +@@ -1917,7 +1912,6 @@ public abstract class EntityLiving extends Entity { } this.world.methodProfiler.a("ai"); - SpigotTimings.timerEntityAI.startTiming(); // Spigot - if (this.cf()) { - this.bc = false; - this.bd = 0.0F; -@@ -1919,7 +1913,6 @@ public abstract class EntityLiving extends Entity { + if (this.cg()) { + this.bd = false; + this.be = 0.0F; +@@ -1928,7 +1922,6 @@ public abstract class EntityLiving extends Entity { this.doTick(); this.world.methodProfiler.b(); } @@ -404,26 +404,26 @@ index 09d6bd5..9fc46b1 100644 this.world.methodProfiler.b(); this.world.methodProfiler.a("jump"); -@@ -1942,14 +1935,10 @@ public abstract class EntityLiving extends Entity { - this.be *= 0.98F; - this.bf *= 0.9F; +@@ -1951,14 +1944,10 @@ public abstract class EntityLiving extends Entity { + this.bf *= 0.98F; + this.bg *= 0.9F; this.r(); - SpigotTimings.timerEntityAIMove.startTiming(); // Spigot - this.g(this.bd, this.be); + this.g(this.be, this.bf); - SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot this.world.methodProfiler.b(); this.world.methodProfiler.a("push"); - SpigotTimings.timerEntityAICollision.startTiming(); // Spigot - this.cn(); + this.co(); - SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot this.world.methodProfiler.b(); } diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index 3773bb1..8eceb93 100644 +index 68242d9..2eea1c1 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java -@@ -172,7 +172,7 @@ public class EntityTracker { +@@ -171,7 +171,7 @@ public class EntityTracker { public void updatePlayers() { ArrayList arraylist = Lists.newArrayList(); Iterator iterator = this.c.iterator(); @@ -432,7 +432,7 @@ index 3773bb1..8eceb93 100644 while (iterator.hasNext()) { EntityTrackerEntry entitytrackerentry = (EntityTrackerEntry) iterator.next(); -@@ -185,7 +185,9 @@ public class EntityTracker { +@@ -184,7 +184,9 @@ public class EntityTracker { } } } @@ -442,7 +442,7 @@ index 3773bb1..8eceb93 100644 for (int i = 0; i < arraylist.size(); ++i) { EntityPlayer entityplayer = (EntityPlayer) arraylist.get(i); Iterator iterator1 = this.c.iterator(); -@@ -198,6 +200,7 @@ public class EntityTracker { +@@ -197,6 +199,7 @@ public class EntityTracker { } } } @@ -451,19 +451,19 @@ index 3773bb1..8eceb93 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0caa3f9..8bfbc2c 100644 +index e17d5d3..8845ad2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -45,7 +45,7 @@ import org.bukkit.craftbukkit.CraftServer; - - // CraftBukkit start +@@ -50,7 +50,7 @@ import org.apache.logging.log4j.Logger; + import org.bukkit.Bukkit; + import org.bukkit.craftbukkit.CraftServer; // CraftBukkit end -import org.bukkit.craftbukkit.SpigotTimings; // Spigot +import co.aikar.timings.MinecraftTimings; // Paper public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics { -@@ -449,6 +449,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -454,6 +454,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs } // CraftBukkit end MinecraftServer.LOGGER.info("Stopping server"); @@ -471,7 +471,7 @@ index 0caa3f9..8bfbc2c 100644 // CraftBukkit start if (this.server != null) { this.server.disablePlugins(); -@@ -646,7 +647,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -651,7 +652,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs protected void B() {} protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws @@ -480,7 +480,7 @@ index 0caa3f9..8bfbc2c 100644 long i = System.nanoTime(); ++this.ticks; -@@ -673,7 +674,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -678,7 +679,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs } if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -489,7 +489,7 @@ index 0caa3f9..8bfbc2c 100644 this.methodProfiler.a("save"); this.v.savePlayers(); // Spigot Start -@@ -688,7 +689,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -693,7 +694,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs // this.saveChunks(true); // Spigot End this.methodProfiler.b(); @@ -498,7 +498,7 @@ index 0caa3f9..8bfbc2c 100644 } this.methodProfiler.a("tallying"); -@@ -705,12 +706,13 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -710,12 +711,13 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs this.methodProfiler.b(); this.methodProfiler.b(); @@ -514,7 +514,7 @@ index 0caa3f9..8bfbc2c 100644 this.methodProfiler.a("jobs"); Queue queue = this.j; -@@ -721,26 +723,27 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -726,26 +728,27 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs SystemUtils.a(entry, MinecraftServer.LOGGER); } // Spigot end @@ -549,7 +549,7 @@ index 0caa3f9..8bfbc2c 100644 // Send time updates to everyone, it will get the right time from the world the player is in. if (this.ticks % 20 == 0) { for (int i = 0; i < this.getPlayerList().players.size(); ++i) { -@@ -748,7 +751,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -753,7 +756,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time } } @@ -558,7 +558,7 @@ index 0caa3f9..8bfbc2c 100644 int i; -@@ -805,9 +808,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -810,9 +813,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs this.methodProfiler.b(); this.methodProfiler.a("tracker"); @@ -568,7 +568,7 @@ index 0caa3f9..8bfbc2c 100644 this.methodProfiler.b(); this.methodProfiler.b(); // } // CraftBukkit -@@ -816,20 +817,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -821,20 +822,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs } this.methodProfiler.c("connection"); @@ -596,10 +596,10 @@ index 0caa3f9..8bfbc2c 100644 this.methodProfiler.b(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 711b037..5599845 100644 +index 0a14dd2..7c52e15 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory; +@@ -57,6 +57,7 @@ import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.InventoryView; import org.bukkit.util.NumberConversions; @@ -607,7 +607,7 @@ index 711b037..5599845 100644 // CraftBukkit end public class PlayerConnection implements PacketListenerPlayIn, ITickable { -@@ -1331,7 +1332,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1330,7 +1331,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit end private void handleCommand(String s) { @@ -616,7 +616,7 @@ index 711b037..5599845 100644 // CraftBukkit start - whole method if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getName() + " issued server command: " + s); -@@ -1342,22 +1343,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1341,22 +1342,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -644,10 +644,10 @@ index 711b037..5599845 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index e6524e9..20bf384 100644 +index 0cb2e63..6d4f4e7 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java -@@ -6,12 +6,13 @@ import java.util.concurrent.Callable; +@@ -6,12 +6,13 @@ import javax.annotation.Nullable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -664,7 +664,7 @@ index e6524e9..20bf384 100644 private static Map> f = Maps.newHashMap(); private static Map, String> g = Maps.newHashMap(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f38b256..9c67687 100644 +index 4dd6777..0c3ed2d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -18,11 +18,11 @@ import com.google.common.collect.Maps; @@ -698,7 +698,7 @@ index f38b256..9c67687 100644 this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -@@ -1370,6 +1370,7 @@ public abstract class World implements IBlockAccess { +@@ -1375,6 +1375,7 @@ public abstract class World implements IBlockAccess { } this.methodProfiler.c("remove"); @@ -706,7 +706,7 @@ index f38b256..9c67687 100644 this.entityList.removeAll(this.f); int j; -@@ -1390,6 +1391,7 @@ public abstract class World implements IBlockAccess { +@@ -1395,6 +1396,7 @@ public abstract class World implements IBlockAccess { this.f.clear(); this.l(); @@ -714,7 +714,7 @@ index f38b256..9c67687 100644 this.methodProfiler.c("regular"); CrashReportSystemDetails crashreportsystemdetails1; -@@ -1399,6 +1401,7 @@ public abstract class World implements IBlockAccess { +@@ -1404,6 +1406,7 @@ public abstract class World implements IBlockAccess { timings.entityTick.startTiming(); // Spigot guardEntityList = true; // Spigot // CraftBukkit start - Use field for loop variable @@ -722,7 +722,7 @@ index f38b256..9c67687 100644 int entitiesThisCycle = 0; if (tickPosition < 0) tickPosition = 0; for (entityLimiter.initTick(); -@@ -1420,10 +1423,11 @@ public abstract class World implements IBlockAccess { +@@ -1425,10 +1428,11 @@ public abstract class World implements IBlockAccess { this.methodProfiler.a("tick"); if (!entity.dead && !(entity instanceof EntityPlayer)) { try { @@ -736,7 +736,7 @@ index f38b256..9c67687 100644 crashreport1 = CrashReport.a(throwable1, "Ticking entity"); crashreportsystemdetails1 = crashreport1.a("Entity being ticked"); entity.appendEntityCrashDetails(crashreportsystemdetails1); -@@ -1555,6 +1559,7 @@ public abstract class World implements IBlockAccess { +@@ -1560,6 +1564,7 @@ public abstract class World implements IBlockAccess { } timings.tileEntityPending.stopTiming(); // Spigot @@ -744,7 +744,7 @@ index f38b256..9c67687 100644 this.methodProfiler.b(); this.methodProfiler.b(); } -@@ -1600,7 +1605,6 @@ public abstract class World implements IBlockAccess { +@@ -1605,7 +1610,6 @@ public abstract class World implements IBlockAccess { entity.ticksLived++; entity.inactiveTick(); } else { @@ -752,7 +752,7 @@ index f38b256..9c67687 100644 // CraftBukkit end entity.M = entity.locX; entity.N = entity.locY; -@@ -1609,6 +1613,7 @@ public abstract class World implements IBlockAccess { +@@ -1614,6 +1618,7 @@ public abstract class World implements IBlockAccess { entity.lastPitch = entity.pitch; if (flag && entity.aa) { ++entity.ticksLived; @@ -760,7 +760,7 @@ index f38b256..9c67687 100644 if (entity.isPassenger()) { entity.aw(); } else { -@@ -1667,8 +1672,6 @@ public abstract class World implements IBlockAccess { +@@ -1672,8 +1677,6 @@ public abstract class World implements IBlockAccess { } } } @@ -770,10 +770,10 @@ index f38b256..9c67687 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7bf6480..433ed2a 100644 +index f8ef497..4980c7a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -244,13 +244,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -245,13 +245,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { timings.doChunkUnload.stopTiming(); // Spigot this.methodProfiler.c("tickPending"); @@ -791,7 +791,7 @@ index 7bf6480..433ed2a 100644 this.methodProfiler.c("chunkMap"); timings.doChunkMap.startTiming(); // Spigot this.manager.flush(); -@@ -481,7 +481,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -483,7 +483,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } } @@ -800,7 +800,7 @@ index 7bf6480..433ed2a 100644 if (i > 0) { ChunkSection[] achunksection = chunk.getSections(); int i1 = achunksection.length; -@@ -509,6 +509,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -511,6 +511,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } } } @@ -808,7 +808,7 @@ index 7bf6480..433ed2a 100644 } this.methodProfiler.b(); -@@ -704,6 +705,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -706,6 +707,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.methodProfiler.a("cleaning"); @@ -816,7 +816,7 @@ index 7bf6480..433ed2a 100644 NextTickListEntry nextticklistentry; for (int j = 0; j < i; ++j) { -@@ -717,9 +719,11 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -719,9 +721,11 @@ public class WorldServer extends World implements IAsyncTaskHandler { // this.nextTickListHash.remove(nextticklistentry); this.U.add(nextticklistentry); } @@ -828,7 +828,7 @@ index 7bf6480..433ed2a 100644 Iterator iterator = this.U.iterator(); while (iterator.hasNext()) { -@@ -729,6 +733,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -731,6 +735,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (this.areChunksLoadedBetween(nextticklistentry.a.a(-b0, -b0, -b0), nextticklistentry.a.a(b0, b0, b0))) { IBlockData iblockdata = this.getType(nextticklistentry.a); @@ -837,7 +837,7 @@ index 7bf6480..433ed2a 100644 if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) { try { -@@ -741,10 +747,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -743,10 +749,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { throw new ReportedException(crashreport); } } @@ -1067,7 +1067,7 @@ index 41d2d87..0000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6d13b62..dc5ddb1 100644 +index 46882f1..35f6c27 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -37,15 +37,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; @@ -1087,7 +1087,7 @@ index 6d13b62..dc5ddb1 100644 import org.bukkit.craftbukkit.map.CraftMapView; import org.bukkit.craftbukkit.map.RenderData; import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; -@@ -1542,6 +1536,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1545,6 +1539,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } @@ -1236,7 +1236,7 @@ index e52ef47..3d90b34 100644 this.value = value; } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index e53092c..499dc24 100644 +index a752376..8870607 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither; diff --git a/Spigot-Server-Patches/0006-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0006-Vanished-players-don-t-have-rights.patch index eadc69f9c2..14216ace94 100644 --- a/Spigot-Server-Patches/0006-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0006-Vanished-players-don-t-have-rights.patch @@ -1,14 +1,14 @@ -From 985d47dbf4c2334eb94567cad6fca09c5ede38e3 Mon Sep 17 00:00:00 2001 +From 71af32a912b140b221e5df8701fdefe297a19ceb Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:20:21 -0600 Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index bd0fd80..df19327 100644 +index 7593aa2..29b6f16 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java -@@ -184,6 +184,14 @@ public abstract class EntityArrow extends Entity implements IProjectile { +@@ -185,6 +185,14 @@ public abstract class EntityArrow extends Entity implements IProjectile { } } @@ -24,7 +24,7 @@ index bd0fd80..df19327 100644 this.a(movingobjectposition); } diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 04fa947..140df3a 100644 +index c47b009..12e2303 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -198,6 +198,14 @@ public class EntityFishingHook extends Entity { @@ -43,10 +43,10 @@ index 04fa947..140df3a 100644 org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event if (movingobjectposition.entity != null) { diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java -index 93014a4..e0fc22b 100644 +index f47b148..0c36bad 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java -@@ -157,6 +157,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile { +@@ -158,6 +158,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile { movingobjectposition = new MovingObjectPosition(entity); } @@ -62,10 +62,10 @@ index 93014a4..e0fc22b 100644 if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) { this.e(movingobjectposition.a()); diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java -index 300573a..6eeb03b 100644 +index b9aa1fc..6dbad10 100644 --- a/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java -@@ -21,7 +21,7 @@ public class ItemBlock extends Item { +@@ -23,7 +23,7 @@ public class ItemBlock extends Item { blockposition = blockposition.shift(enumdirection); } @@ -75,10 +75,10 @@ index 300573a..6eeb03b 100644 IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index fab56f7..b26516a 100644 +index 0c3ed2d..e2a06f1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1685,6 +1685,14 @@ public abstract class World implements IBlockAccess { +@@ -1690,6 +1690,14 @@ public abstract class World implements IBlockAccess { for (int i = 0; i < list.size(); ++i) { Entity entity1 = (Entity) list.get(i); @@ -94,5 +94,5 @@ index fab56f7..b26516a 100644 return false; } -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0007-Configurable-squid-spawn-ranges.patch b/Spigot-Server-Patches/0007-Configurable-squid-spawn-ranges.patch index b2eadc99a5..fba35cec3c 100644 --- a/Spigot-Server-Patches/0007-Configurable-squid-spawn-ranges.patch +++ b/Spigot-Server-Patches/0007-Configurable-squid-spawn-ranges.patch @@ -1,4 +1,4 @@ -From 39ea4e339a937f8079827d3b9a46e00afae5f4c0 Mon Sep 17 00:00:00 2001 +From ba437ee826f25bccd4ff0b36e33a206e4e625c66 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 12:45:11 -0600 Subject: [PATCH] Configurable squid spawn ranges @@ -22,19 +22,19 @@ index 2d50237..fe9502c 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index b94444d..9f1a50e 100644 +index c771b6b..62469f8 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java -@@ -138,7 +138,8 @@ public class EntitySquid extends EntityWaterAnimal { +@@ -141,7 +141,8 @@ public class EntitySquid extends EntityWaterAnimal { } - public boolean cF() { -- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cF(); + public boolean cG() { +- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cG(); + // Paper - Configurable squid spawn height range -+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cF(); ++ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cG(); } public void b(float f, float f1, float f2) { -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0008-Configurable-cactus-and-reed-natural-growth-heights.patch b/Spigot-Server-Patches/0008-Configurable-cactus-and-reed-natural-growth-heights.patch index 5bcee944ba..461f92f7f6 100644 --- a/Spigot-Server-Patches/0008-Configurable-cactus-and-reed-natural-growth-heights.patch +++ b/Spigot-Server-Patches/0008-Configurable-cactus-and-reed-natural-growth-heights.patch @@ -1,4 +1,4 @@ -From b0e638701232329aa46911cab5cfdc6d484605a0 Mon Sep 17 00:00:00 2001 +From 37379ea38aeae3de6345be81d535c6304db9286a Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:02:51 -0600 Subject: [PATCH] Configurable cactus and reed natural growth heights @@ -23,7 +23,7 @@ index fe9502c..22b643e 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java -index 6f0af4e..e994692 100644 +index 4368731..fec2f0a 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java @@ -28,7 +28,7 @@ public class BlockCactus extends Block { @@ -36,10 +36,10 @@ index 6f0af4e..e994692 100644 if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java -index 4a79cf4..4c69376 100644 +index 4bb63ff..2e565d3 100644 --- a/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java -@@ -27,7 +27,7 @@ public class BlockReed extends Block { +@@ -28,7 +28,7 @@ public class BlockReed extends Block { ; } @@ -49,5 +49,5 @@ index 4a79cf4..4c69376 100644 if (j >= (byte) range(3, ((100.0F / world.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch index c9f4ca8414..287f099c27 100644 --- a/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/0009-Configurable-baby-zombie-movement-speed.patch @@ -1,4 +1,4 @@ -From 078cefa411dcb2cbc5b722781ae0af2548261f80 Mon Sep 17 00:00:00 2001 +From bb6eb027005395cbddc8fc0acae01a60dda0858e Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:09:16 -0600 Subject: [PATCH] Configurable baby zombie movement speed @@ -20,19 +20,19 @@ index 22b643e..2cb4ac6 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index e7be27a..949452c 100644 +index 13af566..9f81142 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -15,7 +15,7 @@ public class EntityZombie extends EntityMonster { +@@ -16,7 +16,7 @@ public class EntityZombie extends EntityMonster { protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance"); private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); - private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, 1); + private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable - private static final DataWatcherObject bv = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); - private static final DataWatcherObject bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); - private static final DataWatcherObject bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); -@@ -105,9 +105,9 @@ public class EntityZombie extends EntityMonster { + private static final DataWatcherObject bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); + private static final DataWatcherObject bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b); + private static final DataWatcherObject by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h); +@@ -106,9 +106,9 @@ public class EntityZombie extends EntityMonster { if (this.world != null && !this.world.isClientSide) { AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); @@ -45,5 +45,5 @@ index e7be27a..949452c 100644 } -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0010-Configurable-fishing-time-ranges.patch b/Spigot-Server-Patches/0010-Configurable-fishing-time-ranges.patch index 1c0257c9c3..49365dfd11 100644 --- a/Spigot-Server-Patches/0010-Configurable-fishing-time-ranges.patch +++ b/Spigot-Server-Patches/0010-Configurable-fishing-time-ranges.patch @@ -1,4 +1,4 @@ -From 5d63e7d32e8fd136134d6e07f97b34da19e03b9d Mon Sep 17 00:00:00 2001 +From 7f1e7b45866ef1b0f6d4236c5e255ae3e1d8698b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:14:11 -0600 Subject: [PATCH] Configurable fishing time ranges @@ -22,18 +22,18 @@ index 2cb4ac6..03a4fb4 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 140df3a..b99d9c4 100644 +index 12e2303..0e135ce 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -359,7 +359,7 @@ public class EntityFishingHook extends Entity { - this.aw = MathHelper.nextInt(this.random, 20, 80); + this.ax = MathHelper.nextInt(this.random, 20, 80); } } else { -- this.av = MathHelper.nextInt(this.random, 100, 900); -+ this.av = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - Configurable fishing time range - this.av -= EnchantmentManager.g(this.owner) * 20 * 5; +- this.aw = MathHelper.nextInt(this.random, 100, 900); ++ this.aw = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - Configurable fishing time range + this.aw -= EnchantmentManager.g(this.owner) * 20 * 5; } } -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch index c9eec66b7f..e4c75172e5 100644 --- a/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch @@ -1,4 +1,4 @@ -From 7995af463977ca7eeec05b1651e267e18c19b03b Mon Sep 17 00:00:00 2001 +From ebe3ea7e457df136088d8e88252db21880d3bff2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:24:16 -0600 Subject: [PATCH] Allow nerfed mobs to jump @@ -19,18 +19,18 @@ index 03a4fb4..6d6793c 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index b3f637f..d115234 100644 +index ea77a33..ecb59e7 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -43,6 +43,7 @@ public abstract class EntityInsentient extends EntityLiving { - private boolean bC; +@@ -44,6 +44,7 @@ public abstract class EntityInsentient extends EntityLiving { + private boolean bD; private Entity leashHolder; - private NBTTagCompound bE; + private NBTTagCompound bF; + public PathfinderGoalFloat goalFloat; // Paper public EntityInsentient(World world) { super(world); -@@ -623,6 +624,12 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -631,6 +632,12 @@ public abstract class EntityInsentient extends EntityLiving { // Spigot Start if ( this.fromMobSpawner ) { @@ -56,5 +56,5 @@ index 1a20dbf..c56a0d0 100644 ((Navigation) entityinsentient.getNavigation()).c(true); } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0012-Toggle-for-player-interact-limiter.patch b/Spigot-Server-Patches/0012-Toggle-for-player-interact-limiter.patch index fb83300b51..b0f32357dd 100644 --- a/Spigot-Server-Patches/0012-Toggle-for-player-interact-limiter.patch +++ b/Spigot-Server-Patches/0012-Toggle-for-player-interact-limiter.patch @@ -1,11 +1,11 @@ -From 10ef84cd8963f9fa245e08032f2cadc54fea7cac Mon Sep 17 00:00:00 2001 +From 3dd75df6f6bc3d751fd8055aa8635f2fceee2f4f Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:31:05 -0600 Subject: [PATCH] Toggle for player interact limiter diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 891423d..f75b758 100644 +index 252c6c3..f9a4bf4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -184,4 +184,12 @@ public class PaperConfig { @@ -22,10 +22,10 @@ index 891423d..f75b758 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5599845..961747d 100644 +index 7c52e15..0c2c151 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -913,7 +913,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -912,7 +912,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { this.player.resetIdleTimer(); // Spigot start boolean throttled = false; diff --git a/Spigot-Server-Patches/0013-Player-Exhaustion-Multipliers.patch b/Spigot-Server-Patches/0013-Player-Exhaustion-Multipliers.patch index 40d4113e32..cfc9e2fc4b 100644 --- a/Spigot-Server-Patches/0013-Player-Exhaustion-Multipliers.patch +++ b/Spigot-Server-Patches/0013-Player-Exhaustion-Multipliers.patch @@ -1,4 +1,4 @@ -From 284c8d203857ff23b9b0484880cd760ebb7afe65 Mon Sep 17 00:00:00 2001 +From 539d8278cd23299ba4310d2f5b3f2862be81e9fb Mon Sep 17 00:00:00 2001 From: gsand Date: Tue, 1 Mar 2016 13:43:16 -0600 Subject: [PATCH] Player Exhaustion Multipliers @@ -23,12 +23,12 @@ index 6d6793c..8a63435 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index 88e1e98..0f71013 100644 +index 3212255..3d6f803 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -418,7 +418,7 @@ public class Block { +@@ -450,7 +450,7 @@ public class Block { - public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, TileEntity tileentity, ItemStack itemstack) { + public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, @Nullable TileEntity tileentity, @Nullable ItemStack itemstack) { entityhuman.b(StatisticList.a(this)); - entityhuman.applyExhaustion(0.025F); + entityhuman.applyExhaustion(world.paperConfig.blockBreakExhaustion); // Paper - Configurable block break exhaustion @@ -36,10 +36,10 @@ index 88e1e98..0f71013 100644 ItemStack itemstack1 = this.u(iblockdata); diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index e1bb5c5..11388ab 100644 +index 6a8f499..3e1a84e 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1451,13 +1451,13 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1455,13 +1455,13 @@ public abstract class EntityHuman extends EntityLiving { i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.q, i); @@ -56,5 +56,5 @@ index e1bb5c5..11388ab 100644 } else if (this.n_()) { if (d1 > 0.0D) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch index e6dfd84a66..8c6f51f51c 100644 --- a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch @@ -1,4 +1,4 @@ -From ce0854bb55f35fce8f1539b124a7865322e839c3 Mon Sep 17 00:00:00 2001 +From 498b31972ea2738871d13c59515cabcc9e231b76 Mon Sep 17 00:00:00 2001 From: Suddenly Date: Tue, 1 Mar 2016 13:51:54 -0600 Subject: [PATCH] Add configurable despawn distances for living entities @@ -30,10 +30,10 @@ index 8a63435..f9da7f8 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index d115234..c706963 100644 +index ecb59e7..ff3443a 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -602,13 +602,13 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -610,13 +610,13 @@ public abstract class EntityInsentient extends EntityLiving { double d2 = entityhuman.locZ - this.locZ; double d3 = d0 * d0 + d1 * d1 + d2 * d2; @@ -51,5 +51,5 @@ index d115234..c706963 100644 } } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 7939f7b376..15a329823e 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -1,4 +1,4 @@ -From 0d17591b964a7dfac11699bb71e8f7e4f075696f Mon Sep 17 00:00:00 2001 +From c2b98da52b36fcfa251ddc1951645eadf6b25bbd Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 14:14:15 -0600 Subject: [PATCH] Drop falling block and tnt entities at the specified height @@ -24,10 +24,10 @@ index f9a58f9..df3e6fb 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 6573634..6246c05 100644 +index 0b2c5d7..08a7969 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java -@@ -76,6 +76,17 @@ public class EntityFallingBlock extends Entity { +@@ -77,6 +77,17 @@ public class EntityFallingBlock extends Entity { this.motY -= 0.03999999910593033D; this.move(this.motX, this.motY, this.motZ); @@ -64,5 +64,5 @@ index 35ed2a6..564ea37 100644 this.motY *= 0.9800000190734863D; this.motZ *= 0.9800000190734863D; -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index a1eeeefcfc..c9b7784e34 100644 --- a/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -1,4 +1,4 @@ -From 5fb24d96351092f0b6880a8e0f30de8fa517ba6e Mon Sep 17 00:00:00 2001 +From 1a9b35b6da96dd27d24b90dd432fc27a79615bc1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -20,10 +20,10 @@ index c872029..fac5f88 100644 EULA.a.warn("Failed to save " + this.b, exception); } finally { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8bfbc2c..b510e31 100644 +index 8845ad2..14389dd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1023,7 +1023,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -1028,7 +1028,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs } public String getServerModName() { @@ -88,5 +88,5 @@ index 94a3d42..6898b56 100644 log.log( Level.SEVERE, "------------------------------" ); // -- -2.8.2.windows.1 +2.8.2 diff --git a/Spigot-Server-Patches/0019-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0019-Player-affects-spawning-API.patch index fa3e4395b6..7a5c7be910 100644 --- a/Spigot-Server-Patches/0019-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0019-Player-affects-spawning-API.patch @@ -1,11 +1,11 @@ -From ab1bcbaacff40a69b94ba83f4488771599eedce3 Mon Sep 17 00:00:00 2001 +From ec731f31e18887483d230fc0ae9143b6e152860c Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Tue, 1 Mar 2016 14:47:52 -0600 Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 11388ab..767c384 100644 +index 3e1a84e..0f73fcf 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -1,6 +1,7 @@ @@ -16,8 +16,8 @@ index 11388ab..767c384 100644 import com.google.common.collect.Lists; import com.mojang.authlib.GameProfile; import java.util.Arrays; -@@ -65,6 +66,19 @@ public abstract class EntityHuman extends EntityLiving { - private final ItemCooldown bU = this.l(); +@@ -66,6 +67,19 @@ public abstract class EntityHuman extends EntityLiving { + private final ItemCooldown bV = this.l(); public EntityFishingHook hookedFish; + // Paper start - affectsSpawning API @@ -37,10 +37,10 @@ index 11388ab..767c384 100644 public boolean fauxSleeping; public String spawnWorld = ""; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index c706963..393ea79 100644 +index ff3443a..da102e3 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -594,7 +594,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -602,7 +602,7 @@ public abstract class EntityInsentient extends EntityLiving { if (this.persistent) { this.ticksFarFromPlayer = 0; } else { @@ -50,23 +50,23 @@ index c706963..393ea79 100644 if (entityhuman != null) { double d0 = entityhuman.locX - this.locX; diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java -index 28db04e..e19a19a 100644 +index b5fce84..ed8a425 100644 --- a/src/main/java/net/minecraft/server/EntitySilverfish.java +++ b/src/main/java/net/minecraft/server/EntitySilverfish.java -@@ -86,7 +86,7 @@ public class EntitySilverfish extends EntityMonster { +@@ -88,7 +88,7 @@ public class EntitySilverfish extends EntityMonster { - public boolean cF() { - if (super.cF()) { + public boolean cG() { + if (super.cG()) { - EntityHuman entityhuman = this.world.b(this, 5.0D); + EntityHuman entityhuman = this.world.findNearbyPlayerNotInCreativeMode(this, 5.0D, EntityHuman.affectsSpawningFilter()); // Paper - affectsSpawning filter return entityhuman == null; } else { diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 7a5b053..28fed1f 100644 +index 9f81142..774d773 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -196,7 +196,7 @@ public class EntityZombie extends EntityMonster { +@@ -197,7 +197,7 @@ public class EntityZombie extends EntityMonster { if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) { entityzombie.setPosition((double) i1, (double) j1, (double) k1); @@ -76,7 +76,7 @@ index 7a5b053..28fed1f 100644 entityzombie.setGoalTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true); entityzombie.prepare(this.world.D(new BlockPosition(entityzombie)), (GroupDataEntity) null); diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index a7903a2..f53e52c 100644 +index df35d71..6c3e365 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -32,7 +32,7 @@ public abstract class MobSpawnerAbstract { @@ -89,7 +89,7 @@ index a7903a2..f53e52c 100644 public void c() { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 9e19dfd..588377c 100644 +index 4eedd41..852bdf8 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -50,6 +50,8 @@ public final class SpawnerCreature { @@ -111,7 +111,7 @@ index 9e19dfd..588377c 100644 biomebase_biomemeta = worldserver.a(enumcreaturetype, (BlockPosition) blockposition_mutableblockposition); if (biomebase_biomemeta == null) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8b30dc4..60d658f 100644 +index 9599849..81f4a42 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -3,6 +3,7 @@ @@ -122,9 +122,9 @@ index 8b30dc4..60d658f 100644 import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.Calendar; -@@ -2690,14 +2691,29 @@ public abstract class World implements IBlockAccess { - } +@@ -2701,16 +2702,31 @@ public abstract class World implements IBlockAccess { + @Nullable public EntityHuman findNearbyPlayer(Entity entity, double d0) { - return this.a(entity.locX, entity.locY, entity.locZ, d0, false); + // Paper start - Add filter parameter @@ -135,6 +135,7 @@ index 8b30dc4..60d658f 100644 + return this.findNearbyPlayer(entity.locX, entity.locY, entity.locZ, d0, false, filter); } + @Nullable public EntityHuman b(Entity entity, double d0) { - return this.a(entity.locX, entity.locY, entity.locZ, d0, true); + return this.findNearbyPlayerNotInCreativeMode(entity, d0, Predicates.alwaysTrue()); @@ -144,6 +145,7 @@ index 8b30dc4..60d658f 100644 + return this.findNearbyPlayer(entity.locX, entity.locY, entity.locZ, d0, true, filter); } + @Nullable public EntityHuman a(double d0, double d1, double d2, double d3, boolean flag) { + return findNearbyPlayer(d0, d1, d2, d3, flag, Predicates.alwaysTrue()); + } @@ -154,7 +156,7 @@ index 8b30dc4..60d658f 100644 double d4 = -1.0D; EntityHuman entityhuman = null; -@@ -2709,6 +2725,8 @@ public abstract class World implements IBlockAccess { +@@ -2722,6 +2738,8 @@ public abstract class World implements IBlockAccess { } // CraftBukkit end @@ -163,7 +165,7 @@ index 8b30dc4..60d658f 100644 if ((IEntitySelector.d.apply(entityhuman1) || !flag) && (IEntitySelector.e.apply(entityhuman1) || flag)) { double d5 = entityhuman1.e(d0, d1, d2); -@@ -2723,9 +2741,17 @@ public abstract class World implements IBlockAccess { +@@ -2736,9 +2754,17 @@ public abstract class World implements IBlockAccess { } public boolean isPlayerNearby(double d0, double d1, double d2, double d3) { @@ -182,10 +184,10 @@ index 8b30dc4..60d658f 100644 double d4 = entityhuman.e(d0, d1, d2); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 888823c..3f1c9bf 100644 +index 35f6c27..b7ff27c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1405,6 +1405,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1408,6 +1408,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @@ -203,5 +205,5 @@ index 888823c..3f1c9bf 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch index 1bbe37c7db..4f7a96edef 100644 --- a/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch +++ b/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch @@ -1,14 +1,14 @@ -From be23fa2011288fc9a21363c2bc5d43400763bff0 Mon Sep 17 00:00:00 2001 +From f739616fdab39b3ef5bdd9e64fdaf319f262026c Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 15:08:03 -0600 Subject: [PATCH] Remove invalid mob spawner tile entities diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 3c67d36..cde4124 100644 +index 00fb20d..5690e81 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -717,6 +717,10 @@ public class Chunk { +@@ -721,6 +721,10 @@ public class Chunk { tileentity.z(); this.tileEntities.put(blockposition, tileentity); // CraftBukkit start @@ -20,5 +20,5 @@ index 3c67d36..cde4124 100644 System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ() + " (" + org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getBlockData(blockposition).getBlock()) + ") where there was no entity tile!"); -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch index 6f0ad9d2db..754fe6e79b 100644 --- a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch @@ -1,14 +1,14 @@ -From 8ea5671563d902a6a971506d8ea12f01bd943b4c Mon Sep 17 00:00:00 2001 +From dff7e0d34f098097330c9431e2fda06a6dda2b1a Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 22:01:19 -0600 Subject: [PATCH] Optimize TileEntity Ticking diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index e82c8e3..722dfac 100644 +index 0b70d16..7635df9 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java -@@ -8,17 +8,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; +@@ -9,17 +9,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.entity.HumanEntity; // CraftBukkit end @@ -33,7 +33,7 @@ index e82c8e3..722dfac 100644 private int p; private BlockChest.Type q; private String r; -@@ -231,6 +231,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II +@@ -237,6 +237,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II } public void c() { @@ -42,7 +42,7 @@ index e82c8e3..722dfac 100644 this.m(); int i = this.position.getX(); int j = this.position.getY(); -@@ -311,7 +313,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II +@@ -317,7 +319,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II this.j = 0.0F; } } @@ -52,7 +52,7 @@ index e82c8e3..722dfac 100644 } public boolean c(int i, int j) { -@@ -331,6 +334,28 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II +@@ -337,6 +340,28 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added ++this.l; @@ -81,7 +81,7 @@ index e82c8e3..722dfac 100644 if (this.world == null) return; // CraftBukkit this.world.playBlockAction(this.position, this.getBlock(), 1, this.l); -@@ -354,6 +379,34 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II +@@ -360,6 +385,34 @@ public class TileEntityChest extends TileEntityLootable implements ITickable, II int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added --this.l; if (this.world == null) return; // CraftBukkit @@ -117,7 +117,7 @@ index e82c8e3..722dfac 100644 // CraftBukkit start - Call redstone event diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java -index d9a0346..9276a46 100644 +index eca71c0..73085d6 100644 --- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java +++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java @@ -1,15 +1,17 @@ @@ -152,7 +152,7 @@ index d9a0346..9276a46 100644 @@ -73,11 +77,34 @@ public class TileEntityEnderChest extends TileEntity implements ITickable { - public void b() { + public void d() { ++this.g; + + // Paper start - Move enderchest open sounds out of the tick loop @@ -169,7 +169,7 @@ index d9a0346..9276a46 100644 this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g); } - public void d() { + public void e() { --this.g; + + // Paper start - Move enderchest close sounds out of the tick loop @@ -186,5 +186,5 @@ index d9a0346..9276a46 100644 } -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index 134a79abdb..f11cfd8168 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -1,4 +1,4 @@ -From 39a2b68881f6f6a9de18ce84c77288124e004925 Mon Sep 17 00:00:00 2001 +From 4c865cb3096bf8d40245c09142b7bee6e4f5d5e0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:09:29 -0600 Subject: [PATCH] Further improve server tick loop @@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d901d2c..e9bb02f 100644 +index 14389dd..ebf6c48 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -109,17 +109,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -114,17 +114,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; public ConsoleReader reader; @@ -34,7 +34,7 @@ index d901d2c..e9bb02f 100644 public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) { io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable -@@ -516,12 +510,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -521,12 +515,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs this.isRunning = false; } @@ -94,7 +94,7 @@ index d901d2c..e9bb02f 100644 public void run() { try { -@@ -535,24 +571,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -540,24 +576,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs // Spigot start Arrays.fill( recentTps, 20 ); @@ -211,5 +211,5 @@ index be2e31d..6d21c32 100644 return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch index c352f2083d..08c85cb136 100644 --- a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch @@ -1,14 +1,14 @@ -From 83c757b2b09a6ff9dff0f2f2e4861aa324aefdb7 Mon Sep 17 00:00:00 2001 +From f66a5ec26463b256252abb850427e24b017d10ed Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:12:03 -0600 Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3f1c9bf..64bd053 100644 +index b7ff27c..5515958 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1133,12 +1133,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1136,12 +1136,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setFlying(boolean value) { @@ -24,5 +24,5 @@ index 3f1c9bf..64bd053 100644 @Override -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0025-Add-async-chunk-load-API.patch b/Spigot-Server-Patches/0025-Add-async-chunk-load-API.patch index 98b9289cd4..b8af3a8510 100644 --- a/Spigot-Server-Patches/0025-Add-async-chunk-load-API.patch +++ b/Spigot-Server-Patches/0025-Add-async-chunk-load-API.patch @@ -1,14 +1,14 @@ -From 6c60d9170e309cb01828a57ab43013fca7fb98d7 Mon Sep 17 00:00:00 2001 +From d8934d31e50f6acafde740667621263e70e57553 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:19:01 -0600 Subject: [PATCH] Add async chunk load API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7b2c289..83e3003 100644 +index afbdb5c..898316f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -124,6 +124,26 @@ public class CraftWorld implements World { +@@ -125,6 +125,26 @@ public class CraftWorld implements World { } } @@ -33,8 +33,8 @@ index 7b2c289..83e3003 100644 + // Paper end + public Chunk getChunkAt(int x, int z) { - return this.world.getChunkProviderServer().getOrCreateChunkFast(x, z).bukkitChunk; + return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk; } -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0026-Entity-Origin-API.patch b/Spigot-Server-Patches/0026-Entity-Origin-API.patch index 0e0060f21f..da5bfa37bf 100644 --- a/Spigot-Server-Patches/0026-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0026-Entity-Origin-API.patch @@ -1,14 +1,14 @@ -From 51306b297c90ec78be730733123a3e4be59904c7 Mon Sep 17 00:00:00 2001 +From 8c16d42fc8c678523d3198f8ba20fba2580ef0c3 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 23:45:08 -0600 Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 54367ef..9a8d534 100644 +index 62ada23..2455b9c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -142,6 +142,7 @@ public abstract class Entity implements ICommandListener { +@@ -143,6 +143,7 @@ public abstract class Entity implements ICommandListener { public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949 public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper @@ -16,19 +16,19 @@ index 54367ef..9a8d534 100644 // Spigot start public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -1347,6 +1348,11 @@ public abstract class Entity implements ICommandListener { +@@ -1350,6 +1351,11 @@ public abstract class Entity implements ICommandListener { } } + // Paper start - Save the entity's origin location + if (origin != null) { -+ nbttagcompound.set("Paper.Origin", this.a(origin.getX(), origin.getY(), origin.getZ())); ++ nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); + } + // Paper end + return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); - CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being saved"); -@@ -1480,6 +1486,13 @@ public abstract class Entity implements ICommandListener { +@@ -1485,6 +1491,13 @@ public abstract class Entity implements ICommandListener { } // CraftBukkit end @@ -42,11 +42,19 @@ index 54367ef..9a8d534 100644 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); +@@ -1508,6 +1521,7 @@ public abstract class Entity implements ICommandListener { + + public void at() {} + ++ protected NBTTagList createList(double... adouble) { return a(adouble); } // Paper // OBFHELPER + protected NBTTagList a(double... adouble) { + NBTTagList nbttaglist = new NBTTagList(); + double[] adouble1 = adouble; diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 6246c05..8f2b253 100644 +index 08a7969..4c14d75 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java -@@ -242,6 +242,14 @@ public class EntityFallingBlock extends Entity { +@@ -241,6 +241,14 @@ public class EntityFallingBlock extends Entity { this.block = Blocks.SAND.getBlockData(); } @@ -81,10 +89,10 @@ index 564ea37..1113b1c 100644 public EntityLiving getSource() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 60d658f..0e9cf7a 100644 +index 81f4a42..9bfabe0 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -949,6 +949,12 @@ public abstract class World implements IBlockAccess { +@@ -958,6 +958,12 @@ public abstract class World implements IBlockAccess { int j = MathHelper.floor(entity.locZ / 16.0D); boolean flag = entity.attachedToPlayer; @@ -98,7 +106,7 @@ index 60d658f..0e9cf7a 100644 flag = true; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 8a1df54..f61f6cd 100644 +index b5126d4..a6c0b45 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -604,4 +604,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -147,5 +155,5 @@ index c493c9c..93843aa 100644 + // Paper end } -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch index a4474cab9e..c70fdb62e0 100644 --- a/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch @@ -1,14 +1,14 @@ -From f91f93ffdd35c348ea7d926e70c876ae4dcf6b20 Mon Sep 17 00:00:00 2001 +From 05fa7c0419cdcd091313c88da05ef233093893f6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:52:34 -0600 Subject: [PATCH] Prevent tile entity and entity crashes diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 4193f20..f579d28 100644 +index 6d4f4e7..f59e6f8 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java -@@ -164,7 +164,12 @@ public abstract class TileEntity { +@@ -174,7 +174,12 @@ public abstract class TileEntity { } }); if (this.world != null) { @@ -16,17 +16,17 @@ index 4193f20..f579d28 100644 + // Paper start - Prevent TileEntity and Entity crashes + Block block = this.getBlock(); + if (block != null) { -+ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock(), this.u()); ++ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, block, this.u()); + } + // Paper end - crashreportsystemdetails.a("Actual block type", new Callable() { + crashreportsystemdetails.a("Actual block type", new CrashReportCallable() { public String a() throws Exception { int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0e9cf7a..3b84e27 100644 +index 9bfabe0..362df8f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1436,10 +1436,12 @@ public abstract class World implements IBlockAccess { +@@ -1441,10 +1441,12 @@ public abstract class World implements IBlockAccess { entity.tickTimer.stopTiming(); // Paper } catch (Throwable throwable1) { entity.tickTimer.stopTiming(); @@ -43,7 +43,7 @@ index 0e9cf7a..3b84e27 100644 } } -@@ -1501,10 +1503,13 @@ public abstract class World implements IBlockAccess { +@@ -1506,10 +1508,13 @@ public abstract class World implements IBlockAccess { ((ITickable) tileentity).c(); this.methodProfiler.b(); } catch (Throwable throwable2) { @@ -62,5 +62,5 @@ index 0e9cf7a..3b84e27 100644 // Spigot start finally { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch index 6ebe427ef5..a055334e71 100644 --- a/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch @@ -1,4 +1,4 @@ -From 03c404597d6f991e3d0efe86410ba1ae26622b18 Mon Sep 17 00:00:00 2001 +From 660b12196ce83db18407308413758b721fe5c643 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 23:58:50 -0600 Subject: [PATCH] Configurable top of nether void damage @@ -20,10 +20,10 @@ index f81ece3..7c0e61f 100644 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7152182..96014a9 100644 +index 2455b9c..751e07d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -301,6 +301,13 @@ public abstract class Entity implements ICommandListener { +@@ -303,6 +303,13 @@ public abstract class Entity implements ICommandListener { this.U(); } @@ -36,8 +36,8 @@ index 7152182..96014a9 100644 + public void U() { this.world.methodProfiler.a("entityBaseTick"); - if (this.isPassenger() && this.by().dead) { -@@ -381,7 +388,7 @@ public abstract class Entity implements ICommandListener { + if (this.isPassenger() && this.bz().dead) { +@@ -383,7 +390,7 @@ public abstract class Entity implements ICommandListener { this.fallDistance *= 0.5F; } @@ -47,5 +47,5 @@ index 7152182..96014a9 100644 } -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0029-Check-online-mode-before-converting-and-renaming-pla.patch b/Spigot-Server-Patches/0029-Check-online-mode-before-converting-and-renaming-pla.patch index bf83fbec8c..7b053ea016 100644 --- a/Spigot-Server-Patches/0029-Check-online-mode-before-converting-and-renaming-pla.patch +++ b/Spigot-Server-Patches/0029-Check-online-mode-before-converting-and-renaming-pla.patch @@ -1,15 +1,15 @@ -From 534ef829ced9cd8f7b2a291cd88fc681c14e390a Mon Sep 17 00:00:00 2001 +From becc47e96fdaf11d96e9bc96f2690f125d5a12b1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 00:03:55 -0600 Subject: [PATCH] Check online mode before converting and renaming player data diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index df82c14..c2d384c 100644 +index bc6e138..1aed6fe 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java -@@ -166,7 +166,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { - File file = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat"); +@@ -165,7 +165,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { + File file = new File(this.playerDir, entityhuman.bd() + ".dat"); // Spigot Start boolean usingWrongFile = false; - if ( !file.exists() ) @@ -18,5 +18,5 @@ index df82c14..c2d384c 100644 file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); if ( file.exists() ) -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0031-Lighting-Queue.patch b/Spigot-Server-Patches/0031-Lighting-Queue.patch index 6a27353218..bebbab474a 100644 --- a/Spigot-Server-Patches/0031-Lighting-Queue.patch +++ b/Spigot-Server-Patches/0031-Lighting-Queue.patch @@ -1,4 +1,4 @@ -From cf551879a447edab9e7fbbdbe01190b3663ad0dc Mon Sep 17 00:00:00 2001 +From 254eb4d02c98435ce53fc85794f9912f9b3c63e2 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 00:52:31 -0600 Subject: [PATCH] Lighting Queue @@ -32,18 +32,18 @@ index 7c0e61f..8e3a0f3 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index cde4124..3b5e8c2 100644 +index 5690e81..3bcbbb9 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -44,6 +44,7 @@ public class Chunk { - private int w; - private ConcurrentLinkedQueue x; +@@ -45,6 +45,7 @@ public class Chunk { + private ConcurrentLinkedQueue y; + public boolean d; protected gnu.trove.map.hash.TObjectIntHashMap entityCount = new gnu.trove.map.hash.TObjectIntHashMap(); // Spigot + public int lightUpdates; // Paper - Number of queued light updates for this chunk // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking private int neighbors = 0x1 << 12; -@@ -226,6 +227,22 @@ public class Chunk { +@@ -227,6 +228,22 @@ public class Chunk { private void h(boolean flag) { this.world.methodProfiler.a("recheckGaps"); if (this.world.areChunksLoaded(new BlockPosition(this.locX * 16 + 8, 0, this.locZ * 16 + 8), 16)) { @@ -65,8 +65,8 @@ index cde4124..3b5e8c2 100644 + // Paper end for (int i = 0; i < 16; ++i) { for (int j = 0; j < 16; ++j) { - if (this.h[i + j * 16]) { -@@ -476,7 +493,7 @@ public class Chunk { + if (this.i[i + j * 16]) { +@@ -478,7 +495,7 @@ public class Chunk { } else { if (flag) { this.initLighting(); @@ -75,7 +75,7 @@ index cde4124..3b5e8c2 100644 int j1 = iblockdata.c(); int k1 = iblockdata1.c(); -@@ -491,6 +508,28 @@ public class Chunk { +@@ -493,6 +510,28 @@ public class Chunk { if (j1 != k1 && (j1 < k1 || this.getBrightness(EnumSkyBlock.SKY, blockposition) > 0 || this.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 0)) { this.d(i, k); } @@ -104,7 +104,7 @@ index cde4124..3b5e8c2 100644 } TileEntity tileentity; -@@ -1314,4 +1353,29 @@ public class Chunk { +@@ -1318,4 +1357,29 @@ public class Chunk { private EnumTileEntityState() {} } @@ -135,22 +135,22 @@ index cde4124..3b5e8c2 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 7d3adde..54c83f3 100644 +index de85bd5..20dccfb 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -288,6 +288,7 @@ public class ChunkProviderServer implements IChunkProvider { - long chunkcoordinates = this.unloadQueue.popFirst(); - Chunk chunk = this.chunks.get(chunkcoordinates); - if (chunk == null) continue; -+ if (chunk.hasLightUpdates()) continue; // Paper - Don't unload chunks with pending light updates. +@@ -269,6 +269,7 @@ public class ChunkProviderServer implements IChunkProvider { + Chunk chunk = (Chunk) this.chunks.get(olong); - ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk); - server.getPluginManager().callEvent(event); + if (chunk != null && chunk.d) { ++ if (chunk.hasLightUpdates()) continue; // Paper - Don't unload chunks with pending light updates. + // CraftBukkit start + ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk); + this.world.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cd784a0..75f2605 100644 +index ebf6c48..fcc1214 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -47,6 +47,11 @@ import org.bukkit.craftbukkit.CraftServer; +@@ -52,6 +52,11 @@ import org.bukkit.craftbukkit.CraftServer; // CraftBukkit end import co.aikar.timings.MinecraftTimings; // Paper @@ -162,7 +162,7 @@ index cd784a0..75f2605 100644 public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics { public static final Logger LOGGER = LogManager.getLogger(); -@@ -113,6 +118,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -118,6 +123,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs public final Thread primaryThread; public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; @@ -170,7 +170,7 @@ index cd784a0..75f2605 100644 // CraftBukkit end public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) { -@@ -760,6 +766,34 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -765,6 +771,34 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs this.methodProfiler.b(); this.methodProfiler.b(); @@ -206,10 +206,10 @@ index cd784a0..75f2605 100644 co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3b84e27..1793995 100644 +index 362df8f..77cfd3f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -379,7 +379,17 @@ public abstract class World implements IBlockAccess { +@@ -384,7 +384,17 @@ public abstract class World implements IBlockAccess { } else { if (iblockdata.c() != iblockdata1.c() || iblockdata.d() != iblockdata1.d()) { this.methodProfiler.a("checkLight"); @@ -229,5 +229,5 @@ index 3b84e27..1793995 100644 } -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0033-Configurable-end-credits.patch b/Spigot-Server-Patches/0033-Configurable-end-credits.patch index 5ca65b44a0..b928a21737 100644 --- a/Spigot-Server-Patches/0033-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0033-Configurable-end-credits.patch @@ -1,4 +1,4 @@ -From 172822275bb7cf1ea56a306a5d08b4daa652e8bb Mon Sep 17 00:00:00 2001 +From e5bd40dc6bc3827203da24f8214cfb76b7caf653 Mon Sep 17 00:00:00 2001 From: DoctorDark Date: Wed, 16 Mar 2016 02:21:39 -0500 Subject: [PATCH] Configurable end credits @@ -20,26 +20,26 @@ index 8e3a0f3..2e88385 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3e33f49..8d04c82 100644 +index a54f09c..48376e8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -508,6 +508,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -504,6 +504,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return this.world.pvpMode; } -+ /** -+ * Paper - Give "theEnd2" achievement if the player doesn't already have it -+ */ ++ ++ // Paper start - Give "theEnd2" achievement if the player doesn't already have it + private void giveTheEnd2() { + if (!this.a(AchievementList.D)) { + this.b(AchievementList.D); + } + } ++ // Paper end + + @Nullable public Entity c(int i) { - //this.cj = true; // CraftBukkit - Moved down and into PlayerList#changeDimension - if (this.dimension == 1 && i == 1) { -@@ -515,7 +524,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + //this.ck = true; // CraftBukkit - Moved down and into PlayerList#changeDimension +@@ -512,7 +521,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.world.kill(this); if (!this.viewingCredits) { this.viewingCredits = true; @@ -52,5 +52,5 @@ index 3e33f49..8d04c82 100644 } else { this.b((Statistic) AchievementList.D); -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0034-Fix-lag-from-explosions-processing-dead-entities.patch b/Spigot-Server-Patches/0034-Fix-lag-from-explosions-processing-dead-entities.patch index ccfa846fd5..087e88c852 100644 --- a/Spigot-Server-Patches/0034-Fix-lag-from-explosions-processing-dead-entities.patch +++ b/Spigot-Server-Patches/0034-Fix-lag-from-explosions-processing-dead-entities.patch @@ -1,11 +1,11 @@ -From 7db30b2993803a75446a250e1c11713a84da3f1a Mon Sep 17 00:00:00 2001 +From 8d02e85a56780af5db186431c81995fa4eb0fdbd Mon Sep 17 00:00:00 2001 From: Iceee Date: Wed, 2 Mar 2016 01:39:52 -0600 Subject: [PATCH] Fix lag from explosions processing dead entities diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 69720e8..ae49403 100644 +index 77ed4a7..de74fb7 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -103,7 +103,14 @@ public class Explosion { @@ -14,7 +14,7 @@ index 69720e8..ae49403 100644 int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D); - List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1)); + // Paper start - Fix lag from explosions processing dead entities -+ List list = this.world.a(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() { ++ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() { + @Override + public boolean apply(Entity entity) { + return IEntitySelector.d.apply(entity) && !entity.dead; @@ -25,5 +25,5 @@ index 69720e8..ae49403 100644 for (int l1 = 0; l1 < list.size(); ++l1) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0035-Generator-Settings.patch b/Spigot-Server-Patches/0035-Generator-Settings.patch index 96edd5e230..022b62ea3c 100644 --- a/Spigot-Server-Patches/0035-Generator-Settings.patch +++ b/Spigot-Server-Patches/0035-Generator-Settings.patch @@ -1,4 +1,4 @@ -From b3cf4f737279693fbcdbd2dd992cdcbc7389adea Mon Sep 17 00:00:00 2001 +From c4c7414c6f7f2475be2d17d0389f13d082a8f9a5 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 02:17:54 -0600 Subject: [PATCH] Generator Settings @@ -38,10 +38,10 @@ index 2e88385..af2491e 100644 + } } diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index 5ca8125..e321a89 100644 +index 36952ae..6b84ece 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -174,7 +174,7 @@ public abstract class BiomeBase { +@@ -178,7 +178,7 @@ public abstract class BiomeBase { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); for (int l1 = 255; l1 >= 0; --l1) { @@ -64,10 +64,10 @@ index 3ce22aa..336fa16 100644 } else { IBlockData iblockdata2 = chunksnapshot.a(l, l1, k); diff --git a/src/main/java/net/minecraft/server/ChunkProviderFlat.java b/src/main/java/net/minecraft/server/ChunkProviderFlat.java -index 17e0b8e..89a33fd 100644 +index aa35a24..ea6a00e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderFlat.java +++ b/src/main/java/net/minecraft/server/ChunkProviderFlat.java -@@ -25,7 +25,7 @@ public class ChunkProviderFlat implements ChunkGenerator { +@@ -26,7 +26,7 @@ public class ChunkProviderFlat implements ChunkGenerator { if (flag) { Map map = this.d.b(); @@ -76,7 +76,7 @@ index 17e0b8e..89a33fd 100644 Map map1 = (Map) map.get("village"); if (!map1.containsKey("size")) { -@@ -35,19 +35,19 @@ public class ChunkProviderFlat implements ChunkGenerator { +@@ -36,19 +36,19 @@ public class ChunkProviderFlat implements ChunkGenerator { this.e.add(new WorldGenVillage(map1)); } @@ -100,7 +100,7 @@ index 17e0b8e..89a33fd 100644 this.e.add(new WorldGenMonument((Map) map.get("oceanmonument"))); } } -@@ -60,7 +60,7 @@ public class ChunkProviderFlat implements ChunkGenerator { +@@ -61,7 +61,7 @@ public class ChunkProviderFlat implements ChunkGenerator { this.i = new WorldGenLakes(Blocks.LAVA); } @@ -110,10 +110,10 @@ index 17e0b8e..89a33fd 100644 int k = 0; boolean flag1 = true; diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java -index 88d0374..168d071 100644 +index 415b8d0..926f32d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java +++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java -@@ -157,32 +157,32 @@ public class ChunkProviderGenerate implements ChunkGenerator { +@@ -158,32 +158,32 @@ public class ChunkProviderGenerate implements ChunkGenerator { this.a(i, j, chunksnapshot); this.C = this.n.getWorldChunkManager().getBiomeBlock(this.C, i * 16, j * 16, 16, 16); this.a(i, j, chunksnapshot, this.C); @@ -153,7 +153,7 @@ index 88d0374..168d071 100644 this.B.a(this.n, i, j, chunksnapshot); } } -@@ -319,23 +319,23 @@ public class ChunkProviderGenerate implements ChunkGenerator { +@@ -320,23 +320,23 @@ public class ChunkProviderGenerate implements ChunkGenerator { ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); if (this.o) { @@ -182,7 +182,7 @@ index 88d0374..168d071 100644 this.B.a(this.n, this.i, chunkcoordintpair); } } -@@ -360,7 +360,7 @@ public class ChunkProviderGenerate implements ChunkGenerator { +@@ -361,7 +361,7 @@ public class ChunkProviderGenerate implements ChunkGenerator { } } @@ -191,7 +191,7 @@ index 88d0374..168d071 100644 for (k1 = 0; k1 < this.s.t; ++k1) { l1 = this.i.nextInt(16) + 8; i2 = this.i.nextInt(256); -@@ -424,23 +424,23 @@ public class ChunkProviderGenerate implements ChunkGenerator { +@@ -426,23 +426,23 @@ public class ChunkProviderGenerate implements ChunkGenerator { public void recreateStructures(Chunk chunk, int i, int j) { if (this.o) { @@ -221,10 +221,10 @@ index 88d0374..168d071 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderHell.java b/src/main/java/net/minecraft/server/ChunkProviderHell.java -index 0150efd..d17a6fd 100644 +index d758625..1420b14 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderHell.java +++ b/src/main/java/net/minecraft/server/ChunkProviderHell.java -@@ -148,7 +148,10 @@ public class ChunkProviderHell implements ChunkGenerator { +@@ -149,7 +149,10 @@ public class ChunkProviderHell implements ChunkGenerator { IBlockData iblockdata1 = ChunkProviderHell.b; for (int l1 = 127; l1 >= 0; --l1) { @@ -236,7 +236,7 @@ index 0150efd..d17a6fd 100644 IBlockData iblockdata2 = chunksnapshot.a(i1, l1, l); if (iblockdata2.getBlock() != null && iblockdata2.getMaterial() != Material.AIR) { -@@ -364,6 +367,6 @@ public class ChunkProviderHell implements ChunkGenerator { +@@ -366,6 +369,6 @@ public class ChunkProviderHell implements ChunkGenerator { } public void recreateStructures(Chunk chunk, int i, int j) { @@ -245,10 +245,10 @@ index 0150efd..d17a6fd 100644 } } diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 22d96e9..83d9509 100644 +index 4b4cf89..4b7e34c 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java -@@ -90,6 +90,7 @@ public abstract class StructureGenerator extends WorldGenBase { +@@ -89,6 +89,7 @@ public abstract class StructureGenerator extends WorldGenBase { } public boolean b(BlockPosition blockposition) { @@ -256,14 +256,14 @@ index 22d96e9..83d9509 100644 this.a(this.g); return this.c(blockposition) != null; } -@@ -117,6 +118,7 @@ public abstract class StructureGenerator extends WorldGenBase { +@@ -116,6 +117,7 @@ public abstract class StructureGenerator extends WorldGenBase { } - public boolean b(World world, BlockPosition blockposition) { + public synchronized boolean b(World world, BlockPosition blockposition) { // CraftBukkit - synchronized + if (this.g == null) return false; // Paper this.a(world); Iterator iterator = this.c.values().iterator(); -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0036-Optimize-explosions.patch b/Spigot-Server-Patches/0036-Optimize-explosions.patch index 8b45cf02fa..5397378fba 100644 --- a/Spigot-Server-Patches/0036-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0036-Optimize-explosions.patch @@ -1,4 +1,4 @@ -From 5fbcaa4e972f9256ae7660441955f23a98148ee1 Mon Sep 17 00:00:00 2001 +From f537cf6b939037c60801e039483949925bf390c5 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 11:59:48 -0600 Subject: [PATCH] Optimize explosions @@ -25,7 +25,7 @@ index af2491e..54e31ca 100644 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index ae49403..7e99b7d 100644 +index de74fb7..8e225a5 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -129,7 +129,7 @@ public class Explosion { @@ -124,10 +124,10 @@ index ae49403..7e99b7d 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 75f2605..d515dcb 100644 +index fcc1214..5925e2c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -898,6 +898,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -903,6 +903,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs worldserver.getTracker().updatePlayers(); this.methodProfiler.b(); this.methodProfiler.b(); @@ -136,10 +136,10 @@ index 75f2605..d515dcb 100644 // this.i[i][this.ticks % 100] = System.nanoTime() - j; // CraftBukkit diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1793995..a9cda67 100644 +index 77cfd3f..71159b4 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -16,6 +16,7 @@ import java.util.concurrent.Callable; +@@ -16,6 +16,7 @@ import javax.annotation.Nullable; // CraftBukkit start import com.google.common.collect.Maps; @@ -156,5 +156,5 @@ index 1793995..a9cda67 100644 public CraftWorld getWorld() { return this.world; -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0038-Fast-draining.patch b/Spigot-Server-Patches/0038-Fast-draining.patch index 83f31690b9..6575a85d81 100644 --- a/Spigot-Server-Patches/0038-Fast-draining.patch +++ b/Spigot-Server-Patches/0038-Fast-draining.patch @@ -1,4 +1,4 @@ -From 83f33bd21ad4907eed1e0903875bdb7e2b3b0a2a Mon Sep 17 00:00:00 2001 +From 772d424160249d441b16bf2be8fb59d5f607c182 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 12:20:52 -0600 Subject: [PATCH] Fast draining @@ -21,7 +21,7 @@ index 54e31ca..f2babb1 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java -index 1f07f82..517c1e8 100644 +index 9e88d2d..de10bc4 100644 --- a/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java @@ -74,7 +74,7 @@ public class BlockFlowing extends BlockFluids { @@ -42,16 +42,28 @@ index 1f07f82..517c1e8 100644 world.setAir(blockposition); } else { iblockdata = iblockdata.set(BlockFlowing.LEVEL, Integer.valueOf(i1)); -@@ -288,4 +288,52 @@ public class BlockFlowing extends BlockFluids { +@@ -275,6 +275,7 @@ public class BlockFlowing extends BlockFluids { + + } + ++ // Paper start + /** + * Paper - Get flow speed. Throttle if its water and flowing adjacent to lava + */ +@@ -288,4 +289,57 @@ public class BlockFlowing extends BlockFluids { } return super.a(world); } + ++ private int getFluidLevel(IBlockAccess iblockaccess, BlockPosition blockposition) { ++ return iblockaccess.getType(blockposition).getMaterial() == this.material ? iblockaccess.getType(blockposition).get(BlockFluids.LEVEL) : -1; ++ } ++ + /** + * Paper - Data check method for fast draining + */ + public int getData(World world, BlockPosition position) { -+ int data = this.c((IBlockAccess) world, position); ++ int data = this.getFluidLevel((IBlockAccess) world, position); + return data < 8 ? data : 0; + } + @@ -94,7 +106,8 @@ index 1f07f82..517c1e8 100644 + } + return result; + } ++ // Paper end } -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0039-Configurable-lava-flow-speed.patch b/Spigot-Server-Patches/0039-Configurable-lava-flow-speed.patch index d43f3fdfc9..d499a41041 100644 --- a/Spigot-Server-Patches/0039-Configurable-lava-flow-speed.patch +++ b/Spigot-Server-Patches/0039-Configurable-lava-flow-speed.patch @@ -1,4 +1,4 @@ -From 29936727db751db597a05c48da18d19e272bad05 Mon Sep 17 00:00:00 2001 +From 068efa1fbc02bc6da886f9d426d21109166ee9cd Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 12:27:07 -0600 Subject: [PATCH] Configurable lava flow speed @@ -21,10 +21,10 @@ index f2babb1..ba7184f 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java -index 517c1e8..51b80cb 100644 +index de10bc4..2eb8622 100644 --- a/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java -@@ -279,6 +279,9 @@ public class BlockFlowing extends BlockFluids { +@@ -280,6 +280,9 @@ public class BlockFlowing extends BlockFluids { * Paper - Get flow speed. Throttle if its water and flowing adjacent to lava */ public int getFlowSpeed(World world, BlockPosition blockposition) { @@ -35,5 +35,5 @@ index 517c1e8..51b80cb 100644 world.getType(blockposition.north(1)).getBlock().material == Material.LAVA || world.getType(blockposition.south(1)).getBlock().material == Material.LAVA || -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch b/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch index 5b49883a1b..ee574b69fe 100644 --- a/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch +++ b/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch @@ -1,14 +1,14 @@ -From a957633c889b9135b6f3a6fc0c9cf28d30beeb4a Mon Sep 17 00:00:00 2001 +From 515d4a8639a67827a06af6b0d6d8dacb9f19d653 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 14:35:27 -0600 Subject: [PATCH] Add player view distance API diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index dffc6d9..184b9c2 100644 +index 48376e8..032c514 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -53,6 +53,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -54,6 +54,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean f; public int ping; public boolean viewingCredits; @@ -25,10 +25,10 @@ index dffc6d9..184b9c2 100644 // CraftBukkit start public String displayName; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 8ef7eb2..d7cbe31 100644 +index b0249ff..77e9187 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -43,7 +43,7 @@ public class PlayerChunkMap { +@@ -46,7 +46,7 @@ public class PlayerChunkMap { private final List g = Lists.newLinkedList(); private final List h = Lists.newLinkedList(); private final List i = Lists.newArrayList(); @@ -37,7 +37,7 @@ index 8ef7eb2..d7cbe31 100644 private long k; private boolean l = true; private boolean m = true; -@@ -284,8 +284,11 @@ public class PlayerChunkMap { +@@ -288,8 +288,11 @@ public class PlayerChunkMap { int i = (int) entityplayer.d >> 4; int j = (int) entityplayer.e >> 4; @@ -48,10 +48,10 @@ index 8ef7eb2..d7cbe31 100644 + for (int k = i - viewDistance; k <= i + viewDistance; ++k) { + for (int l = j - viewDistance; l <= j + viewDistance; ++l) { + // Paper end - PlayerChunk playerchunk = this.b(k, l); + PlayerChunk playerchunk = this.getChunk(k, l); if (playerchunk != null) { -@@ -315,7 +318,9 @@ public class PlayerChunkMap { +@@ -319,7 +322,9 @@ public class PlayerChunkMap { if (d2 >= 64.0D) { int k = (int) entityplayer.d >> 4; int l = (int) entityplayer.e >> 4; @@ -62,7 +62,7 @@ index 8ef7eb2..d7cbe31 100644 int j1 = i - k; int k1 = j - l; -@@ -324,7 +329,7 @@ public class PlayerChunkMap { +@@ -328,7 +333,7 @@ public class PlayerChunkMap { if (j1 != 0 || k1 != 0) { for (int l1 = i - i1; l1 <= i + i1; ++l1) { for (int i2 = j - i1; i2 <= j + i1; ++i2) { @@ -71,7 +71,7 @@ index 8ef7eb2..d7cbe31 100644 // this.c(l1, i2).a(entityplayer); chunksToLoad.add(new ChunkCoordIntPair(l1, i2)); // CraftBukkit } -@@ -471,4 +476,42 @@ public class PlayerChunkMap { +@@ -480,4 +485,20 @@ public class PlayerChunkMap { } } // CraftBukkit end @@ -81,44 +81,22 @@ index 8ef7eb2..d7cbe31 100644 + final int oldViewDistance = player.getViewDistance(); + + int viewDistance = MathHelper.clamp(toSet, 3, 32); -+ if (viewDistance != oldViewDistance) { -+ int cx = (int) player.locX >> 4; -+ int cz = (int) player.locZ >> 4; -+ -+ if (viewDistance - oldViewDistance > 0) { -+ for (int x = cx - viewDistance; x <= cx + viewDistance; ++x) { -+ for (int z = cz - viewDistance; z <= cz + viewDistance; ++z) { -+ PlayerChunk playerchunkmap_playerchunk = this.c(x, z); -+ -+ if (!playerchunkmap_playerchunk.c.contains(player)) { -+ playerchunkmap_playerchunk.a(player); -+ } -+ } -+ } -+ } else { -+ for (int x = cx - oldViewDistance; x <= cx + oldViewDistance; ++x) { -+ for (int z = cz - oldViewDistance; z <= cz + oldViewDistance; ++z) { -+ if (!this.a(x, z, cx, cz, viewDistance)) { -+ this.c(x, z).b(player); -+ } -+ } -+ } -+ } -+ -+ player.setViewDistance(viewDistance); ++ if (toSet < 0) { ++ viewDistance = -1; + } -+ -+ if (toSet == -1) { -+ player.setViewDistance(-1); ++ if (viewDistance != oldViewDistance) { ++ removePlayer(player); ++ player.setViewDistance(viewDistance); ++ addPlayer(player); + } + } + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 64bd053..4abf441 100644 +index 5515958..9770c99 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1416,6 +1416,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1419,6 +1419,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().affectsSpawning; } @@ -136,5 +114,5 @@ index 64bd053..4abf441 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0041-Disable-explosion-knockback.patch b/Spigot-Server-Patches/0041-Disable-explosion-knockback.patch index 3644bb81f1..736f7288f9 100644 --- a/Spigot-Server-Patches/0041-Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/0041-Disable-explosion-knockback.patch @@ -1,4 +1,4 @@ -From 3581a2e5e5939c6c04e3fc2d933c69bc9b80913b Mon Sep 17 00:00:00 2001 +From 9fa5a8960f44a4e590ecc89bb30ee7e27559d2e3 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:48:03 -0600 Subject: [PATCH] Disable explosion knockback @@ -19,10 +19,10 @@ index ba7184f..2626f81 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index e6f59da..017377e 100644 +index 4d7be74..7fd8585 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -861,12 +861,14 @@ public abstract class EntityLiving extends Entity { +@@ -864,12 +864,14 @@ public abstract class EntityLiving extends Entity { } } @@ -37,17 +37,17 @@ index e6f59da..017377e 100644 this.world.broadcastEntityEffect(this, (byte) 2); } -@@ -890,6 +892,8 @@ public abstract class EntityLiving extends Entity { +@@ -893,6 +895,8 @@ public abstract class EntityLiving extends Entity { } } + if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback + if (this.getHealth() <= 0.0F) { - SoundEffect soundeffect = this.bS(); + SoundEffect soundeffect = this.bT(); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 7e99b7d..91540c7 100644 +index 8e225a5..28261c5 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -145,7 +145,7 @@ public class Explosion { @@ -69,5 +69,5 @@ index 7e99b7d..91540c7 100644 } } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0042-Disable-thunder.patch b/Spigot-Server-Patches/0042-Disable-thunder.patch index 68a2d04cfe..552507cb60 100644 --- a/Spigot-Server-Patches/0042-Disable-thunder.patch +++ b/Spigot-Server-Patches/0042-Disable-thunder.patch @@ -1,4 +1,4 @@ -From be317dc17fede314dc8eb7272dad275a5d1bffd8 Mon Sep 17 00:00:00 2001 +From ea9b69cddde0863bd7aedf3d4166380c99708377 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:52:43 -0600 Subject: [PATCH] Disable thunder @@ -19,10 +19,10 @@ index 2626f81..1a341d8 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 433ed2a..1a615e5 100644 +index 4980c7a..bef2dab 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -421,7 +421,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -423,7 +423,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { int l; BlockPosition blockposition; @@ -33,5 +33,5 @@ index 433ed2a..1a615e5 100644 l = this.l >> 2; blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0043-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0043-Disable-ice-and-snow.patch index 71e7a56033..9f2e05f3a4 100644 --- a/Spigot-Server-Patches/0043-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0043-Disable-ice-and-snow.patch @@ -1,4 +1,4 @@ -From 83193b8f541bf99bcd90315d922aba757d865f34 Mon Sep 17 00:00:00 2001 +From 36e96a6be9ba5842cc48f7693975aa1f9463fea6 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:57:24 -0600 Subject: [PATCH] Disable ice and snow @@ -19,10 +19,10 @@ index 1a341d8..d8bc932 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1a615e5..c5b08f9 100644 +index bef2dab..c7e5226 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -445,7 +445,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -447,7 +447,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } this.methodProfiler.c("iceandsnow"); @@ -32,5 +32,5 @@ index 1a615e5..c5b08f9 100644 l = this.l >> 2; blockposition = this.p(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0045-Configurable-TNT-cannon-fix.patch b/Spigot-Server-Patches/0045-Configurable-TNT-cannon-fix.patch deleted file mode 100644 index f961183da3..0000000000 --- a/Spigot-Server-Patches/0045-Configurable-TNT-cannon-fix.patch +++ /dev/null @@ -1,319 +0,0 @@ -From 47c10005c1cb4d456fedc26eaf6d8c4747204527 Mon Sep 17 00:00:00 2001 -From: Iceee -Date: Wed, 2 Mar 2016 23:00:53 -0600 -Subject: [PATCH] Configurable TNT cannon fix - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7028730..abed8ea 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -231,4 +231,10 @@ public class PaperWorldConfig { - private void mobSpawnerTickRate() { - mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1); - } -+ -+ public boolean fixCannons; -+ private void fixCannons() { -+ fixCannons = getBoolean("fix-cannons", false); -+ log("Fix TNT cannons: " + fixCannons); -+ } - } -diff --git a/src/main/java/net/minecraft/server/BlockDiodeAbstract.java b/src/main/java/net/minecraft/server/BlockDiodeAbstract.java -index ffc07cd..64aaba4 100644 ---- a/src/main/java/net/minecraft/server/BlockDiodeAbstract.java -+++ b/src/main/java/net/minecraft/server/BlockDiodeAbstract.java -@@ -76,6 +76,17 @@ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal { - } else { - this.b(world, blockposition, iblockdata, 0); - world.setAir(blockposition); -+ // Paper start - Fix cannons -+ if (world.paperConfig.fixCannons) { -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -@@ -173,6 +184,17 @@ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal { - - public void postBreak(World world, BlockPosition blockposition, IBlockData iblockdata) { - if (this.d) { -+ // Paper start - Fix cannons -+ if (world.paperConfig.fixCannons) { -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -index cce1cd7..7f5a112 100644 ---- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java -@@ -52,6 +52,17 @@ public class BlockRedstoneTorch extends BlockTorch { - - public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { - if (this.isOn) { -+ // Paper start - Fix cannons -+ if (world.paperConfig.fixCannons) { -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -@@ -66,6 +77,17 @@ public class BlockRedstoneTorch extends BlockTorch { - - public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) { - if (this.isOn) { -+ // Paper start - Fix cannons -+ if (world.paperConfig.fixCannons) { -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -index 1a133d9..f4f9be6 100644 ---- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java -+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -@@ -184,6 +184,17 @@ public class BlockRedstoneWire extends Block { - } - - this.B.add(blockposition); -+ // Paper start - Fix cannons -+ if (world.paperConfig.fixCannons) { -+ this.B.add(blockposition.shift(EnumDirection.WEST)); -+ this.B.add(blockposition.shift(EnumDirection.EAST)); -+ this.B.add(blockposition.shift(EnumDirection.DOWN)); -+ this.B.add(blockposition.shift(EnumDirection.UP)); -+ this.B.add(blockposition.shift(EnumDirection.NORTH)); -+ this.B.add(blockposition.shift(EnumDirection.SOUTH)); -+ return iblockdata; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i1 = aenumdirection.length; - -@@ -200,6 +211,17 @@ public class BlockRedstoneWire extends Block { - private void b(World world, BlockPosition blockposition) { - if (world.getType(blockposition).getBlock() == this) { - world.applyPhysics(blockposition, this); -+ // Paper start - Fix cannons -+ if (world.paperConfig.fixCannons) { -+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this); -+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this); -+ return; -+ } -+ // Paper end - EnumDirection[] aenumdirection = EnumDirection.values(); - int i = aenumdirection.length; - -diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java -index 3b799bf..e6c0ffb 100644 ---- a/src/main/java/net/minecraft/server/BlockTNT.java -+++ b/src/main/java/net/minecraft/server/BlockTNT.java -@@ -29,7 +29,11 @@ public class BlockTNT extends Block { - - public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) { - if (!world.isClientSide) { -- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); -+ // Paper start - Fix cannons -+ double y = blockposition.getY(); -+ if (!world.paperConfig.fixCannons) y += 0.5; -+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); -+ // Paper end - - entitytntprimed.setFuseTicks((short) (world.random.nextInt(entitytntprimed.getFuseTicks() / 4) + entitytntprimed.getFuseTicks() / 8)); - world.addEntity(entitytntprimed); -@@ -43,7 +47,11 @@ public class BlockTNT extends Block { - public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving) { - if (!world.isClientSide) { - if (((Boolean) iblockdata.get(BlockTNT.EXPLODE)).booleanValue()) { -- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), entityliving); -+ // Paper start - Fix cannons -+ double y = blockposition.getY(); -+ if (!world.paperConfig.fixCannons) y += 0.5; -+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), entityliving); -+ // Paper end - - world.addEntity(entitytntprimed); - world.a((EntityHuman) null, entitytntprimed.locX, entitytntprimed.locY, entitytntprimed.locZ, SoundEffects.gk, SoundCategory.BLOCKS, 1.0F, 1.0F); -diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java -index 392e2fa..a93a990 100644 ---- a/src/main/java/net/minecraft/server/DispenserRegistry.java -+++ b/src/main/java/net/minecraft/server/DispenserRegistry.java -@@ -497,7 +497,11 @@ public class DispenserRegistry { - org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ()); - CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); - -- BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D)); -+ // Paper start - Fix cannons -+ double y = blockposition.getY(); -+ if (!world.paperConfig.fixCannons) y += 0.5; -+ BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, y, (double) blockposition.getZ() + 0.5D)); -+ // Paper end - if (!BlockDispenser.eventFired) { - world.getServer().getPluginManager().callEvent(event); - } -diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 8f2b253..23fb154 100644 ---- a/src/main/java/net/minecraft/server/EntityFallingBlock.java -+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java -@@ -274,4 +274,22 @@ public class EntityFallingBlock extends Entity { - public boolean br() { - return true; - } -+ -+ // Paper start - Fix cannons -+ @Override -+ public double f(double d0, double d1, double d2) { -+ if (!world.paperConfig.fixCannons) return super.f(d0, d1, d2); -+ -+ double d3 = this.locX - d0; -+ double d4 = this.locY + this.getHeadHeight() - d1; -+ double d5 = this.locZ - d2; -+ -+ return (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5); -+ } -+ -+ @Override -+ public float getHeadHeight() { -+ return world.paperConfig.fixCannons ? this.length / 2 : super.getHeadHeight(); -+ } -+ // Paper end - } -diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -index 1113b1c..12feacf 100644 ---- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java -+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java -@@ -30,6 +30,7 @@ public class EntityTNTPrimed extends Entity { - this.lastY = d1; - this.lastZ = d2; - this.source = entityliving; -+ if (world.paperConfig.fixCannons) this.motX = this.motZ = 0.0F; // Paper - Fix cannons - } - - protected void i() { -@@ -118,9 +119,66 @@ public class EntityTNTPrimed extends Entity { - return this.source; - } - -+ // Paper start - Fix cannons -+ @Override -+ public double f(double d0, double d1, double d2) { -+ if (!world.paperConfig.fixCannons) return super.f(d0, d1, d2); -+ -+ double d3 = this.locX - d0; -+ double d4 = this.locY + this.getHeadHeight() - d1; -+ double d5 = this.locZ - d2; -+ -+ return (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5); -+ } -+ -+ @Override -+ public boolean bd() { -+ return !world.paperConfig.fixCannons && super.bd(); -+ } -+ -+ @Override - public float getHeadHeight() { -- return 0.0F; -+ return world.paperConfig.fixCannons ? this.length / 2 : 0.0F; -+ } -+ -+ /** -+ * Author: Jedediah Smith -+ */ -+ @Override -+ public boolean aj() { -+ if (!world.paperConfig.fixCannons) return super.aj(); -+ -+ // Preserve velocity while calling the super method -+ double oldMotX = this.motX; -+ double oldMotY = this.motY; -+ double oldMotZ = this.motZ; -+ -+ super.aj(); -+ -+ this.motX = oldMotX; -+ this.motY = oldMotY; -+ this.motZ = oldMotZ; -+ -+ if (this.inWater) { -+ // Send position and velocity updates to nearby players on every tick while the TNT is in water. -+ // This does pretty well at keeping their clients in sync with the server. -+ EntityTrackerEntry ete = ((WorldServer) this.getWorld()).getTracker().trackedEntities.get(this.getId()); -+ if (ete != null) { -+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this); -+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this); -+ -+ for (EntityPlayer viewer : ete.trackedPlayers) { -+ if ((viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16) { -+ viewer.playerConnection.sendPacket(velocityPacket); -+ viewer.playerConnection.sendPacket(positionPacket); -+ } -+ } -+ } -+ } -+ -+ return this.inWater; - } -+ // Paper end - - public void setFuseTicks(int i) { - this.datawatcher.set(EntityTNTPrimed.FUSE_TICKS, Integer.valueOf(i)); -diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 91540c7..209b470 100644 ---- a/src/main/java/net/minecraft/server/Explosion.java -+++ b/src/main/java/net/minecraft/server/Explosion.java -@@ -148,9 +148,16 @@ public class Explosion { - d14 = entity instanceof EntityHuman && world.paperConfig.disableExplosionKnockback ? 0 : EnchantmentProtection.a((EntityLiving) entity, d13); // Paper - Disable explosion knockback - } - -+ // Paper start - Fix cannons -+ /* - entity.motX += d8 * d14; - entity.motY += d9 * d14; - entity.motZ += d10 * d14; -+ */ -+ // This impulse method sets the dirty flag, so clients will get an immediate velocity update -+ entity.g(d8 * d14, d9 * d14, d10 * d14); -+ // Paper end -+ - if (entity instanceof EntityHuman) { - EntityHuman entityhuman = (EntityHuman) entity; - --- -2.7.4 - diff --git a/Spigot-Server-Patches/0046-Send-absolute-position-the-first-time-an-entity-is-s.patch b/Spigot-Server-Patches/0045-Send-absolute-position-the-first-time-an-entity-is-s.patch similarity index 97% rename from Spigot-Server-Patches/0046-Send-absolute-position-the-first-time-an-entity-is-s.patch rename to Spigot-Server-Patches/0045-Send-absolute-position-the-first-time-an-entity-is-s.patch index 1cc3ae9693..4fb3a248af 100644 --- a/Spigot-Server-Patches/0046-Send-absolute-position-the-first-time-an-entity-is-s.patch +++ b/Spigot-Server-Patches/0045-Send-absolute-position-the-first-time-an-entity-is-s.patch @@ -1,11 +1,11 @@ -From 4cb89212841a3259484ca781c652b0245884f5a2 Mon Sep 17 00:00:00 2001 +From 1d7c79814eac0930e924fa43fb4f023faf315b96 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Wed, 2 Mar 2016 23:13:07 -0600 Subject: [PATCH] Send absolute position the first time an entity is seen diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index f8570a8..1602dff 100644 +index d820ba8..6c8da79 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -41,7 +41,12 @@ public class EntityTrackerEntry { @@ -93,5 +93,5 @@ index f8570a8..1602dff 100644 entityplayer.playerConnection.sendPacket(packet); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0047-Add-BeaconEffectEvent.patch b/Spigot-Server-Patches/0046-Add-BeaconEffectEvent.patch similarity index 93% rename from Spigot-Server-Patches/0047-Add-BeaconEffectEvent.patch rename to Spigot-Server-Patches/0046-Add-BeaconEffectEvent.patch index a3d75405a5..2e54f5d3ed 100644 --- a/Spigot-Server-Patches/0047-Add-BeaconEffectEvent.patch +++ b/Spigot-Server-Patches/0046-Add-BeaconEffectEvent.patch @@ -1,14 +1,14 @@ -From e1c0beb6e759e4ba5f108b9f1ac5f9c3fdd4b154 Mon Sep 17 00:00:00 2001 +From 44536adaf25c092b8223739374361ebc14b260bf Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 23:30:53 -0600 Subject: [PATCH] Add BeaconEffectEvent diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java -index ed5b374..85b1441 100644 +index bb771c1..77170aa 100644 --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java -@@ -13,6 +13,15 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; +@@ -14,6 +14,15 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.entity.HumanEntity; // CraftBukkit end @@ -24,7 +24,7 @@ index ed5b374..85b1441 100644 public class TileEntityBeacon extends TileEntityContainer implements ITickable, IWorldInventory { public static final MobEffectList[][] a = new MobEffectList[][] { { MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, { MobEffects.RESISTANCE, MobEffects.JUMP}, { MobEffects.INCREASE_DAMAGE}, { MobEffects.REGENERATION}}; -@@ -85,17 +94,33 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable, +@@ -88,17 +97,33 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable, EntityHuman entityhuman; diff --git a/Spigot-Server-Patches/0048-Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/0047-Configurable-container-update-tick-rate.patch similarity index 79% rename from Spigot-Server-Patches/0048-Configurable-container-update-tick-rate.patch rename to Spigot-Server-Patches/0047-Configurable-container-update-tick-rate.patch index 8b35755c38..baffb186fa 100644 --- a/Spigot-Server-Patches/0048-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0047-Configurable-container-update-tick-rate.patch @@ -1,16 +1,16 @@ -From 76e860a49ebe0052a395fbbc5d908147fbdd123a Mon Sep 17 00:00:00 2001 +From cf030fd51a742b785df6b038a2a66591fdb5b5b8 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 23:34:44 -0600 Subject: [PATCH] Configurable container update tick rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index abed8ea..8b76052 100644 +index 7028730..12440dc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -237,4 +237,9 @@ public class PaperWorldConfig { - fixCannons = getBoolean("fix-cannons", false); - log("Fix TNT cannons: " + fixCannons); +@@ -231,4 +231,9 @@ public class PaperWorldConfig { + private void mobSpawnerTickRate() { + mobSpawnerTickRate = getInt("mob-spawner-tick-rate", 1); } + + public int containerUpdateTickRate; @@ -19,10 +19,10 @@ index abed8ea..8b76052 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 184b9c2..4bf8344 100644 +index 032c514..723d40c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -62,6 +62,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -63,6 +63,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.viewDistance = viewDistance; } // Paper end @@ -30,7 +30,7 @@ index 184b9c2..4bf8344 100644 // CraftBukkit start public String displayName; -@@ -207,7 +208,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -208,7 +209,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { --this.noDamageTicks; } @@ -45,5 +45,5 @@ index 184b9c2..4bf8344 100644 this.closeInventory(); this.activeContainer = this.defaultContainer; -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0049-Fix-lava-water-some-times-creating-air-instead-of-co.patch b/Spigot-Server-Patches/0048-Fix-lava-water-some-times-creating-air-instead-of-co.patch similarity index 81% rename from Spigot-Server-Patches/0049-Fix-lava-water-some-times-creating-air-instead-of-co.patch rename to Spigot-Server-Patches/0048-Fix-lava-water-some-times-creating-air-instead-of-co.patch index 68f0b8cd10..e6d59029d2 100644 --- a/Spigot-Server-Patches/0049-Fix-lava-water-some-times-creating-air-instead-of-co.patch +++ b/Spigot-Server-Patches/0048-Fix-lava-water-some-times-creating-air-instead-of-co.patch @@ -1,14 +1,14 @@ -From dd8cd2c8b782274b95bb4a1318b35823783594fb Mon Sep 17 00:00:00 2001 +From d9bae1b188028fa421ed5f26e207ba39a8202049 Mon Sep 17 00:00:00 2001 From: Iceee Date: Wed, 2 Mar 2016 23:38:52 -0600 Subject: [PATCH] Fix lava/water some times creating air instead of cobblestone diff --git a/src/main/java/net/minecraft/server/BlockFluids.java b/src/main/java/net/minecraft/server/BlockFluids.java -index cdbb7a4..c5f052a 100644 +index a076f4d..93bfd53 100644 --- a/src/main/java/net/minecraft/server/BlockFluids.java +++ b/src/main/java/net/minecraft/server/BlockFluids.java -@@ -166,7 +166,7 @@ public abstract class BlockFluids extends Block { +@@ -169,7 +169,7 @@ public abstract class BlockFluids extends Block { return true; } @@ -18,5 +18,5 @@ index cdbb7a4..c5f052a 100644 this.fizz(world, blockposition); return true; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0050-Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/0049-Use-UserCache-for-player-heads.patch similarity index 95% rename from Spigot-Server-Patches/0050-Use-UserCache-for-player-heads.patch rename to Spigot-Server-Patches/0049-Use-UserCache-for-player-heads.patch index c83b159540..33c222c764 100644 --- a/Spigot-Server-Patches/0050-Use-UserCache-for-player-heads.patch +++ b/Spigot-Server-Patches/0049-Use-UserCache-for-player-heads.patch @@ -1,4 +1,4 @@ -From 29fa1b0750cdafb845d8155c40148f595ec36495 Mon Sep 17 00:00:00 2001 +From 12a6ea83e2f556fbff99c3704d30b3251d382824 Mon Sep 17 00:00:00 2001 From: Techcable Date: Wed, 2 Mar 2016 23:42:37 -0600 Subject: [PATCH] Use UserCache for player heads @@ -32,5 +32,5 @@ index 2abca0c..7d83bbe 100644 return true; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0051-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0050-Disable-spigot-tick-limiters.patch similarity index 89% rename from Spigot-Server-Patches/0051-Disable-spigot-tick-limiters.patch rename to Spigot-Server-Patches/0050-Disable-spigot-tick-limiters.patch index f427bead60..85de4a51b5 100644 --- a/Spigot-Server-Patches/0051-Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/0050-Disable-spigot-tick-limiters.patch @@ -1,14 +1,14 @@ -From 0011716db31efd84a96342fabf79e81347b27e8c Mon Sep 17 00:00:00 2001 +From be1c32e1306b4b5713bc1046bdc234f3827f7407 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 23:45:17 -0600 Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a9cda67..af43a87 100644 +index 71159b4..5adc297 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1423,10 +1423,10 @@ public abstract class World implements IBlockAccess { +@@ -1428,10 +1428,10 @@ public abstract class World implements IBlockAccess { // CraftBukkit start - Use field for loop variable co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper int entitiesThisCycle = 0; @@ -23,7 +23,7 @@ index a9cda67..af43a87 100644 tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0; entity = (Entity) this.entityList.get(this.tickPosition); // CraftBukkit end -@@ -1491,9 +1491,7 @@ public abstract class World implements IBlockAccess { +@@ -1496,9 +1496,7 @@ public abstract class World implements IBlockAccess { // Spigot start // Iterator iterator = this.tileEntityListTick.iterator(); int tilesThisCycle = 0; @@ -35,5 +35,5 @@ index a9cda67..af43a87 100644 TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition); // Spigot start -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0052-Configurable-Chunk-IO-Thread-Base-Count.patch b/Spigot-Server-Patches/0051-Configurable-Chunk-IO-Thread-Base-Count.patch similarity index 95% rename from Spigot-Server-Patches/0052-Configurable-Chunk-IO-Thread-Base-Count.patch rename to Spigot-Server-Patches/0051-Configurable-Chunk-IO-Thread-Base-Count.patch index 99f096a256..f49c070349 100644 --- a/Spigot-Server-Patches/0052-Configurable-Chunk-IO-Thread-Base-Count.patch +++ b/Spigot-Server-Patches/0051-Configurable-Chunk-IO-Thread-Base-Count.patch @@ -1,11 +1,11 @@ -From cfb5df1da603ebc43de33db270bf0ec32836ee3c Mon Sep 17 00:00:00 2001 +From 2a6a8a92552ab6784e8995cfca8f38973f10064a Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 23:46:57 -0600 Subject: [PATCH] Configurable Chunk IO Thread Base Count diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index f75b758..1b8165c 100644 +index f9a4bf4..1ea409d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -192,4 +192,9 @@ public class PaperConfig { diff --git a/Spigot-Server-Patches/0053-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch b/Spigot-Server-Patches/0052-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch similarity index 92% rename from Spigot-Server-Patches/0053-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch rename to Spigot-Server-Patches/0052-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch index 38e684d76d..dcb9615acb 100644 --- a/Spigot-Server-Patches/0053-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch +++ b/Spigot-Server-Patches/0052-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch @@ -1,4 +1,4 @@ -From d97d5c88e8438283e42818c51ea7d68c1102e28a Mon Sep 17 00:00:00 2001 +From a6f71203988b2af1497b585b28018f1b7bbed9c1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 2 Mar 2016 23:51:51 -0600 Subject: [PATCH] Don't create Region File's when checking if chunk exists @@ -7,10 +7,10 @@ Plugins like Dynmap can end up creating tons of emtpy Region Files when using chunkExists. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 5d77c92..eb13bc9 100644 +index f6e286f..da7d7fe 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -38,7 +38,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -39,7 +39,10 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } } @@ -49,5 +49,5 @@ index 5528019..01a08d4 100644 file1.mkdirs(); } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0054-Don-t-create-a-chunk-just-to-unload-it.patch b/Spigot-Server-Patches/0053-Don-t-create-a-chunk-just-to-unload-it.patch similarity index 81% rename from Spigot-Server-Patches/0054-Don-t-create-a-chunk-just-to-unload-it.patch rename to Spigot-Server-Patches/0053-Don-t-create-a-chunk-just-to-unload-it.patch index d938be980b..0ee1419e33 100644 --- a/Spigot-Server-Patches/0054-Don-t-create-a-chunk-just-to-unload-it.patch +++ b/Spigot-Server-Patches/0053-Don-t-create-a-chunk-just-to-unload-it.patch @@ -1,20 +1,20 @@ -From 953114a5206b9fffd1d9b46aae12c9a520e53add Mon Sep 17 00:00:00 2001 +From 0241d5c821cff01bc4ad9d4b1b3611338228a68a Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 2 Mar 2016 23:55:20 -0600 Subject: [PATCH] Don't create a chunk just to unload it diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 02ff463..dfa7e73 100644 +index 898316f..46648bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -209,7 +209,13 @@ public class CraftWorld implements World { +@@ -213,7 +213,13 @@ public class CraftWorld implements World { } private boolean unloadChunk0(int x, int z, boolean save, boolean safe) { - net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z); + // Paper start - Don't create a chunk just to unload it -+ net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkIfLoaded(x, z); ++ net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getLoadedChunkAt(x, z); + if (chunk == null) { + return false; + } @@ -24,5 +24,5 @@ index 02ff463..dfa7e73 100644 save = true; } -- -2.8.0.windows.1 +2.8.2 diff --git a/Spigot-Server-Patches/0055-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0054-Add-PlayerInitialSpawnEvent.patch similarity index 91% rename from Spigot-Server-Patches/0055-Add-PlayerInitialSpawnEvent.patch rename to Spigot-Server-Patches/0054-Add-PlayerInitialSpawnEvent.patch index 99832fcf74..60ac18ea34 100644 --- a/Spigot-Server-Patches/0055-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0054-Add-PlayerInitialSpawnEvent.patch @@ -1,4 +1,4 @@ -From 4950c89748beaefcc27691878b089964e324068d Mon Sep 17 00:00:00 2001 +From 36b56f93ab5dc09bea513f84f44b4f3c7e5ddcd3 Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Thu, 3 Mar 2016 00:09:38 -0600 Subject: [PATCH] Add PlayerInitialSpawnEvent @@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent For modifying a player's initial spawn location as they join the server diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 52bece0..a6a4671 100644 +index 13fa79f..a3c0b10 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -99,6 +99,21 @@ public abstract class PlayerList { +@@ -100,6 +100,21 @@ public abstract class PlayerList { } // CraftBukkit end @@ -32,5 +32,5 @@ index 52bece0..a6a4671 100644 entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); String s1 = "local"; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0056-Disable-chest-cat-detection.patch b/Spigot-Server-Patches/0055-Disable-chest-cat-detection.patch similarity index 86% rename from Spigot-Server-Patches/0056-Disable-chest-cat-detection.patch rename to Spigot-Server-Patches/0055-Disable-chest-cat-detection.patch index 1851786abb..b6fedfee80 100644 --- a/Spigot-Server-Patches/0056-Disable-chest-cat-detection.patch +++ b/Spigot-Server-Patches/0055-Disable-chest-cat-detection.patch @@ -1,14 +1,14 @@ -From 1d96d8947dd9dcc848e7c9be4fb685d68cd04ddf Mon Sep 17 00:00:00 2001 +From 89bf06e23661104544cf99f5fc23fe97abb1024e Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:13:45 -0600 Subject: [PATCH] Disable chest cat detection diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 8b76052..7fe2ab0 100644 +index 12440dc..84dac97 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -242,4 +242,9 @@ public class PaperWorldConfig { +@@ -236,4 +236,9 @@ public class PaperWorldConfig { private void containerUpdateTickRate() { containerUpdateTickRate = getInt("container-update-tick-rate", 1); } @@ -19,10 +19,10 @@ index 8b76052..7fe2ab0 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 2fb9c76..5143d9e 100644 +index 21be295..a5f2fc0 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -396,6 +396,11 @@ public class BlockChest extends BlockTileEntity { +@@ -399,6 +399,11 @@ public class BlockChest extends BlockTileEntity { } private boolean j(World world, BlockPosition blockposition) { @@ -35,5 +35,5 @@ index 2fb9c76..5143d9e 100644 EntityOcelot entityocelot; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0057-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0056-Ensure-commands-are-not-ran-async.patch similarity index 96% rename from Spigot-Server-Patches/0057-Ensure-commands-are-not-ran-async.patch rename to Spigot-Server-Patches/0056-Ensure-commands-are-not-ran-async.patch index faf9d738b6..8863aa0985 100644 --- a/Spigot-Server-Patches/0057-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0056-Ensure-commands-are-not-ran-async.patch @@ -1,4 +1,4 @@ -From dc3f5c3a2b42709931b94412de62e201ea099943 Mon Sep 17 00:00:00 2001 +From 49a93c12b64029ade8efbe041717bfd6505976db Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:17:12 -0600 Subject: [PATCH] Ensure commands are not ran async @@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 3199c66..42456b6 100644 +index 0c2c151..2cde490 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1265,6 +1265,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1264,6 +1264,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } if (!async && s.startsWith("/")) { @@ -82,5 +82,5 @@ index 14e5647..c6cee80 100644 return true; } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0058-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0057-All-chunks-are-slime-spawn-chunks-toggle.patch similarity index 75% rename from Spigot-Server-Patches/0058-All-chunks-are-slime-spawn-chunks-toggle.patch rename to Spigot-Server-Patches/0057-All-chunks-are-slime-spawn-chunks-toggle.patch index a3b221865f..71ce5e8382 100644 --- a/Spigot-Server-Patches/0058-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/0057-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -1,14 +1,14 @@ -From 727a1539c7a36c542d38491f6e6df38a63df04ae Mon Sep 17 00:00:00 2001 +From 968d090e257dda79487473e2b8a264f676efa117 Mon Sep 17 00:00:00 2001 From: vemacs Date: Thu, 3 Mar 2016 01:19:22 -0600 Subject: [PATCH] All chunks are slime spawn chunks toggle diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7fe2ab0..0e03d9a 100644 +index 84dac97..2b7a4dd 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -247,4 +247,9 @@ public class PaperWorldConfig { +@@ -241,4 +241,9 @@ public class PaperWorldConfig { private void disableChestCatDetection() { disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false); } @@ -19,19 +19,19 @@ index 7fe2ab0..0e03d9a 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index fbefa3e..da73220 100644 +index 2fae2a9..170cb8a 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java -@@ -243,7 +243,8 @@ public class EntitySlime extends EntityInsentient implements IMonster { - return super.cF(); +@@ -245,7 +245,8 @@ public class EntitySlime extends EntityInsentient implements IMonster { + return super.cG(); } - if (this.random.nextInt(10) == 0 && chunk.a(987234911L).nextInt(10) == 0 && this.locY < 40.0D) { -+ boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(987234911L).nextInt(10) == 0; -+ if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) { - return super.cF(); ++ boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(987234911L).nextInt(10) == 0; // Paper ++ if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) { // Paper + return super.cG(); } } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0059-Add-Location-support-to-tab-completers-vanilla-featu.patch b/Spigot-Server-Patches/0058-Add-Location-support-to-tab-completers-vanilla-featu.patch similarity index 96% rename from Spigot-Server-Patches/0059-Add-Location-support-to-tab-completers-vanilla-featu.patch rename to Spigot-Server-Patches/0058-Add-Location-support-to-tab-completers-vanilla-featu.patch index e594dfdff8..8e704efe09 100644 --- a/Spigot-Server-Patches/0059-Add-Location-support-to-tab-completers-vanilla-featu.patch +++ b/Spigot-Server-Patches/0058-Add-Location-support-to-tab-completers-vanilla-featu.patch @@ -1,4 +1,4 @@ -From b8ff86f276a84f71244e65081715bac5e4e8375b Mon Sep 17 00:00:00 2001 +From 098cb462c9c959f5b015dd13058fbb76619829d0 Mon Sep 17 00:00:00 2001 From: DemonWav Date: Thu, 3 Mar 2016 01:44:39 -0600 Subject: [PATCH] Add Location support to tab completers (vanilla feature @@ -6,10 +6,10 @@ Subject: [PATCH] Add Location support to tab completers (vanilla feature diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0e03d9a..a73542d 100644 +index 2b7a4dd..246f3d9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -252,4 +252,9 @@ public class PaperWorldConfig { +@@ -246,4 +246,9 @@ public class PaperWorldConfig { private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); } @@ -20,10 +20,10 @@ index 0e03d9a..a73542d 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d515dcb..3420b8b 100644 +index 5925e2c..f5e26df 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1184,7 +1184,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -1189,7 +1189,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs return arraylist; } */ @@ -151,5 +151,5 @@ index 100d84a..a40218c 100644 public static CommandSender lastSender = null; // Nasty :( -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0060-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0059-Optimize-Pathfinding.patch similarity index 83% rename from Spigot-Server-Patches/0060-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0059-Optimize-Pathfinding.patch index 77c57e7b24..46921cf2c8 100644 --- a/Spigot-Server-Patches/0060-Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/0059-Optimize-Pathfinding.patch @@ -1,4 +1,4 @@ -From 4657a4ff4a1209fd56404f3768f6a566c0c27bc6 Mon Sep 17 00:00:00 2001 +From 992e43398a309df8c25659b1d0d0881a6b327a09 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:02:07 -0600 Subject: [PATCH] Optimize Pathfinding @@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as arrow attacks. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 7cfe0af..9687785 100644 +index 31e574c..61c0f55 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -118,10 +118,26 @@ public abstract class NavigationAbstract { +@@ -123,10 +123,26 @@ public abstract class NavigationAbstract { } public boolean a(Entity entity, double d0) { @@ -36,9 +36,9 @@ index 7cfe0af..9687785 100644 + private int pathfindFailures = 0; + // Paper end - public boolean a(PathEntity pathentity, double d0) { + public boolean a(@Nullable PathEntity pathentity, double d0) { if (pathentity == null) { -@@ -254,6 +270,7 @@ public abstract class NavigationAbstract { +@@ -260,6 +276,7 @@ public abstract class NavigationAbstract { } public void o() { @@ -47,5 +47,5 @@ index 7cfe0af..9687785 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0061-Optimize-getBlockData.patch b/Spigot-Server-Patches/0060-Optimize-getBlockData.patch similarity index 88% rename from Spigot-Server-Patches/0061-Optimize-getBlockData.patch rename to Spigot-Server-Patches/0060-Optimize-getBlockData.patch index 17cc13551d..6062b7952a 100644 --- a/Spigot-Server-Patches/0061-Optimize-getBlockData.patch +++ b/Spigot-Server-Patches/0060-Optimize-getBlockData.patch @@ -1,4 +1,4 @@ -From 1d994e981c808ec7253ff3ed4f4020b41829510b Mon Sep 17 00:00:00 2001 +From 7b8fd6c09c65c9bafae7bd58364797691be50cad Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:07:55 -0600 Subject: [PATCH] Optimize getBlockData @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize getBlockData Hot method, so reduce # of instructions for the method. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 3b5e8c2..42fedb7 100644 +index 3bcbbb9..08525d6 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -403,8 +403,15 @@ public class Chunk { +@@ -404,8 +404,15 @@ public class Chunk { return this.a(i, j, k).c(); } @@ -27,5 +27,5 @@ index 3b5e8c2..42fedb7 100644 public IBlockData a(final int i, final int j, final int k) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0062-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0061-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 92% rename from Spigot-Server-Patches/0062-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0061-Avoid-hopper-searches-if-there-are-no-items.patch index f9f699b31a..ace40b50e9 100644 --- a/Spigot-Server-Patches/0062-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0061-Avoid-hopper-searches-if-there-are-no-items.patch @@ -1,4 +1,4 @@ -From ffe9aada565efa029e3c8ebaed7c5e94b286dbe9 Mon Sep 17 00:00:00 2001 +From c78c930892a7b03ed80dcf843aedb632fb1a8b4d 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,10 +14,10 @@ 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 42fedb7..13d43d5 100644 +index 08525d6..300d625 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -46,6 +46,13 @@ public class Chunk { +@@ -47,6 +47,13 @@ public class Chunk { protected gnu.trove.map.hash.TObjectIntHashMap entityCount = new gnu.trove.map.hash.TObjectIntHashMap(); // Spigot public int lightUpdates; // Paper - Number of queued light updates for this chunk @@ -31,7 +31,7 @@ index 42fedb7..13d43d5 100644 // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking private int neighbors = 0x1 << 12; -@@ -653,6 +660,13 @@ public class Chunk { +@@ -655,6 +662,13 @@ public class Chunk { entity.ac = k; entity.ad = this.locZ; this.entitySlices[k].add(entity); @@ -45,7 +45,7 @@ index 42fedb7..13d43d5 100644 // Spigot start - increment creature type count // Keep this synced up with World.a(Class) if (entity instanceof EntityInsentient) { -@@ -685,6 +699,13 @@ public class Chunk { +@@ -687,6 +701,13 @@ public class Chunk { } this.entitySlices[i].remove(entity); @@ -59,7 +59,7 @@ index 42fedb7..13d43d5 100644 // Spigot start - decrement creature type count // Keep this synced up with World.a(Class) if (entity instanceof EntityInsentient) { -@@ -874,6 +895,15 @@ public class Chunk { +@@ -878,6 +899,15 @@ public class Chunk { if (!this.entitySlices[k].isEmpty()) { Iterator iterator = this.entitySlices[k].iterator(); @@ -75,7 +75,7 @@ index 42fedb7..13d43d5 100644 while (iterator.hasNext()) { Entity entity1 = (Entity) iterator.next(); -@@ -906,7 +936,18 @@ public class Chunk { +@@ -910,7 +940,18 @@ public class Chunk { i = MathHelper.clamp(i, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); diff --git a/Spigot-Server-Patches/0063-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0062-Expose-server-CommandMap.patch similarity index 89% rename from Spigot-Server-Patches/0063-Expose-server-CommandMap.patch rename to Spigot-Server-Patches/0062-Expose-server-CommandMap.patch index a303c92740..ac6bd8a700 100644 --- a/Spigot-Server-Patches/0063-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0062-Expose-server-CommandMap.patch @@ -1,4 +1,4 @@ -From bd9643d3d3db14bda339720f3d3cebdf85c7dfed Mon Sep 17 00:00:00 2001 +From ae2a2c8c665502da7624f701485c21920fdfec0f Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 3 Mar 2016 02:15:57 -0600 Subject: [PATCH] Expose server CommandMap @@ -17,5 +17,5 @@ index 3a288bd..794a2c9 100644 return commandMap; } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0064-Be-a-bit-more-informative-in-maxHealth-exception.patch b/Spigot-Server-Patches/0063-Be-a-bit-more-informative-in-maxHealth-exception.patch similarity index 92% rename from Spigot-Server-Patches/0064-Be-a-bit-more-informative-in-maxHealth-exception.patch rename to Spigot-Server-Patches/0063-Be-a-bit-more-informative-in-maxHealth-exception.patch index 3c68f07237..2be6667936 100644 --- a/Spigot-Server-Patches/0064-Be-a-bit-more-informative-in-maxHealth-exception.patch +++ b/Spigot-Server-Patches/0063-Be-a-bit-more-informative-in-maxHealth-exception.patch @@ -1,11 +1,11 @@ -From 198a36dc466f7b186affe2c3dc4bb79cf9704f18 Mon Sep 17 00:00:00 2001 +From d161119c1c5608813fb96a56afc6ab967c087faf Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 3 Mar 2016 02:18:39 -0600 Subject: [PATCH] Be a bit more informative in maxHealth exception diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 8aa8686..aed3e4f 100644 +index e662e4a..f13ca63 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -92,7 +92,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -21,5 +21,5 @@ index 8aa8686..aed3e4f 100644 if (entity instanceof EntityPlayer && health == 0) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0065-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-Server-Patches/0064-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch similarity index 94% rename from Spigot-Server-Patches/0065-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch rename to Spigot-Server-Patches/0064-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index c8a7555b35..bdb9b09eb1 100644 --- a/Spigot-Server-Patches/0065-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-Server-Patches/0064-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -1,4 +1,4 @@ -From 9299fe5f4a331e55ad997054df153d7b0545a354 Mon Sep 17 00:00:00 2001 +From 7711f8c30afc2a1a0cc61786f5fe5ca087e3b1ad Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 3 Mar 2016 02:21:58 -0600 Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses @@ -28,7 +28,7 @@ index 794a2c9..b6be0d7 100644 @Deprecated public OfflinePlayer getOfflinePlayer(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 202085b..7e70c71 100644 +index 9770c99..bd1b74c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -156,6 +156,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -56,5 +56,5 @@ index 202085b..7e70c71 100644 public String getDisplayName() { return getHandle().displayName; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0066-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0065-Player-Tab-List-and-Title-APIs.patch similarity index 96% rename from Spigot-Server-Patches/0066-Player-Tab-List-and-Title-APIs.patch rename to Spigot-Server-Patches/0065-Player-Tab-List-and-Title-APIs.patch index 3ab28813a1..6af9d69bf9 100644 --- a/Spigot-Server-Patches/0066-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0065-Player-Tab-List-and-Title-APIs.patch @@ -1,4 +1,4 @@ -From 964288fa89c51ce6bbbb01d45e162cad746f1af0 Mon Sep 17 00:00:00 2001 +From 20ea4296fe6b89252bd5f5a83c4e0ef88736454e Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 3 Mar 2016 02:32:10 -0600 Subject: [PATCH] Player Tab List and Title APIs @@ -40,10 +40,10 @@ index 5f5b382..242efb0 100644 public void a(PacketListenerPlayOut packetlistenerplayout) { diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java -index 2286c9e..169a03c 100644 +index 31a2b21..8a0839c 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java -@@ -10,6 +10,18 @@ public class PacketPlayOutTitle implements Packet { +@@ -11,6 +11,18 @@ public class PacketPlayOutTitle implements Packet { private int d; private int e; @@ -62,7 +62,7 @@ index 2286c9e..169a03c 100644 public PacketPlayOutTitle() {} public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction, IChatBaseComponent ichatbasecomponent) { -@@ -45,7 +57,13 @@ public class PacketPlayOutTitle implements Packet { +@@ -46,7 +58,13 @@ public class PacketPlayOutTitle implements Packet { public void b(PacketDataSerializer packetdataserializer) throws IOException { packetdataserializer.a((Enum) this.a); if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE) { @@ -78,7 +78,7 @@ index 2286c9e..169a03c 100644 if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7e70c71..a2459da 100644 +index bd1b74c..fdbad7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ @@ -173,5 +173,5 @@ index 7e70c71..a2459da 100644 @Override -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0067-Ensure-inv-drag-is-in-bounds.patch b/Spigot-Server-Patches/0066-Ensure-inv-drag-is-in-bounds.patch similarity index 84% rename from Spigot-Server-Patches/0067-Ensure-inv-drag-is-in-bounds.patch rename to Spigot-Server-Patches/0066-Ensure-inv-drag-is-in-bounds.patch index e975f4f7b2..044c7a60b9 100644 --- a/Spigot-Server-Patches/0067-Ensure-inv-drag-is-in-bounds.patch +++ b/Spigot-Server-Patches/0066-Ensure-inv-drag-is-in-bounds.patch @@ -1,14 +1,14 @@ -From 582fe24787f872e73de369a7bca5b2a8d3fe0bbf Mon Sep 17 00:00:00 2001 +From 6d362e1d7af4414e3819f600af7dd740719561ae Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:33:53 -0600 Subject: [PATCH] Ensure inv drag is in bounds diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java -index 000b4db..3114027 100644 +index f9ff5cc..fd226f1 100644 --- a/src/main/java/net/minecraft/server/Container.java +++ b/src/main/java/net/minecraft/server/Container.java -@@ -138,7 +138,7 @@ public abstract class Container { +@@ -142,7 +142,7 @@ public abstract class Container { this.d(); } } else if (this.g == 1) { @@ -18,5 +18,5 @@ index 000b4db..3114027 100644 if (slot != null && a(slot, playerinventory.getCarried(), true) && slot.isAllowed(playerinventory.getCarried()) && playerinventory.getCarried().count > this.h.size() && this.b(slot)) { this.h.add(slot); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0068-Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/0067-Change-implementation-of-tile-entity-removal-list.patch similarity index 92% rename from Spigot-Server-Patches/0068-Change-implementation-of-tile-entity-removal-list.patch rename to Spigot-Server-Patches/0067-Change-implementation-of-tile-entity-removal-list.patch index c76d9db7e4..fb334279a5 100644 --- a/Spigot-Server-Patches/0068-Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/0067-Change-implementation-of-tile-entity-removal-list.patch @@ -1,16 +1,16 @@ -From 29c4559ebd61234ff7e07ea49d2f014572cc7434 Mon Sep 17 00:00:00 2001 +From 582cdbf4397d60d944fb6c56443b5eb1c49c10fb Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:39:54 -0600 Subject: [PATCH] Change implementation of (tile)entity removal list diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 782abd6..df49185 100644 +index 751e07d..c6fe888 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -119,9 +119,9 @@ public abstract class Entity implements ICommandListener { - private static final DataWatcherObject aA = DataWatcher.a(Entity.class, DataWatcherRegistry.h); private static final DataWatcherObject aB = DataWatcher.a(Entity.class, DataWatcherRegistry.h); + private static final DataWatcherObject aC = DataWatcher.a(Entity.class, DataWatcherRegistry.h); public boolean aa; - public int ab; - public int ac; @@ -22,7 +22,7 @@ index 782abd6..df49185 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index af43a87..074d80d 100644 +index 5adc297..e56f705 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -31,6 +31,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; @@ -51,7 +51,7 @@ index af43a87..074d80d 100644 public final List players = Lists.newArrayList(); public final List j = Lists.newArrayList(); protected final IntHashMap entitiesById = new IntHashMap(); -@@ -1395,19 +1400,20 @@ public abstract class World implements IBlockAccess { +@@ -1400,19 +1405,20 @@ public abstract class World implements IBlockAccess { int j; @@ -81,5 +81,5 @@ index af43a87..074d80d 100644 this.f.clear(); this.l(); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0069-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0068-Add-configurable-portal-search-radius.patch similarity index 86% rename from Spigot-Server-Patches/0069-Add-configurable-portal-search-radius.patch rename to Spigot-Server-Patches/0068-Add-configurable-portal-search-radius.patch index 424b090233..ca132630ca 100644 --- a/Spigot-Server-Patches/0069-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0068-Add-configurable-portal-search-radius.patch @@ -1,14 +1,14 @@ -From b1c322aa34ad6d5802705dbcd0613330bd0da7cd Mon Sep 17 00:00:00 2001 +From cef04d9da593e1217f0a9c12402bd5deb054c047 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:46:17 -0600 Subject: [PATCH] Add configurable portal search radius diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a73542d..f1ffe7b 100644 +index 246f3d9..0aef69d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -257,4 +257,9 @@ public class PaperWorldConfig { +@@ -251,4 +251,9 @@ public class PaperWorldConfig { private void allowBlockLocationTabCompletion() { allowBlockLocationTabCompletion = getBoolean("allow-block-location-tab-completion", true); } @@ -19,18 +19,18 @@ index a73542d..f1ffe7b 100644 + } } diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java -index 519d27c..3f35303 100644 +index 6bb68c0..b731b53 100644 --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java +++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java -@@ -11,7 +11,7 @@ import java.util.Random; +@@ -12,7 +12,7 @@ import org.bukkit.util.Vector; public class PortalTravelAgent { - private final WorldServer world; + protected final WorldServer world; // Paper - private -> protected private final Random b; - private final LongHashMap c = new LongHashMap(); - private final List d = Lists.newArrayList(); + private final Long2ObjectMap c = new Long2ObjectOpenHashMap(4096); + @@ -92,7 +92,7 @@ public class PortalTravelAgent { public boolean b(Entity entity, float f) { @@ -54,5 +54,5 @@ index 1d5dce1..7ca2617 100644 private boolean canCreatePortal = true; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0070-Add-velocity-warnings.patch b/Spigot-Server-Patches/0069-Add-velocity-warnings.patch similarity index 92% rename from Spigot-Server-Patches/0070-Add-velocity-warnings.patch rename to Spigot-Server-Patches/0069-Add-velocity-warnings.patch index b4450b59dc..4b2fc46946 100644 --- a/Spigot-Server-Patches/0070-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0069-Add-velocity-warnings.patch @@ -1,11 +1,11 @@ -From 757a12b52c7aaab1cb9482e27ccc2c0b794707ca Mon Sep 17 00:00:00 2001 +From 128717a58ad4dd6c56d60049de3c8e2c546c6e04 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:48:12 -0600 Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index f61f6cd..5934be1 100644 +index a6c0b45..485e204 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -204,6 +204,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -22,5 +22,5 @@ index f61f6cd..5934be1 100644 entity.motY = vel.getY(); entity.motZ = vel.getZ(); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0071-Fix-inter-world-teleportation-glitches.patch b/Spigot-Server-Patches/0070-Fix-inter-world-teleportation-glitches.patch similarity index 90% rename from Spigot-Server-Patches/0071-Fix-inter-world-teleportation-glitches.patch rename to Spigot-Server-Patches/0070-Fix-inter-world-teleportation-glitches.patch index 9462a099d6..e50e47790e 100644 --- a/Spigot-Server-Patches/0071-Fix-inter-world-teleportation-glitches.patch +++ b/Spigot-Server-Patches/0070-Fix-inter-world-teleportation-glitches.patch @@ -1,4 +1,4 @@ -From cf7e3abb7603715b6e7580ac89fe45bd1bfbaa94 Mon Sep 17 00:00:00 2001 +From 4089dcc3abddf4073495eb7db420aea17bbe59a0 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Thu, 3 Mar 2016 02:50:31 -0600 Subject: [PATCH] Fix inter-world teleportation glitches @@ -11,10 +11,10 @@ Example setup to perform the glitch: http://puu.sh/ng3PC/cf072dcbdb.png The wanted destination was on top of the emerald block however the player ended on top of the diamond block. This only is the case if the player is teleporting between worlds. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index f1ffe7b..c6f12a1 100644 +index 0aef69d..37d58ee 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -262,4 +262,9 @@ public class PaperWorldConfig { +@@ -256,4 +256,9 @@ public class PaperWorldConfig { private void portalSearchRadius() { portalSearchRadius = getInt("portal-search-radius", 128); } @@ -25,10 +25,10 @@ index f1ffe7b..c6f12a1 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a2459da..0f081b5 100644 +index fdbad7d..ef6e9a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -554,7 +554,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -557,7 +557,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.playerConnection.teleport(to); } else { @@ -39,5 +39,5 @@ index a2459da..0f081b5 100644 return true; } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0072-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0071-Add-exception-reporting-event.patch similarity index 94% rename from Spigot-Server-Patches/0072-Add-exception-reporting-event.patch rename to Spigot-Server-Patches/0071-Add-exception-reporting-event.patch index 9a7f3aea8f..589df126e6 100644 --- a/Spigot-Server-Patches/0072-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0071-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From d54ccf5e32ba24202f54270f93c2fc760144844b Mon Sep 17 00:00:00 2001 +From 6716cfabe2cb44666f1c9fa5d7ccf68d95224f3c Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -50,7 +50,7 @@ index 0000000..9339718 +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 806e499..8b11266 100644 +index 300d625..eb60455 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,6 @@ @@ -68,7 +68,7 @@ index 806e499..8b11266 100644 public class Chunk { -@@ -789,10 +791,15 @@ public class Chunk { +@@ -793,10 +795,15 @@ public class Chunk { this.tileEntities.remove(blockposition); // Paper end } else { @@ -89,18 +89,18 @@ index 806e499..8b11266 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 54c83f3..969ae9d 100644 +index 20dccfb..32b71c6 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -4,6 +4,7 @@ import java.io.IOException; - import java.util.Iterator; +@@ -11,6 +11,7 @@ import java.util.Iterator; import java.util.List; - + import java.util.Set; + import javax.annotation.Nullable; +import com.destroystokyo.paper.exception.ServerInternalException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -224,7 +225,11 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -203,7 +204,11 @@ public class ChunkProviderServer implements IChunkProvider { return chunk; } catch (Exception exception) { @@ -113,7 +113,7 @@ index 54c83f3..969ae9d 100644 return null; } } -@@ -233,7 +238,11 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -212,7 +217,11 @@ public class ChunkProviderServer implements IChunkProvider { try { this.chunkLoader.b(this.world, chunk); } catch (Exception exception) { @@ -126,7 +126,7 @@ index 54c83f3..969ae9d 100644 } } -@@ -243,9 +252,14 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -222,9 +231,14 @@ public class ChunkProviderServer implements IChunkProvider { chunk.setLastSaved(this.world.getTime()); this.chunkLoader.a(this.world, chunk); } catch (IOException ioexception) { @@ -144,7 +144,7 @@ index 54c83f3..969ae9d 100644 } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index c527b3f..6aad092 100644 +index 0906bf7..1d0890d 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -1,5 +1,6 @@ @@ -154,7 +154,7 @@ index c527b3f..6aad092 100644 import com.google.common.base.Charsets; import com.google.common.base.Predicate; import com.google.common.collect.Iterators; -@@ -360,6 +361,7 @@ public class NameReferencingFileConverter { +@@ -361,6 +362,7 @@ public class NameReferencingFileConverter { root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1)); } catch (Exception exception) { exception.printStackTrace(); @@ -162,7 +162,7 @@ index c527b3f..6aad092 100644 } if (root != null) { -@@ -373,6 +375,7 @@ public class NameReferencingFileConverter { +@@ -374,6 +376,7 @@ public class NameReferencingFileConverter { NBTCompressedStreamTools.a(root, new java.io.FileOutputStream(file2)); } catch (Exception exception) { exception.printStackTrace(); @@ -171,7 +171,7 @@ index c527b3f..6aad092 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PersistentCollection.java b/src/main/java/net/minecraft/server/PersistentCollection.java -index 6f013eb..054cf63 100644 +index c221a22..57a892c 100644 --- a/src/main/java/net/minecraft/server/PersistentCollection.java +++ b/src/main/java/net/minecraft/server/PersistentCollection.java @@ -1,5 +1,6 @@ @@ -181,7 +181,7 @@ index 6f013eb..054cf63 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import java.io.DataInputStream; -@@ -51,6 +52,7 @@ public class PersistentCollection { +@@ -53,6 +54,7 @@ public class PersistentCollection { } } catch (Exception exception1) { exception1.printStackTrace(); @@ -189,7 +189,7 @@ index 6f013eb..054cf63 100644 } } -@@ -103,6 +105,7 @@ public class PersistentCollection { +@@ -102,6 +104,7 @@ public class PersistentCollection { } } catch (Exception exception) { exception.printStackTrace(); @@ -244,7 +244,7 @@ index 01a08d4..5eb01c3 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 588377c..e15cc1a 100644 +index 852bdf8..5fa35f3 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -5,6 +5,7 @@ import java.util.List; @@ -272,7 +272,7 @@ index 588377c..e15cc1a 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index 320e52e..d40257f 100644 +index 26d7d12..fcd2ddf 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -1,5 +1,7 @@ @@ -282,8 +282,8 @@ index 320e52e..d40257f 100644 + import java.util.Iterator; import java.util.List; - -@@ -136,6 +138,7 @@ public class VillageSiege { + import javax.annotation.Nullable; +@@ -137,6 +139,7 @@ public class VillageSiege { entityzombie.clearVillagerType(); } catch (Exception exception) { exception.printStackTrace(); @@ -292,7 +292,7 @@ index 320e52e..d40257f 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 074d80d..f811cd2 100644 +index e56f705..21ba235 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,7 @@ @@ -303,7 +303,7 @@ index 074d80d..f811cd2 100644 import com.google.common.base.Function; import com.google.common.base.Objects; import com.google.common.base.Predicate; -@@ -1455,8 +1457,10 @@ public abstract class World implements IBlockAccess { +@@ -1460,8 +1462,10 @@ public abstract class World implements IBlockAccess { } catch (Throwable throwable1) { entity.tickTimer.stopTiming(); // Paper start - Prevent tile entity and entity crashes @@ -315,7 +315,7 @@ index 074d80d..f811cd2 100644 entity.dead = true; continue; // Paper end -@@ -1520,8 +1524,10 @@ public abstract class World implements IBlockAccess { +@@ -1525,8 +1529,10 @@ public abstract class World implements IBlockAccess { this.methodProfiler.b(); } catch (Throwable throwable2) { // Paper start - Prevent tile entity and entity crashes @@ -328,7 +328,7 @@ index 074d80d..f811cd2 100644 this.tileEntityListTick.remove(tileTickPosition--); continue; diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 44e057c..cf0bd0c 100644 +index 2a22697..d82dddf 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -14,6 +14,9 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -372,5 +372,5 @@ index 44e057c..cf0bd0c 100644 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0074-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch b/Spigot-Server-Patches/0072-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch similarity index 95% rename from Spigot-Server-Patches/0074-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch rename to Spigot-Server-Patches/0072-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch index 891e462210..a39e6977fb 100644 --- a/Spigot-Server-Patches/0074-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch +++ b/Spigot-Server-Patches/0072-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch @@ -1,4 +1,4 @@ -From 2c51fa98a30040a704cb0bd0c25b90a2e97a9b65 Mon Sep 17 00:00:00 2001 +From af2b7145d1158096496c253ccbfd616eb2fb9118 Mon Sep 17 00:00:00 2001 From: kashike Date: Tue, 8 Mar 2016 18:28:43 -0800 Subject: [PATCH] Don't nest if we don't need to when cerealising text @@ -26,5 +26,5 @@ index c0e1199..bc6c054 100644 packetdataserializer.a(this.a); } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0075-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0073-Disable-Scoreboards-for-non-players-by-default.patch similarity index 81% rename from Spigot-Server-Patches/0075-Disable-Scoreboards-for-non-players-by-default.patch rename to Spigot-Server-Patches/0073-Disable-Scoreboards-for-non-players-by-default.patch index 872538d005..3afef42f1f 100644 --- a/Spigot-Server-Patches/0075-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0073-Disable-Scoreboards-for-non-players-by-default.patch @@ -1,4 +1,4 @@ -From 418f131fc4357962762b01fc1fe80f982ec5ae57 Mon Sep 17 00:00:00 2001 +From 4e264597fc3622e07e76a1cb118288cb2549c867 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 8 Mar 2016 23:25:45 -0500 Subject: [PATCH] Disable Scoreboards for non players by default @@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index c6f12a1..b813a9b 100644 +index 37d58ee..b0bcea0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -267,4 +267,9 @@ public class PaperWorldConfig { +@@ -261,4 +261,9 @@ public class PaperWorldConfig { private void disableTeleportationSuffocationCheck() { disableTeleportationSuffocationCheck = getBoolean("disable-teleportation-suffocation-check", false); } @@ -25,29 +25,29 @@ index c6f12a1..b813a9b 100644 + } } diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java -index b044f33..1758a56 100644 +index 989721b..6b2a1a0 100644 --- a/src/main/java/net/minecraft/server/CommandScoreboard.java +++ b/src/main/java/net/minecraft/server/CommandScoreboard.java -@@ -490,6 +490,7 @@ public class CommandScoreboard extends CommandAbstract { +@@ -491,6 +491,7 @@ public class CommandScoreboard extends CommandAbstract { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); + if (!entity.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(entity instanceof EntityHuman)) { continue; } // Paper - String s2 = e(minecraftserver, icommandlistener, entity.getUniqueID().toString()); + String s2 = e(minecraftserver, icommandlistener, entity.bd()); if (scoreboard.addPlayerToTeam(s2, s)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index df49185..26f83a4 100644 +index c6fe888..035dd20 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1845,6 +1845,7 @@ public abstract class Entity implements ICommandListener { - } +@@ -1853,6 +1853,7 @@ public abstract class Entity implements ICommandListener { + @Nullable public ScoreboardTeamBase aO() { + if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper - return this.world.getScoreboard().getPlayerTeam(this.getUniqueID().toString()); + return this.world.getScoreboard().getPlayerTeam(this.bd()); } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0073-Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/0073-Speedup-BlockPos-by-fixing-inlining.patch deleted file mode 100644 index a6f778a036..0000000000 --- a/Spigot-Server-Patches/0073-Speedup-BlockPos-by-fixing-inlining.patch +++ /dev/null @@ -1,223 +0,0 @@ -From 625ae497ed404e57797c88a005ca4fc2246312c7 Mon Sep 17 00:00:00 2001 -From: Techcable -Date: Mon, 7 Mar 2016 12:51:01 -0700 -Subject: [PATCH] Speedup BlockPos by fixing inlining - -Normally the JVM can inline virtual getters by having two sets of code, one is the 'optimized' code and the other is the 'deoptimized' code. -If a single type is used 99% of the time, then its worth it to inline, and to revert to 'deoptimized' the 1% of the time we encounter other types. -But if two types are encountered commonly, then the JVM can't inline them both, and the call overhead remains. - -This scenario also occurs with BlockPos and MutableBlockPos. -The variables in BlockPos are final, so MutableBlockPos can't modify them. -MutableBlockPos fixes this by adding custom mutable variables, and overriding the getters to access them. - -This approach with utility methods that operate on MutableBlockPos and BlockPos. -Specific examples are BlockPosition.up(), and World.isValidLocation(). -It makes these simple methods much slower than they need to be. - -This should result in an across the board speedup in anything that accesses blocks or does logic with positions. - -This is based upon conclusions drawn from inspecting the assenmbly generated bythe JIT compiler on my mircorbenchmarks. -They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. - -diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 47c9f69..c5b6a34 100644 ---- a/src/main/java/net/minecraft/server/BaseBlockPosition.java -+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -5,9 +5,11 @@ import com.google.common.base.Objects; - public class BaseBlockPosition implements Comparable { - - public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0); -- private final int a; -- private final int c; -- private final int d; -+ // Paper start - make mutable and protected for MutableBlockPos and PooledBlockPos -+ protected int a; -+ protected int c; -+ protected int d; -+ // Paper end - - public BaseBlockPosition(int i, int j, int k) { - this.a = i; -@@ -39,17 +41,19 @@ public class BaseBlockPosition implements Comparable { - return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); - } - -- public int getX() { -+ // Paper start - Only allow one implementation of these methods (make final) -+ public final int getX() { - return this.a; - } - -- public int getY() { -+ public final int getY() { - return this.c; - } - -- public int getZ() { -+ public final int getZ() { - return this.d; - } -+ // Paper end - - public BaseBlockPosition d(BaseBlockPosition baseblockposition) { - return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX()); -diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index e7a95f3..2d56f02 100644 ---- a/src/main/java/net/minecraft/server/BlockPosition.java -+++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -207,9 +207,10 @@ public class BlockPosition extends BaseBlockPosition { - ++k; - } - -- this.b.c = i; -- this.b.d = j; -- this.b.e = k; -+ // Paper start - modify base position variables -+ ((BaseBlockPosition) this.b).a = i; -+ ((BaseBlockPosition) this.b).c = j; -+ ((BaseBlockPosition) this.b).d = k; - return this.b; - } - } -@@ -228,17 +229,23 @@ public class BlockPosition extends BaseBlockPosition { - - public static final class PooledBlockPosition extends BlockPosition { - -+ // Paper start - remove variables -+ /* - private int c; - private int d; - private int e; -+ */ -+ // Paper end - private boolean f; - private static final List g = Lists.newArrayList(); - - private PooledBlockPosition(int i, int j, int k) { - super(0, 0, 0); -- this.c = i; -- this.d = j; -- this.e = k; -+ // Paper start - modify base position variables -+ ((BaseBlockPosition) this).a = i; -+ ((BaseBlockPosition) this).c = j; -+ ((BaseBlockPosition) this).d = k; -+ // Paper end - } - - public static BlockPosition.PooledBlockPosition s() { -@@ -279,6 +286,8 @@ public class BlockPosition extends BaseBlockPosition { - } - } - -+ // Paper start - use superclass methods -+ /* - public int getX() { - return this.c; - } -@@ -290,6 +299,8 @@ public class BlockPosition extends BaseBlockPosition { - public int getZ() { - return this.e; - } -+ */ -+ // Paper end - - public BlockPosition.PooledBlockPosition d(int i, int j, int k) { - if (this.f) { -@@ -297,9 +308,11 @@ public class BlockPosition extends BaseBlockPosition { - this.f = false; - } - -- this.c = i; -- this.d = j; -- this.e = k; -+ // Paper start - modify base position variables -+ ((BaseBlockPosition) this).a = i; -+ ((BaseBlockPosition) this).c = j; -+ ((BaseBlockPosition) this).d = k; -+ // Paper end - return this; - } - -@@ -312,7 +325,7 @@ public class BlockPosition extends BaseBlockPosition { - } - - public BlockPosition.PooledBlockPosition c(EnumDirection enumdirection) { -- return this.d(this.c + enumdirection.getAdjacentX(), this.d + enumdirection.getAdjacentY(), this.e + enumdirection.getAdjacentZ()); -+ return this.d(this.getX() + enumdirection.getAdjacentX(), this.getY() + enumdirection.getAdjacentY(), this.getZ() + enumdirection.getAdjacentZ()); // Paper - use getters - } - - public BaseBlockPosition d(BaseBlockPosition baseblockposition) { -@@ -322,9 +335,13 @@ public class BlockPosition extends BaseBlockPosition { - - public static final class MutableBlockPosition extends BlockPosition { - -+ // Paper start - remove variables -+ /* - private int c; - private int d; - private int e; -+ */ -+ // Paper end - - public MutableBlockPosition() { - this(0, 0, 0); -@@ -336,11 +353,15 @@ public class BlockPosition extends BaseBlockPosition { - - public MutableBlockPosition(int i, int j, int k) { - super(0, 0, 0); -- this.c = i; -- this.d = j; -- this.e = k; -+ // Paper start - modify base position variables -+ ((BaseBlockPosition) this).a = i; -+ ((BaseBlockPosition) this).c = j; -+ ((BaseBlockPosition) this).d = k; -+ // Paper end - } - -+ // Paper start - use superclass methods -+ /* - public int getX() { - return this.c; - } -@@ -352,22 +373,28 @@ public class BlockPosition extends BaseBlockPosition { - public int getZ() { - return this.e; - } -+ */ -+ // Paper end - - public BlockPosition.MutableBlockPosition c(int i, int j, int k) { -- this.c = i; -- this.d = j; -- this.e = k; -+ // Paper start - modify base position variables -+ ((BaseBlockPosition) this).a = i; -+ ((BaseBlockPosition) this).c = j; -+ ((BaseBlockPosition) this).d = k; -+ // Paper end - return this; - } - - public void c(EnumDirection enumdirection) { -- this.c += enumdirection.getAdjacentX(); -- this.d += enumdirection.getAdjacentY(); -- this.e += enumdirection.getAdjacentZ(); -+ // Paper start - modify base position variables -+ ((BaseBlockPosition) this).a += enumdirection.getAdjacentX(); -+ ((BaseBlockPosition) this).c += enumdirection.getAdjacentY(); -+ ((BaseBlockPosition) this).d += enumdirection.getAdjacentZ(); -+ // Paper end - } - - public void p(int i) { -- this.d = i; -+ ((BaseBlockPosition) this).c = i; // Paper - modify base variable - } - - public BlockPosition h() { --- -2.8.0 - diff --git a/Spigot-Server-Patches/0076-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/0074-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 83% rename from Spigot-Server-Patches/0076-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to Spigot-Server-Patches/0074-Add-methods-for-working-with-arrows-stuck-in-living-.patch index 746fd9342a..fa2b669c46 100644 --- a/Spigot-Server-Patches/0076-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/0074-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -1,19 +1,19 @@ -From d558be34000c9c6dd375cfca27aeb4a46d9719f0 Mon Sep 17 00:00:00 2001 +From e1870e7610f50cc6024f509c899d00ab7fb198d8 Mon Sep 17 00:00:00 2001 From: mrapple Date: Sun, 25 Nov 2012 13:43:39 -0600 Subject: [PATCH] Add methods for working with arrows stuck in living entities diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 342fcb7..d0e0285 100644 +index 7fd8585..b151c13 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1279,10 +1279,12 @@ public abstract class EntityLiving extends Entity { +@@ -1284,10 +1284,12 @@ public abstract class EntityLiving extends Entity { return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue(); } -+ public final int getStuckArrows() { return this.bX(); } // Paper - deobfuscation helper - public final int bX() { ++ public final int getStuckArrows() { return this.bY(); } // Paper // OBFHELPER + public final int bY() { return ((Integer) this.datawatcher.get(EntityLiving.h)).intValue(); } @@ -22,7 +22,7 @@ index 342fcb7..d0e0285 100644 this.datawatcher.set(EntityLiving.h, Integer.valueOf(i)); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index aed3e4f..0502593 100644 +index f13ca63..16da1c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -553,4 +553,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -43,5 +43,5 @@ index aed3e4f..0502593 100644 + // Paper end } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0077-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0075-Complete-resource-pack-API.patch similarity index 94% rename from Spigot-Server-Patches/0077-Complete-resource-pack-API.patch rename to Spigot-Server-Patches/0075-Complete-resource-pack-API.patch index 0ad9944e2e..5ecbb77a8d 100644 --- a/Spigot-Server-Patches/0077-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0075-Complete-resource-pack-API.patch @@ -1,4 +1,4 @@ -From 5518d351aa3f9110c4c57fd5869cb88105a37d02 Mon Sep 17 00:00:00 2001 +From 468dbbaec486911373e779b6f9349066777ef3d7 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 4 Apr 2015 23:17:52 -0400 Subject: [PATCH] Complete resource pack API @@ -18,10 +18,10 @@ index 04e52d2..2a14e1a 100644 public PacketPlayInResourcePackStatus() {} diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 79448eb..3837f64 100644 +index 2cde490..dba953f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1026,7 +1026,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1025,7 +1025,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { // CraftBukkit start public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) { @@ -37,7 +37,7 @@ index 79448eb..3837f64 100644 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0f081b5..9da0797 100644 +index ef6e9a6..c018773 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -72,6 +72,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -51,7 +51,7 @@ index 0f081b5..9da0797 100644 public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1522,6 +1526,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1525,6 +1529,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ((WorldServer) getHandle().world).getPlayerChunkMap().updateViewDistance(getHandle(), viewDistance); } @@ -86,5 +86,5 @@ index 0f081b5..9da0797 100644 private final Player.Spigot spigot = new Player.Spigot() { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0078-Re-add-Spigot-s-hopper-check-feature.patch b/Spigot-Server-Patches/0076-Re-add-Spigot-s-hopper-check-feature.patch similarity index 84% rename from Spigot-Server-Patches/0078-Re-add-Spigot-s-hopper-check-feature.patch rename to Spigot-Server-Patches/0076-Re-add-Spigot-s-hopper-check-feature.patch index 420af24d42..9c10a9a3fa 100644 --- a/Spigot-Server-Patches/0078-Re-add-Spigot-s-hopper-check-feature.patch +++ b/Spigot-Server-Patches/0076-Re-add-Spigot-s-hopper-check-feature.patch @@ -1,14 +1,14 @@ -From cae272d18fd6dd6b36b9c1181c9ed71437cbf049 Mon Sep 17 00:00:00 2001 +From 40ac20134bcce4386091db2a60b3a493979ac879 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Sat, 12 Mar 2016 13:37:50 -0600 Subject: [PATCH] Re-add Spigot's hopper-check feature diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b813a9b..9e91991 100644 +index b0bcea0..593256c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -272,4 +272,9 @@ public class PaperWorldConfig { +@@ -266,4 +266,9 @@ public class PaperWorldConfig { private void nonPlayerEntitiesOnScoreboards() { nonPlayerEntitiesOnScoreboards = getBoolean("allow-non-player-entities-on-scoreboards", false); } @@ -19,10 +19,10 @@ index b813a9b..9e91991 100644 + } } diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index b2f0c18..243da36 100644 +index 76e2351..de458c8 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -178,6 +178,12 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -183,6 +183,12 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi this.update(); return true; } @@ -36,5 +36,5 @@ index b2f0c18..243da36 100644 return false; } else { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0079-Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/0077-Chunk-save-queue-improvements.patch similarity index 93% rename from Spigot-Server-Patches/0079-Chunk-save-queue-improvements.patch rename to Spigot-Server-Patches/0077-Chunk-save-queue-improvements.patch index c825184a61..c2544b5cc5 100644 --- a/Spigot-Server-Patches/0079-Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/0077-Chunk-save-queue-improvements.patch @@ -1,4 +1,4 @@ -From 17b1f57e1719cd6af86da1d40a7664c7911f9bb1 Mon Sep 17 00:00:00 2001 +From eb5a4b0fec91f8e10fa250db93b854bc758e781e Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 4 Mar 2016 18:18:37 -0600 Subject: [PATCH] Chunk save queue improvements @@ -26,7 +26,7 @@ Then finally, Sleeping will by default be removed, but due to known issues with But if sleeps are to remain enabled, we at least lower the sleep interval so it doesn't have as much negative impact. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 1b8165c..bde642a 100644 +index 1ea409d..34e0426 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -197,4 +197,10 @@ public class PaperConfig { @@ -41,20 +41,20 @@ index 1b8165c..bde642a 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index eb13bc9..cbbf95f 100644 +index da7d7fe..a5c4e95 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -11,14 +11,17 @@ import java.util.List; - import java.util.Map; +@@ -12,14 +12,17 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; + import javax.annotation.Nullable; +import java.util.concurrent.ConcurrentLinkedQueue; // Paper import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { -+ private ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue(); // Paper - Chunk queue improvements ++ private ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue<>(); // Paper - Chunk queue improvements + private final Object lock = new Object(); // Paper - Chunk queue improvements private static final Logger a = LogManager.getLogger(); private Map b = new ConcurrentHashMap(); @@ -63,7 +63,7 @@ index eb13bc9..cbbf95f 100644 private final File d; private final DataConverterManager e; private boolean f = false; -@@ -32,11 +35,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -33,11 +36,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { public boolean chunkExists(World world, int i, int j) { ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); @@ -77,7 +77,7 @@ index eb13bc9..cbbf95f 100644 // Paper start - Don't create region files when checking that they exist final RegionFile region = RegionFileCache.a(this.d, i, j, false); -@@ -139,28 +142,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -141,28 +144,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } protected void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) { @@ -115,7 +115,7 @@ index eb13bc9..cbbf95f 100644 if (nbttagcompound != null) { try { -@@ -169,10 +176,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -171,10 +178,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { ChunkRegionLoader.a.error("Failed to save chunk", exception); } } @@ -128,7 +128,7 @@ index eb13bc9..cbbf95f 100644 } return flag; -@@ -503,4 +511,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -508,4 +516,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { return entity; } } diff --git a/Spigot-Server-Patches/0080-Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/0078-Chunk-Save-Reattempt.patch similarity index 93% rename from Spigot-Server-Patches/0080-Chunk-Save-Reattempt.patch rename to Spigot-Server-Patches/0078-Chunk-Save-Reattempt.patch index f1827b34e6..1b22428104 100644 --- a/Spigot-Server-Patches/0080-Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/0078-Chunk-Save-Reattempt.patch @@ -1,4 +1,4 @@ -From 5e3ee00d4e1e65831e2356ea1f002592eaca235c Mon Sep 17 00:00:00 2001 +From 0e0ec1d44114445a752f0a8fcee7a5e44fcf20d8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Mar 2013 23:46:10 -0500 Subject: [PATCH] Chunk Save Reattempt @@ -6,10 +6,10 @@ Subject: [PATCH] Chunk Save Reattempt We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index cbbf95f..778f8f5 100644 +index a5c4e95..be0a565 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -@@ -170,11 +170,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { +@@ -172,11 +172,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements if (nbttagcompound != null) { @@ -42,5 +42,5 @@ index 2ca94a4..68dd17d 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0081-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0079-Default-loading-permissions.yml-before-plugins.patch similarity index 96% rename from Spigot-Server-Patches/0081-Default-loading-permissions.yml-before-plugins.patch rename to Spigot-Server-Patches/0079-Default-loading-permissions.yml-before-plugins.patch index fa1951ad31..727682c4f7 100644 --- a/Spigot-Server-Patches/0081-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0079-Default-loading-permissions.yml-before-plugins.patch @@ -1,4 +1,4 @@ -From 8bf415cb5fed2d039ae388e2dd4330e81b5972a5 Mon Sep 17 00:00:00 2001 +From c2eb5b571398d8cabe2e4fb957d5f2f1960ebe95 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 13:17:38 -0400 Subject: [PATCH] Default loading permissions.yml before plugins @@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index bde642a..c1d50ee 100644 +index 34e0426..770866f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -203,4 +203,9 @@ public class PaperConfig { diff --git a/Spigot-Server-Patches/0082-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0080-Allow-Reloading-of-Custom-Permissions.patch similarity index 94% rename from Spigot-Server-Patches/0082-Allow-Reloading-of-Custom-Permissions.patch rename to Spigot-Server-Patches/0080-Allow-Reloading-of-Custom-Permissions.patch index 60ad42f8e0..bc65024490 100644 --- a/Spigot-Server-Patches/0082-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0080-Allow-Reloading-of-Custom-Permissions.patch @@ -1,4 +1,4 @@ -From 72b98822da639bded14883f59a498781b64b9b0a Mon Sep 17 00:00:00 2001 +From 56e2e0cd842f4fa51efdc32e33d90a384c49ef52 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 18 Mar 2016 03:30:17 -0400 Subject: [PATCH] Allow Reloading of Custom Permissions @@ -32,5 +32,5 @@ index 5b91630..20a8ef7 100644 + // Paper end } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0083-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0081-Remove-Metadata-on-reload.patch similarity index 93% rename from Spigot-Server-Patches/0083-Remove-Metadata-on-reload.patch rename to Spigot-Server-Patches/0081-Remove-Metadata-on-reload.patch index 13be8a8787..84cbed3cd8 100644 --- a/Spigot-Server-Patches/0083-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0081-Remove-Metadata-on-reload.patch @@ -1,4 +1,4 @@ -From 96f359acc90ad1aaa25693823ede270720e1536b Mon Sep 17 00:00:00 2001 +From 78032f81e6af76e2a40e2acbbc1de025b4a0bd90 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 13:50:14 -0400 Subject: [PATCH] Remove Metadata on reload @@ -26,5 +26,5 @@ index 20a8ef7..e957ed0 100644 commandMap.clearCommands(); resetRecipes(); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0084-Undead-horse-leashing.patch b/Spigot-Server-Patches/0082-Undead-horse-leashing.patch similarity index 83% rename from Spigot-Server-Patches/0084-Undead-horse-leashing.patch rename to Spigot-Server-Patches/0082-Undead-horse-leashing.patch index e3f6fff0a4..44baa27437 100644 --- a/Spigot-Server-Patches/0084-Undead-horse-leashing.patch +++ b/Spigot-Server-Patches/0082-Undead-horse-leashing.patch @@ -1,4 +1,4 @@ -From 5cd56ddfbdeb8580836f02e4d2772b4178b2808e Mon Sep 17 00:00:00 2001 +From f9bc08b80ea7df56b143ea9bc8857cc4b3343b22 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 14:19:19 -0400 Subject: [PATCH] Undead horse leashing @@ -6,10 +6,10 @@ Subject: [PATCH] Undead horse leashing default false to match vanilla, but option to allow undead horse types to be leashed. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9e91991..03dd637 100644 +index 593256c..8875559 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -277,4 +277,9 @@ public class PaperWorldConfig { +@@ -271,4 +271,9 @@ public class PaperWorldConfig { private void useHopperCheck() { useHopperCheck = getBoolean("use-hopper-check", false); } @@ -20,10 +20,10 @@ index 9e91991..03dd637 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java -index a81bf3b..8367458 100644 +index 25d788f..dfe1fa5 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java -@@ -167,6 +167,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu +@@ -170,6 +170,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu } public boolean a(EntityHuman entityhuman) { @@ -32,5 +32,5 @@ index a81bf3b..8367458 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0085-Fix-Furnace-cook-time-bug.patch b/Spigot-Server-Patches/0083-Fix-Furnace-cook-time-bug.patch similarity index 86% rename from Spigot-Server-Patches/0085-Fix-Furnace-cook-time-bug.patch rename to Spigot-Server-Patches/0083-Fix-Furnace-cook-time-bug.patch index 0dfaf17482..4b64b166e1 100644 --- a/Spigot-Server-Patches/0085-Fix-Furnace-cook-time-bug.patch +++ b/Spigot-Server-Patches/0083-Fix-Furnace-cook-time-bug.patch @@ -1,4 +1,4 @@ -From c133d093e615cd8f520eede3730556d0f5b9de2d Mon Sep 17 00:00:00 2001 +From 583a58098469f47ebaedf45582208c066cb759b7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 14:24:53 -0400 Subject: [PATCH] Fix Furnace cook time bug @@ -9,10 +9,10 @@ cook in the expected amount of time as the cook time was not decremented correct This patch ensures that furnaces cook to the correct wall time expectation. diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java -index 1b17ca6..0a20cec 100644 +index 94c69be..b908110 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java -@@ -163,7 +163,7 @@ public class TileEntityFurnace extends TileEntityContainer implements ITickable, +@@ -168,7 +168,7 @@ public class TileEntityFurnace extends TileEntityContainer implements ITickable, if (this.isBurning() && this.canBurn()) { this.cookTime += elapsedTicks; if (this.cookTime >= this.cookTimeTotal) { @@ -22,5 +22,5 @@ index 1b17ca6..0a20cec 100644 this.burn(); flag1 = true; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0086-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0084-Handle-Item-Meta-Inconsistencies.patch similarity index 99% rename from Spigot-Server-Patches/0086-Handle-Item-Meta-Inconsistencies.patch rename to Spigot-Server-Patches/0084-Handle-Item-Meta-Inconsistencies.patch index 8f58cfa5a9..a035744a46 100644 --- a/Spigot-Server-Patches/0086-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0084-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From 34c1a61289abe53d331216702a4539b603cd087f Mon Sep 17 00:00:00 2001 +From efe987511bfe705324b10de5ff214193c4e5a7e5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -293,5 +293,5 @@ index 22cc267..94f2ba0 100644 private final Spigot spigot = new Spigot() { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0087-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/Spigot-Server-Patches/0085-Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 76% rename from Spigot-Server-Patches/0087-Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to Spigot-Server-Patches/0085-Configurable-Non-Player-Arrow-Despawn-Rate.patch index e264d12106..1272fda670 100644 --- a/Spigot-Server-Patches/0087-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/Spigot-Server-Patches/0085-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -1,4 +1,4 @@ -From 28d8d3671fcdb920d2db55fb577165fa4744485b Mon Sep 17 00:00:00 2001 +From 16c55fb0b6c3638b99225963274e14d316f6e411 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 15:12:22 -0400 Subject: [PATCH] Configurable Non Player Arrow Despawn Rate @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate Can set a much shorter despawn rate for arrows that players can not pick up. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 03dd637..26c1b72 100644 +index 8875559..50e891f 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -282,4 +282,13 @@ public class PaperWorldConfig { +@@ -276,4 +276,13 @@ public class PaperWorldConfig { private void allowLeashingUndeadHorse() { allowLeashingUndeadHorse = getBoolean("allow-leashing-undead-horse", false); } @@ -24,18 +24,18 @@ index 03dd637..26c1b72 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 7a4f56d..a073e6c 100644 +index 29b6f16..c2ee9ce 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java -@@ -144,7 +144,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { +@@ -145,7 +145,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { - if (block == this.au && i == this.av) { - ++this.aw; -- if (this.aw >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter -+ if (this.aw >= (fromPlayer != PickupStatus.DISALLOWED ? world.spigotConfig.arrowDespawnRate : world.paperConfig.nonPlayerArrowDespawnRate)) { // Spigot - First int after shooter + if (block == this.av && i == this.aw) { + ++this.ax; +- if (this.ax >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter ++ if (this.ax >= (fromPlayer != PickupStatus.DISALLOWED ? world.spigotConfig.arrowDespawnRate : world.paperConfig.nonPlayerArrowDespawnRate)) { // Spigot - First int after shooter // Paper this.die(); } } else { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0089-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0086-Add-World-Util-Methods.patch similarity index 91% rename from Spigot-Server-Patches/0089-Add-World-Util-Methods.patch rename to Spigot-Server-Patches/0086-Add-World-Util-Methods.patch index 7b7a7c89db..528f1785a3 100644 --- a/Spigot-Server-Patches/0089-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0086-Add-World-Util-Methods.patch @@ -1,4 +1,4 @@ -From c419a39f39a2a3da3d3577732389060d61da3e2d Mon Sep 17 00:00:00 2001 +From a9bec1c0266a2ed770f99dd1288b88a71b997aba Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 20:16:03 -0400 Subject: [PATCH] Add World Util Methods @@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f811cd2..c6f15b8 100644 +index 21ba235..3bdf072 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -153,6 +153,12 @@ public abstract class World implements IBlockAccess { @@ -20,9 +20,9 @@ index f811cd2..c6f15b8 100644 + // Paper end + public Chunk getChunkIfLoaded(int x, int z) { - return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z); + return ((ChunkProviderServer) this.chunkProvider).getLoadedChunkAt(x, z); } -@@ -635,6 +641,41 @@ public abstract class World implements IBlockAccess { +@@ -640,6 +646,41 @@ public abstract class World implements IBlockAccess { } } @@ -64,7 +64,7 @@ index f811cd2..c6f15b8 100644 public int getLightLevel(BlockPosition blockposition) { return this.c(blockposition, true); } -@@ -749,6 +790,27 @@ public abstract class World implements IBlockAccess { +@@ -755,6 +796,27 @@ public abstract class World implements IBlockAccess { return this.worldProvider.n()[this.getLightLevel(blockposition)]; } @@ -93,5 +93,5 @@ index f811cd2..c6f15b8 100644 // CraftBukkit start - tree generation if (captureTreeGeneration) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0090-Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/0087-Optimized-Light-Level-Comparisons.patch similarity index 93% rename from Spigot-Server-Patches/0090-Optimized-Light-Level-Comparisons.patch rename to Spigot-Server-Patches/0087-Optimized-Light-Level-Comparisons.patch index 393c2b6589..2d4e93930b 100644 --- a/Spigot-Server-Patches/0090-Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/0087-Optimized-Light-Level-Comparisons.patch @@ -1,4 +1,4 @@ -From 04e183d8f5d331f32c94cc1ac26403ce75021c40 Mon Sep 17 00:00:00 2001 +From 351015662bd35f4fe257743ee2c65ebf0709b70a Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 21:22:56 -0400 Subject: [PATCH] Optimized Light Level Comparisons @@ -8,10 +8,10 @@ Use an optimized method to test if a block position meets a desired light level. This method benefits from returning as soon as the desired light level matches. diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java -index 5f8bffe..ab8d18e 100644 +index 7d44039..4ede2cf 100644 --- a/src/main/java/net/minecraft/server/BlockCrops.java +++ b/src/main/java/net/minecraft/server/BlockCrops.java -@@ -48,7 +48,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement +@@ -49,7 +49,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { super.b(world, blockposition, iblockdata, random); @@ -21,10 +21,10 @@ index 5f8bffe..ab8d18e 100644 if (i < this.g()) { diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java -index fe55848..8fc736d 100644 +index 11d9d3f..21e722d 100644 --- a/src/main/java/net/minecraft/server/BlockGrass.java +++ b/src/main/java/net/minecraft/server/BlockGrass.java -@@ -29,7 +29,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { +@@ -30,7 +30,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { if (!world.isClientSide) { @@ -34,7 +34,7 @@ index fe55848..8fc736d 100644 // CraftBukkit start // world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData()); org.bukkit.World bworld = world.getWorld(); -@@ -44,18 +45,25 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { +@@ -45,18 +46,25 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { } // CraftBukkit end } else { @@ -78,10 +78,10 @@ index 76b13a3..b7776fb 100644 world.captureTreeGeneration = true; // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java -index 73e68d8..439a77e 100644 +index d378ea4..1185100 100644 --- a/src/main/java/net/minecraft/server/BlockStem.java +++ b/src/main/java/net/minecraft/server/BlockStem.java -@@ -47,7 +47,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement { +@@ -48,7 +48,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement { public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { super.b(world, blockposition, iblockdata, random); @@ -91,7 +91,7 @@ index 73e68d8..439a77e 100644 if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java -index f477036..23826fe 100644 +index 2b79c28..ec00edf 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -118,17 +118,17 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { @@ -118,10 +118,10 @@ index f477036..23826fe 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 28fed1f..e3cce4c 100644 +index 774d773..0aeda93 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -194,7 +194,7 @@ public class EntityZombie extends EntityMonster { +@@ -195,7 +195,7 @@ public class EntityZombie extends EntityMonster { int j1 = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1); @@ -131,5 +131,5 @@ index 28fed1f..e3cce4c 100644 if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D, EntityHuman.affectsSpawningFilter()) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) { // Paper - affectsSpawning filter this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0088-Optimize-BlockStateList-BlockData.patch b/Spigot-Server-Patches/0088-Optimize-BlockStateList-BlockData.patch deleted file mode 100644 index 12ec3ad8eb..0000000000 --- a/Spigot-Server-Patches/0088-Optimize-BlockStateList-BlockData.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 814a896e78a4fe3b368da81bcc802d4d5a8c3475 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 18 Mar 2016 19:15:44 -0400 -Subject: [PATCH] Optimize BlockStateList/BlockData - -Mojang included some sanity checks on arguments passed to the BlockData. -This code results in the Hash look up occuring twice per call, one to test if it exists -and another to retrieve the result. - -This code should ideally never be hit, unless mojang released a bad build. We can discover bugs with this as furthur code that never expects a null -would then NPE, so it would not result in hidden issues. - -This is super hot code, so removing those checks should give decent gains. - -diff --git a/src/main/java/net/minecraft/server/BlockStateList.java b/src/main/java/net/minecraft/server/BlockStateList.java -index 19ea22f..43ecf3b 100644 ---- a/src/main/java/net/minecraft/server/BlockStateList.java -+++ b/src/main/java/net/minecraft/server/BlockStateList.java -@@ -151,21 +151,11 @@ public class BlockStateList { - } - - public > T get(IBlockState iblockstate) { -- if (!this.b.containsKey(iblockstate)) { -- throw new IllegalArgumentException("Cannot get property " + iblockstate + " as it does not exist in " + this.a.t()); -- } else { -- return iblockstate.b().cast(this.b.get(iblockstate)); // Paper - decompile fix -- } -+ return iblockstate.b().cast(this.b.get(iblockstate)); // Paper - } - - public , V extends T> IBlockData set(IBlockState iblockstate, V v0) { -- if (!this.b.containsKey(iblockstate)) { -- throw new IllegalArgumentException("Cannot set property " + iblockstate + " as it does not exist in " + this.a.t()); -- } else if (!iblockstate.c().contains(v0)) { -- throw new IllegalArgumentException("Cannot set property " + iblockstate + " to " + v0 + " on block " + Block.REGISTRY.b(this.a) + ", it is not an allowed value"); -- } else { -- return (IBlockData) (this.b.get(iblockstate) == v0 ? this : (IBlockData) this.c.get(iblockstate, v0)); -- } -+ return this.b.get(iblockstate) == v0 ? this : this.c.get(iblockstate, v0); // Paper - } - - public ImmutableMap, Comparable> s() { --- -2.8.0 - diff --git a/Spigot-Server-Patches/0091-Pass-world-to-Village-creation.patch b/Spigot-Server-Patches/0088-Pass-world-to-Village-creation.patch similarity index 93% rename from Spigot-Server-Patches/0091-Pass-world-to-Village-creation.patch rename to Spigot-Server-Patches/0088-Pass-world-to-Village-creation.patch index d1ac145670..6b23bec08b 100644 --- a/Spigot-Server-Patches/0091-Pass-world-to-Village-creation.patch +++ b/Spigot-Server-Patches/0088-Pass-world-to-Village-creation.patch @@ -1,4 +1,4 @@ -From dc0d3dd73071c17da61f90d233b070cca91d1896 Mon Sep 17 00:00:00 2001 +From 4d271a1256717859ffd1692a3bbc5481644b0f8e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 19 Mar 2016 15:16:54 -0400 Subject: [PATCH] Pass world to Village creation @@ -6,7 +6,7 @@ Subject: [PATCH] Pass world to Village creation fixes NPE bug #95 diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java -index 107f582..140b14b 100644 +index a285639..22ee682 100644 --- a/src/main/java/net/minecraft/server/PersistentVillage.java +++ b/src/main/java/net/minecraft/server/PersistentVillage.java @@ -236,7 +236,7 @@ public class PersistentVillage extends PersistentBase { @@ -19,7 +19,7 @@ index 107f582..140b14b 100644 village.a(nbttagcompound1); this.villages.add(village); diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java -index 932eeb7..06a06ea 100644 +index e674cf9..2624abf 100644 --- a/src/main/java/net/minecraft/server/Village.java +++ b/src/main/java/net/minecraft/server/Village.java @@ -22,7 +22,7 @@ public class Village { @@ -41,5 +41,5 @@ index 932eeb7..06a06ea 100644 if (gameprofile != null) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0092-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0089-Custom-replacement-for-eaten-items.patch similarity index 81% rename from Spigot-Server-Patches/0092-Custom-replacement-for-eaten-items.patch rename to Spigot-Server-Patches/0089-Custom-replacement-for-eaten-items.patch index d332551bed..41ecdf7000 100644 --- a/Spigot-Server-Patches/0092-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0089-Custom-replacement-for-eaten-items.patch @@ -1,15 +1,15 @@ -From 4511d316f0f42453229c665f35314a0f6f326844 Mon Sep 17 00:00:00 2001 +From 7ec96efff6416cfbc3799decabe316e6594ceaec Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 21 Jun 2015 15:07:20 -0400 Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d0e0285..f6d615d 100644 +index b151c13..d11e01b 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2223,12 +2223,25 @@ public abstract class EntityLiving extends Entity { - ItemStack itemstack = (craftItem.equals(event.getItem())) ? this.bm.a(this.world, this) : CraftItemStack.asNMSCopy(event.getItem()).a(world, this); +@@ -2232,12 +2232,25 @@ public abstract class EntityLiving extends Entity { + ItemStack itemstack = (craftItem.equals(event.getItem())) ? this.bn.a(this.world, this) : CraftItemStack.asNMSCopy(event.getItem()).a(world, this); // CraftBukkit end + // Paper start - save the default replacement item and change it if necessary @@ -23,8 +23,8 @@ index d0e0285..f6d615d 100644 itemstack = null; } - this.a(this.ct(), itemstack); - this.cz(); + this.a(this.cu(), itemstack); + this.cA(); + + // 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)) { @@ -35,5 +35,5 @@ index d0e0285..f6d615d 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0093-Set-health-before-death-event.patch b/Spigot-Server-Patches/0090-Set-health-before-death-event.patch similarity index 94% rename from Spigot-Server-Patches/0093-Set-health-before-death-event.patch rename to Spigot-Server-Patches/0090-Set-health-before-death-event.patch index 776cab06b8..185dd0180f 100644 --- a/Spigot-Server-Patches/0093-Set-health-before-death-event.patch +++ b/Spigot-Server-Patches/0090-Set-health-before-death-event.patch @@ -1,11 +1,11 @@ -From 286d75e4bf74686f7cdf38e80148ca3c8065142c Mon Sep 17 00:00:00 2001 +From 89b9ff23e310a5075ffd1bd9d7b3d9ac4a1ad396 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 19 Jul 2015 16:51:38 -0400 Subject: [PATCH] Set health before death event diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index c1d50ee..a643acc 100644 +index 770866f..de1717a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -208,4 +208,9 @@ public class PaperConfig { @@ -19,7 +19,7 @@ index c1d50ee..a643acc 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 0502593..3a0d338 100644 +index 16da1c9..b1e63f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -98,11 +98,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/0094-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0091-handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 84% rename from Spigot-Server-Patches/0094-handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to Spigot-Server-Patches/0091-handle-NaN-health-absorb-values-and-repair-bad-data.patch index a9f86fd51d..b5489ba6d6 100644 --- a/Spigot-Server-Patches/0094-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0091-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -1,14 +1,14 @@ -From 9b89e5288e36a7a809bc9e9b40d03d86064145af Mon Sep 17 00:00:00 2001 +From 80095f37e49793ab660d09206d3bf6155a6115c5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 27 Sep 2015 01:18:02 -0400 Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f6d615d..41b63ce 100644 +index d11e01b..df4d8d8 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -464,7 +464,13 @@ public abstract class EntityLiving extends Entity { +@@ -465,7 +465,13 @@ public abstract class EntityLiving extends Entity { } public void a(NBTTagCompound nbttagcompound) { @@ -23,7 +23,7 @@ index f6d615d..41b63ce 100644 if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) { GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10)); } -@@ -749,6 +755,10 @@ public abstract class EntityLiving extends Entity { +@@ -752,6 +758,10 @@ public abstract class EntityLiving extends Entity { } public void setHealth(float f) { @@ -34,7 +34,7 @@ index f6d615d..41b63ce 100644 // CraftBukkit start - Handle scaled health if (this instanceof EntityPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity(); -@@ -2093,7 +2103,7 @@ public abstract class EntityLiving extends Entity { +@@ -2102,7 +2112,7 @@ public abstract class EntityLiving extends Entity { } public void setAbsorptionHearts(float f) { @@ -44,10 +44,10 @@ index f6d615d..41b63ce 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9da0797..eb88228 100644 +index c018773..2b555c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1372,6 +1372,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1375,6 +1375,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { @@ -56,5 +56,5 @@ index 9da0797..eb88228 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0095-Catch-Async-PlayerChunkMap-operations.patch b/Spigot-Server-Patches/0092-Catch-Async-PlayerChunkMap-operations.patch similarity index 84% rename from Spigot-Server-Patches/0095-Catch-Async-PlayerChunkMap-operations.patch rename to Spigot-Server-Patches/0092-Catch-Async-PlayerChunkMap-operations.patch index 6d29768e02..3c98b6b5c4 100644 --- a/Spigot-Server-Patches/0095-Catch-Async-PlayerChunkMap-operations.patch +++ b/Spigot-Server-Patches/0092-Catch-Async-PlayerChunkMap-operations.patch @@ -1,14 +1,14 @@ -From 5771cd988dda8603f0a922e5c61648c6ff2f6b6e Mon Sep 17 00:00:00 2001 +From 72728a688b1a601363b2d8d47a5c6d9ea29edaf5 Mon Sep 17 00:00:00 2001 From: Daniel Ennis Date: Sun, 20 Mar 2016 15:22:42 -0400 Subject: [PATCH] Catch Async PlayerChunkMap operations diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index d7cbe31..17d0c81 100644 +index 77e9187..6c95e50 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -418,10 +418,12 @@ public class PlayerChunkMap { +@@ -422,10 +422,12 @@ public class PlayerChunkMap { } public void a(PlayerChunk playerchunk) { @@ -22,5 +22,5 @@ index d7cbe31..17d0c81 100644 long i = d(chunkcoordintpair.x, chunkcoordintpair.z); -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0096-Support-offline-mode-in-whitelist-command-as-well.patch b/Spigot-Server-Patches/0093-Support-offline-mode-in-whitelist-command-as-well.patch similarity index 94% rename from Spigot-Server-Patches/0096-Support-offline-mode-in-whitelist-command-as-well.patch rename to Spigot-Server-Patches/0093-Support-offline-mode-in-whitelist-command-as-well.patch index 3ed0dfecc1..dc4183db79 100644 --- a/Spigot-Server-Patches/0096-Support-offline-mode-in-whitelist-command-as-well.patch +++ b/Spigot-Server-Patches/0093-Support-offline-mode-in-whitelist-command-as-well.patch @@ -1,14 +1,14 @@ -From 56776fc29d5d9123c509a475dd48816f146a12fb Mon Sep 17 00:00:00 2001 +From 99d32a59893bfefda1c1463698b99ad4cf0f9b76 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 21 Mar 2016 00:19:18 -0500 Subject: [PATCH] Support offline mode in whitelist command as well diff --git a/src/main/java/net/minecraft/server/CommandWhitelist.java b/src/main/java/net/minecraft/server/CommandWhitelist.java -index b52bf74..8da137e 100644 +index 95ba9c3..ba1cc1b 100644 --- a/src/main/java/net/minecraft/server/CommandWhitelist.java +++ b/src/main/java/net/minecraft/server/CommandWhitelist.java -@@ -43,24 +43,35 @@ public class CommandWhitelist extends CommandAbstract { +@@ -44,24 +44,35 @@ public class CommandWhitelist extends CommandAbstract { throw new ExceptionUsage("commands.whitelist.add.usage", new Object[0]); } @@ -44,7 +44,7 @@ index b52bf74..8da137e 100644 a(icommandlistener, (ICommand) this, "commands.whitelist.remove.success", new Object[] { astring[1]}); } else if (astring[0].equals("reload")) { minecraftserver.getPlayerList().reloadWhitelist(); -@@ -88,4 +99,43 @@ public class CommandWhitelist extends CommandAbstract { +@@ -89,4 +100,43 @@ public class CommandWhitelist extends CommandAbstract { return Collections.emptyList(); } } @@ -89,5 +89,5 @@ index b52bf74..8da137e 100644 + // Paper end } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0098-Fix-SkullCache-case-bug.patch b/Spigot-Server-Patches/0094-Fix-SkullCache-case-bug.patch similarity index 84% rename from Spigot-Server-Patches/0098-Fix-SkullCache-case-bug.patch rename to Spigot-Server-Patches/0094-Fix-SkullCache-case-bug.patch index 53efd72ebf..6e31dba965 100644 --- a/Spigot-Server-Patches/0098-Fix-SkullCache-case-bug.patch +++ b/Spigot-Server-Patches/0094-Fix-SkullCache-case-bug.patch @@ -1,14 +1,14 @@ -From fa8ed798c503fad1bf1923b8aeae5600b0f5ffb4 Mon Sep 17 00:00:00 2001 +From 4ab03fbd5648e5d5d8ffd5711a88ed34e80d3ad6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jan 2016 21:48:24 -0500 Subject: [PATCH] Fix SkullCache case bug diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index 7eecc6c..3c20ef3 100644 +index 8aafd36..49ab25b 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java -@@ -186,7 +186,7 @@ public class TileEntitySkull extends TileEntity implements ITickable { +@@ -191,7 +191,7 @@ public class TileEntitySkull extends TileEntity implements ITickable { } else if (MinecraftServer.getServer() == null) { callback.apply(gameprofile); } else { @@ -18,5 +18,5 @@ index 7eecc6c..3c20ef3 100644 callback.apply(profile); } else { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0099-Waving-banner-workaround.patch b/Spigot-Server-Patches/0095-Waving-banner-workaround.patch similarity index 94% rename from Spigot-Server-Patches/0099-Waving-banner-workaround.patch rename to Spigot-Server-Patches/0095-Waving-banner-workaround.patch index 199e1a6373..cff7e11f46 100644 --- a/Spigot-Server-Patches/0099-Waving-banner-workaround.patch +++ b/Spigot-Server-Patches/0095-Waving-banner-workaround.patch @@ -1,4 +1,4 @@ -From 5ffcb31f77910f978176bfe04aebadca9bce086b Mon Sep 17 00:00:00 2001 +From 3bc455877e340f5305c1ef2a7280a3066f07a09f Mon Sep 17 00:00:00 2001 From: Gabscap Date: Sat, 19 Mar 2016 22:25:11 +0100 Subject: [PATCH] Waving banner workaround @@ -33,5 +33,5 @@ index c5c3f40..3ed2356 100644 public void a(PacketDataSerializer packetdataserializer) throws IOException { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0100-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0096-Use-a-Shared-Random-for-Entities.patch similarity index 85% rename from Spigot-Server-Patches/0100-Use-a-Shared-Random-for-Entities.patch rename to Spigot-Server-Patches/0096-Use-a-Shared-Random-for-Entities.patch index a1d736f058..8bdd34f2de 100644 --- a/Spigot-Server-Patches/0100-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0096-Use-a-Shared-Random-for-Entities.patch @@ -1,4 +1,4 @@ -From 88fc0caa74e98940c4eba838d38edc280fa70c3b Mon Sep 17 00:00:00 2001 +From b9b51e7c1c6d31352a01ba0444623f88cc404f31 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Mar 2016 00:33:47 -0400 Subject: [PATCH] Use a Shared Random for Entities @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 26f83a4..8484557 100644 +index 035dd20..06840ec 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -44,6 +44,7 @@ public abstract class Entity implements ICommandListener { @@ -17,15 +17,15 @@ index 26f83a4..8484557 100644 static boolean isLevelAtLeast(NBTTagCompound tag, int level) { return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } -@@ -159,7 +160,7 @@ public abstract class Entity implements ICommandListener { +@@ -160,7 +161,7 @@ public abstract class Entity implements ICommandListener { this.width = 0.6F; this.length = 1.8F; - this.av = 1; + this.aw = 1; - this.random = new Random(); + this.random = SHARED_RANDOM; // Paper this.maxFireTicks = 1; this.justCreated = true; this.uniqueID = MathHelper.a(this.random); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0101-Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/0097-Don-t-teleport-dead-entities.patch similarity index 83% rename from Spigot-Server-Patches/0101-Don-t-teleport-dead-entities.patch rename to Spigot-Server-Patches/0097-Don-t-teleport-dead-entities.patch index e2c1d95417..16c0974e08 100644 --- a/Spigot-Server-Patches/0101-Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/0097-Don-t-teleport-dead-entities.patch @@ -1,4 +1,4 @@ -From 5dcb2f283bcc67ce8651bebcdda425b7f0ca54af Mon Sep 17 00:00:00 2001 +From 64f7efffc2eef965370eb5fdcc15a00fb0847fed Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Mar 2016 00:55:23 -0400 Subject: [PATCH] Don't teleport dead entities @@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic. Potentially an old CB change that's no longer needed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8484557..c0b0a26 100644 +index 06840ec..b03e9ee 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2095,7 +2095,7 @@ public abstract class Entity implements ICommandListener { +@@ -2103,7 +2103,7 @@ public abstract class Entity implements ICommandListener { } public Entity teleportTo(Location exit, boolean portal) { @@ -20,5 +20,5 @@ index 8484557..c0b0a26 100644 WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle(); int i = worldserver1.dimension; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0097-Optimize-Chunk-Unload-Queue.patch b/Spigot-Server-Patches/0097-Optimize-Chunk-Unload-Queue.patch deleted file mode 100644 index a6464cc892..0000000000 --- a/Spigot-Server-Patches/0097-Optimize-Chunk-Unload-Queue.patch +++ /dev/null @@ -1,364 +0,0 @@ -From 98038d95d620e9e2b39bc0ee44ee99062e4cfc89 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 18 Mar 2016 17:57:25 -0400 -Subject: [PATCH] Optimize Chunk Unload Queue - -Removing chunks from the unload queue when performing chunk lookups is a costly activity. - -It drastically slows down server performance as many methods call getChunkAt, resulting in a bandaid -to skip removing chunks from the unload queue. - -This patch optimizes the unload queue to instead use a boolean on the Chunk object itself to mark -if the chunk is active, and then insert into a LinkedList queue. - -The benefits here is that all chunk unload queue actions are now O(1) constant time. - -A LinkedList will never need to resize, and can be removed from in constant time when -used in a queue like method. - -We mark the chunk as active in many places that notify it is still being used, so that -when the chunk unload queue reaches that chunk, and sees the chunk became active again, -it will skip it and move to next. - -Also optimize EAR to use these methods. - -diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 8b11266..ac35cf4 100644 ---- a/src/main/java/net/minecraft/server/Chunk.java -+++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -53,6 +53,8 @@ public class Chunk { - // Keep this synced with entitySlices.add() and entitySlices.remove() - private final int[] itemCounts = new int[16]; - private final int[] inventoryEntityCounts = new int[16]; -+ public boolean isChunkActive = true; -+ public boolean isInUnloadQueue = false; - // Paper end - - // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking -diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 969ae9d..4d0653c 100644 ---- a/src/main/java/net/minecraft/server/ChunkProviderServer.java -+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -21,7 +21,7 @@ import org.bukkit.event.world.ChunkUnloadEvent; - public class ChunkProviderServer implements IChunkProvider { - - private static final Logger a = LogManager.getLogger(); -- public final LongHashSet unloadQueue = new LongHashSet(); // CraftBukkit - LongHashSet -+ public final ChunkUnloadQueue unloadQueue = new ChunkUnloadQueue(); // CraftBukkit - LongHashSet // Paper -> ChunkUnloadQueue - public final ChunkGenerator chunkGenerator; // CraftBukkit - public - private final IChunkLoader chunkLoader; - public LongObjectHashMap chunks = new LongObjectHashMap(); // CraftBukkit -@@ -77,14 +77,24 @@ public class ChunkProviderServer implements IChunkProvider { - return (chunk == null) ? getChunkAt(x, z) : chunk; - } - -- public Chunk getChunkIfLoaded(int x, int z) { -- return chunks.get(LongHash.toLong(x, z)); -+ // Paper start -+ public Chunk getLoadedChunkAtWithoutMarkingActive(int i, int j) { -+ return chunks.get(LongHash.toLong(i, j)); - } - -+ // getChunkIfLoaded -> getChunkIfActive -+ // this is only used by CraftBukkit now, and plugins shouldnt mark things active -+ public Chunk getChunkIfActive(int x, int z) { -+ Chunk chunk = chunks.get(LongHash.toLong(x, z)); -+ return (chunk != null && chunk.isChunkActive) ? chunk : null; -+ } -+ // Paper end -+ - public Chunk getLoadedChunkAt(int i, int j) { - Chunk chunk = chunks.get(LongHash.toLong(i, j)); // CraftBukkit - -- this.unloadQueue.remove(i, j); // CraftBukkit -+ //this.unloadQueue.remove(i, j); // CraftBukkit // Paper -+ markChunkActive(chunk); // Paper - return chunk; - } - -@@ -112,6 +122,7 @@ public class ChunkProviderServer implements IChunkProvider { - // CraftBukkit end - } - -+ markChunkActive(chunk); // Paper - return chunk; - } - -@@ -124,7 +135,8 @@ public class ChunkProviderServer implements IChunkProvider { - } - - public Chunk getChunkAt(int i, int j, Runnable runnable, boolean generate) { -- unloadQueue.remove(i, j); -+ //unloadQueue.remove(i, j); // Paper -+ - Chunk chunk = chunks.get(LongHash.toLong(i, j)); - ChunkRegionLoader loader = null; - -@@ -148,12 +160,13 @@ public class ChunkProviderServer implements IChunkProvider { - if (runnable != null) { - runnable.run(); - } -+ markChunkActive(chunk); // Paper - - return chunk; - } - - public Chunk originalGetChunkAt(int i, int j) { -- this.unloadQueue.remove(i, j); -+ //this.unloadQueue.remove(i, j); // Paper - Chunk chunk = this.chunks.get(LongHash.toLong(i, j)); - boolean newChunk = false; - // CraftBukkit end -@@ -199,7 +212,7 @@ public class ChunkProviderServer implements IChunkProvider { - continue; - } - -- Chunk neighbor = this.getChunkIfLoaded(chunk.locX + x, chunk.locZ + z); -+ Chunk neighbor = this.getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper - if (neighbor != null) { - neighbor.setNeighborLoaded(-x, -z); - chunk.setNeighborLoaded(x, z); -@@ -210,6 +223,7 @@ public class ChunkProviderServer implements IChunkProvider { - chunk.loadNearby(this, this.chunkGenerator); - world.timings.syncChunkLoadTimer.stopTiming(); // Spigot - } -+ markChunkActive(chunk); // Paper - - return chunk; - } -@@ -298,10 +312,17 @@ public class ChunkProviderServer implements IChunkProvider { - if (!this.world.savingDisabled) { - // CraftBukkit start - Server server = this.world.getServer(); -- for (int i = 0; i < 100 && !this.unloadQueue.isEmpty(); ++i) { -- long chunkcoordinates = this.unloadQueue.popFirst(); -- Chunk chunk = this.chunks.get(chunkcoordinates); -- if (chunk == null) continue; -+ // Paper start -+ final Iterator iterator = this.unloadQueue.iterator(); -+ for (int i = 0; i < 100 && iterator.hasNext(); ++i) { -+ Chunk chunk = iterator.next(); -+ iterator.remove(); -+ long chunkcoordinates = LongHash.toLong(chunk.locX, chunk.locZ); -+ chunk.isInUnloadQueue = false; -+ if (chunk.isChunkActive) { -+ continue; -+ } -+ // Paper end - if (chunk.hasLightUpdates()) continue; // Paper - Don't unload chunks with pending light updates. - - ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk); -@@ -324,13 +345,18 @@ public class ChunkProviderServer implements IChunkProvider { - continue; - } - -- Chunk neighbor = this.getChunkIfLoaded(chunk.locX + x, chunk.locZ + z); -+ Chunk neighbor = this.getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper - if (neighbor != null) { - neighbor.setNeighborUnloaded(-x, -z); - chunk.setNeighborUnloaded(x, z); - } - } - } -+ // Paper start -+ } else { -+ // Unload event is cancelled, make sure this chunk is marked active -+ markChunkActive(chunk); -+ // Paper end - } - } - // CraftBukkit end -@@ -366,4 +392,69 @@ public class ChunkProviderServer implements IChunkProvider { - public boolean e(int i, int j) { - return this.chunks.containsKey(LongHash.toLong(i, j)); // CraftBukkit - } -+ -+ // Paper start -+ public static void markChunkActive(Chunk chunk) { -+ if (chunk != null) { -+ chunk.isChunkActive = true; -+ } -+ } -+ public class ChunkUnloadQueue extends LongHashSet { // Provide compat with NMS plugins -+ private java.util.LinkedList unloadQueue = new java.util.LinkedList(); -+ -+ @Override -+ public boolean isEmpty() { -+ return unloadQueue.isEmpty(); -+ } -+ -+ @Override -+ public boolean contains(long value) { -+ throw new UnsupportedOperationException("contains on unload queue"); -+ } -+ -+ @Override -+ public boolean add(long value) { -+ throw new UnsupportedOperationException("add on unload queue"); -+ } -+ -+ @Override -+ public boolean remove(long value) { -+ throw new UnsupportedOperationException("remove on unload queue"); -+ } -+ -+ @Override -+ public int size() { -+ return unloadQueue.size(); -+ } -+ -+ @Override -+ public Iterator iterator() { -+ return unloadQueue.iterator(); -+ } -+ -+ @Override -+ public boolean contains(int x, int z) { -+ final Chunk chunk = chunks.get(LongHash.toLong(x, z)); -+ return (chunk != null && chunk.isInUnloadQueue); -+ } -+ -+ public void remove(int x, int z) { -+ final Chunk chunk = chunks.get(LongHash.toLong(x, z)); -+ if (chunk != null) { -+ chunk.isChunkActive = true; -+ } -+ } -+ public boolean add(int x, int z) { -+ final Chunk chunk = chunks.get(LongHash.toLong(x, z)); -+ if (chunk != null) { -+ chunk.isChunkActive = false; -+ if (!chunk.isInUnloadQueue) { -+ chunk.isInUnloadQueue = true; -+ return unloadQueue.add(chunk); -+ } -+ } -+ return false; -+ } -+ } -+ // Paper end - } -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index e15cc1a..dc7c17c 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -28,7 +28,7 @@ public final class SpawnerCreature { - Long coord = it.next(); - int x = LongHash.msw( coord ); - int z = LongHash.lsw( coord ); -- if ( !((ChunkProviderServer)server.chunkProvider).unloadQueue.contains( coord ) && server.isChunkLoaded( x, z, true ) ) -+ if ( server.isChunkLoaded( x, z, true ) ) // Paper - { - i += server.getChunkAt( x, z ).entityCount.get( oClass ); - } -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c6f15b8..b223847 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -160,9 +160,15 @@ public abstract class World implements IBlockAccess { - // Paper end - - public Chunk getChunkIfLoaded(int x, int z) { -- return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z); -+ return ((ChunkProviderServer) this.chunkProvider).getLoadedChunkAtWithoutMarkingActive(x, z); // Paper - This is added by CB, and will not mark as active. Simply an alias - } - -+ // Paper start -+ public Chunk getChunkIfActive(int x, int z) { -+ return ((ChunkProviderServer) this.chunkProvider).getChunkIfActive(x, z); -+ } -+ // Paper end -+ - protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, 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 -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index dfa7e73..922ebaf 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -210,7 +210,7 @@ public class CraftWorld implements World { - - private boolean unloadChunk0(int x, int z, boolean save, boolean safe) { - // Paper start - Don't create a chunk just to unload it -- net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkIfLoaded(x, z); -+ net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkIfActive(x, z); // Paper - if (chunk == null) { - return false; - } -@@ -237,7 +237,7 @@ public class CraftWorld implements World { - continue; - } - -- net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getChunkIfLoaded(chunk.locX + x, chunk.locZ + z); -+ net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper - if (neighbor != null) { - neighbor.setNeighborUnloaded(-xx, -zz); - chunk.setNeighborUnloaded(xx, zz); -@@ -299,6 +299,7 @@ public class CraftWorld implements World { - // Use the default variant of loadChunk when generate == true. - return world.getChunkProviderServer().getChunkAt(x, z) != null; - } -+ if (true) { return world.getChunkProviderServer().getOrLoadChunkAt(x, z) != null; } // Paper - - world.getChunkProviderServer().unloadQueue.remove(x, z); - net.minecraft.server.Chunk chunk = world.getChunkProviderServer().chunks.get(LongHash.toLong(x, z)); -@@ -324,7 +325,7 @@ public class CraftWorld implements World { - continue; - } - -- net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getChunkIfLoaded(chunk.locX + x, chunk.locZ + z); -+ net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getLoadedChunkAtWithoutMarkingActive(chunk.locX + x, chunk.locZ + z); // Paper - if (neighbor != null) { - neighbor.setNeighborLoaded(-x, -z); - chunk.setNeighborLoaded(x, z); -@@ -1541,7 +1542,7 @@ public class CraftWorld implements World { - } - - // Already unloading? -- if (cps.unloadQueue.contains(chunk.locX, chunk.locZ)) { -+ if (chunk.isInUnloadQueue) { // Paper - continue; - } - -diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -index 482af17..a1a6d5a 100644 ---- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java -@@ -62,7 +62,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider> 4, z >> 4 ); -+ Chunk chunk = isActive ? entity.world.getChunkIfActive( x >> 4, z >> 4 ) : null; // Paper - if ( isActive && !( chunk != null && chunk.areNeighborsLoaded( 1 ) ) ) - { - isActive = false; --- -2.8.0 - diff --git a/Spigot-Server-Patches/0102-Optimize-Chunk-Access.patch b/Spigot-Server-Patches/0098-Optimize-Chunk-Access.patch similarity index 71% rename from Spigot-Server-Patches/0102-Optimize-Chunk-Access.patch rename to Spigot-Server-Patches/0098-Optimize-Chunk-Access.patch index 896a4ea92c..b20454ce21 100644 --- a/Spigot-Server-Patches/0102-Optimize-Chunk-Access.patch +++ b/Spigot-Server-Patches/0098-Optimize-Chunk-Access.patch @@ -1,4 +1,4 @@ -From 244e2b525225427d739ef28b12dbe63c819e1d38 Mon Sep 17 00:00:00 2001 +From 1917871be3d7d048b496022ef54eaf230ff2a900 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 27 Aug 2015 01:15:02 -0400 Subject: [PATCH] Optimize Chunk Access @@ -9,18 +9,18 @@ getChunkAt is called for the same chunk multiple times in a row, often from getT Optimize this look up by using a Last Access cache. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index ac35cf4..6e3d17b 100644 +index eb60455..22e4728 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -30,6 +30,7 @@ public class Chunk { - private boolean i; + private boolean j; public final World world; public final int[] heightMap; + public final long chunkKey; // Paper public final int locX; public final int locZ; - private boolean l; -@@ -97,6 +98,7 @@ public class Chunk { + private boolean m; +@@ -96,6 +97,7 @@ public class Chunk { this.world = world; this.locX = i; this.locZ = j; @@ -29,17 +29,18 @@ index ac35cf4..6e3d17b 100644 for (int k = 0; k < this.entitySlices.length; ++k) { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 4d0653c..9863126 100644 +index 32b71c6..3d36d7a 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -24,7 +24,26 @@ public class ChunkProviderServer implements IChunkProvider { - public final ChunkUnloadQueue unloadQueue = new ChunkUnloadQueue(); // CraftBukkit - LongHashSet // Paper -> ChunkUnloadQueue - public final ChunkGenerator chunkGenerator; // CraftBukkit - public +@@ -27,7 +27,27 @@ public class ChunkProviderServer implements IChunkProvider { + public final Set unloadQueue = Sets.newHashSet(); // PAIL: private -> public + public final ChunkGenerator chunkGenerator; private final IChunkLoader chunkLoader; -- public LongObjectHashMap chunks = new LongObjectHashMap(); // CraftBukkit +- public final Long2ObjectMap chunks = new Long2ObjectOpenHashMap(8192); + // Paper start + protected Chunk lastChunkByPos = null; -+ public LongObjectHashMap chunks = new LongObjectHashMap() { ++ public Long2ObjectOpenHashMap chunks = new Long2ObjectOpenHashMap(8192) { ++ + @Override + public Chunk get(long key) { + if (lastChunkByPos != null && key == lastChunkByPos.chunkKey) { @@ -57,9 +58,9 @@ index 4d0653c..9863126 100644 + } + }; // CraftBukkit + // Paper end - // private final LongHashMap chunks = new LongHashMap(); - // private final List chunkList = Lists.newArrayList(); public final WorldServer world; + + public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, ChunkGenerator chunkgenerator) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0103-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0099-Configurable-spawn-chances-for-skeleton-horses.patch similarity index 87% rename from Spigot-Server-Patches/0103-Configurable-spawn-chances-for-skeleton-horses.patch rename to Spigot-Server-Patches/0099-Configurable-spawn-chances-for-skeleton-horses.patch index 66ef8516d3..40a0ccf6a7 100644 --- a/Spigot-Server-Patches/0103-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0099-Configurable-spawn-chances-for-skeleton-horses.patch @@ -1,14 +1,14 @@ -From c9189373d0a6be8feecbbf1ce54c9ba3c893d538 Mon Sep 17 00:00:00 2001 +From da7add4567d101a8d875e6a43a74263680b77fbd Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 22 Mar 2016 12:04:28 -0500 Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 26c1b72..55b211e 100644 +index 50e891f..cdb1766 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -291,4 +291,9 @@ public class PaperWorldConfig { +@@ -285,4 +285,9 @@ public class PaperWorldConfig { } log("Non Player Arrow Despawn Rate: " + nonPlayerArrowDespawnRate); } @@ -19,10 +19,10 @@ index 26c1b72..55b211e 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c5b08f9..7239f99 100644 +index c7e5226..6447d7b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -429,7 +429,10 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -431,7 +431,10 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.D(blockposition); @@ -35,5 +35,5 @@ index c5b08f9..7239f99 100644 entityhorse.setType(EnumHorseType.SKELETON); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0100-Optimize-isValidLocation-for-inlining.patch b/Spigot-Server-Patches/0100-Optimize-isValidLocation-for-inlining.patch new file mode 100644 index 0000000000..c5b890419c --- /dev/null +++ b/Spigot-Server-Patches/0100-Optimize-isValidLocation-for-inlining.patch @@ -0,0 +1,79 @@ +From e678b0cd49904fd62192a607e2444dd4c8eae5d4 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Tue, 22 Mar 2016 23:41:34 -0400 +Subject: [PATCH] Optimize isValidLocation for inlining + +Move test to the blockPosition class so that it can access local variables. + +Replace all calls to the new place to the unnecessary forward. + +diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java +index d60e755..9114388 100644 +--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java ++++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java +@@ -10,6 +10,11 @@ public class BaseBlockPosition implements Comparable { + private final int a; + private final int b; + private final int c; ++ // Paper start ++ public boolean isValidLocation() { ++ return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256; ++ } ++ // Paper end + + public BaseBlockPosition(int i, int j, int k) { + this.a = i; +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 3bdf072..ecf3a38 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -274,8 +274,8 @@ public abstract class World implements IBlockAccess { + return this.getType(blockposition1); + } + +- private boolean isValidLocation(BlockPosition blockposition) { +- return !this.E(blockposition) && blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000; ++ private static boolean isValidLocation(BlockPosition blockposition) { // Paper ++ return blockposition.isValidLocation(); // Paper + } + + private boolean E(BlockPosition blockposition) { +@@ -649,7 +649,7 @@ public abstract class World implements IBlockAccess { + // Paper start - test if meets light level, return faster + // logic copied from below + public boolean isLightLevel(BlockPosition blockposition, int level) { +- if (isValidLocation(blockposition)) { ++ if (blockposition.isValidLocation()) { + if (this.getType(blockposition).f()) { + if (this.c(blockposition.up(), false) >= level) { + return true; +@@ -763,7 +763,7 @@ public abstract class World implements IBlockAccess { + blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ()); + } + +- if (!this.isValidLocation(blockposition)) { ++ if (!blockposition.isValidLocation()) { // Paper + return enumskyblock.c; + } else if (!this.isLoaded(blockposition)) { + return enumskyblock.c; +@@ -775,7 +775,7 @@ public abstract class World implements IBlockAccess { + } + + public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) { +- if (this.isValidLocation(blockposition)) { ++ if (blockposition.isValidLocation()) { // Paper + if (this.isLoaded(blockposition)) { + Chunk chunk = this.getChunkAtWorldCoords(blockposition); + +@@ -811,7 +811,7 @@ public abstract class World implements IBlockAccess { + // CraftBukkit end + Chunk chunk = this.getChunkIfLoaded(blockposition); + if (chunk != null) { +- return this.isValidLocation(blockposition) ? chunk.getBlockData(blockposition) : Blocks.AIR.getBlockData(); ++ return blockposition.isValidLocation() ? chunk.getBlockData(blockposition) : Blocks.AIR.getBlockData(); + } + return null; + } +-- +2.8.2 + diff --git a/Spigot-Server-Patches/0105-Use-correct-item-in-arrow-pickup-event.patch b/Spigot-Server-Patches/0101-Use-correct-item-in-arrow-pickup-event.patch similarity index 86% rename from Spigot-Server-Patches/0105-Use-correct-item-in-arrow-pickup-event.patch rename to Spigot-Server-Patches/0101-Use-correct-item-in-arrow-pickup-event.patch index 12570c2ad2..31d7cdd243 100644 --- a/Spigot-Server-Patches/0105-Use-correct-item-in-arrow-pickup-event.patch +++ b/Spigot-Server-Patches/0101-Use-correct-item-in-arrow-pickup-event.patch @@ -1,14 +1,14 @@ -From 7441dbd863529b28257040f5842f9b623ca10518 Mon Sep 17 00:00:00 2001 +From 9ed5eb00e14ac2cc32809189cb1b1a890f91702a Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Tue, 22 Mar 2016 16:00:16 -0400 Subject: [PATCH] Use correct item in arrow pickup event diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index a073e6c..6749898 100644 +index c2ee9ce..f6b7453 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java -@@ -430,7 +430,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { +@@ -432,7 +432,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { public void d(EntityHuman entityhuman) { if (!this.world.isClientSide && this.inGround && this.shake <= 0) { // CraftBukkit start @@ -17,7 +17,7 @@ index a073e6c..6749898 100644 if (this.fromPlayer == PickupStatus.ALLOWED && entityhuman.inventory.canHold(itemstack) > 0) { EntityItem item = new EntityItem(this.world, this.locX, this.locY, this.locZ, itemstack); -@@ -445,7 +445,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { +@@ -447,7 +447,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { // CraftBukkit end boolean flag = this.fromPlayer == EntityArrow.PickupStatus.ALLOWED || this.fromPlayer == EntityArrow.PickupStatus.CREATIVE_ONLY && entityhuman.abilities.canInstantlyBuild; @@ -27,5 +27,5 @@ index a073e6c..6749898 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0106-Fix-cooked-fish-legacy-import.patch b/Spigot-Server-Patches/0102-Fix-cooked-fish-legacy-import.patch similarity index 93% rename from Spigot-Server-Patches/0106-Fix-cooked-fish-legacy-import.patch rename to Spigot-Server-Patches/0102-Fix-cooked-fish-legacy-import.patch index 0833b21122..907bf7a85c 100644 --- a/Spigot-Server-Patches/0106-Fix-cooked-fish-legacy-import.patch +++ b/Spigot-Server-Patches/0102-Fix-cooked-fish-legacy-import.patch @@ -1,4 +1,4 @@ -From 1cdeef4af311224fad86305e246823361b0c0bd3 Mon Sep 17 00:00:00 2001 +From fe1a030a5b040dc3d90799ec669e6866d208aa0b Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Tue, 1 Mar 2016 04:32:08 -0500 Subject: [PATCH] Fix cooked fish legacy import @@ -18,5 +18,5 @@ index 87b82eb..a7c71f4 100644 DataConverterMaterialId.a[352] = "minecraft:bone"; DataConverterMaterialId.a[353] = "minecraft:sugar"; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0107-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch b/Spigot-Server-Patches/0103-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch similarity index 90% rename from Spigot-Server-Patches/0107-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch rename to Spigot-Server-Patches/0103-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch index 2d00b660c6..6a3e07718a 100644 --- a/Spigot-Server-Patches/0107-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch +++ b/Spigot-Server-Patches/0103-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch @@ -1,14 +1,14 @@ -From d15a3cf34425bd827a34858e997784ed9496f9b7 Mon Sep 17 00:00:00 2001 +From f40df4f64f1c67b058526cc1796015acb2652e69 Mon Sep 17 00:00:00 2001 From: DemonWav Date: Sat, 26 Mar 2016 21:36:05 -0500 Subject: [PATCH] Prevent possible infinite loop in BlockPosition iterator diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 2d56f02..b87c4c6 100644 +index 99fcf4c..06ff6a0 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -139,15 +139,17 @@ public class BlockPosition extends BaseBlockPosition { +@@ -141,15 +141,17 @@ public class BlockPosition extends BaseBlockPosition { protected BlockPosition a() { if (this.b == null) { @@ -28,7 +28,7 @@ index 2d56f02..b87c4c6 100644 if (i < blockposition1.getX()) { ++i; } else if (j < blockposition1.getY()) { -@@ -158,6 +160,18 @@ public class BlockPosition extends BaseBlockPosition { +@@ -160,6 +162,18 @@ public class BlockPosition extends BaseBlockPosition { j = blockposition.getY(); ++k; } @@ -47,7 +47,7 @@ index 2d56f02..b87c4c6 100644 this.b = new BlockPosition(i, j, k); return this.b; -@@ -187,15 +201,17 @@ public class BlockPosition extends BaseBlockPosition { +@@ -189,15 +203,17 @@ public class BlockPosition extends BaseBlockPosition { protected BlockPosition.MutableBlockPosition a() { if (this.b == null) { @@ -67,7 +67,7 @@ index 2d56f02..b87c4c6 100644 if (i < blockposition1.getX()) { ++i; } else if (j < blockposition1.getY()) { -@@ -206,6 +222,18 @@ public class BlockPosition extends BaseBlockPosition { +@@ -208,6 +224,18 @@ public class BlockPosition extends BaseBlockPosition { j = blockposition.getY(); ++k; } @@ -84,8 +84,8 @@ index 2d56f02..b87c4c6 100644 + } + // Paper end - // Paper start - modify base position variables - ((BaseBlockPosition) this.b).a = i; + this.b.b = i; + this.b.c = j; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0108-Access-items-by-EquipmentSlot.patch b/Spigot-Server-Patches/0104-Access-items-by-EquipmentSlot.patch similarity index 96% rename from Spigot-Server-Patches/0108-Access-items-by-EquipmentSlot.patch rename to Spigot-Server-Patches/0104-Access-items-by-EquipmentSlot.patch index ac3d04a629..2ca8dd8e44 100644 --- a/Spigot-Server-Patches/0108-Access-items-by-EquipmentSlot.patch +++ b/Spigot-Server-Patches/0104-Access-items-by-EquipmentSlot.patch @@ -1,4 +1,4 @@ -From 0ae6e2c034dff3b39d0527ab685755d969f6351d Mon Sep 17 00:00:00 2001 +From 16f19123d1cff3764b01b71e9ede360aa7316c67 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 20 Mar 2016 06:45:01 -0400 Subject: [PATCH] Access items by EquipmentSlot @@ -64,5 +64,5 @@ index 51a8b4e..47654a0 100644 + // Paper end } -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0104-Optimize-isValidLocation-for-inlining.patch b/Spigot-Server-Patches/0104-Optimize-isValidLocation-for-inlining.patch deleted file mode 100644 index ccce8379aa..0000000000 --- a/Spigot-Server-Patches/0104-Optimize-isValidLocation-for-inlining.patch +++ /dev/null @@ -1,122 +0,0 @@ -From a1ce47735d51010521d0296781abf0ba013c607e Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Tue, 22 Mar 2016 23:41:34 -0400 -Subject: [PATCH] Optimize isValidLocation for inlining - -Move test to the blockPosition class so that it can access local variables. - -Replace all calls to the new place to the unnecessary forward. - -diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index c5b6a34..17bbfb0 100644 ---- a/src/main/java/net/minecraft/server/BaseBlockPosition.java -+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -9,6 +9,9 @@ public class BaseBlockPosition implements Comparable { - protected int a; - protected int c; - protected int d; -+ public boolean isValidLocation() { -+ return a >= -30000000 && d >= -30000000 && a < 30000000 && d < 30000000 && c >= 0 && c < 256; -+ } - // Paper end - - public BaseBlockPosition(int i, int j, int k) { -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b223847..6c4a0aa 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -279,8 +279,8 @@ public abstract class World implements IBlockAccess { - return this.getType(blockposition1); - } - -- private boolean isValidLocation(BlockPosition blockposition) { -- return blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000 && blockposition.getY() >= 0 && blockposition.getY() < 256; -+ private static boolean isValidLocation(BlockPosition blockposition) { // Paper -+ return blockposition.isValidLocation(); // Paper - } - - public boolean isEmpty(BlockPosition blockposition) { -@@ -292,7 +292,7 @@ public abstract class World implements IBlockAccess { - } - - public boolean a(BlockPosition blockposition, boolean flag) { -- return !this.isValidLocation(blockposition) ? false : this.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4, flag); -+ return !blockposition.isValidLocation() ? false : this.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4, flag); // Paper - } - - public boolean areChunksLoaded(BlockPosition blockposition, int i) { -@@ -372,7 +372,7 @@ public abstract class World implements IBlockAccess { - return true; - } - // CraftBukkit end -- if (!this.isValidLocation(blockposition)) { -+ if (!blockposition.isValidLocation()) { // Paper - return false; - } else if (!this.isClientSide && this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { - return false; -@@ -650,7 +650,7 @@ public abstract class World implements IBlockAccess { - // Paper start - test if meets light level, return faster - // logic copied from below - public boolean isLightLevel(BlockPosition blockposition, int level) { -- if (isValidLocation(blockposition)) { -+ if (blockposition.isValidLocation()) { - if (this.getType(blockposition).f()) { - if (this.c(blockposition.up(), false) >= level) { - return true; -@@ -763,7 +763,7 @@ public abstract class World implements IBlockAccess { - blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ()); - } - -- if (!this.isValidLocation(blockposition)) { -+ if (!blockposition.isValidLocation()) { // Paper - return enumskyblock.c; - } else if (!this.isLoaded(blockposition)) { - return enumskyblock.c; -@@ -775,7 +775,7 @@ public abstract class World implements IBlockAccess { - } - - public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) { -- if (this.isValidLocation(blockposition)) { -+ if (blockposition.isValidLocation()) { // Paper - if (this.isLoaded(blockposition)) { - Chunk chunk = this.getChunkAtWorldCoords(blockposition); - -@@ -811,7 +811,7 @@ public abstract class World implements IBlockAccess { - // CraftBukkit end - Chunk chunk = this.getChunkIfLoaded(blockposition); - if (chunk != null) { -- return this.isValidLocation(blockposition) ? chunk.getBlockData(blockposition) : Blocks.AIR.getBlockData(); -+ return blockposition.isValidLocation() ? chunk.getBlockData(blockposition) : Blocks.AIR.getBlockData(); - } - return null; - } -@@ -829,7 +829,7 @@ public abstract class World implements IBlockAccess { - } - } - // CraftBukkit end -- if (!this.isValidLocation(blockposition)) { -+ if (!blockposition.isValidLocation()) { // Paper - return Blocks.AIR.getBlockData(); - } else { - Chunk chunk = this.getChunkAtWorldCoords(blockposition); -@@ -2058,7 +2058,7 @@ public abstract class World implements IBlockAccess { - public Map capturedTileEntities = Maps.newHashMap(); - - public TileEntity getTileEntity(BlockPosition blockposition) { -- if (!this.isValidLocation(blockposition)) { -+ if (!blockposition.isValidLocation()) { // Paper - return null; - } else { - // CraftBukkit start -@@ -2161,7 +2161,7 @@ public abstract class World implements IBlockAccess { - } - - public boolean d(BlockPosition blockposition, boolean flag) { -- if (!this.isValidLocation(blockposition)) { -+ if (!blockposition.isValidLocation()) { // Paper - return flag; - } else { - Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4); --- -2.8.0 - diff --git a/Spigot-Server-Patches/0109-Check-async-remove-unused-vars-GH-159.patch b/Spigot-Server-Patches/0105-Check-async-remove-unused-vars-GH-159.patch similarity index 93% rename from Spigot-Server-Patches/0109-Check-async-remove-unused-vars-GH-159.patch rename to Spigot-Server-Patches/0105-Check-async-remove-unused-vars-GH-159.patch index f79ff873e5..c0e5a133c7 100644 --- a/Spigot-Server-Patches/0109-Check-async-remove-unused-vars-GH-159.patch +++ b/Spigot-Server-Patches/0105-Check-async-remove-unused-vars-GH-159.patch @@ -1,11 +1,11 @@ -From be3b16091990054599b189b468ba939c8f872899 Mon Sep 17 00:00:00 2001 +From 1248a843370e8c97712acb40fb710db0dd512459 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 27 Mar 2016 20:24:05 -0500 Subject: [PATCH] Check async, remove unused vars, GH-159 diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index dc7c17c..15a0ce9 100644 +index 5fa35f3..9fd0473 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -38,6 +38,7 @@ public final class SpawnerCreature { @@ -28,5 +28,5 @@ index dc7c17c..15a0ce9 100644 if ((mobcnt = getEntityCount(worldserver, enumcreaturetype.a())) <= limit * i / 256) { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0110-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch b/Spigot-Server-Patches/0106-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch similarity index 88% rename from Spigot-Server-Patches/0110-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch rename to Spigot-Server-Patches/0106-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch index 75d9222ce7..d27f33f136 100644 --- a/Spigot-Server-Patches/0110-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch +++ b/Spigot-Server-Patches/0106-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch @@ -1,4 +1,4 @@ -From 829bedbf8efb98c9a5054e47ac1214d3fdf2cdc7 Mon Sep 17 00:00:00 2001 +From 53ba2d46f33926f724bff3ae45dbc377821d51dd Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 19:55:45 -0400 Subject: [PATCH] Option to disable BlockPhysicsEvent for Redstone @@ -11,10 +11,10 @@ Defaulting this to false will provide substantial performance improvement by saving millions of event calls on redstone heavy servers. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 55b211e..d6b8f72 100644 +index cdb1766..f689d69 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -296,4 +296,9 @@ public class PaperWorldConfig { +@@ -290,4 +290,9 @@ public class PaperWorldConfig { private void skeleHorseSpawnChance() { skeleHorseSpawnChance = getDouble("skeleton-horse-thunder-spawn-chance", -1.0D); // -1.0D represents a "vanilla" state } @@ -25,10 +25,10 @@ index 55b211e..d6b8f72 100644 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6c4a0aa..4bfeb01 100644 +index ecf3a38..db70868 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -569,7 +569,7 @@ public abstract class World implements IBlockAccess { +@@ -568,7 +568,7 @@ public abstract class World implements IBlockAccess { try { // CraftBukkit start CraftWorld world = ((WorldServer) this).getWorld(); @@ -38,10 +38,10 @@ index 6c4a0aa..4bfeb01 100644 this.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7239f99..acfcb59 100644 +index 6447d7b..3e5923c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -32,6 +32,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; +@@ -33,6 +33,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; public class WorldServer extends World implements IAsyncTaskHandler { private static final Logger a = LogManager.getLogger(); @@ -49,7 +49,7 @@ index 7239f99..acfcb59 100644 private final MinecraftServer server; public EntityTracker tracker; private final PlayerChunkMap manager; -@@ -742,6 +743,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -744,6 +745,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) { try { @@ -57,7 +57,7 @@ index 7239f99..acfcb59 100644 iblockdata.getBlock().b((World) this, nextticklistentry.a, iblockdata, this.random); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Exception while ticking a block"); -@@ -749,7 +751,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -751,7 +753,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { CrashReportSystemDetails.a(crashreportsystemdetails, nextticklistentry.a, iblockdata); throw new ReportedException(crashreport); @@ -67,5 +67,5 @@ index 7239f99..acfcb59 100644 timing.stopTiming(); // Paper } else { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0111-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0107-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 79% rename from Spigot-Server-Patches/0111-Entity-AddTo-RemoveFrom-World-Events.patch rename to Spigot-Server-Patches/0107-Entity-AddTo-RemoveFrom-World-Events.patch index 4c42c0601d..76bc0541a7 100644 --- a/Spigot-Server-Patches/0111-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0107-Entity-AddTo-RemoveFrom-World-Events.patch @@ -1,14 +1,14 @@ -From 3de12d90f6a0a8a0057720a0888c21197ceced20 Mon Sep 17 00:00:00 2001 +From 42278206102e357936f9e7d8b7001160df905803 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:32:58 -0400 Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4bfeb01..6501091 100644 +index db70868..830494c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1114,6 +1114,7 @@ public abstract class World implements IBlockAccess { +@@ -1117,6 +1117,7 @@ public abstract class World implements IBlockAccess { } entity.valid = true; // CraftBukkit @@ -16,7 +16,7 @@ index 4bfeb01..6501091 100644 } protected void c(Entity entity) { -@@ -1121,6 +1122,7 @@ public abstract class World implements IBlockAccess { +@@ -1124,6 +1125,7 @@ public abstract class World implements IBlockAccess { ((IWorldAccess) this.u.get(i)).b(entity); } @@ -25,5 +25,5 @@ index 4bfeb01..6501091 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0112-Configurable-Chunk-Inhabited-Timer.patch b/Spigot-Server-Patches/0108-Configurable-Chunk-Inhabited-Timer.patch similarity index 79% rename from Spigot-Server-Patches/0112-Configurable-Chunk-Inhabited-Timer.patch rename to Spigot-Server-Patches/0108-Configurable-Chunk-Inhabited-Timer.patch index 0fc7d4b2bd..5d77646738 100644 --- a/Spigot-Server-Patches/0112-Configurable-Chunk-Inhabited-Timer.patch +++ b/Spigot-Server-Patches/0108-Configurable-Chunk-Inhabited-Timer.patch @@ -1,4 +1,4 @@ -From 146e00cc32b1571676f6f0a66c3a6363867967b1 Mon Sep 17 00:00:00 2001 +From c1e5076fcdd19903b706e7bb19c7a4ec80edea1a Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:46:14 -0400 Subject: [PATCH] Configurable Chunk Inhabited Timer @@ -9,10 +9,10 @@ aspects of vanilla gameplay to this factor. For people who want all chunks to be treated equally, you can disable the timer. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index d6b8f72..44a33ee 100644 +index f689d69..6f77cfd 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -301,4 +301,9 @@ public class PaperWorldConfig { +@@ -295,4 +295,9 @@ public class PaperWorldConfig { private void firePhysicsEventForRedstone() { firePhysicsEventForRedstone = getBoolean("fire-physics-event-for-redstone", firePhysicsEventForRedstone); } @@ -23,18 +23,18 @@ index d6b8f72..44a33ee 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6e3d17b..9334a0a 100644 +index 22e4728..f7452b3 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -1399,7 +1399,7 @@ public class Chunk { +@@ -1401,7 +1401,7 @@ public class Chunk { } public long x() { -- return this.v; -+ return world.paperConfig.useInhabitedTime ? this.v : 0; // Paper +- return this.w; ++ return world.paperConfig.useInhabitedTime ? this.w : 0; // Paper } public void c(long i) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0113-EntityPathfindEvent.patch b/Spigot-Server-Patches/0109-EntityPathfindEvent.patch similarity index 84% rename from Spigot-Server-Patches/0113-EntityPathfindEvent.patch rename to Spigot-Server-Patches/0109-EntityPathfindEvent.patch index 47bbbebb94..0e5c1cb43a 100644 --- a/Spigot-Server-Patches/0113-EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/0109-EntityPathfindEvent.patch @@ -1,4 +1,4 @@ -From 76f9f85d4fe58407a75d6dc4d927fc430af22e97 Mon Sep 17 00:00:00 2001 +From e372ab08e338bcd4b27cb23fc386fc9cda543788 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 21:22:26 -0400 Subject: [PATCH] EntityPathfindEvent @@ -6,19 +6,19 @@ Subject: [PATCH] EntityPathfindEvent Fires when an Entity decides to start moving to a location. diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index 9687785..0926d22 100644 +index 61c0f55..ea3cd66 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java -@@ -3,7 +3,7 @@ package net.minecraft.server; +@@ -5,7 +5,7 @@ import javax.annotation.Nullable; public abstract class NavigationAbstract { private static int f = 20; - protected EntityInsentient a; + protected EntityInsentient a;public Entity getEntity() { return a; } // Paper protected World b; + @Nullable protected PathEntity c; - protected double d; -@@ -73,6 +73,7 @@ public abstract class NavigationAbstract { +@@ -77,6 +77,7 @@ public abstract class NavigationAbstract { } else if (this.c != null && !this.c.b() && blockposition.equals(this.r)) { return this.c; } else { @@ -26,7 +26,7 @@ index 9687785..0926d22 100644 this.r = blockposition; float f = this.h(); -@@ -96,6 +97,7 @@ public abstract class NavigationAbstract { +@@ -101,6 +102,7 @@ public abstract class NavigationAbstract { if (this.c != null && !this.c.b() && blockposition.equals(this.r)) { return this.c; } else { @@ -35,5 +35,5 @@ index 9687785..0926d22 100644 float f = this.h(); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0114-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch b/Spigot-Server-Patches/0110-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch similarity index 96% rename from Spigot-Server-Patches/0114-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch rename to Spigot-Server-Patches/0110-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch index 1439886055..36da20d181 100644 --- a/Spigot-Server-Patches/0114-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch +++ b/Spigot-Server-Patches/0110-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch @@ -1,4 +1,4 @@ -From 6242fcfdbb4e0fbbf4a9604a544377c980e9108a Mon Sep 17 00:00:00 2001 +From 17e02093634440f31ef3ddc7ee91b3b3a5b21dea Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 22:03:09 -0400 Subject: [PATCH] Prevent Waterflow BlockFromToEvent from loading chunks @@ -12,7 +12,7 @@ of unloaded chunks anyways. This keeps behavior consistent, vs inconsistent flowing based on plugin triggered loads. diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java -index 51b80cb..0a3d673 100644 +index 2eb8622..4ff7635 100644 --- a/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java @@ -105,6 +105,7 @@ public class BlockFlowing extends BlockFluids { @@ -48,5 +48,5 @@ index 51b80cb..0a3d673 100644 if (this.material == Material.LAVA) { this.fizz(world, blockposition); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0115-Minecart-drop-name-workaround.patch b/Spigot-Server-Patches/0111-Minecart-drop-name-workaround.patch similarity index 85% rename from Spigot-Server-Patches/0115-Minecart-drop-name-workaround.patch rename to Spigot-Server-Patches/0111-Minecart-drop-name-workaround.patch index a6fe12c793..e63374ac3a 100644 --- a/Spigot-Server-Patches/0115-Minecart-drop-name-workaround.patch +++ b/Spigot-Server-Patches/0111-Minecart-drop-name-workaround.patch @@ -1,4 +1,4 @@ -From ff3d808f60b84231382331b5184b524c22b15260 Mon Sep 17 00:00:00 2001 +From 59d6261a2210aea1db81292deb11eed7f419d379 Mon Sep 17 00:00:00 2001 From: Fabse Date: Mon, 28 Mar 2016 00:46:46 +0200 Subject: [PATCH] Minecart drop name workaround @@ -7,10 +7,10 @@ This is a workaround for MC-68446 (or similar). In Survival Minecraft this bug only shows in minecart drops, so this is the only thing fixed here. diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -index a649ae7..f0d503c 100644 +index ae8bfb8..dc6eba5 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java -@@ -168,7 +168,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT +@@ -171,7 +171,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT if (this.world.getGameRules().getBoolean("doEntityDrops")) { ItemStack itemstack = new ItemStack(Items.MINECART, 1); @@ -20,5 +20,5 @@ index a649ae7..f0d503c 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0116-Reduce-IO-ops-opening-a-new-region-file.patch b/Spigot-Server-Patches/0112-Reduce-IO-ops-opening-a-new-region-file.patch similarity index 96% rename from Spigot-Server-Patches/0116-Reduce-IO-ops-opening-a-new-region-file.patch rename to Spigot-Server-Patches/0112-Reduce-IO-ops-opening-a-new-region-file.patch index b90edb152b..4effcdbad6 100644 --- a/Spigot-Server-Patches/0116-Reduce-IO-ops-opening-a-new-region-file.patch +++ b/Spigot-Server-Patches/0112-Reduce-IO-ops-opening-a-new-region-file.patch @@ -1,4 +1,4 @@ -From f614b45bd89f4ad83dfd40f76adf3ab2f75a674c Mon Sep 17 00:00:00 2001 +From bef837e90b22fe322e78b2d3713951f39d3da178 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Tue, 29 Mar 2016 06:56:23 +0300 Subject: [PATCH] Reduce IO ops opening a new region file. @@ -49,5 +49,5 @@ index 68dd17d..d82f4a1 100644 } } catch (IOException ioexception) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0117-Sanitise-RegionFileCache-and-make-configurable.patch b/Spigot-Server-Patches/0113-Sanitise-RegionFileCache-and-make-configurable.patch similarity index 97% rename from Spigot-Server-Patches/0117-Sanitise-RegionFileCache-and-make-configurable.patch rename to Spigot-Server-Patches/0113-Sanitise-RegionFileCache-and-make-configurable.patch index e66f7d97c3..2d7b01720b 100644 --- a/Spigot-Server-Patches/0117-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/Spigot-Server-Patches/0113-Sanitise-RegionFileCache-and-make-configurable.patch @@ -1,4 +1,4 @@ -From 4edc5edf0d28d370646105bb6be847ad0944cd9b Mon Sep 17 00:00:00 2001 +From c271a5abbff60db08b940d4ab12dc410edcb3722 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Tue, 29 Mar 2016 08:22:55 +0300 Subject: [PATCH] Sanitise RegionFileCache and make configurable. @@ -11,7 +11,7 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap). The maximum size of the RegionFileCache is also made configurable. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index a643acc..431faa8 100644 +index de1717a..3c52736 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -213,4 +213,9 @@ public class PaperConfig { diff --git a/Spigot-Server-Patches/0118-Add-getEntity-by-UUID-API.patch b/Spigot-Server-Patches/0114-Add-getEntity-by-UUID-API.patch similarity index 92% rename from Spigot-Server-Patches/0118-Add-getEntity-by-UUID-API.patch rename to Spigot-Server-Patches/0114-Add-getEntity-by-UUID-API.patch index b103d29692..b8548b6af1 100644 --- a/Spigot-Server-Patches/0118-Add-getEntity-by-UUID-API.patch +++ b/Spigot-Server-Patches/0114-Add-getEntity-by-UUID-API.patch @@ -1,14 +1,14 @@ -From 8082519bb735558d60447b300f684c4b1ca9f539 Mon Sep 17 00:00:00 2001 +From b50ffe187045367a4cadb8abf7d4990bccc58038 Mon Sep 17 00:00:00 2001 From: DemonWav Date: Wed, 30 Mar 2016 01:20:11 -0500 Subject: [PATCH] Add getEntity by UUID API diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3420b8b..f46cf24 100644 +index f5e26df..8d8e415 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1620,4 +1620,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -1626,4 +1626,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs return (Bukkit.getServer() instanceof CraftServer) ? ((CraftServer) Bukkit.getServer()).getServer() : null; } // CraftBukkit end @@ -57,5 +57,5 @@ index e957ed0..0a5301f 100644 // Paper end } -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0119-Use-Optimized-Collections.patch b/Spigot-Server-Patches/0115-Use-Optimized-Collections.patch similarity index 66% rename from Spigot-Server-Patches/0119-Use-Optimized-Collections.patch rename to Spigot-Server-Patches/0115-Use-Optimized-Collections.patch index 84c2e849ba..3d05e6bb5c 100644 --- a/Spigot-Server-Patches/0119-Use-Optimized-Collections.patch +++ b/Spigot-Server-Patches/0115-Use-Optimized-Collections.patch @@ -1,4 +1,4 @@ -From 6a034f526953d0fe183e610f006e0281cddfe01c Mon Sep 17 00:00:00 2001 +From ca605f00544babfb805f1f59e6b12f388bf26f99 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 02:13:24 -0400 Subject: [PATCH] Use Optimized Collections @@ -13,34 +13,26 @@ These collections are super fast as seen http://java-performance.info/hashmap-overview-jdk-fastutil-goldman-sachs-hppc-koloboke-trove-january-2015/ diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 9863126..1fd50dd 100644 +index 3d36d7a..8ee8e80 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -5,6 +5,7 @@ import java.util.Iterator; - import java.util.List; +@@ -24,7 +24,7 @@ import org.bukkit.event.world.ChunkUnloadEvent; + public class ChunkProviderServer implements IChunkProvider { - import com.destroystokyo.paper.exception.ServerInternalException; -+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; - -@@ -26,7 +27,7 @@ public class ChunkProviderServer implements IChunkProvider { + private static final Logger a = LogManager.getLogger(); +- public final Set unloadQueue = Sets.newHashSet(); // PAIL: private -> public ++ public final it.unimi.dsi.fastutil.longs.LongSet unloadQueue = new it.unimi.dsi.fastutil.longs.LongArraySet(); // PAIL: private -> public // Paper + public final ChunkGenerator chunkGenerator; private final IChunkLoader chunkLoader; // Paper start - protected Chunk lastChunkByPos = null; -- public LongObjectHashMap chunks = new LongObjectHashMap() { -+ public Long2ObjectOpenHashMap chunks = new Long2ObjectOpenHashMap() { - @Override - public Chunk get(long key) { - if (lastChunkByPos != null && key == lastChunkByPos.chunkKey) { diff --git a/src/main/java/net/minecraft/server/DataWatcher.java b/src/main/java/net/minecraft/server/DataWatcher.java -index f1c62ec..68a0565 100644 +index ec77a5c..86ad41d 100644 --- a/src/main/java/net/minecraft/server/DataWatcher.java +++ b/src/main/java/net/minecraft/server/DataWatcher.java -@@ -11,13 +11,14 @@ import java.util.List; - import java.util.Map; +@@ -12,13 +12,14 @@ import java.util.Map; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; + import javax.annotation.Nullable; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; // Paper import org.apache.commons.lang3.ObjectUtils; @@ -54,5 +46,5 @@ index f1c62ec..68a0565 100644 private boolean e = true; private boolean f; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0120-Do-not-load-chunks-for-light-checks.patch b/Spigot-Server-Patches/0116-Do-not-load-chunks-for-light-checks.patch similarity index 83% rename from Spigot-Server-Patches/0120-Do-not-load-chunks-for-light-checks.patch rename to Spigot-Server-Patches/0116-Do-not-load-chunks-for-light-checks.patch index d822014ece..977c04b8a9 100644 --- a/Spigot-Server-Patches/0120-Do-not-load-chunks-for-light-checks.patch +++ b/Spigot-Server-Patches/0116-Do-not-load-chunks-for-light-checks.patch @@ -1,4 +1,4 @@ -From dd0baf896134511895a14357209123312b77843e Mon Sep 17 00:00:00 2001 +From d4c8600623227bb4ccc74a31b66b010e2d65ed3c Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 31 Mar 2016 19:17:58 -0400 Subject: [PATCH] Do not load chunks for light checks @@ -7,10 +7,10 @@ Should only happen for blocks on the edge that uses neighbors light level (certain blocks). In that case, there will be 3-4 other neighbors to get a light level from. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6501091..5be36f5 100644 +index 830494c..f25b6e0 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -718,6 +718,7 @@ public abstract class World implements IBlockAccess { +@@ -717,6 +717,7 @@ public abstract class World implements IBlockAccess { if (blockposition.getY() >= 256) { blockposition = new BlockPosition(blockposition.getX(), 255, blockposition.getZ()); } @@ -19,5 +19,5 @@ index 6501091..5be36f5 100644 Chunk chunk = this.getChunkAtWorldCoords(blockposition); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0121-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0117-Add-PlayerUseUnknownEntityEvent.patch similarity index 91% rename from Spigot-Server-Patches/0121-Add-PlayerUseUnknownEntityEvent.patch rename to Spigot-Server-Patches/0117-Add-PlayerUseUnknownEntityEvent.patch index f7a41e49be..052d2711d0 100644 --- a/Spigot-Server-Patches/0121-Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/0117-Add-PlayerUseUnknownEntityEvent.patch @@ -1,4 +1,4 @@ -From 850404f03c403117dec2b53fea8e46697bcce012 Mon Sep 17 00:00:00 2001 +From c3d5db04e8eea534de5bf3aa9b8762c04a8b8ee8 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 05:09:16 -0400 Subject: [PATCH] Add PlayerUseUnknownEntityEvent @@ -18,10 +18,10 @@ index 2b23a5d..6464a84 100644 private Vec3D c; private EnumHand d; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 3837f64..ffbe81d 100644 +index dba953f..3d9a677 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1615,6 +1615,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1614,6 +1614,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } } } @@ -39,5 +39,5 @@ index 3837f64..ffbe81d 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0122-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0118-Fix-reducedDebugInfo-not-initialized-on-client.patch similarity index 87% rename from Spigot-Server-Patches/0122-Fix-reducedDebugInfo-not-initialized-on-client.patch rename to Spigot-Server-Patches/0118-Fix-reducedDebugInfo-not-initialized-on-client.patch index c3c72dea2a..4e4bb0e316 100644 --- a/Spigot-Server-Patches/0122-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0118-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -1,14 +1,14 @@ -From 069ed9ff50b216deb2783301e337235185f12dfd Mon Sep 17 00:00:00 2001 +From 2408145c007633598b4303db0bf3611df047c0b0 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 2 Apr 2016 20:37:03 -0400 Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a6a4671..94f122d 100644 +index a3c0b10..ac3bdd1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -151,6 +151,7 @@ public abstract class PlayerList { +@@ -152,6 +152,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition)); playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities)); playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); @@ -17,5 +17,5 @@ index a6a4671..94f122d 100644 entityplayer.getStatisticManager().d(); entityplayer.getStatisticManager().updateStatistics(entityplayer); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0123-Configurable-Grass-Spread-Tick-Rate.patch b/Spigot-Server-Patches/0119-Configurable-Grass-Spread-Tick-Rate.patch similarity index 86% rename from Spigot-Server-Patches/0123-Configurable-Grass-Spread-Tick-Rate.patch rename to Spigot-Server-Patches/0119-Configurable-Grass-Spread-Tick-Rate.patch index bfb3bb3ccf..cd29c859ab 100644 --- a/Spigot-Server-Patches/0123-Configurable-Grass-Spread-Tick-Rate.patch +++ b/Spigot-Server-Patches/0119-Configurable-Grass-Spread-Tick-Rate.patch @@ -1,14 +1,14 @@ -From 8ac63084088e887f44453b331b10e024a53759f0 Mon Sep 17 00:00:00 2001 +From 2088da9097d3467af015f5278b7eb4ee3e3d5051 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Apr 2016 16:28:17 -0400 Subject: [PATCH] Configurable Grass Spread Tick Rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 44a33ee..be21c0f 100644 +index 6f77cfd..b2d74df 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -306,4 +306,10 @@ public class PaperWorldConfig { +@@ -300,4 +300,10 @@ public class PaperWorldConfig { private void useInhabitedTime() { useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true); } @@ -20,10 +20,10 @@ index 44a33ee..be21c0f 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java -index 8fc736d..b656994 100644 +index 21e722d..e41f2b2 100644 --- a/src/main/java/net/minecraft/server/BlockGrass.java +++ b/src/main/java/net/minecraft/server/BlockGrass.java -@@ -28,6 +28,7 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { +@@ -29,6 +29,7 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { } public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { @@ -32,5 +32,5 @@ index 8fc736d..b656994 100644 int lightLevel = -1; // Paper if (world.getType(blockposition.up()).c() > 2 && (lightLevel = world.getLightLevel(blockposition.up())) < 4) { // Paper - move light check to end to avoid unneeded light lookups -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0124-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0120-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 90% rename from Spigot-Server-Patches/0124-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to Spigot-Server-Patches/0120-Configurable-Keep-Spawn-Loaded-range-per-world.patch index ae0210ec36..7a6cc15b3e 100644 --- a/Spigot-Server-Patches/0124-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0120-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From e3337a84c25382034818296e71137ca3cee73914 Mon Sep 17 00:00:00 2001 +From 4b59f933529474fa40301cad4efdfe5e59dbf849 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,10 +6,10 @@ 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 be21c0f..275bf10 100644 +index b2d74df..36f0087 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -312,4 +312,10 @@ public class PaperWorldConfig { +@@ -306,4 +306,10 @@ public class PaperWorldConfig { grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate)); log("Grass Spread Tick Rate: " + grassUpdateRate); } @@ -21,10 +21,10 @@ index be21c0f..275bf10 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 06dec17..b1e6e5d 100644 +index 8d8e415..02e8551 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -354,8 +354,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -359,8 +359,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs long j = av(); i = 0; @@ -37,10 +37,10 @@ index 06dec17..b1e6e5d 100644 if (i1 - j > 1000L) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5be36f5..0e1bcdd 100644 +index f25b6e0..c19c112 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -3224,7 +3224,7 @@ public abstract class World implements IBlockAccess { +@@ -3238,7 +3238,7 @@ public abstract class World implements IBlockAccess { BlockPosition blockposition = this.getSpawn(); int k = i * 16 + 8 - blockposition.getX(); int l = j * 16 + 8 - blockposition.getZ(); @@ -63,10 +63,10 @@ index 0a5301f..e6a76cf 100644 for (int j = -short1; j <= short1; j += 16) { for (int k = -short1; k <= short1; k += 16) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 922ebaf..207a8d8 100644 +index 46648bf..1adfc03 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1254,8 +1254,9 @@ public class CraftWorld implements World { +@@ -1259,8 +1259,9 @@ public class CraftWorld implements World { int chunkCoordX = chunkcoordinates.getX() >> 4; int chunkCoordZ = chunkcoordinates.getZ() >> 4; // Cycle through the 25x25 Chunks around it to load/unload the chunks. @@ -79,5 +79,5 @@ index 922ebaf..207a8d8 100644 loadChunk(chunkCoordX + x, chunkCoordZ + z); } else { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0125-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0121-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch similarity index 80% rename from Spigot-Server-Patches/0125-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch rename to Spigot-Server-Patches/0121-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index a86d1fb450..d51532fdec 100644 --- a/Spigot-Server-Patches/0125-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0121-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -1,14 +1,14 @@ -From b4bdae9a2b04c0adae191946e187b19c9b193483 Mon Sep 17 00:00:00 2001 +From fceddc67b91324c40ed6247fda6d0013ffae368c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Apr 2016 17:48:50 -0400 Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0e1bcdd..9b9d2d7 100644 +index c19c112..0d0db07 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -527,6 +527,7 @@ public abstract class World implements IBlockAccess { +@@ -526,6 +526,7 @@ public abstract class World implements IBlockAccess { } public void applyPhysics(BlockPosition blockposition, Block block) { @@ -17,5 +17,5 @@ index 0e1bcdd..9b9d2d7 100644 this.e(blockposition.east(), block); this.e(blockposition.down(), block); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0126-Don-t-spam-reload-spawn-chunks-in-nether-end.patch b/Spigot-Server-Patches/0122-Don-t-spam-reload-spawn-chunks-in-nether-end.patch similarity index 88% rename from Spigot-Server-Patches/0126-Don-t-spam-reload-spawn-chunks-in-nether-end.patch rename to Spigot-Server-Patches/0122-Don-t-spam-reload-spawn-chunks-in-nether-end.patch index 5350bd5a19..c669f37a4f 100644 --- a/Spigot-Server-Patches/0126-Don-t-spam-reload-spawn-chunks-in-nether-end.patch +++ b/Spigot-Server-Patches/0122-Don-t-spam-reload-spawn-chunks-in-nether-end.patch @@ -1,14 +1,14 @@ -From dcd3a0ec1d9b53b4f994c6d4c0a622f26c82fdef Mon Sep 17 00:00:00 2001 +From f428b285b73ce11e85505b1cf9001aac34ce7ab7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Apr 2016 19:42:22 -0400 Subject: [PATCH] Don't spam reload spawn chunks in nether/end diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9b9d2d7..606ffef 100644 +index 0d0db07..8f3adc5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -3221,6 +3221,7 @@ public abstract class World implements IBlockAccess { +@@ -3235,6 +3235,7 @@ public abstract class World implements IBlockAccess { return this.N; } @@ -31,5 +31,5 @@ index 2d761d4..bc1eaf5 100644 } } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0127-Remove-Debug-checks-from-DataBits.patch b/Spigot-Server-Patches/0123-Remove-Debug-checks-from-DataBits.patch similarity index 95% rename from Spigot-Server-Patches/0127-Remove-Debug-checks-from-DataBits.patch rename to Spigot-Server-Patches/0123-Remove-Debug-checks-from-DataBits.patch index cb8f7f944f..0c3a12fc8a 100644 --- a/Spigot-Server-Patches/0127-Remove-Debug-checks-from-DataBits.patch +++ b/Spigot-Server-Patches/0123-Remove-Debug-checks-from-DataBits.patch @@ -1,4 +1,4 @@ -From 0d6811219ca20f48c7251a8898c019bf068e4a63 Mon Sep 17 00:00:00 2001 +From 2ce292f821ae6d943941e23c1d3d7fda8f905c55 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Apr 2016 21:38:58 -0400 Subject: [PATCH] Remove Debug checks from DataBits @@ -42,5 +42,5 @@ index f3a6799..fa0fd8a 100644 int k = j / 64; int l = ((i + 1) * this.b - 1) / 64; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0128-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0124-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch similarity index 89% rename from Spigot-Server-Patches/0128-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch rename to Spigot-Server-Patches/0124-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch index 7eea507dc5..c0a36a109e 100644 --- a/Spigot-Server-Patches/0128-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ b/Spigot-Server-Patches/0124-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -1,14 +1,14 @@ -From a136dcc9572e613f94c4899405ca51eb81817793 Mon Sep 17 00:00:00 2001 +From e58584a83f045a829e6f346fc7a3e5a157008aef Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 6 Apr 2016 01:04:23 -0500 Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 275bf10..ad69ed3 100644 +index 36f0087..4398814 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -318,4 +318,9 @@ public class PaperWorldConfig { +@@ -312,4 +312,9 @@ public class PaperWorldConfig { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 8)) * 16); log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16)); } @@ -19,10 +19,10 @@ index 275bf10..ad69ed3 100644 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ffbe81d..f0c04e5 100644 +index 3d9a677..724569e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1345,7 +1345,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1344,7 +1344,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { return; } @@ -39,5 +39,5 @@ index ffbe81d..f0c04e5 100644 if (((LazyPlayerSet) event.getRecipients()).isLazy()) { for (Object recipient : minecraftServer.getPlayerList().players) { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0130-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0125-Workaround-for-setting-passengers-on-players.patch similarity index 86% rename from Spigot-Server-Patches/0130-Workaround-for-setting-passengers-on-players.patch rename to Spigot-Server-Patches/0125-Workaround-for-setting-passengers-on-players.patch index e3abd0d75d..fd9f709b55 100644 --- a/Spigot-Server-Patches/0130-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0125-Workaround-for-setting-passengers-on-players.patch @@ -1,4 +1,4 @@ -From 7490f8b95b734c163fc4ef30e271d095486e4162 Mon Sep 17 00:00:00 2001 +From aea778d5f60988e3b8ef469e26e49f4c96f82dde Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 10 Apr 2016 03:23:32 -0500 Subject: [PATCH] Workaround for setting passengers on players @@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index eb88228..b0e4800 100644 +index 2b555c9..7568fc8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -564,6 +564,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -567,6 +567,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return true; } @@ -28,5 +28,5 @@ index eb88228..b0e4800 100644 public void setSneaking(boolean sneak) { getHandle().setSneaking(sneak); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0131-SPIGOT-1903-Update-PlayerConnection-on-teleporting-p.patch b/Spigot-Server-Patches/0126-SPIGOT-1903-Update-PlayerConnection-on-teleporting-p.patch similarity index 83% rename from Spigot-Server-Patches/0131-SPIGOT-1903-Update-PlayerConnection-on-teleporting-p.patch rename to Spigot-Server-Patches/0126-SPIGOT-1903-Update-PlayerConnection-on-teleporting-p.patch index 1a79d59b1a..d7d0721028 100644 --- a/Spigot-Server-Patches/0131-SPIGOT-1903-Update-PlayerConnection-on-teleporting-p.patch +++ b/Spigot-Server-Patches/0126-SPIGOT-1903-Update-PlayerConnection-on-teleporting-p.patch @@ -1,4 +1,4 @@ -From 79460328e041588c8172ed1602ee333378b8f245 Mon Sep 17 00:00:00 2001 +From 97fb0cde3f2129a6111194d08bf4682b6b4fe754 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 10 Apr 2016 22:36:10 -0400 Subject: [PATCH] SPIGOT-1903: Update PlayerConnection on teleporting players @@ -7,10 +7,10 @@ Otherwise the player will trigger a "moved too quickly" next movement packet and rubber band. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c0b0a26..a00baa6 100644 +index b03e9ee..b2dc764 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -288,6 +288,7 @@ public abstract class Entity implements ICommandListener { +@@ -290,6 +290,7 @@ public abstract class Entity implements ICommandListener { this.locX = d0; this.locY = d1; this.locZ = d2; @@ -19,10 +19,10 @@ index c0b0a26..a00baa6 100644 float f1 = this.length; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f0c04e5..d267a44 100644 +index 724569e..4d471ec 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -205,7 +205,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -204,7 +204,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } @@ -32,5 +32,5 @@ index f0c04e5..d267a44 100644 this.m = this.player.locY; this.n = this.player.locZ; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0132-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0127-Remove-unused-World-Tile-Entity-List.patch similarity index 90% rename from Spigot-Server-Patches/0132-Remove-unused-World-Tile-Entity-List.patch rename to Spigot-Server-Patches/0127-Remove-unused-World-Tile-Entity-List.patch index 7d240ec43e..a7e2ff6d39 100644 --- a/Spigot-Server-Patches/0132-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0127-Remove-unused-World-Tile-Entity-List.patch @@ -1,4 +1,4 @@ -From 9af2e9364a19dfbe03b62c5e1e32778fd689b239 Mon Sep 17 00:00:00 2001 +From 6ccec30f3b3880fc79844051e9e47796d1477967 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 00:25:28 -0400 Subject: [PATCH] Remove unused World Tile Entity List @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 606ffef..b860c91 100644 +index 8f3adc5..0c20216 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -69,7 +69,7 @@ public abstract class World implements IBlockAccess { @@ -18,7 +18,7 @@ index 606ffef..b860c91 100644 public final List tileEntityListTick = Lists.newArrayList(); private final List b = Lists.newArrayList(); private final Set tileEntityListUnload = Sets.newHashSet(); // Paper -@@ -1565,7 +1565,7 @@ public abstract class World implements IBlockAccess { +@@ -1564,7 +1564,7 @@ public abstract class World implements IBlockAccess { // CraftBukkit start - From below, clean up tile entities before ticking them if (!this.tileEntityListUnload.isEmpty()) { this.tileEntityListTick.removeAll(this.tileEntityListUnload); @@ -27,7 +27,7 @@ index 606ffef..b860c91 100644 this.tileEntityListUnload.clear(); } // CraftBukkit end -@@ -1616,7 +1616,7 @@ public abstract class World implements IBlockAccess { +@@ -1615,7 +1615,7 @@ public abstract class World implements IBlockAccess { if (tileentity.x()) { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); @@ -36,7 +36,7 @@ index 606ffef..b860c91 100644 if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition()); } -@@ -1654,7 +1654,7 @@ public abstract class World implements IBlockAccess { +@@ -1653,7 +1653,7 @@ public abstract class World implements IBlockAccess { this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); // CraftBukkit start // From above, don't screw this up - SPIGOT-1746 @@ -45,7 +45,7 @@ index 606ffef..b860c91 100644 this.a(tileentity1); } // CraftBukkit end -@@ -1674,9 +1674,9 @@ public abstract class World implements IBlockAccess { +@@ -1673,9 +1673,9 @@ public abstract class World implements IBlockAccess { protected void l() {} public boolean a(TileEntity tileentity) { @@ -67,5 +67,5 @@ index 606ffef..b860c91 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0133-Don-t-tick-Skulls-unused-code.patch b/Spigot-Server-Patches/0128-Don-t-tick-Skulls-unused-code.patch similarity index 81% rename from Spigot-Server-Patches/0133-Don-t-tick-Skulls-unused-code.patch rename to Spigot-Server-Patches/0128-Don-t-tick-Skulls-unused-code.patch index 98ade8dfd4..9e77eb6ecc 100644 --- a/Spigot-Server-Patches/0133-Don-t-tick-Skulls-unused-code.patch +++ b/Spigot-Server-Patches/0128-Don-t-tick-Skulls-unused-code.patch @@ -1,14 +1,14 @@ -From 950604d329faa299c3f98baaba5edab8852e414e Mon Sep 17 00:00:00 2001 +From 9f2a7aa475bb9f7e7ab33c838e6b71e29fd04616 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 00:30:10 -0400 Subject: [PATCH] Don't tick Skulls - unused code diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index 3c20ef3..e652983 100644 +index 49ab25b..cf0de2b 100644 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java -@@ -20,7 +20,7 @@ import com.mojang.authlib.Agent; +@@ -21,7 +21,7 @@ import com.mojang.authlib.Agent; import com.mojang.authlib.ProfileLookupCallback; // Spigot end @@ -18,5 +18,5 @@ index 3c20ef3..e652983 100644 private int a; private int rotation; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0129-16w14a-memory-cleanup.patch b/Spigot-Server-Patches/0129-16w14a-memory-cleanup.patch deleted file mode 100644 index b5260a92ff..0000000000 --- a/Spigot-Server-Patches/0129-16w14a-memory-cleanup.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 566e2d92f7ff276738f7d20e8c6f70d84a230a97 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Thu, 7 Apr 2016 18:28:06 -0500 -Subject: [PATCH] 16w14a memory cleanup - - -diff --git a/src/main/java/net/minecraft/server/PathfinderAbstract.java b/src/main/java/net/minecraft/server/PathfinderAbstract.java -index 51f3758..acbc70a 100644 ---- a/src/main/java/net/minecraft/server/PathfinderAbstract.java -+++ b/src/main/java/net/minecraft/server/PathfinderAbstract.java -@@ -23,7 +23,12 @@ public abstract class PathfinderAbstract { - this.f = MathHelper.d(entityinsentient.width + 1.0F); - } - -- public void a() { this.a = (IBlockAccess) null; } // CraftBukkit - don't leak Chunk Cache -+ // Paper start - 16w14a backports -+ public void a() { -+ this.a = (IBlockAccess) null; // CraftBukkit - don't leak Chunk Cache -+ this.b = null; -+ } -+ // Paper end - - protected PathPoint a(int i, int j, int k) { - int l = PathPoint.b(i, j, k); -diff --git a/src/main/java/net/minecraft/server/PathfinderWater.java b/src/main/java/net/minecraft/server/PathfinderWater.java -index dc7f310..c1df684 100644 ---- a/src/main/java/net/minecraft/server/PathfinderWater.java -+++ b/src/main/java/net/minecraft/server/PathfinderWater.java -@@ -4,6 +4,8 @@ public class PathfinderWater extends PathfinderAbstract { - - public PathfinderWater() {} - -+ // Paper start - 16w14a backports -+ /* - public void a(IBlockAccess iblockaccess, EntityInsentient entityinsentient) { - super.a(iblockaccess, entityinsentient); - } -@@ -11,6 +13,8 @@ public class PathfinderWater extends PathfinderAbstract { - public void a() { - super.a(); - } -+ */ -+ // Paper end - - public PathPoint b() { - return this.a(MathHelper.floor(this.b.getBoundingBox().a), MathHelper.floor(this.b.getBoundingBox().b + 0.5D), MathHelper.floor(this.b.getBoundingBox().c)); --- -2.8.0 - diff --git a/Spigot-Server-Patches/0134-Fix-some-players-not-being-kicked-on-shutdown.patch b/Spigot-Server-Patches/0129-Fix-some-players-not-being-kicked-on-shutdown.patch similarity index 86% rename from Spigot-Server-Patches/0134-Fix-some-players-not-being-kicked-on-shutdown.patch rename to Spigot-Server-Patches/0129-Fix-some-players-not-being-kicked-on-shutdown.patch index 6c9a4ea904..9e1f8c9b51 100644 --- a/Spigot-Server-Patches/0134-Fix-some-players-not-being-kicked-on-shutdown.patch +++ b/Spigot-Server-Patches/0129-Fix-some-players-not-being-kicked-on-shutdown.patch @@ -1,14 +1,14 @@ -From da4a8f81583a30ec10fb3091809c250a82a0ce36 Mon Sep 17 00:00:00 2001 +From 01394f77038783cd529dd8069cbf0084e9f4a9b7 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Tue, 29 Mar 2016 20:19:20 -0400 Subject: [PATCH] Fix some players not being kicked on shutdown diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 94f122d..d4de4e9 100644 +index ac3bdd1..9d25312 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1292,9 +1292,11 @@ public abstract class PlayerList { +@@ -1294,9 +1294,11 @@ public abstract class PlayerList { } public void u() { @@ -23,5 +23,5 @@ index 94f122d..d4de4e9 100644 } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0135-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0130-Configurable-Player-Collision.patch similarity index 92% rename from Spigot-Server-Patches/0135-Configurable-Player-Collision.patch rename to Spigot-Server-Patches/0130-Configurable-Player-Collision.patch index c3412d0e8e..4908e7728f 100644 --- a/Spigot-Server-Patches/0135-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0130-Configurable-Player-Collision.patch @@ -1,11 +1,11 @@ -From 0b3b814c8fa928163e6a16635730d335b2deb387 Mon Sep 17 00:00:00 2001 +From ddb5bbdf878a0a86918a586be6c6f3ee9d3adc55 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 02:10:49 -0400 Subject: [PATCH] Configurable Player Collision diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 431faa8..288af0c 100644 +index 3c52736..1199fa2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -218,4 +218,9 @@ public class PaperConfig { @@ -19,7 +19,7 @@ index 431faa8..288af0c 100644 + } } diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java -index f86bf8d..766b764 100644 +index dbdb87f..ef39400 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java @@ -96,7 +96,7 @@ public class PacketPlayOutScoreboardTeam implements Packet Date: Wed, 13 Apr 2016 20:21:38 -0700 Subject: [PATCH] Add handshake event to allow plugins to handle client @@ -6,10 +6,10 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 5f8d853..4d496fd 100644 +index 08199c6..0641d06 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java -@@ -73,8 +73,33 @@ public class HandshakeListener implements PacketHandshakingInListener { +@@ -72,8 +72,33 @@ public class HandshakeListener implements PacketHandshakingInListener { this.b.close(chatcomponenttext); } else { this.b.setPacketListener(new LoginListener(this.a, this.b)); @@ -45,5 +45,5 @@ index 5f8d853..4d496fd 100644 if ( split.length == 3 || split.length == 4 ) { packethandshakinginsetprotocol.hostname = split[0]; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0137-Water-mobs-should-only-spawn-in-the-water.patch b/Spigot-Server-Patches/0132-Water-mobs-should-only-spawn-in-the-water.patch similarity index 89% rename from Spigot-Server-Patches/0137-Water-mobs-should-only-spawn-in-the-water.patch rename to Spigot-Server-Patches/0132-Water-mobs-should-only-spawn-in-the-water.patch index 77f91f27a5..fc25d77a70 100644 --- a/Spigot-Server-Patches/0137-Water-mobs-should-only-spawn-in-the-water.patch +++ b/Spigot-Server-Patches/0132-Water-mobs-should-only-spawn-in-the-water.patch @@ -1,17 +1,17 @@ -From 9ba6fb4551a4bb79631da91826fa8765f02e146a Mon Sep 17 00:00:00 2001 +From be54bf686dd2fbe6528d08306687f099f400e9e1 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 14 Apr 2016 17:48:56 -0500 Subject: [PATCH] Water mobs should only spawn in the water diff --git a/src/main/java/net/minecraft/server/EntityWaterAnimal.java b/src/main/java/net/minecraft/server/EntityWaterAnimal.java -index f4764da..9cd85f1 100644 +index b439a2b..c3b86bb5 100644 --- a/src/main/java/net/minecraft/server/EntityWaterAnimal.java +++ b/src/main/java/net/minecraft/server/EntityWaterAnimal.java @@ -11,7 +11,15 @@ public abstract class EntityWaterAnimal extends EntityInsentient implements IAni } - public boolean cF() { + public boolean cG() { - return true; + // Paper start - Don't let water mobs spawn in non-water blocks + // Based around EntityAnimal's implementation @@ -26,5 +26,5 @@ index f4764da..9cd85f1 100644 public boolean canSpawn() { -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0138-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch b/Spigot-Server-Patches/0133-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch similarity index 95% rename from Spigot-Server-Patches/0138-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch rename to Spigot-Server-Patches/0133-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch index ff55c9e608..b2e596c4a7 100644 --- a/Spigot-Server-Patches/0138-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch +++ b/Spigot-Server-Patches/0133-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch @@ -1,4 +1,4 @@ -From eaba50af8952de33874cb371e284e38eb4a7db16 Mon Sep 17 00:00:00 2001 +From 8b6deba310ca28fe576b153349c97cb9aaab5f65 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 14 Apr 2016 21:01:39 -0400 Subject: [PATCH] Fix Bugs with Spigot Mob Spawn Logic @@ -14,7 +14,7 @@ Specially with servers using smaller mob spawn ranges than view distance, as wel This patch returns mob counting to use all loaded chunks, and 17x17 division. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9334a0a..5c1685d 100644 +index f7452b3..773b153 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -704,7 +704,7 @@ public class Chunk { @@ -27,7 +27,7 @@ index 9334a0a..5c1685d 100644 if (entity instanceof EntityItem) { itemCounts[i]--; diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 15a0ce9..b47feb2 100644 +index 9fd0473..a034db2 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -21,6 +21,15 @@ public final class SpawnerCreature { @@ -56,5 +56,5 @@ index 15a0ce9..b47feb2 100644 Iterator iterator1 = this.b.iterator(); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0139-Allow-capping-number-of-attempts-at-spawning-mobs.patch b/Spigot-Server-Patches/0134-Allow-capping-number-of-attempts-at-spawning-mobs.patch similarity index 92% rename from Spigot-Server-Patches/0139-Allow-capping-number-of-attempts-at-spawning-mobs.patch rename to Spigot-Server-Patches/0134-Allow-capping-number-of-attempts-at-spawning-mobs.patch index a4798f78fd..9f5b34af01 100644 --- a/Spigot-Server-Patches/0139-Allow-capping-number-of-attempts-at-spawning-mobs.patch +++ b/Spigot-Server-Patches/0134-Allow-capping-number-of-attempts-at-spawning-mobs.patch @@ -1,4 +1,4 @@ -From ebaba6c7eb90259b93511de847a2857cc51957ee Mon Sep 17 00:00:00 2001 +From bba590ef48a38b044e9e7ceb69af8f19015abd39 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 15 Apr 2016 21:27:14 -0400 Subject: [PATCH] Allow capping number of attempts at spawning mobs @@ -10,10 +10,10 @@ This patch will cap the # of attempts to so that the tick does not spend extra long time on mob spawning diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index ad69ed3..77fb334 100644 +index 4398814..4f3fc82 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -323,4 +323,10 @@ public class PaperWorldConfig { +@@ -317,4 +317,10 @@ public class PaperWorldConfig { private void useVanillaScoreboardColoring() { useVanillaScoreboardColoring = getBoolean("use-vanilla-world-scoreboard-name-coloring", false); } @@ -25,7 +25,7 @@ index ad69ed3..77fb334 100644 + } } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index b47feb2..d97b7a2 100644 +index a034db2..113a372 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -140,8 +140,9 @@ public final class SpawnerCreature { @@ -40,5 +40,5 @@ index b47feb2..d97b7a2 100644 long key = ((Long) iterator1.next()).longValue(); BlockPosition blockposition1 = getRandomPosition(worldserver, LongHash.msw(key), LongHash.lsw(key)); -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0140-Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/0135-Configurable-RCON-IP-address.patch similarity index 93% rename from Spigot-Server-Patches/0140-Configurable-RCON-IP-address.patch rename to Spigot-Server-Patches/0135-Configurable-RCON-IP-address.patch index b183f008e5..ac162325df 100644 --- a/Spigot-Server-Patches/0140-Configurable-RCON-IP-address.patch +++ b/Spigot-Server-Patches/0135-Configurable-RCON-IP-address.patch @@ -1,4 +1,4 @@ -From afc331f36540c02aa5a3aafcb3d00bb32fe1f1ff Mon Sep 17 00:00:00 2001 +From 6af571f68b3d32ada3218e9406e09087329afe9c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 16 Apr 2016 00:39:33 -0400 Subject: [PATCH] Configurable RCON IP address @@ -19,5 +19,5 @@ index 8309a99..3a6561a 100644 if (0 == this.h) { this.h = this.i + 10; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0141-Prevent-Fire-from-loading-chunks.patch b/Spigot-Server-Patches/0136-Prevent-Fire-from-loading-chunks.patch similarity index 87% rename from Spigot-Server-Patches/0141-Prevent-Fire-from-loading-chunks.patch rename to Spigot-Server-Patches/0136-Prevent-Fire-from-loading-chunks.patch index b9efd5bfeb..72b5a939a4 100644 --- a/Spigot-Server-Patches/0141-Prevent-Fire-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0136-Prevent-Fire-from-loading-chunks.patch @@ -1,4 +1,4 @@ -From 4f5ed1d45344eb5daed1931745177665006623c3 Mon Sep 17 00:00:00 2001 +From 24a5d2b07f91ca93ea021402ebbd2c51bc2010b1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 17 Apr 2016 17:27:09 -0400 Subject: [PATCH] Prevent Fire from loading chunks @@ -7,10 +7,10 @@ This causes the nether to spam unload/reload chunks, plus overall bad behavior. diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index ae433b2..22f74a6 100644 +index cb11099..951f0cf 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java -@@ -160,6 +160,7 @@ public class BlockFire extends Block { +@@ -162,6 +162,7 @@ public class BlockFire extends Block { } BlockPosition blockposition1 = blockposition.a(j, l, k); @@ -18,7 +18,7 @@ index ae433b2..22f74a6 100644 int j1 = this.d(world, blockposition1); if (j1 > 0) { -@@ -228,10 +229,12 @@ public class BlockFire extends Block { +@@ -230,10 +231,12 @@ public class BlockFire extends Block { } private void a(World world, BlockPosition blockposition, int i, Random random, int j) { @@ -33,7 +33,7 @@ index ae433b2..22f74a6 100644 // CraftBukkit start org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -289,7 +292,9 @@ public class BlockFire extends Block { +@@ -291,7 +294,9 @@ public class BlockFire extends Block { for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[k]; @@ -45,5 +45,5 @@ index ae433b2..22f74a6 100644 return i; -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0142-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0137-Implement-PlayerLocaleChangeEvent.patch similarity index 72% rename from Spigot-Server-Patches/0142-Implement-PlayerLocaleChangeEvent.patch rename to Spigot-Server-Patches/0137-Implement-PlayerLocaleChangeEvent.patch index f8795419c0..00a0e35abd 100644 --- a/Spigot-Server-Patches/0142-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0137-Implement-PlayerLocaleChangeEvent.patch @@ -1,23 +1,23 @@ -From 807032786429cbaf3985e457d83dfdb46a195348 Mon Sep 17 00:00:00 2001 +From 36de0ebaee44a6c862e91ce02328130379638d41 Mon Sep 17 00:00:00 2001 From: Isaac Moore Date: Tue, 19 Apr 2016 14:09:31 -0500 Subject: [PATCH] Implement PlayerLocaleChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 4bf8344..6fdf276 100644 +index 723d40c..44df116 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -25,7 +25,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; +@@ -26,7 +26,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; public class EntityPlayer extends EntityHuman implements ICrafting { - private static final Logger bQ = LogManager.getLogger(); + private static final Logger bR = LogManager.getLogger(); - public String locale = "en_US"; // Spigot private -> public + public String locale = null; // Spigot private -> public // Paper - default to null public PlayerConnection playerConnection; public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; -@@ -1076,7 +1076,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1073,7 +1073,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } public void a(PacketPlayInSettings packetplayinsettings) { @@ -26,17 +26,17 @@ index 4bf8344..6fdf276 100644 + String oldLocale = this.locale; this.locale = packetplayinsettings.a(); + if (!this.locale.equals(oldLocale)) { -+ CraftEventFactory.callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), oldLocale, this.locale)); ++ new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), oldLocale, this.locale).callEvent(); + } + // Paper end - this.cf = packetplayinsettings.c(); - this.cg = packetplayinsettings.d(); - this.getDataWatcher().set(EntityPlayer.bp, Byte.valueOf((byte) packetplayinsettings.e())); + this.cg = packetplayinsettings.c(); + this.ch = packetplayinsettings.d(); + this.getDataWatcher().set(EntityPlayer.bq, Byte.valueOf((byte) packetplayinsettings.e())); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 78a8631..003f700 100644 +index 7568fc8..d23cade 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1654,7 +1654,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1657,7 +1657,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { @@ -49,5 +49,5 @@ index 78a8631..003f700 100644 @Override -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0143-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0138-EntityRegainHealthEvent-isFastRegen-API.patch similarity index 91% rename from Spigot-Server-Patches/0143-EntityRegainHealthEvent-isFastRegen-API.patch rename to Spigot-Server-Patches/0138-EntityRegainHealthEvent-isFastRegen-API.patch index 31cf1d682a..0196affd87 100644 --- a/Spigot-Server-Patches/0143-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/0138-EntityRegainHealthEvent-isFastRegen-API.patch @@ -1,4 +1,4 @@ -From a2f3aefe9b23c243c566ed5dd1e06b133dd1b09e Mon Sep 17 00:00:00 2001 +From 2ecdfc5475eb3774493dbfc05aee7822b79b2333 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 01:43:11 -0500 Subject: [PATCH] EntityRegainHealthEvent isFastRegen API @@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 41b63ce..adf91bc 100644 +index df4d8d8..129bca8 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -731,10 +731,16 @@ public abstract class EntityLiving extends Entity { +@@ -734,10 +734,16 @@ public abstract class EntityLiving extends Entity { } public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) { @@ -28,7 +28,7 @@ index 41b63ce..adf91bc 100644 if (!event.isCancelled()) { diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java -index 1a24336..bd367cf 100644 +index df5fbeb..ebadb37 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -65,7 +65,7 @@ public class FoodMetaData { @@ -41,5 +41,5 @@ index 1a24336..bd367cf 100644 this.foodTickTimer = 0; } -- -2.8.0 +2.8.2 diff --git a/Spigot-Server-Patches/0144-Add-ability-to-configure-frosted_ice-properties.patch b/Spigot-Server-Patches/0139-Add-ability-to-configure-frosted_ice-properties.patch similarity index 90% rename from Spigot-Server-Patches/0144-Add-ability-to-configure-frosted_ice-properties.patch rename to Spigot-Server-Patches/0139-Add-ability-to-configure-frosted_ice-properties.patch index fec46e722f..45c3c4347f 100644 --- a/Spigot-Server-Patches/0144-Add-ability-to-configure-frosted_ice-properties.patch +++ b/Spigot-Server-Patches/0139-Add-ability-to-configure-frosted_ice-properties.patch @@ -1,14 +1,14 @@ -From bfef45a85225f02bc0c1ec53b899104c809a4fe0 Mon Sep 17 00:00:00 2001 +From 35e06d3fc58b053ed9ed82a14fb91cfca3fa8ff0 Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 21 Apr 2016 23:51:55 -0700 Subject: [PATCH] Add ability to configure frosted_ice properties diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 77fb334..9a9e2eb 100644 +index 4f3fc82..b39acc4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -329,4 +329,14 @@ public class PaperWorldConfig { +@@ -323,4 +323,14 @@ public class PaperWorldConfig { maxMobSpawnAttempts = getInt("max-mob-spawn-attempts", 50); log( "Max Mob Spawn Attempts: " + maxMobSpawnAttempts); } @@ -24,10 +24,10 @@ index 77fb334..9a9e2eb 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java -index d8ddf83..0f70734 100644 +index 8f502b9..bddfea0 100644 --- a/src/main/java/net/minecraft/server/BlockIceFrost.java +++ b/src/main/java/net/minecraft/server/BlockIceFrost.java -@@ -19,10 +19,14 @@ public class BlockIceFrost extends BlockIce { +@@ -20,10 +20,14 @@ public class BlockIceFrost extends BlockIce { } public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { @@ -44,5 +44,5 @@ index d8ddf83..0f70734 100644 } -- -2.7.4 +2.8.2 diff --git a/Spigot-Server-Patches/0145-Vehicle-Event-Cancellation-Changes.patch b/Spigot-Server-Patches/0140-Vehicle-Event-Cancellation-Changes.patch similarity index 78% rename from Spigot-Server-Patches/0145-Vehicle-Event-Cancellation-Changes.patch rename to Spigot-Server-Patches/0140-Vehicle-Event-Cancellation-Changes.patch index 4883394e97..93f035051e 100644 --- a/Spigot-Server-Patches/0145-Vehicle-Event-Cancellation-Changes.patch +++ b/Spigot-Server-Patches/0140-Vehicle-Event-Cancellation-Changes.patch @@ -1,34 +1,34 @@ -From 585ab1295463023ffa92fd3f3dd128634f1d7a5c Mon Sep 17 00:00:00 2001 +From 76ee96877676bceaed80df78b73f2a327b8573c6 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 18:20:05 -0500 Subject: [PATCH] Vehicle Event Cancellation Changes diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a00baa6..804b345 100644 +index b2dc764..2374a35 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1651,6 +1651,10 @@ public abstract class Entity implements ICommandListener { +@@ -1658,6 +1658,10 @@ public abstract class Entity implements ICommandListener { } public boolean a(Entity entity, boolean flag) { -+ return this.a(entity, flag, false); // Paper ++ return this.mountEntity(entity, flag, false); // Paper - forward + } + -+ public boolean a(Entity entity, boolean flag, boolean suppressEvents) { // Paper - Add suppress ++ public boolean mountEntity(Entity entity, boolean flag, boolean suppressEvents) { // Paper if (!flag && (!this.n(entity) || !entity.q(this))) { return false; } else { -@@ -1659,7 +1663,7 @@ public abstract class Entity implements ICommandListener { +@@ -1666,7 +1670,7 @@ public abstract class Entity implements ICommandListener { } - this.as = entity; -- this.as.o(this); -+ this.as.addRider(this, suppressEvents); // Paper + this.at = entity; +- this.at.o(this); ++ this.at.addRider(this, suppressEvents); // Paper return true; } } -@@ -1686,12 +1690,20 @@ public abstract class Entity implements ICommandListener { +@@ -1693,12 +1697,20 @@ public abstract class Entity implements ICommandListener { } protected void o(Entity entity) { @@ -38,7 +38,7 @@ index a00baa6..804b345 100644 + + private void addRider(Entity entity, boolean suppressEvents) { + // Paper end - if (entity.by() != this) { + if (entity.bz() != this) { throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); } else { // CraftBukkit start @@ -49,16 +49,16 @@ index a00baa6..804b345 100644 CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle(); Entity orig = craft == null ? null : craft.getHandle(); if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4, false)) { // Boolean not used -@@ -1714,6 +1726,8 @@ public abstract class Entity implements ICommandListener { +@@ -1721,6 +1733,8 @@ public abstract class Entity implements ICommandListener { return; } // Spigot end + // ============================================================= + } // Paper - end suppressible block - if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bt() instanceof EntityHuman)) { + if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bu() instanceof EntityHuman)) { this.passengers.add(0, entity); } else { -@@ -1739,16 +1753,29 @@ public abstract class Entity implements ICommandListener { +@@ -1746,16 +1760,29 @@ public abstract class Entity implements ICommandListener { CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); Entity n = craftn == null ? null : craftn.getHandle(); if (event.isCancelled() || n != orig) { @@ -82,13 +82,13 @@ index a00baa6..804b345 100644 + // Paper start + private void cancelDismount(Entity dismounter) { + this.passengers.remove(dismounter); -+ dismounter.a(this, false, true); ++ dismounter.mountEntity(this, false, true); + } + // Paper end + protected boolean q(Entity entity) { - return this.bu().size() < 1; + return this.bv().size() < 1; } -- -2.5.0 +2.8.2 diff --git a/Spigot-Server-Patches/0146-Arrow-pickup-rule-API.patch b/Spigot-Server-Patches/0141-Arrow-pickup-rule-API.patch similarity index 96% rename from Spigot-Server-Patches/0146-Arrow-pickup-rule-API.patch rename to Spigot-Server-Patches/0141-Arrow-pickup-rule-API.patch index 179e1adb67..34cb2f84c7 100644 --- a/Spigot-Server-Patches/0146-Arrow-pickup-rule-API.patch +++ b/Spigot-Server-Patches/0141-Arrow-pickup-rule-API.patch @@ -1,4 +1,4 @@ -From 3a910e832faa6f75cf179075ab1b884aeb9dd744 Mon Sep 17 00:00:00 2001 +From bb373b3b0dad597e4f58085441298a085988ec94 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Fri, 4 Mar 2016 03:16:11 -0500 Subject: [PATCH] Arrow pickup rule API @@ -54,5 +54,5 @@ index 2a3482c..fbf289f 100644 private final Arrow.Spigot spigot = new Arrow.Spigot() { -- -2.5.0 +2.8.2 diff --git a/Spigot-Server-Patches/0147-Check-entity-count-additions-and-mark-entities-remov.patch b/Spigot-Server-Patches/0142-Check-entity-count-additions-and-mark-entities-remov.patch similarity index 94% rename from Spigot-Server-Patches/0147-Check-entity-count-additions-and-mark-entities-remov.patch rename to Spigot-Server-Patches/0142-Check-entity-count-additions-and-mark-entities-remov.patch index 4478722b03..26a1fb9059 100644 --- a/Spigot-Server-Patches/0147-Check-entity-count-additions-and-mark-entities-remov.patch +++ b/Spigot-Server-Patches/0142-Check-entity-count-additions-and-mark-entities-remov.patch @@ -1,11 +1,11 @@ -From 9ca006490279df3289be6f59ef4e8ba0ed5eb89e Mon Sep 17 00:00:00 2001 +From f9b11fc494edca4b6c42d180fa214cac92fadcdf Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 20:34:21 -0500 Subject: [PATCH] Check entity count additions and mark entities removed diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 5c1685d..dff47c3 100644 +index 773b153..4953e97 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -661,12 +661,36 @@ public class Chunk { @@ -54,10 +54,10 @@ index 5c1685d..dff47c3 100644 // Spigot start - decrement creature type count // Keep this synced up with World.a(Class) diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b860c91..a8ea92c 100644 +index 0c20216..2e767e4 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1750,7 +1750,7 @@ public abstract class World implements IBlockAccess { +@@ -1749,7 +1749,7 @@ public abstract class World implements IBlockAccess { } int k = MathHelper.floor(entity.locX / 16.0D); @@ -67,5 +67,5 @@ index b860c91..a8ea92c 100644 if (!entity.aa || entity.ab != k || entity.ac != l || entity.ad != i1) { -- -2.5.0 +2.8.2 diff --git a/Spigot-Server-Patches/0148-SPIGOT-1401-Fix-dispenser-dropper-furnace-placement.patch b/Spigot-Server-Patches/0143-SPIGOT-1401-Fix-dispenser-dropper-furnace-placement.patch similarity index 78% rename from Spigot-Server-Patches/0148-SPIGOT-1401-Fix-dispenser-dropper-furnace-placement.patch rename to Spigot-Server-Patches/0143-SPIGOT-1401-Fix-dispenser-dropper-furnace-placement.patch index 2433764756..35ae0f48dc 100644 --- a/Spigot-Server-Patches/0148-SPIGOT-1401-Fix-dispenser-dropper-furnace-placement.patch +++ b/Spigot-Server-Patches/0143-SPIGOT-1401-Fix-dispenser-dropper-furnace-placement.patch @@ -1,14 +1,14 @@ -From ccd5b8d392bc85425d9b65037a038314c7c5ad19 Mon Sep 17 00:00:00 2001 +From 33bc5ffd91ccca0e30489cba02ec2963f670e086 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 24 Apr 2016 19:49:33 -0500 Subject: [PATCH] SPIGOT-1401: Fix dispenser, dropper, furnace placement diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java -index b051b44..0235c7b 100644 +index 9e80efe..337a1cb 100644 --- a/src/main/java/net/minecraft/server/BlockDispenser.java +++ b/src/main/java/net/minecraft/server/BlockDispenser.java -@@ -20,6 +20,9 @@ public class BlockDispenser extends BlockTileEntity { +@@ -21,6 +21,9 @@ public class BlockDispenser extends BlockTileEntity { return 4; } @@ -18,20 +18,20 @@ index b051b44..0235c7b 100644 public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { super.onPlace(world, blockposition, iblockdata); this.e(world, blockposition, iblockdata); -@@ -49,6 +52,8 @@ public class BlockDispenser extends BlockTileEntity { +@@ -50,6 +53,8 @@ public class BlockDispenser extends BlockTileEntity { world.setTypeAndData(blockposition, iblockdata.set(BlockDispenser.FACING, enumdirection).set(BlockDispenser.TRIGGERED, Boolean.valueOf(false)), 2); } } + */ + // Paper end - public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) { + public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, @Nullable ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) { if (world.isClientSide) { diff --git a/src/main/java/net/minecraft/server/BlockFurnace.java b/src/main/java/net/minecraft/server/BlockFurnace.java -index 7a95974..6bc9aa8 100644 +index 61a6b8a..25f7b4b 100644 --- a/src/main/java/net/minecraft/server/BlockFurnace.java +++ b/src/main/java/net/minecraft/server/BlockFurnace.java -@@ -18,6 +18,9 @@ public class BlockFurnace extends BlockTileEntity { +@@ -20,6 +20,9 @@ public class BlockFurnace extends BlockTileEntity { return Item.getItemOf(Blocks.FURNACE); } @@ -41,15 +41,15 @@ index 7a95974..6bc9aa8 100644 public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { this.e(world, blockposition, iblockdata); } -@@ -43,6 +46,8 @@ public class BlockFurnace extends BlockTileEntity { +@@ -45,6 +48,8 @@ public class BlockFurnace extends BlockTileEntity { world.setTypeAndData(blockposition, iblockdata.set(BlockFurnace.FACING, enumdirection), 2); } } + */ + // Paper end - public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) { + public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, @Nullable ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) { if (world.isClientSide) { -- -2.5.0 +2.8.2 diff --git a/Spigot-Server-Patches/0149-Reimplement-PlayerEditBookEvent.patch b/Spigot-Server-Patches/0144-Reimplement-PlayerEditBookEvent.patch similarity index 87% rename from Spigot-Server-Patches/0149-Reimplement-PlayerEditBookEvent.patch rename to Spigot-Server-Patches/0144-Reimplement-PlayerEditBookEvent.patch index 95973d4e76..3869f1ec0d 100644 --- a/Spigot-Server-Patches/0149-Reimplement-PlayerEditBookEvent.patch +++ b/Spigot-Server-Patches/0144-Reimplement-PlayerEditBookEvent.patch @@ -1,14 +1,14 @@ -From 28dc0e6616aa92018560ce197d7b71f68170402c Mon Sep 17 00:00:00 2001 +From daafbd9ad18ff3fab1e810dbf51ea59ccb3af390 Mon Sep 17 00:00:00 2001 From: willies952002 Date: Sat, 23 Apr 2016 19:51:19 -0400 Subject: [PATCH] Reimplement PlayerEditBookEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d2aec29..c2dfe72 100644 +index 4d471ec..cf27086 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2209,6 +2209,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2207,6 +2207,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { ItemStack itemstack; ItemStack itemstack1; @@ -16,7 +16,7 @@ index d2aec29..c2dfe72 100644 if ("MC|BEdit".equals(s)) { packetdataserializer = new PacketDataSerializer(Unpooled.wrappedBuffer(packetplayincustompayload.b())); -@@ -2226,12 +2227,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2224,12 +2225,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { if (itemstack1 != null) { if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) { itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8)); @@ -31,7 +31,7 @@ index d2aec29..c2dfe72 100644 return; } finally { packetdataserializer.release(); -@@ -2271,12 +2274,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2269,12 +2272,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { itemstack1.a("pages", (NBTBase) nbttaglist); itemstack1.setItem(Items.WRITTEN_BOOK); @@ -46,7 +46,7 @@ index d2aec29..c2dfe72 100644 return; } finally { packetdataserializer.release(); -@@ -2342,6 +2347,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2340,6 +2345,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } } catch (Exception exception3) { PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3); @@ -54,7 +54,7 @@ index d2aec29..c2dfe72 100644 } finally { packetdataserializer.release(); } -@@ -2411,6 +2417,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2409,6 +2415,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } } catch (Exception exception4) { PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4); @@ -62,7 +62,7 @@ index d2aec29..c2dfe72 100644 } finally { packetdataserializer.release(); } -@@ -2436,6 +2443,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2434,6 +2441,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } } catch (Exception exception5) { PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5); @@ -70,7 +70,7 @@ index d2aec29..c2dfe72 100644 } } } else if ("MC|ItemName".equals(s)) { -@@ -2538,6 +2546,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -2536,6 +2544,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { } } } @@ -85,5 +85,5 @@ index d2aec29..c2dfe72 100644 } -- -2.5.0 +2.8.2 diff --git a/Spigot-Server-Patches/0150-Improve-Minecraft-Hopper-Performance.patch b/Spigot-Server-Patches/0145-Improve-Minecraft-Hopper-Performance.patch similarity index 85% rename from Spigot-Server-Patches/0150-Improve-Minecraft-Hopper-Performance.patch rename to Spigot-Server-Patches/0145-Improve-Minecraft-Hopper-Performance.patch index e4b6cf4ebb..b222364ced 100644 --- a/Spigot-Server-Patches/0150-Improve-Minecraft-Hopper-Performance.patch +++ b/Spigot-Server-Patches/0145-Improve-Minecraft-Hopper-Performance.patch @@ -1,4 +1,4 @@ -From aa73526a81df5b7120cf6c8384b7a5840c46e00d Mon Sep 17 00:00:00 2001 +From ff070ed082dcd1c44676ba68b3d39daed7b88b90 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Apr 2016 22:09:52 -0400 Subject: [PATCH] Improve Minecraft Hopper Performance @@ -7,7 +7,7 @@ Removes unnecessary extra calls to .update() that are very expensive Also reset cooldown each hopper tick that a hopper is full. diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index f579d28..6962c1b 100644 +index f59e6f8..85f97cc 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -36,6 +36,7 @@ public abstract class TileEntity { @@ -18,7 +18,7 @@ index f579d28..6962c1b 100644 public World getWorld() { return this.world; } -@@ -105,6 +106,7 @@ public abstract class TileEntity { +@@ -110,6 +111,7 @@ public abstract class TileEntity { public void update() { if (this.world != null) { @@ -27,10 +27,10 @@ index f579d28..6962c1b 100644 this.h = iblockdata.getBlock().toLegacyData(iblockdata); diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 243da36..68d096f 100644 +index de458c8..ec0b1ca 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -185,12 +185,15 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -190,12 +190,15 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi } // Paper end } @@ -46,7 +46,7 @@ index 243da36..68d096f 100644 private boolean q() { ItemStack[] aitemstack = this.items; int i = aitemstack.length; -@@ -485,7 +488,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -490,7 +493,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi boolean flag = false; if (itemstack1 == null) { @@ -56,7 +56,7 @@ index 243da36..68d096f 100644 itemstack = null; flag = true; } else if (a(itemstack1, itemstack)) { -@@ -505,7 +510,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -510,7 +515,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi tileentityhopper.setCooldown(tileentityhopper.world.spigotConfig.hopperTransfer); // Spigot } @@ -65,7 +65,7 @@ index 243da36..68d096f 100644 } iinventory.update(); -@@ -580,6 +585,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -585,6 +590,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi this.g = i; } @@ -74,5 +74,5 @@ index 243da36..68d096f 100644 return this.g > 0; } -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0151-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0146-remove-null-possibility-for-getServer-singleton.patch similarity index 85% rename from Spigot-Server-Patches/0151-remove-null-possibility-for-getServer-singleton.patch rename to Spigot-Server-Patches/0146-remove-null-possibility-for-getServer-singleton.patch index 2ab267ef10..9040bdbf49 100644 --- a/Spigot-Server-Patches/0151-remove-null-possibility-for-getServer-singleton.patch +++ b/Spigot-Server-Patches/0146-remove-null-possibility-for-getServer-singleton.patch @@ -1,4 +1,4 @@ -From a1323acf735c05c96afd84a30ba5d9059f78582b Mon Sep 17 00:00:00 2001 +From 31e86975e071304b48ecb3c603ab1a4774e81720 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 Apr 2016 00:57:27 -0400 Subject: [PATCH] remove null possibility for getServer singleton @@ -6,10 +6,10 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 26380e7..6efc569 100644 +index 02e8551..3b04681 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -54,6 +54,7 @@ import java.util.Queue; +@@ -59,6 +59,7 @@ import java.util.Queue; public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics { @@ -17,7 +17,7 @@ index 26380e7..6efc569 100644 public static final Logger LOGGER = LogManager.getLogger(); public static final File a = new File("usercache.json"); public Convertable convertable; -@@ -122,6 +123,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -127,6 +128,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs // CraftBukkit end public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) { @@ -25,7 +25,7 @@ index 26380e7..6efc569 100644 io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable this.e = proxy; this.U = yggdrasilauthenticationservice; -@@ -1618,7 +1620,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -1624,7 +1626,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs // CraftBukkit start @Deprecated public static MinecraftServer getServer() { @@ -35,5 +35,5 @@ index 26380e7..6efc569 100644 // CraftBukkit end -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0152-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0147-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch similarity index 89% rename from Spigot-Server-Patches/0152-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch rename to Spigot-Server-Patches/0147-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index f5fc5cef09..742b3470b3 100644 --- a/Spigot-Server-Patches/0152-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0147-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -1,4 +1,4 @@ -From 5b8c37f48e7bb8fbe2e82e2a3f299d44b1ed414f Mon Sep 17 00:00:00 2001 +From 8e9e6eadd852b2360b4be33223a402533f0f1fe6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Apr 2016 20:02:00 -0400 Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes @@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system. Additionally, numerous issues to player position tracking on maps has been fixed. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 767c384..03f1a1d 100644 +index 0f73fcf..696f21f 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -585,6 +585,12 @@ public abstract class EntityHuman extends EntityLiving { +@@ -589,6 +589,12 @@ public abstract class EntityHuman extends EntityLiving { return null; } // CraftBukkit end @@ -30,7 +30,7 @@ index 767c384..03f1a1d 100644 ItemStack itemstack1 = this.a(entityitem); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 1602dff..a012d20 100644 +index 6c8da79..38e88d8 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -90,11 +90,11 @@ public class EntityTrackerEntry { @@ -48,10 +48,10 @@ index 1602dff..a012d20 100644 Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a8ea92c..c453981 100644 +index 2e767e4..741850e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1151,6 +1151,7 @@ public abstract class World implements IBlockAccess { +@@ -1154,6 +1154,7 @@ public abstract class World implements IBlockAccess { { if ( iter.next().trackee == entity ) { @@ -60,10 +60,10 @@ index a8ea92c..c453981 100644 } } diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java -index e090fea..2fe7402 100644 +index 7f604ca..e3e56f3 100644 --- a/src/main/java/net/minecraft/server/WorldMap.java +++ b/src/main/java/net/minecraft/server/WorldMap.java -@@ -26,6 +26,7 @@ public class WorldMap extends PersistentBase { +@@ -27,6 +27,7 @@ public class WorldMap extends PersistentBase { public List h = Lists.newArrayList(); public Map j = Maps.newHashMap(); // Spigot public Map decorations = Maps.newLinkedHashMap(); // Spigot @@ -71,7 +71,7 @@ index e090fea..2fe7402 100644 // CraftBukkit start public final CraftMapView mapView; -@@ -38,6 +39,7 @@ public class WorldMap extends PersistentBase { +@@ -39,6 +40,7 @@ public class WorldMap extends PersistentBase { // CraftBukkit start mapView = new CraftMapView(this); server = (CraftServer) org.bukkit.Bukkit.getServer(); @@ -79,7 +79,7 @@ index e090fea..2fe7402 100644 // CraftBukkit end } -@@ -111,6 +113,7 @@ public class WorldMap extends PersistentBase { +@@ -112,6 +114,7 @@ public class WorldMap extends PersistentBase { } } } @@ -87,15 +87,15 @@ index e090fea..2fe7402 100644 } -@@ -144,6 +147,7 @@ public class WorldMap extends PersistentBase { - nbttagcompound.setBoolean("trackingPosition", this.track); +@@ -146,6 +149,7 @@ public class WorldMap extends PersistentBase { + return nbttagcompound; } + public void updateSeenPlayers(EntityHuman entityhuman, ItemStack itemstack) { a(entityhuman, itemstack); } // Paper // OBFHELPER public void a(EntityHuman entityhuman, ItemStack itemstack) { if (!this.j.containsKey(entityhuman)) { WorldMap.WorldMapHumanTracker worldmap_worldmaphumantracker = new WorldMap.WorldMapHumanTracker(entityhuman); -@@ -270,6 +274,21 @@ public class WorldMap extends PersistentBase { +@@ -273,6 +277,21 @@ public class WorldMap extends PersistentBase { public class WorldMapHumanTracker { @@ -117,7 +117,7 @@ index e090fea..2fe7402 100644 public final EntityHuman trackee; private boolean d = true; private int e = 0; -@@ -285,9 +304,12 @@ public class WorldMap extends PersistentBase { +@@ -288,9 +307,12 @@ public class WorldMap extends PersistentBase { public Packet a(ItemStack itemstack) { // CraftBukkit start @@ -145,5 +145,5 @@ index 256a131..5768cd5 100644 public RenderData() { -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0153-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0148-LootTable-API-Replenishable-Lootables-Feature.patch similarity index 95% rename from Spigot-Server-Patches/0153-LootTable-API-Replenishable-Lootables-Feature.patch rename to Spigot-Server-Patches/0148-LootTable-API-Replenishable-Lootables-Feature.patch index 71eb8f4db5..0ffae90f30 100644 --- a/Spigot-Server-Patches/0153-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0148-LootTable-API-Replenishable-Lootables-Feature.patch @@ -1,4 +1,4 @@ -From 94597bcbc07975928e87c481635d37e922e351a2 Mon Sep 17 00:00:00 2001 +From 0f72c89ba8ab6abcf9d92154c315ddfdf2a54bce Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 1 May 2016 21:19:14 -0400 Subject: [PATCH] LootTable API & Replenishable Lootables Feature @@ -11,10 +11,10 @@ This feature is good for long term worlds so that newer players do not suffer with "Every chest has been looted" diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9a9e2eb..3612701 100644 +index b39acc4..095ef47 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -339,4 +339,26 @@ public class PaperWorldConfig { +@@ -333,4 +333,26 @@ public class PaperWorldConfig { this.frostedIceDelayMax = this.getInt("frosted-ice.delay.max", this.frostedIceDelayMax); this.log("Frosted Ice: " + (this.frostedIceEnabled ? "enabled" : "disabled") + " / delay: min=" + this.frostedIceDelayMin + ", max=" + this.frostedIceDelayMax); } @@ -231,16 +231,17 @@ index 0000000..6680976 +} diff --git a/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java new file mode 100644 -index 0000000..353a4ff +index 0000000..c3d3cb9 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java -@@ -0,0 +1,179 @@ +@@ -0,0 +1,180 @@ +package com.destroystokyo.paper.loottable; + +import com.destroystokyo.paper.PaperWorldConfig; +import net.minecraft.server.*; +import org.bukkit.entity.Player; + ++import javax.annotation.Nullable; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; @@ -278,7 +279,7 @@ index 0000000..353a4ff + return lootable; + } + -+ public boolean shouldReplenish(EntityHuman player) { ++ public boolean shouldReplenish(@Nullable EntityHuman player) { + String tableName = this.lootable.getLootTableName(); + + // No Loot Table associated @@ -415,13 +416,13 @@ index 0000000..353a4ff + } +} diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -index 56e7de8..92f92b8 100644 +index 19f9eb6..7216fa5 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java -@@ -3,17 +3,21 @@ package net.minecraft.server; - import java.util.Random; +@@ -5,17 +5,21 @@ import javax.annotation.Nullable; // CraftBukkit start import java.util.List; + import org.bukkit.Location; + +import com.destroystokyo.paper.loottable.CraftLootableInventoryData; // Paper +import com.destroystokyo.paper.loottable.CraftLootableInventory; // Paper @@ -442,7 +443,7 @@ index 56e7de8..92f92b8 100644 // CraftBukkit start public List transaction = new java.util.ArrayList(); -@@ -130,6 +134,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -141,6 +145,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp protected void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); @@ -450,7 +451,7 @@ index 56e7de8..92f92b8 100644 if (this.c != null) { nbttagcompound.setString("LootTable", this.c.toString()); if (this.d != 0L) { -@@ -156,6 +161,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -167,6 +172,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp protected void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); this.items = new ItemStack[this.getSize()]; @@ -458,10 +459,10 @@ index 56e7de8..92f92b8 100644 if (nbttagcompound.hasKeyOfType("LootTable", 8)) { this.c = new MinecraftKey(nbttagcompound.getString("LootTable")); this.d = nbttagcompound.getLong("LootTableSeed"); -@@ -217,10 +223,10 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -228,10 +234,10 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp } - public void f(EntityHuman entityhuman) { + public void f(@Nullable EntityHuman entityhuman) { - if (this.c != null) { + if (lootableData.shouldReplenish(entityhuman)) { // Paper LootTable loottable = this.world.ak().a(this.c); @@ -471,7 +472,7 @@ index 56e7de8..92f92b8 100644 Random random; if (this.d == 0L) { -@@ -249,12 +255,52 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp +@@ -260,12 +266,52 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp } @@ -525,10 +526,10 @@ index 56e7de8..92f92b8 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java -index 437ac1e..7b73c50 100644 +index 3dc58bf..7717316 100644 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java +++ b/src/main/java/net/minecraft/server/TileEntityLootable.java -@@ -1,15 +1,20 @@ +@@ -1,16 +1,21 @@ package net.minecraft.server; +import com.destroystokyo.paper.loottable.CraftLootableInventoryData; // Paper @@ -536,6 +537,7 @@ index 437ac1e..7b73c50 100644 +import com.destroystokyo.paper.loottable.LootableInventory; // Paper + import java.util.Random; + import javax.annotation.Nullable; -public abstract class TileEntityLootable extends TileEntityContainer implements ILootable { +public abstract class TileEntityLootable extends TileEntityContainer implements ILootable, CraftLootableInventory { // Paper @@ -546,23 +548,23 @@ index 437ac1e..7b73c50 100644 public TileEntityLootable() {} - protected boolean c(NBTTagCompound nbttagcompound) { + protected boolean d(NBTTagCompound nbttagcompound) { + lootableData.loadNbt(nbttagcompound); // Paper if (nbttagcompound.hasKeyOfType("LootTable", 8)) { this.m = new MinecraftKey(nbttagcompound.getString("LootTable")); this.n = nbttagcompound.getLong("LootTableSeed"); -@@ -20,6 +25,7 @@ public abstract class TileEntityLootable extends TileEntityContainer implements +@@ -21,6 +26,7 @@ public abstract class TileEntityLootable extends TileEntityContainer implements } - protected boolean d(NBTTagCompound nbttagcompound) { + protected boolean e(NBTTagCompound nbttagcompound) { + lootableData.saveNbt(nbttagcompound); // Paper if (this.m != null) { nbttagcompound.setString("LootTable", this.m.toString()); if (this.n != 0L) { -@@ -33,10 +39,10 @@ public abstract class TileEntityLootable extends TileEntityContainer implements +@@ -34,10 +40,10 @@ public abstract class TileEntityLootable extends TileEntityContainer implements } - protected void d(EntityHuman entityhuman) { + protected void d(@Nullable EntityHuman entityhuman) { - if (this.m != null) { + if (lootableData.shouldReplenish(entityhuman)) { // Paper LootTable loottable = this.world.ak().a(this.m); @@ -572,7 +574,7 @@ index 437ac1e..7b73c50 100644 Random random; if (this.n == 0L) { -@@ -56,12 +62,51 @@ public abstract class TileEntityLootable extends TileEntityContainer implements +@@ -57,12 +63,51 @@ public abstract class TileEntityLootable extends TileEntityContainer implements } @@ -705,7 +707,7 @@ index f5a1875..b2c5679 100644 public CraftMinecartChest(CraftServer server, EntityMinecartChest entity) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java -index 38a5e02..0ccc616 100644 +index e9963e2..acb4dee 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0154-Do-not-load-chunks-for-pathfinding.patch b/Spigot-Server-Patches/0149-Do-not-load-chunks-for-pathfinding.patch similarity index 80% rename from Spigot-Server-Patches/0154-Do-not-load-chunks-for-pathfinding.patch rename to Spigot-Server-Patches/0149-Do-not-load-chunks-for-pathfinding.patch index fe07e6814c..1e5b83602c 100644 --- a/Spigot-Server-Patches/0154-Do-not-load-chunks-for-pathfinding.patch +++ b/Spigot-Server-Patches/0149-Do-not-load-chunks-for-pathfinding.patch @@ -1,14 +1,14 @@ -From 3f12cc95476a3f188589334349356723dace97ed Mon Sep 17 00:00:00 2001 +From 66f472758c6daa56f3b4a702d0a381fc4a8c5e8c Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Jan 2016 00:13:19 -0500 Subject: [PATCH] Do not load chunks for pathfinding diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java -index 5ae66be..773b562 100644 +index a8fd64c..11c11cf 100644 --- a/src/main/java/net/minecraft/server/ChunkCache.java +++ b/src/main/java/net/minecraft/server/ChunkCache.java -@@ -23,7 +23,7 @@ public class ChunkCache implements IBlockAccess { +@@ -25,7 +25,7 @@ public class ChunkCache implements IBlockAccess { for (l = this.a; l <= j; ++l) { for (i1 = this.b; i1 <= k; ++i1) { diff --git a/Spigot-Server-Patches/0155-Entity-Tracking-Improvements.patch b/Spigot-Server-Patches/0150-Entity-Tracking-Improvements.patch similarity index 95% rename from Spigot-Server-Patches/0155-Entity-Tracking-Improvements.patch rename to Spigot-Server-Patches/0150-Entity-Tracking-Improvements.patch index dd9489773c..888e236441 100644 --- a/Spigot-Server-Patches/0155-Entity-Tracking-Improvements.patch +++ b/Spigot-Server-Patches/0150-Entity-Tracking-Improvements.patch @@ -1,4 +1,4 @@ -From b79285255316a04113c3513fb1b135da76fba830 Mon Sep 17 00:00:00 2001 +From 62e510d99d8349b4b4b97604ba2a554a83fcf8f0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Jun 2013 01:24:00 -0400 Subject: [PATCH] Entity Tracking Improvements @@ -7,7 +7,7 @@ If any part of a Vehicle/Passenger relationship is visible to a player, send all passenger/vehicles to the player in the chain. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3a40897..0a4de90 100644 +index 2374a35..02a1c25 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -51,6 +51,7 @@ public abstract class Entity implements ICommandListener { @@ -19,7 +19,7 @@ index 3a40897..0a4de90 100644 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index a012d20..c0b9e8a 100644 +index 38e88d8..a783ecb 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -49,6 +49,7 @@ public class EntityTrackerEntry { @@ -90,7 +90,7 @@ index a012d20..c0b9e8a 100644 double d0 = entityplayer.locX - (double) this.xLoc / 4096.0D; double d1 = entityplayer.locZ - (double) this.zLoc / 4096.0D; int i = Math.min(this.e, this.f); -@@ -590,6 +633,7 @@ public class EntityTrackerEntry { +@@ -583,6 +626,7 @@ public class EntityTrackerEntry { this.trackedPlayers.remove(entityplayer); this.tracker.c(entityplayer); entityplayer.c(this.tracker); @@ -99,5 +99,5 @@ index a012d20..c0b9e8a 100644 } -- -2.8.1 +2.8.2 diff --git a/Spigot-Server-Patches/0156-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/0151-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch similarity index 90% rename from Spigot-Server-Patches/0156-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch rename to Spigot-Server-Patches/0151-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch index 71ada08a15..6a9f5e54c6 100644 --- a/Spigot-Server-Patches/0156-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch +++ b/Spigot-Server-Patches/0151-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch @@ -1,4 +1,4 @@ -From 6b473248bd86bc52923944193dab9587e0a49959 Mon Sep 17 00:00:00 2001 +From be3ff0c83d60893778ddfbe1ccf0ab5f8dabeede Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 May 2016 23:33:08 -0400 Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat @@ -19,10 +19,10 @@ index 1199fa2..f5f1e2a 100644 + } } diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java -index 3ef20d3..db72494 100644 +index 230004b..62752f8 100644 --- a/src/main/java/net/minecraft/server/PersistentScoreboard.java +++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java -@@ -182,6 +182,7 @@ public class PersistentScoreboard extends PersistentBase { +@@ -184,6 +184,7 @@ public class PersistentScoreboard extends PersistentBase { while (iterator.hasNext()) { ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next(); diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index b3d688f5d0..c1b3c1a0ff 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -22,6 +22,8 @@ function import { export MODLOG="$MODLOG Imported $file from mc-dev\n"; echo "Copying $base to $target" cp "$base" "$target" + else + echo "UN-NEEDED IMPORT: $file" fi } @@ -42,7 +44,6 @@ import BlockFluids import BlockFurnace import BlockIceFrost import BlockPosition -import BlockStateList import ChunkCache import ChunkProviderFlat import ChunkProviderGenerate @@ -57,6 +58,7 @@ import EntitySquid import EntityWaterAnimal import FileIOThread import ItemBlock +import NavigationAbstract import NBTTagCompound import NBTTagList import PersistentScoreboard diff --git a/scripts/rebuildPatches.sh b/scripts/rebuildPatches.sh index 5b6d938261..10bb3eb9a1 100755 --- a/scripts/rebuildPatches.sh +++ b/scripts/rebuildPatches.sh @@ -33,7 +33,20 @@ function savePatches { echo "Formatting patches for $what..." cd "$basedir/${what_name}-Patches/" - rm -rf *.patch + if [ -d "$basedir/$target/.git/rebase-apply" ]; then + # in middle of a rebase, be smarter + echo "REBASE DETECTED - PARTIAL SAVE" + last=$(cat "$basedir/$target/.git/rebase-apply/last") + next=$(cat "$basedir/$target/.git/rebase-apply/next") + for i in $(seq -w 1 1 $last) + do + if [ $i -lt $next ]; then + rm 0$i-* + fi + done + else + rm -rf *.patch + fi cd "$basedir/$target" diff --git a/work/BuildData b/work/BuildData index 46d0be39f2..9b100f8a6f 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit 46d0be39f2fae4732ebe544dfada3949a18e2092 +Subproject commit 9b100f8a6f0d86b5fd5f22f65dd6dd9eba6547d3 diff --git a/work/Bukkit b/work/Bukkit index d19bb5b8c5..b7b8f1e11a 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit d19bb5b8c5a47a395e11d2456ec86c9ffee88964 +Subproject commit b7b8f1e11ae7789a465f0e987be24161a1eba7df diff --git a/work/CraftBukkit b/work/CraftBukkit index ed60c01794..23da8b0ab7 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit ed60c01794282696e4cf1ae0d7c51cb49306bd55 +Subproject commit 23da8b0ab755e242aad3d587ee21dc886f2ac18f diff --git a/work/Spigot b/work/Spigot index e6f93f4eed..4af49dc0ab 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit e6f93f4eed1696907104cb95c00a6f6c035c82f2 +Subproject commit 4af49dc0abc0056b1f66f92a2ee107f9f1749a82