From 38df6e505cdb3fc34128490b2ed244616538658e Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 20:50:23 -0400 Subject: [PATCH] Paper 1.9.2 Update --- .gitignore | 1 + BuildData | 2 +- Bukkit | 2 +- CraftBukkit | 2 +- Paperclip | 2 +- Spigot | 2 +- Spigot-API-Patches/0001-POM-changes.patch | 8 +- Spigot-Server-Patches/0001-POM-Changes.patch | 8 +- Spigot-Server-Patches/0003-MC-Dev-fixes.patch | 88 + .../0003-mc-dev-imports.patch | 5979 ----------------- Spigot-Server-Patches/0005-Timings-v2.patch | 42 +- ... => 0030-Always-tick-falling-blocks.patch} | 4 +- .../0030-Fix-redstone-lag-issues.patch | 79 - ...-Queue.patch => 0031-Lighting-Queue.patch} | 25 +- ...ing.patch => 0032-Optimize-draining.patch} | 4 +- ...ch => 0033-Configurable-end-credits.patch} | 4 +- ...explosions-processing-dead-entities.patch} | 6 +- ...gs.patch => 0035-Generator-Settings.patch} | 6 +- ...s.patch => 0036-Optimize-explosions.patch} | 8 +- ...owing-block-if-material-has-changed.patch} | 4 +- ...raining.patch => 0038-Fast-draining.patch} | 4 +- ...> 0039-Configurable-lava-flow-speed.patch} | 4 +- ...> 0040-Add-player-view-distance-API.patch} | 4 +- ...=> 0041-Disable-explosion-knockback.patch} | 12 +- ...under.patch => 0042-Disable-thunder.patch} | 8 +- ....patch => 0043-Disable-ice-and-snow.patch} | 8 +- ...-Configurable-mob-spawner-tick-rate.patch} | 4 +- ...=> 0045-Configurable-TNT-cannon-fix.patch} | 16 +- ...ition-the-first-time-an-entity-is-s.patch} | 4 +- ...patch => 0047-Add-BeaconEffectEvent.patch} | 4 +- ...igurable-container-update-tick-rate.patch} | 4 +- ...me-times-creating-air-instead-of-co.patch} | 6 +- ...0050-Use-UserCache-for-player-heads.patch} | 4 +- ...> 0051-Disable-spigot-tick-limiters.patch} | 4 +- ...igurable-Chunk-IO-Thread-Base-Count.patch} | 4 +- ...on-File-s-when-checking-if-chunk-ex.patch} | 6 +- ...-t-create-a-chunk-just-to-unload-it.patch} | 4 +- ...R-Fix-bug-with-teleporting-entities.patch} | 6 +- ...=> 0056-Add-PlayerInitialSpawnEvent.patch} | 4 +- ...tity-Chunk-Registration-on-Teleport.patch} | 4 +- ...=> 0058-Disable-chest-cat-detection.patch} | 8 +- ...9-Ensure-commands-are-not-ran-async.patch} | 6 +- ...hunks-are-slime-spawn-chunks-toggle.patch} | 6 +- ...ort-to-tab-completers-vanilla-featu.patch} | 6 +- ...ade-EntityDismountEvent-Cancellable.patch} | 6 +- ....patch => 0063-Optimize-Pathfinding.patch} | 4 +- ...patch => 0064-Optimize-getBlockData.patch} | 4 +- ...pper-searches-if-there-are-no-items.patch} | 4 +- ...ch => 0066-Expose-server-CommandMap.patch} | 4 +- ...-informative-in-maxHealth-exception.patch} | 4 +- ...ord-chat-API-from-spigot-subclasses.patch} | 4 +- ...0069-Player-Tab-List-and-Title-APIs.patch} | 20 +- ...> 0070-Ensure-inv-drag-is-in-bounds.patch} | 4 +- ...ntation-of-tile-entity-removal-list.patch} | 4 +- ...d-configurable-portal-search-radius.patch} | 4 +- ...patch => 0073-Add-velocity-warnings.patch} | 4 +- ...-inter-world-teleportation-glitches.patch} | 4 +- ... 0075-Add-exception-reporting-event.patch} | 4 +- ...Speedup-BlockPos-by-fixing-inlining.patch} | 6 +- ...don-t-need-to-when-cerealising-text.patch} | 4 +- ...reboards-for-non-players-by-default.patch} | 8 +- ...orking-with-arrows-stuck-in-living-.patch} | 8 +- ... => 0080-Complete-resource-pack-API.patch} | 8 +- ...e-add-Spigot-s-hopper-check-feature.patch} | 6 +- ... 0082-Chunk-save-queue-improvements.patch} | 6 +- ....patch => 0083-Chunk-Save-Reattempt.patch} | 6 +- ...ding-permissions.yml-before-plugins.patch} | 4 +- ...low-Reloading-of-Custom-Permissions.patch} | 4 +- ...h => 0086-Remove-Metadata-on-reload.patch} | 4 +- ...patch => 0087-Undead-horse-leashing.patch} | 6 +- ...h => 0088-Fix-Furnace-cook-time-bug.patch} | 4 +- ...89-Handle-Item-Meta-Inconsistencies.patch} | 4 +- ...rable-Non-Player-Arrow-Despawn-Rate.patch} | 6 +- ...1-Optimize-BlockStateList-BlockData.patch} | 10 +- ...atch => 0092-Add-World-Util-Methods.patch} | 4 +- ...3-Optimized-Light-Level-Comparisons.patch} | 8 +- ...0094-Pass-world-to-Village-creation.patch} | 4 +- ...-Custom-replacement-for-eaten-items.patch} | 8 +- ... 0096-Set-health-before-death-event.patch} | 4 +- ...h-absorb-values-and-repair-bad-data.patch} | 12 +- ...tch-Async-PlayerChunkMap-operations.patch} | 4 +- ...e-mode-in-whitelist-command-as-well.patch} | 16 +- ...=> 0100-Optimize-Chunk-Unload-Queue.patch} | 4 +- ...tch => 0101-Fix-SkullCache-case-bug.patch} | 4 +- ...ch => 0102-Waving-banner-workaround.patch} | 4 +- ...03-Use-a-Shared-Random-for-Entities.patch} | 6 +- ...> 0104-Don-t-teleport-dead-entities.patch} | 6 +- ...patch => 0105-Optimize-Chunk-Access.patch} | 8 +- ...e-spawn-chances-for-skeleton-horses.patch} | 8 +- ...timize-isValidLocation-for-inlining.patch} | 6 +- ...-correct-item-in-arrow-pickup-event.patch} | 6 +- ... 0109-Fix-cooked-fish-legacy-import.patch} | 4 +- ...0-Load-chunk-before-player-teleport.patch} | 4 +- ...infinite-loop-in-BlockPosition-iter.patch} | 4 +- ... 0112-Access-items-by-EquipmentSlot.patch} | 4 +- ...eck-async-remove-unused-vars-GH-159.patch} | 4 +- ...able-BlockPhysicsEvent-for-Redstone.patch} | 12 +- ...ntity-AddTo-RemoveFrom-World-Events.patch} | 4 +- ...-Configurable-Chunk-Inhabited-Timer.patch} | 4 +- ...t.patch => 0117-EntityPathfindEvent.patch} | 4 +- ...-BlockFromToEvent-from-loading-chun.patch} | 4 +- ... 0119-Minecart-drop-name-workaround.patch} | 4 +- ...ce-IO-ops-opening-a-new-region-file.patch} | 4 +- ...gionFileCache-and-make-configurable.patch} | 4 +- ...h => 0122-Add-getEntity-by-UUID-API.patch} | 6 +- ...123-Use-FastUtil-Long-Int-HashMap-s.patch} | 6 +- applyPatches.sh | 4 + importmcdev.sh | 65 + paperclip.sh | 15 +- 109 files changed, 481 insertions(+), 6371 deletions(-) create mode 100644 Spigot-Server-Patches/0003-MC-Dev-fixes.patch delete mode 100644 Spigot-Server-Patches/0003-mc-dev-imports.patch rename Spigot-Server-Patches/{0031-Always-tick-falling-blocks.patch => 0030-Always-tick-falling-blocks.patch} (94%) delete mode 100644 Spigot-Server-Patches/0030-Fix-redstone-lag-issues.patch rename Spigot-Server-Patches/{0032-Lighting-Queue.patch => 0031-Lighting-Queue.patch} (91%) rename Spigot-Server-Patches/{0033-Optimize-draining.patch => 0032-Optimize-draining.patch} (94%) rename Spigot-Server-Patches/{0034-Configurable-end-credits.patch => 0033-Configurable-end-credits.patch} (97%) rename Spigot-Server-Patches/{0035-Fix-lag-from-explosions-processing-dead-entities.patch => 0034-Fix-lag-from-explosions-processing-dead-entities.patch} (93%) rename Spigot-Server-Patches/{0036-Generator-Settings.patch => 0035-Generator-Settings.patch} (99%) rename Spigot-Server-Patches/{0037-Optimize-explosions.patch => 0036-Optimize-explosions.patch} (98%) rename Spigot-Server-Patches/{0038-Stop-updating-flowing-block-if-material-has-changed.patch => 0037-Stop-updating-flowing-block-if-material-has-changed.patch} (92%) rename Spigot-Server-Patches/{0039-Fast-draining.patch => 0038-Fast-draining.patch} (98%) rename Spigot-Server-Patches/{0040-Configurable-lava-flow-speed.patch => 0039-Configurable-lava-flow-speed.patch} (96%) rename Spigot-Server-Patches/{0041-Add-player-view-distance-API.patch => 0040-Add-player-view-distance-API.patch} (98%) rename Spigot-Server-Patches/{0042-Disable-explosion-knockback.patch => 0041-Disable-explosion-knockback.patch} (93%) rename Spigot-Server-Patches/{0043-Disable-thunder.patch => 0042-Disable-thunder.patch} (90%) rename Spigot-Server-Patches/{0044-Disable-ice-and-snow.patch => 0043-Disable-ice-and-snow.patch} (89%) rename Spigot-Server-Patches/{0045-Configurable-mob-spawner-tick-rate.patch => 0044-Configurable-mob-spawner-tick-rate.patch} (97%) rename Spigot-Server-Patches/{0046-Configurable-TNT-cannon-fix.patch => 0045-Configurable-TNT-cannon-fix.patch} (98%) rename Spigot-Server-Patches/{0047-Send-absolute-position-the-first-time-an-entity-is-s.patch => 0046-Send-absolute-position-the-first-time-an-entity-is-s.patch} (98%) rename Spigot-Server-Patches/{0048-Add-BeaconEffectEvent.patch => 0047-Add-BeaconEffectEvent.patch} (97%) rename Spigot-Server-Patches/{0049-Configurable-container-update-tick-rate.patch => 0048-Configurable-container-update-tick-rate.patch} (96%) rename Spigot-Server-Patches/{0050-Fix-lava-water-some-times-creating-air-instead-of-co.patch => 0049-Fix-lava-water-some-times-creating-air-instead-of-co.patch} (89%) rename Spigot-Server-Patches/{0051-Use-UserCache-for-player-heads.patch => 0050-Use-UserCache-for-player-heads.patch} (95%) rename Spigot-Server-Patches/{0052-Disable-spigot-tick-limiters.patch => 0051-Disable-spigot-tick-limiters.patch} (96%) rename Spigot-Server-Patches/{0053-Configurable-Chunk-IO-Thread-Base-Count.patch => 0052-Configurable-Chunk-IO-Thread-Base-Count.patch} (96%) rename Spigot-Server-Patches/{0054-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch => 0053-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch} (95%) rename Spigot-Server-Patches/{0055-Don-t-create-a-chunk-just-to-unload-it.patch => 0054-Don-t-create-a-chunk-just-to-unload-it.patch} (93%) rename Spigot-Server-Patches/{0056-EAR-Fix-bug-with-teleporting-entities.patch => 0055-EAR-Fix-bug-with-teleporting-entities.patch} (95%) rename Spigot-Server-Patches/{0057-Add-PlayerInitialSpawnEvent.patch => 0056-Add-PlayerInitialSpawnEvent.patch} (96%) rename Spigot-Server-Patches/{0058-Process-Entity-Chunk-Registration-on-Teleport.patch => 0057-Process-Entity-Chunk-Registration-on-Teleport.patch} (93%) rename Spigot-Server-Patches/{0059-Disable-chest-cat-detection.patch => 0058-Disable-chest-cat-detection.patch} (90%) rename Spigot-Server-Patches/{0060-Ensure-commands-are-not-ran-async.patch => 0059-Ensure-commands-are-not-ran-async.patch} (97%) rename Spigot-Server-Patches/{0061-All-chunks-are-slime-spawn-chunks-toggle.patch => 0060-All-chunks-are-slime-spawn-chunks-toggle.patch} (94%) rename Spigot-Server-Patches/{0062-Add-Location-support-to-tab-completers-vanilla-featu.patch => 0061-Add-Location-support-to-tab-completers-vanilla-featu.patch} (98%) rename Spigot-Server-Patches/{0063-Made-EntityDismountEvent-Cancellable.patch => 0062-Made-EntityDismountEvent-Cancellable.patch} (93%) rename Spigot-Server-Patches/{0064-Optimize-Pathfinding.patch => 0063-Optimize-Pathfinding.patch} (95%) rename Spigot-Server-Patches/{0065-Optimize-getBlockData.patch => 0064-Optimize-getBlockData.patch} (94%) rename Spigot-Server-Patches/{0066-Avoid-hopper-searches-if-there-are-no-items.patch => 0065-Avoid-hopper-searches-if-there-are-no-items.patch} (98%) rename Spigot-Server-Patches/{0067-Expose-server-CommandMap.patch => 0066-Expose-server-CommandMap.patch} (89%) rename Spigot-Server-Patches/{0068-Be-a-bit-more-informative-in-maxHealth-exception.patch => 0067-Be-a-bit-more-informative-in-maxHealth-exception.patch} (94%) rename Spigot-Server-Patches/{0069-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch => 0068-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch} (96%) rename Spigot-Server-Patches/{0070-Player-Tab-List-and-Title-APIs.patch => 0069-Player-Tab-List-and-Title-APIs.patch} (93%) rename Spigot-Server-Patches/{0071-Ensure-inv-drag-is-in-bounds.patch => 0070-Ensure-inv-drag-is-in-bounds.patch} (91%) rename Spigot-Server-Patches/{0072-Change-implementation-of-tile-entity-removal-list.patch => 0071-Change-implementation-of-tile-entity-removal-list.patch} (97%) rename Spigot-Server-Patches/{0073-Add-configurable-portal-search-radius.patch => 0072-Add-configurable-portal-search-radius.patch} (97%) rename Spigot-Server-Patches/{0074-Add-velocity-warnings.patch => 0073-Add-velocity-warnings.patch} (94%) rename Spigot-Server-Patches/{0075-Fix-inter-world-teleportation-glitches.patch => 0074-Fix-inter-world-teleportation-glitches.patch} (97%) rename Spigot-Server-Patches/{0076-Add-exception-reporting-event.patch => 0075-Add-exception-reporting-event.patch} (99%) rename Spigot-Server-Patches/{0077-Speedup-BlockPos-by-fixing-inlining.patch => 0076-Speedup-BlockPos-by-fixing-inlining.patch} (98%) rename Spigot-Server-Patches/{0078-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch => 0077-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch} (95%) rename Spigot-Server-Patches/{0079-Disable-Scoreboards-for-non-players-by-default.patch => 0078-Disable-Scoreboards-for-non-players-by-default.patch} (95%) rename Spigot-Server-Patches/{0080-Add-methods-for-working-with-arrows-stuck-in-living-.patch => 0079-Add-methods-for-working-with-arrows-stuck-in-living-.patch} (91%) rename Spigot-Server-Patches/{0081-Complete-resource-pack-API.patch => 0080-Complete-resource-pack-API.patch} (97%) rename Spigot-Server-Patches/{0082-Re-add-Spigot-s-hopper-check-feature.patch => 0081-Re-add-Spigot-s-hopper-check-feature.patch} (93%) rename Spigot-Server-Patches/{0083-Chunk-save-queue-improvements.patch => 0082-Chunk-save-queue-improvements.patch} (98%) rename Spigot-Server-Patches/{0084-Chunk-Save-Reattempt.patch => 0083-Chunk-Save-Reattempt.patch} (96%) rename Spigot-Server-Patches/{0085-Default-loading-permissions.yml-before-plugins.patch => 0084-Default-loading-permissions.yml-before-plugins.patch} (97%) rename Spigot-Server-Patches/{0086-Allow-Reloading-of-Custom-Permissions.patch => 0085-Allow-Reloading-of-Custom-Permissions.patch} (91%) rename Spigot-Server-Patches/{0087-Remove-Metadata-on-reload.patch => 0086-Remove-Metadata-on-reload.patch} (93%) rename Spigot-Server-Patches/{0088-Undead-horse-leashing.patch => 0087-Undead-horse-leashing.patch} (93%) rename Spigot-Server-Patches/{0089-Fix-Furnace-cook-time-bug.patch => 0088-Fix-Furnace-cook-time-bug.patch} (94%) rename Spigot-Server-Patches/{0090-Handle-Item-Meta-Inconsistencies.patch => 0089-Handle-Item-Meta-Inconsistencies.patch} (99%) rename Spigot-Server-Patches/{0091-Configurable-Non-Player-Arrow-Despawn-Rate.patch => 0090-Configurable-Non-Player-Arrow-Despawn-Rate.patch} (94%) rename Spigot-Server-Patches/{0092-Optimize-BlockStateList-BlockData.patch => 0091-Optimize-BlockStateList-BlockData.patch} (92%) rename Spigot-Server-Patches/{0093-Add-World-Util-Methods.patch => 0092-Add-World-Util-Methods.patch} (98%) rename Spigot-Server-Patches/{0094-Optimized-Light-Level-Comparisons.patch => 0093-Optimized-Light-Level-Comparisons.patch} (98%) rename Spigot-Server-Patches/{0095-Pass-world-to-Village-creation.patch => 0094-Pass-world-to-Village-creation.patch} (96%) rename Spigot-Server-Patches/{0096-Custom-replacement-for-eaten-items.patch => 0095-Custom-replacement-for-eaten-items.patch} (89%) rename Spigot-Server-Patches/{0097-Set-health-before-death-event.patch => 0096-Set-health-before-death-event.patch} (96%) rename Spigot-Server-Patches/{0098-handle-NaN-health-absorb-values-and-repair-bad-data.patch => 0097-handle-NaN-health-absorb-values-and-repair-bad-data.patch} (88%) rename Spigot-Server-Patches/{0099-Catch-Async-PlayerChunkMap-operations.patch => 0098-Catch-Async-PlayerChunkMap-operations.patch} (92%) rename Spigot-Server-Patches/{0100-Support-offline-mode-in-whitelist-command-as-well.patch => 0099-Support-offline-mode-in-whitelist-command-as-well.patch} (92%) rename Spigot-Server-Patches/{0101-Optimize-Chunk-Unload-Queue.patch => 0100-Optimize-Chunk-Unload-Queue.patch} (99%) rename Spigot-Server-Patches/{0102-Fix-SkullCache-case-bug.patch => 0101-Fix-SkullCache-case-bug.patch} (93%) rename Spigot-Server-Patches/{0103-Waving-banner-workaround.patch => 0102-Waving-banner-workaround.patch} (94%) rename Spigot-Server-Patches/{0104-Use-a-Shared-Random-for-Entities.patch => 0103-Use-a-Shared-Random-for-Entities.patch} (92%) rename Spigot-Server-Patches/{0105-Don-t-teleport-dead-entities.patch => 0104-Don-t-teleport-dead-entities.patch} (90%) rename Spigot-Server-Patches/{0106-Optimize-Chunk-Access.patch => 0105-Optimize-Chunk-Access.patch} (96%) rename Spigot-Server-Patches/{0107-Configurable-spawn-chances-for-skeleton-horses.patch => 0106-Configurable-spawn-chances-for-skeleton-horses.patch} (91%) rename Spigot-Server-Patches/{0108-Optimize-isValidLocation-for-inlining.patch => 0107-Optimize-isValidLocation-for-inlining.patch} (98%) rename Spigot-Server-Patches/{0109-Use-correct-item-in-arrow-pickup-event.patch => 0108-Use-correct-item-in-arrow-pickup-event.patch} (94%) rename Spigot-Server-Patches/{0110-Fix-cooked-fish-legacy-import.patch => 0109-Fix-cooked-fish-legacy-import.patch} (93%) rename Spigot-Server-Patches/{0111-Load-chunk-before-player-teleport.patch => 0110-Load-chunk-before-player-teleport.patch} (93%) rename Spigot-Server-Patches/{0112-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch => 0111-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch} (98%) rename Spigot-Server-Patches/{0113-Access-items-by-EquipmentSlot.patch => 0112-Access-items-by-EquipmentSlot.patch} (96%) rename Spigot-Server-Patches/{0114-Check-async-remove-unused-vars-GH-159.patch => 0113-Check-async-remove-unused-vars-GH-159.patch} (95%) rename Spigot-Server-Patches/{0115-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch => 0114-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch} (92%) rename Spigot-Server-Patches/{0116-Entity-AddTo-RemoveFrom-World-Events.patch => 0115-Entity-AddTo-RemoveFrom-World-Events.patch} (93%) rename Spigot-Server-Patches/{0117-Configurable-Chunk-Inhabited-Timer.patch => 0116-Configurable-Chunk-Inhabited-Timer.patch} (95%) rename Spigot-Server-Patches/{0118-EntityPathfindEvent.patch => 0117-EntityPathfindEvent.patch} (96%) rename Spigot-Server-Patches/{0119-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch => 0118-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch} (97%) rename Spigot-Server-Patches/{0120-Minecart-drop-name-workaround.patch => 0119-Minecart-drop-name-workaround.patch} (93%) rename Spigot-Server-Patches/{0121-Reduce-IO-ops-opening-a-new-region-file.patch => 0120-Reduce-IO-ops-opening-a-new-region-file.patch} (96%) rename Spigot-Server-Patches/{0122-Sanitise-RegionFileCache-and-make-configurable.patch => 0121-Sanitise-RegionFileCache-and-make-configurable.patch} (97%) rename Spigot-Server-Patches/{0123-Add-getEntity-by-UUID-API.patch => 0122-Add-getEntity-by-UUID-API.patch} (95%) rename Spigot-Server-Patches/{0124-Use-FastUtil-Long-Int-HashMap-s.patch => 0123-Use-FastUtil-Long-Int-HashMap-s.patch} (96%) create mode 100755 importmcdev.sh diff --git a/.gitignore b/.gitignore index 3827bdefa8..6785057323 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ CraftBukkit Paperclip Paperclip.jar paperclip.jar +paperclip-*.jar diff --git a/BuildData b/BuildData index 29cbded5ff..46d0be39f2 160000 --- a/BuildData +++ b/BuildData @@ -1 +1 @@ -Subproject commit 29cbded5ff05b66a9af3ac22efe07031d5fb5742 +Subproject commit 46d0be39f2fae4732ebe544dfada3949a18e2092 diff --git a/Bukkit b/Bukkit index 56605a05f6..8ce4d2f45f 160000 --- a/Bukkit +++ b/Bukkit @@ -1 +1 @@ -Subproject commit 56605a05f6c85762d46b0b76b9eb20cfc7991e7e +Subproject commit 8ce4d2f45fbdb7cd85346b220f6a9d34f2000910 diff --git a/CraftBukkit b/CraftBukkit index 7fc5cd856e..8b61cc5208 160000 --- a/CraftBukkit +++ b/CraftBukkit @@ -1 +1 @@ -Subproject commit 7fc5cd856e46182e727f383a911ffa46326611f1 +Subproject commit 8b61cc52088ccb9220970740a4905baf3781a680 diff --git a/Paperclip b/Paperclip index 1d8ff24ec3..9bb246f7f1 160000 --- a/Paperclip +++ b/Paperclip @@ -1 +1 @@ -Subproject commit 1d8ff24ec3fff88334498bfb4071b6b6c834cc07 +Subproject commit 9bb246f7f19963ef91e22af3e05a315ee5e5e746 diff --git a/Spigot b/Spigot index d20369fcad..1480adb827 160000 --- a/Spigot +++ b/Spigot @@ -1 +1 @@ -Subproject commit d20369fcad255c6ab18fab8180fac63ff4cedec3 +Subproject commit 1480adb82751e38cca5bcc75202ece68277b0113 diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index 90e2c2c131..161fcc223c 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -1,11 +1,11 @@ -From ecf0497b4369c1851972cefd26fc4ee896fd1ebb Mon Sep 17 00:00:00 2001 +From 2f32c9ef89437d0047ea741fbc4bade6ae94003a 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 8fb67ea..d916f44 100644 +index 662379f..a03865f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,35 +4,37 @@ @@ -24,7 +24,7 @@ index 8fb67ea..d916f44 100644 - spigot-api + com.destroystokyo.paper + paper-api - 1.9-R0.1-SNAPSHOT + 1.9.2-R0.1-SNAPSHOT jar - Spigot-API @@ -95,5 +95,5 @@ index 8fb67ea..d916f44 100644 maven-shade-plugin 2.4.1 -- -2.7.3 +2.8.0 diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index d419f58c85..7dc7d674ab 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 02259eec6505e02230fdf82e1f7087f57daca410 Mon Sep 17 00:00:00 2001 +From b068b16c1082061d7c28b75c62f3233b7c5b4713 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 4f7cea7..7762cc9 100644 +index d775f7b..b01ebdf 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ @@ -17,7 +17,7 @@ index 4f7cea7..7762cc9 100644 + com.destroystokyo.paper + paper jar - 1.9-R0.1-SNAPSHOT + 1.9.2-R0.1-SNAPSHOT - Spigot - http://www.spigotmc.org + Paper @@ -183,5 +183,5 @@ index 9304637..674096c 100644 if (stream != null) { -- -2.7.3 +2.8.0 diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch new file mode 100644 index 0000000000..92165ca3d6 --- /dev/null +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -0,0 +1,88 @@ +From 9588a00f0ac51c242d71abc1d9b9c43f905d5f14 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 +--- 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 { + 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); + } + } +diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java +index be4b871..5ca8125 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 { + protected List x; + + public static int a(BiomeBase biomebase) { +- return BiomeBase.REGISTRY_ID.a((Object) biomebase); ++ 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 + } + } + +diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java +index 156922a..f2feee5 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 { + } + + if (object != null && oclass.isAssignableFrom(object.getClass())) { +- return (Entity) object; ++ return (T) object; // Paper - fix decompile error + } else { + throw new ExceptionEntityNotFound(); + } +@@ -551,7 +551,7 @@ public abstract class CommandAbstract implements ICommand { + return this.getCommand().compareTo(icommand.getCommand()); + } + +- public int compareTo(Object object) { ++ public int compareTo(ICommand object) { // Paper - fix decompile error + return this.a((ICommand) object); + } + +-- +2.8.0 + diff --git a/Spigot-Server-Patches/0003-mc-dev-imports.patch b/Spigot-Server-Patches/0003-mc-dev-imports.patch deleted file mode 100644 index 123b8b1270..0000000000 --- a/Spigot-Server-Patches/0003-mc-dev-imports.patch +++ /dev/null @@ -1,5979 +0,0 @@ -From 0e80632a40c4f30abcbf0dc09ec0794389dd618d Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Mon, 29 Feb 2016 21:09:10 -0600 -Subject: [PATCH] mc-dev imports - - -diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -new file mode 100644 -index 0000000..fa95e8f ---- /dev/null -+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -0,0 +1,93 @@ -+package net.minecraft.server; -+ -+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; -+ -+ public BaseBlockPosition(int i, int j, int k) { -+ this.a = i; -+ this.c = j; -+ this.d = k; -+ } -+ -+ public BaseBlockPosition(double d0, double d1, double d2) { -+ this(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); -+ } -+ -+ public boolean equals(Object object) { -+ if (this == object) { -+ return true; -+ } else if (!(object instanceof BaseBlockPosition)) { -+ return false; -+ } else { -+ BaseBlockPosition baseblockposition = (BaseBlockPosition) object; -+ -+ return this.getX() != baseblockposition.getX() ? false : (this.getY() != baseblockposition.getY() ? false : this.getZ() == baseblockposition.getZ()); -+ } -+ } -+ -+ public int hashCode() { -+ return (this.getY() + this.getZ() * 31) * 31 + this.getX(); -+ } -+ -+ public int i(BaseBlockPosition baseblockposition) { -+ return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); -+ } -+ -+ public int getX() { -+ return this.a; -+ } -+ -+ public int getY() { -+ return this.c; -+ } -+ -+ public int getZ() { -+ return this.d; -+ } -+ -+ 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()); -+ } -+ -+ public double f(int i, int j, int k) { -+ double d0 = (double) (this.getX() - i); -+ double d1 = (double) (this.getY() - j); -+ double d2 = (double) (this.getZ() - k); -+ -+ return Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2); -+ } -+ -+ public double distanceSquared(double d0, double d1, double d2) { -+ double d3 = (double) this.getX() - d0; -+ double d4 = (double) this.getY() - d1; -+ double d5 = (double) this.getZ() - d2; -+ -+ return d3 * d3 + d4 * d4 + d5 * d5; -+ } -+ -+ public double f(double d0, double d1, double d2) { -+ double d3 = (double) this.getX() + 0.5D - d0; -+ double d4 = (double) this.getY() + 0.5D - d1; -+ double d5 = (double) this.getZ() + 0.5D - d2; -+ -+ return d3 * d3 + d4 * d4 + d5 * d5; -+ } -+ -+ public double k(BaseBlockPosition baseblockposition) { -+ return this.distanceSquared((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ()); -+ } -+ -+ public String toString() { -+ return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString(); -+ } -+ -+ public int compareTo(BaseBlockPosition object) { // Paper - correct decompile error -+ return this.i((BaseBlockPosition) object); -+ } -+} -diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -new file mode 100644 -index 0000000..bc83bb7 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -0,0 +1,463 @@ -+package net.minecraft.server; -+ -+import com.google.common.collect.Lists; -+import com.google.common.collect.Sets; -+import java.util.Collections; -+import java.util.List; -+import java.util.Random; -+import java.util.Set; -+import org.apache.logging.log4j.LogManager; -+import org.apache.logging.log4j.Logger; -+ -+public abstract class BiomeBase { -+ -+ private static final Logger y = LogManager.getLogger(); -+ protected static final IBlockData a = Blocks.STONE.getBlockData(); -+ protected static final IBlockData b = Blocks.AIR.getBlockData(); -+ protected static final IBlockData c = Blocks.BEDROCK.getBlockData(); -+ protected static final IBlockData d = Blocks.GRAVEL.getBlockData(); -+ protected static final IBlockData e = Blocks.RED_SANDSTONE.getBlockData(); -+ protected static final IBlockData f = Blocks.SANDSTONE.getBlockData(); -+ protected static final IBlockData g = Blocks.ICE.getBlockData(); -+ protected static final IBlockData h = Blocks.WATER.getBlockData(); -+ public static final Set i = Sets.newHashSet(); -+ public static final RegistryBlockID j = new RegistryBlockID(); -+ protected static final NoiseGenerator3 k = new NoiseGenerator3(new Random(1234L), 1); -+ protected static final NoiseGenerator3 l = new NoiseGenerator3(new Random(2345L), 1); -+ protected static final WorldGenTallPlant m = new WorldGenTallPlant(); -+ protected static final WorldGenTrees n = new WorldGenTrees(false); -+ protected static final WorldGenBigTree o = new WorldGenBigTree(false); -+ protected static final WorldGenSwampTree p = new WorldGenSwampTree(); -+ public static final RegistryMaterials REGISTRY_ID = new RegistryMaterials(); -+ private final String z; -+ private final float A; -+ private final float B; -+ private final float C; -+ private final float D; -+ private final int E; -+ private final boolean F; -+ private final boolean G; -+ private final String H; -+ public IBlockData r; -+ public IBlockData s; -+ public BiomeDecorator t; -+ protected List u; -+ protected List v; -+ protected List w; -+ protected List x; -+ -+ public static int a(BiomeBase biomebase) { -+ return BiomeBase.REGISTRY_ID.a(biomebase); // Paper - Fix compile -+ } -+ -+ public static BiomeBase a(int i) { -+ return (BiomeBase) BiomeBase.REGISTRY_ID.getId(i); -+ } -+ -+ public static BiomeBase b(BiomeBase biomebase) { -+ return (BiomeBase) BiomeBase.j.fromId(a(biomebase)); -+ } -+ -+ protected BiomeBase(BiomeBase.a biomebase_a) { -+ this.r = Blocks.GRASS.getBlockData(); -+ this.s = Blocks.DIRT.getBlockData(); -+ this.u = Lists.newArrayList(); -+ this.v = Lists.newArrayList(); -+ this.w = Lists.newArrayList(); -+ this.x = Lists.newArrayList(); -+ this.z = biomebase_a.a; -+ this.A = biomebase_a.b; -+ this.B = biomebase_a.c; -+ this.C = biomebase_a.d; -+ this.D = biomebase_a.e; -+ this.E = biomebase_a.f; -+ this.F = biomebase_a.g; -+ this.G = biomebase_a.h; -+ this.H = biomebase_a.i; -+ this.t = this.a(); -+ this.v.add(new BiomeBase.BiomeMeta(EntitySheep.class, 12, 4, 4)); -+ this.v.add(new BiomeBase.BiomeMeta(EntityPig.class, 10, 4, 4)); -+ this.v.add(new BiomeBase.BiomeMeta(EntityChicken.class, 10, 4, 4)); -+ this.v.add(new BiomeBase.BiomeMeta(EntityCow.class, 8, 4, 4)); -+ this.u.add(new BiomeBase.BiomeMeta(EntitySpider.class, 100, 4, 4)); -+ this.u.add(new BiomeBase.BiomeMeta(EntityZombie.class, 100, 4, 4)); -+ this.u.add(new BiomeBase.BiomeMeta(EntitySkeleton.class, 100, 4, 4)); -+ this.u.add(new BiomeBase.BiomeMeta(EntityCreeper.class, 100, 4, 4)); -+ this.u.add(new BiomeBase.BiomeMeta(EntitySlime.class, 100, 4, 4)); -+ this.u.add(new BiomeBase.BiomeMeta(EntityEnderman.class, 10, 1, 4)); -+ this.u.add(new BiomeBase.BiomeMeta(EntityWitch.class, 5, 1, 1)); -+ this.w.add(new BiomeBase.BiomeMeta(EntitySquid.class, 10, 4, 4)); -+ this.x.add(new BiomeBase.BiomeMeta(EntityBat.class, 10, 8, 8)); -+ } -+ -+ protected BiomeDecorator a() { -+ return new BiomeDecorator(); -+ } -+ -+ public boolean b() { -+ return this.H != null; -+ } -+ -+ public WorldGenTreeAbstract a(Random random) { -+ return (WorldGenTreeAbstract) (random.nextInt(10) == 0 ? BiomeBase.o : BiomeBase.n); -+ } -+ -+ public WorldGenerator b(Random random) { -+ return new WorldGenGrass(BlockLongGrass.EnumTallGrassType.GRASS); -+ } -+ -+ public BlockFlowers.EnumFlowerVarient a(Random random, BlockPosition blockposition) { -+ return random.nextInt(3) > 0 ? BlockFlowers.EnumFlowerVarient.DANDELION : BlockFlowers.EnumFlowerVarient.POPPY; -+ } -+ -+ public List getMobs(EnumCreatureType enumcreaturetype) { -+ switch (BiomeBase.SyntheticClass_1.a[enumcreaturetype.ordinal()]) { -+ case 1: -+ return this.u; -+ -+ case 2: -+ return this.v; -+ -+ case 3: -+ return this.w; -+ -+ case 4: -+ return this.x; -+ -+ default: -+ return Collections.emptyList(); -+ } -+ } -+ -+ public boolean c() { -+ return this.p(); -+ } -+ -+ public boolean d() { -+ return this.p() ? false : this.G; -+ } -+ -+ public boolean e() { -+ return this.getHumidity() > 0.85F; -+ } -+ -+ public float f() { -+ return 0.1F; -+ } -+ -+ public final float a(BlockPosition blockposition) { -+ if (blockposition.getY() > 64) { -+ float f = (float) (BiomeBase.k.a((double) ((float) blockposition.getX() / 8.0F), (double) ((float) blockposition.getZ() / 8.0F)) * 4.0D); -+ -+ return this.getTemperature() - (f + (float) blockposition.getY() - 64.0F) * 0.05F / 30.0F; -+ } else { -+ return this.getTemperature(); -+ } -+ } -+ -+ public void a(World world, Random random, BlockPosition blockposition) { -+ this.t.a(world, random, this, blockposition); -+ } -+ -+ public void a(World world, Random random, ChunkSnapshot chunksnapshot, int i, int j, double d0) { -+ this.b(world, random, chunksnapshot, i, j, d0); -+ } -+ -+ public final void b(World world, Random random, ChunkSnapshot chunksnapshot, int i, int j, double d0) { -+ int k = world.K(); -+ IBlockData iblockdata = this.r; -+ IBlockData iblockdata1 = this.s; -+ int l = -1; -+ int i1 = (int) (d0 / 3.0D + 3.0D + random.nextDouble() * 0.25D); -+ int j1 = i & 15; -+ int k1 = j & 15; -+ BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); -+ -+ for (int l1 = 255; l1 >= 0; --l1) { -+ if (l1 <= random.nextInt(5)) { -+ chunksnapshot.a(k1, l1, j1, BiomeBase.c); -+ } else { -+ IBlockData iblockdata2 = chunksnapshot.a(k1, l1, j1); -+ -+ if (iblockdata2.getMaterial() == Material.AIR) { -+ l = -1; -+ } else if (iblockdata2.getBlock() == Blocks.STONE) { -+ if (l == -1) { -+ if (i1 <= 0) { -+ iblockdata = BiomeBase.b; -+ iblockdata1 = BiomeBase.a; -+ } else if (l1 >= k - 4 && l1 <= k + 1) { -+ iblockdata = this.r; -+ iblockdata1 = this.s; -+ } -+ -+ if (l1 < k && (iblockdata == null || iblockdata.getMaterial() == Material.AIR)) { -+ if (this.a((BlockPosition) blockposition_mutableblockposition.c(i, l1, j)) < 0.15F) { -+ iblockdata = BiomeBase.g; -+ } else { -+ iblockdata = BiomeBase.h; -+ } -+ } -+ -+ l = i1; -+ if (l1 >= k - 1) { -+ chunksnapshot.a(k1, l1, j1, iblockdata); -+ } else if (l1 < k - 7 - i1) { -+ iblockdata = BiomeBase.b; -+ iblockdata1 = BiomeBase.a; -+ chunksnapshot.a(k1, l1, j1, BiomeBase.d); -+ } else { -+ chunksnapshot.a(k1, l1, j1, iblockdata1); -+ } -+ } else if (l > 0) { -+ --l; -+ chunksnapshot.a(k1, l1, j1, iblockdata1); -+ if (l == 0 && iblockdata1.getBlock() == Blocks.SAND) { -+ l = random.nextInt(4) + Math.max(0, l1 - 63); -+ iblockdata1 = iblockdata1.get(BlockSand.VARIANT) == BlockSand.EnumSandVariant.RED_SAND ? BiomeBase.e : BiomeBase.f; -+ } -+ } -+ } -+ } -+ } -+ -+ } -+ -+ public Class g() { -+ return this.getClass(); -+ } -+ -+ public BiomeBase.EnumTemperature h() { -+ return (double) this.getTemperature() < 0.2D ? BiomeBase.EnumTemperature.COLD : ((double) this.getTemperature() < 1.0D ? BiomeBase.EnumTemperature.MEDIUM : BiomeBase.EnumTemperature.WARM); -+ } -+ -+ public static BiomeBase getBiome(int i) { -+ return getBiome(i, (BiomeBase) null); -+ } -+ -+ public static BiomeBase getBiome(int i, BiomeBase biomebase) { -+ BiomeBase biomebase1 = a(i); -+ -+ return biomebase1 == null ? biomebase : biomebase1; -+ } -+ -+ public boolean i() { -+ return false; -+ } -+ -+ public final float j() { -+ return this.A; -+ } -+ -+ public final float getHumidity() { -+ return this.D; -+ } -+ -+ public final String l() { -+ return this.z; -+ } -+ -+ public final float m() { -+ return this.B; -+ } -+ -+ public final float getTemperature() { -+ return this.C; -+ } -+ -+ public final boolean p() { -+ return this.F; -+ } -+ -+ public static void q() { -+ a(0, "ocean", new BiomeOcean((new BiomeBase.a("Ocean")).c(-1.0F).d(0.1F))); -+ a(1, "plains", new BiomePlains(false, (new BiomeBase.a("Plains")).c(0.125F).d(0.05F).a(0.8F).b(0.4F))); -+ a(2, "desert", new BiomeDesert((new BiomeBase.a("Desert")).c(0.125F).d(0.05F).a(2.0F).b(0.0F).a())); -+ a(3, "extreme_hills", new BiomeBigHills(BiomeBigHills.Type.NORMAL, (new BiomeBase.a("Extreme Hills")).c(1.0F).d(0.5F).a(0.2F).b(0.3F))); -+ a(4, "forest", new BiomeForest(BiomeForest.Type.NORMAL, (new BiomeBase.a("Forest")).a(0.7F).b(0.8F))); -+ a(5, "taiga", new BiomeTaiga(BiomeTaiga.Type.NORMAL, (new BiomeBase.a("Taiga")).c(0.2F).d(0.2F).a(0.25F).b(0.8F))); -+ a(6, "swampland", new BiomeSwamp((new BiomeBase.a("Swampland")).c(-0.2F).d(0.1F).a(0.8F).b(0.9F).a(14745518))); -+ a(7, "river", new BiomeRiver((new BiomeBase.a("River")).c(-0.5F).d(0.0F))); -+ a(8, "hell", new BiomeHell((new BiomeBase.a("Hell")).a(2.0F).b(0.0F).a())); -+ a(9, "sky", new BiomeTheEnd((new BiomeBase.a("The End")).a())); -+ a(10, "frozen_ocean", new BiomeOcean((new BiomeBase.a("FrozenOcean")).c(-1.0F).d(0.1F).a(0.0F).b(0.5F).b())); -+ a(11, "frozen_river", new BiomeRiver((new BiomeBase.a("FrozenRiver")).c(-0.5F).d(0.0F).a(0.0F).b(0.5F).b())); -+ a(12, "ice_flats", new BiomeIcePlains(false, (new BiomeBase.a("Ice Plains")).c(0.125F).d(0.05F).a(0.0F).b(0.5F).b())); -+ a(13, "ice_mountains", new BiomeIcePlains(false, (new BiomeBase.a("Ice Mountains")).c(0.45F).d(0.3F).a(0.0F).b(0.5F).b())); -+ a(14, "mushroom_island", new BiomeMushrooms((new BiomeBase.a("MushroomIsland")).c(0.2F).d(0.3F).a(0.9F).b(1.0F))); -+ a(15, "mushroom_island_shore", new BiomeMushrooms((new BiomeBase.a("MushroomIslandShore")).c(0.0F).d(0.025F).a(0.9F).b(1.0F))); -+ a(16, "beaches", new BiomeBeach((new BiomeBase.a("Beach")).c(0.0F).d(0.025F).a(0.8F).b(0.4F))); -+ a(17, "desert_hills", new BiomeDesert((new BiomeBase.a("DesertHills")).c(0.45F).d(0.3F).a(2.0F).b(0.0F).a())); -+ a(18, "forest_hills", new BiomeForest(BiomeForest.Type.NORMAL, (new BiomeBase.a("ForestHills")).c(0.45F).d(0.3F).a(0.7F).b(0.8F))); -+ a(19, "taiga_hills", new BiomeTaiga(BiomeTaiga.Type.NORMAL, (new BiomeBase.a("TaigaHills")).a(0.25F).b(0.8F).c(0.45F).d(0.3F))); -+ a(20, "smaller_extreme_hills", new BiomeBigHills(BiomeBigHills.Type.EXTRA_TREES, (new BiomeBase.a("Extreme Hills Edge")).c(0.8F).d(0.3F).a(0.2F).b(0.3F))); -+ a(21, "jungle", new BiomeJungle(false, (new BiomeBase.a("Jungle")).a(0.95F).b(0.9F))); -+ a(22, "jungle_hills", new BiomeJungle(false, (new BiomeBase.a("JungleHills")).c(0.45F).d(0.3F).a(0.95F).b(0.9F))); -+ a(23, "jungle_edge", new BiomeJungle(true, (new BiomeBase.a("JungleEdge")).a(0.95F).b(0.8F))); -+ a(24, "deep_ocean", new BiomeOcean((new BiomeBase.a("Deep Ocean")).c(-1.8F).d(0.1F))); -+ a(25, "stone_beach", new BiomeStoneBeach((new BiomeBase.a("Stone Beach")).c(0.1F).d(0.8F).a(0.2F).b(0.3F))); -+ a(26, "cold_beach", new BiomeBeach((new BiomeBase.a("Cold Beach")).c(0.0F).d(0.025F).a(0.05F).b(0.3F).b())); -+ a(27, "birch_forest", new BiomeForest(BiomeForest.Type.BIRCH, (new BiomeBase.a("Birch Forest")).a(0.6F).b(0.6F))); -+ a(28, "birch_forest_hills", new BiomeForest(BiomeForest.Type.BIRCH, (new BiomeBase.a("Birch Forest Hills")).c(0.45F).d(0.3F).a(0.6F).b(0.6F))); -+ a(29, "roofed_forest", new BiomeForest(BiomeForest.Type.ROOFED, (new BiomeBase.a("Roofed Forest")).a(0.7F).b(0.8F))); -+ a(30, "taiga_cold", new BiomeTaiga(BiomeTaiga.Type.NORMAL, (new BiomeBase.a("Cold Taiga")).c(0.2F).d(0.2F).a(-0.5F).b(0.4F).b())); -+ a(31, "taiga_cold_hills", new BiomeTaiga(BiomeTaiga.Type.NORMAL, (new BiomeBase.a("Cold Taiga Hills")).c(0.45F).d(0.3F).a(-0.5F).b(0.4F).b())); -+ a(32, "redwood_taiga", new BiomeTaiga(BiomeTaiga.Type.MEGA, (new BiomeBase.a("Mega Taiga")).a(0.3F).b(0.8F).c(0.2F).d(0.2F))); -+ a(33, "redwood_taiga_hills", new BiomeTaiga(BiomeTaiga.Type.MEGA, (new BiomeBase.a("Mega Taiga Hills")).c(0.45F).d(0.3F).a(0.3F).b(0.8F))); -+ a(34, "extreme_hills_with_trees", new BiomeBigHills(BiomeBigHills.Type.EXTRA_TREES, (new BiomeBase.a("Extreme Hills+")).c(1.0F).d(0.5F).a(0.2F).b(0.3F))); -+ a(35, "savanna", new BiomeSavanna((new BiomeBase.a("Savanna")).c(0.125F).d(0.05F).a(1.2F).b(0.0F).a())); -+ a(36, "savanna_rock", new BiomeSavanna((new BiomeBase.a("Savanna Plateau")).c(1.5F).d(0.025F).a(1.0F).b(0.0F).a())); -+ a(37, "mesa", new BiomeMesa(false, false, (new BiomeBase.a("Mesa")).a(2.0F).b(0.0F).a())); -+ a(38, "mesa_rock", new BiomeMesa(false, true, (new BiomeBase.a("Mesa Plateau F")).c(1.5F).d(0.025F).a(2.0F).b(0.0F).a())); -+ a(39, "mesa_clear_rock", new BiomeMesa(false, false, (new BiomeBase.a("Mesa Plateau")).c(1.5F).d(0.025F).a(2.0F).b(0.0F).a())); -+ a(127, "void", new BiomeVoid((new BiomeBase.a("The Void")).a())); -+ a(129, "mutated_plains", new BiomePlains(true, (new BiomeBase.a("Sunflower Plains")).a("plains").c(0.125F).d(0.05F).a(0.8F).b(0.4F))); -+ a(130, "mutated_desert", new BiomeDesert((new BiomeBase.a("Desert M")).a("desert").c(0.225F).d(0.25F).a(2.0F).b(0.0F).a())); -+ a(131, "mutated_extreme_hills", new BiomeBigHills(BiomeBigHills.Type.MUTATED, (new BiomeBase.a("Extreme Hills M")).a("extreme_hills").c(1.0F).d(0.5F).a(0.2F).b(0.3F))); -+ a(132, "mutated_forest", new BiomeForest(BiomeForest.Type.FLOWER, (new BiomeBase.a("Flower Forest")).a("forest").d(0.4F).a(0.7F).b(0.8F))); -+ a(133, "mutated_taiga", new BiomeTaiga(BiomeTaiga.Type.NORMAL, (new BiomeBase.a("Taiga M")).a("taiga").c(0.3F).d(0.4F).a(0.25F).b(0.8F))); -+ a(134, "mutated_swampland", new BiomeSwamp((new BiomeBase.a("Swampland M")).a("swampland").c(-0.1F).d(0.3F).a(0.8F).b(0.9F).a(14745518))); -+ a(140, "mutated_ice_flats", new BiomeIcePlains(true, (new BiomeBase.a("Ice Plains Spikes")).a("ice_flats").c(0.425F).d(0.45000002F).a(0.0F).b(0.5F).b())); -+ a(149, "mutated_jungle", new BiomeJungle(false, (new BiomeBase.a("Jungle M")).a("jungle").c(0.2F).d(0.4F).a(0.95F).b(0.9F))); -+ a(151, "mutated_jungle_edge", new BiomeJungle(true, (new BiomeBase.a("JungleEdge M")).a("jungle_edge").c(0.2F).d(0.4F).a(0.95F).b(0.8F))); -+ a(155, "mutated_birch_forest", new BiomeForestMutated((new BiomeBase.a("Birch Forest M")).a("birch_forest").c(0.2F).d(0.4F).a(0.6F).b(0.6F))); -+ a(156, "mutated_birch_forest_hills", new BiomeForestMutated((new BiomeBase.a("Birch Forest Hills M")).a("birch_forest").c(0.55F).d(0.5F).a(0.6F).b(0.6F))); -+ a(157, "mutated_roofed_forest", new BiomeForest(BiomeForest.Type.ROOFED, (new BiomeBase.a("Roofed Forest M")).a("roofed_forest").c(0.2F).d(0.4F).a(0.7F).b(0.8F))); -+ a(158, "mutated_taiga_cold", new BiomeTaiga(BiomeTaiga.Type.NORMAL, (new BiomeBase.a("Cold Taiga M")).a("taiga_cold").c(0.3F).d(0.4F).a(-0.5F).b(0.4F).b())); -+ a(160, "mutated_redwood_taiga", new BiomeTaiga(BiomeTaiga.Type.MEGA_SPRUCE, (new BiomeBase.a("Mega Spruce Taiga")).a("redwood_taiga").c(0.2F).d(0.2F).a(0.25F).b(0.8F))); -+ a(161, "mutated_redwood_taiga_hills", new BiomeTaiga(BiomeTaiga.Type.MEGA_SPRUCE, (new BiomeBase.a("Redwood Taiga Hills M")).a("redwood_taiga_hills").c(0.2F).d(0.2F).a(0.25F).b(0.8F))); -+ a(162, "mutated_extreme_hills_with_trees", new BiomeBigHills(BiomeBigHills.Type.MUTATED, (new BiomeBase.a("Extreme Hills+ M")).a("extreme_hills_with_trees").c(1.0F).d(0.5F).a(0.2F).b(0.3F))); -+ a(163, "mutated_savanna", new BiomeSavannaMutated((new BiomeBase.a("Savanna M")).a("savanna").c(0.3625F).d(1.225F).a(1.1F).b(0.0F).a())); -+ a(164, "mutated_savanna_rock", new BiomeSavannaMutated((new BiomeBase.a("Savanna Plateau M")).a("savanna_rock").c(1.05F).d(1.2125001F).a(1.0F).b(0.0F).a())); -+ a(165, "mutated_mesa", new BiomeMesa(true, false, (new BiomeBase.a("Mesa (Bryce)")).a("mesa").a(2.0F).b(0.0F).a())); -+ a(166, "mutated_mesa_rock", new BiomeMesa(false, true, (new BiomeBase.a("Mesa Plateau F M")).a("mesa_rock").c(0.45F).d(0.3F).a(2.0F).b(0.0F).a())); -+ a(167, "mutated_mesa_clear_rock", new BiomeMesa(false, false, (new BiomeBase.a("Mesa Plateau M")).a("mesa_clear_rock").c(0.45F).d(0.3F).a(2.0F).b(0.0F).a())); -+ Collections.addAll(BiomeBase.i, new BiomeBase[] { Biomes.a, Biomes.c, Biomes.d, Biomes.e, Biomes.f, Biomes.g, Biomes.h, Biomes.i, Biomes.m, Biomes.n, Biomes.o, Biomes.p, Biomes.q, Biomes.r, Biomes.s, Biomes.t, Biomes.u, Biomes.w, Biomes.x, Biomes.y, Biomes.z, Biomes.A, Biomes.B, Biomes.C, Biomes.D, Biomes.E, Biomes.F, Biomes.G, Biomes.H, Biomes.I, Biomes.J, Biomes.K, Biomes.L, Biomes.M, Biomes.N, Biomes.O}); -+ } -+ -+ private static void a(int i, String s, BiomeBase biomebase) { -+ BiomeBase.REGISTRY_ID.a(i, new MinecraftKey(s), biomebase); -+ if (biomebase.b()) { -+ BiomeBase.j.a(biomebase, a((BiomeBase) BiomeBase.REGISTRY_ID.get(new MinecraftKey(biomebase.H)))); -+ } -+ -+ } -+ -+ static class SyntheticClass_1 { -+ -+ static final int[] a = new int[EnumCreatureType.values().length]; -+ -+ static { -+ try { -+ BiomeBase.SyntheticClass_1.a[EnumCreatureType.MONSTER.ordinal()] = 1; -+ } catch (NoSuchFieldError nosuchfielderror) { -+ ; -+ } -+ -+ try { -+ BiomeBase.SyntheticClass_1.a[EnumCreatureType.CREATURE.ordinal()] = 2; -+ } catch (NoSuchFieldError nosuchfielderror1) { -+ ; -+ } -+ -+ try { -+ BiomeBase.SyntheticClass_1.a[EnumCreatureType.WATER_CREATURE.ordinal()] = 3; -+ } catch (NoSuchFieldError nosuchfielderror2) { -+ ; -+ } -+ -+ try { -+ BiomeBase.SyntheticClass_1.a[EnumCreatureType.AMBIENT.ordinal()] = 4; -+ } catch (NoSuchFieldError nosuchfielderror3) { -+ ; -+ } -+ -+ } -+ } -+ -+ public static class a { -+ -+ private final String a; -+ private float b = 0.1F; -+ private float c = 0.2F; -+ private float d = 0.5F; -+ private float e = 0.5F; -+ private int f = 16777215; -+ private boolean g; -+ private boolean h = true; -+ private String i; -+ -+ public a(String s) { -+ this.a = s; -+ } -+ -+ protected BiomeBase.a a(float f) { -+ if (f > 0.1F && f < 0.2F) { -+ throw new IllegalArgumentException("Please avoid temperatures in the range 0.1 - 0.2 because of snow"); -+ } else { -+ this.d = f; -+ return this; -+ } -+ } -+ -+ protected BiomeBase.a b(float f) { -+ this.e = f; -+ return this; -+ } -+ -+ protected BiomeBase.a c(float f) { -+ this.b = f; -+ return this; -+ } -+ -+ protected BiomeBase.a d(float f) { -+ this.c = f; -+ return this; -+ } -+ -+ protected BiomeBase.a a() { -+ this.h = false; -+ return this; -+ } -+ -+ protected BiomeBase.a b() { -+ this.g = true; -+ return this; -+ } -+ -+ protected BiomeBase.a a(int i) { -+ this.f = i; -+ return this; -+ } -+ -+ protected BiomeBase.a a(String s) { -+ this.i = s; -+ return this; -+ } -+ } -+ -+ public static class BiomeMeta extends WeightedRandom.WeightedRandomChoice { -+ -+ public Class b; -+ public int c; -+ public int d; -+ -+ public BiomeMeta(Class oclass, int i, int j, int k) { -+ super(i); -+ this.b = oclass; -+ this.c = j; -+ this.d = k; -+ } -+ -+ public String toString() { -+ return this.b.getSimpleName() + "*(" + this.c + "-" + this.d + "):" + this.a; -+ } -+ } -+ -+ public static enum EnumTemperature { -+ -+ OCEAN, COLD, MEDIUM, WARM; -+ -+ private EnumTemperature() {} -+ } -+} -diff --git a/src/main/java/net/minecraft/server/BiomeMesa.java b/src/main/java/net/minecraft/server/BiomeMesa.java -new file mode 100644 -index 0000000..3ce22aa ---- /dev/null -+++ b/src/main/java/net/minecraft/server/BiomeMesa.java -@@ -0,0 +1,252 @@ -+package net.minecraft.server; -+ -+import java.util.Arrays; -+import java.util.Random; -+ -+public class BiomeMesa extends BiomeBase { -+ -+ protected static final IBlockData y = Blocks.DIRT.getBlockData().set(BlockDirt.VARIANT, BlockDirt.EnumDirtVariant.COARSE_DIRT); -+ protected static final IBlockData z = Blocks.GRASS.getBlockData(); -+ protected static final IBlockData A = Blocks.HARDENED_CLAY.getBlockData(); -+ protected static final IBlockData B = Blocks.STAINED_HARDENED_CLAY.getBlockData(); -+ protected static final IBlockData C = BiomeMesa.B.set(BlockCloth.COLOR, EnumColor.ORANGE); -+ protected static final IBlockData D = Blocks.SAND.getBlockData().set(BlockSand.VARIANT, BlockSand.EnumSandVariant.RED_SAND); -+ private IBlockData[] E; -+ private long F; -+ private NoiseGenerator3 G; -+ private NoiseGenerator3 H; -+ private NoiseGenerator3 I; -+ private boolean J; -+ private boolean K; -+ -+ public BiomeMesa(boolean flag, boolean flag1, BiomeBase.a biomebase_a) { -+ super(biomebase_a); -+ this.J = flag; -+ this.K = flag1; -+ this.v.clear(); -+ this.r = BiomeMesa.D; -+ this.s = BiomeMesa.B; -+ this.t.z = -999; -+ this.t.C = 20; -+ this.t.E = 3; -+ this.t.F = 5; -+ this.t.A = 0; -+ this.v.clear(); -+ if (flag1) { -+ this.t.z = 5; -+ } -+ -+ } -+ -+ public WorldGenTreeAbstract a(Random random) { -+ return BiomeMesa.n; -+ } -+ -+ public void a(World world, Random random, BlockPosition blockposition) { -+ super.a(world, random, blockposition); -+ } -+ -+ public void a(World world, Random random, ChunkSnapshot chunksnapshot, int i, int j, double d0) { -+ if (this.E == null || this.F != world.getSeed()) { -+ this.a(world.getSeed()); -+ } -+ -+ if (this.G == null || this.H == null || this.F != world.getSeed()) { -+ Random random1 = new Random(this.F); -+ -+ this.G = new NoiseGenerator3(random1, 4); -+ this.H = new NoiseGenerator3(random1, 1); -+ } -+ -+ this.F = world.getSeed(); -+ double d1 = 0.0D; -+ int k; -+ int l; -+ -+ if (this.J) { -+ k = (i & -16) + (j & 15); -+ l = (j & -16) + (i & 15); -+ double d2 = Math.min(Math.abs(d0), this.G.a((double) k * 0.25D, (double) l * 0.25D)); -+ -+ if (d2 > 0.0D) { -+ double d3 = 0.001953125D; -+ double d4 = Math.abs(this.H.a((double) k * d3, (double) l * d3)); -+ -+ d1 = d2 * d2 * 2.5D; -+ double d5 = Math.ceil(d4 * 50.0D) + 14.0D; -+ -+ if (d1 > d5) { -+ d1 = d5; -+ } -+ -+ d1 += 64.0D; -+ } -+ } -+ -+ k = i & 15; -+ l = j & 15; -+ int i1 = world.K(); -+ IBlockData iblockdata = BiomeMesa.B; -+ IBlockData iblockdata1 = this.s; -+ int j1 = (int) (d0 / 3.0D + 3.0D + random.nextDouble() * 0.25D); -+ boolean flag = Math.cos(d0 / 3.0D * 3.141592653589793D) > 0.0D; -+ int k1 = -1; -+ boolean flag1 = false; -+ -+ for (int l1 = 255; l1 >= 0; --l1) { -+ if (chunksnapshot.a(l, l1, k).getMaterial() == Material.AIR && l1 < (int) d1) { -+ chunksnapshot.a(l, l1, k, BiomeMesa.a); -+ } -+ -+ if (l1 <= random.nextInt(5)) { -+ chunksnapshot.a(l, l1, k, BiomeMesa.c); -+ } else { -+ IBlockData iblockdata2 = chunksnapshot.a(l, l1, k); -+ -+ if (iblockdata2.getMaterial() == Material.AIR) { -+ k1 = -1; -+ } else if (iblockdata2.getBlock() == Blocks.STONE) { -+ if (k1 == -1) { -+ flag1 = false; -+ if (j1 <= 0) { -+ iblockdata = BiomeMesa.b; -+ iblockdata1 = BiomeMesa.a; -+ } else if (l1 >= i1 - 4 && l1 <= i1 + 1) { -+ iblockdata = BiomeMesa.B; -+ iblockdata1 = this.s; -+ } -+ -+ if (l1 < i1 && (iblockdata == null || iblockdata.getMaterial() == Material.AIR)) { -+ iblockdata = BiomeMesa.h; -+ } -+ -+ k1 = j1 + Math.max(0, l1 - i1); -+ if (l1 >= i1 - 1) { -+ if (this.K && l1 > 86 + j1 * 2) { -+ if (flag) { -+ chunksnapshot.a(l, l1, k, BiomeMesa.y); -+ } else { -+ chunksnapshot.a(l, l1, k, BiomeMesa.z); -+ } -+ } else if (l1 > i1 + 3 + j1) { -+ IBlockData iblockdata3; -+ -+ if (l1 >= 64 && l1 <= 127) { -+ if (flag) { -+ iblockdata3 = BiomeMesa.A; -+ } else { -+ iblockdata3 = this.a(i, l1, j); -+ } -+ } else { -+ iblockdata3 = BiomeMesa.C; -+ } -+ -+ chunksnapshot.a(l, l1, k, iblockdata3); -+ } else { -+ chunksnapshot.a(l, l1, k, this.r); -+ flag1 = true; -+ } -+ } else { -+ chunksnapshot.a(l, l1, k, iblockdata1); -+ if (iblockdata1.getBlock() == Blocks.STAINED_HARDENED_CLAY) { -+ chunksnapshot.a(l, l1, k, BiomeMesa.C); -+ } -+ } -+ } else if (k1 > 0) { -+ --k1; -+ if (flag1) { -+ chunksnapshot.a(l, l1, k, BiomeMesa.C); -+ } else { -+ chunksnapshot.a(l, l1, k, this.a(i, l1, j)); -+ } -+ } -+ } -+ } -+ } -+ -+ } -+ -+ private void a(long i) { -+ this.E = new IBlockData[64]; -+ Arrays.fill(this.E, BiomeMesa.A); -+ Random random = new Random(i); -+ -+ this.I = new NoiseGenerator3(random, 1); -+ -+ int j; -+ -+ for (j = 0; j < 64; ++j) { -+ j += random.nextInt(5) + 1; -+ if (j < 64) { -+ this.E[j] = BiomeMesa.C; -+ } -+ } -+ -+ j = random.nextInt(4) + 2; -+ -+ int k; -+ int l; -+ int i1; -+ int j1; -+ -+ for (k = 0; k < j; ++k) { -+ l = random.nextInt(3) + 1; -+ i1 = random.nextInt(64); -+ -+ for (j1 = 0; i1 + j1 < 64 && j1 < l; ++j1) { -+ this.E[i1 + j1] = BiomeMesa.B.set(BlockCloth.COLOR, EnumColor.YELLOW); -+ } -+ } -+ -+ k = random.nextInt(4) + 2; -+ -+ int k1; -+ -+ for (l = 0; l < k; ++l) { -+ i1 = random.nextInt(3) + 2; -+ j1 = random.nextInt(64); -+ -+ for (k1 = 0; j1 + k1 < 64 && k1 < i1; ++k1) { -+ this.E[j1 + k1] = BiomeMesa.B.set(BlockCloth.COLOR, EnumColor.BROWN); -+ } -+ } -+ -+ l = random.nextInt(4) + 2; -+ -+ for (i1 = 0; i1 < l; ++i1) { -+ j1 = random.nextInt(3) + 1; -+ k1 = random.nextInt(64); -+ -+ for (int l1 = 0; k1 + l1 < 64 && l1 < j1; ++l1) { -+ this.E[k1 + l1] = BiomeMesa.B.set(BlockCloth.COLOR, EnumColor.RED); -+ } -+ } -+ -+ i1 = random.nextInt(3) + 3; -+ j1 = 0; -+ -+ for (k1 = 0; k1 < i1; ++k1) { -+ byte b0 = 1; -+ -+ j1 += random.nextInt(16) + 4; -+ -+ for (int i2 = 0; j1 + i2 < 64 && i2 < b0; ++i2) { -+ this.E[j1 + i2] = BiomeMesa.B.set(BlockCloth.COLOR, EnumColor.WHITE); -+ if (j1 + i2 > 1 && random.nextBoolean()) { -+ this.E[j1 + i2 - 1] = BiomeMesa.B.set(BlockCloth.COLOR, EnumColor.SILVER); -+ } -+ -+ if (j1 + i2 < 63 && random.nextBoolean()) { -+ this.E[j1 + i2 + 1] = BiomeMesa.B.set(BlockCloth.COLOR, EnumColor.SILVER); -+ } -+ } -+ } -+ -+ } -+ -+ private IBlockData a(int i, int j, int k) { -+ int l = (int) Math.round(this.I.a((double) i / 512.0D, (double) i / 512.0D) * 2.0D); -+ -+ return this.E[(j + l + 64) % 64]; -+ } -+} -diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -new file mode 100644 -index 0000000..7d27317 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -0,0 +1,452 @@ -+package net.minecraft.server; -+ -+import java.util.Iterator; -+ -+public class BlockChest extends BlockTileEntity { -+ -+ public static final BlockStateDirection FACING = BlockFacingHorizontal.FACING; -+ protected static final AxisAlignedBB b = new AxisAlignedBB(0.0625D, 0.0D, 0.0D, 0.9375D, 0.875D, 0.9375D); -+ protected static final AxisAlignedBB c = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.875D, 1.0D); -+ protected static final AxisAlignedBB d = new AxisAlignedBB(0.0D, 0.0D, 0.0625D, 0.9375D, 0.875D, 0.9375D); -+ protected static final AxisAlignedBB e = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 1.0D, 0.875D, 0.9375D); -+ protected static final AxisAlignedBB f = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.875D, 0.9375D); -+ public final Type g; -+ -+ protected BlockChest(Type blockchest_type) { -+ super(Material.WOOD); -+ this.w(this.blockStateList.getBlockData().set(BlockChest.FACING, EnumDirection.NORTH)); -+ this.g = blockchest_type; -+ this.a(blockchest_type == Type.TRAP ? CreativeModeTab.d : CreativeModeTab.c); -+ } -+ -+ public boolean b(IBlockData iblockdata) { -+ return false; -+ } -+ -+ public boolean c(IBlockData iblockdata) { -+ return false; -+ } -+ -+ public EnumRenderType a(IBlockData iblockdata) { -+ return EnumRenderType.ENTITYBLOCK_ANIMATED; -+ } -+ -+ public AxisAlignedBB a(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) { -+ return iblockaccess.getType(blockposition.north()).getBlock() == this ? BlockChest.b : (iblockaccess.getType(blockposition.south()).getBlock() == this ? BlockChest.c : (iblockaccess.getType(blockposition.west()).getBlock() == this ? BlockChest.d : (iblockaccess.getType(blockposition.east()).getBlock() == this ? BlockChest.e : BlockChest.f))); -+ } -+ -+ public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { -+ this.e(world, blockposition, iblockdata); -+ Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); -+ -+ while (iterator.hasNext()) { -+ EnumDirection enumdirection = (EnumDirection) iterator.next(); -+ BlockPosition blockposition1 = blockposition.shift(enumdirection); -+ IBlockData iblockdata1 = world.getType(blockposition1); -+ -+ if (iblockdata1.getBlock() == this) { -+ this.e(world, blockposition1, iblockdata1); -+ } -+ } -+ -+ } -+ -+ public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) { -+ return this.getBlockData().set(BlockChest.FACING, entityliving.getDirection()); -+ } -+ -+ public void postPlace(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving, ItemStack itemstack) { -+ EnumDirection enumdirection = EnumDirection.fromType2(MathHelper.floor((double) (entityliving.yaw * 4.0F / 360.0F) + 0.5D) & 3).opposite(); -+ -+ iblockdata = iblockdata.set(BlockChest.FACING, enumdirection); -+ BlockPosition blockposition1 = blockposition.north(); -+ BlockPosition blockposition2 = blockposition.south(); -+ BlockPosition blockposition3 = blockposition.west(); -+ BlockPosition blockposition4 = blockposition.east(); -+ boolean flag = this == world.getType(blockposition1).getBlock(); -+ boolean flag1 = this == world.getType(blockposition2).getBlock(); -+ boolean flag2 = this == world.getType(blockposition3).getBlock(); -+ boolean flag3 = this == world.getType(blockposition4).getBlock(); -+ -+ if (!flag && !flag1 && !flag2 && !flag3) { -+ world.setTypeAndData(blockposition, iblockdata, 3); -+ } else if (enumdirection.k() == EnumDirection.EnumAxis.X && (flag || flag1)) { -+ if (flag) { -+ world.setTypeAndData(blockposition1, iblockdata, 3); -+ } else { -+ world.setTypeAndData(blockposition2, iblockdata, 3); -+ } -+ -+ world.setTypeAndData(blockposition, iblockdata, 3); -+ } else if (enumdirection.k() == EnumDirection.EnumAxis.Z && (flag2 || flag3)) { -+ if (flag2) { -+ world.setTypeAndData(blockposition3, iblockdata, 3); -+ } else { -+ world.setTypeAndData(blockposition4, iblockdata, 3); -+ } -+ -+ world.setTypeAndData(blockposition, iblockdata, 3); -+ } -+ -+ if (itemstack.hasName()) { -+ TileEntity tileentity = world.getTileEntity(blockposition); -+ -+ if (tileentity instanceof TileEntityChest) { -+ ((TileEntityChest) tileentity).a(itemstack.getName()); -+ } -+ } -+ -+ } -+ -+ public IBlockData e(World world, BlockPosition blockposition, IBlockData iblockdata) { -+ if (world.isClientSide) { -+ return iblockdata; -+ } else { -+ IBlockData iblockdata1 = world.getType(blockposition.north()); -+ IBlockData iblockdata2 = world.getType(blockposition.south()); -+ IBlockData iblockdata3 = world.getType(blockposition.west()); -+ IBlockData iblockdata4 = world.getType(blockposition.east()); -+ EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockChest.FACING); -+ -+ if (iblockdata1.getBlock() != this && iblockdata2.getBlock() != this) { -+ boolean flag = iblockdata1.b(); -+ boolean flag1 = iblockdata2.b(); -+ -+ if (iblockdata3.getBlock() == this || iblockdata4.getBlock() == this) { -+ BlockPosition blockposition1 = iblockdata3.getBlock() == this ? blockposition.west() : blockposition.east(); -+ IBlockData iblockdata5 = world.getType(blockposition1.north()); -+ IBlockData iblockdata6 = world.getType(blockposition1.south()); -+ -+ enumdirection = EnumDirection.SOUTH; -+ EnumDirection enumdirection1; -+ -+ if (iblockdata3.getBlock() == this) { -+ enumdirection1 = (EnumDirection) iblockdata3.get(BlockChest.FACING); -+ } else { -+ enumdirection1 = (EnumDirection) iblockdata4.get(BlockChest.FACING); -+ } -+ -+ if (enumdirection1 == EnumDirection.NORTH) { -+ enumdirection = EnumDirection.NORTH; -+ } -+ -+ if ((flag || iblockdata5.b()) && !flag1 && !iblockdata6.b()) { -+ enumdirection = EnumDirection.SOUTH; -+ } -+ -+ if ((flag1 || iblockdata6.b()) && !flag && !iblockdata5.b()) { -+ enumdirection = EnumDirection.NORTH; -+ } -+ } -+ } else { -+ BlockPosition blockposition2 = iblockdata1.getBlock() == this ? blockposition.north() : blockposition.south(); -+ IBlockData iblockdata7 = world.getType(blockposition2.west()); -+ IBlockData iblockdata8 = world.getType(blockposition2.east()); -+ -+ enumdirection = EnumDirection.EAST; -+ EnumDirection enumdirection2; -+ -+ if (iblockdata1.getBlock() == this) { -+ enumdirection2 = (EnumDirection) iblockdata1.get(BlockChest.FACING); -+ } else { -+ enumdirection2 = (EnumDirection) iblockdata2.get(BlockChest.FACING); -+ } -+ -+ if (enumdirection2 == EnumDirection.WEST) { -+ enumdirection = EnumDirection.WEST; -+ } -+ -+ if ((iblockdata3.b() || iblockdata7.b()) && !iblockdata4.b() && !iblockdata8.b()) { -+ enumdirection = EnumDirection.EAST; -+ } -+ -+ if ((iblockdata4.b() || iblockdata8.b()) && !iblockdata3.b() && !iblockdata7.b()) { -+ enumdirection = EnumDirection.WEST; -+ } -+ } -+ -+ iblockdata = iblockdata.set(BlockChest.FACING, enumdirection); -+ world.setTypeAndData(blockposition, iblockdata, 3); -+ return iblockdata; -+ } -+ } -+ -+ public IBlockData f(World world, BlockPosition blockposition, IBlockData iblockdata) { -+ EnumDirection enumdirection = null; -+ Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); -+ -+ while (iterator.hasNext()) { -+ EnumDirection enumdirection1 = (EnumDirection) iterator.next(); -+ IBlockData iblockdata1 = world.getType(blockposition.shift(enumdirection1)); -+ -+ if (iblockdata1.getBlock() == this) { -+ return iblockdata; -+ } -+ -+ if (iblockdata1.b()) { -+ if (enumdirection != null) { -+ enumdirection = null; -+ break; -+ } -+ -+ enumdirection = enumdirection1; -+ } -+ } -+ -+ if (enumdirection != null) { -+ return iblockdata.set(BlockChest.FACING, enumdirection.opposite()); -+ } else { -+ EnumDirection enumdirection2 = (EnumDirection) iblockdata.get(BlockChest.FACING); -+ -+ if (world.getType(blockposition.shift(enumdirection2)).b()) { -+ enumdirection2 = enumdirection2.opposite(); -+ } -+ -+ if (world.getType(blockposition.shift(enumdirection2)).b()) { -+ enumdirection2 = enumdirection2.e(); -+ } -+ -+ if (world.getType(blockposition.shift(enumdirection2)).b()) { -+ enumdirection2 = enumdirection2.opposite(); -+ } -+ -+ return iblockdata.set(BlockChest.FACING, enumdirection2); -+ } -+ } -+ -+ public boolean canPlace(World world, BlockPosition blockposition) { -+ int i = 0; -+ BlockPosition blockposition1 = blockposition.west(); -+ BlockPosition blockposition2 = blockposition.east(); -+ BlockPosition blockposition3 = blockposition.north(); -+ BlockPosition blockposition4 = blockposition.south(); -+ -+ if (world.getType(blockposition1).getBlock() == this) { -+ if (this.d(world, blockposition1)) { -+ return false; -+ } -+ -+ ++i; -+ } -+ -+ if (world.getType(blockposition2).getBlock() == this) { -+ if (this.d(world, blockposition2)) { -+ return false; -+ } -+ -+ ++i; -+ } -+ -+ if (world.getType(blockposition3).getBlock() == this) { -+ if (this.d(world, blockposition3)) { -+ return false; -+ } -+ -+ ++i; -+ } -+ -+ if (world.getType(blockposition4).getBlock() == this) { -+ if (this.d(world, blockposition4)) { -+ return false; -+ } -+ -+ ++i; -+ } -+ -+ return i <= 1; -+ } -+ -+ private boolean d(World world, BlockPosition blockposition) { -+ if (world.getType(blockposition).getBlock() != this) { -+ return false; -+ } else { -+ Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); -+ -+ EnumDirection enumdirection; -+ -+ do { -+ if (!iterator.hasNext()) { -+ return false; -+ } -+ -+ enumdirection = (EnumDirection) iterator.next(); -+ } while (world.getType(blockposition.shift(enumdirection)).getBlock() != this); -+ -+ return true; -+ } -+ } -+ -+ public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) { -+ super.doPhysics(world, blockposition, iblockdata, block); -+ TileEntity tileentity = world.getTileEntity(blockposition); -+ -+ if (tileentity instanceof TileEntityChest) { -+ tileentity.invalidateBlockCache(); -+ } -+ -+ } -+ -+ public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) { -+ TileEntity tileentity = world.getTileEntity(blockposition); -+ -+ if (tileentity instanceof IInventory) { -+ InventoryUtils.dropInventory(world, blockposition, (IInventory) tileentity); -+ world.updateAdjacentComparators(blockposition, this); -+ } -+ -+ super.remove(world, blockposition, iblockdata); -+ } -+ -+ public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) { -+ if (world.isClientSide) { -+ return true; -+ } else { -+ ITileInventory itileinventory = this.c(world, blockposition); -+ -+ if (itileinventory != null) { -+ entityhuman.openContainer(itileinventory); -+ if (this.g == Type.BASIC) { -+ entityhuman.b(StatisticList.ac); -+ } else if (this.g == Type.TRAP) { -+ entityhuman.b(StatisticList.W); -+ } -+ } -+ -+ return true; -+ } -+ } -+ -+ public ITileInventory c(World world, BlockPosition blockposition) { -+ TileEntity tileentity = world.getTileEntity(blockposition); -+ -+ if (!(tileentity instanceof TileEntityChest)) { -+ return null; -+ } else { -+ Object object = (TileEntityChest) tileentity; -+ -+ if (this.e(world, blockposition)) { -+ return null; -+ } else { -+ Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); -+ -+ while (iterator.hasNext()) { -+ EnumDirection enumdirection = (EnumDirection) iterator.next(); -+ BlockPosition blockposition1 = blockposition.shift(enumdirection); -+ Block block = world.getType(blockposition1).getBlock(); -+ -+ if (block == this) { -+ if (this.e(world, blockposition1)) { -+ return null; -+ } -+ -+ TileEntity tileentity1 = world.getTileEntity(blockposition1); -+ -+ if (tileentity1 instanceof TileEntityChest) { -+ if (enumdirection != EnumDirection.WEST && enumdirection != EnumDirection.NORTH) { -+ object = new InventoryLargeChest("container.chestDouble", (ITileInventory) object, (TileEntityChest) tileentity1); -+ } else { -+ object = new InventoryLargeChest("container.chestDouble", (TileEntityChest) tileentity1, (ITileInventory) object); -+ } -+ } -+ } -+ } -+ -+ return (ITileInventory) object; -+ } -+ } -+ } -+ -+ public TileEntity a(World world, int i) { -+ return new TileEntityChest(); -+ } -+ -+ public boolean isPowerSource(IBlockData iblockdata) { -+ return this.g == Type.TRAP; -+ } -+ -+ public int b(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) { -+ if (!iblockdata.m()) { -+ return 0; -+ } else { -+ int i = 0; -+ TileEntity tileentity = iblockaccess.getTileEntity(blockposition); -+ -+ if (tileentity instanceof TileEntityChest) { -+ i = ((TileEntityChest) tileentity).l; -+ } -+ -+ return MathHelper.clamp(i, 0, 15); -+ } -+ } -+ -+ public int c(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) { -+ return enumdirection == EnumDirection.UP ? iblockdata.a(iblockaccess, blockposition, enumdirection) : 0; -+ } -+ -+ private boolean e(World world, BlockPosition blockposition) { -+ return this.i(world, blockposition) || this.j(world, blockposition); -+ } -+ -+ private boolean i(World world, BlockPosition blockposition) { -+ return world.getType(blockposition.up()).l(); -+ } -+ -+ private boolean j(World world, BlockPosition blockposition) { -+ Iterator iterator = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))).iterator(); -+ -+ EntityOcelot entityocelot; -+ -+ do { -+ if (!iterator.hasNext()) { -+ return false; -+ } -+ -+ Entity entity = (Entity) iterator.next(); -+ -+ entityocelot = (EntityOcelot) entity; -+ } while (!entityocelot.isSitting()); -+ -+ return true; -+ } -+ -+ public boolean isComplexRedstone(IBlockData iblockdata) { -+ return true; -+ } -+ -+ public int d(IBlockData iblockdata, World world, BlockPosition blockposition) { -+ return Container.b((IInventory) this.c(world, blockposition)); -+ } -+ -+ public IBlockData fromLegacyData(int i) { -+ EnumDirection enumdirection = EnumDirection.fromType1(i); -+ -+ if (enumdirection.k() == EnumDirection.EnumAxis.Y) { -+ enumdirection = EnumDirection.NORTH; -+ } -+ -+ return this.getBlockData().set(BlockChest.FACING, enumdirection); -+ } -+ -+ public int toLegacyData(IBlockData iblockdata) { -+ return ((EnumDirection) iblockdata.get(BlockChest.FACING)).a(); -+ } -+ -+ public IBlockData a(IBlockData iblockdata, EnumBlockRotation enumblockrotation) { -+ return iblockdata.set(BlockChest.FACING, enumblockrotation.a((EnumDirection) iblockdata.get(BlockChest.FACING))); -+ } -+ -+ public IBlockData a(IBlockData iblockdata, EnumBlockMirror enumblockmirror) { -+ return iblockdata.a(enumblockmirror.a((EnumDirection) iblockdata.get(BlockChest.FACING))); -+ } -+ -+ protected BlockStateList getStateList() { -+ return new BlockStateList(this, new IBlockState[] { BlockChest.FACING}); -+ } -+ -+ public static enum Type { -+ -+ BASIC, TRAP; -+ -+ private Type() {} -+ } -+} -diff --git a/src/main/java/net/minecraft/server/BlockFalling.java b/src/main/java/net/minecraft/server/BlockFalling.java -new file mode 100644 -index 0000000..6654240 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/BlockFalling.java -@@ -0,0 +1,75 @@ -+package net.minecraft.server; -+ -+import java.util.Random; -+ -+public class BlockFalling extends Block { -+ -+ public static boolean instaFall; -+ -+ public BlockFalling() { -+ super(Material.SAND); -+ this.a(CreativeModeTab.b); -+ } -+ -+ public BlockFalling(Material material) { -+ super(material); -+ } -+ -+ public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { -+ world.a(blockposition, (Block) this, this.a(world)); -+ } -+ -+ public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) { -+ world.a(blockposition, (Block) this, this.a(world)); -+ } -+ -+ public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { -+ if (!world.isClientSide) { -+ this.b(world, blockposition); -+ } -+ -+ } -+ -+ private void b(World world, BlockPosition blockposition) { -+ if (i(world.getType(blockposition.down())) && blockposition.getY() >= 0) { -+ byte b0 = 32; -+ -+ if (!BlockFalling.instaFall && world.areChunksLoadedBetween(blockposition.a(-b0, -b0, -b0), blockposition.a(b0, b0, b0))) { -+ if (!world.isClientSide) { -+ EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, world.getType(blockposition)); -+ -+ this.a(entityfallingblock); -+ world.addEntity(entityfallingblock); -+ } -+ } else { -+ world.setAir(blockposition); -+ -+ BlockPosition blockposition1; -+ -+ for (blockposition1 = blockposition.down(); i(world.getType(blockposition1)) && blockposition1.getY() > 0; blockposition1 = blockposition1.down()) { -+ ; -+ } -+ -+ if (blockposition1.getY() > 0) { -+ world.setTypeUpdate(blockposition1.up(), this.getBlockData()); -+ } -+ } -+ -+ } -+ } -+ -+ protected void a(EntityFallingBlock entityfallingblock) {} -+ -+ public int a(World world) { -+ return 2; -+ } -+ -+ public static boolean i(IBlockData iblockdata) { -+ Block block = iblockdata.getBlock(); -+ Material material = iblockdata.getMaterial(); -+ -+ return block == Blocks.FIRE || material == Material.AIR || material == Material.WATER || material == Material.LAVA; -+ } -+ -+ public void a_(World world, BlockPosition blockposition) {} -+} -diff --git a/src/main/java/net/minecraft/server/BlockFluids.java b/src/main/java/net/minecraft/server/BlockFluids.java -new file mode 100644 -index 0000000..675cdc0 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/BlockFluids.java -@@ -0,0 +1,224 @@ -+package net.minecraft.server; -+ -+import java.util.Iterator; -+import java.util.Random; -+ -+public abstract class BlockFluids extends Block { -+ -+ public static final BlockStateInteger LEVEL = BlockStateInteger.of("level", 0, 15); -+ -+ protected BlockFluids(Material material) { -+ super(material); -+ this.w(this.blockStateList.getBlockData().set(BlockFluids.LEVEL, Integer.valueOf(0))); -+ this.a(true); -+ } -+ -+ public AxisAlignedBB a(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) { -+ return BlockFluids.j; -+ } -+ -+ public AxisAlignedBB a(IBlockData iblockdata, World world, BlockPosition blockposition) { -+ return BlockFluids.k; -+ } -+ -+ public boolean b(IBlockAccess iblockaccess, BlockPosition blockposition) { -+ return this.material != Material.LAVA; -+ } -+ -+ public static float e(int i) { -+ if (i >= 8) { -+ i = 0; -+ } -+ -+ return (float) (i + 1) / 9.0F; -+ } -+ -+ protected int c(IBlockAccess iblockaccess, BlockPosition blockposition) { -+ return iblockaccess.getType(blockposition).getMaterial() == this.material ? ((Integer) iblockaccess.getType(blockposition).get(BlockFluids.LEVEL)).intValue() : -1; -+ } -+ -+ protected int d(IBlockAccess iblockaccess, BlockPosition blockposition) { -+ int i = this.c(iblockaccess, blockposition); -+ -+ return i >= 8 ? 0 : i; -+ } -+ -+ public boolean c(IBlockData iblockdata) { -+ return false; -+ } -+ -+ public boolean b(IBlockData iblockdata) { -+ return false; -+ } -+ -+ public boolean a(IBlockData iblockdata, boolean flag) { -+ return flag && ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() == 0; -+ } -+ -+ public boolean a(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) { -+ Material material = iblockaccess.getType(blockposition).getMaterial(); -+ -+ return material == this.material ? false : (enumdirection == EnumDirection.UP ? true : (material == Material.ICE ? false : super.a(iblockaccess, blockposition, enumdirection))); -+ } -+ -+ public EnumRenderType a(IBlockData iblockdata) { -+ return EnumRenderType.LIQUID; -+ } -+ -+ public Item getDropType(IBlockData iblockdata, Random random, int i) { -+ return null; -+ } -+ -+ public int a(Random random) { -+ return 0; -+ } -+ -+ protected Vec3D f(IBlockAccess iblockaccess, BlockPosition blockposition) { -+ double d0 = 0.0D; -+ double d1 = 0.0D; -+ double d2 = 0.0D; -+ int i = this.d(iblockaccess, blockposition); -+ BlockPosition.PooledBlockPosition blockposition_pooledblockposition = BlockPosition.PooledBlockPosition.s(); -+ Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); -+ -+ while (iterator.hasNext()) { -+ EnumDirection enumdirection = (EnumDirection) iterator.next(); -+ -+ blockposition_pooledblockposition.h(blockposition).c(enumdirection); -+ int j = this.d(iblockaccess, blockposition_pooledblockposition); -+ int k; -+ -+ if (j < 0) { -+ if (!iblockaccess.getType(blockposition_pooledblockposition).getMaterial().isSolid()) { -+ j = this.d(iblockaccess, blockposition_pooledblockposition.down()); -+ if (j >= 0) { -+ k = j - (i - 8); -+ d0 += (double) (enumdirection.getAdjacentX() * k); -+ d1 += (double) (enumdirection.getAdjacentY() * k); -+ d2 += (double) (enumdirection.getAdjacentZ() * k); -+ } -+ } -+ } else if (j >= 0) { -+ k = j - i; -+ d0 += (double) (enumdirection.getAdjacentX() * k); -+ d1 += (double) (enumdirection.getAdjacentY() * k); -+ d2 += (double) (enumdirection.getAdjacentZ() * k); -+ } -+ } -+ -+ Vec3D vec3d = new Vec3D(d0, d1, d2); -+ -+ if (((Integer) iblockaccess.getType(blockposition).get(BlockFluids.LEVEL)).intValue() >= 8) { -+ Iterator iterator1 = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); -+ -+ while (iterator1.hasNext()) { -+ EnumDirection enumdirection1 = (EnumDirection) iterator1.next(); -+ -+ blockposition_pooledblockposition.h(blockposition).c(enumdirection1); -+ if (this.a(iblockaccess, (BlockPosition) blockposition_pooledblockposition, enumdirection1) || this.a(iblockaccess, blockposition_pooledblockposition.up(), enumdirection1)) { -+ vec3d = vec3d.a().add(0.0D, -6.0D, 0.0D); -+ break; -+ } -+ } -+ } -+ -+ blockposition_pooledblockposition.t(); -+ return vec3d.a(); -+ } -+ -+ public Vec3D a(World world, BlockPosition blockposition, Entity entity, Vec3D vec3d) { -+ return vec3d.e(this.f(world, blockposition)); -+ } -+ -+ public int a(World world) { -+ return this.material == Material.WATER ? 5 : (this.material == Material.LAVA ? (world.worldProvider.m() ? 10 : 30) : 0); -+ } -+ -+ public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { -+ this.e(world, blockposition, iblockdata); -+ } -+ -+ public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) { -+ this.e(world, blockposition, iblockdata); -+ } -+ -+ public boolean e(World world, BlockPosition blockposition, IBlockData iblockdata) { -+ if (this.material == Material.LAVA) { -+ boolean flag = false; -+ EnumDirection[] aenumdirection = EnumDirection.values(); -+ int i = aenumdirection.length; -+ -+ for (int j = 0; j < i; ++j) { -+ EnumDirection enumdirection = aenumdirection[j]; -+ -+ if (enumdirection != EnumDirection.DOWN && world.getType(blockposition.shift(enumdirection)).getMaterial() == Material.WATER) { -+ flag = true; -+ break; -+ } -+ } -+ -+ if (flag) { -+ Integer integer = (Integer) iblockdata.get(BlockFluids.LEVEL); -+ -+ if (integer.intValue() == 0) { -+ world.setTypeUpdate(blockposition, Blocks.OBSIDIAN.getBlockData()); -+ this.fizz(world, blockposition); -+ return true; -+ } -+ -+ if (integer.intValue() <= 4) { -+ world.setTypeUpdate(blockposition, Blocks.COBBLESTONE.getBlockData()); -+ this.fizz(world, blockposition); -+ return true; -+ } -+ } -+ } -+ -+ return false; -+ } -+ -+ protected void fizz(World world, BlockPosition blockposition) { -+ double d0 = (double) blockposition.getX(); -+ double d1 = (double) blockposition.getY(); -+ double d2 = (double) blockposition.getZ(); -+ -+ world.a((EntityHuman) null, blockposition, SoundEffects.db, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F); -+ -+ for (int i = 0; i < 8; ++i) { -+ world.addParticle(EnumParticle.SMOKE_LARGE, d0 + Math.random(), d1 + 1.2D, d2 + Math.random(), 0.0D, 0.0D, 0.0D, new int[0]); -+ } -+ -+ } -+ -+ public IBlockData fromLegacyData(int i) { -+ return this.getBlockData().set(BlockFluids.LEVEL, Integer.valueOf(i)); -+ } -+ -+ public int toLegacyData(IBlockData iblockdata) { -+ return ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue(); -+ } -+ -+ protected BlockStateList getStateList() { -+ return new BlockStateList(this, new IBlockState[] { BlockFluids.LEVEL}); -+ } -+ -+ public static BlockFlowing a(Material material) { -+ if (material == Material.WATER) { -+ return Blocks.FLOWING_WATER; -+ } else if (material == Material.LAVA) { -+ return Blocks.FLOWING_LAVA; -+ } else { -+ throw new IllegalArgumentException("Invalid material"); -+ } -+ } -+ -+ public static BlockStationary b(Material material) { -+ if (material == Material.WATER) { -+ return Blocks.WATER; -+ } else if (material == Material.LAVA) { -+ return Blocks.LAVA; -+ } else { -+ throw new IllegalArgumentException("Invalid material"); -+ } -+ } -+} -diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -new file mode 100644 -index 0000000..e7a95f3 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -0,0 +1,381 @@ -+package net.minecraft.server; -+ -+import com.google.common.collect.AbstractIterator; -+import com.google.common.collect.Lists; -+import java.util.Iterator; -+import java.util.List; -+import org.apache.logging.log4j.LogManager; -+import org.apache.logging.log4j.Logger; -+ -+public class BlockPosition extends BaseBlockPosition { -+ -+ private static final Logger c = LogManager.getLogger(); -+ public static final BlockPosition ZERO = new BlockPosition(0, 0, 0); -+ private static final int d = 1 + MathHelper.e(MathHelper.c(30000000)); -+ private static final int e = BlockPosition.d; -+ private static final int f = 64 - BlockPosition.d - BlockPosition.e; -+ private static final int g = 0 + BlockPosition.e; -+ private static final int h = BlockPosition.g + BlockPosition.f; -+ private static final long i = (1L << BlockPosition.d) - 1L; -+ private static final long j = (1L << BlockPosition.f) - 1L; -+ private static final long k = (1L << BlockPosition.e) - 1L; -+ -+ public BlockPosition(int i, int j, int k) { -+ super(i, j, k); -+ } -+ -+ public BlockPosition(double d0, double d1, double d2) { -+ super(d0, d1, d2); -+ } -+ -+ public BlockPosition(Entity entity) { -+ this(entity.locX, entity.locY, entity.locZ); -+ } -+ -+ public BlockPosition(Vec3D vec3d) { -+ this(vec3d.x, vec3d.y, vec3d.z); -+ } -+ -+ public BlockPosition(BaseBlockPosition baseblockposition) { -+ this(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ()); -+ } -+ -+ public BlockPosition a(double d0, double d1, double d2) { -+ return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2); -+ } -+ -+ public BlockPosition a(int i, int j, int k) { -+ return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k); -+ } -+ -+ public BlockPosition a(BaseBlockPosition baseblockposition) { -+ return baseblockposition.getX() == 0 && baseblockposition.getY() == 0 && baseblockposition.getZ() == 0 ? this : new BlockPosition(this.getX() + baseblockposition.getX(), this.getY() + baseblockposition.getY(), this.getZ() + baseblockposition.getZ()); -+ } -+ -+ public BlockPosition b(BaseBlockPosition baseblockposition) { -+ return baseblockposition.getX() == 0 && baseblockposition.getY() == 0 && baseblockposition.getZ() == 0 ? this : new BlockPosition(this.getX() - baseblockposition.getX(), this.getY() - baseblockposition.getY(), this.getZ() - baseblockposition.getZ()); -+ } -+ -+ public BlockPosition up() { -+ return this.up(1); -+ } -+ -+ public BlockPosition up(int i) { -+ return this.shift(EnumDirection.UP, i); -+ } -+ -+ public BlockPosition down() { -+ return this.down(1); -+ } -+ -+ public BlockPosition down(int i) { -+ return this.shift(EnumDirection.DOWN, i); -+ } -+ -+ public BlockPosition north() { -+ return this.north(1); -+ } -+ -+ public BlockPosition north(int i) { -+ return this.shift(EnumDirection.NORTH, i); -+ } -+ -+ public BlockPosition south() { -+ return this.south(1); -+ } -+ -+ public BlockPosition south(int i) { -+ return this.shift(EnumDirection.SOUTH, i); -+ } -+ -+ public BlockPosition west() { -+ return this.west(1); -+ } -+ -+ public BlockPosition west(int i) { -+ return this.shift(EnumDirection.WEST, i); -+ } -+ -+ public BlockPosition east() { -+ return this.east(1); -+ } -+ -+ public BlockPosition east(int i) { -+ return this.shift(EnumDirection.EAST, i); -+ } -+ -+ public BlockPosition shift(EnumDirection enumdirection) { -+ return this.shift(enumdirection, 1); -+ } -+ -+ public BlockPosition shift(EnumDirection enumdirection, int i) { -+ return i == 0 ? this : new BlockPosition(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i); -+ } -+ -+ public BlockPosition c(BaseBlockPosition baseblockposition) { -+ return new BlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX()); -+ } -+ -+ public long asLong() { -+ return ((long) this.getX() & BlockPosition.i) << BlockPosition.h | ((long) this.getY() & BlockPosition.j) << BlockPosition.g | ((long) this.getZ() & BlockPosition.k) << 0; -+ } -+ -+ public static BlockPosition fromLong(long i) { -+ int j = (int) (i << 64 - BlockPosition.h - BlockPosition.d >> 64 - BlockPosition.d); -+ int k = (int) (i << 64 - BlockPosition.g - BlockPosition.f >> 64 - BlockPosition.f); -+ int l = (int) (i << 64 - BlockPosition.e >> 64 - BlockPosition.e); -+ -+ return new BlockPosition(j, k, l); -+ } -+ -+ public static Iterable a(BlockPosition blockposition, BlockPosition blockposition1) { -+ final BlockPosition blockposition2 = new BlockPosition(Math.min(blockposition.getX(), blockposition1.getX()), Math.min(blockposition.getY(), blockposition1.getY()), Math.min(blockposition.getZ(), blockposition1.getZ())); -+ final BlockPosition blockposition3 = new BlockPosition(Math.max(blockposition.getX(), blockposition1.getX()), Math.max(blockposition.getY(), blockposition1.getY()), Math.max(blockposition.getZ(), blockposition1.getZ())); -+ -+ return new Iterable() { -+ public Iterator iterator() { -+ return new AbstractIterator() { -+ private BlockPosition b = null; -+ -+ protected BlockPosition a() { -+ if (this.b == null) { -+ this.b = blockposition; -+ return this.b; -+ } else if (this.b.equals(blockposition1)) { -+ return (BlockPosition) this.endOfData(); -+ } else { -+ int i = this.b.getX(); -+ int j = this.b.getY(); -+ int k = this.b.getZ(); -+ -+ if (i < blockposition1.getX()) { -+ ++i; -+ } else if (j < blockposition1.getY()) { -+ i = blockposition.getX(); -+ ++j; -+ } else if (k < blockposition1.getZ()) { -+ i = blockposition.getX(); -+ j = blockposition.getY(); -+ ++k; -+ } -+ -+ this.b = new BlockPosition(i, j, k); -+ return this.b; -+ } -+ } -+ -+ protected Object computeNext() { -+ return this.a(); -+ } -+ }; -+ } -+ }; -+ } -+ -+ public BlockPosition h() { -+ return this; -+ } -+ -+ public static Iterable b(BlockPosition blockposition, BlockPosition blockposition1) { -+ final BlockPosition blockposition2 = new BlockPosition(Math.min(blockposition.getX(), blockposition1.getX()), Math.min(blockposition.getY(), blockposition1.getY()), Math.min(blockposition.getZ(), blockposition1.getZ())); -+ final BlockPosition blockposition3 = new BlockPosition(Math.max(blockposition.getX(), blockposition1.getX()), Math.max(blockposition.getY(), blockposition1.getY()), Math.max(blockposition.getZ(), blockposition1.getZ())); -+ -+ return new Iterable() { -+ public Iterator iterator() { -+ return new AbstractIterator() { -+ private BlockPosition.MutableBlockPosition b = null; -+ -+ protected BlockPosition.MutableBlockPosition a() { -+ if (this.b == null) { -+ this.b = new BlockPosition.MutableBlockPosition(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -+ return this.b; -+ } else if (this.b.equals(blockposition1)) { -+ return (BlockPosition.MutableBlockPosition) this.endOfData(); -+ } else { -+ int i = this.b.getX(); -+ int j = this.b.getY(); -+ int k = this.b.getZ(); -+ -+ if (i < blockposition1.getX()) { -+ ++i; -+ } else if (j < blockposition1.getY()) { -+ i = blockposition.getX(); -+ ++j; -+ } else if (k < blockposition1.getZ()) { -+ i = blockposition.getX(); -+ j = blockposition.getY(); -+ ++k; -+ } -+ -+ this.b.c = i; -+ this.b.d = j; -+ this.b.e = k; -+ return this.b; -+ } -+ } -+ -+ protected Object computeNext() { -+ return this.a(); -+ } -+ }; -+ } -+ }; -+ } -+ -+ public BaseBlockPosition d(BaseBlockPosition baseblockposition) { -+ return this.c(baseblockposition); -+ } -+ -+ public static final class PooledBlockPosition extends BlockPosition { -+ -+ private int c; -+ private int d; -+ private int e; -+ 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; -+ } -+ -+ public static BlockPosition.PooledBlockPosition s() { -+ return c(0, 0, 0); -+ } -+ -+ public static BlockPosition.PooledBlockPosition c(double d0, double d1, double d2) { -+ return c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); -+ } -+ -+ public static BlockPosition.PooledBlockPosition c(int i, int j, int k) { -+ List list = BlockPosition.PooledBlockPosition.g; -+ -+ synchronized (BlockPosition.PooledBlockPosition.g) { -+ if (!BlockPosition.PooledBlockPosition.g.isEmpty()) { -+ BlockPosition.PooledBlockPosition blockposition_pooledblockposition = (BlockPosition.PooledBlockPosition) BlockPosition.PooledBlockPosition.g.remove(BlockPosition.PooledBlockPosition.g.size() - 1); -+ -+ if (blockposition_pooledblockposition != null && blockposition_pooledblockposition.f) { -+ blockposition_pooledblockposition.f = false; -+ blockposition_pooledblockposition.d(i, j, k); -+ return blockposition_pooledblockposition; -+ } -+ } -+ } -+ -+ return new BlockPosition.PooledBlockPosition(i, j, k); -+ } -+ -+ public void t() { -+ List list = BlockPosition.PooledBlockPosition.g; -+ -+ synchronized (BlockPosition.PooledBlockPosition.g) { -+ if (BlockPosition.PooledBlockPosition.g.size() < 100) { -+ BlockPosition.PooledBlockPosition.g.add(this); -+ } -+ -+ this.f = true; -+ } -+ } -+ -+ public int getX() { -+ return this.c; -+ } -+ -+ public int getY() { -+ return this.d; -+ } -+ -+ public int getZ() { -+ return this.e; -+ } -+ -+ public BlockPosition.PooledBlockPosition d(int i, int j, int k) { -+ if (this.f) { -+ BlockPosition.c.error("PooledMutableBlockPosition modified after it was released.", new Throwable()); -+ this.f = false; -+ } -+ -+ this.c = i; -+ this.d = j; -+ this.e = k; -+ return this; -+ } -+ -+ public BlockPosition.PooledBlockPosition d(double d0, double d1, double d2) { -+ return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2)); -+ } -+ -+ public BlockPosition.PooledBlockPosition h(BaseBlockPosition baseblockposition) { -+ return this.d(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ()); -+ } -+ -+ public BlockPosition.PooledBlockPosition c(EnumDirection enumdirection) { -+ return this.d(this.c + enumdirection.getAdjacentX(), this.d + enumdirection.getAdjacentY(), this.e + enumdirection.getAdjacentZ()); -+ } -+ -+ public BaseBlockPosition d(BaseBlockPosition baseblockposition) { -+ return super.c(baseblockposition); -+ } -+ } -+ -+ public static final class MutableBlockPosition extends BlockPosition { -+ -+ private int c; -+ private int d; -+ private int e; -+ -+ public MutableBlockPosition() { -+ this(0, 0, 0); -+ } -+ -+ public MutableBlockPosition(BlockPosition blockposition) { -+ this(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -+ } -+ -+ public MutableBlockPosition(int i, int j, int k) { -+ super(0, 0, 0); -+ this.c = i; -+ this.d = j; -+ this.e = k; -+ } -+ -+ public int getX() { -+ return this.c; -+ } -+ -+ public int getY() { -+ return this.d; -+ } -+ -+ public int getZ() { -+ return this.e; -+ } -+ -+ public BlockPosition.MutableBlockPosition c(int i, int j, int k) { -+ this.c = i; -+ this.d = j; -+ this.e = k; -+ return this; -+ } -+ -+ public void c(EnumDirection enumdirection) { -+ this.c += enumdirection.getAdjacentX(); -+ this.d += enumdirection.getAdjacentY(); -+ this.e += enumdirection.getAdjacentZ(); -+ } -+ -+ public void p(int i) { -+ this.d = i; -+ } -+ -+ public BlockPosition h() { -+ return new BlockPosition(this); -+ } -+ -+ public BaseBlockPosition d(BaseBlockPosition baseblockposition) { -+ return super.c(baseblockposition); -+ } -+ } -+} -diff --git a/src/main/java/net/minecraft/server/BlockStateList.java b/src/main/java/net/minecraft/server/BlockStateList.java -new file mode 100644 -index 0000000..a11c62f ---- /dev/null -+++ b/src/main/java/net/minecraft/server/BlockStateList.java -@@ -0,0 +1,325 @@ -+package net.minecraft.server; -+ -+import com.google.common.base.Function; -+import com.google.common.base.Objects; -+import com.google.common.collect.HashBasedTable; -+import com.google.common.collect.ImmutableCollection; -+import com.google.common.collect.ImmutableList; -+import com.google.common.collect.ImmutableMap; -+import com.google.common.collect.ImmutableSortedMap; -+import com.google.common.collect.ImmutableTable; -+import com.google.common.collect.Iterables; -+import com.google.common.collect.Lists; -+import com.google.common.collect.Maps; -+import java.util.ArrayList; -+import java.util.Collection; -+import java.util.Collections; -+import java.util.HashMap; -+import java.util.Iterator; -+import java.util.LinkedHashMap; -+import java.util.List; -+import java.util.Map; -+import java.util.Map.Entry; -+import java.util.regex.Pattern; -+ -+public class BlockStateList { -+ -+ private static final Pattern a = Pattern.compile("^[a-z0-9_]+$"); -+ private static final Function, String> b = new Function() { -+ public String a(IBlockState iblockstate) { -+ return iblockstate == null ? "" : iblockstate.a(); -+ } -+ -+ public Object apply(Object object) { -+ return this.a((IBlockState) object); -+ } -+ }; -+ private final Block c; -+ private final ImmutableSortedMap> d; -+ private final ImmutableList e; -+ -+ public BlockStateList(Block block, IBlockState... aiblockstate) { -+ this.c = block; -+ HashMap hashmap = Maps.newHashMap(); -+ IBlockState[] aiblockstate1 = aiblockstate; -+ int i = aiblockstate.length; -+ -+ for (int j = 0; j < i; ++j) { -+ IBlockState iblockstate = aiblockstate1[j]; -+ -+ a(block, iblockstate); -+ hashmap.put(iblockstate.a(), iblockstate); -+ } -+ -+ this.d = ImmutableSortedMap.copyOf(hashmap); -+ LinkedHashMap linkedhashmap = Maps.newLinkedHashMap(); -+ ArrayList arraylist = Lists.newArrayList(); -+ Iterable iterable = IteratorUtils.a(this.e()); -+ Iterator iterator = iterable.iterator(); -+ -+ while (iterator.hasNext()) { -+ List list = (List) iterator.next(); -+ Map map = MapGeneratorUtils.b(this.d.values(), list); -+ BlockStateList.BlockData blockstatelist_blockdata = new BlockStateList.BlockData(block, ImmutableMap.copyOf(map), null); -+ -+ linkedhashmap.put(map, blockstatelist_blockdata); -+ arraylist.add(blockstatelist_blockdata); -+ } -+ -+ iterator = arraylist.iterator(); -+ -+ while (iterator.hasNext()) { -+ BlockStateList.BlockData blockstatelist_blockdata1 = (BlockStateList.BlockData) iterator.next(); -+ -+ blockstatelist_blockdata1.a((Map) linkedhashmap); -+ } -+ -+ this.e = ImmutableList.copyOf(arraylist); -+ } -+ -+ public static > String a(Block block, IBlockState iblockstate) { -+ String s = iblockstate.a(); -+ -+ if (!BlockStateList.a.matcher(s).matches()) { -+ throw new IllegalArgumentException("Block: " + block.getClass() + " has invalidly named property: " + s); -+ } else { -+ for (T t : iblockstate.c()) { -+ String s1 = iblockstate.a(t); -+ -+ if (!a.matcher(s1).matches()) -+ { -+ throw new IllegalArgumentException("Block: " + block.getClass() + " has property: " + s + " with invalidly named value: " + s1); -+ } -+ } -+ } -+ return s; -+ } -+ -+ public ImmutableList a() { -+ return this.e; -+ } -+ -+ private List>> e() { -+ ArrayList arraylist = Lists.newArrayList(); -+ ImmutableCollection immutablecollection = this.d.values(); -+ Iterator iterator = immutablecollection.iterator(); -+ -+ while (iterator.hasNext()) { -+ IBlockState iblockstate = (IBlockState) iterator.next(); -+ -+ arraylist.add(iblockstate.c()); -+ } -+ -+ return arraylist; -+ } -+ -+ public IBlockData getBlockData() { -+ return (IBlockData) this.e.get(0); -+ } -+ -+ public Block getBlock() { -+ return this.c; -+ } -+ -+ public Collection> d() { -+ return this.d.values(); -+ } -+ -+ public String toString() { -+ return Objects.toStringHelper(this).add("block", Block.REGISTRY.b(this.c)).add("properties", Iterables.transform(this.d.values(), BlockStateList.b)).toString(); -+ } -+ -+ static class BlockData extends BlockDataAbstract { -+ -+ private final Block a; -+ private final ImmutableMap, Comparable> b; -+ private ImmutableTable, Comparable, IBlockData> c; -+ -+ private BlockData(Block block, ImmutableMap, Comparable> immutablemap) { -+ this.a = block; -+ this.b = immutablemap; -+ } -+ -+ public Collection> r() { -+ return Collections.unmodifiableCollection(this.b.keySet()); -+ } -+ -+ 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)); -+ } -+ } -+ -+ 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)); -+ } -+ } -+ -+ public ImmutableMap, Comparable> s() { -+ return this.b; -+ } -+ -+ public Block getBlock() { -+ return this.a; -+ } -+ -+ public boolean equals(Object object) { -+ return this == object; -+ } -+ -+ public int hashCode() { -+ return this.b.hashCode(); -+ } -+ -+ public void a(Map, Comparable>, BlockStateList.BlockData> map) { -+ if (this.c != null) { -+ throw new IllegalStateException(); -+ } else { -+ HashBasedTable hashbasedtable = HashBasedTable.create(); -+ Iterator iterator = this.b.entrySet().iterator(); -+ -+ while (iterator.hasNext()) { -+ Entry entry = (Entry) iterator.next(); -+ IBlockState iblockstate = (IBlockState) entry.getKey(); -+ Iterator iterator1 = iblockstate.c().iterator(); -+ -+ while (iterator1.hasNext()) { -+ Comparable comparable = (Comparable) iterator1.next(); -+ -+ if (comparable != entry.getValue()) { -+ hashbasedtable.put(iblockstate, comparable, map.get(this.b(iblockstate, comparable))); -+ } -+ } -+ } -+ -+ this.c = ImmutableTable.copyOf(hashbasedtable); -+ } -+ } -+ -+ private Map, Comparable> b(IBlockState iblockstate, Comparable comparable) { -+ HashMap hashmap = Maps.newHashMap(this.b); -+ -+ hashmap.put(iblockstate, comparable); -+ return hashmap; -+ } -+ -+ public Material getMaterial() { -+ return this.a.q(this); -+ } -+ -+ public boolean b() { -+ return this.a.l(this); -+ } -+ -+ public int c() { -+ return this.a.m(this); -+ } -+ -+ public int d() { -+ return this.a.o(this); -+ } -+ -+ public boolean f() { -+ return this.a.p(this); -+ } -+ -+ public MaterialMapColor g() { -+ return this.a.r(this); -+ } -+ -+ public IBlockData a(EnumBlockRotation enumblockrotation) { -+ return this.a.a((IBlockData) this, enumblockrotation); -+ } -+ -+ public IBlockData a(EnumBlockMirror enumblockmirror) { -+ return this.a.a((IBlockData) this, enumblockmirror); -+ } -+ -+ public boolean h() { -+ return this.a.c((IBlockData) this); -+ } -+ -+ public EnumRenderType i() { -+ return this.a.a((IBlockData) this); -+ } -+ -+ public boolean k() { -+ return this.a.s(this); -+ } -+ -+ public boolean l() { -+ return this.a.isOccluding(this); -+ } -+ -+ public boolean m() { -+ return this.a.isPowerSource(this); -+ } -+ -+ public int a(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) { -+ return this.a.b((IBlockData) this, iblockaccess, blockposition, enumdirection); -+ } -+ -+ public boolean n() { -+ return this.a.isComplexRedstone(this); -+ } -+ -+ public int a(World world, BlockPosition blockposition) { -+ return this.a.d(this, world, blockposition); -+ } -+ -+ public float b(World world, BlockPosition blockposition) { -+ return this.a.b(this, world, blockposition); -+ } -+ -+ public float a(EntityHuman entityhuman, World world, BlockPosition blockposition) { -+ return this.a.getDamage(this, entityhuman, world, blockposition); -+ } -+ -+ public int b(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) { -+ return this.a.c(this, iblockaccess, blockposition, enumdirection); -+ } -+ -+ public EnumPistonReaction o() { -+ return this.a.h(this); -+ } -+ -+ public IBlockData b(IBlockAccess iblockaccess, BlockPosition blockposition) { -+ return this.a.updateState(this, iblockaccess, blockposition); -+ } -+ -+ public boolean p() { -+ return this.a.b((IBlockData) this); -+ } -+ -+ public AxisAlignedBB d(World world, BlockPosition blockposition) { -+ return this.a.a((IBlockData) this, world, blockposition); -+ } -+ -+ public void a(World world, BlockPosition blockposition, AxisAlignedBB axisalignedbb, List list, Entity entity) { -+ this.a.a((IBlockData) this, world, blockposition, axisalignedbb, list, entity); -+ } -+ -+ public AxisAlignedBB c(IBlockAccess iblockaccess, BlockPosition blockposition) { -+ return this.a.a((IBlockData) this, iblockaccess, blockposition); -+ } -+ -+ public MovingObjectPosition a(World world, BlockPosition blockposition, Vec3D vec3d, Vec3D vec3d1) { -+ return this.a.a(this, world, blockposition, vec3d, vec3d1); -+ } -+ -+ public boolean q() { -+ return this.a.k(this); -+ } -+ -+ BlockData(Block block, ImmutableMap immutablemap, Object object) { -+ this(block, immutablemap); -+ } -+ } -+} -diff --git a/src/main/java/net/minecraft/server/ChunkProviderFlat.java b/src/main/java/net/minecraft/server/ChunkProviderFlat.java -new file mode 100644 -index 0000000..17e0b8e ---- /dev/null -+++ b/src/main/java/net/minecraft/server/ChunkProviderFlat.java -@@ -0,0 +1,214 @@ -+package net.minecraft.server; -+ -+import com.google.common.collect.Lists; -+import java.util.Iterator; -+import java.util.List; -+import java.util.Map; -+import java.util.Random; -+ -+public class ChunkProviderFlat implements ChunkGenerator { -+ -+ private final World a; -+ private final Random b; -+ private final IBlockData[] c = new IBlockData[256]; -+ private final WorldGenFlatInfo d; -+ private final List e = Lists.newArrayList(); -+ private final boolean f; -+ private final boolean g; -+ private WorldGenLakes h; -+ private WorldGenLakes i; -+ -+ public ChunkProviderFlat(World world, long i, boolean flag, String s) { -+ this.a = world; -+ this.b = new Random(i); -+ this.d = WorldGenFlatInfo.a(s); -+ if (flag) { -+ Map map = this.d.b(); -+ -+ if (map.containsKey("village")) { -+ Map map1 = (Map) map.get("village"); -+ -+ if (!map1.containsKey("size")) { -+ map1.put("size", "1"); -+ } -+ -+ this.e.add(new WorldGenVillage(map1)); -+ } -+ -+ if (map.containsKey("biome_1")) { -+ this.e.add(new WorldGenLargeFeature((Map) map.get("biome_1"))); -+ } -+ -+ if (map.containsKey("mineshaft")) { -+ this.e.add(new WorldGenMineshaft((Map) map.get("mineshaft"))); -+ } -+ -+ if (map.containsKey("stronghold")) { -+ this.e.add(new WorldGenStronghold((Map) map.get("stronghold"))); -+ } -+ -+ if (map.containsKey("oceanmonument")) { -+ this.e.add(new WorldGenMonument((Map) map.get("oceanmonument"))); -+ } -+ } -+ -+ if (this.d.b().containsKey("lake")) { -+ this.h = new WorldGenLakes(Blocks.WATER); -+ } -+ -+ if (this.d.b().containsKey("lava_lake")) { -+ this.i = new WorldGenLakes(Blocks.LAVA); -+ } -+ -+ this.g = this.d.b().containsKey("dungeon"); -+ int j = 0; -+ int k = 0; -+ boolean flag1 = true; -+ Iterator iterator = this.d.c().iterator(); -+ -+ while (iterator.hasNext()) { -+ WorldGenFlatLayerInfo worldgenflatlayerinfo = (WorldGenFlatLayerInfo) iterator.next(); -+ -+ for (int l = worldgenflatlayerinfo.d(); l < worldgenflatlayerinfo.d() + worldgenflatlayerinfo.b(); ++l) { -+ IBlockData iblockdata = worldgenflatlayerinfo.c(); -+ -+ if (iblockdata.getBlock() != Blocks.AIR) { -+ flag1 = false; -+ this.c[l] = iblockdata; -+ } -+ } -+ -+ if (worldgenflatlayerinfo.c().getBlock() == Blocks.AIR) { -+ k += worldgenflatlayerinfo.b(); -+ } else { -+ j += worldgenflatlayerinfo.b() + k; -+ k = 0; -+ } -+ } -+ -+ world.b(j); -+ this.f = flag1 && this.d.a() != BiomeBase.a(Biomes.P) ? false : this.d.b().containsKey("decoration"); -+ } -+ -+ public Chunk getOrCreateChunk(int i, int j) { -+ ChunkSnapshot chunksnapshot = new ChunkSnapshot(); -+ -+ int k; -+ -+ for (int l = 0; l < this.c.length; ++l) { -+ IBlockData iblockdata = this.c[l]; -+ -+ if (iblockdata != null) { -+ for (int i1 = 0; i1 < 16; ++i1) { -+ for (k = 0; k < 16; ++k) { -+ chunksnapshot.a(i1, l, k, iblockdata); -+ } -+ } -+ } -+ } -+ -+ Iterator iterator = this.e.iterator(); -+ -+ while (iterator.hasNext()) { -+ WorldGenBase worldgenbase = (WorldGenBase) iterator.next(); -+ -+ worldgenbase.a(this.a, i, j, chunksnapshot); -+ } -+ -+ Chunk chunk = new Chunk(this.a, chunksnapshot, i, j); -+ BiomeBase[] abiomebase = this.a.getWorldChunkManager().getBiomeBlock((BiomeBase[]) null, i * 16, j * 16, 16, 16); -+ byte[] abyte = chunk.getBiomeIndex(); -+ -+ for (k = 0; k < abyte.length; ++k) { -+ abyte[k] = (byte) BiomeBase.a(abiomebase[k]); -+ } -+ -+ chunk.initLighting(); -+ return chunk; -+ } -+ -+ public void recreateStructures(int i, int j) { -+ int k = i * 16; -+ int l = j * 16; -+ BlockPosition blockposition = new BlockPosition(k, 0, l); -+ BiomeBase biomebase = this.a.getBiome(new BlockPosition(k + 16, 0, l + 16)); -+ boolean flag = false; -+ -+ this.b.setSeed(this.a.getSeed()); -+ long i1 = this.b.nextLong() / 2L * 2L + 1L; -+ long j1 = this.b.nextLong() / 2L * 2L + 1L; -+ -+ this.b.setSeed((long) i * i1 + (long) j * j1 ^ this.a.getSeed()); -+ ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); -+ Iterator iterator = this.e.iterator(); -+ -+ while (iterator.hasNext()) { -+ StructureGenerator structuregenerator = (StructureGenerator) iterator.next(); -+ boolean flag1 = structuregenerator.a(this.a, this.b, chunkcoordintpair); -+ -+ if (structuregenerator instanceof WorldGenVillage) { -+ flag |= flag1; -+ } -+ } -+ -+ if (this.h != null && !flag && this.b.nextInt(4) == 0) { -+ this.h.generate(this.a, this.b, blockposition.a(this.b.nextInt(16) + 8, this.b.nextInt(256), this.b.nextInt(16) + 8)); -+ } -+ -+ if (this.i != null && !flag && this.b.nextInt(8) == 0) { -+ BlockPosition blockposition1 = blockposition.a(this.b.nextInt(16) + 8, this.b.nextInt(this.b.nextInt(248) + 8), this.b.nextInt(16) + 8); -+ -+ if (blockposition1.getY() < this.a.K() || this.b.nextInt(10) == 0) { -+ this.i.generate(this.a, this.b, blockposition1); -+ } -+ } -+ -+ if (this.g) { -+ for (int k1 = 0; k1 < 8; ++k1) { -+ (new WorldGenDungeons()).generate(this.a, this.b, blockposition.a(this.b.nextInt(16) + 8, this.b.nextInt(256), this.b.nextInt(16) + 8)); -+ } -+ } -+ -+ if (this.f) { -+ biomebase.a(this.a, this.b, blockposition); -+ } -+ -+ } -+ -+ public boolean a(Chunk chunk, int i, int j) { -+ return false; -+ } -+ -+ public List getMobsFor(EnumCreatureType enumcreaturetype, BlockPosition blockposition) { -+ BiomeBase biomebase = this.a.getBiome(blockposition); -+ -+ return biomebase.getMobs(enumcreaturetype); -+ } -+ -+ public BlockPosition findNearestMapFeature(World world, String s, BlockPosition blockposition) { -+ if ("Stronghold".equals(s)) { -+ Iterator iterator = this.e.iterator(); -+ -+ while (iterator.hasNext()) { -+ StructureGenerator structuregenerator = (StructureGenerator) iterator.next(); -+ -+ if (structuregenerator instanceof WorldGenStronghold) { -+ return structuregenerator.getNearestGeneratedFeature(world, blockposition); -+ } -+ } -+ } -+ -+ return null; -+ } -+ -+ public void recreateStructures(Chunk chunk, int i, int j) { -+ Iterator iterator = this.e.iterator(); -+ -+ while (iterator.hasNext()) { -+ StructureGenerator structuregenerator = (StructureGenerator) iterator.next(); -+ -+ structuregenerator.a(this.a, i, j, (ChunkSnapshot) null); -+ } -+ -+ } -+} -diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java -new file mode 100644 -index 0000000..88d0374 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java -@@ -0,0 +1,449 @@ -+package net.minecraft.server; -+ -+import java.util.List; -+import java.util.Random; -+ -+public class ChunkProviderGenerate implements ChunkGenerator { -+ -+ protected static final IBlockData a = Blocks.STONE.getBlockData(); -+ private final Random i; -+ private final NoiseGeneratorOctaves j; -+ private final NoiseGeneratorOctaves k; -+ private final NoiseGeneratorOctaves l; -+ private final NoiseGenerator3 m; -+ public NoiseGeneratorOctaves b; -+ public NoiseGeneratorOctaves c; -+ public NoiseGeneratorOctaves d; -+ private final World n; -+ private final boolean o; -+ private final WorldType p; -+ private final double[] q; -+ private final float[] r; -+ private CustomWorldSettingsFinal s; -+ private IBlockData t; -+ private double[] u; -+ private final WorldGenBase v; -+ private final WorldGenStronghold w; -+ private final WorldGenVillage x; -+ private final WorldGenMineshaft y; -+ private final WorldGenLargeFeature z; -+ private final WorldGenBase A; -+ private final WorldGenMonument B; -+ private BiomeBase[] C; -+ double[] e; -+ double[] f; -+ double[] g; -+ double[] h; -+ -+ public ChunkProviderGenerate(World world, long i, boolean flag, String s) { -+ this.t = Blocks.WATER.getBlockData(); -+ this.u = new double[256]; -+ this.v = new WorldGenCaves(); -+ this.w = new WorldGenStronghold(); -+ this.x = new WorldGenVillage(); -+ this.y = new WorldGenMineshaft(); -+ this.z = new WorldGenLargeFeature(); -+ this.A = new WorldGenCanyon(); -+ this.B = new WorldGenMonument(); -+ this.n = world; -+ this.o = flag; -+ this.p = world.getWorldData().getType(); -+ this.i = new Random(i); -+ this.j = new NoiseGeneratorOctaves(this.i, 16); -+ this.k = new NoiseGeneratorOctaves(this.i, 16); -+ this.l = new NoiseGeneratorOctaves(this.i, 8); -+ this.m = new NoiseGenerator3(this.i, 4); -+ this.b = new NoiseGeneratorOctaves(this.i, 10); -+ this.c = new NoiseGeneratorOctaves(this.i, 16); -+ this.d = new NoiseGeneratorOctaves(this.i, 8); -+ this.q = new double[825]; -+ this.r = new float[25]; -+ -+ for (int j = -2; j <= 2; ++j) { -+ for (int k = -2; k <= 2; ++k) { -+ float f = 10.0F / MathHelper.c((float) (j * j + k * k) + 0.2F); -+ -+ this.r[j + 2 + (k + 2) * 5] = f; -+ } -+ } -+ -+ if (s != null) { -+ this.s = CustomWorldSettingsFinal.CustomWorldSettings.a(s).b(); -+ this.t = this.s.E ? Blocks.LAVA.getBlockData() : Blocks.WATER.getBlockData(); -+ world.b(this.s.q); -+ } -+ -+ } -+ -+ public void a(int i, int j, ChunkSnapshot chunksnapshot) { -+ this.C = this.n.getWorldChunkManager().getBiomes(this.C, i * 4 - 2, j * 4 - 2, 10, 10); -+ this.a(i * 4, 0, j * 4); -+ -+ for (int k = 0; k < 4; ++k) { -+ int l = k * 5; -+ int i1 = (k + 1) * 5; -+ -+ for (int j1 = 0; j1 < 4; ++j1) { -+ int k1 = (l + j1) * 33; -+ int l1 = (l + j1 + 1) * 33; -+ int i2 = (i1 + j1) * 33; -+ int j2 = (i1 + j1 + 1) * 33; -+ -+ for (int k2 = 0; k2 < 32; ++k2) { -+ double d0 = 0.125D; -+ double d1 = this.q[k1 + k2]; -+ double d2 = this.q[l1 + k2]; -+ double d3 = this.q[i2 + k2]; -+ double d4 = this.q[j2 + k2]; -+ double d5 = (this.q[k1 + k2 + 1] - d1) * d0; -+ double d6 = (this.q[l1 + k2 + 1] - d2) * d0; -+ double d7 = (this.q[i2 + k2 + 1] - d3) * d0; -+ double d8 = (this.q[j2 + k2 + 1] - d4) * d0; -+ -+ for (int l2 = 0; l2 < 8; ++l2) { -+ double d9 = 0.25D; -+ double d10 = d1; -+ double d11 = d2; -+ double d12 = (d3 - d1) * d9; -+ double d13 = (d4 - d2) * d9; -+ -+ for (int i3 = 0; i3 < 4; ++i3) { -+ double d14 = 0.25D; -+ double d15 = (d11 - d10) * d14; -+ double d16 = d10 - d15; -+ -+ for (int j3 = 0; j3 < 4; ++j3) { -+ if ((d16 += d15) > 0.0D) { -+ chunksnapshot.a(k * 4 + i3, k2 * 8 + l2, j1 * 4 + j3, ChunkProviderGenerate.a); -+ } else if (k2 * 8 + l2 < this.s.q) { -+ chunksnapshot.a(k * 4 + i3, k2 * 8 + l2, j1 * 4 + j3, this.t); -+ } -+ } -+ -+ d10 += d12; -+ d11 += d13; -+ } -+ -+ d1 += d5; -+ d2 += d6; -+ d3 += d7; -+ d4 += d8; -+ } -+ } -+ } -+ } -+ -+ } -+ -+ public void a(int i, int j, ChunkSnapshot chunksnapshot, BiomeBase[] abiomebase) { -+ double d0 = 0.03125D; -+ -+ this.u = this.m.a(this.u, (double) (i * 16), (double) (j * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D); -+ -+ for (int k = 0; k < 16; ++k) { -+ for (int l = 0; l < 16; ++l) { -+ BiomeBase biomebase = abiomebase[l + k * 16]; -+ -+ biomebase.a(this.n, this.i, chunksnapshot, i * 16 + k, j * 16 + l, this.u[l + k * 16]); -+ } -+ } -+ -+ } -+ -+ public Chunk getOrCreateChunk(int i, int j) { -+ this.i.setSeed((long) i * 341873128712L + (long) j * 132897987541L); -+ ChunkSnapshot chunksnapshot = new ChunkSnapshot(); -+ -+ 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); -+ if (this.s.r) { -+ this.v.a(this.n, i, j, chunksnapshot); -+ } -+ -+ if (this.s.z) { -+ this.A.a(this.n, i, j, chunksnapshot); -+ } -+ -+ if (this.o) { -+ if (this.s.w) { -+ this.y.a(this.n, i, j, chunksnapshot); -+ } -+ -+ if (this.s.v) { -+ this.x.a(this.n, i, j, chunksnapshot); -+ } -+ -+ if (this.s.u) { -+ this.w.a(this.n, i, j, chunksnapshot); -+ } -+ -+ if (this.s.x) { -+ this.z.a(this.n, i, j, chunksnapshot); -+ } -+ -+ if (this.s.y) { -+ this.B.a(this.n, i, j, chunksnapshot); -+ } -+ } -+ -+ Chunk chunk = new Chunk(this.n, chunksnapshot, i, j); -+ byte[] abyte = chunk.getBiomeIndex(); -+ -+ for (int k = 0; k < abyte.length; ++k) { -+ abyte[k] = (byte) BiomeBase.a(this.C[k]); -+ } -+ -+ chunk.initLighting(); -+ return chunk; -+ } -+ -+ private void a(int i, int j, int k) { -+ this.h = this.c.a(this.h, i, k, 5, 5, (double) this.s.e, (double) this.s.f, (double) this.s.g); -+ float f = this.s.a; -+ float f1 = this.s.b; -+ -+ this.e = this.l.a(this.e, i, j, k, 5, 33, 5, (double) (f / this.s.h), (double) (f1 / this.s.i), (double) (f / this.s.j)); -+ this.f = this.j.a(this.f, i, j, k, 5, 33, 5, (double) f, (double) f1, (double) f); -+ this.g = this.k.a(this.g, i, j, k, 5, 33, 5, (double) f, (double) f1, (double) f); -+ boolean flag = false; -+ boolean flag1 = false; -+ int l = 0; -+ int i1 = 0; -+ -+ for (int j1 = 0; j1 < 5; ++j1) { -+ for (int k1 = 0; k1 < 5; ++k1) { -+ float f2 = 0.0F; -+ float f3 = 0.0F; -+ float f4 = 0.0F; -+ byte b0 = 2; -+ BiomeBase biomebase = this.C[j1 + 2 + (k1 + 2) * 10]; -+ -+ for (int l1 = -b0; l1 <= b0; ++l1) { -+ for (int i2 = -b0; i2 <= b0; ++i2) { -+ BiomeBase biomebase1 = this.C[j1 + l1 + 2 + (k1 + i2 + 2) * 10]; -+ float f5 = this.s.n + biomebase1.j() * this.s.m; -+ float f6 = this.s.p + biomebase1.m() * this.s.o; -+ -+ if (this.p == WorldType.AMPLIFIED && f5 > 0.0F) { -+ f5 = 1.0F + f5 * 2.0F; -+ f6 = 1.0F + f6 * 4.0F; -+ } -+ -+ float f7 = this.r[l1 + 2 + (i2 + 2) * 5] / (f5 + 2.0F); -+ -+ if (biomebase1.j() > biomebase.j()) { -+ f7 /= 2.0F; -+ } -+ -+ f2 += f6 * f7; -+ f3 += f5 * f7; -+ f4 += f7; -+ } -+ } -+ -+ f2 /= f4; -+ f3 /= f4; -+ f2 = f2 * 0.9F + 0.1F; -+ f3 = (f3 * 4.0F - 1.0F) / 8.0F; -+ double d0 = this.h[i1] / 8000.0D; -+ -+ if (d0 < 0.0D) { -+ d0 = -d0 * 0.3D; -+ } -+ -+ d0 = d0 * 3.0D - 2.0D; -+ if (d0 < 0.0D) { -+ d0 /= 2.0D; -+ if (d0 < -1.0D) { -+ d0 = -1.0D; -+ } -+ -+ d0 /= 1.4D; -+ d0 /= 2.0D; -+ } else { -+ if (d0 > 1.0D) { -+ d0 = 1.0D; -+ } -+ -+ d0 /= 8.0D; -+ } -+ -+ ++i1; -+ double d1 = (double) f3; -+ double d2 = (double) f2; -+ -+ d1 += d0 * 0.2D; -+ d1 = d1 * (double) this.s.k / 8.0D; -+ double d3 = (double) this.s.k + d1 * 4.0D; -+ -+ for (int j2 = 0; j2 < 33; ++j2) { -+ double d4 = ((double) j2 - d3) * (double) this.s.l * 128.0D / 256.0D / d2; -+ -+ if (d4 < 0.0D) { -+ d4 *= 4.0D; -+ } -+ -+ double d5 = this.f[l] / (double) this.s.d; -+ double d6 = this.g[l] / (double) this.s.c; -+ double d7 = (this.e[l] / 10.0D + 1.0D) / 2.0D; -+ double d8 = MathHelper.b(d5, d6, d7) - d4; -+ -+ if (j2 > 29) { -+ double d9 = (double) ((float) (j2 - 29) / 3.0F); -+ -+ d8 = d8 * (1.0D - d9) + -10.0D * d9; -+ } -+ -+ this.q[l] = d8; -+ ++l; -+ } -+ } -+ } -+ -+ } -+ -+ public void recreateStructures(int i, int j) { -+ BlockFalling.instaFall = true; -+ int k = i * 16; -+ int l = j * 16; -+ BlockPosition blockposition = new BlockPosition(k, 0, l); -+ BiomeBase biomebase = this.n.getBiome(blockposition.a(16, 0, 16)); -+ -+ this.i.setSeed(this.n.getSeed()); -+ long i1 = this.i.nextLong() / 2L * 2L + 1L; -+ long j1 = this.i.nextLong() / 2L * 2L + 1L; -+ -+ this.i.setSeed((long) i * i1 + (long) j * j1 ^ this.n.getSeed()); -+ boolean flag = false; -+ ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); -+ -+ if (this.o) { -+ if (this.s.w) { -+ this.y.a(this.n, this.i, chunkcoordintpair); -+ } -+ -+ if (this.s.v) { -+ flag = this.x.a(this.n, this.i, chunkcoordintpair); -+ } -+ -+ if (this.s.u) { -+ this.w.a(this.n, this.i, chunkcoordintpair); -+ } -+ -+ if (this.s.x) { -+ this.z.a(this.n, this.i, chunkcoordintpair); -+ } -+ -+ if (this.s.y) { -+ this.B.a(this.n, this.i, chunkcoordintpair); -+ } -+ } -+ -+ int k1; -+ int l1; -+ int i2; -+ -+ if (biomebase != Biomes.d && biomebase != Biomes.s && this.s.A && !flag && this.i.nextInt(this.s.B) == 0) { -+ k1 = this.i.nextInt(16) + 8; -+ l1 = this.i.nextInt(256); -+ i2 = this.i.nextInt(16) + 8; -+ (new WorldGenLakes(Blocks.WATER)).generate(this.n, this.i, blockposition.a(k1, l1, i2)); -+ } -+ -+ if (!flag && this.i.nextInt(this.s.D / 10) == 0 && this.s.C) { -+ k1 = this.i.nextInt(16) + 8; -+ l1 = this.i.nextInt(this.i.nextInt(248) + 8); -+ i2 = this.i.nextInt(16) + 8; -+ if (l1 < this.n.K() || this.i.nextInt(this.s.D / 8) == 0) { -+ (new WorldGenLakes(Blocks.LAVA)).generate(this.n, this.i, blockposition.a(k1, l1, i2)); -+ } -+ } -+ -+ if (this.s.s) { -+ for (k1 = 0; k1 < this.s.t; ++k1) { -+ l1 = this.i.nextInt(16) + 8; -+ i2 = this.i.nextInt(256); -+ int j2 = this.i.nextInt(16) + 8; -+ -+ (new WorldGenDungeons()).generate(this.n, this.i, blockposition.a(l1, i2, j2)); -+ } -+ } -+ -+ biomebase.a(this.n, this.i, new BlockPosition(k, 0, l)); -+ SpawnerCreature.a(this.n, biomebase, k + 8, l + 8, 16, 16, this.i); -+ blockposition = blockposition.a(8, 0, 8); -+ -+ for (k1 = 0; k1 < 16; ++k1) { -+ for (l1 = 0; l1 < 16; ++l1) { -+ BlockPosition blockposition1 = this.n.p(blockposition.a(k1, 0, l1)); -+ BlockPosition blockposition2 = blockposition1.down(); -+ -+ if (this.n.u(blockposition2)) { -+ this.n.setTypeAndData(blockposition2, Blocks.ICE.getBlockData(), 2); -+ } -+ -+ if (this.n.f(blockposition1, true)) { -+ this.n.setTypeAndData(blockposition1, Blocks.SNOW_LAYER.getBlockData(), 2); -+ } -+ } -+ } -+ -+ BlockFalling.instaFall = false; -+ } -+ -+ public boolean a(Chunk chunk, int i, int j) { -+ boolean flag = false; -+ -+ if (this.s.y && this.o && chunk.x() < 3600L) { -+ flag |= this.B.a(this.n, this.i, new ChunkCoordIntPair(i, j)); -+ } -+ -+ return flag; -+ } -+ -+ public List getMobsFor(EnumCreatureType enumcreaturetype, BlockPosition blockposition) { -+ BiomeBase biomebase = this.n.getBiome(blockposition); -+ -+ if (this.o) { -+ if (enumcreaturetype == EnumCreatureType.MONSTER && this.z.a(blockposition)) { -+ return this.z.b(); -+ } -+ -+ if (enumcreaturetype == EnumCreatureType.MONSTER && this.s.y && this.B.b(this.n, blockposition)) { -+ return this.B.b(); -+ } -+ } -+ -+ return biomebase.getMobs(enumcreaturetype); -+ } -+ -+ public BlockPosition findNearestMapFeature(World world, String s, BlockPosition blockposition) { -+ return "Stronghold".equals(s) && this.w != null ? this.w.getNearestGeneratedFeature(world, blockposition) : null; -+ } -+ -+ public void recreateStructures(Chunk chunk, int i, int j) { -+ if (this.o) { -+ if (this.s.w) { -+ this.y.a(this.n, i, j, (ChunkSnapshot) null); -+ } -+ -+ if (this.s.v) { -+ this.x.a(this.n, i, j, (ChunkSnapshot) null); -+ } -+ -+ if (this.s.u) { -+ this.w.a(this.n, i, j, (ChunkSnapshot) null); -+ } -+ -+ if (this.s.x) { -+ this.z.a(this.n, i, j, (ChunkSnapshot) null); -+ } -+ -+ if (this.s.y) { -+ this.B.a(this.n, i, j, (ChunkSnapshot) null); -+ } -+ } -+ -+ } -+} -diff --git a/src/main/java/net/minecraft/server/ChunkProviderHell.java b/src/main/java/net/minecraft/server/ChunkProviderHell.java -new file mode 100644 -index 0000000..0150efd ---- /dev/null -+++ b/src/main/java/net/minecraft/server/ChunkProviderHell.java -@@ -0,0 +1,369 @@ -+package net.minecraft.server; -+ -+import java.util.List; -+import java.util.Random; -+ -+public class ChunkProviderHell implements ChunkGenerator { -+ -+ protected static final IBlockData a = Blocks.AIR.getBlockData(); -+ protected static final IBlockData b = Blocks.NETHERRACK.getBlockData(); -+ protected static final IBlockData c = Blocks.BEDROCK.getBlockData(); -+ protected static final IBlockData d = Blocks.LAVA.getBlockData(); -+ protected static final IBlockData e = Blocks.GRAVEL.getBlockData(); -+ protected static final IBlockData f = Blocks.SOUL_SAND.getBlockData(); -+ private final World n; -+ private final boolean o; -+ private final Random p; -+ private double[] q = new double[256]; -+ private double[] r = new double[256]; -+ private double[] s = new double[256]; -+ private double[] t; -+ private final NoiseGeneratorOctaves u; -+ private final NoiseGeneratorOctaves v; -+ private final NoiseGeneratorOctaves w; -+ private final NoiseGeneratorOctaves x; -+ private final NoiseGeneratorOctaves y; -+ public final NoiseGeneratorOctaves g; -+ public final NoiseGeneratorOctaves h; -+ private final WorldGenFire z = new WorldGenFire(); -+ private final WorldGenLightStone1 A = new WorldGenLightStone1(); -+ private final WorldGenLightStone2 B = new WorldGenLightStone2(); -+ private final WorldGenerator C; -+ private final WorldGenHellLava D; -+ private final WorldGenHellLava E; -+ private final WorldGenMushrooms F; -+ private final WorldGenMushrooms G; -+ private final WorldGenNether H; -+ private final WorldGenBase I; -+ double[] i; -+ double[] j; -+ double[] k; -+ double[] l; -+ double[] m; -+ -+ public ChunkProviderHell(World world, boolean flag, long i) { -+ this.C = new WorldGenMinable(Blocks.QUARTZ_ORE.getBlockData(), 14, BlockPredicate.a(Blocks.NETHERRACK)); -+ this.D = new WorldGenHellLava(Blocks.FLOWING_LAVA, true); -+ this.E = new WorldGenHellLava(Blocks.FLOWING_LAVA, false); -+ this.F = new WorldGenMushrooms(Blocks.BROWN_MUSHROOM); -+ this.G = new WorldGenMushrooms(Blocks.RED_MUSHROOM); -+ this.H = new WorldGenNether(); -+ this.I = new WorldGenCavesHell(); -+ this.n = world; -+ this.o = flag; -+ this.p = new Random(i); -+ this.u = new NoiseGeneratorOctaves(this.p, 16); -+ this.v = new NoiseGeneratorOctaves(this.p, 16); -+ this.w = new NoiseGeneratorOctaves(this.p, 8); -+ this.x = new NoiseGeneratorOctaves(this.p, 4); -+ this.y = new NoiseGeneratorOctaves(this.p, 4); -+ this.g = new NoiseGeneratorOctaves(this.p, 10); -+ this.h = new NoiseGeneratorOctaves(this.p, 16); -+ world.b(63); -+ } -+ -+ public void a(int i, int j, ChunkSnapshot chunksnapshot) { -+ byte b0 = 4; -+ int k = this.n.K() / 2 + 1; -+ int l = b0 + 1; -+ byte b1 = 17; -+ int i1 = b0 + 1; -+ -+ this.t = this.a(this.t, i * b0, 0, j * b0, l, b1, i1); -+ -+ for (int j1 = 0; j1 < b0; ++j1) { -+ for (int k1 = 0; k1 < b0; ++k1) { -+ for (int l1 = 0; l1 < 16; ++l1) { -+ double d0 = 0.125D; -+ double d1 = this.t[((j1 + 0) * i1 + k1 + 0) * b1 + l1 + 0]; -+ double d2 = this.t[((j1 + 0) * i1 + k1 + 1) * b1 + l1 + 0]; -+ double d3 = this.t[((j1 + 1) * i1 + k1 + 0) * b1 + l1 + 0]; -+ double d4 = this.t[((j1 + 1) * i1 + k1 + 1) * b1 + l1 + 0]; -+ double d5 = (this.t[((j1 + 0) * i1 + k1 + 0) * b1 + l1 + 1] - d1) * d0; -+ double d6 = (this.t[((j1 + 0) * i1 + k1 + 1) * b1 + l1 + 1] - d2) * d0; -+ double d7 = (this.t[((j1 + 1) * i1 + k1 + 0) * b1 + l1 + 1] - d3) * d0; -+ double d8 = (this.t[((j1 + 1) * i1 + k1 + 1) * b1 + l1 + 1] - d4) * d0; -+ -+ for (int i2 = 0; i2 < 8; ++i2) { -+ double d9 = 0.25D; -+ double d10 = d1; -+ double d11 = d2; -+ double d12 = (d3 - d1) * d9; -+ double d13 = (d4 - d2) * d9; -+ -+ for (int j2 = 0; j2 < 4; ++j2) { -+ double d14 = 0.25D; -+ double d15 = d10; -+ double d16 = (d11 - d10) * d14; -+ -+ for (int k2 = 0; k2 < 4; ++k2) { -+ IBlockData iblockdata = null; -+ -+ if (l1 * 8 + i2 < k) { -+ iblockdata = ChunkProviderHell.d; -+ } -+ -+ if (d15 > 0.0D) { -+ iblockdata = ChunkProviderHell.b; -+ } -+ -+ int l2 = j2 + j1 * 4; -+ int i3 = i2 + l1 * 8; -+ int j3 = k2 + k1 * 4; -+ -+ chunksnapshot.a(l2, i3, j3, iblockdata); -+ d15 += d16; -+ } -+ -+ d10 += d12; -+ d11 += d13; -+ } -+ -+ d1 += d5; -+ d2 += d6; -+ d3 += d7; -+ d4 += d8; -+ } -+ } -+ } -+ } -+ -+ } -+ -+ public void b(int i, int j, ChunkSnapshot chunksnapshot) { -+ int k = this.n.K() + 1; -+ double d0 = 0.03125D; -+ -+ this.q = this.x.a(this.q, i * 16, j * 16, 0, 16, 16, 1, d0, d0, 1.0D); -+ this.r = this.x.a(this.r, i * 16, 109, j * 16, 16, 1, 16, d0, 1.0D, d0); -+ this.s = this.y.a(this.s, i * 16, j * 16, 0, 16, 16, 1, d0 * 2.0D, d0 * 2.0D, d0 * 2.0D); -+ -+ for (int l = 0; l < 16; ++l) { -+ for (int i1 = 0; i1 < 16; ++i1) { -+ boolean flag = this.q[l + i1 * 16] + this.p.nextDouble() * 0.2D > 0.0D; -+ boolean flag1 = this.r[l + i1 * 16] + this.p.nextDouble() * 0.2D > 0.0D; -+ int j1 = (int) (this.s[l + i1 * 16] / 3.0D + 3.0D + this.p.nextDouble() * 0.25D); -+ int k1 = -1; -+ IBlockData iblockdata = ChunkProviderHell.b; -+ IBlockData iblockdata1 = ChunkProviderHell.b; -+ -+ for (int l1 = 127; l1 >= 0; --l1) { -+ if (l1 < 127 - this.p.nextInt(5) && l1 > this.p.nextInt(5)) { -+ IBlockData iblockdata2 = chunksnapshot.a(i1, l1, l); -+ -+ if (iblockdata2.getBlock() != null && iblockdata2.getMaterial() != Material.AIR) { -+ if (iblockdata2.getBlock() == Blocks.NETHERRACK) { -+ if (k1 == -1) { -+ if (j1 <= 0) { -+ iblockdata = ChunkProviderHell.a; -+ iblockdata1 = ChunkProviderHell.b; -+ } else if (l1 >= k - 4 && l1 <= k + 1) { -+ iblockdata = ChunkProviderHell.b; -+ iblockdata1 = ChunkProviderHell.b; -+ if (flag1) { -+ iblockdata = ChunkProviderHell.e; -+ iblockdata1 = ChunkProviderHell.b; -+ } -+ -+ if (flag) { -+ iblockdata = ChunkProviderHell.f; -+ iblockdata1 = ChunkProviderHell.f; -+ } -+ } -+ -+ if (l1 < k && (iblockdata == null || iblockdata.getMaterial() == Material.AIR)) { -+ iblockdata = ChunkProviderHell.d; -+ } -+ -+ k1 = j1; -+ if (l1 >= k - 1) { -+ chunksnapshot.a(i1, l1, l, iblockdata); -+ } else { -+ chunksnapshot.a(i1, l1, l, iblockdata1); -+ } -+ } else if (k1 > 0) { -+ --k1; -+ chunksnapshot.a(i1, l1, l, iblockdata1); -+ } -+ } -+ } else { -+ k1 = -1; -+ } -+ } else { -+ chunksnapshot.a(i1, l1, l, ChunkProviderHell.c); -+ } -+ } -+ } -+ } -+ -+ } -+ -+ public Chunk getOrCreateChunk(int i, int j) { -+ this.p.setSeed((long) i * 341873128712L + (long) j * 132897987541L); -+ ChunkSnapshot chunksnapshot = new ChunkSnapshot(); -+ -+ this.a(i, j, chunksnapshot); -+ this.b(i, j, chunksnapshot); -+ this.I.a(this.n, i, j, chunksnapshot); -+ if (this.o) { -+ this.H.a(this.n, i, j, chunksnapshot); -+ } -+ -+ Chunk chunk = new Chunk(this.n, chunksnapshot, i, j); -+ BiomeBase[] abiomebase = this.n.getWorldChunkManager().getBiomeBlock((BiomeBase[]) null, i * 16, j * 16, 16, 16); -+ byte[] abyte = chunk.getBiomeIndex(); -+ -+ for (int k = 0; k < abyte.length; ++k) { -+ abyte[k] = (byte) BiomeBase.a(abiomebase[k]); -+ } -+ -+ chunk.m(); -+ return chunk; -+ } -+ -+ private double[] a(double[] adouble, int i, int j, int k, int l, int i1, int j1) { -+ if (adouble == null) { -+ adouble = new double[l * i1 * j1]; -+ } -+ -+ double d0 = 684.412D; -+ double d1 = 2053.236D; -+ -+ this.l = this.g.a(this.l, i, j, k, l, 1, j1, 1.0D, 0.0D, 1.0D); -+ this.m = this.h.a(this.m, i, j, k, l, 1, j1, 100.0D, 0.0D, 100.0D); -+ this.i = this.w.a(this.i, i, j, k, l, i1, j1, d0 / 80.0D, d1 / 60.0D, d0 / 80.0D); -+ this.j = this.u.a(this.j, i, j, k, l, i1, j1, d0, d1, d0); -+ this.k = this.v.a(this.k, i, j, k, l, i1, j1, d0, d1, d0); -+ int k1 = 0; -+ double[] adouble1 = new double[i1]; -+ -+ int l1; -+ -+ for (l1 = 0; l1 < i1; ++l1) { -+ adouble1[l1] = Math.cos((double) l1 * 3.141592653589793D * 6.0D / (double) i1) * 2.0D; -+ double d2 = (double) l1; -+ -+ if (l1 > i1 / 2) { -+ d2 = (double) (i1 - 1 - l1); -+ } -+ -+ if (d2 < 4.0D) { -+ d2 = 4.0D - d2; -+ adouble1[l1] -= d2 * d2 * d2 * 10.0D; -+ } -+ } -+ -+ for (l1 = 0; l1 < l; ++l1) { -+ for (int i2 = 0; i2 < j1; ++i2) { -+ double d3 = 0.0D; -+ -+ for (int j2 = 0; j2 < i1; ++j2) { -+ double d4 = 0.0D; -+ double d5 = adouble1[j2]; -+ double d6 = this.j[k1] / 512.0D; -+ double d7 = this.k[k1] / 512.0D; -+ double d8 = (this.i[k1] / 10.0D + 1.0D) / 2.0D; -+ -+ if (d8 < 0.0D) { -+ d4 = d6; -+ } else if (d8 > 1.0D) { -+ d4 = d7; -+ } else { -+ d4 = d6 + (d7 - d6) * d8; -+ } -+ -+ d4 -= d5; -+ double d9; -+ -+ if (j2 > i1 - 4) { -+ d9 = (double) ((float) (j2 - (i1 - 4)) / 3.0F); -+ d4 = d4 * (1.0D - d9) + -10.0D * d9; -+ } -+ -+ if ((double) j2 < d3) { -+ d9 = (d3 - (double) j2) / 4.0D; -+ d9 = MathHelper.a(d9, 0.0D, 1.0D); -+ d4 = d4 * (1.0D - d9) + -10.0D * d9; -+ } -+ -+ adouble[k1] = d4; -+ ++k1; -+ } -+ } -+ } -+ -+ return adouble; -+ } -+ -+ public void recreateStructures(int i, int j) { -+ BlockFalling.instaFall = true; -+ BlockPosition blockposition = new BlockPosition(i * 16, 0, j * 16); -+ ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); -+ -+ this.H.a(this.n, this.p, chunkcoordintpair); -+ -+ int k; -+ -+ for (k = 0; k < 8; ++k) { -+ this.E.generate(this.n, this.p, blockposition.a(this.p.nextInt(16) + 8, this.p.nextInt(120) + 4, this.p.nextInt(16) + 8)); -+ } -+ -+ for (k = 0; k < this.p.nextInt(this.p.nextInt(10) + 1) + 1; ++k) { -+ this.z.generate(this.n, this.p, blockposition.a(this.p.nextInt(16) + 8, this.p.nextInt(120) + 4, this.p.nextInt(16) + 8)); -+ } -+ -+ for (k = 0; k < this.p.nextInt(this.p.nextInt(10) + 1); ++k) { -+ this.A.generate(this.n, this.p, blockposition.a(this.p.nextInt(16) + 8, this.p.nextInt(120) + 4, this.p.nextInt(16) + 8)); -+ } -+ -+ for (k = 0; k < 10; ++k) { -+ this.B.generate(this.n, this.p, blockposition.a(this.p.nextInt(16) + 8, this.p.nextInt(128), this.p.nextInt(16) + 8)); -+ } -+ -+ if (this.p.nextBoolean()) { -+ this.F.generate(this.n, this.p, blockposition.a(this.p.nextInt(16) + 8, this.p.nextInt(128), this.p.nextInt(16) + 8)); -+ } -+ -+ if (this.p.nextBoolean()) { -+ this.G.generate(this.n, this.p, blockposition.a(this.p.nextInt(16) + 8, this.p.nextInt(128), this.p.nextInt(16) + 8)); -+ } -+ -+ for (k = 0; k < 16; ++k) { -+ this.C.generate(this.n, this.p, blockposition.a(this.p.nextInt(16), this.p.nextInt(108) + 10, this.p.nextInt(16))); -+ } -+ -+ for (k = 0; k < 16; ++k) { -+ this.D.generate(this.n, this.p, blockposition.a(this.p.nextInt(16), this.p.nextInt(108) + 10, this.p.nextInt(16))); -+ } -+ -+ BlockFalling.instaFall = false; -+ } -+ -+ public boolean a(Chunk chunk, int i, int j) { -+ return false; -+ } -+ -+ public List getMobsFor(EnumCreatureType enumcreaturetype, BlockPosition blockposition) { -+ if (enumcreaturetype == EnumCreatureType.MONSTER) { -+ if (this.H.b(blockposition)) { -+ return this.H.b(); -+ } -+ -+ if (this.H.b(this.n, blockposition) && this.n.getType(blockposition.down()).getBlock() == Blocks.NETHER_BRICK) { -+ return this.H.b(); -+ } -+ } -+ -+ BiomeBase biomebase = this.n.getBiome(blockposition); -+ -+ return biomebase.getMobs(enumcreaturetype); -+ } -+ -+ public BlockPosition findNearestMapFeature(World world, String s, BlockPosition blockposition) { -+ return null; -+ } -+ -+ public void recreateStructures(Chunk chunk, int i, int j) { -+ this.H.a(this.n, i, j, (ChunkSnapshot) null); -+ } -+} -diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java -new file mode 100644 -index 0000000..871535c ---- /dev/null -+++ b/src/main/java/net/minecraft/server/CommandScoreboard.java -@@ -0,0 +1,1088 @@ -+package net.minecraft.server; -+ -+import com.google.common.collect.Lists; -+import com.google.common.collect.Sets; -+import java.util.ArrayList; -+import java.util.Arrays; -+import java.util.Collection; -+import java.util.Collections; -+import java.util.HashSet; -+import java.util.Iterator; -+import java.util.List; -+import java.util.Map; -+import java.util.Set; -+ -+public class CommandScoreboard extends CommandAbstract { -+ public int compareTo(ICommand compare) {return getCommand().compareTo(compare.getCommand());} // Paper -+ public CommandScoreboard() {} -+ -+ public String getCommand() { -+ return "scoreboard"; -+ } -+ -+ public int a() { -+ return 2; -+ } -+ -+ public String getUsage(ICommandListener icommandlistener) { -+ return "commands.scoreboard.usage"; -+ } -+ -+ public void execute(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring) throws CommandException { -+ if (!this.b(minecraftserver, icommandlistener, astring)) { -+ if (astring.length < 1) { -+ throw new ExceptionUsage("commands.scoreboard.usage", new Object[0]); -+ } else { -+ if (astring[0].equalsIgnoreCase("objectives")) { -+ if (astring.length == 1) { -+ throw new ExceptionUsage("commands.scoreboard.objectives.usage", new Object[0]); -+ } -+ -+ if (astring[1].equalsIgnoreCase("list")) { -+ this.a(icommandlistener, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("add")) { -+ if (astring.length < 4) { -+ throw new ExceptionUsage("commands.scoreboard.objectives.add.usage", new Object[0]); -+ } -+ -+ this.a(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("remove")) { -+ if (astring.length != 3) { -+ throw new ExceptionUsage("commands.scoreboard.objectives.remove.usage", new Object[0]); -+ } -+ -+ this.a(icommandlistener, astring[2], minecraftserver); -+ } else { -+ if (!astring[1].equalsIgnoreCase("setdisplay")) { -+ throw new ExceptionUsage("commands.scoreboard.objectives.usage", new Object[0]); -+ } -+ -+ if (astring.length != 3 && astring.length != 4) { -+ throw new ExceptionUsage("commands.scoreboard.objectives.setdisplay.usage", new Object[0]); -+ } -+ -+ this.i(icommandlistener, astring, 2, minecraftserver); -+ } -+ } else if (astring[0].equalsIgnoreCase("players")) { -+ if (astring.length == 1) { -+ throw new ExceptionUsage("commands.scoreboard.players.usage", new Object[0]); -+ } -+ -+ if (astring[1].equalsIgnoreCase("list")) { -+ if (astring.length > 3) { -+ throw new ExceptionUsage("commands.scoreboard.players.list.usage", new Object[0]); -+ } -+ -+ this.j(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("add")) { -+ if (astring.length < 5) { -+ throw new ExceptionUsage("commands.scoreboard.players.add.usage", new Object[0]); -+ } -+ -+ this.k(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("remove")) { -+ if (astring.length < 5) { -+ throw new ExceptionUsage("commands.scoreboard.players.remove.usage", new Object[0]); -+ } -+ -+ this.k(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("set")) { -+ if (astring.length < 5) { -+ throw new ExceptionUsage("commands.scoreboard.players.set.usage", new Object[0]); -+ } -+ -+ this.k(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("reset")) { -+ if (astring.length != 3 && astring.length != 4) { -+ throw new ExceptionUsage("commands.scoreboard.players.reset.usage", new Object[0]); -+ } -+ -+ this.l(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("enable")) { -+ if (astring.length != 4) { -+ throw new ExceptionUsage("commands.scoreboard.players.enable.usage", new Object[0]); -+ } -+ -+ this.m(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("test")) { -+ if (astring.length != 5 && astring.length != 6) { -+ throw new ExceptionUsage("commands.scoreboard.players.test.usage", new Object[0]); -+ } -+ -+ this.n(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("operation")) { -+ if (astring.length != 7) { -+ throw new ExceptionUsage("commands.scoreboard.players.operation.usage", new Object[0]); -+ } -+ -+ this.o(icommandlistener, astring, 2, minecraftserver); -+ } else { -+ if (!astring[1].equalsIgnoreCase("tag")) { -+ throw new ExceptionUsage("commands.scoreboard.players.usage", new Object[0]); -+ } -+ -+ if (astring.length < 4) { -+ throw new ExceptionUsage("commands.scoreboard.players.tag.usage", new Object[0]); -+ } -+ -+ this.a(minecraftserver, icommandlistener, astring, 2); -+ } -+ } else { -+ if (!astring[0].equalsIgnoreCase("teams")) { -+ throw new ExceptionUsage("commands.scoreboard.usage", new Object[0]); -+ } -+ -+ if (astring.length == 1) { -+ throw new ExceptionUsage("commands.scoreboard.teams.usage", new Object[0]); -+ } -+ -+ if (astring[1].equalsIgnoreCase("list")) { -+ if (astring.length > 3) { -+ throw new ExceptionUsage("commands.scoreboard.teams.list.usage", new Object[0]); -+ } -+ -+ this.e(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("add")) { -+ if (astring.length < 3) { -+ throw new ExceptionUsage("commands.scoreboard.teams.add.usage", new Object[0]); -+ } -+ -+ this.b(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("remove")) { -+ if (astring.length != 3) { -+ throw new ExceptionUsage("commands.scoreboard.teams.remove.usage", new Object[0]); -+ } -+ -+ this.d(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("empty")) { -+ if (astring.length != 3) { -+ throw new ExceptionUsage("commands.scoreboard.teams.empty.usage", new Object[0]); -+ } -+ -+ this.h(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("join")) { -+ if (astring.length < 4 && (astring.length != 3 || !(icommandlistener instanceof EntityHuman))) { -+ throw new ExceptionUsage("commands.scoreboard.teams.join.usage", new Object[0]); -+ } -+ -+ this.f(icommandlistener, astring, 2, minecraftserver); -+ } else if (astring[1].equalsIgnoreCase("leave")) { -+ if (astring.length < 3 && !(icommandlistener instanceof EntityHuman)) { -+ throw new ExceptionUsage("commands.scoreboard.teams.leave.usage", new Object[0]); -+ } -+ -+ this.g(icommandlistener, astring, 2, minecraftserver); -+ } else { -+ if (!astring[1].equalsIgnoreCase("option")) { -+ throw new ExceptionUsage("commands.scoreboard.teams.usage", new Object[0]); -+ } -+ -+ if (astring.length != 4 && astring.length != 5) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.usage", new Object[0]); -+ } -+ -+ this.c(icommandlistener, astring, 2, minecraftserver); -+ } -+ } -+ -+ } -+ } -+ } -+ -+ private boolean b(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring) throws CommandException { -+ int i = -1; -+ -+ for (int j = 0; j < astring.length; ++j) { -+ if (this.isListStart(astring, j) && "*".equals(astring[j])) { -+ if (i >= 0) { -+ throw new CommandException("commands.scoreboard.noMultiWildcard", new Object[0]); -+ } -+ -+ i = j; -+ } -+ } -+ -+ if (i < 0) { -+ return false; -+ } else { -+ ArrayList arraylist = Lists.newArrayList(this.a(minecraftserver).getPlayers()); -+ String s = astring[i]; -+ ArrayList arraylist1 = Lists.newArrayList(); -+ Iterator iterator = arraylist.iterator(); -+ -+ while (iterator.hasNext()) { -+ String s1 = (String) iterator.next(); -+ -+ astring[i] = s1; -+ -+ try { -+ this.execute(minecraftserver, icommandlistener, astring); -+ arraylist1.add(s1); -+ } catch (CommandException commandexception) { -+ ChatMessage chatmessage = new ChatMessage(commandexception.getMessage(), commandexception.getArgs()); -+ -+ chatmessage.getChatModifier().setColor(EnumChatFormat.RED); -+ icommandlistener.sendMessage(chatmessage); -+ } -+ } -+ -+ astring[i] = s; -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.AFFECTED_ENTITIES, arraylist1.size()); -+ if (arraylist1.isEmpty()) { -+ throw new ExceptionUsage("commands.scoreboard.allMatchesFailed", new Object[0]); -+ } else { -+ return true; -+ } -+ } -+ } -+ -+ protected Scoreboard a(MinecraftServer minecraftserver) { -+ return minecraftserver.getWorldServer(0).getScoreboard(); -+ } -+ -+ protected ScoreboardObjective a(String s, boolean flag, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ ScoreboardObjective scoreboardobjective = scoreboard.getObjective(s); -+ -+ if (scoreboardobjective == null) { -+ throw new CommandException("commands.scoreboard.objectiveNotFound", new Object[] { s}); -+ } else if (flag && scoreboardobjective.getCriteria().isReadOnly()) { -+ throw new CommandException("commands.scoreboard.objectiveReadOnly", new Object[] { s}); -+ } else { -+ return scoreboardobjective; -+ } -+ } -+ -+ protected ScoreboardTeam a(String s, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ ScoreboardTeam scoreboardteam = scoreboard.getTeam(s); -+ -+ if (scoreboardteam == null) { -+ throw new CommandException("commands.scoreboard.teamNotFound", new Object[] { s}); -+ } else { -+ return scoreboardteam; -+ } -+ } -+ -+ protected void a(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ String s = astring[i++]; -+ String s1 = astring[i++]; -+ Scoreboard scoreboard = this.a(minecraftserver); -+ IScoreboardCriteria iscoreboardcriteria = (IScoreboardCriteria) IScoreboardCriteria.criteria.get(s1); -+ -+ if (iscoreboardcriteria == null) { -+ throw new ExceptionUsage("commands.scoreboard.objectives.add.wrongType", new Object[] { s1}); -+ } else if (scoreboard.getObjective(s) != null) { -+ throw new CommandException("commands.scoreboard.objectives.add.alreadyExists", new Object[] { s}); -+ } else if (s.length() > 16) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.objectives.add.tooLong", new Object[] { s, Integer.valueOf(16)}); -+ } else if (s.isEmpty()) { -+ throw new ExceptionUsage("commands.scoreboard.objectives.add.usage", new Object[0]); -+ } else { -+ if (astring.length > i) { -+ String s2 = a(icommandlistener, astring, i).toPlainText(); -+ -+ if (s2.length() > 32) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.objectives.add.displayTooLong", new Object[] { s2, Integer.valueOf(32)}); -+ } -+ -+ if (!s2.isEmpty()) { -+ scoreboard.registerObjective(s, iscoreboardcriteria).setDisplayName(s2); -+ } else { -+ scoreboard.registerObjective(s, iscoreboardcriteria); -+ } -+ } else { -+ scoreboard.registerObjective(s, iscoreboardcriteria); -+ } -+ -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.objectives.add.success", new Object[] { s}); -+ } -+ } -+ -+ protected void b(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ String s = astring[i++]; -+ Scoreboard scoreboard = this.a(minecraftserver); -+ -+ if (scoreboard.getTeam(s) != null) { -+ throw new CommandException("commands.scoreboard.teams.add.alreadyExists", new Object[] { s}); -+ } else if (s.length() > 16) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.teams.add.tooLong", new Object[] { s, Integer.valueOf(16)}); -+ } else if (s.isEmpty()) { -+ throw new ExceptionUsage("commands.scoreboard.teams.add.usage", new Object[0]); -+ } else { -+ if (astring.length > i) { -+ String s1 = a(icommandlistener, astring, i).toPlainText(); -+ -+ if (s1.length() > 32) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.teams.add.displayTooLong", new Object[] { s1, Integer.valueOf(32)}); -+ } -+ -+ if (!s1.isEmpty()) { -+ scoreboard.createTeam(s).setDisplayName(s1); -+ } else { -+ scoreboard.createTeam(s); -+ } -+ } else { -+ scoreboard.createTeam(s); -+ } -+ -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.teams.add.success", new Object[] { s}); -+ } -+ } -+ -+ protected void c(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ ScoreboardTeam scoreboardteam = this.a(astring[i++], minecraftserver); -+ -+ if (scoreboardteam != null) { -+ String s = astring[i++].toLowerCase(); -+ -+ if (!s.equalsIgnoreCase("color") && !s.equalsIgnoreCase("friendlyfire") && !s.equalsIgnoreCase("seeFriendlyInvisibles") && !s.equalsIgnoreCase("nametagVisibility") && !s.equalsIgnoreCase("deathMessageVisibility") && !s.equalsIgnoreCase("collisionRule")) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.usage", new Object[0]); -+ } else if (astring.length == 4) { -+ if (s.equalsIgnoreCase("color")) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(EnumChatFormat.a(true, false))}); -+ } else if (!s.equalsIgnoreCase("friendlyfire") && !s.equalsIgnoreCase("seeFriendlyInvisibles")) { -+ if (!s.equalsIgnoreCase("nametagVisibility") && !s.equalsIgnoreCase("deathMessageVisibility")) { -+ if (s.equalsIgnoreCase("collisionRule")) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Object[]) ScoreboardTeamBase.EnumTeamPush.a())}); -+ } else { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.usage", new Object[0]); -+ } -+ } else { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Object[]) ScoreboardTeamBase.EnumNameTagVisibility.a())}); -+ } -+ } else { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Collection) Arrays.asList(new String[] { "true", "false"}))}); -+ } -+ } else { -+ String s1 = astring[i]; -+ -+ if (s.equalsIgnoreCase("color")) { -+ EnumChatFormat enumchatformat = EnumChatFormat.b(s1); -+ -+ if (enumchatformat == null || enumchatformat.isFormat()) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(EnumChatFormat.a(true, false))}); -+ } -+ -+ scoreboardteam.a(enumchatformat); -+ scoreboardteam.setPrefix(enumchatformat.toString()); -+ scoreboardteam.setSuffix(EnumChatFormat.RESET.toString()); -+ } else if (s.equalsIgnoreCase("friendlyfire")) { -+ if (!s1.equalsIgnoreCase("true") && !s1.equalsIgnoreCase("false")) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Collection) Arrays.asList(new String[] { "true", "false"}))}); -+ } -+ -+ scoreboardteam.setAllowFriendlyFire(s1.equalsIgnoreCase("true")); -+ } else if (s.equalsIgnoreCase("seeFriendlyInvisibles")) { -+ if (!s1.equalsIgnoreCase("true") && !s1.equalsIgnoreCase("false")) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Collection) Arrays.asList(new String[] { "true", "false"}))}); -+ } -+ -+ scoreboardteam.setCanSeeFriendlyInvisibles(s1.equalsIgnoreCase("true")); -+ } else { -+ ScoreboardTeamBase.EnumNameTagVisibility scoreboardteambase_enumnametagvisibility; -+ -+ if (s.equalsIgnoreCase("nametagVisibility")) { -+ scoreboardteambase_enumnametagvisibility = ScoreboardTeamBase.EnumNameTagVisibility.a(s1); -+ if (scoreboardteambase_enumnametagvisibility == null) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Object[]) ScoreboardTeamBase.EnumNameTagVisibility.a())}); -+ } -+ -+ scoreboardteam.setNameTagVisibility(scoreboardteambase_enumnametagvisibility); -+ } else if (s.equalsIgnoreCase("deathMessageVisibility")) { -+ scoreboardteambase_enumnametagvisibility = ScoreboardTeamBase.EnumNameTagVisibility.a(s1); -+ if (scoreboardteambase_enumnametagvisibility == null) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Object[]) ScoreboardTeamBase.EnumNameTagVisibility.a())}); -+ } -+ -+ scoreboardteam.b(scoreboardteambase_enumnametagvisibility); -+ } else if (s.equalsIgnoreCase("collisionRule")) { -+ ScoreboardTeamBase.EnumTeamPush scoreboardteambase_enumteampush = ScoreboardTeamBase.EnumTeamPush.a(s1); -+ -+ if (scoreboardteambase_enumteampush == null) { -+ throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Object[]) ScoreboardTeamBase.EnumTeamPush.a())}); -+ } -+ -+ scoreboardteam.a(scoreboardteambase_enumteampush); -+ } -+ } -+ -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.teams.option.success", new Object[] { s, scoreboardteam.getName(), s1}); -+ } -+ } -+ } -+ -+ protected void d(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ ScoreboardTeam scoreboardteam = this.a(astring[i], minecraftserver); -+ -+ if (scoreboardteam != null) { -+ scoreboard.removeTeam(scoreboardteam); -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.teams.remove.success", new Object[] { scoreboardteam.getName()}); -+ } -+ } -+ -+ protected void e(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ -+ if (astring.length > i) { -+ ScoreboardTeam scoreboardteam = this.a(astring[i], minecraftserver); -+ -+ if (scoreboardteam == null) { -+ return; -+ } -+ -+ Collection collection = scoreboardteam.getPlayerNameSet(); -+ -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.QUERY_RESULT, collection.size()); -+ if (collection.isEmpty()) { -+ throw new CommandException("commands.scoreboard.teams.list.player.empty", new Object[] { scoreboardteam.getName()}); -+ } -+ -+ ChatMessage chatmessage = new ChatMessage("commands.scoreboard.teams.list.player.count", new Object[] { Integer.valueOf(collection.size()), scoreboardteam.getName()}); -+ -+ chatmessage.getChatModifier().setColor(EnumChatFormat.DARK_GREEN); -+ icommandlistener.sendMessage(chatmessage); -+ icommandlistener.sendMessage(new ChatComponentText(a(collection.toArray()))); -+ } else { -+ Collection collection1 = scoreboard.getTeams(); -+ -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.QUERY_RESULT, collection1.size()); -+ if (collection1.isEmpty()) { -+ throw new CommandException("commands.scoreboard.teams.list.empty", new Object[0]); -+ } -+ -+ ChatMessage chatmessage1 = new ChatMessage("commands.scoreboard.teams.list.count", new Object[] { Integer.valueOf(collection1.size())}); -+ -+ chatmessage1.getChatModifier().setColor(EnumChatFormat.DARK_GREEN); -+ icommandlistener.sendMessage(chatmessage1); -+ Iterator iterator = collection1.iterator(); -+ -+ while (iterator.hasNext()) { -+ ScoreboardTeam scoreboardteam1 = (ScoreboardTeam) iterator.next(); -+ -+ icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.teams.list.entry", new Object[] { scoreboardteam1.getName(), scoreboardteam1.getDisplayName(), Integer.valueOf(scoreboardteam1.getPlayerNameSet().size())})); -+ } -+ } -+ -+ } -+ -+ protected void f(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ String s = astring[i++]; -+ HashSet hashset = Sets.newHashSet(); -+ HashSet hashset1 = Sets.newHashSet(); -+ String s1; -+ -+ if (icommandlistener instanceof EntityHuman && i == astring.length) { -+ s1 = a(icommandlistener).getName(); -+ if (scoreboard.addPlayerToTeam(s1, s)) { -+ hashset.add(s1); -+ } else { -+ hashset1.add(s1); -+ } -+ } else { -+ while (i < astring.length) { -+ s1 = astring[i++]; -+ if (s1.startsWith("@")) { -+ List list = c(minecraftserver, icommandlistener, s1); -+ Iterator iterator = list.iterator(); -+ -+ while (iterator.hasNext()) { -+ Entity entity = (Entity) iterator.next(); -+ String s2 = e(minecraftserver, icommandlistener, entity.getUniqueID().toString()); -+ -+ if (scoreboard.addPlayerToTeam(s2, s)) { -+ hashset.add(s2); -+ } else { -+ hashset1.add(s2); -+ } -+ } -+ } else { -+ String s3 = e(minecraftserver, icommandlistener, s1); -+ -+ if (scoreboard.addPlayerToTeam(s3, s)) { -+ hashset.add(s3); -+ } else { -+ hashset1.add(s3); -+ } -+ } -+ } -+ } -+ -+ if (!hashset.isEmpty()) { -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.AFFECTED_ENTITIES, hashset.size()); -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.teams.join.success", new Object[] { Integer.valueOf(hashset.size()), s, a(hashset.toArray(new String[hashset.size()]))}); -+ } -+ -+ if (!hashset1.isEmpty()) { -+ throw new CommandException("commands.scoreboard.teams.join.failure", new Object[] { Integer.valueOf(hashset1.size()), s, a(hashset1.toArray(new String[hashset1.size()]))}); -+ } -+ } -+ -+ protected void g(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ HashSet hashset = Sets.newHashSet(); -+ HashSet hashset1 = Sets.newHashSet(); -+ String s; -+ -+ if (icommandlistener instanceof EntityHuman && i == astring.length) { -+ s = a(icommandlistener).getName(); -+ if (scoreboard.removePlayerFromTeam(s)) { -+ hashset.add(s); -+ } else { -+ hashset1.add(s); -+ } -+ } else { -+ while (i < astring.length) { -+ s = astring[i++]; -+ if (s.startsWith("@")) { -+ List list = c(minecraftserver, icommandlistener, s); -+ Iterator iterator = list.iterator(); -+ -+ while (iterator.hasNext()) { -+ Entity entity = (Entity) iterator.next(); -+ String s1 = e(minecraftserver, icommandlistener, entity.getUniqueID().toString()); -+ -+ if (scoreboard.removePlayerFromTeam(s1)) { -+ hashset.add(s1); -+ } else { -+ hashset1.add(s1); -+ } -+ } -+ } else { -+ String s2 = e(minecraftserver, icommandlistener, s); -+ -+ if (scoreboard.removePlayerFromTeam(s2)) { -+ hashset.add(s2); -+ } else { -+ hashset1.add(s2); -+ } -+ } -+ } -+ } -+ -+ if (!hashset.isEmpty()) { -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.AFFECTED_ENTITIES, hashset.size()); -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.teams.leave.success", new Object[] { Integer.valueOf(hashset.size()), a(hashset.toArray(new String[hashset.size()]))}); -+ } -+ -+ if (!hashset1.isEmpty()) { -+ throw new CommandException("commands.scoreboard.teams.leave.failure", new Object[] { Integer.valueOf(hashset1.size()), a(hashset1.toArray(new String[hashset1.size()]))}); -+ } -+ } -+ -+ protected void h(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ ScoreboardTeam scoreboardteam = this.a(astring[i], minecraftserver); -+ -+ if (scoreboardteam != null) { -+ ArrayList arraylist = Lists.newArrayList(scoreboardteam.getPlayerNameSet()); -+ -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.AFFECTED_ENTITIES, arraylist.size()); -+ if (arraylist.isEmpty()) { -+ throw new CommandException("commands.scoreboard.teams.empty.alreadyEmpty", new Object[] { scoreboardteam.getName()}); -+ } else { -+ Iterator iterator = arraylist.iterator(); -+ -+ while (iterator.hasNext()) { -+ String s = (String) iterator.next(); -+ -+ scoreboard.removePlayerFromTeam(s, scoreboardteam); -+ } -+ -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.teams.empty.success", new Object[] { Integer.valueOf(arraylist.size()), scoreboardteam.getName()}); -+ } -+ } -+ } -+ -+ protected void a(ICommandListener icommandlistener, String s, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ ScoreboardObjective scoreboardobjective = this.a(s, false, minecraftserver); -+ -+ scoreboard.unregisterObjective(scoreboardobjective); -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.objectives.remove.success", new Object[] { s}); -+ } -+ -+ protected void a(ICommandListener icommandlistener, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ Collection collection = scoreboard.getObjectives(); -+ -+ if (collection.isEmpty()) { -+ throw new CommandException("commands.scoreboard.objectives.list.empty", new Object[0]); -+ } else { -+ ChatMessage chatmessage = new ChatMessage("commands.scoreboard.objectives.list.count", new Object[] { Integer.valueOf(collection.size())}); -+ -+ chatmessage.getChatModifier().setColor(EnumChatFormat.DARK_GREEN); -+ icommandlistener.sendMessage(chatmessage); -+ Iterator iterator = collection.iterator(); -+ -+ while (iterator.hasNext()) { -+ ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next(); -+ -+ icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.objectives.list.entry", new Object[] { scoreboardobjective.getName(), scoreboardobjective.getDisplayName(), scoreboardobjective.getCriteria().getName()})); -+ } -+ -+ } -+ } -+ -+ protected void i(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ String s = astring[i++]; -+ int j = Scoreboard.getSlotForName(s); -+ ScoreboardObjective scoreboardobjective = null; -+ -+ if (astring.length == 4) { -+ scoreboardobjective = this.a(astring[i], false, minecraftserver); -+ } -+ -+ if (j < 0) { -+ throw new CommandException("commands.scoreboard.objectives.setdisplay.invalidSlot", new Object[] { s}); -+ } else { -+ scoreboard.setDisplaySlot(j, scoreboardobjective); -+ if (scoreboardobjective != null) { -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.objectives.setdisplay.successSet", new Object[] { Scoreboard.getSlotName(j), scoreboardobjective.getName()}); -+ } else { -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.objectives.setdisplay.successCleared", new Object[] { Scoreboard.getSlotName(j)}); -+ } -+ -+ } -+ } -+ -+ protected void j(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ -+ if (astring.length > i) { -+ String s = e(minecraftserver, icommandlistener, astring[i]); -+ Map map = scoreboard.getPlayerObjectives(s); -+ -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.QUERY_RESULT, map.size()); -+ if (map.isEmpty()) { -+ throw new CommandException("commands.scoreboard.players.list.player.empty", new Object[] { s}); -+ } -+ -+ ChatMessage chatmessage = new ChatMessage("commands.scoreboard.players.list.player.count", new Object[] { Integer.valueOf(map.size()), s}); -+ -+ chatmessage.getChatModifier().setColor(EnumChatFormat.DARK_GREEN); -+ icommandlistener.sendMessage(chatmessage); -+ Iterator iterator = map.values().iterator(); -+ -+ while (iterator.hasNext()) { -+ ScoreboardScore scoreboardscore = (ScoreboardScore) iterator.next(); -+ -+ icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.players.list.player.entry", new Object[] { Integer.valueOf(scoreboardscore.getScore()), scoreboardscore.getObjective().getDisplayName(), scoreboardscore.getObjective().getName()})); -+ } -+ } else { -+ Collection collection = scoreboard.getPlayers(); -+ -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.QUERY_RESULT, collection.size()); -+ if (collection.isEmpty()) { -+ throw new CommandException("commands.scoreboard.players.list.empty", new Object[0]); -+ } -+ -+ ChatMessage chatmessage1 = new ChatMessage("commands.scoreboard.players.list.count", new Object[] { Integer.valueOf(collection.size())}); -+ -+ chatmessage1.getChatModifier().setColor(EnumChatFormat.DARK_GREEN); -+ icommandlistener.sendMessage(chatmessage1); -+ icommandlistener.sendMessage(new ChatComponentText(a(collection.toArray()))); -+ } -+ -+ } -+ -+ protected void k(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ String s = astring[i - 1]; -+ int j = i; -+ String s1 = e(minecraftserver, icommandlistener, astring[i++]); -+ -+ if (s1.length() > 40) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s1, Integer.valueOf(40)}); -+ } else { -+ ScoreboardObjective scoreboardobjective = this.a(astring[i++], true, minecraftserver); -+ int k = s.equalsIgnoreCase("set") ? a(astring[i++]) : a(astring[i++], 0); -+ -+ if (astring.length > i) { -+ Entity entity = b(minecraftserver, icommandlistener, astring[j]); -+ -+ try { -+ NBTTagCompound nbttagcompound = MojangsonParser.parse(a(astring, i)); -+ NBTTagCompound nbttagcompound1 = a(entity); -+ -+ if (!GameProfileSerializer.a(nbttagcompound, nbttagcompound1, true)) { -+ throw new CommandException("commands.scoreboard.players.set.tagMismatch", new Object[] { s1}); -+ } -+ } catch (MojangsonParseException mojangsonparseexception) { -+ throw new CommandException("commands.scoreboard.players.set.tagError", new Object[] { mojangsonparseexception.getMessage()}); -+ } -+ } -+ -+ Scoreboard scoreboard = this.a(minecraftserver); -+ ScoreboardScore scoreboardscore = scoreboard.getPlayerScoreForObjective(s1, scoreboardobjective); -+ -+ if (s.equalsIgnoreCase("set")) { -+ scoreboardscore.setScore(k); -+ } else if (s.equalsIgnoreCase("add")) { -+ scoreboardscore.addScore(k); -+ } else { -+ scoreboardscore.removeScore(k); -+ } -+ -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.players.set.success", new Object[] { scoreboardobjective.getName(), s1, Integer.valueOf(scoreboardscore.getScore())}); -+ } -+ } -+ -+ protected void l(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ String s = e(minecraftserver, icommandlistener, astring[i++]); -+ -+ if (astring.length > i) { -+ ScoreboardObjective scoreboardobjective = this.a(astring[i++], false, minecraftserver); -+ -+ scoreboard.resetPlayerScores(s, scoreboardobjective); -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.players.resetscore.success", new Object[] { scoreboardobjective.getName(), s}); -+ } else { -+ scoreboard.resetPlayerScores(s, (ScoreboardObjective) null); -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.players.reset.success", new Object[] { s}); -+ } -+ -+ } -+ -+ protected void m(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ String s = d(minecraftserver, icommandlistener, astring[i++]); -+ -+ if (s.length() > 40) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, Integer.valueOf(40)}); -+ } else { -+ ScoreboardObjective scoreboardobjective = this.a(astring[i], false, minecraftserver); -+ -+ if (scoreboardobjective.getCriteria() != IScoreboardCriteria.c) { -+ throw new CommandException("commands.scoreboard.players.enable.noTrigger", new Object[] { scoreboardobjective.getName()}); -+ } else { -+ ScoreboardScore scoreboardscore = scoreboard.getPlayerScoreForObjective(s, scoreboardobjective); -+ -+ scoreboardscore.a(false); -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.players.enable.success", new Object[] { scoreboardobjective.getName(), s}); -+ } -+ } -+ } -+ -+ protected void n(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ String s = e(minecraftserver, icommandlistener, astring[i++]); -+ -+ if (s.length() > 40) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, Integer.valueOf(40)}); -+ } else { -+ ScoreboardObjective scoreboardobjective = this.a(astring[i++], false, minecraftserver); -+ -+ if (!scoreboard.b(s, scoreboardobjective)) { -+ throw new CommandException("commands.scoreboard.players.test.notFound", new Object[] { scoreboardobjective.getName(), s}); -+ } else { -+ int j = astring[i].equals("*") ? Integer.MIN_VALUE : a(astring[i]); -+ -+ ++i; -+ int k = i < astring.length && !astring[i].equals("*") ? a(astring[i], j) : Integer.MAX_VALUE; -+ ScoreboardScore scoreboardscore = scoreboard.getPlayerScoreForObjective(s, scoreboardobjective); -+ -+ if (scoreboardscore.getScore() >= j && scoreboardscore.getScore() <= k) { -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.players.test.success", new Object[] { Integer.valueOf(scoreboardscore.getScore()), Integer.valueOf(j), Integer.valueOf(k)}); -+ } else { -+ throw new CommandException("commands.scoreboard.players.test.failed", new Object[] { Integer.valueOf(scoreboardscore.getScore()), Integer.valueOf(j), Integer.valueOf(k)}); -+ } -+ } -+ } -+ } -+ -+ protected void o(ICommandListener icommandlistener, String[] astring, int i, MinecraftServer minecraftserver) throws CommandException { -+ Scoreboard scoreboard = this.a(minecraftserver); -+ String s = e(minecraftserver, icommandlistener, astring[i++]); -+ ScoreboardObjective scoreboardobjective = this.a(astring[i++], true, minecraftserver); -+ String s1 = astring[i++]; -+ String s2 = e(minecraftserver, icommandlistener, astring[i++]); -+ ScoreboardObjective scoreboardobjective1 = this.a(astring[i], false, minecraftserver); -+ -+ if (s.length() > 40) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, Integer.valueOf(40)}); -+ } else if (s2.length() > 40) { -+ throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s2, Integer.valueOf(40)}); -+ } else { -+ ScoreboardScore scoreboardscore = scoreboard.getPlayerScoreForObjective(s, scoreboardobjective); -+ -+ if (!scoreboard.b(s2, scoreboardobjective1)) { -+ throw new CommandException("commands.scoreboard.players.operation.notFound", new Object[] { scoreboardobjective1.getName(), s2}); -+ } else { -+ ScoreboardScore scoreboardscore1 = scoreboard.getPlayerScoreForObjective(s2, scoreboardobjective1); -+ -+ if (s1.equals("+=")) { -+ scoreboardscore.setScore(scoreboardscore.getScore() + scoreboardscore1.getScore()); -+ } else if (s1.equals("-=")) { -+ scoreboardscore.setScore(scoreboardscore.getScore() - scoreboardscore1.getScore()); -+ } else if (s1.equals("*=")) { -+ scoreboardscore.setScore(scoreboardscore.getScore() * scoreboardscore1.getScore()); -+ } else if (s1.equals("/=")) { -+ if (scoreboardscore1.getScore() != 0) { -+ scoreboardscore.setScore(scoreboardscore.getScore() / scoreboardscore1.getScore()); -+ } -+ } else if (s1.equals("%=")) { -+ if (scoreboardscore1.getScore() != 0) { -+ scoreboardscore.setScore(scoreboardscore.getScore() % scoreboardscore1.getScore()); -+ } -+ } else if (s1.equals("=")) { -+ scoreboardscore.setScore(scoreboardscore1.getScore()); -+ } else if (s1.equals("<")) { -+ scoreboardscore.setScore(Math.min(scoreboardscore.getScore(), scoreboardscore1.getScore())); -+ } else if (s1.equals(">")) { -+ scoreboardscore.setScore(Math.max(scoreboardscore.getScore(), scoreboardscore1.getScore())); -+ } else { -+ if (!s1.equals("><")) { -+ throw new CommandException("commands.scoreboard.players.operation.invalidOperation", new Object[] { s1}); -+ } -+ -+ int j = scoreboardscore.getScore(); -+ -+ scoreboardscore.setScore(scoreboardscore1.getScore()); -+ scoreboardscore1.setScore(j); -+ } -+ -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.players.operation.success", new Object[0]); -+ } -+ } -+ } -+ -+ protected void a(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring, int i) throws CommandException { -+ String s = e(minecraftserver, icommandlistener, astring[i]); -+ Entity entity = b(minecraftserver, icommandlistener, astring[i++]); -+ String s1 = astring[i++]; -+ Set set = entity.P(); -+ -+ if ("list".equals(s1)) { -+ if (!set.isEmpty()) { -+ ChatMessage chatmessage = new ChatMessage("commands.scoreboard.players.tag.list", new Object[] { s}); -+ -+ chatmessage.getChatModifier().setColor(EnumChatFormat.DARK_GREEN); -+ icommandlistener.sendMessage(chatmessage); -+ icommandlistener.sendMessage(new ChatComponentText(a(set.toArray()))); -+ } -+ -+ icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.QUERY_RESULT, set.size()); -+ } else if (astring.length < 5) { -+ throw new ExceptionUsage("commands.scoreboard.players.tag.usage", new Object[0]); -+ } else { -+ String s2 = astring[i++]; -+ -+ if (astring.length > i) { -+ try { -+ NBTTagCompound nbttagcompound = MojangsonParser.parse(a(astring, i)); -+ NBTTagCompound nbttagcompound1 = a(entity); -+ -+ if (!GameProfileSerializer.a(nbttagcompound, nbttagcompound1, true)) { -+ throw new CommandException("commands.scoreboard.players.tag.tagMismatch", new Object[] { s}); -+ } -+ } catch (MojangsonParseException mojangsonparseexception) { -+ throw new CommandException("commands.scoreboard.players.tag.tagError", new Object[] { mojangsonparseexception.getMessage()}); -+ } -+ } -+ -+ if ("add".equals(s1)) { -+ if (!entity.a(s2)) { -+ throw new CommandException("commands.scoreboard.players.tag.tooMany", new Object[] { Integer.valueOf(1024)}); -+ } -+ -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.players.tag.success.add", new Object[] { s2}); -+ } else { -+ if (!"remove".equals(s1)) { -+ throw new ExceptionUsage("commands.scoreboard.players.tag.usage", new Object[0]); -+ } -+ -+ if (!entity.b(s2)) { -+ throw new CommandException("commands.scoreboard.players.tag.notFound", new Object[] { s2}); -+ } -+ -+ a(icommandlistener, (ICommand) this, "commands.scoreboard.players.tag.success.remove", new Object[] { s2}); -+ } -+ -+ } -+ } -+ -+ public List tabComplete(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring, BlockPosition blockposition) { -+ if (astring.length == 1) { -+ return a(astring, new String[] { "objectives", "players", "teams"}); -+ } else { -+ if (astring[0].equalsIgnoreCase("objectives")) { -+ if (astring.length == 2) { -+ return a(astring, new String[] { "list", "add", "remove", "setdisplay"}); -+ } -+ -+ if (astring[1].equalsIgnoreCase("add")) { -+ if (astring.length == 4) { -+ Set set = IScoreboardCriteria.criteria.keySet(); -+ -+ return a(astring, (Collection) set); -+ } -+ } else if (astring[1].equalsIgnoreCase("remove")) { -+ if (astring.length == 3) { -+ return a(astring, (Collection) this.a(false, minecraftserver)); -+ } -+ } else if (astring[1].equalsIgnoreCase("setdisplay")) { -+ if (astring.length == 3) { -+ return a(astring, Scoreboard.h()); -+ } -+ -+ if (astring.length == 4) { -+ return a(astring, (Collection) this.a(false, minecraftserver)); -+ } -+ } -+ } else if (astring[0].equalsIgnoreCase("players")) { -+ if (astring.length == 2) { -+ return a(astring, new String[] { "set", "add", "remove", "reset", "list", "enable", "test", "operation", "tag"}); -+ } -+ -+ if (!astring[1].equalsIgnoreCase("set") && !astring[1].equalsIgnoreCase("add") && !astring[1].equalsIgnoreCase("remove") && !astring[1].equalsIgnoreCase("reset")) { -+ if (astring[1].equalsIgnoreCase("enable")) { -+ if (astring.length == 3) { -+ return a(astring, minecraftserver.getPlayers()); -+ } -+ -+ if (astring.length == 4) { -+ return a(astring, (Collection) this.b(minecraftserver)); -+ } -+ } else if (!astring[1].equalsIgnoreCase("list") && !astring[1].equalsIgnoreCase("test")) { -+ if (astring[1].equalsIgnoreCase("operation")) { -+ if (astring.length == 3) { -+ return a(astring, this.a(minecraftserver).getPlayers()); -+ } -+ -+ if (astring.length == 4) { -+ return a(astring, (Collection) this.a(true, minecraftserver)); -+ } -+ -+ if (astring.length == 5) { -+ return a(astring, new String[] { "+=", "-=", "*=", "/=", "%=", "=", "<", ">", "><"}); -+ } -+ -+ if (astring.length == 6) { -+ return a(astring, minecraftserver.getPlayers()); -+ } -+ -+ if (astring.length == 7) { -+ return a(astring, (Collection) this.a(false, minecraftserver)); -+ } -+ } else if (astring[1].equalsIgnoreCase("tag")) { -+ if (astring.length == 3) { -+ return a(astring, this.a(minecraftserver).getPlayers()); -+ } -+ -+ if (astring.length == 4) { -+ return a(astring, new String[] { "add", "remove", "list"}); -+ } -+ } -+ } else { -+ if (astring.length == 3) { -+ return a(astring, this.a(minecraftserver).getPlayers()); -+ } -+ -+ if (astring.length == 4 && astring[1].equalsIgnoreCase("test")) { -+ return a(astring, (Collection) this.a(false, minecraftserver)); -+ } -+ } -+ } else { -+ if (astring.length == 3) { -+ return a(astring, minecraftserver.getPlayers()); -+ } -+ -+ if (astring.length == 4) { -+ return a(astring, (Collection) this.a(true, minecraftserver)); -+ } -+ } -+ } else if (astring[0].equalsIgnoreCase("teams")) { -+ if (astring.length == 2) { -+ return a(astring, new String[] { "add", "remove", "join", "leave", "empty", "list", "option"}); -+ } -+ -+ if (astring[1].equalsIgnoreCase("join")) { -+ if (astring.length == 3) { -+ return a(astring, this.a(minecraftserver).getTeamNames()); -+ } -+ -+ if (astring.length >= 4) { -+ return a(astring, minecraftserver.getPlayers()); -+ } -+ } else { -+ if (astring[1].equalsIgnoreCase("leave")) { -+ return a(astring, minecraftserver.getPlayers()); -+ } -+ -+ if (!astring[1].equalsIgnoreCase("empty") && !astring[1].equalsIgnoreCase("list") && !astring[1].equalsIgnoreCase("remove")) { -+ if (astring[1].equalsIgnoreCase("option")) { -+ if (astring.length == 3) { -+ return a(astring, this.a(minecraftserver).getTeamNames()); -+ } -+ -+ if (astring.length == 4) { -+ return a(astring, new String[] { "color", "friendlyfire", "seeFriendlyInvisibles", "nametagVisibility", "deathMessageVisibility", "collisionRule"}); -+ } -+ -+ if (astring.length == 5) { -+ if (astring[3].equalsIgnoreCase("color")) { -+ return a(astring, EnumChatFormat.a(true, false)); -+ } -+ -+ if (astring[3].equalsIgnoreCase("nametagVisibility") || astring[3].equalsIgnoreCase("deathMessageVisibility")) { -+ return a(astring, ScoreboardTeamBase.EnumNameTagVisibility.a()); -+ } -+ -+ if (astring[3].equalsIgnoreCase("collisionRule")) { -+ return a(astring, ScoreboardTeamBase.EnumTeamPush.a()); -+ } -+ -+ if (astring[3].equalsIgnoreCase("friendlyfire") || astring[3].equalsIgnoreCase("seeFriendlyInvisibles")) { -+ return a(astring, new String[] { "true", "false"}); -+ } -+ } -+ } -+ } else if (astring.length == 3) { -+ return a(astring, this.a(minecraftserver).getTeamNames()); -+ } -+ } -+ } -+ -+ return Collections.emptyList(); -+ } -+ } -+ -+ protected List a(boolean flag, MinecraftServer minecraftserver) { -+ Collection collection = this.a(minecraftserver).getObjectives(); -+ ArrayList arraylist = Lists.newArrayList(); -+ Iterator iterator = collection.iterator(); -+ -+ while (iterator.hasNext()) { -+ ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next(); -+ -+ if (!flag || !scoreboardobjective.getCriteria().isReadOnly()) { -+ arraylist.add(scoreboardobjective.getName()); -+ } -+ } -+ -+ return arraylist; -+ } -+ -+ protected List b(MinecraftServer minecraftserver) { -+ Collection collection = this.a(minecraftserver).getObjectives(); -+ ArrayList arraylist = Lists.newArrayList(); -+ Iterator iterator = collection.iterator(); -+ -+ while (iterator.hasNext()) { -+ ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next(); -+ -+ if (scoreboardobjective.getCriteria() == IScoreboardCriteria.c) { -+ arraylist.add(scoreboardobjective.getName()); -+ } -+ } -+ -+ return arraylist; -+ } -+ -+ public boolean isListStart(String[] astring, int i) { -+ return !astring[0].equalsIgnoreCase("players") ? (astring[0].equalsIgnoreCase("teams") ? i == 2 : false) : (astring.length > 1 && astring[1].equalsIgnoreCase("operation") ? i == 2 || i == 5 : i == 2); -+ } -+} -diff --git a/src/main/java/net/minecraft/server/CommandWhitelist.java b/src/main/java/net/minecraft/server/CommandWhitelist.java -new file mode 100644 -index 0000000..fdc9210 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/CommandWhitelist.java -@@ -0,0 +1,98 @@ -+package net.minecraft.server; -+ -+import com.mojang.authlib.GameProfile; -+import java.util.Collections; -+import java.util.List; -+ -+public class CommandWhitelist extends CommandAbstract { -+ -+ public CommandWhitelist() {} -+ -+ public String getCommand() { -+ return "whitelist"; -+ } -+ -+ public int a() { -+ return 3; -+ } -+ -+ public String getUsage(ICommandListener icommandlistener) { -+ return "commands.whitelist.usage"; -+ } -+ -+ public void execute(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring) throws CommandException { -+ if (astring.length < 1) { -+ throw new ExceptionUsage("commands.whitelist.usage", new Object[0]); -+ } else { -+ if (astring[0].equals("on")) { -+ minecraftserver.getPlayerList().setHasWhitelist(true); -+ a(icommandlistener, (ICommand) this, "commands.whitelist.enabled", new Object[0]); -+ } else if (astring[0].equals("off")) { -+ minecraftserver.getPlayerList().setHasWhitelist(false); -+ a(icommandlistener, (ICommand) this, "commands.whitelist.disabled", new Object[0]); -+ } else if (astring[0].equals("list")) { -+ icommandlistener.sendMessage(new ChatMessage("commands.whitelist.list", new Object[] { Integer.valueOf(minecraftserver.getPlayerList().getWhitelisted().length), Integer.valueOf(minecraftserver.getPlayerList().getSeenPlayers().length)})); -+ String[] astring1 = minecraftserver.getPlayerList().getWhitelisted(); -+ -+ icommandlistener.sendMessage(new ChatComponentText(a((Object[]) astring1))); -+ } else { -+ GameProfile gameprofile; -+ -+ if (astring[0].equals("add")) { -+ if (astring.length < 2) { -+ throw new ExceptionUsage("commands.whitelist.add.usage", new Object[0]); -+ } -+ -+ gameprofile = minecraftserver.getUserCache().getProfile(astring[1]); -+ if (gameprofile == null) { -+ throw new CommandException("commands.whitelist.add.failed", new Object[] { astring[1]}); -+ } -+ -+ minecraftserver.getPlayerList().addWhitelist(gameprofile); -+ a(icommandlistener, (ICommand) this, "commands.whitelist.add.success", new Object[] { astring[1]}); -+ } else if (astring[0].equals("remove")) { -+ if (astring.length < 2) { -+ throw new ExceptionUsage("commands.whitelist.remove.usage", new Object[0]); -+ } -+ -+ gameprofile = minecraftserver.getPlayerList().getWhitelist().a(astring[1]); -+ if (gameprofile == null) { -+ throw new CommandException("commands.whitelist.remove.failed", new Object[] { astring[1]}); -+ } -+ -+ minecraftserver.getPlayerList().removeWhitelist(gameprofile); -+ a(icommandlistener, (ICommand) this, "commands.whitelist.remove.success", new Object[] { astring[1]}); -+ } else if (astring[0].equals("reload")) { -+ minecraftserver.getPlayerList().reloadWhitelist(); -+ a(icommandlistener, (ICommand) this, "commands.whitelist.reloaded", new Object[0]); -+ } -+ } -+ -+ } -+ } -+ -+ public List tabComplete(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring, BlockPosition blockposition) { -+ if (astring.length == 1) { -+ return a(astring, new String[] { "on", "off", "list", "add", "remove", "reload"}); -+ } else { -+ if (astring.length == 2) { -+ if (astring[0].equals("remove")) { -+ return a(astring, minecraftserver.getPlayerList().getWhitelisted()); -+ } -+ -+ if (astring[0].equals("add")) { -+ return a(astring, minecraftserver.getUserCache().a()); -+ } -+ } -+ -+ return Collections.emptyList(); -+ } -+ } -+ -+ // Paper start - Fix decompiler error -+ @Override -+ public int compareTo(ICommand o) { -+ return a((ICommand) o); -+ } -+ // Paper end -+} -diff --git a/src/main/java/net/minecraft/server/DataConverterMaterialId.java b/src/main/java/net/minecraft/server/DataConverterMaterialId.java -new file mode 100644 -index 0000000..87b82eb ---- /dev/null -+++ b/src/main/java/net/minecraft/server/DataConverterMaterialId.java -@@ -0,0 +1,342 @@ -+package net.minecraft.server; -+ -+public class DataConverterMaterialId implements IDataConverter { -+ -+ private static final String[] a = new String[2268]; -+ -+ public DataConverterMaterialId() {} -+ -+ public int a() { -+ return 102; -+ } -+ -+ public NBTTagCompound a(NBTTagCompound nbttagcompound) { -+ if (nbttagcompound.hasKeyOfType("id", 99)) { -+ short short0 = nbttagcompound.getShort("id"); -+ -+ if (short0 > 0 && short0 < DataConverterMaterialId.a.length && DataConverterMaterialId.a[short0] != null) { -+ nbttagcompound.setString("id", DataConverterMaterialId.a[short0]); -+ } -+ } -+ -+ return nbttagcompound; -+ } -+ -+ static { -+ DataConverterMaterialId.a[1] = "minecraft:stone"; -+ DataConverterMaterialId.a[2] = "minecraft:grass"; -+ DataConverterMaterialId.a[3] = "minecraft:dirt"; -+ DataConverterMaterialId.a[4] = "minecraft:cobblestone"; -+ DataConverterMaterialId.a[5] = "minecraft:planks"; -+ DataConverterMaterialId.a[6] = "minecraft:sapling"; -+ DataConverterMaterialId.a[7] = "minecraft:bedrock"; -+ DataConverterMaterialId.a[8] = "minecraft:flowing_water"; -+ DataConverterMaterialId.a[9] = "minecraft:water"; -+ DataConverterMaterialId.a[10] = "minecraft:flowing_lava"; -+ DataConverterMaterialId.a[11] = "minecraft:lava"; -+ DataConverterMaterialId.a[12] = "minecraft:sand"; -+ DataConverterMaterialId.a[13] = "minecraft:gravel"; -+ DataConverterMaterialId.a[14] = "minecraft:gold_ore"; -+ DataConverterMaterialId.a[15] = "minecraft:iron_ore"; -+ DataConverterMaterialId.a[16] = "minecraft:coal_ore"; -+ DataConverterMaterialId.a[17] = "minecraft:log"; -+ DataConverterMaterialId.a[18] = "minecraft:leaves"; -+ DataConverterMaterialId.a[19] = "minecraft:sponge"; -+ DataConverterMaterialId.a[20] = "minecraft:glass"; -+ DataConverterMaterialId.a[21] = "minecraft:lapis_ore"; -+ DataConverterMaterialId.a[22] = "minecraft:lapis_block"; -+ DataConverterMaterialId.a[23] = "minecraft:dispenser"; -+ DataConverterMaterialId.a[24] = "minecraft:sandstone"; -+ DataConverterMaterialId.a[25] = "minecraft:noteblock"; -+ DataConverterMaterialId.a[27] = "minecraft:golden_rail"; -+ DataConverterMaterialId.a[28] = "minecraft:detector_rail"; -+ DataConverterMaterialId.a[29] = "minecraft:sticky_piston"; -+ DataConverterMaterialId.a[30] = "minecraft:web"; -+ DataConverterMaterialId.a[31] = "minecraft:tallgrass"; -+ DataConverterMaterialId.a[32] = "minecraft:deadbush"; -+ DataConverterMaterialId.a[33] = "minecraft:piston"; -+ DataConverterMaterialId.a[35] = "minecraft:wool"; -+ DataConverterMaterialId.a[37] = "minecraft:yellow_flower"; -+ DataConverterMaterialId.a[38] = "minecraft:red_flower"; -+ DataConverterMaterialId.a[39] = "minecraft:brown_mushroom"; -+ DataConverterMaterialId.a[40] = "minecraft:red_mushroom"; -+ DataConverterMaterialId.a[41] = "minecraft:gold_block"; -+ DataConverterMaterialId.a[42] = "minecraft:iron_block"; -+ DataConverterMaterialId.a[43] = "minecraft:double_stone_slab"; -+ DataConverterMaterialId.a[44] = "minecraft:stone_slab"; -+ DataConverterMaterialId.a[45] = "minecraft:brick_block"; -+ DataConverterMaterialId.a[46] = "minecraft:tnt"; -+ DataConverterMaterialId.a[47] = "minecraft:bookshelf"; -+ DataConverterMaterialId.a[48] = "minecraft:mossy_cobblestone"; -+ DataConverterMaterialId.a[49] = "minecraft:obsidian"; -+ DataConverterMaterialId.a[50] = "minecraft:torch"; -+ DataConverterMaterialId.a[51] = "minecraft:fire"; -+ DataConverterMaterialId.a[52] = "minecraft:mob_spawner"; -+ DataConverterMaterialId.a[53] = "minecraft:oak_stairs"; -+ DataConverterMaterialId.a[54] = "minecraft:chest"; -+ DataConverterMaterialId.a[56] = "minecraft:diamond_ore"; -+ DataConverterMaterialId.a[57] = "minecraft:diamond_block"; -+ DataConverterMaterialId.a[58] = "minecraft:crafting_table"; -+ DataConverterMaterialId.a[60] = "minecraft:farmland"; -+ DataConverterMaterialId.a[61] = "minecraft:furnace"; -+ DataConverterMaterialId.a[62] = "minecraft:lit_furnace"; -+ DataConverterMaterialId.a[65] = "minecraft:ladder"; -+ DataConverterMaterialId.a[66] = "minecraft:rail"; -+ DataConverterMaterialId.a[67] = "minecraft:stone_stairs"; -+ DataConverterMaterialId.a[69] = "minecraft:lever"; -+ DataConverterMaterialId.a[70] = "minecraft:stone_pressure_plate"; -+ DataConverterMaterialId.a[72] = "minecraft:wooden_pressure_plate"; -+ DataConverterMaterialId.a[73] = "minecraft:redstone_ore"; -+ DataConverterMaterialId.a[76] = "minecraft:redstone_torch"; -+ DataConverterMaterialId.a[77] = "minecraft:stone_button"; -+ DataConverterMaterialId.a[78] = "minecraft:snow_layer"; -+ DataConverterMaterialId.a[79] = "minecraft:ice"; -+ DataConverterMaterialId.a[80] = "minecraft:snow"; -+ DataConverterMaterialId.a[81] = "minecraft:cactus"; -+ DataConverterMaterialId.a[82] = "minecraft:clay"; -+ DataConverterMaterialId.a[84] = "minecraft:jukebox"; -+ DataConverterMaterialId.a[85] = "minecraft:fence"; -+ DataConverterMaterialId.a[86] = "minecraft:pumpkin"; -+ DataConverterMaterialId.a[87] = "minecraft:netherrack"; -+ DataConverterMaterialId.a[88] = "minecraft:soul_sand"; -+ DataConverterMaterialId.a[89] = "minecraft:glowstone"; -+ DataConverterMaterialId.a[90] = "minecraft:portal"; -+ DataConverterMaterialId.a[91] = "minecraft:lit_pumpkin"; -+ DataConverterMaterialId.a[95] = "minecraft:stained_glass"; -+ DataConverterMaterialId.a[96] = "minecraft:trapdoor"; -+ DataConverterMaterialId.a[97] = "minecraft:monster_egg"; -+ DataConverterMaterialId.a[98] = "minecraft:stonebrick"; -+ DataConverterMaterialId.a[99] = "minecraft:brown_mushroom_block"; -+ DataConverterMaterialId.a[100] = "minecraft:red_mushroom_block"; -+ DataConverterMaterialId.a[101] = "minecraft:iron_bars"; -+ DataConverterMaterialId.a[102] = "minecraft:glass_pane"; -+ DataConverterMaterialId.a[103] = "minecraft:melon_block"; -+ DataConverterMaterialId.a[106] = "minecraft:vine"; -+ DataConverterMaterialId.a[107] = "minecraft:fence_gate"; -+ DataConverterMaterialId.a[108] = "minecraft:brick_stairs"; -+ DataConverterMaterialId.a[109] = "minecraft:stone_brick_stairs"; -+ DataConverterMaterialId.a[110] = "minecraft:mycelium"; -+ DataConverterMaterialId.a[111] = "minecraft:waterlily"; -+ DataConverterMaterialId.a[112] = "minecraft:nether_brick"; -+ DataConverterMaterialId.a[113] = "minecraft:nether_brick_fence"; -+ DataConverterMaterialId.a[114] = "minecraft:nether_brick_stairs"; -+ DataConverterMaterialId.a[116] = "minecraft:enchanting_table"; -+ DataConverterMaterialId.a[119] = "minecraft:end_portal"; -+ DataConverterMaterialId.a[120] = "minecraft:end_portal_frame"; -+ DataConverterMaterialId.a[121] = "minecraft:end_stone"; -+ DataConverterMaterialId.a[122] = "minecraft:dragon_egg"; -+ DataConverterMaterialId.a[123] = "minecraft:redstone_lamp"; -+ DataConverterMaterialId.a[125] = "minecraft:double_wooden_slab"; -+ DataConverterMaterialId.a[126] = "minecraft:wooden_slab"; -+ DataConverterMaterialId.a[127] = "minecraft:cocoa"; -+ DataConverterMaterialId.a[128] = "minecraft:sandstone_stairs"; -+ DataConverterMaterialId.a[129] = "minecraft:emerald_ore"; -+ DataConverterMaterialId.a[130] = "minecraft:ender_chest"; -+ DataConverterMaterialId.a[131] = "minecraft:tripwire_hook"; -+ DataConverterMaterialId.a[133] = "minecraft:emerald_block"; -+ DataConverterMaterialId.a[134] = "minecraft:spruce_stairs"; -+ DataConverterMaterialId.a[135] = "minecraft:birch_stairs"; -+ DataConverterMaterialId.a[136] = "minecraft:jungle_stairs"; -+ DataConverterMaterialId.a[137] = "minecraft:command_block"; -+ DataConverterMaterialId.a[138] = "minecraft:beacon"; -+ DataConverterMaterialId.a[139] = "minecraft:cobblestone_wall"; -+ DataConverterMaterialId.a[141] = "minecraft:carrots"; -+ DataConverterMaterialId.a[142] = "minecraft:potatoes"; -+ DataConverterMaterialId.a[143] = "minecraft:wooden_button"; -+ DataConverterMaterialId.a[145] = "minecraft:anvil"; -+ DataConverterMaterialId.a[146] = "minecraft:trapped_chest"; -+ DataConverterMaterialId.a[147] = "minecraft:light_weighted_pressure_plate"; -+ DataConverterMaterialId.a[148] = "minecraft:heavy_weighted_pressure_plate"; -+ DataConverterMaterialId.a[151] = "minecraft:daylight_detector"; -+ DataConverterMaterialId.a[152] = "minecraft:redstone_block"; -+ DataConverterMaterialId.a[153] = "minecraft:quartz_ore"; -+ DataConverterMaterialId.a[154] = "minecraft:hopper"; -+ DataConverterMaterialId.a[155] = "minecraft:quartz_block"; -+ DataConverterMaterialId.a[156] = "minecraft:quartz_stairs"; -+ DataConverterMaterialId.a[157] = "minecraft:activator_rail"; -+ DataConverterMaterialId.a[158] = "minecraft:dropper"; -+ DataConverterMaterialId.a[159] = "minecraft:stained_hardened_clay"; -+ DataConverterMaterialId.a[160] = "minecraft:stained_glass_pane"; -+ DataConverterMaterialId.a[161] = "minecraft:leaves2"; -+ DataConverterMaterialId.a[162] = "minecraft:log2"; -+ DataConverterMaterialId.a[163] = "minecraft:acacia_stairs"; -+ DataConverterMaterialId.a[164] = "minecraft:dark_oak_stairs"; -+ DataConverterMaterialId.a[170] = "minecraft:hay_block"; -+ DataConverterMaterialId.a[171] = "minecraft:carpet"; -+ DataConverterMaterialId.a[172] = "minecraft:hardened_clay"; -+ DataConverterMaterialId.a[173] = "minecraft:coal_block"; -+ DataConverterMaterialId.a[174] = "minecraft:packed_ice"; -+ DataConverterMaterialId.a[175] = "minecraft:double_plant"; -+ DataConverterMaterialId.a[256] = "minecraft:iron_shovel"; -+ DataConverterMaterialId.a[257] = "minecraft:iron_pickaxe"; -+ DataConverterMaterialId.a[258] = "minecraft:iron_axe"; -+ DataConverterMaterialId.a[259] = "minecraft:flint_and_steel"; -+ DataConverterMaterialId.a[260] = "minecraft:apple"; -+ DataConverterMaterialId.a[261] = "minecraft:bow"; -+ DataConverterMaterialId.a[262] = "minecraft:arrow"; -+ DataConverterMaterialId.a[263] = "minecraft:coal"; -+ DataConverterMaterialId.a[264] = "minecraft:diamond"; -+ DataConverterMaterialId.a[265] = "minecraft:iron_ingot"; -+ DataConverterMaterialId.a[266] = "minecraft:gold_ingot"; -+ DataConverterMaterialId.a[267] = "minecraft:iron_sword"; -+ DataConverterMaterialId.a[268] = "minecraft:wooden_sword"; -+ DataConverterMaterialId.a[269] = "minecraft:wooden_shovel"; -+ DataConverterMaterialId.a[270] = "minecraft:wooden_pickaxe"; -+ DataConverterMaterialId.a[271] = "minecraft:wooden_axe"; -+ DataConverterMaterialId.a[272] = "minecraft:stone_sword"; -+ DataConverterMaterialId.a[273] = "minecraft:stone_shovel"; -+ DataConverterMaterialId.a[274] = "minecraft:stone_pickaxe"; -+ DataConverterMaterialId.a[275] = "minecraft:stone_axe"; -+ DataConverterMaterialId.a[276] = "minecraft:diamond_sword"; -+ DataConverterMaterialId.a[277] = "minecraft:diamond_shovel"; -+ DataConverterMaterialId.a[278] = "minecraft:diamond_pickaxe"; -+ DataConverterMaterialId.a[279] = "minecraft:diamond_axe"; -+ DataConverterMaterialId.a[280] = "minecraft:stick"; -+ DataConverterMaterialId.a[281] = "minecraft:bowl"; -+ DataConverterMaterialId.a[282] = "minecraft:mushroom_stew"; -+ DataConverterMaterialId.a[283] = "minecraft:golden_sword"; -+ DataConverterMaterialId.a[284] = "minecraft:golden_shovel"; -+ DataConverterMaterialId.a[285] = "minecraft:golden_pickaxe"; -+ DataConverterMaterialId.a[286] = "minecraft:golden_axe"; -+ DataConverterMaterialId.a[287] = "minecraft:string"; -+ DataConverterMaterialId.a[288] = "minecraft:feather"; -+ DataConverterMaterialId.a[289] = "minecraft:gunpowder"; -+ DataConverterMaterialId.a[290] = "minecraft:wooden_hoe"; -+ DataConverterMaterialId.a[291] = "minecraft:stone_hoe"; -+ DataConverterMaterialId.a[292] = "minecraft:iron_hoe"; -+ DataConverterMaterialId.a[293] = "minecraft:diamond_hoe"; -+ DataConverterMaterialId.a[294] = "minecraft:golden_hoe"; -+ DataConverterMaterialId.a[295] = "minecraft:wheat_seeds"; -+ DataConverterMaterialId.a[296] = "minecraft:wheat"; -+ DataConverterMaterialId.a[297] = "minecraft:bread"; -+ DataConverterMaterialId.a[298] = "minecraft:leather_helmet"; -+ DataConverterMaterialId.a[299] = "minecraft:leather_chestplate"; -+ DataConverterMaterialId.a[300] = "minecraft:leather_leggings"; -+ DataConverterMaterialId.a[301] = "minecraft:leather_boots"; -+ DataConverterMaterialId.a[302] = "minecraft:chainmail_helmet"; -+ DataConverterMaterialId.a[303] = "minecraft:chainmail_chestplate"; -+ DataConverterMaterialId.a[304] = "minecraft:chainmail_leggings"; -+ DataConverterMaterialId.a[305] = "minecraft:chainmail_boots"; -+ DataConverterMaterialId.a[306] = "minecraft:iron_helmet"; -+ DataConverterMaterialId.a[307] = "minecraft:iron_chestplate"; -+ DataConverterMaterialId.a[308] = "minecraft:iron_leggings"; -+ DataConverterMaterialId.a[309] = "minecraft:iron_boots"; -+ DataConverterMaterialId.a[310] = "minecraft:diamond_helmet"; -+ DataConverterMaterialId.a[311] = "minecraft:diamond_chestplate"; -+ DataConverterMaterialId.a[312] = "minecraft:diamond_leggings"; -+ DataConverterMaterialId.a[313] = "minecraft:diamond_boots"; -+ DataConverterMaterialId.a[314] = "minecraft:golden_helmet"; -+ DataConverterMaterialId.a[315] = "minecraft:golden_chestplate"; -+ DataConverterMaterialId.a[316] = "minecraft:golden_leggings"; -+ DataConverterMaterialId.a[317] = "minecraft:golden_boots"; -+ DataConverterMaterialId.a[318] = "minecraft:flint"; -+ DataConverterMaterialId.a[319] = "minecraft:porkchop"; -+ DataConverterMaterialId.a[320] = "minecraft:cooked_porkchop"; -+ DataConverterMaterialId.a[321] = "minecraft:painting"; -+ DataConverterMaterialId.a[322] = "minecraft:golden_apple"; -+ DataConverterMaterialId.a[323] = "minecraft:sign"; -+ DataConverterMaterialId.a[324] = "minecraft:wooden_door"; -+ DataConverterMaterialId.a[325] = "minecraft:bucket"; -+ DataConverterMaterialId.a[326] = "minecraft:water_bucket"; -+ DataConverterMaterialId.a[327] = "minecraft:lava_bucket"; -+ DataConverterMaterialId.a[328] = "minecraft:minecart"; -+ DataConverterMaterialId.a[329] = "minecraft:saddle"; -+ DataConverterMaterialId.a[330] = "minecraft:iron_door"; -+ DataConverterMaterialId.a[331] = "minecraft:redstone"; -+ DataConverterMaterialId.a[332] = "minecraft:snowball"; -+ DataConverterMaterialId.a[333] = "minecraft:boat"; -+ DataConverterMaterialId.a[334] = "minecraft:leather"; -+ DataConverterMaterialId.a[335] = "minecraft:milk_bucket"; -+ DataConverterMaterialId.a[336] = "minecraft:brick"; -+ DataConverterMaterialId.a[337] = "minecraft:clay_ball"; -+ DataConverterMaterialId.a[338] = "minecraft:reeds"; -+ DataConverterMaterialId.a[339] = "minecraft:paper"; -+ DataConverterMaterialId.a[340] = "minecraft:book"; -+ DataConverterMaterialId.a[341] = "minecraft:slime_ball"; -+ DataConverterMaterialId.a[342] = "minecraft:chest_minecart"; -+ DataConverterMaterialId.a[343] = "minecraft:furnace_minecart"; -+ DataConverterMaterialId.a[344] = "minecraft:egg"; -+ DataConverterMaterialId.a[345] = "minecraft:compass"; -+ DataConverterMaterialId.a[346] = "minecraft:fishing_rod"; -+ DataConverterMaterialId.a[347] = "minecraft:clock"; -+ DataConverterMaterialId.a[348] = "minecraft:glowstone_dust"; -+ DataConverterMaterialId.a[349] = "minecraft:fish"; -+ DataConverterMaterialId.a[350] = "minecraft:cooked_fished"; -+ DataConverterMaterialId.a[351] = "minecraft:dye"; -+ DataConverterMaterialId.a[352] = "minecraft:bone"; -+ DataConverterMaterialId.a[353] = "minecraft:sugar"; -+ DataConverterMaterialId.a[354] = "minecraft:cake"; -+ DataConverterMaterialId.a[355] = "minecraft:bed"; -+ DataConverterMaterialId.a[356] = "minecraft:repeater"; -+ DataConverterMaterialId.a[357] = "minecraft:cookie"; -+ DataConverterMaterialId.a[358] = "minecraft:filled_map"; -+ DataConverterMaterialId.a[359] = "minecraft:shears"; -+ DataConverterMaterialId.a[360] = "minecraft:melon"; -+ DataConverterMaterialId.a[361] = "minecraft:pumpkin_seeds"; -+ DataConverterMaterialId.a[362] = "minecraft:melon_seeds"; -+ DataConverterMaterialId.a[363] = "minecraft:beef"; -+ DataConverterMaterialId.a[364] = "minecraft:cooked_beef"; -+ DataConverterMaterialId.a[365] = "minecraft:chicken"; -+ DataConverterMaterialId.a[366] = "minecraft:cooked_chicken"; -+ DataConverterMaterialId.a[367] = "minecraft:rotten_flesh"; -+ DataConverterMaterialId.a[368] = "minecraft:ender_pearl"; -+ DataConverterMaterialId.a[369] = "minecraft:blaze_rod"; -+ DataConverterMaterialId.a[370] = "minecraft:ghast_tear"; -+ DataConverterMaterialId.a[371] = "minecraft:gold_nugget"; -+ DataConverterMaterialId.a[372] = "minecraft:nether_wart"; -+ DataConverterMaterialId.a[373] = "minecraft:potion"; -+ DataConverterMaterialId.a[374] = "minecraft:glass_bottle"; -+ DataConverterMaterialId.a[375] = "minecraft:spider_eye"; -+ DataConverterMaterialId.a[376] = "minecraft:fermented_spider_eye"; -+ DataConverterMaterialId.a[377] = "minecraft:blaze_powder"; -+ DataConverterMaterialId.a[378] = "minecraft:magma_cream"; -+ DataConverterMaterialId.a[379] = "minecraft:brewing_stand"; -+ DataConverterMaterialId.a[380] = "minecraft:cauldron"; -+ DataConverterMaterialId.a[381] = "minecraft:ender_eye"; -+ DataConverterMaterialId.a[382] = "minecraft:speckled_melon"; -+ DataConverterMaterialId.a[383] = "minecraft:spawn_egg"; -+ DataConverterMaterialId.a[384] = "minecraft:experience_bottle"; -+ DataConverterMaterialId.a[385] = "minecraft:fire_charge"; -+ DataConverterMaterialId.a[386] = "minecraft:writable_book"; -+ DataConverterMaterialId.a[387] = "minecraft:written_book"; -+ DataConverterMaterialId.a[388] = "minecraft:emerald"; -+ DataConverterMaterialId.a[389] = "minecraft:item_frame"; -+ DataConverterMaterialId.a[390] = "minecraft:flower_pot"; -+ DataConverterMaterialId.a[391] = "minecraft:carrot"; -+ DataConverterMaterialId.a[392] = "minecraft:potato"; -+ DataConverterMaterialId.a[393] = "minecraft:baked_potato"; -+ DataConverterMaterialId.a[394] = "minecraft:poisonous_potato"; -+ DataConverterMaterialId.a[395] = "minecraft:map"; -+ DataConverterMaterialId.a[396] = "minecraft:golden_carrot"; -+ DataConverterMaterialId.a[397] = "minecraft:skull"; -+ DataConverterMaterialId.a[398] = "minecraft:carrot_on_a_stick"; -+ DataConverterMaterialId.a[399] = "minecraft:nether_star"; -+ DataConverterMaterialId.a[400] = "minecraft:pumpkin_pie"; -+ DataConverterMaterialId.a[401] = "minecraft:fireworks"; -+ DataConverterMaterialId.a[402] = "minecraft:firework_charge"; -+ DataConverterMaterialId.a[403] = "minecraft:enchanted_book"; -+ DataConverterMaterialId.a[404] = "minecraft:comparator"; -+ DataConverterMaterialId.a[405] = "minecraft:netherbrick"; -+ DataConverterMaterialId.a[406] = "minecraft:quartz"; -+ DataConverterMaterialId.a[407] = "minecraft:tnt_minecart"; -+ DataConverterMaterialId.a[408] = "minecraft:hopper_minecart"; -+ DataConverterMaterialId.a[417] = "minecraft:iron_horse_armor"; -+ DataConverterMaterialId.a[418] = "minecraft:golden_horse_armor"; -+ DataConverterMaterialId.a[419] = "minecraft:diamond_horse_armor"; -+ DataConverterMaterialId.a[420] = "minecraft:lead"; -+ DataConverterMaterialId.a[421] = "minecraft:name_tag"; -+ DataConverterMaterialId.a[422] = "minecraft:command_block_minecart"; -+ DataConverterMaterialId.a[2256] = "minecraft:record_13"; -+ DataConverterMaterialId.a[2257] = "minecraft:record_cat"; -+ DataConverterMaterialId.a[2258] = "minecraft:record_blocks"; -+ DataConverterMaterialId.a[2259] = "minecraft:record_chirp"; -+ DataConverterMaterialId.a[2260] = "minecraft:record_far"; -+ DataConverterMaterialId.a[2261] = "minecraft:record_mall"; -+ DataConverterMaterialId.a[2262] = "minecraft:record_mellohi"; -+ DataConverterMaterialId.a[2263] = "minecraft:record_stal"; -+ DataConverterMaterialId.a[2264] = "minecraft:record_strad"; -+ DataConverterMaterialId.a[2265] = "minecraft:record_ward"; -+ DataConverterMaterialId.a[2266] = "minecraft:record_11"; -+ DataConverterMaterialId.a[2267] = "minecraft:record_wait"; -+ } -+} -diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -new file mode 100644 -index 0000000..c872029 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/EULA.java -@@ -0,0 +1,62 @@ -+package net.minecraft.server; -+ -+import java.io.File; -+import java.io.FileInputStream; -+import java.io.FileOutputStream; -+import java.util.Properties; -+import org.apache.commons.io.IOUtils; -+import org.apache.logging.log4j.LogManager; -+import org.apache.logging.log4j.Logger; -+ -+public class EULA { -+ -+ private static final Logger a = LogManager.getLogger(); -+ private final File b; -+ private final boolean c; -+ -+ public EULA(File file) { -+ this.b = file; -+ this.c = this.a(file); -+ } -+ -+ private boolean a(File file) { -+ FileInputStream fileinputstream = null; -+ boolean flag = false; -+ -+ try { -+ Properties properties = new Properties(); -+ -+ fileinputstream = new FileInputStream(file); -+ properties.load(fileinputstream); -+ flag = Boolean.parseBoolean(properties.getProperty("eula", "false")); -+ } catch (Exception exception) { -+ EULA.a.warn("Failed to load " + file); -+ this.b(); -+ } finally { -+ IOUtils.closeQuietly(fileinputstream); -+ } -+ -+ return flag; -+ } -+ -+ public boolean a() { -+ return this.c; -+ } -+ -+ public void b() { -+ FileOutputStream fileoutputstream = null; -+ -+ try { -+ Properties properties = new Properties(); -+ -+ fileoutputstream = new FileOutputStream(this.b); -+ properties.setProperty("eula", "false"); -+ properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)."); -+ } catch (Exception exception) { -+ EULA.a.warn("Failed to save " + this.b, exception); -+ } finally { -+ IOUtils.closeQuietly(fileoutputstream); -+ } -+ -+ } -+} -diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -new file mode 100644 -index 0000000..b94444d ---- /dev/null -+++ b/src/main/java/net/minecraft/server/EntitySquid.java -@@ -0,0 +1,182 @@ -+package net.minecraft.server; -+ -+public class EntitySquid extends EntityWaterAnimal { -+ -+ public float a; -+ public float b; -+ public float c; -+ public float bt; -+ public float bu; -+ public float bv; -+ public float bw; -+ public float bx; -+ private float by; -+ private float bz; -+ private float bA; -+ private float bB; -+ private float bC; -+ private float bD; -+ -+ public EntitySquid(World world) { -+ super(world); -+ this.setSize(0.8F, 0.8F); -+ this.random.setSeed((long) (1 + this.getId())); -+ this.bz = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; -+ } -+ -+ protected void r() { -+ this.goalSelector.a(0, new PathfinderGoalSquid(this)); -+ } -+ -+ protected void initAttributes() { -+ super.initAttributes(); -+ this.getAttributeInstance(GenericAttributes.maxHealth).setValue(10.0D); -+ } -+ -+ public float getHeadHeight() { -+ return this.length * 0.5F; -+ } -+ -+ protected SoundEffect G() { -+ return SoundEffects.fW; -+ } -+ -+ protected SoundEffect bR() { -+ return SoundEffects.fY; -+ } -+ -+ protected SoundEffect bS() { -+ return SoundEffects.fX; -+ } -+ -+ protected float cd() { -+ return 0.4F; -+ } -+ -+ protected boolean playStepSound() { -+ return false; -+ } -+ -+ protected MinecraftKey J() { -+ return LootTables.af; -+ } -+ -+ public boolean isInWater() { -+ return super.isInWater(); -+ } -+ -+ public void n() { -+ super.n(); -+ this.b = this.a; -+ this.bt = this.c; -+ this.bv = this.bu; -+ this.bx = this.bw; -+ this.bu += this.bz; -+ if ((double) this.bu > 6.283185307179586D) { -+ if (this.world.isClientSide) { -+ this.bu = 6.2831855F; -+ } else { -+ this.bu = (float) ((double) this.bu - 6.283185307179586D); -+ if (this.random.nextInt(10) == 0) { -+ this.bz = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; -+ } -+ -+ this.world.broadcastEntityEffect(this, (byte) 19); -+ } -+ } -+ -+ if (this.inWater) { -+ float f; -+ -+ if (this.bu < 3.1415927F) { -+ f = this.bu / 3.1415927F; -+ this.bw = MathHelper.sin(f * f * 3.1415927F) * 3.1415927F * 0.25F; -+ if ((double) f > 0.75D) { -+ this.by = 1.0F; -+ this.bA = 1.0F; -+ } else { -+ this.bA *= 0.8F; -+ } -+ } else { -+ this.bw = 0.0F; -+ this.by *= 0.9F; -+ this.bA *= 0.99F; -+ } -+ -+ if (!this.world.isClientSide) { -+ this.motX = (double) (this.bB * this.by); -+ this.motY = (double) (this.bC * this.by); -+ this.motZ = (double) (this.bD * this.by); -+ } -+ -+ f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ); -+ this.aM += (-((float) MathHelper.b(this.motX, this.motZ)) * 57.295776F - this.aM) * 0.1F; -+ this.yaw = this.aM; -+ this.c = (float) ((double) this.c + 3.141592653589793D * (double) this.bA * 1.5D); -+ this.a += (-((float) MathHelper.b((double) f, this.motY)) * 57.295776F - this.a) * 0.1F; -+ } else { -+ this.bw = MathHelper.e(MathHelper.sin(this.bu)) * 3.1415927F * 0.25F; -+ if (!this.world.isClientSide) { -+ this.motX = 0.0D; -+ this.motZ = 0.0D; -+ if (this.hasEffect(MobEffects.LEVITATION)) { -+ this.motY += 0.05D * (double) (this.getEffect(MobEffects.LEVITATION).getAmplifier() + 1) - this.motY; -+ } else { -+ this.motY -= 0.08D; -+ } -+ -+ this.motY *= 0.9800000190734863D; -+ } -+ -+ this.a = (float) ((double) this.a + (double) (-90.0F - this.a) * 0.02D); -+ } -+ -+ } -+ -+ public void g(float f, float f1) { -+ this.move(this.motX, this.motY, this.motZ); -+ } -+ -+ public boolean cF() { -+ return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cF(); -+ } -+ -+ public void b(float f, float f1, float f2) { -+ this.bB = f; -+ this.bC = f1; -+ this.bD = f2; -+ } -+ -+ public boolean o() { -+ return this.bB != 0.0F || this.bC != 0.0F || this.bD != 0.0F; -+ } -+ -+ static class PathfinderGoalSquid extends PathfinderGoal { -+ -+ private EntitySquid a; -+ -+ public PathfinderGoalSquid(EntitySquid entitysquid) { -+ this.a = entitysquid; -+ } -+ -+ public boolean a() { -+ return true; -+ } -+ -+ public void e() { -+ int i = this.a.bK(); -+ -+ if (i > 100) { -+ this.a.b(0.0F, 0.0F, 0.0F); -+ } else if (this.a.getRandom().nextInt(50) == 0 || !this.a.inWater || !this.a.o()) { -+ float f = this.a.getRandom().nextFloat() * 6.2831855F; -+ float f1 = MathHelper.cos(f) * 0.2F; -+ float f2 = -0.1F + this.a.getRandom().nextFloat() * 0.2F; -+ float f3 = MathHelper.sin(f) * 0.2F; -+ -+ this.a.b(f1, f2, f3); -+ } -+ -+ } -+ } -+} -diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java -new file mode 100644 -index 0000000..4733f94 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/FileIOThread.java -@@ -0,0 +1,75 @@ -+package net.minecraft.server; -+ -+import com.google.common.collect.Lists; -+import java.util.Collections; -+import java.util.List; -+ -+public class FileIOThread implements Runnable { -+ -+ private static final FileIOThread a = new FileIOThread(); -+ private List b = Collections.synchronizedList(Lists.newArrayList()); -+ private volatile long c; -+ private volatile long d; -+ private volatile boolean e; -+ -+ private FileIOThread() { -+ Thread thread = new Thread(this, "File IO Thread"); -+ -+ thread.setPriority(1); -+ thread.start(); -+ } -+ -+ public static FileIOThread a() { -+ return FileIOThread.a; -+ } -+ -+ public void run() { -+ while (true) { -+ this.c(); -+ } -+ } -+ -+ private void c() { -+ for (int i = 0; i < this.b.size(); ++i) { -+ IAsyncChunkSaver iasyncchunksaver = (IAsyncChunkSaver) this.b.get(i); -+ boolean flag = iasyncchunksaver.c(); -+ -+ if (!flag) { -+ this.b.remove(i--); -+ ++this.d; -+ } -+ -+ try { -+ Thread.sleep(this.e ? 0L : 10L); -+ } catch (InterruptedException interruptedexception) { -+ interruptedexception.printStackTrace(); -+ } -+ } -+ -+ if (this.b.isEmpty()) { -+ try { -+ Thread.sleep(25L); -+ } catch (InterruptedException interruptedexception1) { -+ interruptedexception1.printStackTrace(); -+ } -+ } -+ -+ } -+ -+ public void a(IAsyncChunkSaver iasyncchunksaver) { -+ if (!this.b.contains(iasyncchunksaver)) { -+ ++this.c; -+ this.b.add(iasyncchunksaver); -+ } -+ } -+ -+ public void b() throws InterruptedException { -+ this.e = true; -+ -+ while (this.c != this.d) { -+ Thread.sleep(10L); -+ } -+ -+ this.e = false; -+ } -+} -diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java -new file mode 100644 -index 0000000..300573a ---- /dev/null -+++ b/src/main/java/net/minecraft/server/ItemBlock.java -@@ -0,0 +1,98 @@ -+package net.minecraft.server; -+ -+public class ItemBlock extends Item { -+ -+ protected final Block a; -+ -+ public ItemBlock(Block block) { -+ this.a = block; -+ } -+ -+ public ItemBlock b(String s) { -+ super.c(s); -+ return this; -+ } -+ -+ public EnumInteractionResult a(ItemStack itemstack, EntityHuman entityhuman, World world, BlockPosition blockposition, EnumHand enumhand, EnumDirection enumdirection, float f, float f1, float f2) { -+ IBlockData iblockdata = world.getType(blockposition); -+ Block block = iblockdata.getBlock(); -+ -+ if (!block.a((IBlockAccess) world, blockposition)) { -+ blockposition = blockposition.shift(enumdirection); -+ } -+ -+ if (itemstack.count != 0 && entityhuman.a(blockposition, enumdirection, itemstack) && world.a(this.a, blockposition, false, enumdirection, (Entity) null, itemstack)) { -+ int i = this.filterData(itemstack.getData()); -+ IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman); -+ -+ if (world.setTypeAndData(blockposition, iblockdata1, 11)) { -+ iblockdata1 = world.getType(blockposition); -+ if (iblockdata1.getBlock() == this.a) { -+ a(world, entityhuman, blockposition, itemstack); -+ this.a.postPlace(world, blockposition, iblockdata1, entityhuman, itemstack); -+ } -+ -+ SoundEffectType soundeffecttype = this.a.w(); -+ -+ world.a(entityhuman, blockposition, soundeffecttype.e(), SoundCategory.BLOCKS, (soundeffecttype.a() + 1.0F) / 2.0F, soundeffecttype.b() * 0.8F); -+ --itemstack.count; -+ } -+ -+ return EnumInteractionResult.SUCCESS; -+ } else { -+ return EnumInteractionResult.FAIL; -+ } -+ } -+ -+ public static boolean a(World world, EntityHuman entityhuman, BlockPosition blockposition, ItemStack itemstack) { -+ MinecraftServer minecraftserver = world.getMinecraftServer(); -+ -+ if (minecraftserver == null) { -+ return false; -+ } else { -+ if (itemstack.hasTag() && itemstack.getTag().hasKeyOfType("BlockEntityTag", 10)) { -+ TileEntity tileentity = world.getTileEntity(blockposition); -+ -+ if (tileentity != null) { -+ if (!world.isClientSide && tileentity.isFilteredNBT() && (entityhuman == null || !minecraftserver.getPlayerList().isOp(entityhuman.getProfile()))) { -+ return false; -+ } -+ -+ NBTTagCompound nbttagcompound = new NBTTagCompound(); -+ NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttagcompound.clone(); -+ -+ tileentity.save(nbttagcompound); -+ NBTTagCompound nbttagcompound2 = (NBTTagCompound) itemstack.getTag().get("BlockEntityTag"); -+ -+ nbttagcompound.a(nbttagcompound2); -+ nbttagcompound.setInt("x", blockposition.getX()); -+ nbttagcompound.setInt("y", blockposition.getY()); -+ nbttagcompound.setInt("z", blockposition.getZ()); -+ if (!nbttagcompound.equals(nbttagcompound1)) { -+ tileentity.a(nbttagcompound); -+ tileentity.update(); -+ return true; -+ } -+ } -+ } -+ -+ return false; -+ } -+ } -+ -+ public String f_(ItemStack itemstack) { -+ return this.a.a(); -+ } -+ -+ public String getName() { -+ return this.a.a(); -+ } -+ -+ public Block d() { -+ return this.a; -+ } -+ -+ public Item c(String s) { -+ return this.b(s); -+ } -+} -diff --git a/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java b/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java -new file mode 100644 -index 0000000..30ca225 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java -@@ -0,0 +1,32 @@ -+package net.minecraft.server; -+ -+import java.io.IOException; -+ -+public class PacketPlayInResourcePackStatus implements Packet { -+ -+ private String a; -+ public PacketPlayInResourcePackStatus.EnumResourcePackStatus status; -+ -+ public PacketPlayInResourcePackStatus() {} -+ -+ public void a(PacketDataSerializer packetdataserializer) throws IOException { -+ this.a = packetdataserializer.c(40); -+ this.status = (PacketPlayInResourcePackStatus.EnumResourcePackStatus) packetdataserializer.a(PacketPlayInResourcePackStatus.EnumResourcePackStatus.class); -+ } -+ -+ public void b(PacketDataSerializer packetdataserializer) throws IOException { -+ packetdataserializer.a(this.a); -+ packetdataserializer.a((Enum) this.status); -+ } -+ -+ public void a(PacketListenerPlayIn packetlistenerplayin) { -+ packetlistenerplayin.a(this); -+ } -+ -+ public static enum EnumResourcePackStatus { -+ -+ SUCCESSFULLY_LOADED, DECLINED, FAILED_DOWNLOAD, ACCEPTED; -+ -+ private EnumResourcePackStatus() {} -+ } -+} -diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java -new file mode 100644 -index 0000000..49c0ca8 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java -@@ -0,0 +1,34 @@ -+package net.minecraft.server; -+ -+import net.minecraft.server.IChatBaseComponent; -+import net.minecraft.server.Packet; -+import net.minecraft.server.PacketDataSerializer; -+import net.minecraft.server.PacketListenerPlayOut; -+ -+import java.io.IOException; -+ -+public class PacketPlayOutPlayerListHeaderFooter implements Packet { -+ -+ private IChatBaseComponent a; -+ private IChatBaseComponent b; -+ -+ public PacketPlayOutPlayerListHeaderFooter() {} -+ -+ public PacketPlayOutPlayerListHeaderFooter(IChatBaseComponent ichatbasecomponent) { -+ this.a = ichatbasecomponent; -+ } -+ -+ public void a(PacketDataSerializer packetdataserializer) throws IOException { -+ this.a = packetdataserializer.f(); -+ this.b = packetdataserializer.f(); -+ } -+ -+ public void b(PacketDataSerializer packetdataserializer) throws IOException { -+ packetdataserializer.a(this.a); -+ packetdataserializer.a(this.b); -+ } -+ -+ public void a(PacketListenerPlayOut packetlistenerplayout) { -+ packetlistenerplayout.a((IChatBaseComponent) this); // Paper - Fix decompile error -+ } -+} -diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java -new file mode 100644 -index 0000000..a27ad50 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java -@@ -0,0 +1,99 @@ -+package net.minecraft.server; -+ -+import java.io.IOException; -+ -+public class PacketPlayOutTitle implements Packet { -+ -+ private PacketPlayOutTitle.EnumTitleAction a; -+ private IChatBaseComponent b; -+ private int c; -+ private int d; -+ private int e; -+ -+ public PacketPlayOutTitle() {} -+ -+ public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction, IChatBaseComponent ichatbasecomponent) { -+ this(packetplayouttitle_enumtitleaction, ichatbasecomponent, -1, -1, -1); -+ } -+ -+ public PacketPlayOutTitle(int i, int j, int k) { -+ this(PacketPlayOutTitle.EnumTitleAction.TIMES, (IChatBaseComponent) null, i, j, k); -+ } -+ -+ public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction, IChatBaseComponent ichatbasecomponent, int i, int j, int k) { -+ this.a = packetplayouttitle_enumtitleaction; -+ this.b = ichatbasecomponent; -+ this.c = i; -+ this.d = j; -+ this.e = k; -+ } -+ -+ public void a(PacketDataSerializer packetdataserializer) throws IOException { -+ this.a = (PacketPlayOutTitle.EnumTitleAction) packetdataserializer.a(PacketPlayOutTitle.EnumTitleAction.class); -+ if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE) { -+ this.b = packetdataserializer.f(); -+ } -+ -+ if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { -+ this.c = packetdataserializer.readInt(); -+ this.d = packetdataserializer.readInt(); -+ this.e = packetdataserializer.readInt(); -+ } -+ -+ } -+ -+ public void b(PacketDataSerializer packetdataserializer) throws IOException { -+ packetdataserializer.a((Enum) this.a); -+ if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE) { -+ packetdataserializer.a(this.b); -+ } -+ -+ if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { -+ packetdataserializer.writeInt(this.c); -+ packetdataserializer.writeInt(this.d); -+ packetdataserializer.writeInt(this.e); -+ } -+ -+ } -+ -+ public void a(PacketListenerPlayOut packetlistenerplayout) { -+ packetlistenerplayout.a((IChatBaseComponent) this); // Paper - Fix decompile error -+ } -+ -+ public static enum EnumTitleAction { -+ -+ TITLE, SUBTITLE, TIMES, CLEAR, RESET; -+ -+ private EnumTitleAction() {} -+ -+ public static PacketPlayOutTitle.EnumTitleAction a(String s) { -+ PacketPlayOutTitle.EnumTitleAction[] apacketplayouttitle_enumtitleaction = values(); -+ int i = apacketplayouttitle_enumtitleaction.length; -+ -+ for (int j = 0; j < i; ++j) { -+ PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction = apacketplayouttitle_enumtitleaction[j]; -+ -+ if (packetplayouttitle_enumtitleaction.name().equalsIgnoreCase(s)) { -+ return packetplayouttitle_enumtitleaction; -+ } -+ } -+ -+ return PacketPlayOutTitle.EnumTitleAction.TITLE; -+ } -+ -+ public static String[] a() { -+ String[] astring = new String[values().length]; -+ int i = 0; -+ PacketPlayOutTitle.EnumTitleAction[] apacketplayouttitle_enumtitleaction = values(); -+ int j = apacketplayouttitle_enumtitleaction.length; -+ -+ for (int k = 0; k < j; ++k) { -+ PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction = apacketplayouttitle_enumtitleaction[k]; -+ -+ astring[i++] = packetplayouttitle_enumtitleaction.name().toLowerCase(); -+ } -+ -+ return astring; -+ } -+ } -+} -diff --git a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java -new file mode 100644 -index 0000000..c5c3f40 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java -@@ -0,0 +1,37 @@ -+package net.minecraft.server; -+ -+import java.io.IOException; -+ -+public class PacketPlayOutUpdateTime implements Packet { -+ -+ private long a; -+ private long b; -+ -+ public PacketPlayOutUpdateTime() {} -+ -+ public PacketPlayOutUpdateTime(long i, long j, boolean flag) { -+ this.a = i; -+ this.b = j; -+ if (!flag) { -+ this.b = -this.b; -+ if (this.b == 0L) { -+ this.b = -1L; -+ } -+ } -+ -+ } -+ -+ public void a(PacketDataSerializer packetdataserializer) throws IOException { -+ this.a = packetdataserializer.readLong(); -+ this.b = packetdataserializer.readLong(); -+ } -+ -+ public void b(PacketDataSerializer packetdataserializer) throws IOException { -+ packetdataserializer.writeLong(this.a); -+ packetdataserializer.writeLong(this.b); -+ } -+ -+ public void a(PacketListenerPlayOut packetlistenerplayout) { -+ packetlistenerplayout.a(this); -+ } -+} -diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -new file mode 100644 -index 0000000..1a20dbf ---- /dev/null -+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java -@@ -0,0 +1,23 @@ -+package net.minecraft.server; -+ -+public class PathfinderGoalFloat extends PathfinderGoal { -+ -+ private EntityInsentient a; -+ -+ public PathfinderGoalFloat(EntityInsentient entityinsentient) { -+ this.a = entityinsentient; -+ this.a(4); -+ ((Navigation) entityinsentient.getNavigation()).c(true); -+ } -+ -+ public boolean a() { -+ return this.a.isInWater() || this.a.an(); -+ } -+ -+ public void e() { -+ if (this.a.getRandom().nextFloat() < 0.8F) { -+ this.a.getControllerJump().a(); -+ } -+ -+ } -+} -diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java -new file mode 100644 -index 0000000..107f582 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/PersistentVillage.java -@@ -0,0 +1,266 @@ -+package net.minecraft.server; -+ -+import com.google.common.collect.Lists; -+import java.util.Iterator; -+import java.util.List; -+ -+public class PersistentVillage extends PersistentBase { -+ -+ private World world; -+ private final List c = Lists.newArrayList(); -+ private final List d = Lists.newArrayList(); -+ private final List villages = Lists.newArrayList(); -+ private int time; -+ -+ public PersistentVillage(String s) { -+ super(s); -+ } -+ -+ public PersistentVillage(World world) { -+ super(a(world.worldProvider)); -+ this.world = world; -+ this.c(); -+ } -+ -+ public void a(World world) { -+ this.world = world; -+ Iterator iterator = this.villages.iterator(); -+ -+ while (iterator.hasNext()) { -+ Village village = (Village) iterator.next(); -+ -+ village.a(world); -+ } -+ -+ } -+ -+ public void a(BlockPosition blockposition) { -+ if (this.c.size() <= 64) { -+ if (!this.e(blockposition)) { -+ this.c.add(blockposition); -+ } -+ -+ } -+ } -+ -+ public void tick() { -+ ++this.time; -+ Iterator iterator = this.villages.iterator(); -+ -+ while (iterator.hasNext()) { -+ Village village = (Village) iterator.next(); -+ -+ village.a(this.time); -+ } -+ -+ this.e(); -+ this.f(); -+ this.g(); -+ if (this.time % 400 == 0) { -+ this.c(); -+ } -+ -+ } -+ -+ private void e() { -+ Iterator iterator = this.villages.iterator(); -+ -+ while (iterator.hasNext()) { -+ Village village = (Village) iterator.next(); -+ -+ if (village.g()) { -+ iterator.remove(); -+ this.c(); -+ } -+ } -+ -+ } -+ -+ public List getVillages() { -+ return this.villages; -+ } -+ -+ public Village getClosestVillage(BlockPosition blockposition, int i) { -+ Village village = null; -+ double d0 = 3.4028234663852886E38D; -+ Iterator iterator = this.villages.iterator(); -+ -+ while (iterator.hasNext()) { -+ Village village1 = (Village) iterator.next(); -+ double d1 = village1.a().k(blockposition); -+ -+ if (d1 < d0) { -+ float f = (float) (i + village1.b()); -+ -+ if (d1 <= (double) (f * f)) { -+ village = village1; -+ d0 = d1; -+ } -+ } -+ } -+ -+ return village; -+ } -+ -+ private void f() { -+ if (!this.c.isEmpty()) { -+ this.b((BlockPosition) this.c.remove(0)); -+ } -+ } -+ -+ private void g() { -+ for (int i = 0; i < this.d.size(); ++i) { -+ VillageDoor villagedoor = (VillageDoor) this.d.get(i); -+ Village village = this.getClosestVillage(villagedoor.d(), 32); -+ -+ if (village == null) { -+ village = new Village(this.world); -+ this.villages.add(village); -+ this.c(); -+ } -+ -+ village.a(villagedoor); -+ } -+ -+ this.d.clear(); -+ } -+ -+ private void b(BlockPosition blockposition) { -+ byte b0 = 16; -+ byte b1 = 4; -+ byte b2 = 16; -+ -+ for (int i = -b0; i < b0; ++i) { -+ for (int j = -b1; j < b1; ++j) { -+ for (int k = -b2; k < b2; ++k) { -+ BlockPosition blockposition1 = blockposition.a(i, j, k); -+ -+ if (this.f(blockposition1)) { -+ VillageDoor villagedoor = this.c(blockposition1); -+ -+ if (villagedoor == null) { -+ this.d(blockposition1); -+ } else { -+ villagedoor.a(this.time); -+ } -+ } -+ } -+ } -+ } -+ -+ } -+ -+ private VillageDoor c(BlockPosition blockposition) { -+ Iterator iterator = this.d.iterator(); -+ -+ VillageDoor villagedoor; -+ -+ do { -+ if (!iterator.hasNext()) { -+ iterator = this.villages.iterator(); -+ -+ VillageDoor villagedoor1; -+ -+ do { -+ if (!iterator.hasNext()) { -+ return null; -+ } -+ -+ Village village = (Village) iterator.next(); -+ -+ villagedoor1 = village.e(blockposition); -+ } while (villagedoor1 == null); -+ -+ return villagedoor1; -+ } -+ -+ villagedoor = (VillageDoor) iterator.next(); -+ } while (villagedoor.d().getX() != blockposition.getX() || villagedoor.d().getZ() != blockposition.getZ() || Math.abs(villagedoor.d().getY() - blockposition.getY()) > 1); -+ -+ return villagedoor; -+ } -+ -+ private void d(BlockPosition blockposition) { -+ EnumDirection enumdirection = BlockDoor.f(this.world, blockposition); -+ EnumDirection enumdirection1 = enumdirection.opposite(); -+ int i = this.a(blockposition, enumdirection, 5); -+ int j = this.a(blockposition, enumdirection1, i + 1); -+ -+ if (i != j) { -+ this.d.add(new VillageDoor(blockposition, i < j ? enumdirection : enumdirection1, this.time)); -+ } -+ -+ } -+ -+ private int a(BlockPosition blockposition, EnumDirection enumdirection, int i) { -+ int j = 0; -+ -+ for (int k = 1; k <= 5; ++k) { -+ if (this.world.h(blockposition.shift(enumdirection, k))) { -+ ++j; -+ if (j >= i) { -+ return j; -+ } -+ } -+ } -+ -+ return j; -+ } -+ -+ private boolean e(BlockPosition blockposition) { -+ Iterator iterator = this.c.iterator(); -+ -+ BlockPosition blockposition1; -+ -+ do { -+ if (!iterator.hasNext()) { -+ return false; -+ } -+ -+ blockposition1 = (BlockPosition) iterator.next(); -+ } while (!blockposition1.equals(blockposition)); -+ -+ return true; -+ } -+ -+ private boolean f(BlockPosition blockposition) { -+ IBlockData iblockdata = this.world.getType(blockposition); -+ Block block = iblockdata.getBlock(); -+ -+ return block instanceof BlockDoor ? iblockdata.getMaterial() == Material.WOOD : false; -+ } -+ -+ public void a(NBTTagCompound nbttagcompound) { -+ this.time = nbttagcompound.getInt("Tick"); -+ NBTTagList nbttaglist = nbttagcompound.getList("Villages", 10); -+ -+ for (int i = 0; i < nbttaglist.size(); ++i) { -+ NBTTagCompound nbttagcompound1 = nbttaglist.get(i); -+ Village village = new Village(); -+ -+ village.a(nbttagcompound1); -+ this.villages.add(village); -+ } -+ -+ } -+ -+ public void b(NBTTagCompound nbttagcompound) { -+ nbttagcompound.setInt("Tick", this.time); -+ NBTTagList nbttaglist = new NBTTagList(); -+ Iterator iterator = this.villages.iterator(); -+ -+ while (iterator.hasNext()) { -+ Village village = (Village) iterator.next(); -+ NBTTagCompound nbttagcompound1 = new NBTTagCompound(); -+ -+ village.b(nbttagcompound1); -+ nbttaglist.add(nbttagcompound1); -+ } -+ -+ nbttagcompound.set("Villages", nbttaglist); -+ } -+ -+ public static String a(WorldProvider worldprovider) { -+ return "villages" + worldprovider.getDimensionManager().c(); -+ } -+} -diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java -new file mode 100644 -index 0000000..e454622 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java -@@ -0,0 +1,87 @@ -+package net.minecraft.server; -+ -+public class TileEntityEnderChest extends TileEntity implements ITickable { -+ -+ public float a; -+ public float f; -+ public int g; -+ private int h; -+ -+ public TileEntityEnderChest() {} -+ -+ public void c() { -+ if (++this.h % 20 * 4 == 0) { -+ this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g); -+ } -+ -+ this.f = this.a; -+ int i = this.position.getX(); -+ int j = this.position.getY(); -+ int k = this.position.getZ(); -+ float f = 0.1F; -+ double d0; -+ -+ if (this.g > 0 && this.a == 0.0F) { -+ double d1 = (double) i + 0.5D; -+ -+ d0 = (double) k + 0.5D; -+ this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.aL, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); -+ } -+ -+ if (this.g == 0 && this.a > 0.0F || this.g > 0 && this.a < 1.0F) { -+ float f1 = this.a; -+ -+ if (this.g > 0) { -+ this.a += f; -+ } else { -+ this.a -= f; -+ } -+ -+ if (this.a > 1.0F) { -+ this.a = 1.0F; -+ } -+ -+ float f2 = 0.5F; -+ -+ if (this.a < f2 && f1 >= f2) { -+ d0 = (double) i + 0.5D; -+ double d2 = (double) k + 0.5D; -+ -+ this.world.a((EntityHuman) null, d0, (double) j + 0.5D, d2, SoundEffects.aK, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F); -+ } -+ -+ if (this.a < 0.0F) { -+ this.a = 0.0F; -+ } -+ } -+ -+ } -+ -+ public boolean c(int i, int j) { -+ if (i == 1) { -+ this.g = j; -+ return true; -+ } else { -+ return super.c(i, j); -+ } -+ } -+ -+ public void y() { -+ this.invalidateBlockCache(); -+ super.y(); -+ } -+ -+ public void b() { -+ ++this.g; -+ this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g); -+ } -+ -+ public void d() { -+ --this.g; -+ this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g); -+ } -+ -+ public boolean a(EntityHuman entityhuman) { -+ return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D; -+ } -+} --- -2.7.4 - diff --git a/Spigot-Server-Patches/0005-Timings-v2.patch b/Spigot-Server-Patches/0005-Timings-v2.patch index 98c19d71a3..732858904e 100644 --- a/Spigot-Server-Patches/0005-Timings-v2.patch +++ b/Spigot-Server-Patches/0005-Timings-v2.patch @@ -1,4 +1,4 @@ -From 021b726e4f01b94cb7e0f19ff0feaa1386f5e010 Mon Sep 17 00:00:00 2001 +From a2bec60dd78b081c7ad0a82fb03aee52dbab9284 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -276,7 +276,7 @@ index 1d2f580..88e1e98 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 dd3abb8..a0186ef 100644 +index 328857d..0225a2e 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; @@ -289,7 +289,7 @@ index dd3abb8..a0186ef 100644 import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3665f8a..146223a 100644 +index 2983756..9e84616 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; @@ -328,7 +328,7 @@ index 3665f8a..146223a 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 1609977..569ab24 100644 +index 2a2d235..151162e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -24,7 +24,7 @@ import org.bukkit.event.entity.EntityRegainHealthEvent; @@ -340,7 +340,7 @@ index 1609977..569ab24 100644 public abstract class EntityLiving extends Entity { -@@ -1691,7 +1691,6 @@ public abstract class EntityLiving extends Entity { +@@ -1697,7 +1697,6 @@ public abstract class EntityLiving extends Entity { } public void m() { @@ -348,7 +348,7 @@ index 1609977..569ab24 100644 super.m(); this.cu(); if (!this.world.isClientSide) { -@@ -1764,9 +1763,7 @@ public abstract class EntityLiving extends Entity { +@@ -1770,9 +1769,7 @@ public abstract class EntityLiving extends Entity { } } @@ -358,7 +358,7 @@ index 1609977..569ab24 100644 double d0 = this.locX - this.lastX; double d1 = this.locZ - this.lastZ; float f = (float) (d0 * d0 + d1 * d1); -@@ -1835,8 +1832,6 @@ public abstract class EntityLiving extends Entity { +@@ -1841,8 +1838,6 @@ public abstract class EntityLiving extends Entity { } else { this.bo = 0; } @@ -367,7 +367,7 @@ index 1609977..569ab24 100644 } protected float h(float f, float f1) { -@@ -1901,7 +1896,6 @@ public abstract class EntityLiving extends Entity { +@@ -1907,7 +1902,6 @@ public abstract class EntityLiving extends Entity { } this.world.methodProfiler.a("ai"); @@ -375,7 +375,7 @@ index 1609977..569ab24 100644 if (this.cf()) { this.bc = false; this.bd = 0.0F; -@@ -1912,7 +1906,6 @@ public abstract class EntityLiving extends Entity { +@@ -1918,7 +1912,6 @@ public abstract class EntityLiving extends Entity { this.doTick(); this.world.methodProfiler.b(); } @@ -383,7 +383,7 @@ index 1609977..569ab24 100644 this.world.methodProfiler.b(); this.world.methodProfiler.a("jump"); -@@ -1935,14 +1928,10 @@ public abstract class EntityLiving extends Entity { +@@ -1941,14 +1934,10 @@ public abstract class EntityLiving extends Entity { this.be *= 0.98F; this.bf *= 0.9F; this.r(); @@ -399,7 +399,7 @@ index 1609977..569ab24 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5664994..eac4e79 100644 +index 0caa3f9..a5fea4a 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; @@ -460,7 +460,7 @@ index 5664994..eac4e79 100644 // Run tasks that are waiting on processing SpigotTimings.processQueueTimer.startTiming(); // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 525c905..cd19408 100644 +index 3409a53..dfd6067 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; @@ -634,10 +634,10 @@ index 18993be..fab56f7 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4f9136d..10e06d6 100644 +index aaa738a..8b90615 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -241,13 +241,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -244,13 +244,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { timings.doChunkUnload.stopTiming(); // Spigot this.methodProfiler.c("tickPending"); @@ -655,7 +655,7 @@ index 4f9136d..10e06d6 100644 this.methodProfiler.c("chunkMap"); timings.doChunkMap.startTiming(); // Spigot this.manager.flush(); -@@ -477,7 +477,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -480,7 +480,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } } @@ -664,7 +664,7 @@ index 4f9136d..10e06d6 100644 if (i > 0) { ChunkSection[] achunksection = chunk.getSections(); int i1 = achunksection.length; -@@ -505,6 +505,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -508,6 +508,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } } } @@ -672,7 +672,7 @@ index 4f9136d..10e06d6 100644 } this.methodProfiler.b(); -@@ -702,6 +703,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -703,6 +704,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { this.methodProfiler.a("cleaning"); @@ -680,7 +680,7 @@ index 4f9136d..10e06d6 100644 NextTickListEntry nextticklistentry; for (int j = 0; j < i; ++j) { -@@ -715,9 +717,11 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -716,9 +718,11 @@ public class WorldServer extends World implements IAsyncTaskHandler { // this.nextTickListHash.remove(nextticklistentry); this.U.add(nextticklistentry); } @@ -692,7 +692,7 @@ index 4f9136d..10e06d6 100644 Iterator iterator = this.U.iterator(); while (iterator.hasNext()) { -@@ -727,6 +731,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -728,6 +732,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); @@ -701,7 +701,7 @@ index 4f9136d..10e06d6 100644 if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) { try { -@@ -739,10 +745,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -740,10 +746,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { throw new ReportedException(crashreport); } } @@ -1133,5 +1133,5 @@ index e53092c..0b057fa 100644 } } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0031-Always-tick-falling-blocks.patch b/Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch similarity index 94% rename from Spigot-Server-Patches/0031-Always-tick-falling-blocks.patch rename to Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch index 497e895010..8d652c0d10 100644 --- a/Spigot-Server-Patches/0031-Always-tick-falling-blocks.patch +++ b/Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch @@ -1,4 +1,4 @@ -From c45b5e15b8442fbfd975903c63da1792fa032739 Mon Sep 17 00:00:00 2001 +From 314c57cc2680355fecb09a3fe154c3aa08873dae Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 00:32:25 -0600 Subject: [PATCH] Always tick falling blocks @@ -25,5 +25,5 @@ index 0b057fa..f0d3a19 100644 || entity instanceof EntityFireworks ) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0030-Fix-redstone-lag-issues.patch b/Spigot-Server-Patches/0030-Fix-redstone-lag-issues.patch deleted file mode 100644 index c63a91fe2a..0000000000 --- a/Spigot-Server-Patches/0030-Fix-redstone-lag-issues.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 2ca3862b9d997a97f44d1bdca8b36f8dc1f8f1ff Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Wed, 2 Mar 2016 00:21:24 -0600 -Subject: [PATCH] Fix redstone lag issues - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7c0e61f..facb98c 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -155,4 +155,15 @@ public class PaperWorldConfig { - netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false ); - log("Top of the nether void damage: " + netherVoidTopDamage); - } -+ -+ public int tickNextTickCap; -+ public boolean tickNextTickListCapIgnoresRedstone; -+ private void tickNextTickCap() { -+ tickNextTickCap = getInt("tick-next-tick-list-cap", 1000); // Higher values will be friendlier to vanilla style mechanics (to a point) but may hurt performance -+ tickNextTickListCapIgnoresRedstone = getBoolean("tick-next-tick-list-cap-ignores-redstone", false); // Redstone TickNextTicks will always bypass the preceding cap -+ log("WorldServer TickNextTick cap set at " + tickNextTickCap); -+ log("WorldServer TickNextTickList cap always processes redstone: " + tickNextTickListCapIgnoresRedstone); -+ -+ } -+ - } -diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 10e06d6..e2a7187 100644 ---- a/src/main/java/net/minecraft/server/WorldServer.java -+++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -691,6 +691,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { - if (false) { // CraftBukkit - throw new IllegalStateException("TickNextTick list out of synch"); - } else { -+ // Paper start - No, stop doing this, it affects things like redstone -+ /* - if (i > 1000) { - // CraftBukkit start - If the server has too much to process over time, try to alleviate that - if (i > 20 * 1000) { -@@ -700,6 +702,11 @@ public class WorldServer extends World implements IAsyncTaskHandler { - } - // CraftBukkit end - } -+ */ -+ if (i > paperConfig.tickNextTickCap) { -+ i = paperConfig.tickNextTickCap; -+ } -+ // Paper end - - this.methodProfiler.a("cleaning"); - -@@ -719,6 +726,24 @@ public class WorldServer extends World implements IAsyncTaskHandler { - } - timings.scheduledBlocksCleanup.stopTiming(); // Paper - -+ // Paper start - Allow redstone ticks to bypass the tickNextTickListCap -+ if (paperConfig.tickNextTickListCapIgnoresRedstone) { -+ Iterator iterator = this.nextTickList.iterator(); -+ while (iterator.hasNext()) { -+ NextTickListEntry next = iterator.next(); -+ if (!flag && next.b > this.worldData.getTime()) { -+ break; -+ } -+ -+ IBlockData data = next.a().getBlockData(); -+ if (next.a().isPowerSource(data) || next.a() instanceof IInventory) { -+ iterator.remove(); -+ this.U.add(next); -+ } -+ } -+ } -+ // Paper end -+ - this.methodProfiler.b(); - this.methodProfiler.a("ticking"); - timings.scheduledBlocksTicking.startTiming(); // Paper --- -2.7.4 - diff --git a/Spigot-Server-Patches/0032-Lighting-Queue.patch b/Spigot-Server-Patches/0031-Lighting-Queue.patch similarity index 91% rename from Spigot-Server-Patches/0032-Lighting-Queue.patch rename to Spigot-Server-Patches/0031-Lighting-Queue.patch index dfb56386ab..8b8f6d65fc 100644 --- a/Spigot-Server-Patches/0032-Lighting-Queue.patch +++ b/Spigot-Server-Patches/0031-Lighting-Queue.patch @@ -1,4 +1,4 @@ -From fedb4489139be404ed7916f2ea5223241b561187 Mon Sep 17 00:00:00 2001 +From 0c7102107d53530cbc3158beae7f75f00b4daca3 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 00:52:31 -0600 Subject: [PATCH] Lighting Queue @@ -17,13 +17,24 @@ index 3f4271c..5fdf051 100644 public static final Timing tickEntityTimer = Timings.ofSafe("## tickEntity"); public static final Timing tickTileEntityTimer = Timings.ofSafe("## tickTileEntity"); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index facb98c..e0e9a65 100644 +index 7c0e61f..e0e9a65 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -166,4 +166,9 @@ public class PaperWorldConfig { - +@@ -155,4 +155,20 @@ public class PaperWorldConfig { + netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false ); + log("Top of the nether void damage: " + netherVoidTopDamage); } - ++ ++ public int tickNextTickCap; ++ public boolean tickNextTickListCapIgnoresRedstone; ++ private void tickNextTickCap() { ++ tickNextTickCap = getInt("tick-next-tick-list-cap", 1000); // Higher values will be friendlier to vanilla style mechanics (to a point) but may hurt performance ++ tickNextTickListCapIgnoresRedstone = getBoolean("tick-next-tick-list-cap-ignores-redstone", false); // Redstone TickNextTicks will always bypass the preceding cap ++ log("WorldServer TickNextTick cap set at " + tickNextTickCap); ++ log("WorldServer TickNextTickList cap always processes redstone: " + tickNextTickListCapIgnoresRedstone); ++ ++ } ++ + public boolean queueLightUpdates; + private void queueLightUpdates() { + queueLightUpdates = getBoolean("queue-light-updates", false); @@ -146,7 +157,7 @@ index 83857a6..4dd672a 100644 ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk); server.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e9bb02f..d0fd638 100644 +index 3aac51d..24aa5b5 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; @@ -229,5 +240,5 @@ index f8746b3..a6d4097 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0033-Optimize-draining.patch b/Spigot-Server-Patches/0032-Optimize-draining.patch similarity index 94% rename from Spigot-Server-Patches/0033-Optimize-draining.patch rename to Spigot-Server-Patches/0032-Optimize-draining.patch index cd1e5d508a..a2af13d36b 100644 --- a/Spigot-Server-Patches/0033-Optimize-draining.patch +++ b/Spigot-Server-Patches/0032-Optimize-draining.patch @@ -1,4 +1,4 @@ -From e85b4d19d220e6b663b4a518597ff7cf77831e80 Mon Sep 17 00:00:00 2001 +From fedd40dec713035b2abc4c4a7f5da4054813ff59 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 00:55:24 -0600 Subject: [PATCH] Optimize draining @@ -24,5 +24,5 @@ index 036e861..f35f30c 100644 } } else { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0034-Configurable-end-credits.patch b/Spigot-Server-Patches/0033-Configurable-end-credits.patch similarity index 97% rename from Spigot-Server-Patches/0034-Configurable-end-credits.patch rename to Spigot-Server-Patches/0033-Configurable-end-credits.patch index 90a3f1ee06..beb4c79bd7 100644 --- a/Spigot-Server-Patches/0034-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0033-Configurable-end-credits.patch @@ -1,4 +1,4 @@ -From 1c44a3a34312691c21a43b92620d81bacab17113 Mon Sep 17 00:00:00 2001 +From d34f8c81adc1f3e993c07929e82eda897197eca4 Mon Sep 17 00:00:00 2001 From: DoctorDark Date: Wed, 16 Mar 2016 02:21:39 -0500 Subject: [PATCH] Configurable end credits @@ -52,5 +52,5 @@ index 3e33f49..8d04c82 100644 } else { this.b((Statistic) AchievementList.D); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0035-Fix-lag-from-explosions-processing-dead-entities.patch b/Spigot-Server-Patches/0034-Fix-lag-from-explosions-processing-dead-entities.patch similarity index 93% rename from Spigot-Server-Patches/0035-Fix-lag-from-explosions-processing-dead-entities.patch rename to Spigot-Server-Patches/0034-Fix-lag-from-explosions-processing-dead-entities.patch index 44134a2619..ccfa846fd5 100644 --- a/Spigot-Server-Patches/0035-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 cf462e484f0ad41d7f87d13cfe63cd2b44a2c135 Mon Sep 17 00:00:00 2001 +From 7db30b2993803a75446a250e1c11713a84da3f1a 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 3234511..8ce1b23 100644 +index 69720e8..ae49403 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 { @@ -25,5 +25,5 @@ index 3234511..8ce1b23 100644 for (int l1 = 0; l1 < list.size(); ++l1) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0036-Generator-Settings.patch b/Spigot-Server-Patches/0035-Generator-Settings.patch similarity index 99% rename from Spigot-Server-Patches/0036-Generator-Settings.patch rename to Spigot-Server-Patches/0035-Generator-Settings.patch index fae35d92b9..724474c9ce 100644 --- a/Spigot-Server-Patches/0036-Generator-Settings.patch +++ b/Spigot-Server-Patches/0035-Generator-Settings.patch @@ -1,4 +1,4 @@ -From d76297a44be358054075f915a50480c1be1d06a2 Mon Sep 17 00:00:00 2001 +From a96d56be4ce9239126a7d0677042ca9a9c429e58 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 02:17:54 -0600 Subject: [PATCH] Generator Settings @@ -38,7 +38,7 @@ index 3a57c8e..66deccb 100644 + } } diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index bc83bb7..854bbb4 100644 +index 5ca8125..e321a89 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 { @@ -265,5 +265,5 @@ index 22d96e9..83d9509 100644 Iterator iterator = this.c.values().iterator(); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0037-Optimize-explosions.patch b/Spigot-Server-Patches/0036-Optimize-explosions.patch similarity index 98% rename from Spigot-Server-Patches/0037-Optimize-explosions.patch rename to Spigot-Server-Patches/0036-Optimize-explosions.patch index 613025272c..28327a6c07 100644 --- a/Spigot-Server-Patches/0037-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0036-Optimize-explosions.patch @@ -1,4 +1,4 @@ -From 6d08aaefa976503ede51306afe7d8f85e17429b0 Mon Sep 17 00:00:00 2001 +From 433cc3bbabdc8eada43006b218bfaf6064bb7c71 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 66deccb..09b9867 100644 + } } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 8ce1b23..5bb2510 100644 +index ae49403..7e99b7d 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,7 +124,7 @@ index 8ce1b23..5bb2510 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d0fd638..5076aa3 100644 +index 24aa5b5..ee9491f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -900,6 +900,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -156,5 +156,5 @@ index a6d4097..c0f0b83 100644 public CraftWorld getWorld() { return this.world; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0038-Stop-updating-flowing-block-if-material-has-changed.patch b/Spigot-Server-Patches/0037-Stop-updating-flowing-block-if-material-has-changed.patch similarity index 92% rename from Spigot-Server-Patches/0038-Stop-updating-flowing-block-if-material-has-changed.patch rename to Spigot-Server-Patches/0037-Stop-updating-flowing-block-if-material-has-changed.patch index d383290541..1b8187a562 100644 --- a/Spigot-Server-Patches/0038-Stop-updating-flowing-block-if-material-has-changed.patch +++ b/Spigot-Server-Patches/0037-Stop-updating-flowing-block-if-material-has-changed.patch @@ -1,4 +1,4 @@ -From a3368ae0995a5ee4474ff5734c922d6c8f1cb3ca Mon Sep 17 00:00:00 2001 +From 32d5f0477fdbb9b41debf0d7267fb80f137814b1 Mon Sep 17 00:00:00 2001 From: Iceee Date: Wed, 2 Mar 2016 12:03:23 -0600 Subject: [PATCH] Stop updating flowing block if material has changed @@ -17,5 +17,5 @@ index f35f30c..1f07f82 100644 if (this.h(world, blockposition.down(), iblockdata2)) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0039-Fast-draining.patch b/Spigot-Server-Patches/0038-Fast-draining.patch similarity index 98% rename from Spigot-Server-Patches/0039-Fast-draining.patch rename to Spigot-Server-Patches/0038-Fast-draining.patch index 9e7b39c6aa..968ee9b329 100644 --- a/Spigot-Server-Patches/0039-Fast-draining.patch +++ b/Spigot-Server-Patches/0038-Fast-draining.patch @@ -1,4 +1,4 @@ -From c9e4fbbe1ceced99a47e76c5f7bcaad14d094d6e Mon Sep 17 00:00:00 2001 +From 123f7daf33fadf6f80077c2be0974454fde2f7b1 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 12:20:52 -0600 Subject: [PATCH] Fast draining @@ -96,5 +96,5 @@ index 1f07f82..517c1e8 100644 + } } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0040-Configurable-lava-flow-speed.patch b/Spigot-Server-Patches/0039-Configurable-lava-flow-speed.patch similarity index 96% rename from Spigot-Server-Patches/0040-Configurable-lava-flow-speed.patch rename to Spigot-Server-Patches/0039-Configurable-lava-flow-speed.patch index 34c8224d35..24eded315c 100644 --- a/Spigot-Server-Patches/0040-Configurable-lava-flow-speed.patch +++ b/Spigot-Server-Patches/0039-Configurable-lava-flow-speed.patch @@ -1,4 +1,4 @@ -From ebbe7bc51b8020a58c466053febcdcbe10211fed Mon Sep 17 00:00:00 2001 +From a4b691d0c39da80e14863ca658c80f9afb6506de Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 12:27:07 -0600 Subject: [PATCH] Configurable lava flow speed @@ -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.0 diff --git a/Spigot-Server-Patches/0041-Add-player-view-distance-API.patch b/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch similarity index 98% rename from Spigot-Server-Patches/0041-Add-player-view-distance-API.patch rename to Spigot-Server-Patches/0040-Add-player-view-distance-API.patch index 0e02c7c6f5..0695a91f11 100644 --- a/Spigot-Server-Patches/0041-Add-player-view-distance-API.patch +++ b/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch @@ -1,4 +1,4 @@ -From 94b4dc473c08c9903cc6a49e9bb742ce97dbef9f Mon Sep 17 00:00:00 2001 +From 84315fb08fc96322d441c192dbb8b6c39fa63913 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 @@ -109,5 +109,5 @@ index 8370d94..8e94ddd 100644 // Spigot start -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0042-Disable-explosion-knockback.patch b/Spigot-Server-Patches/0041-Disable-explosion-knockback.patch similarity index 93% rename from Spigot-Server-Patches/0042-Disable-explosion-knockback.patch rename to Spigot-Server-Patches/0041-Disable-explosion-knockback.patch index 07e78be0ef..8363eeecb6 100644 --- a/Spigot-Server-Patches/0042-Disable-explosion-knockback.patch +++ b/Spigot-Server-Patches/0041-Disable-explosion-knockback.patch @@ -1,4 +1,4 @@ -From 6b3da1239ae323d5dcae1c59d86156fe471fe27b Mon Sep 17 00:00:00 2001 +From 3b7cd69c0a28f2310feb483fe385636155aa1eb3 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 095f3b6..491a8a7 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 569ab24..da52fe7 100644 +index 151162e..3b9b112 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -855,12 +855,14 @@ public abstract class EntityLiving extends Entity { +@@ -860,12 +860,14 @@ public abstract class EntityLiving extends Entity { } } @@ -37,7 +37,7 @@ index 569ab24..da52fe7 100644 this.world.broadcastEntityEffect(this, (byte) 2); } -@@ -884,6 +886,8 @@ public abstract class EntityLiving extends Entity { +@@ -889,6 +891,8 @@ public abstract class EntityLiving extends Entity { } } @@ -47,7 +47,7 @@ index 569ab24..da52fe7 100644 SoundEffect soundeffect = this.bS(); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 5bb2510..418ee29 100644 +index 7e99b7d..91540c7 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 5bb2510..418ee29 100644 } } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0043-Disable-thunder.patch b/Spigot-Server-Patches/0042-Disable-thunder.patch similarity index 90% rename from Spigot-Server-Patches/0043-Disable-thunder.patch rename to Spigot-Server-Patches/0042-Disable-thunder.patch index 6c5b854147..f1d2ed6802 100644 --- a/Spigot-Server-Patches/0043-Disable-thunder.patch +++ b/Spigot-Server-Patches/0042-Disable-thunder.patch @@ -1,4 +1,4 @@ -From 5491f2f781884e632797d341eb903226e831f478 Mon Sep 17 00:00:00 2001 +From 16e99fad4aaad1c8e519e9f77ef13c47e6f9191d 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 491a8a7..a665e3a 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e2a7187..f87cd59 100644 +index 8b90615..94b5c37 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -417,7 +417,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -420,7 +420,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { int l; BlockPosition blockposition; @@ -33,5 +33,5 @@ index e2a7187..f87cd59 100644 l = this.l >> 2; blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0044-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0043-Disable-ice-and-snow.patch similarity index 89% rename from Spigot-Server-Patches/0044-Disable-ice-and-snow.patch rename to Spigot-Server-Patches/0043-Disable-ice-and-snow.patch index 158cd242bd..b8aaddd9f6 100644 --- a/Spigot-Server-Patches/0044-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0043-Disable-ice-and-snow.patch @@ -1,4 +1,4 @@ -From 34b52524c899c87cd5e2a581f5fbe793d4e07e39 Mon Sep 17 00:00:00 2001 +From d65be532ca3364948e131e0362ae3937f6ad3d32 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 a665e3a..41b2a42 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f87cd59..0e1cbfe 100644 +index 94b5c37..47dbea8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -441,7 +441,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -444,7 +444,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { } this.methodProfiler.c("iceandsnow"); @@ -32,5 +32,5 @@ index f87cd59..0e1cbfe 100644 l = this.l >> 2; blockposition = this.p(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15))); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0045-Configurable-mob-spawner-tick-rate.patch b/Spigot-Server-Patches/0044-Configurable-mob-spawner-tick-rate.patch similarity index 97% rename from Spigot-Server-Patches/0045-Configurable-mob-spawner-tick-rate.patch rename to Spigot-Server-Patches/0044-Configurable-mob-spawner-tick-rate.patch index d81b63f289..4ff08141a3 100644 --- a/Spigot-Server-Patches/0045-Configurable-mob-spawner-tick-rate.patch +++ b/Spigot-Server-Patches/0044-Configurable-mob-spawner-tick-rate.patch @@ -1,4 +1,4 @@ -From 4ae728fd4fbe6c9d9a314f61bed525ae6c16163d Mon Sep 17 00:00:00 2001 +From 69f769aa7facf3d6ea3367c6b9fdb6f0ff7322e3 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 15:03:53 -0600 Subject: [PATCH] Configurable mob spawner tick rate @@ -64,5 +64,5 @@ index 2eee845..f4f77d7 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0046-Configurable-TNT-cannon-fix.patch b/Spigot-Server-Patches/0045-Configurable-TNT-cannon-fix.patch similarity index 98% rename from Spigot-Server-Patches/0046-Configurable-TNT-cannon-fix.patch rename to Spigot-Server-Patches/0045-Configurable-TNT-cannon-fix.patch index 38ecce0413..2518278a11 100644 --- a/Spigot-Server-Patches/0046-Configurable-TNT-cannon-fix.patch +++ b/Spigot-Server-Patches/0045-Configurable-TNT-cannon-fix.patch @@ -1,4 +1,4 @@ -From b54bda97dbbe9c013c860bb721c8fc836486b243 Mon Sep 17 00:00:00 2001 +From 45c9d527168cc83dafaa5f8f4c2b33b789fbdd79 Mon Sep 17 00:00:00 2001 From: Iceee Date: Wed, 2 Mar 2016 23:00:53 -0600 Subject: [PATCH] Configurable TNT cannon fix @@ -60,7 +60,7 @@ index ffc07cd..64aaba4 100644 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 b4d1741..257bbbb 100644 +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 { @@ -140,7 +140,7 @@ index 1a133d9..f4f9be6 100644 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 f794167..021a3be 100644 +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 { @@ -168,12 +168,12 @@ index f794167..021a3be 100644 + // Paper end world.addEntity(entitytntprimed); - world.a((EntityHuman) null, entitytntprimed.locX, entitytntprimed.locY, entitytntprimed.locZ, SoundEffects.gj, SoundCategory.BLOCKS, 1.0F, 1.0F); + 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 d7bea3d..61ac795 100644 +index 392e2fa..a93a990 100644 --- a/src/main/java/net/minecraft/server/DispenserRegistry.java +++ b/src/main/java/net/minecraft/server/DispenserRegistry.java -@@ -498,7 +498,11 @@ public class DispenserRegistry { +@@ -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); @@ -294,7 +294,7 @@ index 1113b1c..12feacf 100644 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 418ee29..9b86454 100644 +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 { @@ -315,5 +315,5 @@ index 418ee29..9b86454 100644 EntityHuman entityhuman = (EntityHuman) entity; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0047-Send-absolute-position-the-first-time-an-entity-is-s.patch b/Spigot-Server-Patches/0046-Send-absolute-position-the-first-time-an-entity-is-s.patch similarity index 98% rename from Spigot-Server-Patches/0047-Send-absolute-position-the-first-time-an-entity-is-s.patch rename to Spigot-Server-Patches/0046-Send-absolute-position-the-first-time-an-entity-is-s.patch index 7d0f4ce435..1cc3ae9693 100644 --- a/Spigot-Server-Patches/0047-Send-absolute-position-the-first-time-an-entity-is-s.patch +++ b/Spigot-Server-Patches/0046-Send-absolute-position-the-first-time-an-entity-is-s.patch @@ -1,4 +1,4 @@ -From f953ad5cc6a322d6486ad2003f90ba92f51ba368 Mon Sep 17 00:00:00 2001 +From 4cb89212841a3259484ca781c652b0245884f5a2 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 @@ -93,5 +93,5 @@ index f8570a8..1602dff 100644 entityplayer.playerConnection.sendPacket(packet); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0048-Add-BeaconEffectEvent.patch b/Spigot-Server-Patches/0047-Add-BeaconEffectEvent.patch similarity index 97% rename from Spigot-Server-Patches/0048-Add-BeaconEffectEvent.patch rename to Spigot-Server-Patches/0047-Add-BeaconEffectEvent.patch index 6c29d082b3..1b1665944a 100644 --- a/Spigot-Server-Patches/0048-Add-BeaconEffectEvent.patch +++ b/Spigot-Server-Patches/0047-Add-BeaconEffectEvent.patch @@ -1,4 +1,4 @@ -From 0f460eada64a1fa1d012d8310f9eccec0feaa0d1 Mon Sep 17 00:00:00 2001 +From 0ef61deea4cab7fac10e7ece97a0811d5ac83113 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 23:30:53 -0600 Subject: [PATCH] Add BeaconEffectEvent @@ -61,5 +61,5 @@ index ed5b374..048f5bb 100644 } } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0049-Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/0048-Configurable-container-update-tick-rate.patch similarity index 96% rename from Spigot-Server-Patches/0049-Configurable-container-update-tick-rate.patch rename to Spigot-Server-Patches/0048-Configurable-container-update-tick-rate.patch index bea0e3b628..0d06a2b6ab 100644 --- a/Spigot-Server-Patches/0049-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0048-Configurable-container-update-tick-rate.patch @@ -1,4 +1,4 @@ -From 6ccc58fffcabd1eb401162d3f524ad539964f177 Mon Sep 17 00:00:00 2001 +From bd05644ab0f98384fc8793dd89ef321a99e3306e 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 @@ -45,5 +45,5 @@ index ed307bc..2681aa5 100644 this.closeInventory(); this.activeContainer = this.defaultContainer; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0050-Fix-lava-water-some-times-creating-air-instead-of-co.patch b/Spigot-Server-Patches/0049-Fix-lava-water-some-times-creating-air-instead-of-co.patch similarity index 89% rename from Spigot-Server-Patches/0050-Fix-lava-water-some-times-creating-air-instead-of-co.patch rename to Spigot-Server-Patches/0049-Fix-lava-water-some-times-creating-air-instead-of-co.patch index d06ed58dac..68f0b8cd10 100644 --- a/Spigot-Server-Patches/0050-Fix-lava-water-some-times-creating-air-instead-of-co.patch +++ b/Spigot-Server-Patches/0049-Fix-lava-water-some-times-creating-air-instead-of-co.patch @@ -1,11 +1,11 @@ -From 373eef295a46206b41b22b4cb6631d0f3d2c98a9 Mon Sep 17 00:00:00 2001 +From dd8cd2c8b782274b95bb4a1318b35823783594fb 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 675cdc0..8c23ce3 100644 +index cdbb7a4..c5f052a 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 { @@ -18,5 +18,5 @@ index 675cdc0..8c23ce3 100644 this.fizz(world, blockposition); return true; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0051-Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/0050-Use-UserCache-for-player-heads.patch similarity index 95% rename from Spigot-Server-Patches/0051-Use-UserCache-for-player-heads.patch rename to Spigot-Server-Patches/0050-Use-UserCache-for-player-heads.patch index 34c3ac0627..c83b159540 100644 --- a/Spigot-Server-Patches/0051-Use-UserCache-for-player-heads.patch +++ b/Spigot-Server-Patches/0050-Use-UserCache-for-player-heads.patch @@ -1,4 +1,4 @@ -From da2863df4fb017aff9677682fb316da7a3348b3f Mon Sep 17 00:00:00 2001 +From 29fa1b0750cdafb845d8155c40148f595ec36495 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.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0052-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0051-Disable-spigot-tick-limiters.patch similarity index 96% rename from Spigot-Server-Patches/0052-Disable-spigot-tick-limiters.patch rename to Spigot-Server-Patches/0051-Disable-spigot-tick-limiters.patch index 17440b3733..3dc58564a1 100644 --- a/Spigot-Server-Patches/0052-Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/0051-Disable-spigot-tick-limiters.patch @@ -1,4 +1,4 @@ -From c303f2f17f0a9bde32a41118a0d5831e0d071de1 Mon Sep 17 00:00:00 2001 +From ae8a00e13119c8db9690397334b9259e9d5f828f 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 @@ -35,5 +35,5 @@ index c0f0b83..bffa3ac 100644 TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition); // Spigot start -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0053-Configurable-Chunk-IO-Thread-Base-Count.patch b/Spigot-Server-Patches/0052-Configurable-Chunk-IO-Thread-Base-Count.patch similarity index 96% rename from Spigot-Server-Patches/0053-Configurable-Chunk-IO-Thread-Base-Count.patch rename to Spigot-Server-Patches/0052-Configurable-Chunk-IO-Thread-Base-Count.patch index 0872a5acf6..d923336937 100644 --- a/Spigot-Server-Patches/0053-Configurable-Chunk-IO-Thread-Base-Count.patch +++ b/Spigot-Server-Patches/0052-Configurable-Chunk-IO-Thread-Base-Count.patch @@ -1,4 +1,4 @@ -From 597ee1c40918eefe854dbc41d38f9cf305a78d98 Mon Sep 17 00:00:00 2001 +From 64711b96753d6fb0210d4ea0c8dbaee533f1a9b7 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 @@ -39,5 +39,5 @@ index e4fd9bc..7b7a3d0 100644 private static final AsynchronousExecutor instance = new AsynchronousExecutor(new ChunkIOProvider(), BASE_THREADS); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0054-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch b/Spigot-Server-Patches/0053-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch similarity index 95% rename from Spigot-Server-Patches/0054-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch rename to Spigot-Server-Patches/0053-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch index 3b10dff487..38e684d76d 100644 --- a/Spigot-Server-Patches/0054-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch +++ b/Spigot-Server-Patches/0053-Don-t-create-Region-File-s-when-checking-if-chunk-ex.patch @@ -1,4 +1,4 @@ -From 47f34049305ac72e737769f0e6b7c00bccd40b5f Mon Sep 17 00:00:00 2001 +From d97d5c88e8438283e42818c51ea7d68c1102e28a 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,7 +7,7 @@ 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 53b5296..5bd6ce0 100644 +index 5d77c92..eb13bc9 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 { @@ -49,5 +49,5 @@ index 5528019..01a08d4 100644 file1.mkdirs(); } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0055-Don-t-create-a-chunk-just-to-unload-it.patch b/Spigot-Server-Patches/0054-Don-t-create-a-chunk-just-to-unload-it.patch similarity index 93% rename from Spigot-Server-Patches/0055-Don-t-create-a-chunk-just-to-unload-it.patch rename to Spigot-Server-Patches/0054-Don-t-create-a-chunk-just-to-unload-it.patch index 173253e423..69a787625a 100644 --- a/Spigot-Server-Patches/0055-Don-t-create-a-chunk-just-to-unload-it.patch +++ b/Spigot-Server-Patches/0054-Don-t-create-a-chunk-just-to-unload-it.patch @@ -1,4 +1,4 @@ -From 4aafe0f081ad7097a066c0cc28c6a36706a4302f Mon Sep 17 00:00:00 2001 +From 4523f4c601e523971012b1a5b50c40704f74fdc6 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 @@ -23,5 +23,5 @@ index 83e3003..3f2d83a 100644 save = true; } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0056-EAR-Fix-bug-with-teleporting-entities.patch b/Spigot-Server-Patches/0055-EAR-Fix-bug-with-teleporting-entities.patch similarity index 95% rename from Spigot-Server-Patches/0056-EAR-Fix-bug-with-teleporting-entities.patch rename to Spigot-Server-Patches/0055-EAR-Fix-bug-with-teleporting-entities.patch index e61d79a0df..dc5b97b005 100644 --- a/Spigot-Server-Patches/0056-EAR-Fix-bug-with-teleporting-entities.patch +++ b/Spigot-Server-Patches/0055-EAR-Fix-bug-with-teleporting-entities.patch @@ -1,4 +1,4 @@ -From df57dc656157c2df692858b66b253575232f2a68 Mon Sep 17 00:00:00 2001 +From 81633282d869e155958c376e88e245dc6f645bd0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 00:07:23 -0600 Subject: [PATCH] EAR: Fix bug with teleporting entities @@ -7,7 +7,7 @@ Subject: [PATCH] EAR: Fix bug with teleporting entities https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/pull-requests/52/overview diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 96014a9..c99b402 100644 +index 782abd6..359e18e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -119,9 +119,17 @@ public abstract class Entity implements ICommandListener { @@ -45,5 +45,5 @@ index f0d3a19..a1bd1a6 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0057-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0056-Add-PlayerInitialSpawnEvent.patch similarity index 96% rename from Spigot-Server-Patches/0057-Add-PlayerInitialSpawnEvent.patch rename to Spigot-Server-Patches/0056-Add-PlayerInitialSpawnEvent.patch index 669ae455d4..2a2e439937 100644 --- a/Spigot-Server-Patches/0057-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0056-Add-PlayerInitialSpawnEvent.patch @@ -1,4 +1,4 @@ -From f17ded80e85aec1519ed04ee5992f0ad4426abd8 Mon Sep 17 00:00:00 2001 +From 04ef494aa58524008dad1d2b8402234c5c109ac2 Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Thu, 3 Mar 2016 00:09:38 -0600 Subject: [PATCH] Add PlayerInitialSpawnEvent @@ -32,5 +32,5 @@ index ef76652..b636a71 100644 entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); String s1 = "local"; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0058-Process-Entity-Chunk-Registration-on-Teleport.patch b/Spigot-Server-Patches/0057-Process-Entity-Chunk-Registration-on-Teleport.patch similarity index 93% rename from Spigot-Server-Patches/0058-Process-Entity-Chunk-Registration-on-Teleport.patch rename to Spigot-Server-Patches/0057-Process-Entity-Chunk-Registration-on-Teleport.patch index 1d50f1b828..2da84b4cb5 100644 --- a/Spigot-Server-Patches/0058-Process-Entity-Chunk-Registration-on-Teleport.patch +++ b/Spigot-Server-Patches/0057-Process-Entity-Chunk-Registration-on-Teleport.patch @@ -1,4 +1,4 @@ -From f6e2e87141988fcc4c191ef0cc75e30c4fa87398 Mon Sep 17 00:00:00 2001 +From 8cdfbcfe70be7d3748aa4b92e6a0a1bf48a03e51 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 00:12:23 -0600 Subject: [PATCH] Process Entity Chunk Registration on Teleport @@ -18,5 +18,5 @@ index f4168c4..b422b75 100644 return true; } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0059-Disable-chest-cat-detection.patch b/Spigot-Server-Patches/0058-Disable-chest-cat-detection.patch similarity index 90% rename from Spigot-Server-Patches/0059-Disable-chest-cat-detection.patch rename to Spigot-Server-Patches/0058-Disable-chest-cat-detection.patch index 5a89efe749..13f1c32a1f 100644 --- a/Spigot-Server-Patches/0059-Disable-chest-cat-detection.patch +++ b/Spigot-Server-Patches/0058-Disable-chest-cat-detection.patch @@ -1,4 +1,4 @@ -From bb0773bf6b5ee21d8bc8be6f66227fa59ef8335c Mon Sep 17 00:00:00 2001 +From dc5bbfacc8f4f564722ac6a0e89cebf5b2afff74 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:13:45 -0600 Subject: [PATCH] Disable chest cat detection @@ -19,10 +19,10 @@ index 91eb5de..d5a1c47 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java -index 7d27317..ed8d1df 100644 +index 2fb9c76..5143d9e 100644 --- a/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java -@@ -392,6 +392,11 @@ public class BlockChest extends BlockTileEntity { +@@ -396,6 +396,11 @@ public class BlockChest extends BlockTileEntity { } private boolean j(World world, BlockPosition blockposition) { @@ -35,5 +35,5 @@ index 7d27317..ed8d1df 100644 EntityOcelot entityocelot; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0060-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0059-Ensure-commands-are-not-ran-async.patch similarity index 97% rename from Spigot-Server-Patches/0060-Ensure-commands-are-not-ran-async.patch rename to Spigot-Server-Patches/0059-Ensure-commands-are-not-ran-async.patch index d22ad7bed4..d8779cc156 100644 --- a/Spigot-Server-Patches/0060-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0059-Ensure-commands-are-not-ran-async.patch @@ -1,4 +1,4 @@ -From e926a4a0baf7c0878c2111f9f037fd535439102d Mon Sep 17 00:00:00 2001 +From a4eaef38bd59f6b140348788f2e2e5956dc958fc 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,7 +14,7 @@ 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 b351f2b..50fcc7c 100644 +index 19ef641..32ea702 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 { @@ -82,5 +82,5 @@ index 14e5647..c6cee80 100644 return true; } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0061-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0060-All-chunks-are-slime-spawn-chunks-toggle.patch similarity index 94% rename from Spigot-Server-Patches/0061-All-chunks-are-slime-spawn-chunks-toggle.patch rename to Spigot-Server-Patches/0060-All-chunks-are-slime-spawn-chunks-toggle.patch index 4fe0ac8a20..24c5a982f0 100644 --- a/Spigot-Server-Patches/0061-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/0060-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -1,4 +1,4 @@ -From aa27334c54ae835db3bad51791bc5fada2bcf653 Mon Sep 17 00:00:00 2001 +From 3f3eba49196fa43733c35773683d09bbd34952d4 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 @@ -19,7 +19,7 @@ index d5a1c47..1f97e59 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java -index cb92686..645082d 100644 +index fbefa3e..da73220 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 { @@ -33,5 +33,5 @@ index cb92686..645082d 100644 } } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0062-Add-Location-support-to-tab-completers-vanilla-featu.patch b/Spigot-Server-Patches/0061-Add-Location-support-to-tab-completers-vanilla-featu.patch similarity index 98% rename from Spigot-Server-Patches/0062-Add-Location-support-to-tab-completers-vanilla-featu.patch rename to Spigot-Server-Patches/0061-Add-Location-support-to-tab-completers-vanilla-featu.patch index ae237777a7..5e01fdcf2b 100644 --- a/Spigot-Server-Patches/0062-Add-Location-support-to-tab-completers-vanilla-featu.patch +++ b/Spigot-Server-Patches/0061-Add-Location-support-to-tab-completers-vanilla-featu.patch @@ -1,4 +1,4 @@ -From 9400db7c1dfd50bcaa073c27eac23ca6bcd68242 Mon Sep 17 00:00:00 2001 +From 629b40a00252fba89e0cd179b07eea9ed168b7db 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 @@ -20,7 +20,7 @@ index 1f97e59..ca11cd7 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5076aa3..d628a32 100644 +index ee9491f..058735e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1186,7 +1186,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -151,5 +151,5 @@ index 100d84a..a40218c 100644 public static CommandSender lastSender = null; // Nasty :( -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0063-Made-EntityDismountEvent-Cancellable.patch b/Spigot-Server-Patches/0062-Made-EntityDismountEvent-Cancellable.patch similarity index 93% rename from Spigot-Server-Patches/0063-Made-EntityDismountEvent-Cancellable.patch rename to Spigot-Server-Patches/0062-Made-EntityDismountEvent-Cancellable.patch index 97ab6448d9..3286dd6540 100644 --- a/Spigot-Server-Patches/0063-Made-EntityDismountEvent-Cancellable.patch +++ b/Spigot-Server-Patches/0062-Made-EntityDismountEvent-Cancellable.patch @@ -1,11 +1,11 @@ -From 172117c0ef004434c7568f0bad02ebdf77390e48 Mon Sep 17 00:00:00 2001 +From 43e30251a99b69cfd0da8a5fde044b124b344585 Mon Sep 17 00:00:00 2001 From: Nik Gil Date: Thu, 3 Mar 2016 04:04:19 -0600 Subject: [PATCH] Made EntityDismountEvent Cancellable diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c99b402..cc345d9 100644 +index 359e18e..282a14f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -38,6 +38,7 @@ import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -29,5 +29,5 @@ index c99b402..cc345d9 100644 entity.j = 60; } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0064-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0063-Optimize-Pathfinding.patch similarity index 95% rename from Spigot-Server-Patches/0064-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0063-Optimize-Pathfinding.patch index 38869675ff..ef273da809 100644 --- a/Spigot-Server-Patches/0064-Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/0063-Optimize-Pathfinding.patch @@ -1,4 +1,4 @@ -From 720d59b0a5a83d3b047cd43e23ae149d284dc0db Mon Sep 17 00:00:00 2001 +From 996f0b89d6d0fb777228a3de783c06a64a3d83cc Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:02:07 -0600 Subject: [PATCH] Optimize Pathfinding @@ -47,5 +47,5 @@ index 7cfe0af..9687785 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0065-Optimize-getBlockData.patch b/Spigot-Server-Patches/0064-Optimize-getBlockData.patch similarity index 94% rename from Spigot-Server-Patches/0065-Optimize-getBlockData.patch rename to Spigot-Server-Patches/0064-Optimize-getBlockData.patch index a78a3142ff..8981905322 100644 --- a/Spigot-Server-Patches/0065-Optimize-getBlockData.patch +++ b/Spigot-Server-Patches/0064-Optimize-getBlockData.patch @@ -1,4 +1,4 @@ -From 5a12cc3597b9adaa7c33ca1a9a31da1b61e3ac4c Mon Sep 17 00:00:00 2001 +From b306fe77bc8bd4a8236521c184d12201e221a73f Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:07:55 -0600 Subject: [PATCH] Optimize getBlockData @@ -27,5 +27,5 @@ index 3b5e8c2..42fedb7 100644 public IBlockData a(final int i, final int j, final int k) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0066-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0065-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 98% rename from Spigot-Server-Patches/0066-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0065-Avoid-hopper-searches-if-there-are-no-items.patch index 8dd52453e6..614a169f1e 100644 --- a/Spigot-Server-Patches/0066-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0065-Avoid-hopper-searches-if-there-are-no-items.patch @@ -1,4 +1,4 @@ -From c0a13468860520d04911b27b40c3f733606f380f Mon Sep 17 00:00:00 2001 +From ae2b4a0ed69035e5b3ecab62b4e522cff5b196a0 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 @@ -95,5 +95,5 @@ index 42fedb7..806e499 100644 while (iterator.hasNext()) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0067-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0066-Expose-server-CommandMap.patch similarity index 89% rename from Spigot-Server-Patches/0067-Expose-server-CommandMap.patch rename to Spigot-Server-Patches/0066-Expose-server-CommandMap.patch index 3593e2ba53..c68f423843 100644 --- a/Spigot-Server-Patches/0067-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0066-Expose-server-CommandMap.patch @@ -1,4 +1,4 @@ -From 8483263baf5476af87b6de9e8102df77142b10b2 Mon Sep 17 00:00:00 2001 +From e758d7754c164a0d94cc2351394f13e83cd5b34f 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.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0068-Be-a-bit-more-informative-in-maxHealth-exception.patch b/Spigot-Server-Patches/0067-Be-a-bit-more-informative-in-maxHealth-exception.patch similarity index 94% rename from Spigot-Server-Patches/0068-Be-a-bit-more-informative-in-maxHealth-exception.patch rename to Spigot-Server-Patches/0067-Be-a-bit-more-informative-in-maxHealth-exception.patch index dc557c4ee5..4c21997979 100644 --- a/Spigot-Server-Patches/0068-Be-a-bit-more-informative-in-maxHealth-exception.patch +++ b/Spigot-Server-Patches/0067-Be-a-bit-more-informative-in-maxHealth-exception.patch @@ -1,4 +1,4 @@ -From 46667c660cf72a61bf80b4fc4c2c62d8f1308596 Mon Sep 17 00:00:00 2001 +From 306e73f4d5861978df54525515967bc218842bfc 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 @@ -21,5 +21,5 @@ index 8aa8686..aed3e4f 100644 if (entity instanceof EntityPlayer && health == 0) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0069-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-Server-Patches/0068-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch similarity index 96% rename from Spigot-Server-Patches/0069-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch rename to Spigot-Server-Patches/0068-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 5aa6411d33..627908babd 100644 --- a/Spigot-Server-Patches/0069-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-Server-Patches/0068-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -1,4 +1,4 @@ -From cb036e63381da8aa3fa178df3ad52a4f4fafb1dc Mon Sep 17 00:00:00 2001 +From 72d50d65d74b4b9c801ff77f91e2c2c88527caa8 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 @@ -59,5 +59,5 @@ index 8e94ddd..f5a48f9 100644 public String getDisplayName() { return getHandle().displayName; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0070-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0069-Player-Tab-List-and-Title-APIs.patch similarity index 93% rename from Spigot-Server-Patches/0070-Player-Tab-List-and-Title-APIs.patch rename to Spigot-Server-Patches/0069-Player-Tab-List-and-Title-APIs.patch index c638775ffa..221f5bdb8c 100644 --- a/Spigot-Server-Patches/0070-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0069-Player-Tab-List-and-Title-APIs.patch @@ -1,22 +1,14 @@ -From da041e745dfb77377be5f5675e35a86c048253b6 Mon Sep 17 00:00:00 2001 +From e46e17e08a42764c03959f5667d23193d70a49b0 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 diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java -index 49c0ca8..f438732 100644 +index 5f5b382..242efb0 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java -@@ -1,14 +1,11 @@ - package net.minecraft.server; - --import net.minecraft.server.IChatBaseComponent; --import net.minecraft.server.Packet; --import net.minecraft.server.PacketDataSerializer; --import net.minecraft.server.PacketListenerPlayOut; -- - import java.io.IOException; +@@ -4,6 +4,8 @@ import java.io.IOException; public class PacketPlayOutPlayerListHeaderFooter implements Packet { @@ -25,7 +17,7 @@ index 49c0ca8..f438732 100644 private IChatBaseComponent a; private IChatBaseComponent b; -@@ -24,8 +21,19 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet { @@ -181,5 +173,5 @@ index f5a48f9..609f7ea 100644 @Override -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0071-Ensure-inv-drag-is-in-bounds.patch b/Spigot-Server-Patches/0070-Ensure-inv-drag-is-in-bounds.patch similarity index 91% rename from Spigot-Server-Patches/0071-Ensure-inv-drag-is-in-bounds.patch rename to Spigot-Server-Patches/0070-Ensure-inv-drag-is-in-bounds.patch index 51b7dac9ba..d4c8089c59 100644 --- a/Spigot-Server-Patches/0071-Ensure-inv-drag-is-in-bounds.patch +++ b/Spigot-Server-Patches/0070-Ensure-inv-drag-is-in-bounds.patch @@ -1,4 +1,4 @@ -From d753f184ac224ba3df89980d37f5fd099be26a30 Mon Sep 17 00:00:00 2001 +From 1299d70ab8048f1fb255ff46acce134a8c1f75ee 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 @@ -18,5 +18,5 @@ index 000b4db..e72eac4 100644 return slot != null ? slot.getItem() : null; } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0072-Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/0071-Change-implementation-of-tile-entity-removal-list.patch similarity index 97% rename from Spigot-Server-Patches/0072-Change-implementation-of-tile-entity-removal-list.patch rename to Spigot-Server-Patches/0071-Change-implementation-of-tile-entity-removal-list.patch index 646d991c28..48595a4d96 100644 --- a/Spigot-Server-Patches/0072-Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/0071-Change-implementation-of-tile-entity-removal-list.patch @@ -1,4 +1,4 @@ -From faf5c9a69d1d8376d97f1d955ef4a1e362b00098 Mon Sep 17 00:00:00 2001 +From 3693b4666afcd63dcbcfad3b2973c329096fbe5b 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 @@ -64,5 +64,5 @@ index bffa3ac..ad5c96c 100644 this.f.clear(); this.l(); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0073-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0072-Add-configurable-portal-search-radius.patch similarity index 97% rename from Spigot-Server-Patches/0073-Add-configurable-portal-search-radius.patch rename to Spigot-Server-Patches/0072-Add-configurable-portal-search-radius.patch index 5cf49ad4f9..5e3856f7cb 100644 --- a/Spigot-Server-Patches/0073-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0072-Add-configurable-portal-search-radius.patch @@ -1,4 +1,4 @@ -From b7f01f493caaf13f0e3f207253154f875c11d7d0 Mon Sep 17 00:00:00 2001 +From bfe20a3b2501f9c79626f645784920ac0b2c5950 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 @@ -54,5 +54,5 @@ index 1d5dce1..7ca2617 100644 private boolean canCreatePortal = true; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0074-Add-velocity-warnings.patch b/Spigot-Server-Patches/0073-Add-velocity-warnings.patch similarity index 94% rename from Spigot-Server-Patches/0074-Add-velocity-warnings.patch rename to Spigot-Server-Patches/0073-Add-velocity-warnings.patch index 699e2eab50..65388647e2 100644 --- a/Spigot-Server-Patches/0074-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0073-Add-velocity-warnings.patch @@ -1,4 +1,4 @@ -From 7865b56d5163b97ccc38977c35d533c2406c5827 Mon Sep 17 00:00:00 2001 +From b9716afbe619e7b425cc2a9161b709555d39ac2f Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:48:12 -0600 Subject: [PATCH] Add velocity warnings @@ -22,5 +22,5 @@ index b422b75..d24b81b 100644 entity.motY = vel.getY(); entity.motZ = vel.getZ(); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0075-Fix-inter-world-teleportation-glitches.patch b/Spigot-Server-Patches/0074-Fix-inter-world-teleportation-glitches.patch similarity index 97% rename from Spigot-Server-Patches/0075-Fix-inter-world-teleportation-glitches.patch rename to Spigot-Server-Patches/0074-Fix-inter-world-teleportation-glitches.patch index 191bb4f102..deab83c7e2 100644 --- a/Spigot-Server-Patches/0075-Fix-inter-world-teleportation-glitches.patch +++ b/Spigot-Server-Patches/0074-Fix-inter-world-teleportation-glitches.patch @@ -1,4 +1,4 @@ -From 9498346a722c19b0d8b45ac0cb712a34c1e7a3bf Mon Sep 17 00:00:00 2001 +From 25ea05e9420d42f53a771cd2e20bd36aef0cd92f 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 @@ -39,5 +39,5 @@ index 609f7ea..2f86dd3 100644 return true; } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0076-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0075-Add-exception-reporting-event.patch similarity index 99% rename from Spigot-Server-Patches/0076-Add-exception-reporting-event.patch rename to Spigot-Server-Patches/0075-Add-exception-reporting-event.patch index d6a0db5cb7..d90e4273cd 100644 --- a/Spigot-Server-Patches/0076-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0075-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From e61675931315d61a0eaab3258128c674d59e3975 Mon Sep 17 00:00:00 2001 +From 56f60ae2d3c9494957214772ea557b4e3d8dc608 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 @@ -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.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0077-Speedup-BlockPos-by-fixing-inlining.patch b/Spigot-Server-Patches/0076-Speedup-BlockPos-by-fixing-inlining.patch similarity index 98% rename from Spigot-Server-Patches/0077-Speedup-BlockPos-by-fixing-inlining.patch rename to Spigot-Server-Patches/0076-Speedup-BlockPos-by-fixing-inlining.patch index 7320a49772..01c2e51ea1 100644 --- a/Spigot-Server-Patches/0077-Speedup-BlockPos-by-fixing-inlining.patch +++ b/Spigot-Server-Patches/0076-Speedup-BlockPos-by-fixing-inlining.patch @@ -1,4 +1,4 @@ -From 88cefc5d4dc82eeb95719ceee5d40341d2434b69 Mon Sep 17 00:00:00 2001 +From b0b1a8be6b6d96d0077f999fbfea9f5ddb3665d6 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 @@ -21,7 +21,7 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt 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 fa95e8f..f0908a2 100644 +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; @@ -219,5 +219,5 @@ index e7a95f3..2d56f02 100644 public BlockPosition h() { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0078-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch b/Spigot-Server-Patches/0077-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch similarity index 95% rename from Spigot-Server-Patches/0078-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch rename to Spigot-Server-Patches/0077-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch index 1ba5d08b10..0bfd9fb782 100644 --- a/Spigot-Server-Patches/0078-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch +++ b/Spigot-Server-Patches/0077-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch @@ -1,4 +1,4 @@ -From 4c628dcc065ddd266dfcf18b7bcd3060420f761b Mon Sep 17 00:00:00 2001 +From 67810a958994d256c3711da836fdb98d41e477eb 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.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0079-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0078-Disable-Scoreboards-for-non-players-by-default.patch similarity index 95% rename from Spigot-Server-Patches/0079-Disable-Scoreboards-for-non-players-by-default.patch rename to Spigot-Server-Patches/0078-Disable-Scoreboards-for-non-players-by-default.patch index 17ea56762e..c045a40aae 100644 --- a/Spigot-Server-Patches/0079-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0078-Disable-Scoreboards-for-non-players-by-default.patch @@ -1,4 +1,4 @@ -From 0ce9c27495ac928d3b803d40753da0284429a90d Mon Sep 17 00:00:00 2001 +From 1987bc0cc04d03eb767e4703072b066c4b473af0 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 @@ -25,7 +25,7 @@ index 75b22fa..f967ec0 100644 + } } diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java -index 871535c..25950bd 100644 +index b044f33..1758a56 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 { @@ -37,7 +37,7 @@ index 871535c..25950bd 100644 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 cc345d9..4a09ec3 100644 +index 282a14f..3ded885 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1859,6 +1859,7 @@ public abstract class Entity implements ICommandListener { @@ -49,5 +49,5 @@ index cc345d9..4a09ec3 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0080-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/0079-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 91% rename from Spigot-Server-Patches/0080-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to Spigot-Server-Patches/0079-Add-methods-for-working-with-arrows-stuck-in-living-.patch index 174f3992f0..770610863f 100644 --- a/Spigot-Server-Patches/0080-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/Spigot-Server-Patches/0079-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -1,14 +1,14 @@ -From 1503f029ded104f093527e73cf51d77d5ac009b7 Mon Sep 17 00:00:00 2001 +From 3d8ddadac2aa4be6d132d2242c814afda0930d5c 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 da52fe7..2363b1f 100644 +index 3b9b112..54a0808 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1272,10 +1272,12 @@ public abstract class EntityLiving extends Entity { +@@ -1278,10 +1278,12 @@ public abstract class EntityLiving extends Entity { return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue(); } @@ -43,5 +43,5 @@ index aed3e4f..0502593 100644 + // Paper end } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0081-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0080-Complete-resource-pack-API.patch similarity index 97% rename from Spigot-Server-Patches/0081-Complete-resource-pack-API.patch rename to Spigot-Server-Patches/0080-Complete-resource-pack-API.patch index 7f046fc216..5e0723c703 100644 --- a/Spigot-Server-Patches/0081-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0080-Complete-resource-pack-API.patch @@ -1,11 +1,11 @@ -From 7139eede06aaa7b9627fa63b8f9a2616f0c39e50 Mon Sep 17 00:00:00 2001 +From 16df8534ab49f0dfe02976ca774fc7b3e66b8550 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 diff --git a/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java b/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java -index 30ca225..148141d 100644 +index 04e52d2..2a14e1a 100644 --- a/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java +++ b/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java @@ -4,7 +4,7 @@ import java.io.IOException; @@ -18,7 +18,7 @@ index 30ca225..148141d 100644 public PacketPlayInResourcePackStatus() {} diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 50fcc7c..5e83e50 100644 +index 32ea702..82ba20a 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 { @@ -86,5 +86,5 @@ index 2f86dd3..a168a77 100644 // Spigot start -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0082-Re-add-Spigot-s-hopper-check-feature.patch b/Spigot-Server-Patches/0081-Re-add-Spigot-s-hopper-check-feature.patch similarity index 93% rename from Spigot-Server-Patches/0082-Re-add-Spigot-s-hopper-check-feature.patch rename to Spigot-Server-Patches/0081-Re-add-Spigot-s-hopper-check-feature.patch index 6540324d36..555362d4e0 100644 --- a/Spigot-Server-Patches/0082-Re-add-Spigot-s-hopper-check-feature.patch +++ b/Spigot-Server-Patches/0081-Re-add-Spigot-s-hopper-check-feature.patch @@ -1,4 +1,4 @@ -From e1ea0950cef2aa1054a3db5cb5c750602739fb22 Mon Sep 17 00:00:00 2001 +From 3b10847113aae94f27ea2d6787aa6dd2428fb26a 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 @@ -19,7 +19,7 @@ index f967ec0..4d6e5fc 100644 + } } diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 4cd2caa..6406bed 100644 +index b2f0c18..243da36 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 @@ -36,5 +36,5 @@ index 4cd2caa..6406bed 100644 return false; } else { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0083-Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/0082-Chunk-save-queue-improvements.patch similarity index 98% rename from Spigot-Server-Patches/0083-Chunk-save-queue-improvements.patch rename to Spigot-Server-Patches/0082-Chunk-save-queue-improvements.patch index 8e8dc763af..61e4b4c9f3 100644 --- a/Spigot-Server-Patches/0083-Chunk-save-queue-improvements.patch +++ b/Spigot-Server-Patches/0082-Chunk-save-queue-improvements.patch @@ -1,4 +1,4 @@ -From 4cc6be534b490919b4e2bff32bf93121d92f6c6c Mon Sep 17 00:00:00 2001 +From af642f58324bdab0a5c1b9d2706443b192b7e13e Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 4 Mar 2016 18:18:37 -0600 Subject: [PATCH] Chunk save queue improvements @@ -41,7 +41,7 @@ index e55ff98..2a391d5 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 5bd6ce0..336e780 100644 +index eb13bc9..cbbf95f 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; @@ -170,5 +170,5 @@ index 4733f94..113aea2 100644 if (this.b.isEmpty()) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0084-Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/0083-Chunk-Save-Reattempt.patch similarity index 96% rename from Spigot-Server-Patches/0084-Chunk-Save-Reattempt.patch rename to Spigot-Server-Patches/0083-Chunk-Save-Reattempt.patch index ab6c057fb8..62c8ea8a13 100644 --- a/Spigot-Server-Patches/0084-Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/0083-Chunk-Save-Reattempt.patch @@ -1,4 +1,4 @@ -From 92679822582a085d38fef8fa9221b3c99e2696ee Mon Sep 17 00:00:00 2001 +From 92e6b36b911d23f516db64a05b72e25b40dbc5c0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Mar 2013 23:46:10 -0500 Subject: [PATCH] Chunk Save Reattempt @@ -6,7 +6,7 @@ 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 336e780..7eb13f8 100644 +index cbbf95f..778f8f5 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 { @@ -42,5 +42,5 @@ index 2ca94a4..68dd17d 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0085-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0084-Default-loading-permissions.yml-before-plugins.patch similarity index 97% rename from Spigot-Server-Patches/0085-Default-loading-permissions.yml-before-plugins.patch rename to Spigot-Server-Patches/0084-Default-loading-permissions.yml-before-plugins.patch index 2549e0eab5..b88a98bb10 100644 --- a/Spigot-Server-Patches/0085-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0084-Default-loading-permissions.yml-before-plugins.patch @@ -1,4 +1,4 @@ -From 521c61138ada72d1984b456255efe1d24335a33d Mon Sep 17 00:00:00 2001 +From fb8fffbcccdbf0564e2c9c14e68f773212176618 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 @@ -51,5 +51,5 @@ index 53bfbc4..8ffc06b 100644 CraftDefaultPermissions.registerCorePermissions(); helpMap.initializeCommands(); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0086-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0085-Allow-Reloading-of-Custom-Permissions.patch similarity index 91% rename from Spigot-Server-Patches/0086-Allow-Reloading-of-Custom-Permissions.patch rename to Spigot-Server-Patches/0085-Allow-Reloading-of-Custom-Permissions.patch index 8e32de1aed..162b30cea0 100644 --- a/Spigot-Server-Patches/0086-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0085-Allow-Reloading-of-Custom-Permissions.patch @@ -1,4 +1,4 @@ -From 4c91ca2b1fe10d6f28f9cf9f3c31568297310361 Mon Sep 17 00:00:00 2001 +From 569eaebd6555de10a0b88497b260c209c9b8d047 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 @@ -23,5 +23,5 @@ index 8ffc06b..29244e1 100644 + // Paper end } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0087-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0086-Remove-Metadata-on-reload.patch similarity index 93% rename from Spigot-Server-Patches/0087-Remove-Metadata-on-reload.patch rename to Spigot-Server-Patches/0086-Remove-Metadata-on-reload.patch index 61746393f0..840ec22dc5 100644 --- a/Spigot-Server-Patches/0087-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0086-Remove-Metadata-on-reload.patch @@ -1,4 +1,4 @@ -From 2263abc5482ee2d5e7942f6debecf3a3a1482529 Mon Sep 17 00:00:00 2001 +From 4ac4c0bbbf0d85a87df58b7b64b9bb6b285f46d6 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 29244e1..9ed9fbb 100644 commandMap.clearCommands(); resetRecipes(); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0088-Undead-horse-leashing.patch b/Spigot-Server-Patches/0087-Undead-horse-leashing.patch similarity index 93% rename from Spigot-Server-Patches/0088-Undead-horse-leashing.patch rename to Spigot-Server-Patches/0087-Undead-horse-leashing.patch index 45e958eb19..cdcf697319 100644 --- a/Spigot-Server-Patches/0088-Undead-horse-leashing.patch +++ b/Spigot-Server-Patches/0087-Undead-horse-leashing.patch @@ -1,4 +1,4 @@ -From dc43a9c78695bcc273f89f2e343e7d686186fcd0 Mon Sep 17 00:00:00 2001 +From 6bd67621d6773a3127b55f78fd1b30a3b639a315 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 14:19:19 -0400 Subject: [PATCH] Undead horse leashing @@ -20,7 +20,7 @@ index 4d6e5fc..38f94ce 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java -index ec1e7f6..19532b8 100644 +index a81bf3b..8367458 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 @@ -32,5 +32,5 @@ index ec1e7f6..19532b8 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0089-Fix-Furnace-cook-time-bug.patch b/Spigot-Server-Patches/0088-Fix-Furnace-cook-time-bug.patch similarity index 94% rename from Spigot-Server-Patches/0089-Fix-Furnace-cook-time-bug.patch rename to Spigot-Server-Patches/0088-Fix-Furnace-cook-time-bug.patch index 4cd0396c8f..346982762b 100644 --- a/Spigot-Server-Patches/0089-Fix-Furnace-cook-time-bug.patch +++ b/Spigot-Server-Patches/0088-Fix-Furnace-cook-time-bug.patch @@ -1,4 +1,4 @@ -From 63cb0a322261ca30465a9ff95036501d02ee012a Mon Sep 17 00:00:00 2001 +From e9f30600cca1ac5e4c62925729269cc5a1b09322 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 @@ -22,5 +22,5 @@ index 1b17ca6..0a20cec 100644 this.burn(); flag1 = true; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0090-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0089-Handle-Item-Meta-Inconsistencies.patch similarity index 99% rename from Spigot-Server-Patches/0090-Handle-Item-Meta-Inconsistencies.patch rename to Spigot-Server-Patches/0089-Handle-Item-Meta-Inconsistencies.patch index eb4107544b..b33c58589b 100644 --- a/Spigot-Server-Patches/0090-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0089-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From 8087698a536aa02f6c2fd3590e4eb9bd41c2a508 Mon Sep 17 00:00:00 2001 +From b472f6b03d8f312bacbb0e22730c30fbb42b3c60 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.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0091-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/Spigot-Server-Patches/0090-Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 94% rename from Spigot-Server-Patches/0091-Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to Spigot-Server-Patches/0090-Configurable-Non-Player-Arrow-Despawn-Rate.patch index aa68947ca0..88d71bcf05 100644 --- a/Spigot-Server-Patches/0091-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/Spigot-Server-Patches/0090-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -1,4 +1,4 @@ -From 0eb70e15ed6050e0d6bcf3b2c10cb3ff6ea05e03 Mon Sep 17 00:00:00 2001 +From ab8ab4ef84ffa10baf61b44d14a4cc73445dab32 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 @@ -24,7 +24,7 @@ index 38f94ce..7d8a541 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index df19327..8c261d0 100644 +index 7a4f56d..a073e6c 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 { @@ -37,5 +37,5 @@ index df19327..8c261d0 100644 } } else { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0092-Optimize-BlockStateList-BlockData.patch b/Spigot-Server-Patches/0091-Optimize-BlockStateList-BlockData.patch similarity index 92% rename from Spigot-Server-Patches/0092-Optimize-BlockStateList-BlockData.patch rename to Spigot-Server-Patches/0091-Optimize-BlockStateList-BlockData.patch index a4574739e8..170979d689 100644 --- a/Spigot-Server-Patches/0092-Optimize-BlockStateList-BlockData.patch +++ b/Spigot-Server-Patches/0091-Optimize-BlockStateList-BlockData.patch @@ -1,4 +1,4 @@ -From 4ddf8ca6b66ac815c05020403f61108ce1b938b3 Mon Sep 17 00:00:00 2001 +From 02ef268d939372fee2ed6febdcab16b32556bb72 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 19:15:44 -0400 Subject: [PATCH] Optimize BlockStateList/BlockData @@ -13,17 +13,17 @@ 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 a11c62f..43f198b 100644 +index 19ea22f..43ecf3b 100644 --- a/src/main/java/net/minecraft/server/BlockStateList.java +++ b/src/main/java/net/minecraft/server/BlockStateList.java -@@ -145,21 +145,11 @@ public class BlockStateList { +@@ -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)); +- return iblockstate.b().cast(this.b.get(iblockstate)); // Paper - decompile fix - } + return iblockstate.b().cast(this.b.get(iblockstate)); // Paper } @@ -41,5 +41,5 @@ index a11c62f..43f198b 100644 public ImmutableMap, Comparable> s() { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0093-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0092-Add-World-Util-Methods.patch similarity index 98% rename from Spigot-Server-Patches/0093-Add-World-Util-Methods.patch rename to Spigot-Server-Patches/0092-Add-World-Util-Methods.patch index 1aea2d7bed..2d88556ab3 100644 --- a/Spigot-Server-Patches/0093-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0092-Add-World-Util-Methods.patch @@ -1,4 +1,4 @@ -From 44c89e9b0fc391d369d1213dbdbc0a925ab7b884 Mon Sep 17 00:00:00 2001 +From 5dc04c9513360e761b5d95a02a5af027f5556a07 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 20:16:03 -0400 Subject: [PATCH] Add World Util Methods @@ -93,5 +93,5 @@ index ad7a81c..d658fa2 100644 // CraftBukkit start - tree generation if (captureTreeGeneration) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0094-Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/0093-Optimized-Light-Level-Comparisons.patch similarity index 98% rename from Spigot-Server-Patches/0094-Optimized-Light-Level-Comparisons.patch rename to Spigot-Server-Patches/0093-Optimized-Light-Level-Comparisons.patch index 918f643a27..047da9d27b 100644 --- a/Spigot-Server-Patches/0094-Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/0093-Optimized-Light-Level-Comparisons.patch @@ -1,4 +1,4 @@ -From 6c92c7164a6032a1db7d37f07a46c9f303937352 Mon Sep 17 00:00:00 2001 +From 2b215afb5bc1e8af17912c2dcf1cfab0bbb122e4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 21:22:56 -0400 Subject: [PATCH] Optimized Light Level Comparisons @@ -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 64f4754..05eb5f9 100644 +index f477036..23826fe 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,7 +118,7 @@ index 64f4754..05eb5f9 100644 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 949452c..d6c07a2 100644 +index 7a5b053..0b0eef3 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 { @@ -131,5 +131,5 @@ index 949452c..d6c07a2 100644 if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) { this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0095-Pass-world-to-Village-creation.patch b/Spigot-Server-Patches/0094-Pass-world-to-Village-creation.patch similarity index 96% rename from Spigot-Server-Patches/0095-Pass-world-to-Village-creation.patch rename to Spigot-Server-Patches/0094-Pass-world-to-Village-creation.patch index 4c254b482e..44e8cf4912 100644 --- a/Spigot-Server-Patches/0095-Pass-world-to-Village-creation.patch +++ b/Spigot-Server-Patches/0094-Pass-world-to-Village-creation.patch @@ -1,4 +1,4 @@ -From bedf1c64bec230afeb374d62bb43eb9e9490746c Mon Sep 17 00:00:00 2001 +From 5e0d629b3e6a5db8d5a0151baee6c66582d768ff 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 @@ -41,5 +41,5 @@ index 932eeb7..06a06ea 100644 if (gameprofile != null) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0096-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0095-Custom-replacement-for-eaten-items.patch similarity index 89% rename from Spigot-Server-Patches/0096-Custom-replacement-for-eaten-items.patch rename to Spigot-Server-Patches/0095-Custom-replacement-for-eaten-items.patch index b34143266c..56a168e5b0 100644 --- a/Spigot-Server-Patches/0096-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0095-Custom-replacement-for-eaten-items.patch @@ -1,14 +1,14 @@ -From 76d2d29b4343817fa91cbce9f4a635318cbd6246 Mon Sep 17 00:00:00 2001 +From 18897365f4f62800534d033dcf86f46dea38d55f 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 2363b1f..624730a 100644 +index 54a0808..4b9e65b 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2216,12 +2216,25 @@ public abstract class EntityLiving extends Entity { +@@ -2222,12 +2222,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); // CraftBukkit end @@ -35,5 +35,5 @@ index 2363b1f..624730a 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0097-Set-health-before-death-event.patch b/Spigot-Server-Patches/0096-Set-health-before-death-event.patch similarity index 96% rename from Spigot-Server-Patches/0097-Set-health-before-death-event.patch rename to Spigot-Server-Patches/0096-Set-health-before-death-event.patch index fca593d66d..928767e4b8 100644 --- a/Spigot-Server-Patches/0097-Set-health-before-death-event.patch +++ b/Spigot-Server-Patches/0096-Set-health-before-death-event.patch @@ -1,4 +1,4 @@ -From 12e201bfb0a6bbbd6062ddff4209e23f89dea8e5 Mon Sep 17 00:00:00 2001 +From 52355afff2119157d7c0a1ef6f86ac5a44c669b2 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 @@ -46,5 +46,5 @@ index 0502593..3a0d338 100644 public double getMaxHealth() { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0098-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0097-handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 88% rename from Spigot-Server-Patches/0098-handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to Spigot-Server-Patches/0097-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 19798af77f..592ea2daf6 100644 --- a/Spigot-Server-Patches/0098-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0097-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -1,14 +1,14 @@ -From 86e85867373de0f4473d131236191f6a43d36387 Mon Sep 17 00:00:00 2001 +From 50673c9e6a2f18b9997e5ef316a0ce67fb2f846e 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 624730a..7883ba7 100644 +index 4b9e65b..ebd0475 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -458,7 +458,13 @@ public abstract class EntityLiving extends Entity { +@@ -463,7 +463,13 @@ public abstract class EntityLiving extends Entity { } public void a(NBTTagCompound nbttagcompound) { @@ -23,7 +23,7 @@ index 624730a..7883ba7 100644 if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) { GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10)); } -@@ -743,6 +749,10 @@ public abstract class EntityLiving extends Entity { +@@ -748,6 +754,10 @@ public abstract class EntityLiving extends Entity { } public void setHealth(float f) { @@ -34,7 +34,7 @@ index 624730a..7883ba7 100644 // CraftBukkit start - Handle scaled health if (this instanceof EntityPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity(); -@@ -2086,7 +2096,7 @@ public abstract class EntityLiving extends Entity { +@@ -2092,7 +2102,7 @@ public abstract class EntityLiving extends Entity { } public void setAbsorptionHearts(float f) { @@ -56,5 +56,5 @@ index a168a77..fe5084e 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0099-Catch-Async-PlayerChunkMap-operations.patch b/Spigot-Server-Patches/0098-Catch-Async-PlayerChunkMap-operations.patch similarity index 92% rename from Spigot-Server-Patches/0099-Catch-Async-PlayerChunkMap-operations.patch rename to Spigot-Server-Patches/0098-Catch-Async-PlayerChunkMap-operations.patch index 6b281f83d8..fbf5456060 100644 --- a/Spigot-Server-Patches/0099-Catch-Async-PlayerChunkMap-operations.patch +++ b/Spigot-Server-Patches/0098-Catch-Async-PlayerChunkMap-operations.patch @@ -1,4 +1,4 @@ -From 31512ee99a551bd2cfb70cc1dc3351a513309310 Mon Sep 17 00:00:00 2001 +From 1da217f367d2f1e81f73d6b7f8b1359f3410f648 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 @@ -22,5 +22,5 @@ index 5421026..7100710 100644 long i = d(chunkcoordintpair.x, chunkcoordintpair.z); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0100-Support-offline-mode-in-whitelist-command-as-well.patch b/Spigot-Server-Patches/0099-Support-offline-mode-in-whitelist-command-as-well.patch similarity index 92% rename from Spigot-Server-Patches/0100-Support-offline-mode-in-whitelist-command-as-well.patch rename to Spigot-Server-Patches/0099-Support-offline-mode-in-whitelist-command-as-well.patch index ba93ebae6c..7842031ee7 100644 --- a/Spigot-Server-Patches/0100-Support-offline-mode-in-whitelist-command-as-well.patch +++ b/Spigot-Server-Patches/0099-Support-offline-mode-in-whitelist-command-as-well.patch @@ -1,11 +1,11 @@ -From b24a42a51ce2b505c2e5c4d6db906c86fde03305 Mon Sep 17 00:00:00 2001 +From f989b42f5b3ba73c09345df011db7c83eac75f06 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 fdc9210..49e9ce1 100644 +index b52bf74..8da137e 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,13 +44,14 @@ index fdc9210..49e9ce1 100644 a(icommandlistener, (ICommand) this, "commands.whitelist.remove.success", new Object[] { astring[1]}); } else if (astring[0].equals("reload")) { minecraftserver.getPlayerList().reloadWhitelist(); -@@ -95,4 +106,41 @@ public class CommandWhitelist extends CommandAbstract { - return a((ICommand) o); +@@ -88,4 +99,43 @@ public class CommandWhitelist extends CommandAbstract { + return Collections.emptyList(); + } } - // Paper end + ++ // Paper start + /** -+ * Paper - Adds or removes a player from the game whitelist ++ * Adds or removes a player from the game whitelist + * + * @param mcserver running instance of MinecraftServer + * @param playerName the player we're going to be whitelisting @@ -85,7 +86,8 @@ index fdc9210..49e9ce1 100644 + } + } + } ++ // Paper end } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0101-Optimize-Chunk-Unload-Queue.patch b/Spigot-Server-Patches/0100-Optimize-Chunk-Unload-Queue.patch similarity index 99% rename from Spigot-Server-Patches/0101-Optimize-Chunk-Unload-Queue.patch rename to Spigot-Server-Patches/0100-Optimize-Chunk-Unload-Queue.patch index b9549cc2c9..5f39f7aace 100644 --- a/Spigot-Server-Patches/0101-Optimize-Chunk-Unload-Queue.patch +++ b/Spigot-Server-Patches/0100-Optimize-Chunk-Unload-Queue.patch @@ -1,4 +1,4 @@ -From e26a0dcdf9c130cac19a89266af08f9ec5adaf8a Mon Sep 17 00:00:00 2001 +From 37286df2722a024569953f7d0627bc1c231a1826 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 17:57:25 -0400 Subject: [PATCH] Optimize Chunk Unload Queue @@ -348,5 +348,5 @@ index a1bd1a6..7fcd437 100644 { isActive = false; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0102-Fix-SkullCache-case-bug.patch b/Spigot-Server-Patches/0101-Fix-SkullCache-case-bug.patch similarity index 93% rename from Spigot-Server-Patches/0102-Fix-SkullCache-case-bug.patch rename to Spigot-Server-Patches/0101-Fix-SkullCache-case-bug.patch index 5a899fd729..19298364fb 100644 --- a/Spigot-Server-Patches/0102-Fix-SkullCache-case-bug.patch +++ b/Spigot-Server-Patches/0101-Fix-SkullCache-case-bug.patch @@ -1,4 +1,4 @@ -From 25f458b42dc059d51743f85b6340048c777b7552 Mon Sep 17 00:00:00 2001 +From da3e50d1652f69d0f5fb9522ec10e881cb9fc384 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jan 2016 21:48:24 -0500 Subject: [PATCH] Fix SkullCache case bug @@ -18,5 +18,5 @@ index 7eecc6c..3c20ef3 100644 callback.apply(profile); } else { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0103-Waving-banner-workaround.patch b/Spigot-Server-Patches/0102-Waving-banner-workaround.patch similarity index 94% rename from Spigot-Server-Patches/0103-Waving-banner-workaround.patch rename to Spigot-Server-Patches/0102-Waving-banner-workaround.patch index e330ef9d4b..4f0fa6054e 100644 --- a/Spigot-Server-Patches/0103-Waving-banner-workaround.patch +++ b/Spigot-Server-Patches/0102-Waving-banner-workaround.patch @@ -1,4 +1,4 @@ -From 2d41484aecd2aa30d934c36ce9b78f085bf5dfd2 Mon Sep 17 00:00:00 2001 +From 00a2f241b17ef929b9355f54fdf2b47cf24ef1ca 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.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0104-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0103-Use-a-Shared-Random-for-Entities.patch similarity index 92% rename from Spigot-Server-Patches/0104-Use-a-Shared-Random-for-Entities.patch rename to Spigot-Server-Patches/0103-Use-a-Shared-Random-for-Entities.patch index c780b490fd..e72a28cbe7 100644 --- a/Spigot-Server-Patches/0104-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0103-Use-a-Shared-Random-for-Entities.patch @@ -1,4 +1,4 @@ -From 955f9898c8dadc03491cd96489b4764b080e38d6 Mon Sep 17 00:00:00 2001 +From 2c65576061d5389c06554fc760fa93afd8322eb4 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 4a09ec3..cf89b20 100644 +index 3ded885..6bdb76e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -45,6 +45,7 @@ public abstract class Entity implements ICommandListener { @@ -27,5 +27,5 @@ index 4a09ec3..cf89b20 100644 this.justCreated = true; this.uniqueID = MathHelper.a(this.random); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0105-Don-t-teleport-dead-entities.patch b/Spigot-Server-Patches/0104-Don-t-teleport-dead-entities.patch similarity index 90% rename from Spigot-Server-Patches/0105-Don-t-teleport-dead-entities.patch rename to Spigot-Server-Patches/0104-Don-t-teleport-dead-entities.patch index bbd4056264..a947b99dd5 100644 --- a/Spigot-Server-Patches/0105-Don-t-teleport-dead-entities.patch +++ b/Spigot-Server-Patches/0104-Don-t-teleport-dead-entities.patch @@ -1,4 +1,4 @@ -From ddf153243e16bbaf898972af89ee86633247c4d5 Mon Sep 17 00:00:00 2001 +From 53747cbca7417b33a59fdc3288cb3301594259e4 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,7 +7,7 @@ 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 cf89b20..da8b434 100644 +index 6bdb76e..2637e60 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2109,7 +2109,7 @@ public abstract class Entity implements ICommandListener { @@ -20,5 +20,5 @@ index cf89b20..da8b434 100644 WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle(); int i = worldserver1.dimension; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0106-Optimize-Chunk-Access.patch b/Spigot-Server-Patches/0105-Optimize-Chunk-Access.patch similarity index 96% rename from Spigot-Server-Patches/0106-Optimize-Chunk-Access.patch rename to Spigot-Server-Patches/0105-Optimize-Chunk-Access.patch index 04b86df820..6dcd3fd02a 100644 --- a/Spigot-Server-Patches/0106-Optimize-Chunk-Access.patch +++ b/Spigot-Server-Patches/0105-Optimize-Chunk-Access.patch @@ -1,4 +1,4 @@ -From 075c6a844c9b87d35a5ce5a5722b0e37c83ad5bb Mon Sep 17 00:00:00 2001 +From 90e134ecf1742e7882e0b1d9a0fea51236fd0317 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 27 Aug 2015 01:15:02 -0400 Subject: [PATCH] Optimize Chunk Access @@ -86,10 +86,10 @@ index 0a3cfbc..825e931 100644 public Chunk getChunkIfLoaded(int x, int z) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0e1cbfe..7e06fa9 100644 +index 47dbea8..b859c51 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -200,6 +200,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -203,6 +203,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { // CraftBukkit end public void doTick() { @@ -110,5 +110,5 @@ index c81dfee..ec62b1f 100644 // Update neighbor counts for (int xx = -2; xx < 3; xx++) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0107-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0106-Configurable-spawn-chances-for-skeleton-horses.patch similarity index 91% rename from Spigot-Server-Patches/0107-Configurable-spawn-chances-for-skeleton-horses.patch rename to Spigot-Server-Patches/0106-Configurable-spawn-chances-for-skeleton-horses.patch index f6c034eda1..8d932e7504 100644 --- a/Spigot-Server-Patches/0107-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0106-Configurable-spawn-chances-for-skeleton-horses.patch @@ -1,4 +1,4 @@ -From b00ca434639def8f7a3ceb9c85ef6186d47af291 Mon Sep 17 00:00:00 2001 +From 52834641965d3823b1d464616db2fb9bbc27e597 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 @@ -19,10 +19,10 @@ index 7d8a541..66ba48a 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7e06fa9..f7bb918 100644 +index b859c51..fd1150b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -426,7 +426,10 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -429,7 +429,10 @@ public class WorldServer extends World implements IAsyncTaskHandler { if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.D(blockposition); @@ -35,5 +35,5 @@ index 7e06fa9..f7bb918 100644 entityhorse.setType(EnumHorseType.SKELETON); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0108-Optimize-isValidLocation-for-inlining.patch b/Spigot-Server-Patches/0107-Optimize-isValidLocation-for-inlining.patch similarity index 98% rename from Spigot-Server-Patches/0108-Optimize-isValidLocation-for-inlining.patch rename to Spigot-Server-Patches/0107-Optimize-isValidLocation-for-inlining.patch index 53802e5986..af03512edd 100644 --- a/Spigot-Server-Patches/0108-Optimize-isValidLocation-for-inlining.patch +++ b/Spigot-Server-Patches/0107-Optimize-isValidLocation-for-inlining.patch @@ -1,4 +1,4 @@ -From 582d4af0eb99687080da0728560e2202ed04a87c Mon Sep 17 00:00:00 2001 +From 551294f564c0fa74d282ee54ad8efea388161f38 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Mar 2016 23:41:34 -0400 Subject: [PATCH] Optimize isValidLocation for inlining @@ -8,7 +8,7 @@ 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 f0908a2..d1688e1 100644 +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 { @@ -118,5 +118,5 @@ index 825e931..b5406e9 100644 } else { Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0109-Use-correct-item-in-arrow-pickup-event.patch b/Spigot-Server-Patches/0108-Use-correct-item-in-arrow-pickup-event.patch similarity index 94% rename from Spigot-Server-Patches/0109-Use-correct-item-in-arrow-pickup-event.patch rename to Spigot-Server-Patches/0108-Use-correct-item-in-arrow-pickup-event.patch index d168f5741c..69dd302ea5 100644 --- a/Spigot-Server-Patches/0109-Use-correct-item-in-arrow-pickup-event.patch +++ b/Spigot-Server-Patches/0108-Use-correct-item-in-arrow-pickup-event.patch @@ -1,11 +1,11 @@ -From cb0cd69765009c61da1bfe006de106ba65eee7fa Mon Sep 17 00:00:00 2001 +From 010b8cf40e7f0e7af73a26a32e20b247bb2374ef 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 8c261d0..97948f4 100644 +index a073e6c..6749898 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 { @@ -27,5 +27,5 @@ index 8c261d0..97948f4 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0110-Fix-cooked-fish-legacy-import.patch b/Spigot-Server-Patches/0109-Fix-cooked-fish-legacy-import.patch similarity index 93% rename from Spigot-Server-Patches/0110-Fix-cooked-fish-legacy-import.patch rename to Spigot-Server-Patches/0109-Fix-cooked-fish-legacy-import.patch index 1c81570cfd..4c5d2b9312 100644 --- a/Spigot-Server-Patches/0110-Fix-cooked-fish-legacy-import.patch +++ b/Spigot-Server-Patches/0109-Fix-cooked-fish-legacy-import.patch @@ -1,4 +1,4 @@ -From 0d20c24a6c30ad425c511216c9cc8ef4e78f1fc8 Mon Sep 17 00:00:00 2001 +From d0d8685cfd509adfb38b1b43e340915833202ede 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.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0111-Load-chunk-before-player-teleport.patch b/Spigot-Server-Patches/0110-Load-chunk-before-player-teleport.patch similarity index 93% rename from Spigot-Server-Patches/0111-Load-chunk-before-player-teleport.patch rename to Spigot-Server-Patches/0110-Load-chunk-before-player-teleport.patch index 48981a4a72..5b0c42dd6e 100644 --- a/Spigot-Server-Patches/0111-Load-chunk-before-player-teleport.patch +++ b/Spigot-Server-Patches/0110-Load-chunk-before-player-teleport.patch @@ -1,4 +1,4 @@ -From 562e105bbb5bda677214a8be2b1e3be52457839c Mon Sep 17 00:00:00 2001 +From fd475da2c48964e0ea04cbe945c0c11f71b94dfd Mon Sep 17 00:00:00 2001 From: Gabscap Date: Sat, 26 Mar 2016 18:41:22 +0100 Subject: [PATCH] Load chunk before player teleport @@ -23,5 +23,5 @@ index fe5084e..d77211a 100644 if (fromWorld == toWorld) { entity.playerConnection.teleport(to); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0112-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch b/Spigot-Server-Patches/0111-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch similarity index 98% rename from Spigot-Server-Patches/0112-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch rename to Spigot-Server-Patches/0111-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch index b107fcc29b..2352774a21 100644 --- a/Spigot-Server-Patches/0112-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch +++ b/Spigot-Server-Patches/0111-Prevent-possible-infinite-loop-in-BlockPosition-iter.patch @@ -1,4 +1,4 @@ -From f7eb7e7f48789ec63ed17a648a7086f730e58cdc Mon Sep 17 00:00:00 2001 +From 5cf2de3b1381af0c32b0cfd020b12ce6d05d47d6 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 @@ -87,5 +87,5 @@ index 2d56f02..b87c4c6 100644 // Paper start - modify base position variables ((BaseBlockPosition) this.b).a = i; -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0113-Access-items-by-EquipmentSlot.patch b/Spigot-Server-Patches/0112-Access-items-by-EquipmentSlot.patch similarity index 96% rename from Spigot-Server-Patches/0113-Access-items-by-EquipmentSlot.patch rename to Spigot-Server-Patches/0112-Access-items-by-EquipmentSlot.patch index 5af2e87388..efc6b4238d 100644 --- a/Spigot-Server-Patches/0113-Access-items-by-EquipmentSlot.patch +++ b/Spigot-Server-Patches/0112-Access-items-by-EquipmentSlot.patch @@ -1,4 +1,4 @@ -From 10c6150a48e2a65c2b689a54529fb5a05272770b Mon Sep 17 00:00:00 2001 +From c45edfb67ae5072a2a5dfdbe9c4012c888ed7c94 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 0902386..19662da 100644 + // Paper end } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0114-Check-async-remove-unused-vars-GH-159.patch b/Spigot-Server-Patches/0113-Check-async-remove-unused-vars-GH-159.patch similarity index 95% rename from Spigot-Server-Patches/0114-Check-async-remove-unused-vars-GH-159.patch rename to Spigot-Server-Patches/0113-Check-async-remove-unused-vars-GH-159.patch index 9fea7076af..4e12598c57 100644 --- a/Spigot-Server-Patches/0114-Check-async-remove-unused-vars-GH-159.patch +++ b/Spigot-Server-Patches/0113-Check-async-remove-unused-vars-GH-159.patch @@ -1,4 +1,4 @@ -From 89a445c07fdd5030baa8307fd083e376b646867b Mon Sep 17 00:00:00 2001 +From 442c1cd9adabfa9d608bba2341e09588d22bd9af 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 @@ -28,5 +28,5 @@ index 721bcae..3ba55d7 100644 if ((mobcnt = getEntityCount(worldserver, enumcreaturetype.a())) <= limit * i / 256) { BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0115-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch b/Spigot-Server-Patches/0114-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch similarity index 92% rename from Spigot-Server-Patches/0115-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch rename to Spigot-Server-Patches/0114-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch index a0b08b6a59..04ead47895 100644 --- a/Spigot-Server-Patches/0115-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch +++ b/Spigot-Server-Patches/0114-Option-to-disable-BlockPhysicsEvent-for-Redstone.patch @@ -1,4 +1,4 @@ -From 871e055e21f6d81aee4c4a8ebf7ba987abe0af06 Mon Sep 17 00:00:00 2001 +From 4813940c2a3f49cc5656021b86802fad492efc17 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 @@ -38,10 +38,10 @@ index b5406e9..fcd7cd6 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 f7bb918..3c41a0c 100644 +index fd1150b..f170d7a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -29,6 +29,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; +@@ -32,6 +32,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 f7bb918..3c41a0c 100644 private final MinecraftServer server; public EntityTracker tracker; private final PlayerChunkMap manager; -@@ -766,6 +767,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -742,6 +743,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 f7bb918..3c41a0c 100644 iblockdata.getBlock().b((World) this, nextticklistentry.a, iblockdata, this.random); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Exception while ticking a block"); -@@ -773,7 +775,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { +@@ -749,7 +751,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { CrashReportSystemDetails.a(crashreportsystemdetails, nextticklistentry.a, iblockdata); throw new ReportedException(crashreport); @@ -67,5 +67,5 @@ index f7bb918..3c41a0c 100644 timing.stopTiming(); // Paper } else { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0116-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0115-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 93% rename from Spigot-Server-Patches/0116-Entity-AddTo-RemoveFrom-World-Events.patch rename to Spigot-Server-Patches/0115-Entity-AddTo-RemoveFrom-World-Events.patch index a38bdbda93..103fa005a1 100644 --- a/Spigot-Server-Patches/0116-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0115-Entity-AddTo-RemoveFrom-World-Events.patch @@ -1,4 +1,4 @@ -From 5c9cf706ab6830412c90caeb2e3aacb8eead887f Mon Sep 17 00:00:00 2001 +From 9cfb72beaff0ebaa90f24e86e409410a268d565c 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 @@ -25,5 +25,5 @@ index fcd7cd6..fa84bad 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0117-Configurable-Chunk-Inhabited-Timer.patch b/Spigot-Server-Patches/0116-Configurable-Chunk-Inhabited-Timer.patch similarity index 95% rename from Spigot-Server-Patches/0117-Configurable-Chunk-Inhabited-Timer.patch rename to Spigot-Server-Patches/0116-Configurable-Chunk-Inhabited-Timer.patch index de76cab6f6..6e6295a712 100644 --- a/Spigot-Server-Patches/0117-Configurable-Chunk-Inhabited-Timer.patch +++ b/Spigot-Server-Patches/0116-Configurable-Chunk-Inhabited-Timer.patch @@ -1,4 +1,4 @@ -From e98e5779ce26d8e3ac106551c07fc2a8c6bff37f Mon Sep 17 00:00:00 2001 +From 9f0319957909bbe303e1e8e7a3163b3ef550ef66 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:46:14 -0400 Subject: [PATCH] Configurable Chunk Inhabited Timer @@ -36,5 +36,5 @@ index 6e3d17b..9334a0a 100644 public void c(long i) { -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0118-EntityPathfindEvent.patch b/Spigot-Server-Patches/0117-EntityPathfindEvent.patch similarity index 96% rename from Spigot-Server-Patches/0118-EntityPathfindEvent.patch rename to Spigot-Server-Patches/0117-EntityPathfindEvent.patch index ec347d1b90..2b6f783849 100644 --- a/Spigot-Server-Patches/0118-EntityPathfindEvent.patch +++ b/Spigot-Server-Patches/0117-EntityPathfindEvent.patch @@ -1,4 +1,4 @@ -From e5e8089880653c1435a16e5f25731a5b5ba1bf6e Mon Sep 17 00:00:00 2001 +From 54ac4679bd5f98cde6a96547de0890155ae4c391 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 21:22:26 -0400 Subject: [PATCH] EntityPathfindEvent @@ -35,5 +35,5 @@ index 9687785..0926d22 100644 float f = this.h(); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0119-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch b/Spigot-Server-Patches/0118-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch similarity index 97% rename from Spigot-Server-Patches/0119-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch rename to Spigot-Server-Patches/0118-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch index 4e1a79da6d..15db765b3f 100644 --- a/Spigot-Server-Patches/0119-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch +++ b/Spigot-Server-Patches/0118-Prevent-Waterflow-BlockFromToEvent-from-loading-chun.patch @@ -1,4 +1,4 @@ -From 7c816e1d8b983ebe5f4b22653c75160ea66477da Mon Sep 17 00:00:00 2001 +From 770da115b23d30ad4a609da7661ea50d232c75fb 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 @@ -48,5 +48,5 @@ index 51b80cb..0a3d673 100644 if (this.material == Material.LAVA) { this.fizz(world, blockposition); -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0120-Minecart-drop-name-workaround.patch b/Spigot-Server-Patches/0119-Minecart-drop-name-workaround.patch similarity index 93% rename from Spigot-Server-Patches/0120-Minecart-drop-name-workaround.patch rename to Spigot-Server-Patches/0119-Minecart-drop-name-workaround.patch index f43822fbd5..ddf36d9ba8 100644 --- a/Spigot-Server-Patches/0120-Minecart-drop-name-workaround.patch +++ b/Spigot-Server-Patches/0119-Minecart-drop-name-workaround.patch @@ -1,4 +1,4 @@ -From 1cb42951e84776c7f32e6d2f243b9f41c167584a Mon Sep 17 00:00:00 2001 +From aa3ae67c4b3850173137954a092bba770fc7927f Mon Sep 17 00:00:00 2001 From: Fabse Date: Mon, 28 Mar 2016 00:46:46 +0200 Subject: [PATCH] Minecart drop name workaround @@ -20,5 +20,5 @@ index a649ae7..f0d503c 100644 } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0121-Reduce-IO-ops-opening-a-new-region-file.patch b/Spigot-Server-Patches/0120-Reduce-IO-ops-opening-a-new-region-file.patch similarity index 96% rename from Spigot-Server-Patches/0121-Reduce-IO-ops-opening-a-new-region-file.patch rename to Spigot-Server-Patches/0120-Reduce-IO-ops-opening-a-new-region-file.patch index 81d2cca9e3..e6bc6ab15a 100644 --- a/Spigot-Server-Patches/0121-Reduce-IO-ops-opening-a-new-region-file.patch +++ b/Spigot-Server-Patches/0120-Reduce-IO-ops-opening-a-new-region-file.patch @@ -1,4 +1,4 @@ -From f4b6d00080910b49b4c23960d50f8d2ef41e05eb Mon Sep 17 00:00:00 2001 +From 270bac107f50d5aa1a06d53c27446958fb031f80 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.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0122-Sanitise-RegionFileCache-and-make-configurable.patch b/Spigot-Server-Patches/0121-Sanitise-RegionFileCache-and-make-configurable.patch similarity index 97% rename from Spigot-Server-Patches/0122-Sanitise-RegionFileCache-and-make-configurable.patch rename to Spigot-Server-Patches/0121-Sanitise-RegionFileCache-and-make-configurable.patch index 6031d78a80..9e4e658dc1 100644 --- a/Spigot-Server-Patches/0122-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/Spigot-Server-Patches/0121-Sanitise-RegionFileCache-and-make-configurable.patch @@ -1,4 +1,4 @@ -From 1c73ddcbe1da095e26689b846f058d03523e4d7d Mon Sep 17 00:00:00 2001 +From b907ce7134a5744f6cf922ccdb72558ff26d5748 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. @@ -77,5 +77,5 @@ index 5eb01c3..9744e72 100644 Iterator iterator = RegionFileCache.a.values().iterator(); -- -1.9.1 +2.8.0 diff --git a/Spigot-Server-Patches/0123-Add-getEntity-by-UUID-API.patch b/Spigot-Server-Patches/0122-Add-getEntity-by-UUID-API.patch similarity index 95% rename from Spigot-Server-Patches/0123-Add-getEntity-by-UUID-API.patch rename to Spigot-Server-Patches/0122-Add-getEntity-by-UUID-API.patch index bb3c80bbcf..c85b9c09ad 100644 --- a/Spigot-Server-Patches/0123-Add-getEntity-by-UUID-API.patch +++ b/Spigot-Server-Patches/0122-Add-getEntity-by-UUID-API.patch @@ -1,11 +1,11 @@ -From 0e1abba6b1186ab06e0ed8ecf5ceb00c1494c2d3 Mon Sep 17 00:00:00 2001 +From 88d6d362e1437fc065603bbbb558448ff2443d52 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 d628a32..a785412 100644 +index 058735e..0c037ff 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1622,4 +1622,17 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -54,5 +54,5 @@ index 9ed9fbb..5b70d7a 100644 // Paper end } -- -2.7.4 +2.8.0 diff --git a/Spigot-Server-Patches/0124-Use-FastUtil-Long-Int-HashMap-s.patch b/Spigot-Server-Patches/0123-Use-FastUtil-Long-Int-HashMap-s.patch similarity index 96% rename from Spigot-Server-Patches/0124-Use-FastUtil-Long-Int-HashMap-s.patch rename to Spigot-Server-Patches/0123-Use-FastUtil-Long-Int-HashMap-s.patch index bffa8b9bd4..d14cd0b45d 100644 --- a/Spigot-Server-Patches/0124-Use-FastUtil-Long-Int-HashMap-s.patch +++ b/Spigot-Server-Patches/0123-Use-FastUtil-Long-Int-HashMap-s.patch @@ -1,4 +1,4 @@ -From 7f072c4fec3c43714ecadef5b6931f789bf4f648 Mon Sep 17 00:00:00 2001 +From c12c8e716ed41b8cee8d9f1057d1e138b73d7169 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 30 Mar 2016 02:13:24 -0400 Subject: [PATCH] Use FastUtil Long/Int HashMap's @@ -31,7 +31,7 @@ index f31ffe2..646197c 100644 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 26bec1c..88f340d 100644 +index f1c62ec..deb9643 100644 --- a/src/main/java/net/minecraft/server/DataWatcher.java +++ b/src/main/java/net/minecraft/server/DataWatcher.java @@ -11,13 +11,15 @@ import java.util.List; @@ -52,5 +52,5 @@ index 26bec1c..88f340d 100644 private boolean e = true; private boolean f; -- -2.7.4 +2.8.0 diff --git a/applyPatches.sh b/applyPatches.sh index 515cf05d1b..62b82e5b24 100755 --- a/applyPatches.sh +++ b/applyPatches.sh @@ -53,6 +53,10 @@ basedir=$basedir/Spigot popd basedir=$(dirname "$basedir") +echo "Importing MC Dev" + +./importmcdev.sh + # Apply paper ( applyPatch Spigot/Spigot-API Paper-API HEAD && diff --git a/importmcdev.sh b/importmcdev.sh new file mode 100755 index 0000000000..3a241fb58e --- /dev/null +++ b/importmcdev.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +nms="net/minecraft/server" +export MODLOG="" +PS1="$" +basedir=`pwd` + +workdir=$basedir/work +minecraftversion=$(cat BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) +decompiledir=$workdir/$minecraftversion + +export importedmcdev="" +function import { + export importedmcdev="$importedmcdev $1" + file="${1}.java" + target="$basedir/Spigot/Spigot-Server/src/main/java/$nms/$file" + base="$decompiledir/$nms/$file" + + if [[ ! -f "$target" ]]; then + export MODLOG="$MODLOG Imported $file from mc-dev\n"; + echo "Copying $base to $target" + cp "$base" "$target" + fi +} + +( + cd Spigot/Spigot-Server/ + lastlog=$(git log -1 --oneline) + if [[ "$lastlog" = *"mc-dev Imports"* ]]; then + git reset --hard HEAD^ + fi +) + +import BaseBlockPosition +import BiomeBase +import BiomeMesa +import BlockChest +import BlockFalling +import BlockFluids +import BlockPosition +import BlockStateList +import ChunkProviderFlat +import ChunkProviderGenerate +import ChunkProviderHell +import CommandAbstract +import CommandScoreboard +import CommandWhitelist +import DataConverterMaterialId +import EULA +import EntitySquid +import FileIOThread +import ItemBlock +import PacketPlayInResourcePackStatus +import PacketPlayOutPlayerListHeaderFooter +import PacketPlayOutTitle +import PacketPlayOutUpdateTime +import PathfinderGoalFloat +import PersistentVillage +import TileEntityEnderChest + +( + cd Spigot/Spigot-Server/ + git add src -A + echo -e "mc-dev Imports\n\n$MODLOG" | git commit src -F - +) diff --git a/paperclip.sh b/paperclip.sh index 5502cb1fe7..c6078c47ea 100755 --- a/paperclip.sh +++ b/paperclip.sh @@ -1,14 +1,19 @@ #!/usr/bin/env bash +basedir=`pwd` +workdir=$basedir/work +mcver=$(cat BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) +decompiledir="$workdir/$mcver" + +paperjar="$basedir/$(ls ./Paper-Server/target/paper*-SNAPSHOT.jar)" +vanillajar="${decompiledir}/${mcver}.jar" -cp ./Paper-Server/target/paper*-SNAPSHOT.jar ./Paperclip/paper-1.9.jar -cp ./work/1.9/1.9.jar ./Paperclip/minecraft_server.1.9.jar cd ./Paperclip -mvn clean package +mvn clean package -Dmcver=${mcver} -Dpaperjar="${paperjar}" -Dvanillajar="${vanillajar}" cd .. -cp ./Paperclip/target/paperclip*-SNAPSHOT.jar ./paperclip.jar +cp ./Paperclip/target/paperclip-${mcver}.jar ./paperclip-${mcver}.jar echo "" echo "" echo "" echo "Build success!" -echo "Copied final jar to $(pwd)/paperclip.jar" +echo "Copied final jar to $(pwd)/paperclip-${mcver}.jar"