From de30a3e5e293a5ece224bac0bb2301095ad6ddbf Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Wed, 9 Sep 2020 07:01:21 -0500 Subject: [PATCH] Updated Upstream (Paper & Tuinity) Upstream has released updates that appears to apply and compile correctly Paper Changes: 54890033 [Auto] Updated Upstream (CraftBukkit) f96c6f5c [Auto] Updated Upstream (CraftBukkit) 4be8312f [CI-SKIP] [Auto] Rebuild Patches 43e5174a Fix Entity Teleportation and cancel velocity if teleported (#4210) 0fb3daf4 [Auto] Updated Upstream (CraftBukkit) 819ff324 Use wrapped StructureManager to prevent worldgen deadlock 507f302c Fix Zombie ShouldBurnInDay API (#4268) ef5af6f6 [Auto] Updated Upstream (CraftBukkit) 101b0110 [Auto] Updated Upstream (Bukkit/CraftBukkit) 03689cf9 Fix javadoc (#4276) c247857f Cache block data strings ce2eae5c [Auto] Updated Upstream (Bukkit/CraftBukkit) 563f77ad install remapped server jar to paper package space 1ab021dd Updated Upstream (Bukkit/CraftBukkit) c970f880 Properly pass the close reason for new inventory opens (#2658) (#4247) 07bca94f Create HoverEvent from ItemStack Entity da33f8bb Add a way to get translation keys for blocks, entities and materials 5a20cbd7 Add more Evoker API 7a3e2520 [Auto] Updated Upstream (CraftBukkit) b0cbebdc Fix build conflicts dfc54a8b Add zombie targets turtle egg config (#4181) 0fe00f61 Add BellRingEvent for village bells (#2230) 414e5e1d fix #4144 (#4170) 5c7f3fc0 Fix PersistentDataContainer contract violation (_->!null returns null) (#3990) 65dbf5ff [CI-SKIP] [Auto] Rebuild Patches 7ed0f7f0 Fix NPE in getBedSpawnLocation (#4238) 9e0f1101 [CI-SKIP] Add issue template 6c138412 Fix CraftTeam null check (#4249) 32e45448 Update Paperclip b84a37b7 Update Armor items in PlayerArmorChangeEvent (#4243) a67abf5b Increase visibility of a few methods 7d69214b [Auto] Updated Upstream (CraftBukkit) cbfc2362 PortalCreateEvent needs to know its entity 29032edb Fix PersistentDataContainer contract violation (_->!null returns null) f42c53df [CI-SKIP] [Auto] Rebuild Patches 3efe45f5 Port Eigencraft to 1.16 0bad6958 Make engine-mode 2 truly random cd06ca5e Updated Upstream (CraftBukkit) ef36b4f8 Fix TNT not pushing creative players 915fe522 Fix hex colors not working in some kick messages f5904171 [Auto] Updated Upstream (Bukkit/CraftBukkit) 757948dc [Auto] Updated Upstream (CraftBukkit) 0893de14 Fix reading the brand message from clients 243d2313 Updated Upstream (Bukkit/CraftBukkit) 4cc7de6c Add playPickupItemAnimation to LivingEntity 20fc1b5c [Auto] Updated Upstream (CraftBukkit/Spigot) 655258b3 [Auto] Updated Upstream (CraftBukkit) 167b1db6 Fix some modded clients getting kicked for invalid payload - Fixes #4201 7f0786cd Fix enderdragon tracking range to honor vanilla 586073c3 [CI-SKIP] Update README.md (for 1.16.2) (#4202) 853f4168 Remove debug 4d7ea429 fix config option in last commit 74d27463 Buffer joins to world ac96307b [CI-SKIP] switch back to trusty now we figured out the issue c97ce029 1.16.2 Release (#4123) 5486b3db Fix javadocs failing jenkins builds (#4189) 1330eb5f Brand support b8372fc0 Improve handling of indestructable blocks a2a06640 Add moon phase API 47f71aea Fix SpawnChangeEvent not firing for all use-cases b6c860f2 Don't require FACING data 0c1716a1 Add #setMaxPlayers API 02aed275 [CI-SKIP] Require dependencies script (#4172) 1ccc1c67 Add smithing item helpers 627f4b85 Brand support 20d9ec6b Fix MC-197271 e9287056 [CI-SKIP] Update issue templates with notices dccaf59a MC-197883: Bandaid decode issue 99a1e58f Merge branch 'master' into progress/1.16.2 ecbc5ca0 Updated Upstream (CraftBukkit) 99362d3c Decomp fix 5f9861a0 Fix MC-197883 by specifying the typeKey 1d8c9c23 [CI-SKIP] Make checkoutpr.sh use $SHELL (#4167) 2b1ca210 update checkout-pr to latest I use 95c9b45d Fix IDE Debug JVM Flag 2 (#4141) 9e6d742c Merge remote-tracking branch 'origin/master' into progress/1.16.2 c8542f23 Fix MC-99259 Wither Boss Bar doesn't update until invulnerability period is over (#4164) 862b8c18 Updated Upstream (Bukkit/CraftBukkit) 100d51eb Do not obfuscate air (#4149) 47740f67 Updated Upstream (CraftBukkit) 948c20e0 Merge remote-tracking branch 'origin/master' into progress/1.16.2 1daafe45 Updated Upstream (Bukkit/CraftBukkit) 98828b00 Merge pull request #4132 from Proximyst/progress/1.16.2 b23f27f8 Fix incorrect return for WorldServer#addAllEntitiesSafely (#3) 5085fa30 Fix MC-187716 Use configured height c44add5a Initialise a new chunk section if none was found yet updated 74a4d5f8 Remove armour stand double add to world 6d25cc4e Don't mark null chunk sections for block updates 1ba2f214 Updated Upstream (Bukkit/CraftBukkit) d29d5aaa Fix anti xray ce6bbaa4 Import fastutil classes patch 9d4616a4 Updated Upstream (Bukkit/CraftBukkit) 109d072b Fix test, add strider mob goal and fix piglin goals e6caaa20 Fix running; forgot to push this ee7dce8b Add this to SHIT_TO_CHECK.md aswell d378257c Fix IDE debug JVM flag for 1.16.2 0d8db446 Merge pull request #4112 from BillyGalbreath/progress/1.16.2 d319d8c4 It compiles! 8f8371c5 Add an OBFHELPER 9caa8e9f missed this 3ce5a5d7 volatile 159eb2e1 Oopsies 7eb08d2f Almost ready 7ca11e97 Current progress on 1.16.2 Tuinity Changes: eaa6b50 Fix missing block property portal crash fea5fbd Retain vanilla behavior for error correction rules in collisions 9eb1a3e Do not add a delayed unload ticket for some ticket types --- .gitmodules | 2 +- Paper | 2 +- current-paper | 2 +- ...{0009-AFK-API.patch => 0008-AFK-API.patch} | 4 +- patches/api/0008-Evoker-API.patch | 32 - ...atch => 0009-Bring-back-server-name.patch} | 4 +- ...t.patch => 0010-ExecuteCommandEvent.patch} | 0 ... 0011-LivingEntity-safeFallDistance.patch} | 6 +- ...old.patch => 0012-Lagging-threshold.patch} | 4 +- ...h => 0013-ItemFactory-getMonsterEgg.patch} | 8 +- ...14-PlayerSetSpawnerTypeWithEggEvent.patch} | 2 +- ...ch => 0015-EMC-MonsterEggSpawnEvent.patch} | 2 +- ....patch => 0016-Villager-resetOffers.patch} | 2 +- ...17-SkeletonHorseTrapEvent-getPlayer.patch} | 2 +- ...LivingEntity-playPickupItemAnimation.patch | 33 - ...018-PaperPR-PlayerItemCooldownEvent.patch} | 2 +- ...Event.patch => 0019-EntityMoveEvent.patch} | 2 +- ...ch => 0020-Player-invulnerabilities.patch} | 2 +- ...4-Anvil-API.patch => 0021-Anvil-API.patch} | 6 +- ... 0022-ItemStack-convenience-methods.patch} | 6 +- patches/api/0022-PaperPR-BellRingEvent.patch | 67 - ...d-to-crystals-and-crystals-shoot-ph.patch} | 2 +- ...atch => 0024-ChatColor-conveniences.patch} | 2 +- ...t.patch => 0025-DragonEggPlaceEvent.patch} | 2 +- ...029-Ridables.patch => 0026-Ridables.patch} | 6 +- ...gurable-permission-message-upgrades.patch} | 2 +- ...028-LivingEntity-broadcastItemBreak.patch} | 8 +- ...atch => 0029-Item-entity-immunities.patch} | 2 +- .../server/0001-Tuinity-Server-Changes.patch | 802 ++++++++---- patches/server/0002-Rebrand.patch | 10 +- ...{0010-AFK-API.patch => 0009-AFK-API.patch} | 25 +- patches/server/0009-Evoker-API.patch | 67 - ...atch => 0010-Bring-back-server-name.patch} | 0 ...> 0011-Configurable-server-mod-name.patch} | 2 +- ... 0012-LivingEntity-safeFallDistance.patch} | 14 +- ...old.patch => 0013-Lagging-threshold.patch} | 2 +- ...h => 0014-ItemFactory-getMonsterEgg.patch} | 6 +- ...15-PlayerSetSpawnerTypeWithEggEvent.patch} | 15 +- ...ch => 0016-EMC-MonsterEggSpawnEvent.patch} | 2 +- ....patch => 0017-Villager-resetOffers.patch} | 0 ...18-SkeletonHorseTrapEvent-getPlayer.patch} | 0 ...LivingEntity-playPickupItemAnimation.patch | 21 - ...019-PaperPR-PlayerItemCooldownEvent.patch} | 0 ...Event.patch => 0020-EntityMoveEvent.patch} | 4 +- ...ch => 0021-Player-invulnerabilities.patch} | 16 +- ...5-Anvil-API.patch => 0022-Anvil-API.patch} | 0 ...3-Configurable-villager-brain-ticks.patch} | 0 .../0023-PaperPR-Add-BellRingEvent.patch | 43 - ...0024-Alternative-Keepalive-Handling.patch} | 8 +- ...s.patch => 0025-Silk-touch-spawners.patch} | 6 +- ...72-Fix-Add-turtle-egg-block-options.patch} | 0 ... 0027-MC-4-Fix-Item-position-desync.patch} | 0 ...-vanilla-command-permission-handler.patch} | 2 +- ...settings-suppressing-pointless-logs.patch} | 0 ...> 0030-Disable-outdated-build-check.patch} | 0 ...gs.patch => 0031-Giants-AI-settings.patch} | 14 +- ...tch => 0032-Illusioners-AI-settings.patch} | 2 +- ...> 0033-Zombie-horse-naturally-spawn.patch} | 0 ...034-Charged-creeper-naturally-spawn.patch} | 0 ...it-naturally-spawn-toast-and-killer.patch} | 0 ...er-showing-in-ping-before-server-fu.patch} | 0 ...patch => 0037-Make-Iron-Golems-Swim.patch} | 0 ...38-Dont-send-useless-entity-packets.patch} | 0 ...atch => 0039-Tulips-change-fox-type.patch} | 0 ...patch => 0040-Breedable-Polar-Bears.patch} | 0 ...atch => 0041-Chickens-can-retaliate.patch} | 0 ...ption-to-set-armorstand-step-height.patch} | 4 +- ....patch => 0043-Cat-spawning-options.patch} | 0 ...n-black-cats-spawning-in-swamp-huts.patch} | 0 ...ms.patch => 0045-Cows-eat-mushrooms.patch} | 8 +- ...ow-rotation-when-shearing-mooshroom.patch} | 0 ...patch => 0047-Pigs-give-saddle-back.patch} | 0 ...8-Snowman-drop-and-put-back-pumpkin.patch} | 0 ...> 0049-Ender-dragon-always-drop-egg.patch} | 0 ...0-Ender-dragon-always-drop-full-exp.patch} | 0 ... 0051-Signs-editable-on-right-click.patch} | 0 ...tch => 0052-Signs-allow-color-codes.patch} | 8 +- ...oisten-from-water-directly-under-it.patch} | 0 ...atch => 0054-Controllable-Minecarts.patch} | 6 +- ...ble-loot-drops-on-death-by-cramming.patch} | 6 +- ...56-Players-should-not-cram-to-death.patch} | 4 +- ...tion-to-toggle-milk-curing-bad-omen.patch} | 2 +- ...ould-check-if-entity-can-use-portal.patch} | 0 ...g-stick-should-not-update-neighbors.patch} | 2 +- ...tch => 0060-Fix-reloading-paper.yml.patch} | 2 +- ...061-Fix-the-dead-lagging-the-server.patch} | 6 +- ...Skip-events-if-there-s-no-listeners.patch} | 0 ... 0063-Add-permission-for-F3-N-debug.patch} | 4 +- ...skeleton-takes-wither-damage-option.patch} | 0 ...ch => 0065-Configurable-TPS-Catchup.patch} | 2 +- ...ow-loyalty-on-tridents-to-work-in-t.patch} | 2 +- ...erman-and-creeper-griefing-controls.patch} | 0 ...p-loot-bypass-mob-griefing-gamerule.patch} | 4 +- ...ng-can-bypass-mob-griefing-gamerule.patch} | 0 ...070-Villagers-follow-emerald-blocks.patch} | 0 ...ch => 0071-Allow-leashing-villagers.patch} | 8 +- ...rable-search-radius-for-villagers-t.patch} | 0 ...tch => 0073-Implement-infinite-lava.patch} | 0 ...4-Make-lava-flow-speed-configurable.patch} | 0 ...dd-player-death-exp-control-options.patch} | 2 +- ...-disable-saving-projectiles-to-disk.patch} | 16 +- ...077-Configurable-void-damage-height.patch} | 4 +- ...spenser-curse-of-binding-protection.patch} | 6 +- ...-for-boats-to-eject-players-on-land.patch} | 2 +- ... 0080-Add-obfhelpers-for-plugin-use.patch} | 2 +- ...n-for-zombies-targetting-turtle-eggs.patch | 35 - ...-mends-most-damages-equipment-first.patch} | 4 +- ...82-Implement-bamboo-growth-settings.patch} | 2 +- ...should-not-bypass-cramming-gamerule.patch} | 20 +- ...084-Add-5-second-tps-average-in-tps.patch} | 2 +- ...h => 0085-Implement-elytra-settings.patch} | 8 +- ...atch => 0086-Item-entity-immunities.patch} | 10 +- ...mand.patch => 0087-Add-ping-command.patch} | 0 ...=> 0088-Configurable-jockey-options.patch} | 17 +- ...d-to-crystals-and-crystals-shoot-ph.patch} | 8 +- ...090-Customizable-EnderDragon-Health.patch} | 2 +- ...> 0091-Add-phantom-spawning-options.patch} | 6 +- ...092-Implement-bed-explosion-options.patch} | 2 +- ...nt-respawn-anchor-explosion-options.patch} | 2 +- ...Add-allow-water-in-end-world-option.patch} | 4 +- ...p-kicking-non-whitelisted-player-wh.patch} | 4 +- ... => 0096-ALlow-color-codes-in-books.patch} | 8 +- ...espan.patch => 0097-Entity-lifespan.patch} | 10 +- ...eport-to-spawn-if-outside-world-bor.patch} | 6 +- ...ty.patch => 0099-Squid-EAR-immunity.patch} | 2 +- ...=> 0100-Configurable-end-spike-seed.patch} | 0 ...h => 0101-Configurable-dungeon-seed.patch} | 0 ...atch => 0102-Phantoms-burn-in-light.patch} | 2 +- ...0103-Configurable-villager-breeding.patch} | 2 +- ... 0104-Redstone-deactivates-spawners.patch} | 2 +- ...ch => 0105-Totems-work-in-inventory.patch} | 6 +- ...ch => 0106-Fix-death-message-colors.patch} | 2 +- ...-vanilla-scoreboard-colors-patch-to.patch} | 6 +- ...tch => 0108-Populator-seed-controls.patch} | 0 ...-Add-vindicator-johnny-spawn-chance.patch} | 2 +- ...t.patch => 0110-DragonEggPlaceEvent.patch} | 0 ...n-to-disable-mushroom-block-updates.patch} | 0 ...0112-Dispensers-place-anvils-option.patch} | 2 +- ...rs.patch => 0113-Allow-anvil-colors.patch} | 2 +- ...atch => 0114-Add-no-tick-block-list.patch} | 6 +- ...-disable-dolphin-treasure-searching.patch} | 2 +- ...et-reputation-when-villager-is-cure.patch} | 4 +- .../server/0116-PaperMC-Buffer-joins.patch | 48 - ...patch => 0117-Short-enderman-height.patch} | 2 +- ...top-squids-floating-on-top-of-water.patch} | 6 +- ...125-Ridables.patch => 0119-Ridables.patch} | 72 +- ...-height-for-nether-surface-builders.patch} | 0 ...ng-obsidian-valid-for-portal-frames.patch} | 8 +- ...ities-can-use-portals-configuration.patch} | 8 +- .../0122-Optimize-redstone-algorithm.patch | 1159 ----------------- ...123-LivingEntity-broadcastItemBreak.patch} | 10 +- ...ow-despawn-rate-for-all-projectiles.patch} | 0 ...zable-WitherBoss-Health-and-Healing.patch} | 2 +- ...gling-special-MobSpawners-per-world.patch} | 4 +- ...patch => 0127-Raid-cooldown-setting.patch} | 4 +- scripts/upstream.sh | 2 +- 156 files changed, 834 insertions(+), 2056 deletions(-) rename patches/api/{0009-AFK-API.patch => 0008-AFK-API.patch} (97%) delete mode 100644 patches/api/0008-Evoker-API.patch rename patches/api/{0010-Bring-back-server-name.patch => 0009-Bring-back-server-name.patch} (95%) rename patches/api/{0011-ExecuteCommandEvent.patch => 0010-ExecuteCommandEvent.patch} (100%) rename patches/api/{0012-LivingEntity-safeFallDistance.patch => 0011-LivingEntity-safeFallDistance.patch} (85%) rename patches/api/{0013-Lagging-threshold.patch => 0012-Lagging-threshold.patch} (94%) rename patches/api/{0014-ItemFactory-getMonsterEgg.patch => 0013-ItemFactory-getMonsterEgg.patch} (73%) rename patches/api/{0015-PlayerSetSpawnerTypeWithEggEvent.patch => 0014-PlayerSetSpawnerTypeWithEggEvent.patch} (98%) rename patches/api/{0016-EMC-MonsterEggSpawnEvent.patch => 0015-EMC-MonsterEggSpawnEvent.patch} (98%) rename patches/api/{0017-Villager-resetOffers.patch => 0016-Villager-resetOffers.patch} (95%) rename patches/api/{0019-SkeletonHorseTrapEvent-getPlayer.patch => 0017-SkeletonHorseTrapEvent-getPlayer.patch} (98%) delete mode 100644 patches/api/0018-LivingEntity-playPickupItemAnimation.patch rename patches/api/{0020-PaperPR-PlayerItemCooldownEvent.patch => 0018-PaperPR-PlayerItemCooldownEvent.patch} (98%) rename patches/api/{0021-EntityMoveEvent.patch => 0019-EntityMoveEvent.patch} (99%) rename patches/api/{0023-Player-invulnerabilities.patch => 0020-Player-invulnerabilities.patch} (97%) rename patches/api/{0024-Anvil-API.patch => 0021-Anvil-API.patch} (97%) rename patches/api/{0025-ItemStack-convenience-methods.patch => 0022-ItemStack-convenience-methods.patch} (99%) delete mode 100644 patches/api/0022-PaperPR-BellRingEvent.patch rename patches/api/{0026-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch => 0023-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch} (97%) rename patches/api/{0027-ChatColor-conveniences.patch => 0024-ChatColor-conveniences.patch} (97%) rename patches/api/{0028-DragonEggPlaceEvent.patch => 0025-DragonEggPlaceEvent.patch} (98%) rename patches/api/{0029-Ridables.patch => 0026-Ridables.patch} (94%) rename patches/api/{0030-Configurable-permission-message-upgrades.patch => 0027-Configurable-permission-message-upgrades.patch} (97%) rename patches/api/{0031-LivingEntity-broadcastItemBreak.patch => 0028-LivingEntity-broadcastItemBreak.patch} (78%) rename patches/api/{0032-Item-entity-immunities.patch => 0029-Item-entity-immunities.patch} (97%) rename patches/server/{0010-AFK-API.patch => 0009-AFK-API.patch} (94%) delete mode 100644 patches/server/0009-Evoker-API.patch rename patches/server/{0011-Bring-back-server-name.patch => 0010-Bring-back-server-name.patch} (100%) rename patches/server/{0012-Configurable-server-mod-name.patch => 0011-Configurable-server-mod-name.patch} (97%) rename patches/server/{0013-LivingEntity-safeFallDistance.patch => 0012-LivingEntity-safeFallDistance.patch} (89%) rename patches/server/{0014-Lagging-threshold.patch => 0013-Lagging-threshold.patch} (98%) rename patches/server/{0015-ItemFactory-getMonsterEgg.patch => 0014-ItemFactory-getMonsterEgg.patch} (89%) rename patches/server/{0016-PlayerSetSpawnerTypeWithEggEvent.patch => 0015-PlayerSetSpawnerTypeWithEggEvent.patch} (86%) rename patches/server/{0017-EMC-MonsterEggSpawnEvent.patch => 0016-EMC-MonsterEggSpawnEvent.patch} (99%) rename patches/server/{0018-Villager-resetOffers.patch => 0017-Villager-resetOffers.patch} (100%) rename patches/server/{0020-SkeletonHorseTrapEvent-getPlayer.patch => 0018-SkeletonHorseTrapEvent-getPlayer.patch} (100%) delete mode 100644 patches/server/0019-LivingEntity-playPickupItemAnimation.patch rename patches/server/{0021-PaperPR-PlayerItemCooldownEvent.patch => 0019-PaperPR-PlayerItemCooldownEvent.patch} (100%) rename patches/server/{0022-EntityMoveEvent.patch => 0020-EntityMoveEvent.patch} (94%) rename patches/server/{0024-Player-invulnerabilities.patch => 0021-Player-invulnerabilities.patch} (94%) rename patches/server/{0025-Anvil-API.patch => 0022-Anvil-API.patch} (100%) rename patches/server/{0026-Configurable-villager-brain-ticks.patch => 0023-Configurable-villager-brain-ticks.patch} (100%) delete mode 100644 patches/server/0023-PaperPR-Add-BellRingEvent.patch rename patches/server/{0027-Alternative-Keepalive-Handling.patch => 0024-Alternative-Keepalive-Handling.patch} (95%) rename patches/server/{0028-Silk-touch-spawners.patch => 0025-Silk-touch-spawners.patch} (98%) rename patches/server/{0029-MC-168772-Fix-Add-turtle-egg-block-options.patch => 0026-MC-168772-Fix-Add-turtle-egg-block-options.patch} (100%) rename patches/server/{0030-MC-4-Fix-Item-position-desync.patch => 0027-MC-4-Fix-Item-position-desync.patch} (100%) rename patches/server/{0031-Fix-vanilla-command-permission-handler.patch => 0028-Fix-vanilla-command-permission-handler.patch} (98%) rename patches/server/{0032-Logger-settings-suppressing-pointless-logs.patch => 0029-Logger-settings-suppressing-pointless-logs.patch} (100%) rename patches/server/{0033-Disable-outdated-build-check.patch => 0030-Disable-outdated-build-check.patch} (100%) rename patches/server/{0034-Giants-AI-settings.patch => 0031-Giants-AI-settings.patch} (96%) rename patches/server/{0035-Illusioners-AI-settings.patch => 0032-Illusioners-AI-settings.patch} (98%) rename patches/server/{0036-Zombie-horse-naturally-spawn.patch => 0033-Zombie-horse-naturally-spawn.patch} (100%) rename patches/server/{0037-Charged-creeper-naturally-spawn.patch => 0034-Charged-creeper-naturally-spawn.patch} (100%) rename patches/server/{0038-Rabbit-naturally-spawn-toast-and-killer.patch => 0035-Rabbit-naturally-spawn-toast-and-killer.patch} (100%) rename patches/server/{0039-Fix-outdated-server-showing-in-ping-before-server-fu.patch => 0036-Fix-outdated-server-showing-in-ping-before-server-fu.patch} (100%) rename patches/server/{0040-Make-Iron-Golems-Swim.patch => 0037-Make-Iron-Golems-Swim.patch} (100%) rename patches/server/{0041-Dont-send-useless-entity-packets.patch => 0038-Dont-send-useless-entity-packets.patch} (100%) rename patches/server/{0042-Tulips-change-fox-type.patch => 0039-Tulips-change-fox-type.patch} (100%) rename patches/server/{0043-Breedable-Polar-Bears.patch => 0040-Breedable-Polar-Bears.patch} (100%) rename patches/server/{0044-Chickens-can-retaliate.patch => 0041-Chickens-can-retaliate.patch} (100%) rename patches/server/{0045-Add-option-to-set-armorstand-step-height.patch => 0042-Add-option-to-set-armorstand-step-height.patch} (95%) rename patches/server/{0046-Cat-spawning-options.patch => 0043-Cat-spawning-options.patch} (100%) rename patches/server/{0047-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch => 0044-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch} (100%) rename patches/server/{0048-Cows-eat-mushrooms.patch => 0045-Cows-eat-mushrooms.patch} (97%) rename patches/server/{0049-Fix-cow-rotation-when-shearing-mooshroom.patch => 0046-Fix-cow-rotation-when-shearing-mooshroom.patch} (100%) rename patches/server/{0050-Pigs-give-saddle-back.patch => 0047-Pigs-give-saddle-back.patch} (100%) rename patches/server/{0051-Snowman-drop-and-put-back-pumpkin.patch => 0048-Snowman-drop-and-put-back-pumpkin.patch} (100%) rename patches/server/{0052-Ender-dragon-always-drop-egg.patch => 0049-Ender-dragon-always-drop-egg.patch} (100%) rename patches/server/{0053-Ender-dragon-always-drop-full-exp.patch => 0050-Ender-dragon-always-drop-full-exp.patch} (100%) rename patches/server/{0054-Signs-editable-on-right-click.patch => 0051-Signs-editable-on-right-click.patch} (100%) rename patches/server/{0055-Signs-allow-color-codes.patch => 0052-Signs-allow-color-codes.patch} (95%) rename patches/server/{0056-Allow-soil-to-moisten-from-water-directly-under-it.patch => 0053-Allow-soil-to-moisten-from-water-directly-under-it.patch} (100%) rename patches/server/{0057-Controllable-Minecarts.patch => 0054-Controllable-Minecarts.patch} (98%) rename patches/server/{0058-Disable-loot-drops-on-death-by-cramming.patch => 0055-Disable-loot-drops-on-death-by-cramming.patch} (93%) rename patches/server/{0059-Players-should-not-cram-to-death.patch => 0056-Players-should-not-cram-to-death.patch} (90%) rename patches/server/{0060-Option-to-toggle-milk-curing-bad-omen.patch => 0057-Option-to-toggle-milk-curing-bad-omen.patch} (98%) rename patches/server/{0061-End-gateway-should-check-if-entity-can-use-portal.patch => 0058-End-gateway-should-check-if-entity-can-use-portal.patch} (100%) rename patches/server/{0062-Debug-stick-should-not-update-neighbors.patch => 0059-Debug-stick-should-not-update-neighbors.patch} (96%) rename patches/server/{0063-Fix-reloading-paper.yml.patch => 0060-Fix-reloading-paper.yml.patch} (97%) rename patches/server/{0064-Fix-the-dead-lagging-the-server.patch => 0061-Fix-the-dead-lagging-the-server.patch} (91%) rename patches/server/{0065-Skip-events-if-there-s-no-listeners.patch => 0062-Skip-events-if-there-s-no-listeners.patch} (100%) rename patches/server/{0066-Add-permission-for-F3-N-debug.patch => 0063-Add-permission-for-F3-N-debug.patch} (89%) rename patches/server/{0067-Add-wither-skeleton-takes-wither-damage-option.patch => 0064-Add-wither-skeleton-takes-wither-damage-option.patch} (100%) rename patches/server/{0068-Configurable-TPS-Catchup.patch => 0065-Configurable-TPS-Catchup.patch} (98%) rename patches/server/{0069-Add-option-to-allow-loyalty-on-tridents-to-work-in-t.patch => 0066-Add-option-to-allow-loyalty-on-tridents-to-work-in-t.patch} (98%) rename patches/server/{0070-Add-enderman-and-creeper-griefing-controls.patch => 0067-Add-enderman-and-creeper-griefing-controls.patch} (100%) rename patches/server/{0071-Entities-pick-up-loot-bypass-mob-griefing-gamerule.patch => 0068-Entities-pick-up-loot-bypass-mob-griefing-gamerule.patch} (97%) rename patches/server/{0072-Villagers-farming-can-bypass-mob-griefing-gamerule.patch => 0069-Villagers-farming-can-bypass-mob-griefing-gamerule.patch} (100%) rename patches/server/{0073-Villagers-follow-emerald-blocks.patch => 0070-Villagers-follow-emerald-blocks.patch} (100%) rename patches/server/{0074-Allow-leashing-villagers.patch => 0071-Allow-leashing-villagers.patch} (95%) rename patches/server/{0075-Implement-configurable-search-radius-for-villagers-t.patch => 0072-Implement-configurable-search-radius-for-villagers-t.patch} (100%) rename patches/server/{0076-Implement-infinite-lava.patch => 0073-Implement-infinite-lava.patch} (100%) rename patches/server/{0077-Make-lava-flow-speed-configurable.patch => 0074-Make-lava-flow-speed-configurable.patch} (100%) rename patches/server/{0078-Add-player-death-exp-control-options.patch => 0075-Add-player-death-exp-control-options.patch} (98%) rename patches/server/{0079-Add-option-to-disable-saving-projectiles-to-disk.patch => 0076-Add-option-to-disable-saving-projectiles-to-disk.patch} (87%) rename patches/server/{0080-Configurable-void-damage-height.patch => 0077-Configurable-void-damage-height.patch} (97%) rename patches/server/{0082-Dispenser-curse-of-binding-protection.patch => 0078-Dispenser-curse-of-binding-protection.patch} (95%) rename patches/server/{0083-Add-option-for-boats-to-eject-players-on-land.patch => 0079-Add-option-for-boats-to-eject-players-on-land.patch} (98%) rename patches/server/{0084-Add-obfhelpers-for-plugin-use.patch => 0080-Add-obfhelpers-for-plugin-use.patch} (95%) delete mode 100644 patches/server/0081-Add-option-for-zombies-targetting-turtle-eggs.patch rename patches/server/{0085-Mending-mends-most-damages-equipment-first.patch => 0081-Mending-mends-most-damages-equipment-first.patch} (98%) rename patches/server/{0086-Implement-bamboo-growth-settings.patch => 0082-Implement-bamboo-growth-settings.patch} (99%) rename patches/server/{0087-Climbing-should-not-bypass-cramming-gamerule.patch => 0083-Climbing-should-not-bypass-cramming-gamerule.patch} (95%) rename patches/server/{0088-Add-5-second-tps-average-in-tps.patch => 0084-Add-5-second-tps-average-in-tps.patch} (99%) rename patches/server/{0089-Implement-elytra-settings.patch => 0085-Implement-elytra-settings.patch} (97%) rename patches/server/{0090-Item-entity-immunities.patch => 0086-Item-entity-immunities.patch} (96%) rename patches/server/{0091-Add-ping-command.patch => 0087-Add-ping-command.patch} (100%) rename patches/server/{0092-Configurable-jockey-options.patch => 0088-Configurable-jockey-options.patch} (96%) rename patches/server/{0093-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch => 0089-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch} (98%) rename patches/server/{0094-Customizable-EnderDragon-Health.patch => 0090-Customizable-EnderDragon-Health.patch} (98%) rename patches/server/{0095-Add-phantom-spawning-options.patch => 0091-Add-phantom-spawning-options.patch} (99%) rename patches/server/{0096-Implement-bed-explosion-options.patch => 0092-Implement-bed-explosion-options.patch} (98%) rename patches/server/{0097-Implement-respawn-anchor-explosion-options.patch => 0093-Implement-respawn-anchor-explosion-options.patch} (99%) rename patches/server/{0098-Add-allow-water-in-end-world-option.patch => 0094-Add-allow-water-in-end-world-option.patch} (98%) rename patches/server/{0099-MC-171420-Fix-deop-kicking-non-whitelisted-player-wh.patch => 0095-MC-171420-Fix-deop-kicking-non-whitelisted-player-wh.patch} (91%) rename patches/server/{0100-ALlow-color-codes-in-books.patch => 0096-ALlow-color-codes-in-books.patch} (93%) rename patches/server/{0101-Entity-lifespan.patch => 0097-Entity-lifespan.patch} (95%) rename patches/server/{0102-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch => 0098-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch} (94%) rename patches/server/{0103-Squid-EAR-immunity.patch => 0099-Squid-EAR-immunity.patch} (97%) rename patches/server/{0104-Configurable-end-spike-seed.patch => 0100-Configurable-end-spike-seed.patch} (100%) rename patches/server/{0105-Configurable-dungeon-seed.patch => 0101-Configurable-dungeon-seed.patch} (100%) rename patches/server/{0106-Phantoms-burn-in-light.patch => 0102-Phantoms-burn-in-light.patch} (99%) rename patches/server/{0107-Configurable-villager-breeding.patch => 0103-Configurable-villager-breeding.patch} (98%) rename patches/server/{0108-Redstone-deactivates-spawners.patch => 0104-Redstone-deactivates-spawners.patch} (98%) rename patches/server/{0109-Totems-work-in-inventory.patch => 0105-Totems-work-in-inventory.patch} (94%) rename patches/server/{0110-Fix-death-message-colors.patch => 0106-Fix-death-message-colors.patch} (98%) rename patches/server/{0111-Duplicate-paper-s-vanilla-scoreboard-colors-patch-to.patch => 0107-Duplicate-paper-s-vanilla-scoreboard-colors-patch-to.patch} (95%) rename patches/server/{0112-Populator-seed-controls.patch => 0108-Populator-seed-controls.patch} (100%) rename patches/server/{0113-Add-vindicator-johnny-spawn-chance.patch => 0109-Add-vindicator-johnny-spawn-chance.patch} (98%) rename patches/server/{0114-DragonEggPlaceEvent.patch => 0110-DragonEggPlaceEvent.patch} (100%) rename patches/server/{0115-Add-option-to-disable-mushroom-block-updates.patch => 0111-Add-option-to-disable-mushroom-block-updates.patch} (100%) rename patches/server/{0117-Dispensers-place-anvils-option.patch => 0112-Dispensers-place-anvils-option.patch} (99%) rename patches/server/{0118-Allow-anvil-colors.patch => 0113-Allow-anvil-colors.patch} (98%) rename patches/server/{0119-Add-no-tick-block-list.patch => 0114-Add-no-tick-block-list.patch} (97%) rename patches/server/{0120-Add-option-to-disable-dolphin-treasure-searching.patch => 0115-Add-option-to-disable-dolphin-treasure-searching.patch} (98%) rename patches/server/{0121-Add-option-to-reset-reputation-when-villager-is-cure.patch => 0116-Add-option-to-reset-reputation-when-villager-is-cure.patch} (96%) delete mode 100644 patches/server/0116-PaperMC-Buffer-joins.patch rename patches/server/{0123-Short-enderman-height.patch => 0117-Short-enderman-height.patch} (99%) rename patches/server/{0124-Stop-squids-floating-on-top-of-water.patch => 0118-Stop-squids-floating-on-top-of-water.patch} (95%) rename patches/server/{0125-Ridables.patch => 0119-Ridables.patch} (99%) rename patches/server/{0126-Use-configured-height-for-nether-surface-builders.patch => 0120-Use-configured-height-for-nether-surface-builders.patch} (100%) rename patches/server/{0127-Crying-obsidian-valid-for-portal-frames.patch => 0121-Crying-obsidian-valid-for-portal-frames.patch} (95%) rename patches/server/{0128-Entities-can-use-portals-configuration.patch => 0122-Entities-can-use-portals-configuration.patch} (93%) delete mode 100644 patches/server/0122-Optimize-redstone-algorithm.patch rename patches/server/{0129-LivingEntity-broadcastItemBreak.patch => 0123-LivingEntity-broadcastItemBreak.patch} (75%) rename patches/server/{0130-Use-arrow-despawn-rate-for-all-projectiles.patch => 0124-Use-arrow-despawn-rate-for-all-projectiles.patch} (100%) rename patches/server/{0131-Customizable-WitherBoss-Health-and-Healing.patch => 0125-Customizable-WitherBoss-Health-and-Healing.patch} (99%) rename patches/server/{0132-Allow-toggling-special-MobSpawners-per-world.patch => 0126-Allow-toggling-special-MobSpawners-per-world.patch} (99%) rename patches/server/{0133-Raid-cooldown-setting.patch => 0127-Raid-cooldown-setting.patch} (98%) diff --git a/.gitmodules b/.gitmodules index 09418d3ad..888303069 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "Paper"] path = Paper url = https://github.com/PaperMC/Paper.git - branch = progress/1.16.2 + branch = origin/master diff --git a/Paper b/Paper index 5486b3db2..54890033d 160000 --- a/Paper +++ b/Paper @@ -1 +1 @@ -Subproject commit 5486b3db298a7cf6ce319328578b74f54a029ba9 +Subproject commit 54890033d570f5bd0eff1ada5dbb5441dd65496d diff --git a/current-paper b/current-paper index 6c15b3594..df8ac859a 100644 --- a/current-paper +++ b/current-paper @@ -1 +1 @@ -1.16.2--2c8123d6b7738541aeb4c722d8b819c5e29fb76a +1.16.2--20c1e6cad902fdd2b57434676b239614c0333c79 diff --git a/patches/api/0009-AFK-API.patch b/patches/api/0008-AFK-API.patch similarity index 97% rename from patches/api/0009-AFK-API.patch rename to patches/api/0008-AFK-API.patch index 892a619e3..17e418d35 100644 --- a/patches/api/0009-AFK-API.patch +++ b/patches/api/0008-AFK-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] AFK API diff --git a/src/main/java/net/pl3x/purpur/event/PlayerAFKEvent.java b/src/main/java/net/pl3x/purpur/event/PlayerAFKEvent.java new file mode 100644 -index 000000000..0c8b3e5e4 +index 00000000..0c8b3e5e --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/PlayerAFKEvent.java @@ -0,0 +1,70 @@ @@ -81,7 +81,7 @@ index 000000000..0c8b3e5e4 + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 991f757a8..472194e7e 100644 +index 991f757a..472194e7 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1887,4 +1887,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/patches/api/0008-Evoker-API.patch b/patches/api/0008-Evoker-API.patch deleted file mode 100644 index dc3e6dd1a..000000000 --- a/patches/api/0008-Evoker-API.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 00:28:53 -0500 -Subject: [PATCH] Evoker API - - -diff --git a/src/main/java/org/bukkit/entity/Evoker.java b/src/main/java/org/bukkit/entity/Evoker.java -index f8d173ad..f2a03f7f 100644 ---- a/src/main/java/org/bukkit/entity/Evoker.java -+++ b/src/main/java/org/bukkit/entity/Evoker.java -@@ -64,4 +64,21 @@ public interface Evoker extends Spellcaster { - */ - @Deprecated - void setCurrentSpell(@Nullable Spell spell); -+ -+ // Purpur start -+ /** -+ * Get the sheep being targeted by the Wololo spell -+ * -+ * @return Targeted sheep -+ */ -+ @Nullable -+ Sheep getWololoTarget(); -+ -+ /** -+ * Set the sheep targeted by the Wololo spell -+ * -+ * @param sheep Sheep to target -+ */ -+ void setWololoTarget(@Nullable Sheep sheep); -+ // Purpur end - } diff --git a/patches/api/0010-Bring-back-server-name.patch b/patches/api/0009-Bring-back-server-name.patch similarity index 95% rename from patches/api/0010-Bring-back-server-name.patch rename to patches/api/0009-Bring-back-server-name.patch index 86697460c..5f201d9ee 100644 --- a/patches/api/0010-Bring-back-server-name.patch +++ b/patches/api/0009-Bring-back-server-name.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bring back server name diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 7fd924621..f19d865dd 100644 +index bfe84236..ece4f3de 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -1787,4 +1787,15 @@ public final class Bukkit { @@ -25,7 +25,7 @@ index 7fd924621..f19d865dd 100644 + // Purpur end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index dacdcd1f2..ad45e2a4c 100644 +index fdceafc7..6b6f20a1 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1576,4 +1576,13 @@ public interface Server extends PluginMessageRecipient { diff --git a/patches/api/0011-ExecuteCommandEvent.patch b/patches/api/0010-ExecuteCommandEvent.patch similarity index 100% rename from patches/api/0011-ExecuteCommandEvent.patch rename to patches/api/0010-ExecuteCommandEvent.patch diff --git a/patches/api/0012-LivingEntity-safeFallDistance.patch b/patches/api/0011-LivingEntity-safeFallDistance.patch similarity index 85% rename from patches/api/0012-LivingEntity-safeFallDistance.patch rename to patches/api/0011-LivingEntity-safeFallDistance.patch index 9f069eb2a..27703821b 100644 --- a/patches/api/0012-LivingEntity-safeFallDistance.patch +++ b/patches/api/0011-LivingEntity-safeFallDistance.patch @@ -5,12 +5,12 @@ Subject: [PATCH] LivingEntity safeFallDistance diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index a60523cc..5b688cd0 100644 +index 5adf7501..c1eaaca2 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -753,4 +753,20 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -815,4 +815,20 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ - void setJumping(boolean jumping); + void playPickupItemAnimation(@NotNull Item item, int quantity); // Paper end + + // Purpur start diff --git a/patches/api/0013-Lagging-threshold.patch b/patches/api/0012-Lagging-threshold.patch similarity index 94% rename from patches/api/0013-Lagging-threshold.patch rename to patches/api/0012-Lagging-threshold.patch index 94aa706c3..bb6601666 100644 --- a/patches/api/0013-Lagging-threshold.patch +++ b/patches/api/0012-Lagging-threshold.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Lagging threshold diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index f19d865dd..36bb9d37e 100644 +index ece4f3de..b4e55c17 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -1797,5 +1797,14 @@ public final class Bukkit { @@ -24,7 +24,7 @@ index f19d865dd..36bb9d37e 100644 // Purpur end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index ad45e2a4c..5b04a7699 100644 +index 6b6f20a1..70bcd6c3 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1584,5 +1584,12 @@ public interface Server extends PluginMessageRecipient { diff --git a/patches/api/0014-ItemFactory-getMonsterEgg.patch b/patches/api/0013-ItemFactory-getMonsterEgg.patch similarity index 73% rename from patches/api/0014-ItemFactory-getMonsterEgg.patch rename to patches/api/0013-ItemFactory-getMonsterEgg.patch index c0600d00a..8832dc412 100644 --- a/patches/api/0014-ItemFactory-getMonsterEgg.patch +++ b/patches/api/0013-ItemFactory-getMonsterEgg.patch @@ -5,12 +5,12 @@ Subject: [PATCH] ItemFactory#getMonsterEgg diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 03ba22659..630c15d23 100644 +index 3f23927e..23d55f75 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java -@@ -166,4 +166,15 @@ public interface ItemFactory { - @Nullable - String getI18NDisplayName(@Nullable ItemStack item); +@@ -215,4 +215,15 @@ public interface ItemFactory { + @NotNull + net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName); // Paper end + + // Purpur start diff --git a/patches/api/0015-PlayerSetSpawnerTypeWithEggEvent.patch b/patches/api/0014-PlayerSetSpawnerTypeWithEggEvent.patch similarity index 98% rename from patches/api/0015-PlayerSetSpawnerTypeWithEggEvent.patch rename to patches/api/0014-PlayerSetSpawnerTypeWithEggEvent.patch index 5c8ca4a66..2c595bf1d 100644 --- a/patches/api/0015-PlayerSetSpawnerTypeWithEggEvent.patch +++ b/patches/api/0014-PlayerSetSpawnerTypeWithEggEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerSetSpawnerTypeWithEggEvent diff --git a/src/main/java/net/pl3x/purpur/event/PlayerSetSpawnerTypeWithEggEvent.java b/src/main/java/net/pl3x/purpur/event/PlayerSetSpawnerTypeWithEggEvent.java new file mode 100644 -index 000000000..c050b75e9 +index 00000000..c050b75e --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/PlayerSetSpawnerTypeWithEggEvent.java @@ -0,0 +1,85 @@ diff --git a/patches/api/0016-EMC-MonsterEggSpawnEvent.patch b/patches/api/0015-EMC-MonsterEggSpawnEvent.patch similarity index 98% rename from patches/api/0016-EMC-MonsterEggSpawnEvent.patch rename to patches/api/0015-EMC-MonsterEggSpawnEvent.patch index d58cd5e2d..7436a90e5 100644 --- a/patches/api/0016-EMC-MonsterEggSpawnEvent.patch +++ b/patches/api/0015-EMC-MonsterEggSpawnEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EMC - MonsterEggSpawnEvent diff --git a/src/main/java/net/pl3x/purpur/event/entity/MonsterEggSpawnEvent.java b/src/main/java/net/pl3x/purpur/event/entity/MonsterEggSpawnEvent.java new file mode 100644 -index 000000000..983d67234 +index 00000000..983d6723 --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/entity/MonsterEggSpawnEvent.java @@ -0,0 +1,67 @@ diff --git a/patches/api/0017-Villager-resetOffers.patch b/patches/api/0016-Villager-resetOffers.patch similarity index 95% rename from patches/api/0017-Villager-resetOffers.patch rename to patches/api/0016-Villager-resetOffers.patch index 0606f629f..d20d5d8fd 100644 --- a/patches/api/0017-Villager-resetOffers.patch +++ b/patches/api/0016-Villager-resetOffers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Villager#resetOffers diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java -index c8777a476..ed703af45 100644 +index c8777a47..ed703af4 100644 --- a/src/main/java/org/bukkit/entity/Villager.java +++ b/src/main/java/org/bukkit/entity/Villager.java @@ -113,6 +113,13 @@ public interface Villager extends AbstractVillager { diff --git a/patches/api/0019-SkeletonHorseTrapEvent-getPlayer.patch b/patches/api/0017-SkeletonHorseTrapEvent-getPlayer.patch similarity index 98% rename from patches/api/0019-SkeletonHorseTrapEvent-getPlayer.patch rename to patches/api/0017-SkeletonHorseTrapEvent-getPlayer.patch index ddf4914b8..bdc52fc33 100644 --- a/patches/api/0019-SkeletonHorseTrapEvent-getPlayer.patch +++ b/patches/api/0017-SkeletonHorseTrapEvent-getPlayer.patch @@ -5,7 +5,7 @@ Subject: [PATCH] SkeletonHorseTrapEvent#getPlayer diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java -index d79dbcd68..1ed3ea8fa 100644 +index d79dbcd6..1ed3ea8f 100644 --- a/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java +++ b/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java @@ -1,20 +1,30 @@ diff --git a/patches/api/0018-LivingEntity-playPickupItemAnimation.patch b/patches/api/0018-LivingEntity-playPickupItemAnimation.patch deleted file mode 100644 index d356b5d29..000000000 --- a/patches/api/0018-LivingEntity-playPickupItemAnimation.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 02:25:05 -0500 -Subject: [PATCH] LivingEntity#playPickupItemAnimation - - -diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 5b688cd04..a0db76946 100644 ---- a/src/main/java/org/bukkit/entity/LivingEntity.java -+++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -768,5 +768,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - * @param safeFallDistance Safe fall distance - */ - void setSafeFallDistance(float safeFallDistance); -+ -+ /** -+ * Plays pickup item animation -+ * -+ * @param item Item to pickup -+ */ -+ default void playPickupItemAnimation(@NotNull Item item) { -+ playPickupItemAnimation(item, item.getItemStack().getAmount()); -+ } -+ -+ /** -+ * Plays pickup item animation -+ * -+ * @param item Item to pickup -+ * @param quantity Quantity of item -+ */ -+ void playPickupItemAnimation(@NotNull Item item, int quantity); - // Purpur end - } diff --git a/patches/api/0020-PaperPR-PlayerItemCooldownEvent.patch b/patches/api/0018-PaperPR-PlayerItemCooldownEvent.patch similarity index 98% rename from patches/api/0020-PaperPR-PlayerItemCooldownEvent.patch rename to patches/api/0018-PaperPR-PlayerItemCooldownEvent.patch index e7d5dc4ae..8a4cd16a9 100644 --- a/patches/api/0020-PaperPR-PlayerItemCooldownEvent.patch +++ b/patches/api/0018-PaperPR-PlayerItemCooldownEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PaperPR - PlayerItemCooldownEvent diff --git a/src/main/java/net/pl3x/purpur/event/player/PlayerItemCooldownEvent.java b/src/main/java/net/pl3x/purpur/event/player/PlayerItemCooldownEvent.java new file mode 100644 -index 000000000..2002909f3 +index 00000000..2002909f --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/player/PlayerItemCooldownEvent.java @@ -0,0 +1,77 @@ diff --git a/patches/api/0021-EntityMoveEvent.patch b/patches/api/0019-EntityMoveEvent.patch similarity index 99% rename from patches/api/0021-EntityMoveEvent.patch rename to patches/api/0019-EntityMoveEvent.patch index 443ae36dd..7fe49f006 100644 --- a/patches/api/0021-EntityMoveEvent.patch +++ b/patches/api/0019-EntityMoveEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] EntityMoveEvent diff --git a/src/main/java/net/pl3x/purpur/event/entity/EntityMoveEvent.java b/src/main/java/net/pl3x/purpur/event/entity/EntityMoveEvent.java new file mode 100644 -index 000000000..c48c525b8 +index 00000000..c48c525b --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/entity/EntityMoveEvent.java @@ -0,0 +1,95 @@ diff --git a/patches/api/0023-Player-invulnerabilities.patch b/patches/api/0020-Player-invulnerabilities.patch similarity index 97% rename from patches/api/0023-Player-invulnerabilities.patch rename to patches/api/0020-Player-invulnerabilities.patch index a577fed9b..19c03c5b8 100644 --- a/patches/api/0023-Player-invulnerabilities.patch +++ b/patches/api/0020-Player-invulnerabilities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player invulnerabilities diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 472194e7e..ca98852f8 100644 +index 472194e7..ca98852f 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1907,5 +1907,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/patches/api/0024-Anvil-API.patch b/patches/api/0021-Anvil-API.patch similarity index 97% rename from patches/api/0024-Anvil-API.patch rename to patches/api/0021-Anvil-API.patch index c81549703..6c4fc3848 100644 --- a/patches/api/0024-Anvil-API.patch +++ b/patches/api/0021-Anvil-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Anvil API diff --git a/src/main/java/net/pl3x/purpur/event/inventory/AnvilTakeResultEvent.java b/src/main/java/net/pl3x/purpur/event/inventory/AnvilTakeResultEvent.java new file mode 100644 -index 000000000..85663c0a4 +index 00000000..85663c0a --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/inventory/AnvilTakeResultEvent.java @@ -0,0 +1,52 @@ @@ -64,7 +64,7 @@ index 000000000..85663c0a4 +} diff --git a/src/main/java/net/pl3x/purpur/event/inventory/AnvilUpdateResultEvent.java b/src/main/java/net/pl3x/purpur/event/inventory/AnvilUpdateResultEvent.java new file mode 100644 -index 000000000..2717ad82c +index 00000000..2717ad82 --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/inventory/AnvilUpdateResultEvent.java @@ -0,0 +1,35 @@ @@ -104,7 +104,7 @@ index 000000000..2717ad82c + } +} diff --git a/src/main/java/org/bukkit/inventory/AnvilInventory.java b/src/main/java/org/bukkit/inventory/AnvilInventory.java -index b95e563b5..435026e53 100644 +index b95e563b..435026e5 100644 --- a/src/main/java/org/bukkit/inventory/AnvilInventory.java +++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java @@ -109,4 +109,14 @@ public interface AnvilInventory extends Inventory { diff --git a/patches/api/0025-ItemStack-convenience-methods.patch b/patches/api/0022-ItemStack-convenience-methods.patch similarity index 99% rename from patches/api/0025-ItemStack-convenience-methods.patch rename to patches/api/0022-ItemStack-convenience-methods.patch index 38e51f000..2ddb39f0d 100644 --- a/patches/api/0025-ItemStack-convenience-methods.patch +++ b/patches/api/0022-ItemStack-convenience-methods.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack convenience methods diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index e203c5bfc..e6ba1b179 100644 +index 4ba991b7..a2e476f1 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -8635,4 +8635,36 @@ public enum Material implements Keyed { +@@ -8645,4 +8645,36 @@ public enum Material implements Keyed { // } } @@ -46,7 +46,7 @@ index e203c5bfc..e6ba1b179 100644 + // Purpur end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index ccd81fca2..3fecde7a0 100644 +index ccd81fca..3fecde7a 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -17,6 +17,18 @@ import org.bukkit.inventory.meta.ItemMeta; diff --git a/patches/api/0022-PaperPR-BellRingEvent.patch b/patches/api/0022-PaperPR-BellRingEvent.patch deleted file mode 100644 index a55f14a5e..000000000 --- a/patches/api/0022-PaperPR-BellRingEvent.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Eearslya Sleiarion -Date: Mon, 24 Jun 2019 21:27:39 -0700 -Subject: [PATCH] PaperPR - BellRingEvent - -Add a new event, BellRingEvent, to trigger whenever a player rings a -village bell. Passes along the bell block and the player who rang it. - -diff --git a/src/main/java/com/destroystokyo/paper/event/block/BellRingEvent.java b/src/main/java/com/destroystokyo/paper/event/block/BellRingEvent.java -new file mode 100644 -index 000000000..82e0a747b ---- /dev/null -+++ b/src/main/java/com/destroystokyo/paper/event/block/BellRingEvent.java -@@ -0,0 +1,53 @@ -+package com.destroystokyo.paper.event.block; -+ -+import org.bukkit.block.Block; -+import org.bukkit.entity.Entity; -+import org.bukkit.event.Cancellable; -+import org.bukkit.event.HandlerList; -+import org.bukkit.event.block.BlockEvent; -+import org.jetbrains.annotations.NotNull; -+ -+/** -+ * Called when a bell is rung by an entity. -+ */ -+public class BellRingEvent extends BlockEvent implements Cancellable { -+ private static final HandlerList handlers = new HandlerList(); -+ private boolean cancelled; -+ private Entity entity; -+ -+ public BellRingEvent(@NotNull Block block, @NotNull Entity entity) { -+ super(block); -+ this.entity = entity; -+ } -+ -+ @Override -+ public boolean isCancelled() { -+ return cancelled; -+ } -+ -+ @Override -+ public void setCancelled(boolean cancelled) { -+ this.cancelled = cancelled; -+ } -+ -+ /** -+ * Gets the entity that rang the bell. -+ * -+ * @return Entity -+ */ -+ @NotNull -+ public Entity getEntity() { -+ return entity; -+ } -+ -+ @NotNull -+ @Override -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ @NotNull -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} diff --git a/patches/api/0026-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch b/patches/api/0023-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch similarity index 97% rename from patches/api/0026-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch rename to patches/api/0023-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch index 5676840d5..3cda520f2 100644 --- a/patches/api/0026-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch +++ b/patches/api/0023-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Phantoms attracted to crystals and crystals shoot phantoms diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -index b42091752..83c51bb5e 100644 +index b4209175..83c51bb5 100644 --- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java +++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java @@ -206,4 +206,8 @@ public interface VanillaGoal extends Goal { diff --git a/patches/api/0027-ChatColor-conveniences.patch b/patches/api/0024-ChatColor-conveniences.patch similarity index 97% rename from patches/api/0027-ChatColor-conveniences.patch rename to patches/api/0024-ChatColor-conveniences.patch index 858bf3bd1..0e9f8582a 100644 --- a/patches/api/0027-ChatColor-conveniences.patch +++ b/patches/api/0024-ChatColor-conveniences.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ChatColor conveniences diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java -index 4594701d7..499b222de 100644 +index 4594701d..499b222d 100644 --- a/src/main/java/org/bukkit/ChatColor.java +++ b/src/main/java/org/bukkit/ChatColor.java @@ -413,4 +413,30 @@ public enum ChatColor { diff --git a/patches/api/0028-DragonEggPlaceEvent.patch b/patches/api/0025-DragonEggPlaceEvent.patch similarity index 98% rename from patches/api/0028-DragonEggPlaceEvent.patch rename to patches/api/0025-DragonEggPlaceEvent.patch index e8c31304d..9e1047b61 100644 --- a/patches/api/0028-DragonEggPlaceEvent.patch +++ b/patches/api/0025-DragonEggPlaceEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] DragonEggPlaceEvent diff --git a/src/main/java/net/pl3x/purpur/event/block/DragonEggPlaceEvent.java b/src/main/java/net/pl3x/purpur/event/block/DragonEggPlaceEvent.java new file mode 100644 -index 000000000..bdabfd2b5 +index 00000000..bdabfd2b --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/block/DragonEggPlaceEvent.java @@ -0,0 +1,47 @@ diff --git a/patches/api/0029-Ridables.patch b/patches/api/0026-Ridables.patch similarity index 94% rename from patches/api/0029-Ridables.patch rename to patches/api/0026-Ridables.patch index 608b9629b..63dcf9e4b 100644 --- a/patches/api/0029-Ridables.patch +++ b/patches/api/0026-Ridables.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ridables diff --git a/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java b/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java new file mode 100644 -index 000000000..c0ec5a130 +index 00000000..c0ec5a13 --- /dev/null +++ b/src/main/java/net/pl3x/purpur/event/entity/RidableSpacebarEvent.java @@ -0,0 +1,37 @@ @@ -48,10 +48,10 @@ index 000000000..c0ec5a130 + } +} diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 7808ade92..5abf3eaf3 100644 +index cb9ef706..9c418528 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -695,4 +695,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -691,4 +691,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ public boolean isInLava(); // Paper end diff --git a/patches/api/0030-Configurable-permission-message-upgrades.patch b/patches/api/0027-Configurable-permission-message-upgrades.patch similarity index 97% rename from patches/api/0030-Configurable-permission-message-upgrades.patch rename to patches/api/0027-Configurable-permission-message-upgrades.patch index e097b19e2..5990227b6 100644 --- a/patches/api/0030-Configurable-permission-message-upgrades.patch +++ b/patches/api/0027-Configurable-permission-message-upgrades.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable permission message upgrades This allows the configurable permission message in paper.yml to be blank and also support newlines diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java -index c10fc8d23..882c565ac 100644 +index c10fc8d2..882c565a 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -184,9 +184,13 @@ public abstract class Command { diff --git a/patches/api/0031-LivingEntity-broadcastItemBreak.patch b/patches/api/0028-LivingEntity-broadcastItemBreak.patch similarity index 78% rename from patches/api/0031-LivingEntity-broadcastItemBreak.patch rename to patches/api/0028-LivingEntity-broadcastItemBreak.patch index 647e2702e..a45a1d9ed 100644 --- a/patches/api/0031-LivingEntity-broadcastItemBreak.patch +++ b/patches/api/0028-LivingEntity-broadcastItemBreak.patch @@ -5,13 +5,13 @@ Subject: [PATCH] LivingEntity#broadcastItemBreak diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index a0db76946..7b1cb6623 100644 +index c1eaaca2..97a9ad63 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -785,5 +785,12 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - * @param quantity Quantity of item +@@ -830,5 +830,12 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource + * @param safeFallDistance Safe fall distance */ - void playPickupItemAnimation(@NotNull Item item, int quantity); + void setSafeFallDistance(float safeFallDistance); + + /** + * Play item break animation for the item in specified equipment slot diff --git a/patches/api/0032-Item-entity-immunities.patch b/patches/api/0029-Item-entity-immunities.patch similarity index 97% rename from patches/api/0032-Item-entity-immunities.patch rename to patches/api/0029-Item-entity-immunities.patch index 642abba06..c41165105 100644 --- a/patches/api/0032-Item-entity-immunities.patch +++ b/patches/api/0029-Item-entity-immunities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Item entity immunities diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java -index acd80d812..810a1e55c 100644 +index acd80d81..810a1e55 100644 --- a/src/main/java/org/bukkit/entity/Item.java +++ b/src/main/java/org/bukkit/entity/Item.java @@ -87,4 +87,34 @@ public interface Item extends Entity { diff --git a/patches/server/0001-Tuinity-Server-Changes.patch b/patches/server/0001-Tuinity-Server-Changes.patch index 2c213a197..b6fce8419 100644 --- a/patches/server/0001-Tuinity-Server-Changes.patch +++ b/patches/server/0001-Tuinity-Server-Changes.patch @@ -3,9 +3,289 @@ From: Spottedleaf Date: Fri, 14 Dec 2018 21:53:58 -0800 Subject: [PATCH] Tuinity Server Changes +Brand changes + +MC-Dev fixes + +Util patch + +Tuinity Server Config + +Multi-Threaded Server Ticking Vanilla + +This patch is the vanilla server changes + +Currently a placeholder patch. + +Multi-Threaded ticking CraftBukkit + +These are the changes to CB + +Currently a placeholder patch. + +Add soft async catcher + +Must be enabled via -Dtuinity.strict-thread-checks=true + +Delay chunk unloads + +Chunk unloads are now delayed by 1s. Specifically, ticket level +reduction is delayed by 1s. This is done to allow players to +teleport and have their pets follow them, as the chunks will no longer +unload or have entity ticking status removed. + +It's also targetted to reduce performance regressions when +plugins or edge cases in code do not spam sync loads since chunks +without tickets get unloaded immediately. + +Configurable under `delay-chunkunloads-by` in config. + +This patch replaces the paper patch as the paper patch only +affects player loaded chunks, when we want to target all +loads. + +Attempt to recalculate regionfile header if it is corrupt + +Instead of trying to relocate the chunk, which is seems to never +be the correct choice, so we end up duplicating or swapping chunks, +we instead drop the current regionfile header and recalculate - +hoping that at least then we don't swap chunks, and maybe recover +them all. + +Lag compensate block breaking + +Use time instead of ticks if ticks fall behind + +Update version fetcher repo + +Sets the target github repo to Tuinity in the version checker. Also disables the jenkins build lookups. + +Per World Spawn Limits + +Detail more information in watchdog dumps + +- Dump position, world, velocity, and uuid for currently ticking entities +- Dump player name, player uuid, position, and world for packet handling + +Execute chunk tasks mid-tick + +This will help the server load chunks if tick times are high. + +Change writes to use NORMAL priority rather than LOW + +Should limit build up of I/O tasks, or at least properly +indicate to server owners that I/O is falling behind + +Allow controlled flushing for network manager + +Only make one flush call when emptying the packet queue too + +This patch will be used to optimise out flush calls in later +patches. + +Consolidate flush calls for entity tracker packets + +Most server packets seem to be sent from here, so try to avoid +expensive flush calls from them. + +This change was motivated due to local testing: + +- My server spawn has 130 cows in it (for testing a prev. patch) +- Try to let 200 players join spawn + +Without this change, I could only get 20 players on before they +all started timing out due to the load put on the Netty I/O threads. + +With this change I could get all 200 on at 0ms ping. + +(one of the primary issues is that my CPU is kinda trash, and having +4 extra threads at 100% is just too much for it). + +So in general this patch should reduce Netty I/O thread load. + +Time scoreboard search + +Plugins leaking scoreboards will make this very expensive, +let server owners debug it easily + +Make CallbackExecutor strict again + +The correct fix for double scheduling is to avoid it. The reason +this class is used is because double scheduling causes issues +elsewhere, and it acts as an explicit detector of what double +schedules. Effectively, use the callback executor as a tool of +finding issues rather than hiding these issues. + +This patch also reverts incorrect use(s) of the class by paper. + +- getChunkFutureAsynchronously + There is no risk at all of recursion. The future is executed on + the chunk provider's thread queue, the same place general plugin + load callbacks are executed on. Forcing the task execution into + the callback executor also prevents the future from catching + any exception thrown from it. + +Optimise entity hard collision checking + +Very few entities actually hard collide, so store them in their own +entity slices and provide a special getEntites type call just for them. +This reduces entity collision checking impact (in my testing) by 25% +for crammed entities (shove 130 cows into an 8x6 area in one chunk). +Less crammed entities are likely to show significantly less benefit. +Effectively, this patch optimises crammed entity situations. + +Improved oversized chunk data packet handling + +Now target all TE data, except for TE's that do not have +update packets. + +This patch relies upon the improve extra packet handling +patch, as we now use PacketPlayOutMapChunk as an extra packet. +See its patch notes for further details. + +Reduce blockpos allocation from pathfinding + +Reduce iterator allocation from chunk gen + +Replace via iterating over an array + +Prevent long map entry creation in light engine + +Use fastiterator to prevent it + +Highly optimise single and multi-AABB VoxelShapes and collisions + +Reduce allocation rate from crammed entities + +Optimise chunk tick iteration + +Use a dedicated list of entity ticking chunks to reduce the cost + +Use entity ticking chunk map for entity tracker + +Should bring us back in-line with tracker performance +before the loaded entity list reversion. + +Temporary fix for large move vectors + +Check movement distance also based on current position. + +Improve paper prevent moving into unloaded chunk check + +Check the AABB of the move + +Improve async tp to not load chunks when crossing worlds + +Fixes an issue where a getCubes call would load neighbouring chunks. +Loads less chunks than paper's implementation + +Optimise getType calls + +Remove the map lookup for converting from Block->Bukkit Material + +Revert getChunkAt(Async) retaining chunks for long periods of time + +Rework PlayerChunk main thread checks + +These need to fail instead of continuing, as hiding these errors +the way paper has is just going to allow unexpected reordering +of callbacks. + +For example, thanks to this patch incorrect future +completion (completion of the world gen future, +PlayerChunkMap#b(PlayerChunk, ChunkStatus)) was detected and fixed. + +Allow Entities to be removed from a world while ticking + +Fixes issues like disconnecting players while ticking them, or +issues where teleporting players across worlds while ticking. + +Also allows us to run mid tick while ticking entities. + +Prevent unload() calls removing tickets for sync loads + +Prevent log spam for "Block is water but TE is chest" + +Happens when breaking a waterlogged chest. +Fix is to just not validate the TE while the chest is being removed. + +Optimise collision checking in player move packet handling + +Don't need to do another getCubes call if the move() call +doesn't find any collisions + +Optimise heightmap access + +HeightMap uses DataBits for storage to reduce the memory footprint +of the underlying heightmap. However, this reduction in memory +footprint comes at the cost of encoding/decoding each access. + +So we can make the tradeoff of raw array access by using a char +array internally. For every 100,000 chunks, this will add approximately +80MB overhead (4 heightmaps per full chunk) - which is acceptable. + +Improve inlinig for some hot IBlockData methods + +Manually inline methods in BlockPosition + +Separate lookup locking from state access in UserCache + +Prevent lookups from stalling simple state access/write calls + +Distance manager tick timings + +Recently this has been taking up more time, so add a timings to +really figure out how much. + +Name craft scheduler threads according to the plugin using them + +Provides quick access to culprits running far more threads than +they should be + +Optimise WorldServer#notify + +Iterating over all of the navigators in the world is pretty expensive. +Instead, only iterate over navigators in the current region that are +eligible for repathing. + +Retain block place order when capturing blockstates + +Fixes twisted vines not connecting properly when grown via +bonemeal by a player. + +In general, look at making this logic more robust (i.e properly handling +cases where a captured entry is overriden) - but for now this will do. + +Fix ghost blocks in ticking view distance + +Post processing doesn't notify, and my changes to chunk sending +send chunks before post processing. + +Use visible chunks for light engine status checks + +Not mt-safe to use getUpdating + +Fix swamp hut cat generation deadlock + +The worldgen thread will attempt to get structure references +via the world's getChunkAt method, which is fine if the gen is +not cancelled - but if the chunk was unloaded, the call will block +indefinitely. Instead of using the world state, we use the already +supplied generatoraccess which will always have the chunk available. + +Range check flag dirty calls in PlayerChunk + +Simply return. + +Do not run vanilla update logic when eigencraft is enabled + +Fix missing block property portal crash + +Looks like it appears when the portal isn't created (cancelled +event). So, just use the original direction and call it a day. diff --git a/pom.xml b/pom.xml -index 594ab9afb..ee19a2874 100644 +index d018f900d..4f45b8158 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,11 @@ @@ -1209,10 +1489,10 @@ index 000000000..b0f1e21e6 +} diff --git a/src/main/java/com/tuinity/tuinity/voxel/AABBVoxelShape.java b/src/main/java/com/tuinity/tuinity/voxel/AABBVoxelShape.java new file mode 100644 -index 000000000..56b955227 +index 000000000..b321ad516 --- /dev/null +++ b/src/main/java/com/tuinity/tuinity/voxel/AABBVoxelShape.java -@@ -0,0 +1,237 @@ +@@ -0,0 +1,162 @@ +package com.tuinity.tuinity.voxel; + +import it.unimi.dsi.fastutil.doubles.DoubleArrayList; @@ -1358,187 +1638,142 @@ index 000000000..56b955227 + + @Override + public double a(EnumDirection.EnumAxis enumdirection_enumaxis, AxisAlignedBB axisalignedbb, double d0) { // collide -+ if (Math.abs(d0) < 1.0e-7) { -+ return 0.0; -+ } + switch (enumdirection_enumaxis.ordinal()) { + case 0: -+ return this.collideX(axisalignedbb, d0); ++ return AxisAlignedBB.collideX(this.aabb, axisalignedbb, d0); + case 1: -+ return this.collideY(axisalignedbb, d0); ++ return AxisAlignedBB.collideY(this.aabb, axisalignedbb, d0); + case 2: -+ return this.collideZ(axisalignedbb, d0); ++ return AxisAlignedBB.collideZ(this.aabb, axisalignedbb, d0); + default: + throw new IllegalStateException("Unknown axis requested"); + } + } + -+ // collideX, collideY, collideZ are copied from 1.12 src and remapped -+ // so the code all belongs to mojang -+ -+ public double collideX(AxisAlignedBB axisalignedbb, double d0) { -+ if (axisalignedbb.maxY > this.aabb.minY && axisalignedbb.minY < this.aabb.maxY -+ && axisalignedbb.maxZ > this.aabb.minZ && axisalignedbb.minZ < this.aabb.maxZ) { -+ double d1; -+ -+ if (d0 > 0.0D && axisalignedbb.maxX <= this.aabb.minX) { -+ d1 = this.aabb.minX - axisalignedbb.maxX; -+ if (d1 < d0) { -+ d0 = d1; -+ } -+ } else if (d0 < 0.0D && axisalignedbb.minX >= this.aabb.maxX) { -+ d1 = this.aabb.maxX - axisalignedbb.minX; -+ if (d1 > d0) { -+ d0 = d1; -+ } -+ } -+ -+ return d0; -+ } else { -+ return d0; -+ } -+ } -+ -+ public double collideY(AxisAlignedBB axisalignedbb, double d0) { -+ if (axisalignedbb.maxX > this.aabb.minX && axisalignedbb.minX < this.aabb.maxX -+ && axisalignedbb.maxZ > this.aabb.minZ && axisalignedbb.minZ < this.aabb.maxZ) { -+ double d1; -+ -+ if (d0 > 0.0D && axisalignedbb.maxY <= this.aabb.minY) { -+ d1 = this.aabb.minY - axisalignedbb.maxY; -+ if (d1 < d0) { -+ d0 = d1; -+ } -+ } else if (d0 < 0.0D && axisalignedbb.minY >= this.aabb.maxY) { -+ d1 = this.aabb.maxY - axisalignedbb.minY; -+ if (d1 > d0) { -+ d0 = d1; -+ } -+ } -+ -+ return d0; -+ } else { -+ return d0; -+ } -+ } -+ -+ public double collideZ(AxisAlignedBB axisalignedbb, double d0) { -+ if (axisalignedbb.maxX > this.aabb.minX && axisalignedbb.minX < this.aabb.maxX -+ && axisalignedbb.maxY > this.aabb.minY && axisalignedbb.minY < this.aabb.maxY) { -+ double d1; -+ -+ if (d0 > 0.0D && axisalignedbb.maxZ <= this.aabb.minZ) { -+ d1 = this.aabb.minZ - axisalignedbb.maxZ; -+ if (d1 < d0) { -+ d0 = d1; -+ } -+ } else if (d0 < 0.0D && axisalignedbb.minZ >= this.aabb.maxZ) { -+ d1 = this.aabb.maxZ - axisalignedbb.minZ; -+ if (d1 > d0) { -+ d0 = d1; -+ } -+ } -+ -+ return d0; -+ } else { -+ return d0; -+ } -+ } -+ + @Override + public boolean intersects(AxisAlignedBB axisalingedbb) { -+ return this.aabb.intersects(axisalingedbb); ++ return this.aabb.voxelShapeIntersect(axisalingedbb); + } +} diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index ed9b2f9ad..d54bf7140 100644 +index ed9b2f9ad..6aa9f0733 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -13,6 +13,119 @@ public class AxisAlignedBB { +@@ -13,6 +13,149 @@ public class AxisAlignedBB { public final double maxY; public final double maxZ; + // Tuinity start + public final boolean isEmpty() { -+ return (this.maxX - this.minX) < 1.0E-7 && (this.maxY - this.minY) < 1.0E-7 && (this.maxZ - this.minZ) < 1.0E-7; ++ return (this.maxX - this.minX) < MCUtil.COLLISION_EPSILON && (this.maxY - this.minY) < MCUtil.COLLISION_EPSILON && (this.maxZ - this.minZ) < MCUtil.COLLISION_EPSILON; + } + + public static AxisAlignedBB getBoxForChunk(int chunkX, int chunkZ) { + double x = (double)(chunkX << 4); + double z = (double)(chunkZ << 4); + // use a bounding box bigger than the chunk to prevent entities from entering it on move -+ return new AxisAlignedBB(x - 1.0E-7, 0.0, z - 1.0E-7, x + (16.0 + 1.0E-7), 255.0, z + (16.0 + 1.0E-7), false); ++ return new AxisAlignedBB(x - 3*MCUtil.COLLISION_EPSILON, Double.NEGATIVE_INFINITY, z - 3*MCUtil.COLLISION_EPSILON, x + (16.0 + 3*MCUtil.COLLISION_EPSILON), Double.POSITIVE_INFINITY, z + (16.0 + 3*MCUtil.COLLISION_EPSILON), false); + } + -+ // collideX, collideY, collideZ are copied from 1.12 src -+ // so the code all belongs to mojang -+ public double collideX(AxisAlignedBB axisalignedbb, double d0) { -+ if (axisalignedbb.maxY > this.minY && axisalignedbb.minY < this.maxY -+ && axisalignedbb.maxZ > this.minZ && axisalignedbb.minZ < this.maxZ) { -+ double d1; ++ /* ++ A couple of rules for VoxelShape collisions: ++ Two shapes only intersect if they are actually more than EPSILON units into each other. This also applies to movement ++ checks. ++ If the two shapes strictly collide, then the return value of a collide call will return a value in the opposite ++ direction of the source move. However, this value will not be greater in magnitude than EPSILON. Collision code ++ will automatically round it to 0. ++ */ + -+ if (d0 > 0.0D && axisalignedbb.maxX <= this.minX) { -+ d1 = this.minX - axisalignedbb.maxX; -+ if (d1 < d0) { -+ d0 = d1; -+ } -+ } else if (d0 < 0.0D && axisalignedbb.minX >= this.maxX) { -+ d1 = this.maxX - axisalignedbb.minX; -+ if (d1 > d0) { -+ d0 = d1; -+ } -+ } -+ -+ return d0; -+ } else { -+ return d0; -+ } ++ public final boolean voxelShapeIntersect(AxisAlignedBB other) { ++ return this.voxelShapeIntersect(other.minX, other.minY, other.minZ, other.maxX, other.maxY, other.maxZ); + } + -+ public double collideY(AxisAlignedBB axisalignedbb, double d0) { -+ if (axisalignedbb.maxX > this.minX && axisalignedbb.minX < this.maxX -+ && axisalignedbb.maxZ > this.minZ && axisalignedbb.minZ < this.maxZ) { -+ double d1; -+ -+ if (d0 > 0.0D && axisalignedbb.maxY <= this.minY) { -+ d1 = this.minY - axisalignedbb.maxY; -+ if (d1 < d0) { -+ d0 = d1; -+ } -+ } else if (d0 < 0.0D && axisalignedbb.minY >= this.maxY) { -+ d1 = this.maxY - axisalignedbb.minY; -+ if (d1 > d0) { -+ d0 = d1; -+ } -+ } -+ -+ return d0; -+ } else { -+ return d0; -+ } ++ public final boolean voxelShapeIntersect(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) { ++ return (this.minX - maxX) < -MCUtil.COLLISION_EPSILON && (this.maxX - minX) > MCUtil.COLLISION_EPSILON && ++ (this.minY - maxY) < -MCUtil.COLLISION_EPSILON && (this.maxY - minY) > MCUtil.COLLISION_EPSILON && ++ (this.minZ - maxZ) < -MCUtil.COLLISION_EPSILON && (this.maxZ - minZ) > MCUtil.COLLISION_EPSILON; + } + -+ public double collideZ(AxisAlignedBB axisalignedbb, double d0) { -+ if (axisalignedbb.maxX > this.minX && axisalignedbb.minX < this.maxX -+ && axisalignedbb.maxY > this.minY && axisalignedbb.minY < this.maxY) { -+ double d1; -+ -+ if (d0 > 0.0D && axisalignedbb.maxZ <= this.minZ) { -+ d1 = this.minZ - axisalignedbb.maxZ; -+ if (d1 < d0) { -+ d0 = d1; -+ } -+ } else if (d0 < 0.0D && axisalignedbb.minZ >= this.maxZ) { -+ d1 = this.maxZ - axisalignedbb.minZ; -+ if (d1 > d0) { -+ d0 = d1; -+ } -+ } -+ -+ return d0; -+ } else { -+ return d0; ++ public static double collideX(AxisAlignedBB target, AxisAlignedBB source, double source_move) { ++ if (target.isEmpty() || source.isEmpty()) { ++ return source_move; + } ++ if (Math.abs(source_move) < MCUtil.COLLISION_EPSILON) { ++ return 0.0; ++ } ++ ++ if ((source.minY - target.maxY) < -MCUtil.COLLISION_EPSILON && (source.maxY - target.minY) > MCUtil.COLLISION_EPSILON && ++ (source.minZ - target.maxZ) < -MCUtil.COLLISION_EPSILON && (source.maxZ - target.minZ) > MCUtil.COLLISION_EPSILON) { ++ ++ if (source_move >= 0.0) { ++ double max_move = target.minX - source.maxX; // < 0.0 if no strict collision ++ if (max_move < -MCUtil.COLLISION_EPSILON) { ++ return source_move; ++ } ++ return Math.min(max_move, source_move); ++ } else { ++ double max_move = target.maxX - source.minX; // > 0.0 if no strict collision ++ if (max_move > MCUtil.COLLISION_EPSILON) { ++ return source_move; ++ } ++ return Math.max(max_move, source_move); ++ } ++ } ++ return source_move; ++ } ++ ++ public static double collideY(AxisAlignedBB target, AxisAlignedBB source, double source_move) { ++ if (target.isEmpty() || source.isEmpty()) { ++ return source_move; ++ } ++ if (Math.abs(source_move) < MCUtil.COLLISION_EPSILON) { ++ return 0.0; ++ } ++ ++ if ((source.minX - target.maxX) < -MCUtil.COLLISION_EPSILON && (source.maxX - target.minX) > MCUtil.COLLISION_EPSILON && ++ (source.minZ - target.maxZ) < -MCUtil.COLLISION_EPSILON && (source.maxZ - target.minZ) > MCUtil.COLLISION_EPSILON) { ++ if (source_move >= 0.0) { ++ double max_move = target.minY - source.maxY; // < 0.0 if no strict collision ++ if (max_move < -MCUtil.COLLISION_EPSILON) { ++ return source_move; ++ } ++ return Math.min(max_move, source_move); ++ } else { ++ double max_move = target.maxY - source.minY; // > 0.0 if no strict collision ++ if (max_move > MCUtil.COLLISION_EPSILON) { ++ return source_move; ++ } ++ return Math.max(max_move, source_move); ++ } ++ } ++ return source_move; ++ } ++ ++ public static double collideZ(AxisAlignedBB target, AxisAlignedBB source, double source_move) { ++ if (target.isEmpty() || source.isEmpty()) { ++ return source_move; ++ } ++ if (Math.abs(source_move) < MCUtil.COLLISION_EPSILON) { ++ return 0.0; ++ } ++ ++ if ((source.minX - target.maxX) < -MCUtil.COLLISION_EPSILON && (source.maxX - target.minX) > MCUtil.COLLISION_EPSILON && ++ (source.minY - target.maxY) < -MCUtil.COLLISION_EPSILON && (source.maxY - target.minY) > MCUtil.COLLISION_EPSILON) { ++ if (source_move >= 0.0) { ++ double max_move = target.minZ - source.maxZ; // < 0.0 if no strict collision ++ if (max_move < -MCUtil.COLLISION_EPSILON) { ++ return source_move; ++ } ++ return Math.min(max_move, source_move); ++ } else { ++ double max_move = target.maxZ - source.minZ; // > 0.0 if no strict collision ++ if (max_move > MCUtil.COLLISION_EPSILON) { ++ return source_move; ++ } ++ return Math.max(max_move, source_move); ++ } ++ } ++ return source_move; + } + + public final AxisAlignedBB offsetX(double dx) { @@ -1574,7 +1809,7 @@ index ed9b2f9ad..d54bf7140 100644 public AxisAlignedBB(double d0, double d1, double d2, double d3, double d4, double d5) { this.minX = Math.min(d0, d3); this.minY = Math.min(d1, d4); -@@ -185,6 +298,7 @@ public class AxisAlignedBB { +@@ -185,6 +328,7 @@ public class AxisAlignedBB { return new AxisAlignedBB(d0, d1, d2, d3, d4, d5); } @@ -1582,7 +1817,7 @@ index ed9b2f9ad..d54bf7140 100644 public AxisAlignedBB d(double d0, double d1, double d2) { return new AxisAlignedBB(this.minX + d0, this.minY + d1, this.minZ + d2, this.maxX + d0, this.maxY + d1, this.maxZ + d2); } -@@ -193,6 +307,7 @@ public class AxisAlignedBB { +@@ -193,6 +337,7 @@ public class AxisAlignedBB { return new AxisAlignedBB(this.minX + (double) blockposition.getX(), this.minY + (double) blockposition.getY(), this.minZ + (double) blockposition.getZ(), this.maxX + (double) blockposition.getX(), this.maxY + (double) blockposition.getY(), this.maxZ + (double) blockposition.getZ()); } @@ -1590,7 +1825,7 @@ index ed9b2f9ad..d54bf7140 100644 public AxisAlignedBB c(Vec3D vec3d) { return this.d(vec3d.x, vec3d.y, vec3d.z); } -@@ -212,6 +327,7 @@ public class AxisAlignedBB { +@@ -212,6 +357,7 @@ public class AxisAlignedBB { return this.e(vec3d.x, vec3d.y, vec3d.z); } @@ -1599,7 +1834,7 @@ index ed9b2f9ad..d54bf7140 100644 return d0 >= this.minX && d0 < this.maxX && d1 >= this.minY && d1 < this.maxY && d2 >= this.minZ && d2 < this.maxZ; } diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index 4d574f83a..f0e5ba3b2 100644 +index 6b655b744..e811295b4 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java @@ -16,9 +16,9 @@ public class BaseBlockPosition implements Comparable { @@ -1619,26 +1854,26 @@ index 4d574f83a..f0e5ba3b2 100644 return this.e; } -- protected void o(int i) { -+ protected void o_unused(int i) { // Tuinity - not needed here +- public void o(int i) { // Paper - protected -> public ++ protected void o_unused(int i) { // Paper - protected -> public // Tuinity - not needed here - Also revert the decision to expose set on an immutable type this.a = i; } -- protected void p(int i) { -+ protected void p_unused(int i) { // Tuinity - not needed here +- public void p(int i) { // Paper - protected -> public ++ protected void p_unused(int i) { // Paper - protected -> public // Tuinity - not needed here - Also revert the decision to expose set on an immutable type this.b = i; } -- protected void q(int i) { -+ protected void q_unused(int i) { // Tuinity - not needed here +- public void q(int i) { // Paper - protected -> public ++ protected void q_unused(int i) { // Paper - protected -> public // Tuinity - not needed here - Also revert the decision to expose set on an immutable type this.e = i; } diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java -index 440c959b1..82e07b357 100644 +index 8265ed4da..2db488aba 100644 --- a/src/main/java/net/minecraft/server/BlockBase.java +++ b/src/main/java/net/minecraft/server/BlockBase.java -@@ -176,8 +176,8 @@ public abstract class BlockBase { +@@ -182,8 +182,8 @@ public abstract class BlockBase { return VoxelShapes.a(); } @@ -1649,7 +1884,7 @@ index 440c959b1..82e07b357 100644 return iblockdata.i(iblockaccess, blockposition) ? iblockaccess.J() : (iblockdata.a(iblockaccess, blockposition) ? 0 : 1); } -@@ -289,14 +289,14 @@ public abstract class BlockBase { +@@ -295,14 +295,14 @@ public abstract class BlockBase { public abstract static class BlockData extends IBlockDataHolder { @@ -1667,7 +1902,7 @@ index 440c959b1..82e07b357 100644 private final BlockBase.e l; private final BlockBase.e m; private final BlockBase.e n; -@@ -332,10 +332,25 @@ public abstract class BlockBase { +@@ -338,10 +338,25 @@ public abstract class BlockBase { } // Paper end @@ -1693,7 +1928,7 @@ index 440c959b1..82e07b357 100644 } -@@ -359,10 +374,12 @@ public abstract class BlockBase { +@@ -365,10 +380,12 @@ public abstract class BlockBase { return this.a != null ? this.a.g : this.getBlock().b(this.p(), iblockaccess, blockposition); } @@ -1706,7 +1941,7 @@ index 440c959b1..82e07b357 100644 public VoxelShape a(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) { return this.a != null && this.a.i != null ? this.a.i[enumdirection.ordinal()] : VoxelShapes.a(this.c(iblockaccess, blockposition), enumdirection); } -@@ -371,19 +388,19 @@ public abstract class BlockBase { +@@ -377,19 +394,19 @@ public abstract class BlockBase { return this.getBlock().d(this.p(), iblockaccess, blockposition); } @@ -1731,7 +1966,7 @@ index 440c959b1..82e07b357 100644 return this.f; } -@@ -449,7 +466,7 @@ public abstract class BlockBase { +@@ -455,7 +472,7 @@ public abstract class BlockBase { } } @@ -1740,7 +1975,7 @@ index 440c959b1..82e07b357 100644 return this.k; } -@@ -621,12 +638,12 @@ public abstract class BlockBase { +@@ -627,12 +644,12 @@ public abstract class BlockBase { return this.getBlock().a(block); } @@ -1770,6 +2005,19 @@ index 12a023044..9e5e6de52 100644 if (tileentity instanceof IInventory) { InventoryUtils.dropInventory(world, blockposition, (IInventory) tileentity); +diff --git a/src/main/java/net/minecraft/server/BlockPortalShape.java b/src/main/java/net/minecraft/server/BlockPortalShape.java +index 6ef81aeb4..a84844726 100644 +--- a/src/main/java/net/minecraft/server/BlockPortalShape.java ++++ b/src/main/java/net/minecraft/server/BlockPortalShape.java +@@ -227,7 +227,7 @@ public class BlockPortalShape { + public static ShapeDetectorShape a(WorldServer worldserver, BlockUtil.Rectangle blockutil_rectangle, EnumDirection.EnumAxis enumdirection_enumaxis, Vec3D vec3d, EntitySize entitysize, Vec3D vec3d1, float f, float f1, CraftPortalEvent portalEventInfo) { // CraftBukkit // PAIL rename toDetectorShape + BlockPosition blockposition = blockutil_rectangle.origin; + IBlockData iblockdata = worldserver.getType(blockposition); +- EnumDirection.EnumAxis enumdirection_enumaxis1 = (EnumDirection.EnumAxis) iblockdata.get(BlockProperties.E); ++ EnumDirection.EnumAxis enumdirection_enumaxis1 = !iblockdata.contains(BlockProperties.E) ? enumdirection_enumaxis : (EnumDirection.EnumAxis) iblockdata.get(BlockProperties.E); // Tuinity - use provided direction if the block doesn't have one + double d0 = (double) blockutil_rectangle.side1; + double d1 = (double) blockutil_rectangle.side2; + int i = enumdirection_enumaxis == enumdirection_enumaxis1 ? 0 : 90; diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java index 2d887af90..2291135ea 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java @@ -1867,6 +2115,18 @@ index 2d887af90..2291135ea 100644 @Override public BlockPosition immutableCopy() { +diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java +index 6abc3d4cf..a8ef41dcf 100644 +--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java ++++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java +@@ -226,6 +226,7 @@ public class BlockRedstoneWire extends Block { + private void updateSurroundingRedstone(World worldIn, BlockPosition pos, IBlockData state, BlockPosition source) { + if (worldIn.paperConfig.useEigencraftRedstone) { + turbo.updateSurroundingRedstone(worldIn, pos, state, source); ++ return; // Tuinity - Don't run old logic as well + } + a(worldIn, pos, state); + } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index 299d7d7a5..ac6e5e330 100644 --- a/src/main/java/net/minecraft/server/Chunk.java @@ -2005,7 +2265,7 @@ index 299d7d7a5..ac6e5e330 100644 this.n[i].clear(); diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 3c7b225ed..0c4aed5f5 100644 +index 3c7b225ed..1b750da9e 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -31,7 +31,7 @@ public abstract class ChunkMapDistance { @@ -2084,7 +2344,7 @@ index 3c7b225ed..0c4aed5f5 100644 + if (com.tuinity.tuinity.config.TuinityConfig.delayChunkUnloadsBy <= 0) { + return ret; + } -+ if (ret && ticket.getTicketType() != TicketType.DELAYED_UNLOAD && ticket.getTicketLevel() < tempLevel[0]) { ++ if (ret && ticket.getTicketType().delayUnloadViable && ticket.getTicketLevel() < tempLevel[0]) { + tempLevel[0] = ticket.getTicketLevel(); + } + if (ticket.getTicketType() == TicketType.DELAYED_UNLOAD && ticket.isCached) { @@ -2133,7 +2393,7 @@ index 3c7b225ed..0c4aed5f5 100644 - arraysetsorted.add(delayUnload); - } + // Tuinity start - delay chunk unloads -+ if (com.tuinity.tuinity.config.TuinityConfig.delayChunkUnloadsBy > 0 && ticket.getTicketType() != TicketType.DELAYED_UNLOAD) { ++ if (com.tuinity.tuinity.config.TuinityConfig.delayChunkUnloadsBy > 0 && ticket.getTicketType().delayUnloadViable) { + this.computeDelayedTicketFor(i, ticket.getTicketLevel(), arraysetsorted); } - // Paper end @@ -2745,7 +3005,7 @@ index 550232cb3..229c3b0f0 100644 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 97e61dae7..958f361a5 100644 +index 1ee01486f..630fb5265 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -137,7 +137,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2884,11 +3144,11 @@ index 97e61dae7..958f361a5 100644 + // Tuinity start - optimise entity movement + private static double performCollisionsX(AxisAlignedBB currentBoundingBox, double value, List potentialCollisions) { + for (int i = 0, len = potentialCollisions.size(); i < len; ++i) { -+ if (Math.abs(value) < 1.0E-7) { ++ if (Math.abs(value) < MCUtil.COLLISION_EPSILON) { + return 0.0; + } + AxisAlignedBB target = potentialCollisions.get(i); -+ value = target.collideX(currentBoundingBox, value); ++ value = AxisAlignedBB.collideX(target, currentBoundingBox, value); + } + + return value; @@ -2896,11 +3156,11 @@ index 97e61dae7..958f361a5 100644 + + private static double performCollisionsY(AxisAlignedBB currentBoundingBox, double value, List potentialCollisions) { + for (int i = 0, len = potentialCollisions.size(); i < len; ++i) { -+ if (Math.abs(value) < 1.0E-7) { ++ if (Math.abs(value) < MCUtil.COLLISION_EPSILON) { + return 0.0; + } + AxisAlignedBB target = potentialCollisions.get(i); -+ value = target.collideY(currentBoundingBox, value); ++ value = AxisAlignedBB.collideY(target, currentBoundingBox, value); + } + + return value; @@ -2908,11 +3168,11 @@ index 97e61dae7..958f361a5 100644 + + private static double performCollisionsZ(AxisAlignedBB currentBoundingBox, double value, List potentialCollisions) { + for (int i = 0, len = potentialCollisions.size(); i < len; ++i) { -+ if (Math.abs(value) < 1.0E-7) { ++ if (Math.abs(value) < MCUtil.COLLISION_EPSILON) { + return 0.0; + } + AxisAlignedBB target = potentialCollisions.get(i); -+ value = target.collideZ(currentBoundingBox, value); ++ value = AxisAlignedBB.collideZ(target, currentBoundingBox, value); + } + + return value; @@ -3018,7 +3278,7 @@ index 97e61dae7..958f361a5 100644 public static double c(Vec3D vec3d) { return vec3d.x * vec3d.x + vec3d.z * vec3d.z; } -@@ -1929,11 +2138,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1934,11 +2143,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return EnumInteractionResult.PASS; } @@ -3034,7 +3294,7 @@ index 97e61dae7..958f361a5 100644 return false; } -@@ -3270,12 +3481,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3275,12 +3486,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.locBlock; } @@ -3051,7 +3311,7 @@ index 97e61dae7..958f361a5 100644 } public void setMot(double d0, double d1, double d2) { -@@ -3330,7 +3545,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3335,7 +3550,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper end if (this.loc.x != d0 || this.loc.y != d1 || this.loc.z != d2) { @@ -3075,10 +3335,10 @@ index 314886398..79de11ce2 100644 this.setPersistent(); } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b92e74349..aba9f08db 100644 +index c622fb704..ec9174206 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2835,7 +2835,11 @@ public abstract class EntityLiving extends Entity { +@@ -2846,7 +2846,11 @@ public abstract class EntityLiving extends Entity { return; } // Paper - end don't run getEntities if we're not going to use its result @@ -3091,7 +3351,7 @@ index b92e74349..aba9f08db 100644 if (!list.isEmpty()) { // Paper - move up -@@ -2864,6 +2868,9 @@ public abstract class EntityLiving extends Entity { +@@ -2875,6 +2879,9 @@ public abstract class EntityLiving extends Entity { this.C(entity); } } @@ -3363,8 +3623,20 @@ index ec8498c3d..ceaa92400 100644 if (playerChunk == null) { return false; } +diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java +index ff74be145..653ba0f1d 100644 +--- a/src/main/java/net/minecraft/server/MCUtil.java ++++ b/src/main/java/net/minecraft/server/MCUtil.java +@@ -38,6 +38,7 @@ import java.util.function.Consumer; + import java.util.function.Supplier; + + public final class MCUtil { ++ public static final double COLLISION_EPSILON = 1.0E-7; // Tuinity - Just in case mojang changes this... + public static final ThreadPoolExecutor asyncExecutor = new ThreadPoolExecutor( + 0, 2, 60L, TimeUnit.SECONDS, + new LinkedBlockingQueue(), diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bbe793ca3..615a71a78 100644 +index 65e8dc340..106661fae 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -985,7 +985,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> { @@ -3999,7 +4271,7 @@ index fc6197dd5..d4fd01cd2 100644 if (chunk != null) { playerchunkmap.callbackExecutor.execute(() -> { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 8a069cfcb..66d6c15ab 100644 +index fcd3388d8..1887b93e5 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -121,31 +121,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -4222,10 +4494,10 @@ index 8a069cfcb..66d6c15ab 100644 // Paper end - optimised tracker diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 250ae81b8..b44038534 100644 +index b067f3b70..602ed9aaa 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -325,19 +325,24 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -326,19 +326,24 @@ public class PlayerConnection implements PacketListenerPlayIn { if (entity != this.player && entity.getRidingPassenger() == this.player && entity == this.r) { WorldServer worldserver = this.player.getWorldServer(); @@ -4257,7 +4529,7 @@ index 250ae81b8..b44038534 100644 // CraftBukkit start - handle custom speeds and skipped ticks -@@ -366,7 +371,9 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -367,7 +372,9 @@ public class PlayerConnection implements PacketListenerPlayIn { speed *= 2f; // TODO: Get the speed of the vehicle instead of the player // Paper start - Prevent moving into unloaded chunks @@ -4268,7 +4540,7 @@ index 250ae81b8..b44038534 100644 this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); return; } -@@ -972,7 +979,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -973,7 +980,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (this.teleportPos != null) { @@ -4277,7 +4549,7 @@ index 250ae81b8..b44038534 100644 this.A = this.e; this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch); } -@@ -996,7 +1003,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -997,7 +1004,7 @@ public class PlayerConnection implements PacketListenerPlayIn { double d2 = this.player.locZ(); double d3 = this.player.locY(); double d4 = packetplayinflying.a(this.player.locX());double toX = d4; // Paper - OBFHELPER @@ -4286,7 +4558,7 @@ index 250ae81b8..b44038534 100644 double d6 = packetplayinflying.c(this.player.locZ());double toZ = d6; // Paper - OBFHELPER float f = packetplayinflying.a(this.player.yaw); float f1 = packetplayinflying.b(this.player.pitch); -@@ -1004,7 +1011,12 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1005,7 +1012,12 @@ public class PlayerConnection implements PacketListenerPlayIn { double d8 = d5 - this.m; double d9 = d6 - this.n; double d10 = this.player.getMot().g(); @@ -4300,7 +4572,7 @@ index 250ae81b8..b44038534 100644 if (this.player.isSleeping()) { if (d11 > 1.0D) { -@@ -1037,7 +1049,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1038,7 +1050,7 @@ public class PlayerConnection implements PacketListenerPlayIn { speed = player.abilities.walkSpeed * 10f; } // Paper start - Prevent moving into unloaded chunks @@ -4309,7 +4581,7 @@ index 250ae81b8..b44038534 100644 this.internalTeleport(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch, Collections.emptySet()); return; } -@@ -1093,6 +1105,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1094,6 +1106,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9)); @@ -4317,7 +4589,7 @@ index 250ae81b8..b44038534 100644 this.player.setOnGround(packetplayinflying.b()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move // Paper start - prevent position desync if (this.teleportPos != null) { -@@ -1117,7 +1130,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1118,7 +1131,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } this.player.setLocation(d4, d5, d6, f, f1); @@ -5422,10 +5694,10 @@ index e41cb8613..c19ffb925 100644 return j != 0L && i - this.d > j; } diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java -index 5c789b25f..4657b05a4 100644 +index 5c789b25f..25cff70b4 100644 --- a/src/main/java/net/minecraft/server/TicketType.java +++ b/src/main/java/net/minecraft/server/TicketType.java -@@ -26,7 +26,8 @@ public class TicketType { +@@ -26,8 +26,19 @@ public class TicketType { public static final TicketType ASYNC_LOAD = a("async_load", Long::compareTo); // Paper public static final TicketType PRIORITY = a("priority", Comparator.comparingLong(ChunkCoordIntPair::pair), 300); // Paper public static final TicketType URGENT = a("urgent", Comparator.comparingLong(ChunkCoordIntPair::pair), 300); // Paper @@ -5433,8 +5705,19 @@ index 5c789b25f..4657b05a4 100644 + public static final TicketType DELAYED_UNLOAD = a("delayed_unload", Long::compareTo); // Tuinity - delay chunk unloads + public static final TicketType REQUIRED_LOAD = a("required_load", Long::compareTo); // Tuinity - make sure getChunkAt does not fail ++ // Tuinity start - delay chunk unloads ++ boolean delayUnloadViable = true; ++ static { ++ TicketType.LIGHT.delayUnloadViable = false; ++ TicketType.PLUGIN.delayUnloadViable = false; ++ TicketType.PRIORITY.delayUnloadViable = false; ++ TicketType.URGENT.delayUnloadViable = false; ++ TicketType.DELAYED_UNLOAD.delayUnloadViable = false; ++ } ++ // Tuinity end - delay chunk unloads public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); + } diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java index 2484293b1..1496c43fc 100644 --- a/src/main/java/net/minecraft/server/UserCache.java @@ -5611,7 +5894,7 @@ index eb926b74e..700660dd9 100644 List list = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/VoxelShapeArray.java b/src/main/java/net/minecraft/server/VoxelShapeArray.java -index 3c29cb145..43b0b4c34 100644 +index 3c29cb145..d318ec207 100644 --- a/src/main/java/net/minecraft/server/VoxelShapeArray.java +++ b/src/main/java/net/minecraft/server/VoxelShapeArray.java @@ -3,6 +3,7 @@ package net.minecraft.server; @@ -5667,7 +5950,7 @@ index 3c29cb145..43b0b4c34 100644 } @Override -@@ -42,4 +69,49 @@ public final class VoxelShapeArray extends VoxelShape { +@@ -42,4 +69,46 @@ public final class VoxelShapeArray extends VoxelShape { throw new IllegalArgumentException(); } } @@ -5698,17 +5981,14 @@ index 3c29cb145..43b0b4c34 100644 + } + + public final boolean intersects(AxisAlignedBB axisalingedbb) { -+ double minX = axisalingedbb.minX - this.offsetX; -+ double maxX = axisalingedbb.maxX - this.offsetX; -+ double minY = axisalingedbb.minY - this.offsetY; -+ double maxY = axisalingedbb.maxY - this.offsetY; -+ double minZ = axisalingedbb.minZ - this.offsetZ; -+ double maxZ = axisalingedbb.maxZ - this.offsetZ; -+ -+ // this can be optimised by checking an "overall shape" ++ // this can be optimised by checking an "overall shape" first, but not needed ++ double offX = this.offsetX; ++ double offY = this.offsetY; ++ double offZ = this.offsetZ; + + for (AxisAlignedBB boundingBox : this.boundingBoxesRepresentation) { -+ if (boundingBox.intersects(minX, minY, minZ, maxX, maxY, maxZ)) { ++ if (axisalingedbb.voxelShapeIntersect(boundingBox.minX + offX, boundingBox.minY + offY, boundingBox.minZ + offZ, ++ boundingBox.maxX + offX, boundingBox.maxY + offY, boundingBox.maxZ + offZ)) { + return true; + } + } @@ -5717,11 +5997,24 @@ index 3c29cb145..43b0b4c34 100644 + } + // Tuinity end - optimise multi-aabb shapes } +diff --git a/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java b/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java +index e841611bb..259605daa 100644 +--- a/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java ++++ b/src/main/java/net/minecraft/server/VoxelShapeSpliterator.java +@@ -91,7 +91,7 @@ public class VoxelShapeSpliterator extends AbstractSpliterator { + VoxelShape voxelshape = iblockdata.b((IBlockAccess) this.g, this.e, this.c); + + if (voxelshape == VoxelShapes.b()) { +- if (!this.b.a((double) i, (double) j, (double) k, (double) i + 1.0D, (double) j + 1.0D, (double) k + 1.0D)) { ++ if (!this.b.voxelShapeIntersect((double) i, (double) j, (double) k, (double) i + 1.0D, (double) j + 1.0D, (double) k + 1.0D)) { // Tuinity - keep vanilla behavior for voxelshape intersection - See comment in AxisAlignedBB + continue; + } + diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index e21c747b6..6667e699c 100644 +index e21c747b6..4bdadffee 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java -@@ -17,18 +17,81 @@ public final class VoxelShapes { +@@ -17,18 +17,80 @@ public final class VoxelShapes { voxelshapebitset.a(0, 0, 0, true, true); return new VoxelShapeCube(voxelshapebitset); @@ -5749,30 +6042,29 @@ index e21c747b6..6667e699c 100644 + public static void addBoxesToIfIntersects(VoxelShape shape, AxisAlignedBB aabb, java.util.List list) { + if (shape instanceof com.tuinity.tuinity.voxel.AABBVoxelShape) { + com.tuinity.tuinity.voxel.AABBVoxelShape shapeCasted = (com.tuinity.tuinity.voxel.AABBVoxelShape)shape; -+ if (shapeCasted.aabb.intersects(aabb)) { ++ if (shapeCasted.aabb.voxelShapeIntersect(aabb)) { + list.add(shapeCasted.aabb); + } + } else if (shape instanceof VoxelShapeArray) { + VoxelShapeArray shapeCasted = (VoxelShapeArray)shape; -+ double minX = aabb.minX - shapeCasted.offsetX; -+ double maxX = aabb.maxX - shapeCasted.offsetX; -+ double minY = aabb.minY - shapeCasted.offsetY; -+ double maxY = aabb.maxY - shapeCasted.offsetY; -+ double minZ = aabb.minZ - shapeCasted.offsetZ; -+ double maxZ = aabb.maxZ - shapeCasted.offsetZ; ++ // this can be optimised by checking an "overall shape" first, but not needed + -+ // this can be optimised by checking an "overall shape" ++ double offX = shapeCasted.offsetX; ++ double offY = shapeCasted.offsetY; ++ double offZ = shapeCasted.offsetZ; + + for (AxisAlignedBB boundingBox : shapeCasted.boundingBoxesRepresentation) { -+ if (boundingBox.intersects(minX, minY, minZ, maxX, maxY, maxZ)) { -+ list.add(boundingBox.offset(shapeCasted.offsetX, shapeCasted.offsetY, shapeCasted.offsetZ)); ++ double minX, minY, minZ, maxX, maxY, maxZ; ++ if (aabb.voxelShapeIntersect(minX = boundingBox.minX + offX, minY = boundingBox.minY + offY, minZ = boundingBox.minZ + offZ, ++ maxX = boundingBox.maxX + offX, maxY = boundingBox.maxY + offY, maxZ = boundingBox.maxZ + offZ)) { ++ list.add(new AxisAlignedBB(minX, minY, minZ, maxX, maxY, maxZ, false)); + } + } + } else { + java.util.List boxes = shape.getBoundingBoxesRepresentation(); + for (int i = 0, len = boxes.size(); i < len; ++i) { + AxisAlignedBB box = boxes.get(i); -+ if (box.intersects(aabb)) { ++ if (box.voxelShapeIntersect(aabb)) { + list.add(box); + } + } @@ -5806,7 +6098,7 @@ index e21c747b6..6667e699c 100644 } public static VoxelShape create(double d0, double d1, double d2, double d3, double d4, double d5) { -@@ -67,7 +130,7 @@ public final class VoxelShapes { +@@ -67,7 +129,7 @@ public final class VoxelShapes { return new VoxelShapeCube(voxelshapebitset); } } else { @@ -5815,14 +6107,14 @@ index e21c747b6..6667e699c 100644 } } -@@ -132,6 +195,20 @@ public final class VoxelShapes { +@@ -132,6 +194,20 @@ public final class VoxelShapes { public static final boolean applyOperation(VoxelShape voxelshape, VoxelShape voxelshape1, OperatorBoolean operatorboolean) { return VoxelShapes.c(voxelshape, voxelshape1, operatorboolean); } // Paper - OBFHELPER public static boolean c(VoxelShape voxelshape, VoxelShape voxelshape1, OperatorBoolean operatorboolean) { + // Tuinity start - optimise voxelshape + if (operatorboolean == OperatorBoolean.AND) { + if (voxelshape instanceof com.tuinity.tuinity.voxel.AABBVoxelShape && voxelshape1 instanceof com.tuinity.tuinity.voxel.AABBVoxelShape) { -+ return ((com.tuinity.tuinity.voxel.AABBVoxelShape)voxelshape).aabb.intersects(((com.tuinity.tuinity.voxel.AABBVoxelShape)voxelshape1).aabb); ++ return ((com.tuinity.tuinity.voxel.AABBVoxelShape)voxelshape).aabb.voxelShapeIntersect(((com.tuinity.tuinity.voxel.AABBVoxelShape)voxelshape1).aabb); + } else if (voxelshape instanceof com.tuinity.tuinity.voxel.AABBVoxelShape && voxelshape1 instanceof VoxelShapeArray) { + return ((VoxelShapeArray)voxelshape1).intersects(((com.tuinity.tuinity.voxel.AABBVoxelShape)voxelshape).aabb); + } else if (voxelshape1 instanceof com.tuinity.tuinity.voxel.AABBVoxelShape && voxelshape instanceof VoxelShapeArray) { @@ -5836,7 +6128,7 @@ index e21c747b6..6667e699c 100644 if (operatorboolean.apply(false, false)) { throw (IllegalArgumentException) SystemUtils.c((Throwable) (new IllegalArgumentException())); } else if (voxelshape == voxelshape1) { -@@ -314,6 +391,7 @@ public final class VoxelShapes { +@@ -314,6 +390,7 @@ public final class VoxelShapes { } } @@ -5845,16 +6137,14 @@ index e21c747b6..6667e699c 100644 return voxelshape != b() && voxelshape1 != b() ? (voxelshape.isEmpty() && voxelshape1.isEmpty() ? false : !c(b(), b(voxelshape, voxelshape1, OperatorBoolean.OR), OperatorBoolean.ONLY_FIRST)) : true; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 287db5203..4834f7569 100644 +index 724aec660..699dc4343 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -74,8 +74,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - +@@ -75,7 +75,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; -- public Map capturedBlockStates = new HashMap<>(); // Paper + public Map capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper - public Map capturedTileEntities = new HashMap<>(); -+ public Map capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper // Tuinity + public Map capturedTileEntities = new java.util.LinkedHashMap<>(); // Tuinity public List captureDrops; public long ticksPerAnimalSpawns; @@ -5892,7 +6182,7 @@ index 287db5203..4834f7569 100644 IBlockData iblockdata = newBlock; IBlockData iblockdata1 = oldBlock; IBlockData iblockdata2 = actualBlock; -@@ -901,6 +906,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -902,6 +907,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return; // Paper end } @@ -5900,7 +6190,7 @@ index 287db5203..4834f7569 100644 } // Paper start - Prevent armor stands from doing entity lookups @Override -@@ -1080,10 +1086,44 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1081,10 +1087,44 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.getChunkAt(i, j, ChunkStatus.FULL, false); } @@ -5947,7 +6237,7 @@ index 287db5203..4834f7569 100644 int j = MathHelper.floor((axisalignedbb.maxX + 2.0D) / 16.0D); int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D); diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index f01186988..f52132604 100644 +index f01186988..26a8c4ffe 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -47,11 +47,43 @@ public class WorldBorder { @@ -5961,11 +6251,11 @@ index f01186988..f52132604 100644 + } + + public final boolean isCollidingOnBorderEdge(double boxMinX, double boxMaxX, double boxMinZ, double boxMaxZ) { -+ double minX = this.getMinX() - 1.0E-7; -+ double maxX = this.getMaxX() + 1.0E-7; ++ double minX = this.getMinX() - MCUtil.COLLISION_EPSILON; ++ double maxX = this.getMaxX() + MCUtil.COLLISION_EPSILON; + -+ double minZ = this.getMinZ() - 1.0E-7; -+ double maxZ = this.getMaxZ() + 1.0E-7; ++ double minZ = this.getMinZ() - MCUtil.COLLISION_EPSILON; ++ double maxZ = this.getMaxZ() + MCUtil.COLLISION_EPSILON; + + return + // First, check if the worldborder is enclosing the specified box. @@ -6018,7 +6308,7 @@ index f01186988..f52132604 100644 return this.j.d(); } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index efe10b7f5..14318d046 100644 +index efe10b7f5..37c4abec6 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -51,12 +51,13 @@ import org.bukkit.event.server.MapInitializeEvent; @@ -6158,14 +6448,14 @@ index efe10b7f5..14318d046 100644 + } + } + -+ int minBlockX = MathHelper.floor(axisalignedbb.minX - 1.0E-7D) - 1; -+ int maxBlockX = MathHelper.floor(axisalignedbb.maxX + 1.0E-7D) + 1; ++ int minBlockX = MathHelper.floor(axisalignedbb.minX - MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockX = MathHelper.floor(axisalignedbb.maxX + MCUtil.COLLISION_EPSILON) + 1; + -+ int minBlockY = MathHelper.floor(axisalignedbb.minY - 1.0E-7D) - 1; -+ int maxBlockY = MathHelper.floor(axisalignedbb.maxY + 1.0E-7D) + 1; ++ int minBlockY = MathHelper.floor(axisalignedbb.minY - MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockY = MathHelper.floor(axisalignedbb.maxY + MCUtil.COLLISION_EPSILON) + 1; + -+ int minBlockZ = MathHelper.floor(axisalignedbb.minZ - 1.0E-7D) - 1; -+ int maxBlockZ = MathHelper.floor(axisalignedbb.maxZ + 1.0E-7D) + 1; ++ int minBlockZ = MathHelper.floor(axisalignedbb.minZ - MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockZ = MathHelper.floor(axisalignedbb.maxZ + MCUtil.COLLISION_EPSILON) + 1; + + + BlockPosition.MutableBlockPosition mutablePos = new BlockPosition.MutableBlockPosition(); @@ -6275,7 +6565,7 @@ index efe10b7f5..14318d046 100644 + if (axisalignedbb.isEmpty()) { + return false; + } -+ axisalignedbb = axisalignedbb.grow(1.0E-7D, 1.0E-7D, 1.0E-7D); ++ axisalignedbb = axisalignedbb.grow(MCUtil.COLLISION_EPSILON, MCUtil.COLLISION_EPSILON, MCUtil.COLLISION_EPSILON); + List entities = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList(); + try { + if (entity != null && entity.hardCollides()) { @@ -6314,14 +6604,14 @@ index efe10b7f5..14318d046 100644 + } + } + -+ int minBlockX = MathHelper.floor(axisalignedbb.minX - 1.0E-7D) - 1; -+ int maxBlockX = MathHelper.floor(axisalignedbb.maxX + 1.0E-7D) + 1; ++ int minBlockX = MathHelper.floor(axisalignedbb.minX - MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockX = MathHelper.floor(axisalignedbb.maxX + MCUtil.COLLISION_EPSILON) + 1; + -+ int minBlockY = MathHelper.floor(axisalignedbb.minY - 1.0E-7D) - 1; -+ int maxBlockY = MathHelper.floor(axisalignedbb.maxY + 1.0E-7D) + 1; ++ int minBlockY = MathHelper.floor(axisalignedbb.minY - MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockY = MathHelper.floor(axisalignedbb.maxY + MCUtil.COLLISION_EPSILON) + 1; + -+ int minBlockZ = MathHelper.floor(axisalignedbb.minZ - 1.0E-7D) - 1; -+ int maxBlockZ = MathHelper.floor(axisalignedbb.maxZ + 1.0E-7D) + 1; ++ int minBlockZ = MathHelper.floor(axisalignedbb.minZ - MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockZ = MathHelper.floor(axisalignedbb.maxZ + MCUtil.COLLISION_EPSILON) + 1; + + + BlockPosition.MutableBlockPosition mutablePos = new BlockPosition.MutableBlockPosition(); @@ -6428,7 +6718,7 @@ index efe10b7f5..14318d046 100644 + if (axisalignedbb.isEmpty()) { + return; + } -+ axisalignedbb = axisalignedbb.grow(1.0E-7D, 1.0E-7D, 1.0E-7D); ++ axisalignedbb = axisalignedbb.grow(MCUtil.COLLISION_EPSILON, MCUtil.COLLISION_EPSILON, MCUtil.COLLISION_EPSILON); + List entities = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList(); + try { + if (entity != null && entity.hardCollides()) { @@ -7036,10 +7326,10 @@ index bac292e6d..b4e65963e 100644 //Thread.sleep(TimeUnit.SECONDS.toMillis(20)); // Paper End diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 733f2430d..6d1500cf1 100644 +index 3584d20c7..f336f4ecf 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -210,7 +210,7 @@ public class CraftBlock implements Block { +@@ -214,7 +214,7 @@ public class CraftBlock implements Block { @Override public Material getType() { @@ -7062,7 +7352,7 @@ index 0f89e7768..f24d42345 100644 public void setFlag(int flag) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index bbded5671..980890153 100644 +index 7591159c2..e5c3e5765 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -44,7 +44,7 @@ public class CraftBlockData implements BlockData { @@ -7075,7 +7365,7 @@ index bbded5671..980890153 100644 public IBlockData getState() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index b1fdc5737..f1710a53f 100644 +index 6ceb2d50c..407c03408 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -501,27 +501,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/server/0002-Rebrand.patch b/patches/server/0002-Rebrand.patch index c4a5c5e61..37ac493cc 100644 --- a/patches/server/0002-Rebrand.patch +++ b/patches/server/0002-Rebrand.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand diff --git a/pom.xml b/pom.xml -index ee19a2874..09119ce8e 100644 +index 4f45b8158..02ee19722 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,11 @@ @@ -98,7 +98,7 @@ index 74ed02fa9..c1280478e 100644 .completer(new ConsoleCommandCompleter(this.server)) ); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 615a71a78..ba731edd3 100644 +index 106661fae..045c21d00 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1510,7 +1510,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant b = EntityLiving::isAlive; public static final Predicate c = (entity) -> { return entity.isAlive() && !entity.isVehicle() && !entity.isPassenger(); -@@ -27,6 +28,7 @@ public final class IEntitySelector { +@@ -22,10 +23,12 @@ public final class IEntitySelector { + public static final Predicate f = (entity) -> { + return !(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative() && entity.world.getDifficulty() != EnumDifficulty.PEACEFUL; + }; ++ public static Predicate notSpectator() { return g; } // Purpur - OBFHELPER + public static final Predicate g = (entity) -> { return !entity.isSpectator(); }; public static Predicate isInsomniac = (player) -> MathHelper.clamp(((EntityPlayer) player).getStatisticManager().getStatisticValue(StatisticList.CUSTOM.get(StatisticList.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= 72000; // Paper @@ -149,10 +154,10 @@ index 06ce390b6..939535cb2 100644 // Paper start public static final Predicate affectsSpawning = (entity) -> { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b44038534..1fa4f0c9d 100644 +index 602ed9aaa..43a88b728 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -235,6 +235,12 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -236,6 +236,12 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (this.player.F() > 0L && this.minecraftServer.getIdleTimeout() > 0 && SystemUtils.getMonotonicMillis() - this.player.F() > (long) (this.minecraftServer.getIdleTimeout() * 1000 * 60)) { @@ -165,7 +170,7 @@ index b44038534..1fa4f0c9d 100644 this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854 this.disconnect(new ChatMessage("multiplayer.disconnect.idling")); } -@@ -458,6 +464,8 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -459,6 +465,8 @@ public class PlayerConnection implements PacketListenerPlayIn { this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -174,7 +179,7 @@ index b44038534..1fa4f0c9d 100644 // Skip the first time we do this if (true) { // Spigot - don't skip any move events Location oldTo = to.clone(); -@@ -1126,7 +1134,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1127,7 +1135,7 @@ public class PlayerConnection implements PacketListenerPlayIn { if (!this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot flag1 = true; @@ -183,7 +188,7 @@ index b44038534..1fa4f0c9d 100644 } this.player.setLocation(d4, d5, d6, f, f1); -@@ -1165,6 +1173,8 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1166,6 +1174,8 @@ public class PlayerConnection implements PacketListenerPlayIn { this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -263,7 +268,7 @@ index 361f7857e..2578a4677 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 32856f744..de4d6fb56 100644 +index 715d2c5e8..4904cb2ff 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2155,4 +2155,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0009-Evoker-API.patch b/patches/server/0009-Evoker-API.patch deleted file mode 100644 index ae8d64d36..000000000 --- a/patches/server/0009-Evoker-API.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 00:29:02 -0500 -Subject: [PATCH] Evoker API - - -diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java -index 307d723c9..4bea4ca7e 100644 ---- a/src/main/java/net/minecraft/server/EntityEvoker.java -+++ b/src/main/java/net/minecraft/server/EntityEvoker.java -@@ -24,7 +24,7 @@ public class EntityEvoker extends EntityIllagerWizard { - this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D)); - this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F)); - this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); -- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a()); -+ this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // Purpur - decompile error - this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300)); - this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300)); - this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, false)); -@@ -79,12 +79,13 @@ public class EntityEvoker extends EntityIllagerWizard { - return SoundEffects.ENTITY_EVOKER_HURT; - } - -+ public void setWololoTarget(@Nullable EntitySheep sheep) { a(sheep); } // Purpur - OBFHELPER - private void a(@Nullable EntitySheep entitysheep) { - this.bo = entitysheep; - } - - @Nullable -- private EntitySheep fg() { -+ private EntitySheep fg() { return getWololoTarget(); } public EntitySheep getWololoTarget() { // Purpur - OBFHELPER - return this.bo; - } - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java -index 0636d2647..a7a548421 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java -@@ -5,6 +5,10 @@ import net.minecraft.server.EntityIllagerWizard; - import org.bukkit.craftbukkit.CraftServer; - import org.bukkit.entity.EntityType; - import org.bukkit.entity.Evoker; -+// Purpur start -+import net.minecraft.server.EntitySheep; -+import javax.annotation.Nullable; -+// Purpur end - - public class CraftEvoker extends CraftSpellcaster implements Evoker { - -@@ -36,4 +40,17 @@ public class CraftEvoker extends CraftSpellcaster implements Evoker { - public void setCurrentSpell(Evoker.Spell spell) { - getHandle().setSpell(spell == null ? EntityIllagerWizard.Spell.NONE : EntityIllagerWizard.Spell.a(spell.ordinal())); - } -+ -+ // Purpur start -+ @Nullable -+ public org.bukkit.entity.Sheep getWololoTarget() { -+ EntitySheep target = getHandle().getWololoTarget(); -+ return target == null ? null : (org.bukkit.entity.Sheep) target.getBukkitEntity(); -+ } -+ -+ @Override -+ public void setWololoTarget(@Nullable org.bukkit.entity.Sheep sheep) { -+ getHandle().setWololoTarget(sheep == null ? null : (EntitySheep) ((CraftEntity) sheep).getHandle()); -+ } -+ // Purpur end - } diff --git a/patches/server/0011-Bring-back-server-name.patch b/patches/server/0010-Bring-back-server-name.patch similarity index 100% rename from patches/server/0011-Bring-back-server-name.patch rename to patches/server/0010-Bring-back-server-name.patch diff --git a/patches/server/0012-Configurable-server-mod-name.patch b/patches/server/0011-Configurable-server-mod-name.patch similarity index 97% rename from patches/server/0012-Configurable-server-mod-name.patch rename to patches/server/0011-Configurable-server-mod-name.patch index c70428fe9..36c2a6118 100644 --- a/patches/server/0012-Configurable-server-mod-name.patch +++ b/patches/server/0011-Configurable-server-mod-name.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable server mod name diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ba731edd3..5b684affd 100644 +index 045c21d00..847c2d3d1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1510,7 +1510,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant drops = new ArrayList(); public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes; -@@ -226,8 +227,8 @@ public abstract class EntityLiving extends Entity { +@@ -227,8 +228,8 @@ public abstract class EntityLiving extends Entity { this.cQ(); } @@ -52,7 +52,7 @@ index aba9f08db..130516ce6 100644 if (!iblockdata.isAir()) { double d1 = Math.min((double) (0.2F + f / 15.0F), 2.5D); -@@ -1679,7 +1680,7 @@ public abstract class EntityLiving extends Entity { +@@ -1680,7 +1681,7 @@ public abstract class EntityLiving extends Entity { MobEffect mobeffect = this.getEffect(MobEffects.JUMP); float f2 = mobeffect == null ? 0.0F : (float) (mobeffect.getAmplifier() + 1); @@ -62,12 +62,12 @@ index aba9f08db..130516ce6 100644 protected void playBlockStepSound() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 3777aba5f..2a82a2bb7 100644 +index 22705cda3..ec4b30b7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -752,4 +752,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -798,4 +798,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + getHandle().receive(((CraftItem) item).getHandle(), quantity); } - // Paper end + + // Purpur start diff --git a/patches/server/0014-Lagging-threshold.patch b/patches/server/0013-Lagging-threshold.patch similarity index 98% rename from patches/server/0014-Lagging-threshold.patch rename to patches/server/0013-Lagging-threshold.patch index 44dcf3d58..2e6c35e89 100644 --- a/patches/server/0014-Lagging-threshold.patch +++ b/patches/server/0013-Lagging-threshold.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Lagging threshold diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5b684affd..eee7356d5 100644 +index 847c2d3d1..22dadf6d2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -166,6 +166,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant d; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 1c3e6e0c9..c7067dd85 100644 +index af84813c7..2d38a4782 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -353,4 +353,18 @@ public final class CraftItemFactory implements ItemFactory { - return nms != null ? net.minecraft.server.LocaleLanguage.getInstance().translateKey(nms.getItem().getName()) : null; +@@ -388,4 +388,18 @@ public final class CraftItemFactory implements ItemFactory { + new net.md_5.bungee.api.chat.TextComponent(customName)); } // Paper end + diff --git a/patches/server/0016-PlayerSetSpawnerTypeWithEggEvent.patch b/patches/server/0015-PlayerSetSpawnerTypeWithEggEvent.patch similarity index 86% rename from patches/server/0016-PlayerSetSpawnerTypeWithEggEvent.patch rename to patches/server/0015-PlayerSetSpawnerTypeWithEggEvent.patch index 5622562a2..2d8e0bc42 100644 --- a/patches/server/0016-PlayerSetSpawnerTypeWithEggEvent.patch +++ b/patches/server/0015-PlayerSetSpawnerTypeWithEggEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerSetSpawnerTypeWithEggEvent diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 2767de830..dcb43775b 100644 +index e23247e0a..2faa83fad 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java -@@ -143,10 +143,21 @@ public class EntityTypes { +@@ -143,6 +143,16 @@ public class EntityTypes { return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s)); } @@ -25,12 +25,7 @@ index 2767de830..dcb43775b 100644 public static MinecraftKey getName(EntityTypes entitytypes) { return IRegistry.ENTITY_TYPE.getKey(entitytypes); } - -+ public static Optional> getType(String name) { return a(name); } // Purpur - OBFHELPER - public static Optional> a(String s) { - return IRegistry.ENTITY_TYPE.getOptional(MinecraftKey.a(s)); - } -@@ -275,6 +286,16 @@ public class EntityTypes { +@@ -276,6 +286,16 @@ public class EntityTypes { return this.bg; } @@ -44,10 +39,10 @@ index 2767de830..dcb43775b 100644 + } + // Purpur end + + public String getDescriptionId() { return f(); } // Paper - OBFHELPER public String f() { if (this.bo == null) { - this.bo = SystemUtils.a("entity", IRegistry.ENTITY_TYPE.getKey(this)); -@@ -283,6 +304,7 @@ public class EntityTypes { +@@ -285,6 +305,7 @@ public class EntityTypes { return this.bo; } diff --git a/patches/server/0017-EMC-MonsterEggSpawnEvent.patch b/patches/server/0016-EMC-MonsterEggSpawnEvent.patch similarity index 99% rename from patches/server/0017-EMC-MonsterEggSpawnEvent.patch rename to patches/server/0016-EMC-MonsterEggSpawnEvent.patch index e5bb2275b..0281c0266 100644 --- a/patches/server/0017-EMC-MonsterEggSpawnEvent.patch +++ b/patches/server/0016-EMC-MonsterEggSpawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EMC - MonsterEggSpawnEvent diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index dcb43775b..8300e7d1e 100644 +index 2faa83fad..c03b0b58b 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -177,19 +177,45 @@ public class EntityTypes { diff --git a/patches/server/0018-Villager-resetOffers.patch b/patches/server/0017-Villager-resetOffers.patch similarity index 100% rename from patches/server/0018-Villager-resetOffers.patch rename to patches/server/0017-Villager-resetOffers.patch diff --git a/patches/server/0020-SkeletonHorseTrapEvent-getPlayer.patch b/patches/server/0018-SkeletonHorseTrapEvent-getPlayer.patch similarity index 100% rename from patches/server/0020-SkeletonHorseTrapEvent-getPlayer.patch rename to patches/server/0018-SkeletonHorseTrapEvent-getPlayer.patch diff --git a/patches/server/0019-LivingEntity-playPickupItemAnimation.patch b/patches/server/0019-LivingEntity-playPickupItemAnimation.patch deleted file mode 100644 index 7b99a1a7c..000000000 --- a/patches/server/0019-LivingEntity-playPickupItemAnimation.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 19 Oct 2019 02:25:16 -0500 -Subject: [PATCH] LivingEntity#playPickupItemAnimation - - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 2a82a2bb7..a415707e9 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -763,5 +763,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - public void setSafeFallDistance(float safeFallDistance) { - getHandle().safeFallDistance = safeFallDistance; - } -+ -+ @Override -+ public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) { -+ getHandle().receive(((CraftItem)item).getHandle(), quantity); -+ } - // Purpur end - } diff --git a/patches/server/0021-PaperPR-PlayerItemCooldownEvent.patch b/patches/server/0019-PaperPR-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/server/0021-PaperPR-PlayerItemCooldownEvent.patch rename to patches/server/0019-PaperPR-PlayerItemCooldownEvent.patch diff --git a/patches/server/0022-EntityMoveEvent.patch b/patches/server/0020-EntityMoveEvent.patch similarity index 94% rename from patches/server/0022-EntityMoveEvent.patch rename to patches/server/0020-EntityMoveEvent.patch index 36c4777d8..ef32077fa 100644 --- a/patches/server/0022-EntityMoveEvent.patch +++ b/patches/server/0020-EntityMoveEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] EntityMoveEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 130516ce6..17128d5aa 100644 +index c9cff4c07..c7c452e7f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2790,6 +2790,20 @@ public abstract class EntityLiving extends Entity { +@@ -2801,6 +2801,20 @@ public abstract class EntityLiving extends Entity { this.collideNearby(); this.world.getMethodProfiler().exit(); diff --git a/patches/server/0024-Player-invulnerabilities.patch b/patches/server/0021-Player-invulnerabilities.patch similarity index 94% rename from patches/server/0024-Player-invulnerabilities.patch rename to patches/server/0021-Player-invulnerabilities.patch index 317fe2370..db51e9d8d 100644 --- a/patches/server/0024-Player-invulnerabilities.patch +++ b/patches/server/0021-Player-invulnerabilities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player invulnerabilities diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8638d4622..71d2a658d 100644 +index 237b85135..0ed9ab78c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -144,6 +144,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -39,7 +39,7 @@ index 8638d4622..71d2a658d 100644 return false; } else { if (damagesource instanceof EntityDamageSource) { -@@ -983,6 +991,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -984,6 +992,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // CraftBukkit end } @@ -47,7 +47,7 @@ index 8638d4622..71d2a658d 100644 return this; } } -@@ -2121,9 +2130,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2122,9 +2131,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public boolean isFrozen() { // Paper - protected > public @@ -67,10 +67,10 @@ index 8638d4622..71d2a658d 100644 public Scoreboard getScoreboard() { return getBukkitEntity().getScoreboard().getHandle(); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1fa4f0c9d..95534b0c3 100644 +index 43a88b728..8b2f7d1f8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1575,6 +1575,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1576,6 +1576,7 @@ public class PlayerConnection implements PacketListenerPlayIn { PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer()); // Paper start PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packetplayinresourcepackstatus.status.ordinal()]; @@ -79,10 +79,10 @@ index 1fa4f0c9d..95534b0c3 100644 this.server.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(getPlayer(), packStatus)); // Paper end diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 33915eeb0..83219d657 100644 +index 787e80c50..b40431aa4 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -903,6 +903,8 @@ public abstract class PlayerList { +@@ -902,6 +902,8 @@ public abstract class PlayerList { } // Paper end @@ -108,7 +108,7 @@ index 2578a4677..c441fcea9 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index de4d6fb56..5013c9175 100644 +index 4904cb2ff..8cf61bf89 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2171,5 +2171,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0025-Anvil-API.patch b/patches/server/0022-Anvil-API.patch similarity index 100% rename from patches/server/0025-Anvil-API.patch rename to patches/server/0022-Anvil-API.patch diff --git a/patches/server/0026-Configurable-villager-brain-ticks.patch b/patches/server/0023-Configurable-villager-brain-ticks.patch similarity index 100% rename from patches/server/0026-Configurable-villager-brain-ticks.patch rename to patches/server/0023-Configurable-villager-brain-ticks.patch diff --git a/patches/server/0023-PaperPR-Add-BellRingEvent.patch b/patches/server/0023-PaperPR-Add-BellRingEvent.patch deleted file mode 100644 index 2e31d0b54..000000000 --- a/patches/server/0023-PaperPR-Add-BellRingEvent.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Eearslya Sleiarion -Date: Mon, 24 Jun 2019 21:27:32 -0700 -Subject: [PATCH] PaperPR - Add BellRingEvent - - -diff --git a/src/main/java/net/minecraft/server/BlockBell.java b/src/main/java/net/minecraft/server/BlockBell.java -index 2ef899c76..7db4e22c6 100644 ---- a/src/main/java/net/minecraft/server/BlockBell.java -+++ b/src/main/java/net/minecraft/server/BlockBell.java -@@ -44,7 +44,7 @@ public class BlockBell extends BlockTileEntity { - Entity entity = iprojectile.getShooter(); - EntityHuman entityhuman = entity instanceof EntityHuman ? (EntityHuman) entity : null; - -- this.a(world, iblockdata, movingobjectpositionblock, entityhuman, true); -+ this.handleBellRing(world, iblockdata, movingobjectpositionblock, entityhuman, true, entity); // Purpur - } - - @Override -@@ -53,11 +53,23 @@ public class BlockBell extends BlockTileEntity { - } - - public boolean a(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, @Nullable EntityHuman entityhuman, boolean flag) { -+ // Purpur start - BellRingEvent -+ return this.handleBellRing(world, iblockdata, movingobjectpositionblock, entityhuman, true, entityhuman); -+ } -+ -+ public boolean handleBellRing(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, @Nullable EntityHuman entityhuman, boolean flag, @Nullable Entity entity) { -+ // Purpur end - EnumDirection enumdirection = movingobjectpositionblock.getDirection(); - BlockPosition blockposition = movingobjectpositionblock.getBlockPosition(); - boolean flag1 = !flag || this.a(iblockdata, enumdirection, movingobjectpositionblock.getPos().y - (double) blockposition.getY()); - - if (flag1) { -+ // Purpur start - BellRingEvent -+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -+ if (!new com.destroystokyo.paper.event.block.BellRingEvent(block, entity.getBukkitEntity()).callEvent()) { -+ return true; -+ } -+ // Purpur end - boolean flag2 = this.a(world, blockposition, enumdirection); - - if (flag2 && entityhuman != null) { diff --git a/patches/server/0027-Alternative-Keepalive-Handling.patch b/patches/server/0024-Alternative-Keepalive-Handling.patch similarity index 95% rename from patches/server/0027-Alternative-Keepalive-Handling.patch rename to patches/server/0024-Alternative-Keepalive-Handling.patch index 7fc10df6c..fc74d8038 100644 --- a/patches/server/0027-Alternative-Keepalive-Handling.patch +++ b/patches/server/0024-Alternative-Keepalive-Handling.patch @@ -17,10 +17,10 @@ index 8e93f1540..470f92c4f 100644 return this.a; } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 95534b0c3..5ec3679cc 100644 +index 8b2f7d1f8..307ffb21d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -77,6 +77,7 @@ public class PlayerConnection implements PacketListenerPlayIn { private long lastKeepAlive = SystemUtils.getMonotonicMillis(); private void setLastPing(long lastPing) { this.lastKeepAlive = lastPing;}; private long getLastPing() { return this.lastKeepAlive;}; // Paper - OBFHELPER private boolean awaitingKeepAlive; private void setPendingPing(boolean isPending) { this.awaitingKeepAlive = isPending;}; private boolean isPendingPing() { return this.awaitingKeepAlive;}; // Paper - OBFHELPER private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER @@ -28,7 +28,7 @@ index 95534b0c3..5ec3679cc 100644 // CraftBukkit start - multithreaded fields private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); -@@ -204,6 +205,21 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -205,6 +206,21 @@ public class PlayerConnection implements PacketListenerPlayIn { long currentTime = SystemUtils.getMonotonicMillis(); long elapsedTime = currentTime - this.getLastPing(); @@ -50,7 +50,7 @@ index 95534b0c3..5ec3679cc 100644 if (this.isPendingPing()) { if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info -@@ -2717,6 +2733,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2723,6 +2739,16 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInKeepAlive packetplayinkeepalive) { diff --git a/patches/server/0028-Silk-touch-spawners.patch b/patches/server/0025-Silk-touch-spawners.patch similarity index 98% rename from patches/server/0028-Silk-touch-spawners.patch rename to patches/server/0025-Silk-touch-spawners.patch index 90d00c783..b7701094f 100644 --- a/patches/server/0028-Silk-touch-spawners.patch +++ b/patches/server/0025-Silk-touch-spawners.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Silk touch spawners diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index a45ceff9f..d08b58473 100644 +index 4b4f14711..372ee6adc 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -223,6 +223,7 @@ public class Block extends BlockBase implements IMaterial { @@ -105,7 +105,7 @@ index 81e145ff0..91b92d95a 100644 return i; diff --git a/src/main/java/net/minecraft/server/ItemSpawner.java b/src/main/java/net/minecraft/server/ItemSpawner.java new file mode 100644 -index 000000000..babe8ad2c +index 000000000..5c7f73918 --- /dev/null +++ b/src/main/java/net/minecraft/server/ItemSpawner.java @@ -0,0 +1,23 @@ @@ -124,7 +124,7 @@ index 000000000..babe8ad2c + if (spawner instanceof TileEntityMobSpawner && itemstack.hasTag()) { + NBTTagCompound tag = itemstack.getTag(); + if (tag.hasKey("Purpur.mob_type")) { -+ EntityTypes.getType(tag.getString("Purpur.mob_type")).ifPresent(type -> ++ EntityTypes.getByName(tag.getString("Purpur.mob_type")).ifPresent(type -> + ((TileEntityMobSpawner) spawner).getSpawner().setMobName(type)); + } + } diff --git a/patches/server/0029-MC-168772-Fix-Add-turtle-egg-block-options.patch b/patches/server/0026-MC-168772-Fix-Add-turtle-egg-block-options.patch similarity index 100% rename from patches/server/0029-MC-168772-Fix-Add-turtle-egg-block-options.patch rename to patches/server/0026-MC-168772-Fix-Add-turtle-egg-block-options.patch diff --git a/patches/server/0030-MC-4-Fix-Item-position-desync.patch b/patches/server/0027-MC-4-Fix-Item-position-desync.patch similarity index 100% rename from patches/server/0030-MC-4-Fix-Item-position-desync.patch rename to patches/server/0027-MC-4-Fix-Item-position-desync.patch diff --git a/patches/server/0031-Fix-vanilla-command-permission-handler.patch b/patches/server/0028-Fix-vanilla-command-permission-handler.patch similarity index 98% rename from patches/server/0031-Fix-vanilla-command-permission-handler.patch rename to patches/server/0028-Fix-vanilla-command-permission-handler.patch index adf81fc09..86325be59 100644 --- a/patches/server/0031-Fix-vanilla-command-permission-handler.patch +++ b/patches/server/0028-Fix-vanilla-command-permission-handler.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix vanilla command permission handler diff --git a/src/main/java/com/mojang/brigadier/tree/CommandNode.java b/src/main/java/com/mojang/brigadier/tree/CommandNode.java -index ca0d66448..0fab36224 100644 +index d9c47f3fc..cf35c9d54 100644 --- a/src/main/java/com/mojang/brigadier/tree/CommandNode.java +++ b/src/main/java/com/mojang/brigadier/tree/CommandNode.java @@ -35,6 +35,7 @@ public abstract class CommandNode implements Comparable> { diff --git a/patches/server/0032-Logger-settings-suppressing-pointless-logs.patch b/patches/server/0029-Logger-settings-suppressing-pointless-logs.patch similarity index 100% rename from patches/server/0032-Logger-settings-suppressing-pointless-logs.patch rename to patches/server/0029-Logger-settings-suppressing-pointless-logs.patch diff --git a/patches/server/0033-Disable-outdated-build-check.patch b/patches/server/0030-Disable-outdated-build-check.patch similarity index 100% rename from patches/server/0033-Disable-outdated-build-check.patch rename to patches/server/0030-Disable-outdated-build-check.patch diff --git a/patches/server/0034-Giants-AI-settings.patch b/patches/server/0031-Giants-AI-settings.patch similarity index 96% rename from patches/server/0034-Giants-AI-settings.patch rename to patches/server/0031-Giants-AI-settings.patch index ddd2d000c..ee7a7b21c 100644 --- a/patches/server/0034-Giants-AI-settings.patch +++ b/patches/server/0031-Giants-AI-settings.patch @@ -17,7 +17,7 @@ index c57e23e16..92aa104dc 100644 public AttributeModifiable a(AttributeBase attributebase) { return (AttributeModifiable) this.b.computeIfAbsent(attributebase, (attributebase1) -> { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 958f361a5..1b8d9f129 100644 +index 5dd2a52d3..6bf087bd2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -137,7 +137,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -112,10 +112,10 @@ index 9f4f56c47..8dce2aad7 100644 } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 36df27024..b7fcade36 100644 +index 9cf496b5e..be23120a2 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -939,6 +939,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -940,6 +940,7 @@ public abstract class EntityInsentient extends EntityLiving { return f; } @@ -123,7 +123,7 @@ index 36df27024..b7fcade36 100644 protected void a(DifficultyDamageScaler difficultydamagescaler) { if (this.random.nextFloat() < 0.15F * difficultydamagescaler.d()) { int i = this.random.nextInt(2); -@@ -1046,6 +1047,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1047,6 +1048,7 @@ public abstract class EntityInsentient extends EntityLiving { } } @@ -131,7 +131,7 @@ index 36df27024..b7fcade36 100644 protected void b(DifficultyDamageScaler difficultydamagescaler) { float f = difficultydamagescaler.d(); -@@ -1087,10 +1089,12 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1088,10 +1090,12 @@ public abstract class EntityInsentient extends EntityLiving { } else { this.setLeftHanded(false); } @@ -146,10 +146,10 @@ index 36df27024..b7fcade36 100644 return false; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 17128d5aa..82cf853ab 100644 +index c7c452e7f..cf56621ba 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2148,7 +2148,7 @@ public abstract class EntityLiving extends Entity { +@@ -2159,7 +2159,7 @@ public abstract class EntityLiving extends Entity { this.enderTeleportTo(vec3d.x, vec3d.y, vec3d.z); } diff --git a/patches/server/0035-Illusioners-AI-settings.patch b/patches/server/0032-Illusioners-AI-settings.patch similarity index 98% rename from patches/server/0035-Illusioners-AI-settings.patch rename to patches/server/0032-Illusioners-AI-settings.patch index cc967ba14..b757f9175 100644 --- a/patches/server/0035-Illusioners-AI-settings.patch +++ b/patches/server/0032-Illusioners-AI-settings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Illusioners AI settings diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -index 1c8231620..7b2c459ad 100644 +index 73ac27913..66bfebe1c 100644 --- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java +++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java @@ -19,6 +19,17 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan diff --git a/patches/server/0036-Zombie-horse-naturally-spawn.patch b/patches/server/0033-Zombie-horse-naturally-spawn.patch similarity index 100% rename from patches/server/0036-Zombie-horse-naturally-spawn.patch rename to patches/server/0033-Zombie-horse-naturally-spawn.patch diff --git a/patches/server/0037-Charged-creeper-naturally-spawn.patch b/patches/server/0034-Charged-creeper-naturally-spawn.patch similarity index 100% rename from patches/server/0037-Charged-creeper-naturally-spawn.patch rename to patches/server/0034-Charged-creeper-naturally-spawn.patch diff --git a/patches/server/0038-Rabbit-naturally-spawn-toast-and-killer.patch b/patches/server/0035-Rabbit-naturally-spawn-toast-and-killer.patch similarity index 100% rename from patches/server/0038-Rabbit-naturally-spawn-toast-and-killer.patch rename to patches/server/0035-Rabbit-naturally-spawn-toast-and-killer.patch diff --git a/patches/server/0039-Fix-outdated-server-showing-in-ping-before-server-fu.patch b/patches/server/0036-Fix-outdated-server-showing-in-ping-before-server-fu.patch similarity index 100% rename from patches/server/0039-Fix-outdated-server-showing-in-ping-before-server-fu.patch rename to patches/server/0036-Fix-outdated-server-showing-in-ping-before-server-fu.patch diff --git a/patches/server/0040-Make-Iron-Golems-Swim.patch b/patches/server/0037-Make-Iron-Golems-Swim.patch similarity index 100% rename from patches/server/0040-Make-Iron-Golems-Swim.patch rename to patches/server/0037-Make-Iron-Golems-Swim.patch diff --git a/patches/server/0041-Dont-send-useless-entity-packets.patch b/patches/server/0038-Dont-send-useless-entity-packets.patch similarity index 100% rename from patches/server/0041-Dont-send-useless-entity-packets.patch rename to patches/server/0038-Dont-send-useless-entity-packets.patch diff --git a/patches/server/0042-Tulips-change-fox-type.patch b/patches/server/0039-Tulips-change-fox-type.patch similarity index 100% rename from patches/server/0042-Tulips-change-fox-type.patch rename to patches/server/0039-Tulips-change-fox-type.patch diff --git a/patches/server/0043-Breedable-Polar-Bears.patch b/patches/server/0040-Breedable-Polar-Bears.patch similarity index 100% rename from patches/server/0043-Breedable-Polar-Bears.patch rename to patches/server/0040-Breedable-Polar-Bears.patch diff --git a/patches/server/0044-Chickens-can-retaliate.patch b/patches/server/0041-Chickens-can-retaliate.patch similarity index 100% rename from patches/server/0044-Chickens-can-retaliate.patch rename to patches/server/0041-Chickens-can-retaliate.patch diff --git a/patches/server/0045-Add-option-to-set-armorstand-step-height.patch b/patches/server/0042-Add-option-to-set-armorstand-step-height.patch similarity index 95% rename from patches/server/0045-Add-option-to-set-armorstand-step-height.patch rename to patches/server/0042-Add-option-to-set-armorstand-step-height.patch index d6224dda9..4ede2cb0f 100644 --- a/patches/server/0045-Add-option-to-set-armorstand-step-height.patch +++ b/patches/server/0042-Add-option-to-set-armorstand-step-height.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to set armorstand step height diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 70c2c2e3e..eb32abc5d 100644 +index 81df71b7e..afa23395c 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -617,6 +617,7 @@ public class EntityArmorStand extends EntityLiving { @@ -17,7 +17,7 @@ index 70c2c2e3e..eb32abc5d 100644 if (!this.canTick) { if (this.noTickPoseDirty) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 06d9d9ed4..b41d4959c 100644 +index 95e801ce2..f01c74a2e 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -63,6 +63,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0046-Cat-spawning-options.patch b/patches/server/0043-Cat-spawning-options.patch similarity index 100% rename from patches/server/0046-Cat-spawning-options.patch rename to patches/server/0043-Cat-spawning-options.patch diff --git a/patches/server/0047-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch b/patches/server/0044-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch similarity index 100% rename from patches/server/0047-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch rename to patches/server/0044-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch diff --git a/patches/server/0048-Cows-eat-mushrooms.patch b/patches/server/0045-Cows-eat-mushrooms.patch similarity index 97% rename from patches/server/0048-Cows-eat-mushrooms.patch rename to patches/server/0045-Cows-eat-mushrooms.patch index c111f7756..a131c0ae4 100644 --- a/patches/server/0048-Cows-eat-mushrooms.patch +++ b/patches/server/0045-Cows-eat-mushrooms.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cows eat mushrooms diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1b8d9f129..449cf9d77 100644 +index 6bf087bd2..2be922a71 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2724,6 +2724,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2729,6 +2729,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.invulnerable = flag; } @@ -110,10 +110,10 @@ index 42e6761c8..cfb009c81 100644 public EntityCow createChild(WorldServer worldserver, EntityAgeable entityageable) { return (EntityCow) EntityTypes.COW.a((World) worldserver); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 82cf853ab..5e9849a46 100644 +index cf56621ba..76575ea5f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -80,7 +80,7 @@ public abstract class EntityLiving extends Entity { +@@ -81,7 +81,7 @@ public abstract class EntityLiving extends Entity { public int maxNoDamageTicks; public final float ay; public final float az; diff --git a/patches/server/0049-Fix-cow-rotation-when-shearing-mooshroom.patch b/patches/server/0046-Fix-cow-rotation-when-shearing-mooshroom.patch similarity index 100% rename from patches/server/0049-Fix-cow-rotation-when-shearing-mooshroom.patch rename to patches/server/0046-Fix-cow-rotation-when-shearing-mooshroom.patch diff --git a/patches/server/0050-Pigs-give-saddle-back.patch b/patches/server/0047-Pigs-give-saddle-back.patch similarity index 100% rename from patches/server/0050-Pigs-give-saddle-back.patch rename to patches/server/0047-Pigs-give-saddle-back.patch diff --git a/patches/server/0051-Snowman-drop-and-put-back-pumpkin.patch b/patches/server/0048-Snowman-drop-and-put-back-pumpkin.patch similarity index 100% rename from patches/server/0051-Snowman-drop-and-put-back-pumpkin.patch rename to patches/server/0048-Snowman-drop-and-put-back-pumpkin.patch diff --git a/patches/server/0052-Ender-dragon-always-drop-egg.patch b/patches/server/0049-Ender-dragon-always-drop-egg.patch similarity index 100% rename from patches/server/0052-Ender-dragon-always-drop-egg.patch rename to patches/server/0049-Ender-dragon-always-drop-egg.patch diff --git a/patches/server/0053-Ender-dragon-always-drop-full-exp.patch b/patches/server/0050-Ender-dragon-always-drop-full-exp.patch similarity index 100% rename from patches/server/0053-Ender-dragon-always-drop-full-exp.patch rename to patches/server/0050-Ender-dragon-always-drop-full-exp.patch diff --git a/patches/server/0054-Signs-editable-on-right-click.patch b/patches/server/0051-Signs-editable-on-right-click.patch similarity index 100% rename from patches/server/0054-Signs-editable-on-right-click.patch rename to patches/server/0051-Signs-editable-on-right-click.patch diff --git a/patches/server/0055-Signs-allow-color-codes.patch b/patches/server/0052-Signs-allow-color-codes.patch similarity index 95% rename from patches/server/0055-Signs-allow-color-codes.patch rename to patches/server/0052-Signs-allow-color-codes.patch index a404471d7..840a8be76 100644 --- a/patches/server/0055-Signs-allow-color-codes.patch +++ b/patches/server/0052-Signs-allow-color-codes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Signs allow color codes diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 71d2a658d..7fad63234 100644 +index 0ed9ab78c..698a2623b 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1243,6 +1243,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1244,6 +1244,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void openSign(TileEntitySign tileentitysign) { @@ -17,10 +17,10 @@ index 71d2a658d..7fad63234 100644 this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition())); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5ec3679cc..8e6192fa6 100644 +index 307ffb21d..3a7014d30 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2714,6 +2714,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2720,6 +2720,14 @@ public class PlayerConnection implements PacketListenerPlayIn { } } // Paper end diff --git a/patches/server/0056-Allow-soil-to-moisten-from-water-directly-under-it.patch b/patches/server/0053-Allow-soil-to-moisten-from-water-directly-under-it.patch similarity index 100% rename from patches/server/0056-Allow-soil-to-moisten-from-water-directly-under-it.patch rename to patches/server/0053-Allow-soil-to-moisten-from-water-directly-under-it.patch diff --git a/patches/server/0057-Controllable-Minecarts.patch b/patches/server/0054-Controllable-Minecarts.patch similarity index 98% rename from patches/server/0057-Controllable-Minecarts.patch rename to patches/server/0054-Controllable-Minecarts.patch index b26927f39..0c04cbdab 100644 --- a/patches/server/0057-Controllable-Minecarts.patch +++ b/patches/server/0054-Controllable-Minecarts.patch @@ -22,10 +22,10 @@ index 2291135ea..bc61aaff6 100644 super(i, j, k); } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 5e9849a46..f7c969764 100644 +index 76575ea5f..c8b1fbcf1 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -98,9 +98,9 @@ public abstract class EntityLiving extends Entity { +@@ -99,9 +99,9 @@ public abstract class EntityLiving extends Entity { protected int aO;protected int getKillCount() { return this.aO; } // Paper - OBFHELPER public float lastDamage; public boolean jumping; // Paper protected -> public @@ -119,7 +119,7 @@ index ceef7aaf9..002651aaf 100644 } } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 70e504ff3..276131adc 100644 +index 2763cc943..e54d071dd 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -1,5 +1,7 @@ diff --git a/patches/server/0058-Disable-loot-drops-on-death-by-cramming.patch b/patches/server/0055-Disable-loot-drops-on-death-by-cramming.patch similarity index 93% rename from patches/server/0058-Disable-loot-drops-on-death-by-cramming.patch rename to patches/server/0055-Disable-loot-drops-on-death-by-cramming.patch index 07ab926a0..0d819b06e 100644 --- a/patches/server/0058-Disable-loot-drops-on-death-by-cramming.patch +++ b/patches/server/0055-Disable-loot-drops-on-death-by-cramming.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable loot drops on death by cramming diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f7c969764..618faae95 100644 +index c8b1fbcf1..d9c19f8f5 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1484,8 +1484,10 @@ public abstract class EntityLiving extends Entity { +@@ -1485,8 +1485,10 @@ public abstract class EntityLiving extends Entity { this.dropInventory(); // CraftBukkit - from below if (this.cV() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { @@ -20,7 +20,7 @@ index f7c969764..618faae95 100644 // CraftBukkit start - Call death event org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 276131adc..143908b2d 100644 +index e54d071dd..a12a55dc9 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -110,6 +110,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0059-Players-should-not-cram-to-death.patch b/patches/server/0056-Players-should-not-cram-to-death.patch similarity index 90% rename from patches/server/0059-Players-should-not-cram-to-death.patch rename to patches/server/0056-Players-should-not-cram-to-death.patch index 27c07fd21..affc561c6 100644 --- a/patches/server/0059-Players-should-not-cram-to-death.patch +++ b/patches/server/0056-Players-should-not-cram-to-death.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Players should not cram to death diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 7fad63234..65c241d88 100644 +index 698a2623b..a99429080 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1219,7 +1219,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1220,7 +1220,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public boolean isInvulnerable(DamageSource damagesource) { diff --git a/patches/server/0060-Option-to-toggle-milk-curing-bad-omen.patch b/patches/server/0057-Option-to-toggle-milk-curing-bad-omen.patch similarity index 98% rename from patches/server/0060-Option-to-toggle-milk-curing-bad-omen.patch rename to patches/server/0057-Option-to-toggle-milk-curing-bad-omen.patch index 1111572a8..ebaf5b4bb 100644 --- a/patches/server/0060-Option-to-toggle-milk-curing-bad-omen.patch +++ b/patches/server/0057-Option-to-toggle-milk-curing-bad-omen.patch @@ -19,7 +19,7 @@ index fcf254bba..79554e18f 100644 return itemstack.isEmpty() ? new ItemStack(Items.BUCKET) : itemstack; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 143908b2d..77e2dce3f 100644 +index a12a55dc9..883614746 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -111,8 +111,10 @@ public class PurpurWorldConfig { diff --git a/patches/server/0061-End-gateway-should-check-if-entity-can-use-portal.patch b/patches/server/0058-End-gateway-should-check-if-entity-can-use-portal.patch similarity index 100% rename from patches/server/0061-End-gateway-should-check-if-entity-can-use-portal.patch rename to patches/server/0058-End-gateway-should-check-if-entity-can-use-portal.patch diff --git a/patches/server/0062-Debug-stick-should-not-update-neighbors.patch b/patches/server/0059-Debug-stick-should-not-update-neighbors.patch similarity index 96% rename from patches/server/0062-Debug-stick-should-not-update-neighbors.patch rename to patches/server/0059-Debug-stick-should-not-update-neighbors.patch index d6cc18d16..9ae5eaa61 100644 --- a/patches/server/0062-Debug-stick-should-not-update-neighbors.patch +++ b/patches/server/0059-Debug-stick-should-not-update-neighbors.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Debug stick should not update neighbors diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index ace50805b..76cc28517 100644 +index 3adb29f00..e7759f248 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -229,6 +229,11 @@ public final class ItemStack { diff --git a/patches/server/0063-Fix-reloading-paper.yml.patch b/patches/server/0060-Fix-reloading-paper.yml.patch similarity index 97% rename from patches/server/0063-Fix-reloading-paper.yml.patch rename to patches/server/0060-Fix-reloading-paper.yml.patch index 707f2a158..2ec9a88b0 100644 --- a/patches/server/0063-Fix-reloading-paper.yml.patch +++ b/patches/server/0060-Fix-reloading-paper.yml.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix reloading paper.yml diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index d5a1ade21..fedea8106 100644 +index fbfea9e98..b0fcf7604 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -20,7 +20,7 @@ public class PaperWorldConfig { diff --git a/patches/server/0064-Fix-the-dead-lagging-the-server.patch b/patches/server/0061-Fix-the-dead-lagging-the-server.patch similarity index 91% rename from patches/server/0064-Fix-the-dead-lagging-the-server.patch rename to patches/server/0061-Fix-the-dead-lagging-the-server.patch index 5bf730a59..41fffd801 100644 --- a/patches/server/0064-Fix-the-dead-lagging-the-server.patch +++ b/patches/server/0061-Fix-the-dead-lagging-the-server.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix the dead lagging the server diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 449cf9d77..6d809cc78 100644 +index 2be922a71..5bb1d8e51 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1501,6 +1501,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -17,10 +17,10 @@ index 449cf9d77..6d809cc78 100644 public void f(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 618faae95..51b2aa3e2 100644 +index d9c19f8f5..91fc7ba76 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2466,7 +2466,7 @@ public abstract class EntityLiving extends Entity { +@@ -2477,7 +2477,7 @@ public abstract class EntityLiving extends Entity { } } diff --git a/patches/server/0065-Skip-events-if-there-s-no-listeners.patch b/patches/server/0062-Skip-events-if-there-s-no-listeners.patch similarity index 100% rename from patches/server/0065-Skip-events-if-there-s-no-listeners.patch rename to patches/server/0062-Skip-events-if-there-s-no-listeners.patch diff --git a/patches/server/0066-Add-permission-for-F3-N-debug.patch b/patches/server/0063-Add-permission-for-F3-N-debug.patch similarity index 89% rename from patches/server/0066-Add-permission-for-F3-N-debug.patch rename to patches/server/0063-Add-permission-for-F3-N-debug.patch index 6acb92e3d..e0bf1d8e9 100644 --- a/patches/server/0066-Add-permission-for-F3-N-debug.patch +++ b/patches/server/0063-Add-permission-for-F3-N-debug.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add permission for F3+N debug diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 83219d657..8757711e9 100644 +index b40431aa4..daf5beb0b 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1057,6 +1057,7 @@ public abstract class PlayerList { +@@ -1056,6 +1056,7 @@ public abstract class PlayerList { } else { b0 = (byte) (24 + i); } diff --git a/patches/server/0067-Add-wither-skeleton-takes-wither-damage-option.patch b/patches/server/0064-Add-wither-skeleton-takes-wither-damage-option.patch similarity index 100% rename from patches/server/0067-Add-wither-skeleton-takes-wither-damage-option.patch rename to patches/server/0064-Add-wither-skeleton-takes-wither-damage-option.patch diff --git a/patches/server/0068-Configurable-TPS-Catchup.patch b/patches/server/0065-Configurable-TPS-Catchup.patch similarity index 98% rename from patches/server/0068-Configurable-TPS-Catchup.patch rename to patches/server/0065-Configurable-TPS-Catchup.patch index 254e48663..1a2a2e47e 100644 --- a/patches/server/0068-Configurable-TPS-Catchup.patch +++ b/patches/server/0065-Configurable-TPS-Catchup.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable TPS Catchup diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index eee7356d5..89f422524 100644 +index 22dadf6d2..70f497385 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1001,7 +1001,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && !this.z()) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 3e1e1d336..61094d4f7 100644 +index 355df16d2..ae7de565c 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -112,9 +112,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0070-Add-enderman-and-creeper-griefing-controls.patch b/patches/server/0067-Add-enderman-and-creeper-griefing-controls.patch similarity index 100% rename from patches/server/0070-Add-enderman-and-creeper-griefing-controls.patch rename to patches/server/0067-Add-enderman-and-creeper-griefing-controls.patch diff --git a/patches/server/0071-Entities-pick-up-loot-bypass-mob-griefing-gamerule.patch b/patches/server/0068-Entities-pick-up-loot-bypass-mob-griefing-gamerule.patch similarity index 97% rename from patches/server/0071-Entities-pick-up-loot-bypass-mob-griefing-gamerule.patch rename to patches/server/0068-Entities-pick-up-loot-bypass-mob-griefing-gamerule.patch index 98f888f04..9ea40a499 100644 --- a/patches/server/0071-Entities-pick-up-loot-bypass-mob-griefing-gamerule.patch +++ b/patches/server/0068-Entities-pick-up-loot-bypass-mob-griefing-gamerule.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entities pick up loot bypass mob-griefing gamerule diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index b7fcade36..fc2ac5fb8 100644 +index be23120a2..57d8936a9 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -542,7 +542,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -18,7 +18,7 @@ index b7fcade36..fc2ac5fb8 100644 Iterator iterator = list.iterator(); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index e6a1d88a2..1a830b579 100644 +index c1e511bad..0008c4b12 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -111,10 +111,12 @@ public class PurpurWorldConfig { diff --git a/patches/server/0072-Villagers-farming-can-bypass-mob-griefing-gamerule.patch b/patches/server/0069-Villagers-farming-can-bypass-mob-griefing-gamerule.patch similarity index 100% rename from patches/server/0072-Villagers-farming-can-bypass-mob-griefing-gamerule.patch rename to patches/server/0069-Villagers-farming-can-bypass-mob-griefing-gamerule.patch diff --git a/patches/server/0073-Villagers-follow-emerald-blocks.patch b/patches/server/0070-Villagers-follow-emerald-blocks.patch similarity index 100% rename from patches/server/0073-Villagers-follow-emerald-blocks.patch rename to patches/server/0070-Villagers-follow-emerald-blocks.patch diff --git a/patches/server/0074-Allow-leashing-villagers.patch b/patches/server/0071-Allow-leashing-villagers.patch similarity index 95% rename from patches/server/0074-Allow-leashing-villagers.patch rename to patches/server/0071-Allow-leashing-villagers.patch index e966474ef..b6bf041e8 100644 --- a/patches/server/0074-Allow-leashing-villagers.patch +++ b/patches/server/0071-Allow-leashing-villagers.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow leashing villagers diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index fc2ac5fb8..c87c95160 100644 +index 57d8936a9..3460b0f5a 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1138,6 +1138,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1139,6 +1139,7 @@ public abstract class EntityInsentient extends EntityLiving { if (!this.isAlive()) { return EnumInteractionResult.PASS; } else if (this.getLeashHolder() == entityhuman) { @@ -51,10 +51,10 @@ index 74c2d89af..96dda6a14 100644 @Override public EntityAgeable createChild(WorldServer worldserver, EntityAgeable entityageable) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 26a760bc3..665eac22f 100644 +index 5826c2985..077860df8 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -269,17 +269,21 @@ public class PurpurWorldConfig { +@@ -276,17 +276,21 @@ public class PurpurWorldConfig { public int villagerBrainTicks = 1; public boolean villagerUseBrainTicksOnlyWhenLagging = true; diff --git a/patches/server/0075-Implement-configurable-search-radius-for-villagers-t.patch b/patches/server/0072-Implement-configurable-search-radius-for-villagers-t.patch similarity index 100% rename from patches/server/0075-Implement-configurable-search-radius-for-villagers-t.patch rename to patches/server/0072-Implement-configurable-search-radius-for-villagers-t.patch diff --git a/patches/server/0076-Implement-infinite-lava.patch b/patches/server/0073-Implement-infinite-lava.patch similarity index 100% rename from patches/server/0076-Implement-infinite-lava.patch rename to patches/server/0073-Implement-infinite-lava.patch diff --git a/patches/server/0077-Make-lava-flow-speed-configurable.patch b/patches/server/0074-Make-lava-flow-speed-configurable.patch similarity index 100% rename from patches/server/0077-Make-lava-flow-speed-configurable.patch rename to patches/server/0074-Make-lava-flow-speed-configurable.patch diff --git a/patches/server/0078-Add-player-death-exp-control-options.patch b/patches/server/0075-Add-player-death-exp-control-options.patch similarity index 98% rename from patches/server/0078-Add-player-death-exp-control-options.patch rename to patches/server/0075-Add-player-death-exp-control-options.patch index 2b31e6745..b3046b833 100644 --- a/patches/server/0078-Add-player-death-exp-control-options.patch +++ b/patches/server/0075-Add-player-death-exp-control-options.patch @@ -40,7 +40,7 @@ index eb62555cb..48f9feaea 100644 return 0; } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 58b21bc81..2d2dfe572 100644 +index 7c27696eb..4c43444cb 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -121,6 +121,13 @@ public class PurpurWorldConfig { diff --git a/patches/server/0079-Add-option-to-disable-saving-projectiles-to-disk.patch b/patches/server/0076-Add-option-to-disable-saving-projectiles-to-disk.patch similarity index 87% rename from patches/server/0079-Add-option-to-disable-saving-projectiles-to-disk.patch rename to patches/server/0076-Add-option-to-disable-saving-projectiles-to-disk.patch index 6d25ede1e..8a483746c 100644 --- a/patches/server/0079-Add-option-to-disable-saving-projectiles-to-disk.patch +++ b/patches/server/0076-Add-option-to-disable-saving-projectiles-to-disk.patch @@ -17,7 +17,7 @@ index c2adc7f52..24a6102b3 100644 // Paper start if (asyncsavedata == null && !entity.dead && (int) Math.floor(entity.locX()) >> 4 != chunk.getPos().x || (int) Math.floor(entity.locZ()) >> 4 != chunk.getPos().z) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6d809cc78..15e5fc122 100644 +index 5bb1d8e51..49cf334fc 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -309,6 +309,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -34,10 +34,10 @@ index 6d809cc78..15e5fc122 100644 return false; } diff --git a/src/main/java/net/minecraft/server/EntityEnderSignal.java b/src/main/java/net/minecraft/server/EntityEnderSignal.java -index 6e5b46077..49d328aaa 100644 +index e3865a9b4..de55acd1c 100644 --- a/src/main/java/net/minecraft/server/EntityEnderSignal.java +++ b/src/main/java/net/minecraft/server/EntityEnderSignal.java -@@ -19,9 +19,16 @@ public class EntityEnderSignal extends Entity { +@@ -19,6 +19,13 @@ public class EntityEnderSignal extends Entity { this.setPosition(d0, d1, d2); } @@ -49,12 +49,8 @@ index 6e5b46077..49d328aaa 100644 + // Purpur end + public void b(ItemStack itemstack) { - if (itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) { -- this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> { -+ this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // Purpur - decompile error - itemstack1.setCount(1); - })); - } + if (true || itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) { // CraftBukkit - always allow item changing + this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java index 9f5ce64a6..0bac6b050 100644 --- a/src/main/java/net/minecraft/server/IProjectile.java @@ -74,7 +70,7 @@ index 9f5ce64a6..0bac6b050 100644 if (entity != null) { this.shooter = entity.getUniqueID(); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 2d2dfe572..6ac786206 100644 +index 4c43444cb..839fead62 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -113,11 +113,13 @@ public class PurpurWorldConfig { diff --git a/patches/server/0080-Configurable-void-damage-height.patch b/patches/server/0077-Configurable-void-damage-height.patch similarity index 97% rename from patches/server/0080-Configurable-void-damage-height.patch rename to patches/server/0077-Configurable-void-damage-height.patch index 45c662765..c53582f54 100644 --- a/patches/server/0080-Configurable-void-damage-height.patch +++ b/patches/server/0077-Configurable-void-damage-height.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable void damage height diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 15e5fc122..4f87d1312 100644 +index 49cf334fc..dfc54b6c1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -612,7 +612,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -18,7 +18,7 @@ index 15e5fc122..4f87d1312 100644 && this.locY() >= world.paperConfig.netherVoidTopDamageHeight)) { this.doVoidDamage(); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 6ac786206..a071129db 100644 +index 839fead62..4466f21ba 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -115,12 +115,14 @@ public class PurpurWorldConfig { diff --git a/patches/server/0082-Dispenser-curse-of-binding-protection.patch b/patches/server/0078-Dispenser-curse-of-binding-protection.patch similarity index 95% rename from patches/server/0082-Dispenser-curse-of-binding-protection.patch rename to patches/server/0078-Dispenser-curse-of-binding-protection.patch index 99176a115..c63339b3e 100644 --- a/patches/server/0082-Dispenser-curse-of-binding-protection.patch +++ b/patches/server/0078-Dispenser-curse-of-binding-protection.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Dispenser curse of binding protection diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index c87c95160..10735e8bd 100644 +index 3460b0f5a..fc1a1bc74 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -985,6 +985,13 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -986,6 +986,13 @@ public abstract class EntityInsentient extends EntityLiving { } @@ -44,7 +44,7 @@ index 669a50411..7cd2e871b 100644 return this.b; } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index fe8411755..b16446527 100644 +index 4466f21ba..a37b76ea9 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -162,6 +162,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0083-Add-option-for-boats-to-eject-players-on-land.patch b/patches/server/0079-Add-option-for-boats-to-eject-players-on-land.patch similarity index 98% rename from patches/server/0083-Add-option-for-boats-to-eject-players-on-land.patch rename to patches/server/0079-Add-option-for-boats-to-eject-players-on-land.patch index b8c4824c6..f0e86c165 100644 --- a/patches/server/0083-Add-option-for-boats-to-eject-players-on-land.patch +++ b/patches/server/0079-Add-option-for-boats-to-eject-players-on-land.patch @@ -17,7 +17,7 @@ index 7df2837d6..0f25d7cd6 100644 } else { return EntityBoat.EnumStatus.IN_AIR; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index f741218df..15e2d9dd0 100644 +index a37b76ea9..0c2913073 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -110,6 +110,7 @@ public class PurpurWorldConfig { diff --git a/patches/server/0084-Add-obfhelpers-for-plugin-use.patch b/patches/server/0080-Add-obfhelpers-for-plugin-use.patch similarity index 95% rename from patches/server/0084-Add-obfhelpers-for-plugin-use.patch rename to patches/server/0080-Add-obfhelpers-for-plugin-use.patch index 47cf63bfc..151f11c88 100644 --- a/patches/server/0084-Add-obfhelpers-for-plugin-use.patch +++ b/patches/server/0080-Add-obfhelpers-for-plugin-use.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add obfhelpers for plugin use diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 76cc28517..0d548dae6 100644 +index e7759f248..2c908a604 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -644,6 +644,7 @@ public final class ItemStack { diff --git a/patches/server/0081-Add-option-for-zombies-targetting-turtle-eggs.patch b/patches/server/0081-Add-option-for-zombies-targetting-turtle-eggs.patch deleted file mode 100644 index 97cb6987d..000000000 --- a/patches/server/0081-Add-option-for-zombies-targetting-turtle-eggs.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: William Blake Galbreath -Date: Sat, 17 Aug 2019 15:27:09 -0500 -Subject: [PATCH] Add option for zombies targetting turtle eggs - - -diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 039c5f438..cb7d61937 100644 ---- a/src/main/java/net/minecraft/server/EntityZombie.java -+++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -46,7 +46,7 @@ public class EntityZombie extends EntityMonster { - - @Override - protected void initPathfinder() { -- this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); -+ if (world.purpurConfig.zombieTargetTurtleEggs) this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); // Purpur - this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); - this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); - this.m(); -diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 4466f21ba..fe8411755 100644 ---- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -323,6 +323,11 @@ public class PurpurWorldConfig { - witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage); - } - -+ public boolean zombieTargetTurtleEggs = true; -+ private void zombieSettings() { -+ zombieTargetTurtleEggs = getBoolean("mobs.zombie.target-turtle-eggs", zombieTargetTurtleEggs); -+ } -+ - public double zombieHorseSpawnChance = 0.0D; - private void zombieHorseSettings() { - zombieHorseSpawnChance = getDouble("mobs.zombie_horse.spawn-chance", zombieHorseSpawnChance); diff --git a/patches/server/0085-Mending-mends-most-damages-equipment-first.patch b/patches/server/0081-Mending-mends-most-damages-equipment-first.patch similarity index 98% rename from patches/server/0085-Mending-mends-most-damages-equipment-first.patch rename to patches/server/0081-Mending-mends-most-damages-equipment-first.patch index 52d4dd6bf..00e602654 100644 --- a/patches/server/0085-Mending-mends-most-damages-equipment-first.patch +++ b/patches/server/0081-Mending-mends-most-damages-equipment-first.patch @@ -54,7 +54,7 @@ index e33a42dcd..e053f9c37 100644 if (entry != null) { ItemStack itemstack = (ItemStack) entry.getValue(); diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 0d548dae6..f5b970525 100644 +index 2c908a604..6a9b7e609 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -418,10 +418,19 @@ public final class ItemStack { @@ -78,7 +78,7 @@ index 0d548dae6..f5b970525 100644 return this.tag == null ? 0 : this.tag.getInt("Damage"); } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 15e2d9dd0..993ad17ec 100644 +index 0c2913073..32e87b6ff 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -110,6 +110,7 @@ public class PurpurWorldConfig { diff --git a/patches/server/0086-Implement-bamboo-growth-settings.patch b/patches/server/0082-Implement-bamboo-growth-settings.patch similarity index 99% rename from patches/server/0086-Implement-bamboo-growth-settings.patch rename to patches/server/0082-Implement-bamboo-growth-settings.patch index 2f41e1883..b4ec4ebe0 100644 --- a/patches/server/0086-Implement-bamboo-growth-settings.patch +++ b/patches/server/0082-Implement-bamboo-growth-settings.patch @@ -63,7 +63,7 @@ index f208ab509..ce56edb7c 100644 } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index d59e1475e..be2ebd73a 100644 +index 32e87b6ff..27438136d 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -166,6 +166,13 @@ public class PurpurWorldConfig { diff --git a/patches/server/0087-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0083-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 95% rename from patches/server/0087-Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/0083-Climbing-should-not-bypass-cramming-gamerule.patch index e311f6225..155905be4 100644 --- a/patches/server/0087-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/0083-Climbing-should-not-bypass-cramming-gamerule.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4f87d1312..79e6f4361 100644 +index dfc54b6c1..98b62223b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1692,6 +1692,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1693,6 +1693,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean isCollidable() { @@ -22,7 +22,7 @@ index 4f87d1312..79e6f4361 100644 } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index eb32abc5d..6a505b3b0 100644 +index afa23395c..4f950c6aa 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -320,7 +320,7 @@ public class EntityArmorStand extends EntityLiving { @@ -74,10 +74,10 @@ index da79c7e63..8cfbf8abf 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 51b2aa3e2..788175110 100644 +index 91fc7ba76..ba4e4ace5 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2854,7 +2854,7 @@ public abstract class EntityLiving extends Entity { +@@ -2865,7 +2865,7 @@ public abstract class EntityLiving extends Entity { // Paper - end don't run getEntities if we're not going to use its result // Tuinity start - reduce memory allocation from collideNearby List list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList(); @@ -86,7 +86,7 @@ index 51b2aa3e2..788175110 100644 try { // Tuinity end - reduce memory allocation from collideNearby -@@ -2999,7 +2999,14 @@ public abstract class EntityLiving extends Entity { +@@ -3010,7 +3010,14 @@ public abstract class EntityLiving extends Entity { @Override public boolean isCollidable() { @@ -131,10 +131,10 @@ index 34e08dda2..6bb73f869 100644 @Override diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 65c241d88..9b6e356bb 100644 +index a99429080..2b22029ea 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1771,8 +1771,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1772,8 +1772,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } @Override @@ -146,7 +146,7 @@ index 65c241d88..9b6e356bb 100644 // Purpur end diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java -index 939535cb2..70eb26304 100644 +index c8e384ab6..44fb1e1f7 100644 --- a/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java @@ -45,11 +45,17 @@ public final class IEntitySelector { @@ -169,7 +169,7 @@ index 939535cb2..70eb26304 100644 } else if (entity.world.isClientSide && (!(entity1 instanceof EntityHuman) || !((EntityHuman) entity1).ey())) { return false; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index a9b1a130b..860e25dfd 100644 +index 27438136d..76c8ecda5 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -114,6 +114,7 @@ public class PurpurWorldConfig { diff --git a/patches/server/0088-Add-5-second-tps-average-in-tps.patch b/patches/server/0084-Add-5-second-tps-average-in-tps.patch similarity index 99% rename from patches/server/0088-Add-5-second-tps-average-in-tps.patch rename to patches/server/0084-Add-5-second-tps-average-in-tps.patch index 32d2431ac..7456ca7e1 100644 --- a/patches/server/0088-Add-5-second-tps-average-in-tps.patch +++ b/patches/server/0084-Add-5-second-tps-average-in-tps.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add 5 second tps average in /tps diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 89f422524..781621126 100644 +index 70f497385..21d0f3d45 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -165,7 +165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant P() { return new PacketPlayOutSpawnEntity(this); } @@ -88,7 +88,7 @@ index c64bbde28..3c1cf5903 100644 int i; int j; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index d1b0d4030..9de724686 100644 +index 607157312..401489cab 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -99,6 +99,21 @@ public class PurpurWorldConfig { diff --git a/patches/server/0091-Add-ping-command.patch b/patches/server/0087-Add-ping-command.patch similarity index 100% rename from patches/server/0091-Add-ping-command.patch rename to patches/server/0087-Add-ping-command.patch diff --git a/patches/server/0092-Configurable-jockey-options.patch b/patches/server/0088-Configurable-jockey-options.patch similarity index 96% rename from patches/server/0092-Configurable-jockey-options.patch rename to patches/server/0088-Configurable-jockey-options.patch index f78066857..d7c9bc4ab 100644 --- a/patches/server/0092-Configurable-jockey-options.patch +++ b/patches/server/0088-Configurable-jockey-options.patch @@ -61,7 +61,7 @@ index 96a8abb18..194b76059 100644 public void setAngerTarget(@Nullable UUID uuid) { this.br = uuid; diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index cb7d61937..1ea68f617 100644 +index a11612fa0..3e5c69287 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -3,6 +3,7 @@ package net.minecraft.server; @@ -92,7 +92,7 @@ index cb7d61937..1ea68f617 100644 + @Override protected void initPathfinder() { - if (world.purpurConfig.zombieTargetTurtleEggs) this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); // Purpur + if (world.paperConfig.zombiesTargetTurtleEggs) this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); // Paper @@ -439,19 +454,19 @@ public class EntityZombie extends EntityMonster { if (object instanceof EntityZombie.GroupDataZombie) { EntityZombie.GroupDataZombie entityzombie_groupdatazombie = (EntityZombie.GroupDataZombie) object; @@ -193,7 +193,7 @@ index b52b8d0d8..69e98dceb 100644 protected void initDatawatcher() { super.initDatawatcher(); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 2b945553e..c7bdbcecf 100644 +index 401489cab..2c0aeeb24 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -265,6 +265,15 @@ public class PurpurWorldConfig { @@ -228,20 +228,19 @@ index 2b945553e..c7bdbcecf 100644 public double illusionerMaxHealth = 32.0D; public double illusionerMovementSpeed = 0.5D; public double illusionerFollowRange = 18.0D; -@@ -370,12 +388,36 @@ public class PurpurWorldConfig { +@@ -369,8 +387,35 @@ public class PurpurWorldConfig { + witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage); } - public boolean zombieTargetTurtleEggs = true; + public boolean zombieJockeyOnlyBaby = true; + public double zombieJockeyChance = 0.05D; + public boolean zombieJockeyTryExistingChickens = true; - private void zombieSettings() { - zombieTargetTurtleEggs = getBoolean("mobs.zombie.target-turtle-eggs", zombieTargetTurtleEggs); ++ private void zombieSettings() { + zombieJockeyOnlyBaby = getBoolean("mobs.zombie.jockey.only-babies", zombieJockeyOnlyBaby); + zombieJockeyChance = getDouble("mobs.zombie.jockey.chance", zombieJockeyChance); + zombieJockeyTryExistingChickens = getBoolean("mobs.zombie.jockey.try-existing-chickens", zombieJockeyTryExistingChickens); - } - ++ } ++ public double zombieHorseSpawnChance = 0.0D; private void zombieHorseSettings() { zombieHorseSpawnChance = getDouble("mobs.zombie_horse.spawn-chance", zombieHorseSpawnChance); diff --git a/patches/server/0093-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch b/patches/server/0089-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch similarity index 98% rename from patches/server/0093-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch rename to patches/server/0089-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch index ba9802e6f..e8c559068 100644 --- a/patches/server/0093-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch +++ b/patches/server/0089-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch @@ -17,10 +17,10 @@ index 6fe5678cf..bd0267ee4 100644 return (new EntityDamageSourceIndirect("indirectMagic", entity, entity1)).setIgnoreArmor().setMagic(); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6c64f86b7..92270427d 100644 +index 5e010d115..a15bcfc0b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1568,6 +1568,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1569,6 +1569,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return d3 * d3 + d4 * d4 + d5 * d5; } @@ -28,7 +28,7 @@ index 6c64f86b7..92270427d 100644 public double h(Entity entity) { return this.e(entity.getPositionVector()); } -@@ -2095,8 +2096,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2100,8 +2101,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.a(new ItemStack(imaterial), (float) i); } @@ -329,7 +329,7 @@ index 550f80bfd..b3616185d 100644 return entityliving != null ? EntityPhantom.this.a(EntityPhantom.this.getGoalTarget(), PathfinderTargetCondition.a) : false; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index c7bdbcecf..8ac088781 100644 +index 2c0aeeb24..1fe816eb0 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -331,6 +331,15 @@ public class PurpurWorldConfig { diff --git a/patches/server/0094-Customizable-EnderDragon-Health.patch b/patches/server/0090-Customizable-EnderDragon-Health.patch similarity index 98% rename from patches/server/0094-Customizable-EnderDragon-Health.patch rename to patches/server/0090-Customizable-EnderDragon-Health.patch index dc56922ea..0f94177ec 100644 --- a/patches/server/0094-Customizable-EnderDragon-Health.patch +++ b/patches/server/0090-Customizable-EnderDragon-Health.patch @@ -26,7 +26,7 @@ index 0e74794d3..d617b5345 100644 return EntityInsentient.p().a(GenericAttributes.MAX_HEALTH, 200.0D); } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 8ac088781..c9e18e50c 100644 +index 1fe816eb0..c7ce9651b 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -276,9 +276,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0095-Add-phantom-spawning-options.patch b/patches/server/0091-Add-phantom-spawning-options.patch similarity index 99% rename from patches/server/0095-Add-phantom-spawning-options.patch rename to patches/server/0091-Add-phantom-spawning-options.patch index 527bc7519..7a73247ab 100644 --- a/patches/server/0095-Add-phantom-spawning-options.patch +++ b/patches/server/0091-Add-phantom-spawning-options.patch @@ -233,10 +233,10 @@ index beaea041d..ce8834980 100644 return iblockdata.r(iblockaccess, blockposition) ? false : (iblockdata.isPowerSource() ? false : (!fluid.isEmpty() ? false : (iblockdata.a((Tag) TagsBlock.PREVENT_MOB_SPAWNING_INSIDE) ? false : !entitytypes.a(iblockdata)))); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e9e55c6f1..db372797a 100644 +index 5bc1a03f2..5fefef867 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1430,6 +1430,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1432,6 +1432,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return new DifficultyDamageScaler(this.getDifficulty(), this.getDayTime(), i, f); } @@ -245,7 +245,7 @@ index e9e55c6f1..db372797a 100644 public int c() { return this.d; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index c9e18e50c..14b5e7207 100644 +index c7ce9651b..89782b7d1 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -336,10 +336,34 @@ public class PurpurWorldConfig { diff --git a/patches/server/0096-Implement-bed-explosion-options.patch b/patches/server/0092-Implement-bed-explosion-options.patch similarity index 98% rename from patches/server/0096-Implement-bed-explosion-options.patch rename to patches/server/0092-Implement-bed-explosion-options.patch index b40e5966f..256680816 100644 --- a/patches/server/0096-Implement-bed-explosion-options.patch +++ b/patches/server/0092-Implement-bed-explosion-options.patch @@ -18,7 +18,7 @@ index d28c1a67e..c37225202 100644 } } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 14b5e7207..ad5904395 100644 +index 89782b7d1..a85803fed 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -2,6 +2,7 @@ package net.pl3x.purpur; diff --git a/patches/server/0097-Implement-respawn-anchor-explosion-options.patch b/patches/server/0093-Implement-respawn-anchor-explosion-options.patch similarity index 99% rename from patches/server/0097-Implement-respawn-anchor-explosion-options.patch rename to patches/server/0093-Implement-respawn-anchor-explosion-options.patch index 0147492ad..cc5e5525f 100644 --- a/patches/server/0097-Implement-respawn-anchor-explosion-options.patch +++ b/patches/server/0093-Implement-respawn-anchor-explosion-options.patch @@ -30,7 +30,7 @@ index 21c5ad83a..521d161a3 100644 public static boolean a(World world) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index ad5904395..21d671cd9 100644 +index a85803fed..4f1998d7e 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -240,6 +240,22 @@ public class PurpurWorldConfig { diff --git a/patches/server/0098-Add-allow-water-in-end-world-option.patch b/patches/server/0094-Add-allow-water-in-end-world-option.patch similarity index 98% rename from patches/server/0098-Add-allow-water-in-end-world-option.patch rename to patches/server/0094-Add-allow-water-in-end-world-option.patch index b4582579a..871c44ab1 100644 --- a/patches/server/0098-Add-allow-water-in-end-world-option.patch +++ b/patches/server/0094-Add-allow-water-in-end-world-option.patch @@ -49,10 +49,10 @@ index 120bf8436..848a185c0 100644 return true; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index db372797a..6cc37f5b9 100644 +index 5fefef867..640bcc566 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1505,4 +1505,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1507,4 +1507,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final boolean isDebugWorld() { return this.debugWorld; } diff --git a/patches/server/0099-MC-171420-Fix-deop-kicking-non-whitelisted-player-wh.patch b/patches/server/0095-MC-171420-Fix-deop-kicking-non-whitelisted-player-wh.patch similarity index 91% rename from patches/server/0099-MC-171420-Fix-deop-kicking-non-whitelisted-player-wh.patch rename to patches/server/0095-MC-171420-Fix-deop-kicking-non-whitelisted-player-wh.patch index 1e94ecdb1..86c11eb6c 100644 --- a/patches/server/0099-MC-171420-Fix-deop-kicking-non-whitelisted-player-wh.patch +++ b/patches/server/0095-MC-171420-Fix-deop-kicking-non-whitelisted-player-wh.patch @@ -6,10 +6,10 @@ Subject: [PATCH] MC-171420 - Fix deop kicking non-whitelisted player when diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 781621126..8a76ed6ae 100644 +index 21d0f3d45..4b67c3d2f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1961,6 +1961,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0.0D) { @@ -23,7 +23,7 @@ index 2c90e7835..61a74e296 100644 } } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 4a333b9bc..a91e8f8e5 100644 +index 6279d6bb1..a04e2f9d3 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -180,6 +180,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0103-Squid-EAR-immunity.patch b/patches/server/0099-Squid-EAR-immunity.patch similarity index 97% rename from patches/server/0103-Squid-EAR-immunity.patch rename to patches/server/0099-Squid-EAR-immunity.patch index d6bd75b2c..db6a81c4c 100644 --- a/patches/server/0103-Squid-EAR-immunity.patch +++ b/patches/server/0099-Squid-EAR-immunity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Squid EAR immunity diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index a91e8f8e5..737df8d11 100644 +index a04e2f9d3..a5c4b80ec 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -437,6 +437,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0104-Configurable-end-spike-seed.patch b/patches/server/0100-Configurable-end-spike-seed.patch similarity index 100% rename from patches/server/0104-Configurable-end-spike-seed.patch rename to patches/server/0100-Configurable-end-spike-seed.patch diff --git a/patches/server/0105-Configurable-dungeon-seed.patch b/patches/server/0101-Configurable-dungeon-seed.patch similarity index 100% rename from patches/server/0105-Configurable-dungeon-seed.patch rename to patches/server/0101-Configurable-dungeon-seed.patch diff --git a/patches/server/0106-Phantoms-burn-in-light.patch b/patches/server/0102-Phantoms-burn-in-light.patch similarity index 99% rename from patches/server/0106-Phantoms-burn-in-light.patch rename to patches/server/0102-Phantoms-burn-in-light.patch index 0fd86f762..76fe752b7 100644 --- a/patches/server/0106-Phantoms-burn-in-light.patch +++ b/patches/server/0102-Phantoms-burn-in-light.patch @@ -70,7 +70,7 @@ index 4c379916d..ea6b61c9b 100644 public static final Item dr = a(Blocks.JACK_O_LANTERN, CreativeModeTab.b); public static final Item ds = a(Blocks.OAK_TRAPDOOR, CreativeModeTab.d); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 737df8d11..9369a8bad 100644 +index a5c4b80ec..2f5a67097 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -392,6 +392,9 @@ public class PurpurWorldConfig { diff --git a/patches/server/0107-Configurable-villager-breeding.patch b/patches/server/0103-Configurable-villager-breeding.patch similarity index 98% rename from patches/server/0107-Configurable-villager-breeding.patch rename to patches/server/0103-Configurable-villager-breeding.patch index cd5fc6bfe..ddafb05bc 100644 --- a/patches/server/0107-Configurable-villager-breeding.patch +++ b/patches/server/0103-Configurable-villager-breeding.patch @@ -18,7 +18,7 @@ index 71644c3d9..0467020bb 100644 private boolean fr() { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 9369a8bad..1fff97ae8 100644 +index 2f5a67097..907fec463 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -455,6 +455,7 @@ public class PurpurWorldConfig { diff --git a/patches/server/0108-Redstone-deactivates-spawners.patch b/patches/server/0104-Redstone-deactivates-spawners.patch similarity index 98% rename from patches/server/0108-Redstone-deactivates-spawners.patch rename to patches/server/0104-Redstone-deactivates-spawners.patch index 248c65c3a..e6527121c 100644 --- a/patches/server/0108-Redstone-deactivates-spawners.patch +++ b/patches/server/0104-Redstone-deactivates-spawners.patch @@ -26,7 +26,7 @@ index c2e830db7..3b4cc9871 100644 public abstract BlockPosition b(); } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 1fff97ae8..db623250f 100644 +index 907fec463..14ac36673 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -274,6 +274,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0109-Totems-work-in-inventory.patch b/patches/server/0105-Totems-work-in-inventory.patch similarity index 94% rename from patches/server/0109-Totems-work-in-inventory.patch rename to patches/server/0105-Totems-work-in-inventory.patch index 1713777b6..7a08a3180 100644 --- a/patches/server/0109-Totems-work-in-inventory.patch +++ b/patches/server/0105-Totems-work-in-inventory.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Totems work in inventory diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 61a74e296..a90d3fa3e 100644 +index 2e4859709..ad17c3d27 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1324,6 +1324,19 @@ public abstract class EntityLiving extends Entity { +@@ -1325,6 +1325,19 @@ public abstract class EntityLiving extends Entity { } } @@ -29,7 +29,7 @@ index 61a74e296..a90d3fa3e 100644 event.setCancelled(itemstack == null); this.world.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index db623250f..a9f8464b7 100644 +index 14ac36673..8935a32d5 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -185,6 +185,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0110-Fix-death-message-colors.patch b/patches/server/0106-Fix-death-message-colors.patch similarity index 98% rename from patches/server/0110-Fix-death-message-colors.patch rename to patches/server/0106-Fix-death-message-colors.patch index 2f65e23e7..40f5bfa9f 100644 --- a/patches/server/0110-Fix-death-message-colors.patch +++ b/patches/server/0106-Fix-death-message-colors.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix death message colors diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 9b6e356bb..85e77a61f 100644 +index 2b22029ea..f8d959258 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -667,7 +667,24 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/patches/server/0111-Duplicate-paper-s-vanilla-scoreboard-colors-patch-to.patch b/patches/server/0107-Duplicate-paper-s-vanilla-scoreboard-colors-patch-to.patch similarity index 95% rename from patches/server/0111-Duplicate-paper-s-vanilla-scoreboard-colors-patch-to.patch rename to patches/server/0107-Duplicate-paper-s-vanilla-scoreboard-colors-patch-to.patch index 5ff1a0c94..e7a85d8d2 100644 --- a/patches/server/0111-Duplicate-paper-s-vanilla-scoreboard-colors-patch-to.patch +++ b/patches/server/0107-Duplicate-paper-s-vanilla-scoreboard-colors-patch-to.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Duplicate paper's vanilla scoreboard colors patch to sync diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 87cd7debf..7e75cf1d2 100644 +index ff4a45777..a8ec01687 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1890,7 +1890,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1891,7 +1891,15 @@ public class PlayerConnection implements PacketListenerPlayIn { return null; } @@ -26,7 +26,7 @@ index 87cd7debf..7e75cf1d2 100644 PlayerConnection.this.minecraftServer.console.sendMessage(message); if (((LazyPlayerSet) queueEvent.getRecipients()).isLazy()) { for (Object player : PlayerConnection.this.minecraftServer.getPlayerList().players) { -@@ -1923,7 +1931,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1924,7 +1932,7 @@ public class PlayerConnection implements PacketListenerPlayIn { // Paper Start - (Meh) Support for vanilla world scoreboard name coloring String displayName = event.getPlayer().getDisplayName(); if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) { diff --git a/patches/server/0112-Populator-seed-controls.patch b/patches/server/0108-Populator-seed-controls.patch similarity index 100% rename from patches/server/0112-Populator-seed-controls.patch rename to patches/server/0108-Populator-seed-controls.patch diff --git a/patches/server/0113-Add-vindicator-johnny-spawn-chance.patch b/patches/server/0109-Add-vindicator-johnny-spawn-chance.patch similarity index 98% rename from patches/server/0113-Add-vindicator-johnny-spawn-chance.patch rename to patches/server/0109-Add-vindicator-johnny-spawn-chance.patch index 591e5a2d2..25895233d 100644 --- a/patches/server/0113-Add-vindicator-johnny-spawn-chance.patch +++ b/patches/server/0109-Add-vindicator-johnny-spawn-chance.patch @@ -22,7 +22,7 @@ index fd34d88c0..a945a0a07 100644 } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index b2874758a..54a0b8694 100644 +index 8935a32d5..3e28dc772 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -40,6 +40,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0114-DragonEggPlaceEvent.patch b/patches/server/0110-DragonEggPlaceEvent.patch similarity index 100% rename from patches/server/0114-DragonEggPlaceEvent.patch rename to patches/server/0110-DragonEggPlaceEvent.patch diff --git a/patches/server/0115-Add-option-to-disable-mushroom-block-updates.patch b/patches/server/0111-Add-option-to-disable-mushroom-block-updates.patch similarity index 100% rename from patches/server/0115-Add-option-to-disable-mushroom-block-updates.patch rename to patches/server/0111-Add-option-to-disable-mushroom-block-updates.patch diff --git a/patches/server/0117-Dispensers-place-anvils-option.patch b/patches/server/0112-Dispensers-place-anvils-option.patch similarity index 99% rename from patches/server/0117-Dispensers-place-anvils-option.patch rename to patches/server/0112-Dispensers-place-anvils-option.patch index 6ec0ce115..0d34ded6b 100644 --- a/patches/server/0117-Dispensers-place-anvils-option.patch +++ b/patches/server/0112-Dispensers-place-anvils-option.patch @@ -61,7 +61,7 @@ index 7b8a470d9..d1f9d2884 100644 static void a(ISourceBlock isourceblock, Entity entity, EnumDirection enumdirection) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 826d6b84e..13b50adc3 100644 +index 3e28dc772..6cbf0baa6 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -242,8 +242,10 @@ public class PurpurWorldConfig { diff --git a/patches/server/0118-Allow-anvil-colors.patch b/patches/server/0113-Allow-anvil-colors.patch similarity index 98% rename from patches/server/0118-Allow-anvil-colors.patch rename to patches/server/0113-Allow-anvil-colors.patch index 340b3a10b..519b08c7c 100644 --- a/patches/server/0118-Allow-anvil-colors.patch +++ b/patches/server/0113-Allow-anvil-colors.patch @@ -35,7 +35,7 @@ index 4aa6b035a..5e4e59e5c 100644 } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 13b50adc3..df2fa3b71 100644 +index 6cbf0baa6..6d1bb8f3e 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -218,6 +218,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0119-Add-no-tick-block-list.patch b/patches/server/0114-Add-no-tick-block-list.patch similarity index 97% rename from patches/server/0119-Add-no-tick-block-list.patch rename to patches/server/0114-Add-no-tick-block-list.patch index 117200f94..4286d7ac5 100644 --- a/patches/server/0119-Add-no-tick-block-list.patch +++ b/patches/server/0114-Add-no-tick-block-list.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add no-tick block list diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java -index 82e07b357..05a7422fb 100644 +index 2db488aba..68fd93ddd 100644 --- a/src/main/java/net/minecraft/server/BlockBase.java +++ b/src/main/java/net/minecraft/server/BlockBase.java -@@ -566,10 +566,12 @@ public abstract class BlockBase { +@@ -572,10 +572,12 @@ public abstract class BlockBase { } public void a(WorldServer worldserver, BlockPosition blockposition, Random random) { @@ -43,7 +43,7 @@ index 53ab03a29..e4f2b8494 100644 this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> { return fluidtype == null || fluidtype == FluidTypes.EMPTY; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index b19295cce..8f9f1a263 100644 +index 6d1bb8f3e..fd100a9cc 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -11,8 +11,10 @@ import org.bukkit.configuration.ConfigurationSection; diff --git a/patches/server/0120-Add-option-to-disable-dolphin-treasure-searching.patch b/patches/server/0115-Add-option-to-disable-dolphin-treasure-searching.patch similarity index 98% rename from patches/server/0120-Add-option-to-disable-dolphin-treasure-searching.patch rename to patches/server/0115-Add-option-to-disable-dolphin-treasure-searching.patch index cc917177e..1c4772b24 100644 --- a/patches/server/0120-Add-option-to-disable-dolphin-treasure-searching.patch +++ b/patches/server/0115-Add-option-to-disable-dolphin-treasure-searching.patch @@ -17,7 +17,7 @@ index b5191eb0b..cde5c46fe 100644 } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 3c44d7e13..d834f6be8 100644 +index fd100a9cc..9d8f8bf69 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -343,6 +343,11 @@ public class PurpurWorldConfig { diff --git a/patches/server/0121-Add-option-to-reset-reputation-when-villager-is-cure.patch b/patches/server/0116-Add-option-to-reset-reputation-when-villager-is-cure.patch similarity index 96% rename from patches/server/0121-Add-option-to-reset-reputation-when-villager-is-cure.patch rename to patches/server/0116-Add-option-to-reset-reputation-when-villager-is-cure.patch index 47c9bbf37..e6b1b95d6 100644 --- a/patches/server/0121-Add-option-to-reset-reputation-when-villager-is-cure.patch +++ b/patches/server/0116-Add-option-to-reset-reputation-when-villager-is-cure.patch @@ -26,10 +26,10 @@ index 0467020bb..7add2fca1 100644 this.by.a(entity.getUniqueID(), ReputationType.MINOR_POSITIVE, 25); } else if (reputationevent == ReputationEvent.e) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index d834f6be8..f705e6704 100644 +index 9d8f8bf69..58135b6b2 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -546,9 +546,11 @@ public class PurpurWorldConfig { +@@ -544,9 +544,11 @@ public class PurpurWorldConfig { public boolean zombieVillagerJockeyOnlyBaby = true; public double zombieVillagerJockeyChance = 0.05D; public boolean zombieVillagerJockeyTryExistingChickens = true; diff --git a/patches/server/0116-PaperMC-Buffer-joins.patch b/patches/server/0116-PaperMC-Buffer-joins.patch deleted file mode 100644 index d40273eaa..000000000 --- a/patches/server/0116-PaperMC-Buffer-joins.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Sun, 2 Aug 2020 18:27:13 +0100 -Subject: [PATCH] PaperMC - Buffer joins - - -diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 66f239040..fe9a770cb 100644 ---- a/src/main/java/net/minecraft/server/NetworkManager.java -+++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -412,10 +412,23 @@ public class NetworkManager extends SimpleChannelInboundHandler> { - } - // Paper end - -+ private static final int MAX_PER_TICK = 3; // max joins per tick -+ private static int lastHit = 0; // unused for now -+ public static int thisTick; // current tick counter -+ private static int loginsThisTick = 0; -+ private static int currTick; - public void a() { -+ if (currTick != thisTick) { -+ currTick = thisTick; -+ loginsThisTick = 0; -+ } - this.p(); - if (this.packetListener instanceof LoginListener) { -- ((LoginListener) this.packetListener).tick(); -+ if ( ((LoginListener) this.packetListener).getLoginState() != LoginListener.EnumProtocolState.READY_TO_ACCEPT -+ || (thisTick > lastHit + 10 || loginsThisTick++ < MAX_PER_TICK) -+ ) { -+ ((LoginListener) this.packetListener).tick(); -+ } - } - - if (this.packetListener instanceof PlayerConnection) { -diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java -index 5f4dacf9c..9b2f93a4b 100644 ---- a/src/main/java/net/minecraft/server/ServerConnection.java -+++ b/src/main/java/net/minecraft/server/ServerConnection.java -@@ -124,7 +124,7 @@ public class ServerConnection { - - public void c() { - List list = this.connectedChannels; -- -+ NetworkManager.thisTick++; //Paper - synchronized (this.connectedChannels) { - // Spigot Start - this.addPending(); // Paper diff --git a/patches/server/0123-Short-enderman-height.patch b/patches/server/0117-Short-enderman-height.patch similarity index 99% rename from patches/server/0123-Short-enderman-height.patch rename to patches/server/0117-Short-enderman-height.patch index f856fa882..a65ff4024 100644 --- a/patches/server/0123-Short-enderman-height.patch +++ b/patches/server/0117-Short-enderman-height.patch @@ -17,7 +17,7 @@ index b45a75a45..fde60d6c8 100644 if (this.tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start for (int i = 0; i < 64; ++i) { diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java -index 8300e7d1e..312b96764 100644 +index c03b0b58b..e52b23fa7 100644 --- a/src/main/java/net/minecraft/server/EntityTypes.java +++ b/src/main/java/net/minecraft/server/EntityTypes.java @@ -34,7 +34,7 @@ public class EntityTypes { diff --git a/patches/server/0124-Stop-squids-floating-on-top-of-water.patch b/patches/server/0118-Stop-squids-floating-on-top-of-water.patch similarity index 95% rename from patches/server/0124-Stop-squids-floating-on-top-of-water.patch rename to patches/server/0118-Stop-squids-floating-on-top-of-water.patch index 9a5ac8bda..8052447d2 100644 --- a/patches/server/0124-Stop-squids-floating-on-top-of-water.patch +++ b/patches/server/0118-Stop-squids-floating-on-top-of-water.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Stop squids floating on top of water diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 92270427d..7a6283897 100644 +index a15bcfc0b..a5e639361 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -3394,8 +3394,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3399,8 +3399,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.lastYaw = this.yaw; } @@ -43,7 +43,7 @@ index 03d707ed0..028a7fe2c 100644 protected void initPathfinder() { this.goalSelector.a(0, new EntitySquid.PathfinderGoalSquid(this)); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index f705e6704..ed89642e8 100644 +index 58135b6b2..b070eed98 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -483,8 +483,10 @@ public class PurpurWorldConfig { diff --git a/patches/server/0125-Ridables.patch b/patches/server/0119-Ridables.patch similarity index 99% rename from patches/server/0125-Ridables.patch rename to patches/server/0119-Ridables.patch index 1b3906211..55cfe0d70 100644 --- a/patches/server/0125-Ridables.patch +++ b/patches/server/0119-Ridables.patch @@ -161,7 +161,7 @@ index bd0267ee4..8b36ac2b0 100644 this.B = true; return this; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7a6283897..497bee376 100644 +index a5e639361..75e8b3367 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -81,7 +81,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -208,7 +208,7 @@ index 7a6283897..497bee376 100644 public void a(float f, Vec3D vec3d) { Vec3D vec3d1 = a(vec3d, f, this.yaw); -@@ -2195,6 +2196,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2200,6 +2201,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.a(entity, false); } @@ -216,7 +216,7 @@ index 7a6283897..497bee376 100644 public boolean a(Entity entity, boolean flag) { for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) { if (entity1.vehicle == this) { -@@ -2290,6 +2292,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2295,6 +2297,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.passengers.add(entity); } @@ -230,7 +230,7 @@ index 7a6283897..497bee376 100644 } return true; // CraftBukkit } -@@ -2330,6 +2339,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2335,6 +2344,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return false; } // Spigot end @@ -243,7 +243,7 @@ index 7a6283897..497bee376 100644 this.passengers.remove(entity); entity.j = 60; } -@@ -2495,6 +2510,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2500,6 +2515,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.setFlag(4, flag); } @@ -251,7 +251,7 @@ index 7a6283897..497bee376 100644 public boolean bD() { return this.glowing || this.world.isClientSide && this.getFlag(6); } -@@ -2713,6 +2729,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2718,6 +2734,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public void setHeadRotation(float f) {} @@ -259,7 +259,7 @@ index 7a6283897..497bee376 100644 public void n(float f) {} public boolean bK() { -@@ -3147,6 +3164,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3152,6 +3169,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return false; } @@ -278,7 +278,7 @@ index 7a6283897..497bee376 100644 @Override public void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid) {} -@@ -3589,4 +3618,47 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3594,4 +3623,47 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke void accept(Entity entity, double d0, double d1, double d2); } @@ -1436,7 +1436,7 @@ index c4b1f318f..30f602bbc 100644 } diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java -index 4bea4ca7e..533b2bd4f 100644 +index 9f3922b18..6864b9956 100644 --- a/src/main/java/net/minecraft/server/EntityEvoker.java +++ b/src/main/java/net/minecraft/server/EntityEvoker.java @@ -12,10 +12,23 @@ public class EntityEvoker extends EntityIllagerWizard { @@ -1468,10 +1468,10 @@ index 4bea4ca7e..533b2bd4f 100644 this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F)); this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F)); + this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // Purpur - decompile error + this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // Paper - decompile fix this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300)); this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300)); -@@ -105,6 +119,7 @@ public class EntityEvoker extends EntityIllagerWizard { +@@ -104,6 +118,7 @@ public class EntityEvoker extends EntityIllagerWizard { public d() { super(); @@ -1479,7 +1479,7 @@ index 4bea4ca7e..533b2bd4f 100644 } @Override -@@ -183,6 +198,7 @@ public class EntityEvoker extends EntityIllagerWizard { +@@ -182,6 +197,7 @@ public class EntityEvoker extends EntityIllagerWizard { private c() { super(); this.e = (new PathfinderTargetCondition()).a(16.0D).c().e().a().b(); @@ -1487,7 +1487,7 @@ index 4bea4ca7e..533b2bd4f 100644 } @Override -@@ -239,6 +255,7 @@ public class EntityEvoker extends EntityIllagerWizard { +@@ -238,6 +254,7 @@ public class EntityEvoker extends EntityIllagerWizard { private a() { super(); @@ -2162,7 +2162,7 @@ index 48f9feaea..6c2b57a29 100644 + // Purpur end } diff --git a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java -index 7b2c459ad..b9c4ead23 100644 +index 66bfebe1c..f23721c26 100644 --- a/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java +++ b/src/main/java/net/minecraft/server/EntityIllagerIllusioner.java @@ -20,6 +20,16 @@ public class EntityIllagerIllusioner extends EntityIllagerWizard implements IRan @@ -2199,7 +2199,7 @@ index 7b2c459ad..b9c4ead23 100644 this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300)); this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300)); diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 7f5095f7e..bb4994c44 100644 +index 0ecc5bd28..6b0f7f399 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -29,7 +29,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -2255,7 +2255,7 @@ index 7f5095f7e..bb4994c44 100644 public void v(float f) { this.aR = f; } -@@ -1241,7 +1244,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1242,7 +1245,7 @@ public abstract class EntityInsentient extends EntityLiving { protected void a(EntityHuman entityhuman, EntityInsentient entityinsentient) {} protected EnumInteractionResult b(EntityHuman entityhuman, EnumHand enumhand) { @@ -2264,7 +2264,7 @@ index 7f5095f7e..bb4994c44 100644 } public boolean ev() { -@@ -1613,4 +1616,45 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1614,4 +1617,45 @@ public abstract class EntityInsentient extends EntityLiving { this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit this.unleash(true, false); } @@ -2362,10 +2362,10 @@ index bdff23688..954000a7b 100644 float f1 = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index a90d3fa3e..a92c52b5f 100644 +index ad17c3d27..4fb2bd443 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -465,7 +465,7 @@ public abstract class EntityLiving extends Entity { +@@ -466,7 +466,7 @@ public abstract class EntityLiving extends Entity { @Override public boolean bs() { @@ -2374,7 +2374,7 @@ index a90d3fa3e..a92c52b5f 100644 } protected void cT() { -@@ -2174,7 +2174,7 @@ public abstract class EntityLiving extends Entity { +@@ -2185,7 +2185,7 @@ public abstract class EntityLiving extends Entity { return 0.42F * this.getBlockJumpFactor(); } @@ -2383,7 +2383,7 @@ index a90d3fa3e..a92c52b5f 100644 float f = this.dI(); if (this.hasEffect(MobEffects.JUMP)) { -@@ -2423,10 +2423,12 @@ public abstract class EntityLiving extends Entity { +@@ -2434,10 +2434,12 @@ public abstract class EntityLiving extends Entity { return this.onGround ? this.dM() * (0.21600002F / (f * f * f)) : this.aE; } @@ -3657,7 +3657,7 @@ index 7c39bec83..3f130e03b 100644 protected SoundEffect getSoundAmbient() { return SoundEffects.ENTITY_SKELETON_AMBIENT; diff --git a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java -index 1f7b50b55..72f59b0ec 100644 +index 513bb3087..e21dbf46d 100644 --- a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java +++ b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java @@ -28,12 +28,14 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR @@ -4747,7 +4747,7 @@ index 55df54733..ce4072f6e 100644 this.eL(); } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 1ea68f617..89135d903 100644 +index 3e5c69287..d08747c66 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -46,6 +46,16 @@ public class EntityZombie extends EntityMonster { @@ -4772,7 +4772,7 @@ index 1ea68f617..89135d903 100644 @Override protected void initPathfinder() { + this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur - if (world.purpurConfig.zombieTargetTurtleEggs) this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); // Purpur + if (world.paperConfig.zombiesTargetTurtleEggs) this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); // Paper this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); + this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur @@ -4864,10 +4864,10 @@ index 0bac6b050..9a17eb606 100644 Entity entity1 = this.getShooter(); // Paper start - Cancel hit for vanished players diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7e75cf1d2..0aaa6433f 100644 +index a8ec01687..f07e2d285 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2148,6 +2148,8 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2149,6 +2149,8 @@ public class PlayerConnection implements PacketListenerPlayIn { } this.server.getPluginManager().callEvent(event); @@ -4917,7 +4917,7 @@ index 84858ba39..9b8114d76 100644 return new Vec3D(this.x * d0, this.y * d1, this.z * d2); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a4bb58136..8ce1173eb 100644 +index 640bcc566..77c72ec9f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1516,5 +1516,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -4950,7 +4950,7 @@ index 8714d1574..af3739c79 100644 public static int dungeonSeed = -1; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index ed89642e8..789fcc596 100644 +index b070eed98..a58f07b4b 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -42,11 +42,6 @@ public class PurpurWorldConfig { @@ -5482,7 +5482,7 @@ index ed89642e8..789fcc596 100644 villagerBrainTicks = getInt("mobs.villager.brain-ticks", villagerBrainTicks); villagerUseBrainTicksOnlyWhenLagging = getBoolean("mobs.villager.use-brain-ticks-only-when-lagging", villagerUseBrainTicksOnlyWhenLagging); villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed); -@@ -508,48 +862,111 @@ public class PurpurWorldConfig { +@@ -508,46 +862,109 @@ public class PurpurWorldConfig { villagerCanBreed = getBoolean("mobs.villager.can-breed", villagerCanBreed); } @@ -5547,14 +5547,12 @@ index ed89642e8..789fcc596 100644 + + public boolean zombieRidable = false; + public boolean zombieRidableInWater = false; - public boolean zombieTargetTurtleEggs = true; public boolean zombieJockeyOnlyBaby = true; public double zombieJockeyChance = 0.05D; public boolean zombieJockeyTryExistingChickens = true; private void zombieSettings() { + zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable); + zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater); - zombieTargetTurtleEggs = getBoolean("mobs.zombie.target-turtle-eggs", zombieTargetTurtleEggs); zombieJockeyOnlyBaby = getBoolean("mobs.zombie.jockey.only-babies", zombieJockeyOnlyBaby); zombieJockeyChance = getDouble("mobs.zombie.jockey.chance", zombieJockeyChance); zombieJockeyTryExistingChickens = getBoolean("mobs.zombie.jockey.try-existing-chickens", zombieJockeyTryExistingChickens); @@ -6263,7 +6261,7 @@ index 000000000..c0ead608e + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index f1710a53f..ecba7b02f 100644 +index 407c03408..d9a979fa6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1133,4 +1133,26 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -6294,10 +6292,10 @@ index f1710a53f..ecba7b02f 100644 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 68e3d2978..ca4dacdae 100644 +index 8d5b08cbe..cfee9ee75 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -501,6 +501,18 @@ public class CraftEventFactory { +@@ -502,6 +502,18 @@ public class CraftEventFactory { } craftServer.getPluginManager().callEvent(event); @@ -6316,7 +6314,7 @@ index 68e3d2978..ca4dacdae 100644 return event; } -@@ -899,6 +911,7 @@ public class CraftEventFactory { +@@ -902,6 +914,7 @@ public class CraftEventFactory { damageCause = DamageCause.ENTITY_EXPLOSION; } event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), entity.getBukkitEntity(), damageCause, modifiers, modifierFunctions); @@ -6324,7 +6322,7 @@ index 68e3d2978..ca4dacdae 100644 } event.setCancelled(cancelled); -@@ -983,6 +996,7 @@ public class CraftEventFactory { +@@ -986,6 +999,7 @@ public class CraftEventFactory { if (!event.isCancelled()) { event.getEntity().setLastDamageCause(event); } @@ -6332,7 +6330,7 @@ index 68e3d2978..ca4dacdae 100644 return event; } -@@ -1032,6 +1046,7 @@ public class CraftEventFactory { +@@ -1035,6 +1049,7 @@ public class CraftEventFactory { EntityDamageEvent event; if (damager != null) { event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, modifiers, modifierFunctions); diff --git a/patches/server/0126-Use-configured-height-for-nether-surface-builders.patch b/patches/server/0120-Use-configured-height-for-nether-surface-builders.patch similarity index 100% rename from patches/server/0126-Use-configured-height-for-nether-surface-builders.patch rename to patches/server/0120-Use-configured-height-for-nether-surface-builders.patch diff --git a/patches/server/0127-Crying-obsidian-valid-for-portal-frames.patch b/patches/server/0121-Crying-obsidian-valid-for-portal-frames.patch similarity index 95% rename from patches/server/0127-Crying-obsidian-valid-for-portal-frames.patch rename to patches/server/0121-Crying-obsidian-valid-for-portal-frames.patch index 528363bb4..3ae69762a 100644 --- a/patches/server/0127-Crying-obsidian-valid-for-portal-frames.patch +++ b/patches/server/0121-Crying-obsidian-valid-for-portal-frames.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Crying obsidian valid for portal frames diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index d08b58473..1473e13c7 100644 +index 372ee6adc..4aa2b38f1 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -100,6 +100,7 @@ public class Block extends BlockBase implements IMaterial { @@ -17,10 +17,10 @@ index d08b58473..1473e13c7 100644 return this == block; } diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java -index 05a7422fb..5e0afcdc2 100644 +index 68fd93ddd..d727be7de 100644 --- a/src/main/java/net/minecraft/server/BlockBase.java +++ b/src/main/java/net/minecraft/server/BlockBase.java -@@ -636,6 +636,7 @@ public abstract class BlockBase { +@@ -642,6 +642,7 @@ public abstract class BlockBase { return this.getBlock().a(tag) && predicate.test(this); } @@ -29,7 +29,7 @@ index 05a7422fb..5e0afcdc2 100644 return this.getBlock().a(block); } diff --git a/src/main/java/net/minecraft/server/BlockPortalShape.java b/src/main/java/net/minecraft/server/BlockPortalShape.java -index b7635ab16..425ed3c85 100644 +index 6ef81aeb4..9ea3c30b6 100644 --- a/src/main/java/net/minecraft/server/BlockPortalShape.java +++ b/src/main/java/net/minecraft/server/BlockPortalShape.java @@ -14,7 +14,7 @@ import org.bukkit.event.world.PortalCreateEvent; diff --git a/patches/server/0128-Entities-can-use-portals-configuration.patch b/patches/server/0122-Entities-can-use-portals-configuration.patch similarity index 93% rename from patches/server/0128-Entities-can-use-portals-configuration.patch rename to patches/server/0122-Entities-can-use-portals-configuration.patch index 1321e6ef8..d62013c68 100644 --- a/patches/server/0128-Entities-can-use-portals-configuration.patch +++ b/patches/server/0122-Entities-can-use-portals-configuration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entities can use portals configuration diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 497bee376..cb1bc68f2 100644 +index 75e8b3367..a73ecbc07 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2371,7 +2371,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2376,7 +2376,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public void d(BlockPosition blockposition) { if (this.ah()) { this.resetPortalCooldown(); @@ -17,7 +17,7 @@ index 497bee376..cb1bc68f2 100644 if (!this.world.isClientSide && !blockposition.equals(this.ac)) { this.ac = blockposition.immutableCopy(); } -@@ -2940,7 +2940,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2945,7 +2945,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean canPortal() { @@ -27,7 +27,7 @@ index 497bee376..cb1bc68f2 100644 public float a(Explosion explosion, IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, Fluid fluid, float f) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index aa2c41e4d..66ac267f0 100644 +index a58f07b4b..ad8ff0587 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -138,6 +138,7 @@ public class PurpurWorldConfig { diff --git a/patches/server/0122-Optimize-redstone-algorithm.patch b/patches/server/0122-Optimize-redstone-algorithm.patch deleted file mode 100644 index 8536956e0..000000000 --- a/patches/server/0122-Optimize-redstone-algorithm.patch +++ /dev/null @@ -1,1159 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: theosib -Date: Thu, 27 Sep 2018 01:43:35 -0600 -Subject: [PATCH] Optimize redstone algorithm - -Author: theosib -Co-authored-by: egg82 - -Original license: MIT - -This patch implements theosib's redstone algorithms to completely overhaul the way redstone works. -The new algorithms should be many times faster than current vanilla ones. -From the original author's comments, it looks like it shouldn't interfere with any redstone save for very extreme edge-cases. - -Surprisingly, not a lot was touched aside from a few obfuscation helpers and BlockRedstoneWire. -A lot of this code is self-contained in a helper class. - -Aside from making the obvious class/function renames and obfhelpers I didn't need to modify much. -Just added Bukkit's event system and took a few liberties with dead code and comment misspellings. - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index fedea8106..56f1b4b5d 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -655,4 +655,14 @@ public class PaperWorldConfig { - maxLightningFlashDistance = 512; // Vanilla value - } - } -+ -+ public boolean useEigencraftRedstone = false; -+ private void useEigencraftRedstone() { -+ useEigencraftRedstone = this.getBoolean("use-faster-eigencraft-redstone", false); -+ if (useEigencraftRedstone) { -+ log("Using Eigencraft redstone algorithm by theosib."); -+ } else { -+ log("Using vanilla redstone algorithm."); -+ } -+ } - } -diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java -new file mode 100644 -index 000000000..b69803cbf ---- /dev/null -+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java -@@ -0,0 +1,915 @@ -+package com.destroystokyo.paper.util; -+ -+import java.util.List; -+import java.util.Map; -+import java.util.concurrent.ThreadLocalRandom; -+ -+import org.bukkit.event.block.BlockRedstoneEvent; -+ -+import com.google.common.collect.Lists; -+import com.google.common.collect.Maps; -+ -+import net.minecraft.server.Block; -+import net.minecraft.server.BlockPosition; -+import net.minecraft.server.BlockRedstoneWire; -+import net.minecraft.server.IBlockData; -+import net.minecraft.server.Items; -+import net.minecraft.server.ItemStack; -+import net.minecraft.server.World; -+ -+/** -+ * Used for the faster redstone algorithm. -+ * Original author: theosib -+ * Original license: MIT -+ * -+ * Ported to Paper and updated to 1.13 by egg82 -+ */ -+public class RedstoneWireTurbo { -+ /* -+ * This is Helper class for BlockRedstoneWire. It implements a minimally-invasive -+ * bolt-on accelerator that performs a breadth-first search through redstone wire blocks -+ * in order to more efficiently and deterministically compute new redstone wire power levels -+ * and determine the order in which other blocks should be updated. -+ * -+ * Features: -+ * - Changes to BlockRedstoneWire are very limited, no other classes are affected, and the -+ * choice between old and new redstone wire update algorithms is switchable on-line. -+ * - The vanilla implementation relied on World.notifyNeighborsOfStateChange for redstone -+ * wire blocks to communicate power level changes to each other, generating 36 block -+ * updates per call. This improved implementation propagates power level changes directly -+ * between redstone wire blocks. Redstone wire power levels are therefore computed more quickly, -+ * and block updates are sent only to non-redstone blocks, many of which may perform an -+ * action when informed of a change in redstone power level. (Note: Block updates are not -+ * the same as state changes to redstone wire. Wire block states are updated as soon -+ * as they are computed.) -+ * - Of the 36 block updates generated by a call to World.notifyNeighborsOfStateChange, -+ * 12 of them are obviously redundant (e.g. the west neighbor of the east neighbor). -+ * These are eliminated. -+ * - Updates to redstone wire and other connected blocks are propagated in a breath-first -+ * manner, radiating out from the initial trigger (a block update to a redstone wire -+ * from something other than redstone wire). -+ * - Updates are scheduled both deterministically and in an intuitive order, addressing bug -+ * MC-11193. -+ * - All redstone behavior that used to be locational now works the same in all locations. -+ * - All behaviors of redstone wire that used to be orientational now work the same in all -+ * orientations, as long as orientation can be determined; random otherwise. Some other -+ * redstone components still update directionally (e.g. switches), and this code can't -+ * compensate for that. -+ * - Information that is otherwise computed over and over again or which is expensive to -+ * to compute is cached for faster lookup. This includes coordinates of block position -+ * neighbors and block states that won't change behind our backs during the execution of -+ * this search algorithm. -+ * - Redundant block updates (both to redstone wire and to other blocks) are heavily -+ * consolidated. For worst-case scenarios (depowering of redstone wire) this results -+ * in a reduction of block updates by as much as 95% (factor of 1/21). Due to overheads, -+ * empirical testing shows a speedup better than 10x. This addresses bug MC-81098. -+ * -+ * Extensive testing has been performed to ensure that existing redstone contraptions still -+ * behave as expected. Results of early testing that identified undesirable behavior changes -+ * were addressed. Additionally, real-time performance testing revealed compute inefficiencies -+ * With earlier implementations of this accelerator. Some compatibility adjustments and -+ * performance optimizations resulted in harmless increases in block updates above the -+ * theoretical minimum. -+ * -+ * Only a single redstone machine was found to break: An instant dropper line hack that -+ * relies on powered rails and quasi-connectivity but doesn't work in all directions. The -+ * replacement is to lay redstone wire directly on top of the dropper line, which now works -+ * reliably in any direction. -+ * -+ * There are numerous other optimization that can be made, but those will be provided later in -+ * separate updates. This version is designed to be minimalistic. -+ * -+ * Many thanks to the following individuals for their help in testing this functionality: -+ * - pokechu22, _MethodZz_, WARBEN, NarcolepticFrog, CommandHelper (nessie), ilmango, -+ * OreoLamp, Xcom6000, tryashtar, RedCMD, Smokey95Dog, EDDxample, Rays Works, -+ * Nodnam, BlockyPlays, Grumm, NeunEinser, HelVince. -+ */ -+ -+ /* Reference to BlockRedstoneWire object, which uses this accelerator */ -+ private final BlockRedstoneWire wire; -+ -+ /* -+ * Implementation: -+ * -+ * RedstoneWire Blocks are updated in concentric rings or "layers" radiating out from the -+ * initial block update that came from a call to BlockRedstoneWire.neighborChanged(). -+ * All nodes put in Layer N are those with Manhattan distance N from the trigger -+ * position, reachable through connected redstone wire blocks. -+ * -+ * Layer 0 represents the trigger block position that was input to neighborChanged. -+ * Layer 1 contains the immediate neighbors of that position. -+ * Layer N contains the neighbors of blocks in layer N-1, not including -+ * those in previous layers. -+ * -+ * Layers enforce an update order that is a function of Manhattan distance -+ * from the initial coordinates input to neighborChanged. The same -+ * coordinates may appear in multiple layers, but redundant updates are minimized. -+ * Block updates are sent layer-by-layer. If multiple of a block's neighbors experience -+ * redstone wire changes before its layer is processed, then those updates will be merged. -+ * If a block's update has been sent, but its neighboring redstone changes -+ * after that, then another update will be sent. This preserves compatibility with -+ * machines that rely on zero-tick behavior, except that the new functionality is non- -+ * locational. -+ * -+ * Within each layer, updates are ordered left-to-right relative to the direction of -+ * information flow. This makes the implementation non-orientational. Only when -+ * this direction is ambiguous is randomness applied (intentionally). -+ */ -+ private List updateQueue0 = Lists.newArrayList(); -+ private List updateQueue1 = Lists.newArrayList(); -+ private List updateQueue2 = Lists.newArrayList(); -+ -+ public RedstoneWireTurbo(BlockRedstoneWire wire) { -+ this.wire = wire; -+ } -+ -+ /* -+ * Compute neighbors of a block. When a redstone wire value changes, previously it called -+ * World.notifyNeighborsOfStateChange. That lists immediately neighboring blocks in -+ * west, east, down, up, north, south order. For each of those neighbors, their own -+ * neighbors are updated in the same order. This generates 36 updates, but 12 of them are -+ * redundant; for instance the west neighbor of a block's east neighbor. -+ * -+ * Note that this ordering is only used to create the initial list of neighbors. Once -+ * the direction of signal flow is identified, the ordering of updates is completely -+ * reorganized. -+ */ -+ public static BlockPosition[] computeAllNeighbors(final BlockPosition pos) { -+ final int x = pos.getX(); -+ final int y = pos.getY(); -+ final int z = pos.getZ(); -+ final BlockPosition[] n = new BlockPosition[24]; -+ -+ // Immediate neighbors, in the same order as -+ // World.notifyNeighborsOfStateChange, etc.: -+ // west, east, down, up, north, south -+ n[0] = new BlockPosition(x - 1, y, z); -+ n[1] = new BlockPosition(x + 1, y, z); -+ n[2] = new BlockPosition(x, y - 1, z); -+ n[3] = new BlockPosition(x, y + 1, z); -+ n[4] = new BlockPosition(x, y, z - 1); -+ n[5] = new BlockPosition(x, y, z + 1); -+ -+ // Neighbors of neighbors, in the same order, -+ // except that duplicates are not included -+ n[6] = new BlockPosition(x - 2, y, z); -+ n[7] = new BlockPosition(x - 1, y - 1, z); -+ n[8] = new BlockPosition(x - 1, y + 1, z); -+ n[9] = new BlockPosition(x - 1, y, z - 1); -+ n[10] = new BlockPosition(x - 1, y, z + 1); -+ n[11] = new BlockPosition(x + 2, y, z); -+ n[12] = new BlockPosition(x + 1, y - 1, z); -+ n[13] = new BlockPosition(x + 1, y + 1, z); -+ n[14] = new BlockPosition(x + 1, y, z - 1); -+ n[15] = new BlockPosition(x + 1, y, z + 1); -+ n[16] = new BlockPosition(x, y - 2, z); -+ n[17] = new BlockPosition(x, y - 1, z - 1); -+ n[18] = new BlockPosition(x, y - 1, z + 1); -+ n[19] = new BlockPosition(x, y + 2, z); -+ n[20] = new BlockPosition(x, y + 1, z - 1); -+ n[21] = new BlockPosition(x, y + 1, z + 1); -+ n[22] = new BlockPosition(x, y, z - 2); -+ n[23] = new BlockPosition(x, y, z + 2); -+ return n; -+ } -+ -+ /* -+ * We only want redstone wires to update redstone wires that are -+ * immediately adjacent. Some more distant updates can result -+ * in cross-talk that (a) wastes time and (b) can make the update -+ * order unintuitive. Therefore (relative to the neighbor order -+ * computed by computeAllNeighbors), updates are not scheduled -+ * for redstone wire in those non-connecting positions. On the -+ * other hand, updates will always be sent to *other* types of blocks -+ * in any of the 24 neighboring positions. -+ */ -+ private static final boolean[] update_redstone = { -+ true, true, false, false, true, true, // 0 to 5 -+ false, true, true, false, false, false, // 6 to 11 -+ true, true, false, false, false, true, // 12 to 17 -+ true, false, true, true, false, false // 18 to 23 -+ }; -+ -+ // Internal numbering for cardinal directions -+ private static final int North = 0; -+ private static final int East = 1; -+ private static final int South = 2; -+ private static final int West = 3; -+ -+ /* -+ * These lookup tables completely remap neighbor positions into a left-to-right -+ * ordering, based on the cardinal direction that is determined to be forward. -+ * See below for more explanation. -+ */ -+ private static final int[] forward_is_north = {2, 3, 16, 19, 0, 4, 1, 5, 7, 8, 17, 20, 12, 13, 18, 21, 6, 9, 22, 14, 11, 10, 23, 15}; -+ private static final int[] forward_is_east = {2, 3, 16, 19, 4, 1, 5, 0, 17, 20, 12, 13, 18, 21, 7, 8, 22, 14, 11, 15, 23, 9, 6, 10}; -+ private static final int[] forward_is_south = {2, 3, 16, 19, 1, 5, 0, 4, 12, 13, 18, 21, 7, 8, 17, 20, 11, 15, 23, 10, 6, 14, 22, 9}; -+ private static final int[] forward_is_west = {2, 3, 16, 19, 5, 0, 4, 1, 18, 21, 7, 8, 17, 20, 12, 13, 23, 10, 6, 9, 22, 15, 11, 14}; -+ -+ /* For any orientation, we end up with the update order defined below. This order is relative to any redstone wire block -+ * that is itself having an update computed, and this center position is marked with C. -+ * - The update position marked 0 is computed first, and the one marked 23 is last. -+ * - Forward is determined by the local direction of information flow into position C from prior updates. -+ * - The first updates are scheduled for the four positions below and above C. -+ * - Then updates are scheduled for the four horizontal neighbors of C, followed by the positions below and above those neighbors. -+ * - Finally, updates are scheduled for the remaining positions with Manhattan distance 2 from C (at the same Y coordinate). -+ * - For a given horizontal distance from C, updates are scheduled starting from directly left and stepping clockwise to directly -+ * right. The remaining positions behind C are scheduled counterclockwise so as to maintain the left-to-right ordering. -+ * - If C is in layer N of the update schedule, then all 24 positions may be scheduled for layer N+1. For redstone wire, no -+ * updates are scheduled for positions that cannot directly connect. Additionally, the four positions above and below C -+ * are ALSO scheduled for layer N+2. -+ * - This update order was selected after experimenting with a number of alternative schedules, based on its compatibility -+ * with existing redstone designs and behaviors that were considered to be intuitive by various testers. WARBEN in particular -+ * made some of the most challenging test cases, but the 3-tick clocks (made by RedCMD) were also challenging to fix, -+ * along with the rail-based instant dropper line built by ilmango. Numerous others made test cases as well, including -+ * NarcolepticFrog, nessie, and Pokechu22. -+ * -+ * - The forward direction is determined locally. So when there are branches in the redstone wire, the left one will get updated -+ * before the right one. Each branch can have its own relative forward direction, resulting in the left side of a left branch -+ * having priority over the right branch of a left branch, which has priority over the left branch of a right branch, followed -+ * by the right branch of a right branch. And so forth. Since redstone power reduces to zero after a path distance of 15, -+ * that imposes a practical limit on the branching. Note that the branching is not tracked explicitly -- relative forward -+ * directions dictate relative sort order, which maintains the proper global ordering. This also makes it unnecessary to be -+ * concerned about branches meeting up with each other. -+ * -+ * ^ -+ * | -+ * Forward -+ * <-- Left Right --> -+ * -+ * 18 -+ * 10 17 5 19 11 -+ * 2 8 0 12 16 4 C 6 20 9 1 13 3 -+ * 14 21 7 23 15 -+ * Further 22 Further -+ * Down Down Up Up -+ * -+ * Backward -+ * | -+ * V -+ */ -+ -+ // This allows the above remapping tables to be looked up by cardial direction index -+ private static final int[][] reordering = { forward_is_north, forward_is_east, forward_is_south, forward_is_west }; -+ -+ /* -+ * Input: Array of UpdateNode objects in an order corresponding to the positions -+ * computed by computeAllNeighbors above. -+ * Output: Array of UpdateNode objects oriented using the above remapping tables -+ * corresponding to the identified heading (direction of information flow). -+ */ -+ private static void orientNeighbors(final UpdateNode[] src, final UpdateNode[] dst, final int heading) { -+ final int[] re = reordering[heading]; -+ for (int i = 0; i < 24; i++) { -+ dst[i] = src[re[i]]; -+ } -+ } -+ -+ /* -+ * Structure to keep track of redstone wire blocks and -+ * neighbors that will receive updates. -+ */ -+ private static class UpdateNode { -+ public static enum Type { -+ UNKNOWN, REDSTONE, OTHER -+ } -+ -+ IBlockData currentState; // Keep track of redstone wire value -+ UpdateNode[] neighbor_nodes; // References to neighbors (directed graph edges) -+ BlockPosition self; // UpdateNode's own position -+ BlockPosition parent; // Which block pos spawned/updated this node -+ Type type = Type.UNKNOWN; // unknown, redstone wire, other type of block -+ int layer; // Highest layer this node is scheduled in -+ boolean visited; // To keep track of information flow direction, visited restone wire is marked -+ int xbias, zbias; // Remembers directionality of ancestor nodes; helps eliminate directional ambiguities. -+ } -+ -+ /* -+ * Keep track of all block positions discovered during search and their current states. -+ * We want to remember one entry for each position. -+ */ -+ private final Map nodeCache = Maps.newHashMap(); -+ -+ /* -+ * For a newly created UpdateNode object, determine what type of block it is. -+ */ -+ private void identifyNode(final World worldIn, final UpdateNode upd1) { -+ final BlockPosition pos = upd1.self; -+ final IBlockData oldState = worldIn.getType(pos); -+ upd1.currentState = oldState; -+ -+ // Some neighbors of redstone wire are other kinds of blocks. -+ // These need to receive block updates to inform them that -+ // redstone wire values have changed. -+ final Block block = oldState.getBlock(); -+ if (block != wire) { -+ // Mark this block as not redstone wire and therefore -+ // requiring updates -+ upd1.type = UpdateNode.Type.OTHER; -+ -+ // Non-redstone blocks may propagate updates, but those updates -+ // are not handled by this accelerator. Therefore, we do not -+ // expand this position's neighbors. -+ return; -+ } -+ -+ // One job of BlockRedstoneWire.neighborChanged is to convert -+ // redstone wires to items if the block beneath was removed. -+ // With this accelerator, BlockRedstoneWire.neighborChanged -+ // is only typically called for a single wire block, while -+ // others are processed internally by the breadth first search -+ // algorithm. To preserve this game behavior, this check must -+ // be replicated here. -+ if (!wire.canPlace(null, worldIn, pos)) { -+ // Pop off the redstone dust -+ Block.a(worldIn, pos, new ItemStack(Items.REDSTONE)); // TODO -+ worldIn.setAir(pos); -+ -+ // Mark this position as not being redstone wire -+ upd1.type = UpdateNode.Type.OTHER; -+ -+ // Note: Sending updates to air blocks leads to an empty method. -+ // Testing shows this to be faster than explicitly avoiding updates to -+ // air blocks. -+ return; -+ } -+ -+ // If the above conditions fail, then this is a redstone wire block. -+ upd1.type = UpdateNode.Type.REDSTONE; -+ } -+ -+ /* -+ * Given which redstone wire blocks have been visited and not visited -+ * around the position currently being updated, compute the cardinal -+ * direction that is "forward." -+ * -+ * rx is the forward direction along the West/East axis -+ * rz is the forward direction along the North/South axis -+ */ -+ static private int computeHeading(final int rx, final int rz) { -+ // rx and rz can only take on values -1, 0, and 1, so we can -+ // compute a code number that allows us to use a single switch -+ // to determine the heading. -+ final int code = (rx + 1) + 3 * (rz + 1); -+ switch (code) { -+ case 0: { -+ // Both rx and rz are -1 (northwest) -+ // Randomly choose one to be forward. -+ final int j = ThreadLocalRandom.current().nextInt(0, 1); -+ return (j == 0) ? North : West; -+ } -+ case 1: { -+ // rx=0, rz=-1 -+ // Definitively North -+ return North; -+ } -+ case 2: { -+ // rx=1, rz=-1 (northeast) -+ // Choose randomly between north and east -+ final int j = ThreadLocalRandom.current().nextInt(0, 1); -+ return (j == 0) ? North : East; -+ } -+ case 3: { -+ // rx=-1, rz=0 -+ // Definitively West -+ return West; -+ } -+ case 4: { -+ // rx=0, rz=0 -+ // Heading is completely ambiguous. Choose -+ // randomly among the four cardinal directions. -+ return ThreadLocalRandom.current().nextInt(0, 4); -+ } -+ case 5: { -+ // rx=1, rz=0 -+ // Definitively East -+ return East; -+ } -+ case 6: { -+ // rx=-1, rz=1 (southwest) -+ // Choose randomly between south and west -+ final int j = ThreadLocalRandom.current().nextInt(0, 1); -+ return (j == 0) ? South : West; -+ } -+ case 7: { -+ // rx=0, rz=1 -+ // Definitively South -+ return South; -+ } -+ case 8: { -+ // rx=1, rz=1 (southeast) -+ // Choose randomly between south and east -+ final int j = ThreadLocalRandom.current().nextInt(0, 1); -+ return (j == 0) ? South : East; -+ } -+ } -+ -+ // We should never get here -+ return ThreadLocalRandom.current().nextInt(0, 4); -+ } -+ -+ // Select whether to use updateSurroundingRedstone from BlockRedstoneWire (old) -+ // or this helper class (new) -+ private static final boolean old_current_change = false; -+ -+ /* -+ * Process a node whose neighboring redstone wire has experienced value changes. -+ */ -+ private void updateNode(final World worldIn, final UpdateNode upd1, final int layer) { -+ final BlockPosition pos = upd1.self; -+ -+ // Mark this redstone wire as having been visited so that it can be used -+ // to calculate direction of information flow. -+ upd1.visited = true; -+ -+ // Look up the last known state. -+ // Due to the way other redstone components are updated, we do not -+ // have to worry about a state changing behind our backs. The rare -+ // exception is handled by scheduleReentrantNeighborChanged. -+ final IBlockData oldState = upd1.currentState; -+ -+ // Ask the wire block to compute its power level from its neighbors. -+ // This will also update the wire's power level and return a new -+ // state if it has changed. When a wire power level is changed, -+ // calculateCurrentChanges will immediately update the block state in the world -+ // and return the same value here to be cached in the corresponding -+ // UpdateNode object. -+ IBlockData newState; -+ if (old_current_change) { -+ newState = wire.calculateCurrentChanges(worldIn, pos, pos, oldState); -+ } else { -+ // Looking up block state is slow. This accelerator includes a version of -+ // calculateCurrentChanges that uses cahed wire values for a -+ // significant performance boost. -+ newState = this.calculateCurrentChanges(worldIn, upd1); -+ } -+ -+ // Only inform neighbors if the state has changed -+ if (newState != oldState) { -+ // Store the new state -+ upd1.currentState = newState; -+ -+ // Inform neighbors of the change -+ propagateChanges(worldIn, upd1, layer); -+ } -+ } -+ -+ /* -+ * This identifies the neighboring positions of a new UpdateNode object, -+ * determines their types, and links those to into the graph. Then based on -+ * what nodes in the redstone wire graph have been visited, the neighbors -+ * are reordered left-to-right relative to the direction of information flow. -+ */ -+ private void findNeighbors(final World worldIn, final UpdateNode upd1) { -+ final BlockPosition pos = upd1.self; -+ -+ // Get the list of neighbor coordinates -+ final BlockPosition[] neighbors = computeAllNeighbors(pos); -+ -+ // Temporary array of neighbors in cardinal ordering -+ final UpdateNode[] neighbor_nodes = new UpdateNode[24]; -+ -+ // Target array of neighbors sorted left-to-right -+ upd1.neighbor_nodes = new UpdateNode[24]; -+ -+ for (int i=0; i<24; i++) { -+ // Look up each neighbor in the node cache -+ final BlockPosition pos2 = neighbors[i]; -+ UpdateNode upd2 = nodeCache.get(pos2); -+ if (upd2 == null) { -+ // If this is a previously unreached position, create -+ // a new update node, add it to the cache, and identify what it is. -+ upd2 = new UpdateNode(); -+ upd2.self = pos2; -+ upd2.parent = pos; -+ nodeCache.put(pos2, upd2); -+ identifyNode(worldIn, upd2); -+ } -+ -+ // For non-redstone blocks, any of the 24 neighboring positions -+ // should receive a block update. However, some block coordinates -+ // may contain a redstone wire that does not directly connect to the -+ // one being expanded. To avoid redundant calculations and confusing -+ // cross-talk, those neighboring positions are not included. -+ if (update_redstone[i] || upd2.type != UpdateNode.Type.REDSTONE) { -+ neighbor_nodes[i] = upd2; -+ } -+ } -+ -+ // Determine the directions from which the redstone signal may have come from. This -+ // checks for redstone wire at the same Y level and also Y+1 and Y-1, relative to the -+ // block being expanded. -+ final boolean fromWest = (neighbor_nodes[0].visited || neighbor_nodes[7].visited || neighbor_nodes[8].visited); -+ final boolean fromEast = (neighbor_nodes[1].visited || neighbor_nodes[12].visited || neighbor_nodes[13].visited); -+ final boolean fromNorth = (neighbor_nodes[4].visited || neighbor_nodes[17].visited || neighbor_nodes[20].visited); -+ final boolean fromSouth = (neighbor_nodes[5].visited || neighbor_nodes[18].visited || neighbor_nodes[21].visited); -+ -+ int cx = 0, cz = 0; -+ if (fromWest) cx += 1; -+ if (fromEast) cx -= 1; -+ if (fromNorth) cz += 1; -+ if (fromSouth) cz -= 1; -+ -+ int heading; -+ if (cx==0 && cz==0) { -+ // If there is no clear direction, try to inherit the heading from ancestor nodes. -+ heading = computeHeading(upd1.xbias, upd1.zbias); -+ -+ // Propagate that heading to descendant nodes. -+ for (int i=0; i<24; i++) { -+ final UpdateNode nn = neighbor_nodes[i]; -+ if (nn != null) { -+ nn.xbias = upd1.xbias; -+ nn.zbias = upd1.zbias; -+ } -+ } -+ } else { -+ if (cx != 0 && cz != 0) { -+ // If the heading is somewhat ambiguous, try to disambiguate based on -+ // ancestor nodes. -+ if (upd1.xbias != 0) cz = 0; -+ if (upd1.zbias != 0) cx = 0; -+ } -+ heading = computeHeading(cx, cz); -+ -+ // Propagate that heading to descendant nodes. -+ for (int i=0; i<24; i++) { -+ final UpdateNode nn = neighbor_nodes[i]; -+ if (nn != null) { -+ nn.xbias = cx; -+ nn.zbias = cz; -+ } -+ } -+ } -+ -+ // Reorder neighboring UpdateNode objects according to the forward direction -+ // determined above. -+ orientNeighbors(neighbor_nodes, upd1.neighbor_nodes, heading); -+ } -+ -+ /* -+ * For any redstone wire block in layer N, inform neighbors to recompute their states -+ * in layers N+1 and N+2; -+ */ -+ private void propagateChanges(final World worldIn, final UpdateNode upd1, final int layer) { -+ if (upd1.neighbor_nodes == null) { -+ // If this node has not been expanded yet, find its neighbors -+ findNeighbors(worldIn, upd1); -+ } -+ -+ final BlockPosition pos = upd1.self; -+ -+ // All neighbors may be scheduled for layer N+1 -+ final int layer1 = layer + 1; -+ -+ // If the node being updated (upd1) has already been expanded, then merely -+ // schedule updates to its neighbors. -+ for (int i = 0; i < 24; i++) { -+ final UpdateNode upd2 = upd1.neighbor_nodes[i]; -+ -+ // This test ensures that an UpdateNode is never scheduled to the same layer -+ // more than once. Also, skip non-connecting redstone wire blocks -+ if (upd2 != null && layer1 > upd2.layer) { -+ upd2.layer = layer1; -+ updateQueue1.add(upd2); -+ -+ // Keep track of which block updated this neighbor -+ upd2.parent = pos; -+ } -+ } -+ -+ // Nodes above and below are scheduled ALSO for layer N+2 -+ final int layer2 = layer + 2; -+ -+ // Repeat of the loop above, but only for the first four (above and below) neighbors -+ // and for layer N+2; -+ for (int i = 0; i < 4; i++) { -+ final UpdateNode upd2 = upd1.neighbor_nodes[i]; -+ if (upd2 != null && layer2 > upd2.layer) { -+ upd2.layer = layer2; -+ updateQueue2.add(upd2); -+ upd2.parent = pos; -+ } -+ } -+ } -+ -+ // The breadth-first search below will send block updates to blocks -+ // that are not redstone wire. If one of those updates results in -+ // a distant redstone wire getting an update, then this.neighborChanged -+ // will get called. This would be a reentrant call, and -+ // it is necessary to properly integrate those updates into the -+ // on-going search through redstone wire. Thus, we make the layer -+ // currently being processed visible at the object level. -+ -+ // The current layer being processed by the breadth-first search -+ private int currentWalkLayer = 0; -+ -+ private void shiftQueue() { -+ final List t = updateQueue0; -+ t.clear(); -+ updateQueue0 = updateQueue1; -+ updateQueue1 = updateQueue2; -+ updateQueue2 = t; -+ } -+ -+ /* -+ * Perform a breadth-first (layer by layer) traversal through redstone -+ * wire blocks, propagating value changes to neighbors in an order -+ * that is a function of distance from the initial call to -+ * this.neighborChanged. -+ */ -+ private void breadthFirstWalk(final World worldIn) { -+ shiftQueue(); -+ currentWalkLayer = 1; -+ -+ // Loop over all layers -+ while (updateQueue0.size()>0 || updateQueue1.size()>0) { -+ // Get the set of blocks in this layer -+ final List thisLayer = updateQueue0; -+ -+ // Loop over all blocks in the layer. Recall that -+ // this is a List, preserving the insertion order of -+ // left-to-right based on direction of information flow. -+ for (UpdateNode upd : thisLayer) { -+ if (upd.type == UpdateNode.Type.REDSTONE) { -+ // If the node is is redstone wire, -+ // schedule updates to neighbors if its value -+ // has changed. -+ updateNode(worldIn, upd, currentWalkLayer); -+ } else { -+ // If this block is not redstone wire, send a block update. -+ // Redstone wire blocks get state updates, but they don't -+ // need block updates. Only non-redstone neighbors need updates. -+ -+ // World.neighborChanged is called from -+ // World.notifyNeighborsOfStateChange, and -+ // notifyNeighborsOfStateExcept. We don't use -+ // World.notifyNeighborsOfStateChange here, since we are -+ // already keeping track of all of the neighbor positions -+ // that need to be updated. All on its own, handling neighbors -+ // this way reduces block updates by 1/3 (24 instead of 36). -+ worldIn.neighborChanged(upd.self, wire, upd.parent); -+ } -+ } -+ -+ // Move on to the next layer -+ shiftQueue(); -+ currentWalkLayer++; -+ } -+ -+ currentWalkLayer = 0; -+ } -+ -+ /* -+ * Normally, when Minecraft is computing redstone wire power changes, and a wire power level -+ * change sends a block update to a neighboring functional component (e.g. piston, repeater, etc.), -+ * those updates are queued. Only once all redstone wire updates are complete will any component -+ * action generate any further block updates to redstone wire. Instant repeater lines, for instance, -+ * will process all wire updates for one redstone line, after which the pistons will zero-tick, -+ * after which the next redstone line performs all of its updates. Thus, each wire is processed in its -+ * own discrete wave. -+ * -+ * However, there are some corner cases where this pattern breaks, with a proof of concept discovered -+ * by Rays Works, which works the same in vanilla. The scenario is as follows: -+ * (1) A redstone wire is conducting a signal. -+ * (2) Part-way through that wave of updates, a neighbor is updated that causes an update to a completely -+ * separate redstone wire. -+ * (3) This results in a call to BlockRedstoneWire.neighborChanged for that other wire, in the middle of -+ * an already on-going propagation through the first wire. -+ * -+ * The vanilla code, being depth-first, would end up fully processing the second wire before going back -+ * to finish processing the first one. (Although technically, vanilla has no special concept of "being -+ * in the middle" of processing updates to a wire.) For the breadth-first algorithm, we give this -+ * situation special handling, where the updates for the second wire are incorporated into the schedule -+ * for the first wire, and then the callstack is allowed to unwind back to the on-going search loop in -+ * order to continue processing both the first and second wire in the order of distance from the initial -+ * trigger. -+ */ -+ private IBlockData scheduleReentrantNeighborChanged(final World worldIn, final BlockPosition pos, final IBlockData newState, final BlockPosition source) { -+ if (source != null) { -+ // If the cause of the redstone wire update is known, we can use that to help determine -+ // direction of information flow. -+ UpdateNode src = nodeCache.get(source); -+ if (src == null) { -+ src = new UpdateNode(); -+ src.self = source; -+ src.parent = source; -+ src.visited = true; -+ identifyNode(worldIn, src); -+ nodeCache.put(source, src); -+ } -+ } -+ -+ // Find or generate a node for the redstone block position receiving the update -+ UpdateNode upd = nodeCache.get(pos); -+ if (upd == null) { -+ upd = new UpdateNode(); -+ upd.self = pos; -+ upd.parent = pos; -+ upd.visited = true; -+ identifyNode(worldIn, upd); -+ nodeCache.put(pos, upd); -+ } -+ upd.currentState = newState; -+ -+ // Receiving this block update may mean something in the world changed. -+ // Therefore we clear the cached block info about all neighbors of -+ // the position receiving the update and then re-identify what they are. -+ if (upd.neighbor_nodes != null) { -+ for (int i=0; i<24; i++) { -+ final UpdateNode upd2 = upd.neighbor_nodes[i]; -+ if (upd2 == null) continue; -+ upd2.type = UpdateNode.Type.UNKNOWN; -+ upd2.currentState = null; -+ identifyNode(worldIn, upd2); -+ } -+ } -+ -+ // The block at 'pos' is a redstone wire and has been updated already by calling -+ // wire.calculateCurrentChanges, so we don't schedule that. However, we do need -+ // to schedule its neighbors. By passing the current value of 'currentWalkLayer' to -+ // propagateChanges, the neighbors of 'pos' are scheduled for layers currentWalkLayer+1 -+ // and currentWalkLayer+2. -+ propagateChanges(worldIn, upd, currentWalkLayer); -+ -+ // Return here. The call stack will unwind back to the first call to -+ // updateSurroundingRedstone, whereupon the new updates just scheduled will -+ // be propagated. This also facilitates elimination of superfluous and -+ // redundant block updates. -+ return newState; -+ } -+ -+ /* -+ * New version of pre-existing updateSurroundingRedstone, which is called from -+ * wire.updateSurroundingRedstone, which is called from wire.neighborChanged and a -+ * few other methods in BlockRedstoneWire. This sets off the breadth-first -+ * walk through all redstone dust connected to the initial position triggered. -+ */ -+ public IBlockData updateSurroundingRedstone(final World worldIn, final BlockPosition pos, final IBlockData state, final BlockPosition source) { -+ // Check this block's neighbors and see if its power level needs to change -+ // Use the calculateCurrentChanges method in BlockRedstoneWire since we have no -+ // cached block states at this point. -+ final IBlockData newState = wire.calculateCurrentChanges(worldIn, pos, pos, state); -+ -+ // If no change, exit -+ if (newState == state) { -+ return state; -+ } -+ -+ // Check to see if this update was received during an on-going breadth first search -+ if (currentWalkLayer > 0 || nodeCache.size() > 0) { -+ // As breadthFirstWalk progresses, it sends block updates to neighbors. Some of those -+ // neighbors may affect the world so as to cause yet another redstone wire block to receive -+ // an update. If that happens, we need to integrate those redstone wire updates into the -+ // already on-going graph walk being performed by breadthFirstWalk. -+ return scheduleReentrantNeighborChanged(worldIn, pos, newState, source); -+ } -+ // If there are no on-going walks through redstone wire, then start a new walk. -+ -+ // If the source of the block update to the redstone wire at 'pos' is known, we can use -+ // that to help determine the direction of information flow. -+ if (source != null) { -+ final UpdateNode src = new UpdateNode(); -+ src.self = source; -+ src.parent = source; -+ src.visited = true; -+ nodeCache.put(source, src); -+ identifyNode(worldIn, src); -+ } -+ -+ // Create a node representing the block at 'pos', and then propagate updates -+ // to its neighbors. As stated above, the call to wire.calculateCurrentChanges -+ // already performs the update to the block at 'pos', so it is not added to the schedule. -+ final UpdateNode upd = new UpdateNode(); -+ upd.self = pos; -+ upd.parent = source!=null ? source : pos; -+ upd.currentState = newState; -+ upd.type = UpdateNode.Type.REDSTONE; -+ upd.visited = true; -+ nodeCache.put(pos, upd); -+ propagateChanges(worldIn, upd, 0); -+ -+ // Perform the walk over all directly reachable redstone wire blocks, propagating wire value -+ // updates in a breadth first order out from the initial update received for the block at 'pos'. -+ breadthFirstWalk(worldIn); -+ -+ // With the whole search completed, clear the list of all known blocks. -+ // We do not want to keep around state information that may be changed by other code. -+ // In theory, we could cache the neighbor block positions, but that is a separate -+ // optimization. -+ nodeCache.clear(); -+ -+ return newState; -+ } -+ -+ // For any array of neighbors in an UpdateNode object, these are always -+ // the indices of the four immediate neighbors at the same Y coordinate. -+ private static final int[] rs_neighbors = {4, 5, 6, 7}; -+ private static final int[] rs_neighbors_up = {9, 11, 13, 15}; -+ private static final int[] rs_neighbors_dn = {8, 10, 12, 14}; -+ -+ /* -+ * Updated calculateCurrentChanges that is optimized for speed and uses -+ * the UpdateNode's neighbor array to find the redstone states of neighbors -+ * that might power it. -+ */ -+ private IBlockData calculateCurrentChanges(final World worldIn, final UpdateNode upd) { -+ IBlockData state = upd.currentState; -+ final int i = state.get(BlockRedstoneWire.POWER).intValue(); -+ int j = 0; -+ j = getMaxCurrentStrength(upd, j); -+ int l = 0; -+ -+ wire.setCanProvidePower(false); -+ // Unfortunately, World.isBlockIndirectlyGettingPowered is complicated, -+ // and I'm not ready to try to replicate even more functionality from -+ // elsewhere in Minecraft into this accelerator. So sadly, we must -+ // suffer the performance hit of this very expensive call. If there -+ // is consistency to what this call returns, we may be able to cache it. -+ final int k = worldIn.isBlockIndirectlyGettingPowered(upd.self); -+ wire.setCanProvidePower(true); -+ -+ // The variable 'k' holds the maximum redstone power value of any adjacent blocks. -+ // If 'k' has the highest level of all neighbors, then the power level of this -+ // redstone wire will be set to 'k'. If 'k' is already 15, then nothing inside the -+ // following loop can affect the power level of the wire. Therefore, the loop is -+ // skipped if k is already 15. -+ if (k < 15) { -+ if (upd.neighbor_nodes == null) { -+ // If this node's neighbors are not known, expand the node -+ findNeighbors(worldIn, upd); -+ } -+ -+ // These remain constant, so pull them out of the loop. -+ // Regardless of which direction is forward, the UpdateNode for the -+ // position directly above the node being calculated is always -+ // at index 1. -+ UpdateNode center_up = upd.neighbor_nodes[1]; -+ boolean center_up_is_cube = center_up.currentState.isOccluding(worldIn, center_up.self); // TODO -+ -+ for (int m = 0; m < 4; m++) { -+ // Get the neighbor array index of each of the four cardinal -+ // neighbors. -+ int n = rs_neighbors[m]; -+ -+ // Get the max redstone power level of each of the cardinal -+ // neighbors -+ UpdateNode neighbor = upd.neighbor_nodes[n]; -+ l = getMaxCurrentStrength(neighbor, l); -+ -+ // Also check the positions above and below the cardinal -+ // neighbors -+ boolean neighbor_is_cube = neighbor.currentState.isOccluding(worldIn, neighbor.self); // TODO -+ if (!neighbor_is_cube) { -+ UpdateNode neighbor_down = upd.neighbor_nodes[rs_neighbors_dn[m]]; -+ l = getMaxCurrentStrength(neighbor_down, l); -+ } else -+ if (!center_up_is_cube) { -+ UpdateNode neighbor_up = upd.neighbor_nodes[rs_neighbors_up[m]]; -+ l = getMaxCurrentStrength(neighbor_up, l); -+ } -+ } -+ } -+ -+ // The new code sets this RedstoneWire block's power level to the highest neighbor -+ // minus 1. This usually results in wire power levels dropping by 2 at a time. -+ // This optimization alone has no impact on update order, only the number of updates. -+ j = l - 1; -+ -+ // If 'l' turns out to be zero, then j will be set to -1, but then since 'k' will -+ // always be in the range of 0 to 15, the following if will correct that. -+ if (k > j) j = k; -+ -+ // egg82's amendment -+ // Adding Bukkit's BlockRedstoneEvent - er.. event. -+ if (i != j) { -+ BlockRedstoneEvent event = new BlockRedstoneEvent(worldIn.getWorld().getBlockAt(upd.self.getX(), upd.self.getY(), upd.self.getZ()), i, j); -+ worldIn.getServer().getPluginManager().callEvent(event); -+ j = event.getNewCurrent(); -+ } -+ -+ if (i != j) { -+ // If the power level has changed from its previous value, compute a new state -+ // and set it in the world. -+ // Possible optimization: Don't commit state changes to the world until they -+ // need to be known by some nearby non-redstone-wire block. -+ BlockPosition pos = new BlockPosition(upd.self.getX(), upd.self.getY(), upd.self.getZ()); -+ if (wire.canPlace(null, worldIn, pos)) { -+ state = state.set(BlockRedstoneWire.POWER, Integer.valueOf(j)); -+ worldIn.setTypeAndData(upd.self, state, 2); -+ } -+ } -+ -+ return state; -+ } -+ -+ /* -+ * Optimized function to compute a redstone wire's power level based on cached -+ * state. -+ */ -+ private static int getMaxCurrentStrength(final UpdateNode upd, final int strength) { -+ if (upd.type != UpdateNode.Type.REDSTONE) return strength; -+ final int i = upd.currentState.get(BlockRedstoneWire.POWER).intValue(); -+ return i > strength ? i : strength; -+ } -+} -diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -index 7b3ccded0..7f9ca45d4 100644 ---- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java -+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java -@@ -1,5 +1,7 @@ - package net.minecraft.server; - -+import com.destroystokyo.paper.PaperConfig; -+import com.destroystokyo.paper.util.RedstoneWireTurbo; - import com.google.common.collect.ImmutableMap; - import com.google.common.collect.Maps; - import com.google.common.collect.Sets; -@@ -25,7 +27,7 @@ public class BlockRedstoneWire extends Block { - private final Map j = Maps.newHashMap(); - private static final Vector3fa[] k = new Vector3fa[16]; - private final IBlockData o; -- private boolean p = true; -+ private boolean p = true; public final boolean canProvidePower() { return this.p; } public final void setCanProvidePower(boolean value) { this.p = value; } // Paper - OBFHELPER - - public BlockRedstoneWire(BlockBase.Info blockbase_info) { - super(blockbase_info); -@@ -212,6 +214,121 @@ public class BlockRedstoneWire extends Block { - return iblockdata.d(iblockaccess, blockposition, EnumDirection.UP) || iblockdata.a(Blocks.HOPPER); - } - -+ // Paper start - Optimize redstone -+ // The bulk of the new functionality is found in RedstoneWireTurbo.java -+ RedstoneWireTurbo turbo = new RedstoneWireTurbo(this); -+ -+ /* -+ * Modified version of pre-existing updateSurroundingRedstone, which is called from -+ * this.neighborChanged and a few other methods in this class. -+ * Note: Added 'source' argument so as to help determine direction of information flow -+ */ -+ private void updateSurroundingRedstone(World worldIn, BlockPosition pos, IBlockData state, BlockPosition source) { -+ if (worldIn.paperConfig.useEigencraftRedstone) { -+ turbo.updateSurroundingRedstone(worldIn, pos, state, source); -+ return; -+ } -+ a(worldIn, pos, state); -+ } -+ -+ /* -+ * Slightly modified method to compute redstone wire power levels from neighboring blocks. -+ * Modifications cut the number of power level changes by about 45% from vanilla, and this -+ * optimization synergizes well with the breadth-first search implemented in -+ * RedstoneWireTurbo. -+ * Note: RedstoneWireTurbo contains a faster version of this code. -+ * Note: Made this public so that RedstoneWireTurbo can access it. -+ */ -+ public IBlockData calculateCurrentChanges(World worldIn, BlockPosition pos1, BlockPosition pos2, IBlockData state) { -+ IBlockData iblockstate = state; -+ int i = state.get(POWER); -+ int j = 0; -+ j = this.getPower(j, worldIn.getType(pos2)); -+ this.setCanProvidePower(false); -+ int k = worldIn.isBlockIndirectlyGettingPowered(pos1); -+ this.setCanProvidePower(true); -+ -+ if (!worldIn.paperConfig.useEigencraftRedstone) { -+ // This code is totally redundant to if statements just below the loop. -+ if (k > 0 && k > j - 1) { -+ j = k; -+ } -+ } -+ -+ int l = 0; -+ -+ // The variable 'k' holds the maximum redstone power value of any adjacent blocks. -+ // If 'k' has the highest level of all neighbors, then the power level of this -+ // redstone wire will be set to 'k'. If 'k' is already 15, then nothing inside the -+ // following loop can affect the power level of the wire. Therefore, the loop is -+ // skipped if k is already 15. -+ if (!worldIn.paperConfig.useEigencraftRedstone || k < 15) { -+ for (EnumDirection enumfacing : EnumDirection.EnumDirectionLimit.HORIZONTAL) { -+ BlockPosition blockpos = pos1.shift(enumfacing); -+ boolean flag = blockpos.getX() != pos2.getX() || blockpos.getZ() != pos2.getZ(); -+ -+ if (flag) { -+ l = this.getPower(l, worldIn.getType(blockpos)); -+ } -+ -+ if (worldIn.getType(blockpos).isOccluding(worldIn, blockpos) && !worldIn.getType(pos1.up()).isOccluding(worldIn, pos1)) { -+ if (flag && pos1.getY() >= pos2.getY()) { -+ l = this.getPower(l, worldIn.getType(blockpos.up())); -+ } -+ } else if (!worldIn.getType(blockpos).isOccluding(worldIn, blockpos) && flag && pos1.getY() <= pos2.getY()) { -+ l = this.getPower(l, worldIn.getType(blockpos.down())); -+ } -+ } -+ } -+ -+ if (!worldIn.paperConfig.useEigencraftRedstone) { -+ // The old code would decrement the wire value only by 1 at a time. -+ if (l > j) { -+ j = l - 1; -+ } else if (j > 0) { -+ --j; -+ } else { -+ j = 0; -+ } -+ -+ if (k > j - 1) { -+ j = k; -+ } -+ } else { -+ // The new code sets this RedstoneWire block's power level to the highest neighbor -+ // minus 1. This usually results in wire power levels dropping by 2 at a time. -+ // This optimization alone has no impact on update order, only the number of updates. -+ j = l - 1; -+ -+ // If 'l' turns out to be zero, then j will be set to -1, but then since 'k' will -+ // always be in the range of 0 to 15, the following if will correct that. -+ if (k > j) j = k; -+ } -+ -+ if (i != j) { -+ state = state.set(POWER, j); -+ -+ if (worldIn.getType(pos1) == iblockstate) { -+ worldIn.setTypeAndData(pos1, state, 2); -+ } -+ -+ // 1.16(.1?) dropped the need for blocks needing updates. -+ // Whether this is necessary after all is to be seen. -+// if (!worldIn.paperConfig.useEigencraftRedstone) { -+// // The new search algorithm keeps track of blocks needing updates in its own data structures, -+// // so only add anything to blocksNeedingUpdate if we're using the vanilla update algorithm. -+// this.getBlocksNeedingUpdate().add(pos1); -+// -+// for (EnumDirection enumfacing1 : EnumDirection.values()) { -+// this.getBlocksNeedingUpdate().add(pos1.shift(enumfacing1)); -+// } -+// } -+ } -+ -+ return state; -+ } -+ // Paper end -+ - private void a(World world, BlockPosition blockposition, IBlockData iblockdata) { - int i = this.a(world, blockposition); - -@@ -281,6 +398,8 @@ public class BlockRedstoneWire extends Block { - return Math.max(i, j - 1); - } - -+ private int getPower(int min, IBlockData iblockdata) { return Math.max(min, getPower(iblockdata)); } // Paper - Optimize redstone -+ private int getPower(IBlockData iblockdata) { return this.o(iblockdata); } // Paper - OBFHELPER - private int o(IBlockData iblockdata) { - return iblockdata.a((Block) this) ? (Integer) iblockdata.get(BlockRedstoneWire.POWER) : 0; - } -@@ -303,7 +422,7 @@ public class BlockRedstoneWire extends Block { - @Override - public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) { - if (!iblockdata1.a(iblockdata.getBlock()) && !world.isClientSide) { -- this.a(world, blockposition, iblockdata); -+ this.updateSurroundingRedstone(world, blockposition, iblockdata, null); // Paper - Optimize redstone - Iterator iterator = EnumDirection.EnumDirectionLimit.VERTICAL.iterator(); - - while (iterator.hasNext()) { -@@ -330,7 +449,7 @@ public class BlockRedstoneWire extends Block { - world.applyPhysics(blockposition.shift(enumdirection), this); - } - -- this.a(world, blockposition, iblockdata); -+ this.updateSurroundingRedstone(world, blockposition, iblockdata, null); // Paper - Optimize redstone - this.d(world, blockposition); - } - } -@@ -365,7 +484,7 @@ public class BlockRedstoneWire extends Block { - public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) { - if (!world.isClientSide) { - if (iblockdata.canPlace(world, blockposition)) { -- this.a(world, blockposition, iblockdata); -+ this.updateSurroundingRedstone(world, blockposition, iblockdata, blockposition1); // Paper - Optimize redstone - } else { - c(iblockdata, world, blockposition); - world.a(blockposition, false); -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6cc37f5b9..a4bb58136 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -614,6 +614,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - - } - -+ public void neighborChanged(BlockPosition pos, Block blockIn, BlockPosition fromPos) { a(pos, blockIn, fromPos); } // Paper - OBFHELPER - public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { - if (!this.isClientSide) { - IBlockData iblockdata = this.getType(blockposition); -@@ -1274,6 +1275,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); - } - -+ public int isBlockIndirectlyGettingPowered(BlockPosition pos) { return this.s(pos); } // Paper - OBFHELPER - public int s(BlockPosition blockposition) { - int i = 0; - EnumDirection[] aenumdirection = World.a; diff --git a/patches/server/0129-LivingEntity-broadcastItemBreak.patch b/patches/server/0123-LivingEntity-broadcastItemBreak.patch similarity index 75% rename from patches/server/0129-LivingEntity-broadcastItemBreak.patch rename to patches/server/0123-LivingEntity-broadcastItemBreak.patch index 53e8d388c..425cd5471 100644 --- a/patches/server/0129-LivingEntity-broadcastItemBreak.patch +++ b/patches/server/0123-LivingEntity-broadcastItemBreak.patch @@ -5,14 +5,14 @@ Subject: [PATCH] LivingEntity#broadcastItemBreak diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a415707e9..c97a152f7 100644 +index ec4b30b7f..bfe7d75d1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -768,5 +768,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) { - getHandle().receive(((CraftItem)item).getHandle(), quantity); +@@ -809,5 +809,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + public void setSafeFallDistance(float safeFallDistance) { + getHandle().safeFallDistance = safeFallDistance; } -+ ++ + @Override + public void broadcastItemBreak(org.bukkit.inventory.EquipmentSlot slot) { + if (slot == null) return; diff --git a/patches/server/0130-Use-arrow-despawn-rate-for-all-projectiles.patch b/patches/server/0124-Use-arrow-despawn-rate-for-all-projectiles.patch similarity index 100% rename from patches/server/0130-Use-arrow-despawn-rate-for-all-projectiles.patch rename to patches/server/0124-Use-arrow-despawn-rate-for-all-projectiles.patch diff --git a/patches/server/0131-Customizable-WitherBoss-Health-and-Healing.patch b/patches/server/0125-Customizable-WitherBoss-Health-and-Healing.patch similarity index 99% rename from patches/server/0131-Customizable-WitherBoss-Health-and-Healing.patch rename to patches/server/0125-Customizable-WitherBoss-Health-and-Healing.patch index 3c4fa74a0..21accb085 100644 --- a/patches/server/0131-Customizable-WitherBoss-Health-and-Healing.patch +++ b/patches/server/0125-Customizable-WitherBoss-Health-and-Healing.patch @@ -53,7 +53,7 @@ index 1054b492c..2a288d372 100644 @Override diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index e62fe108d..d6c29f0f2 100644 +index ad8ff0587..11a5795f5 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -894,10 +894,16 @@ public class PurpurWorldConfig { diff --git a/patches/server/0132-Allow-toggling-special-MobSpawners-per-world.patch b/patches/server/0126-Allow-toggling-special-MobSpawners-per-world.patch similarity index 99% rename from patches/server/0132-Allow-toggling-special-MobSpawners-per-world.patch rename to patches/server/0126-Allow-toggling-special-MobSpawners-per-world.patch index 709ed0792..e0f3264a2 100644 --- a/patches/server/0132-Allow-toggling-special-MobSpawners-per-world.patch +++ b/patches/server/0126-Allow-toggling-special-MobSpawners-per-world.patch @@ -34,7 +34,7 @@ index 502cb0ea4..a9eeddb81 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8ce1173eb..d62eb69c5 100644 +index 77c72ec9f..b1b376ba8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -128,7 +128,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -77,7 +77,7 @@ index e4f2b8494..83f1be960 100644 this.worldDataServer = (WorldDataServer) iworlddataserver; worldDataServer.world = this; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index c7ccc896a..fcfc684fa 100644 +index 11a5795f5..755a46ee8 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -7,6 +7,8 @@ import net.minecraft.server.IRegistry; diff --git a/patches/server/0133-Raid-cooldown-setting.patch b/patches/server/0127-Raid-cooldown-setting.patch similarity index 98% rename from patches/server/0133-Raid-cooldown-setting.patch rename to patches/server/0127-Raid-cooldown-setting.patch index 3e243cc79..e41bd2f42 100644 --- a/patches/server/0133-Raid-cooldown-setting.patch +++ b/patches/server/0127-Raid-cooldown-setting.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Raid cooldown setting diff --git a/src/main/java/net/minecraft/server/PersistentRaid.java b/src/main/java/net/minecraft/server/PersistentRaid.java -index b46b20ca..89be52ca 100644 +index b46b20cae..89be52ca1 100644 --- a/src/main/java/net/minecraft/server/PersistentRaid.java +++ b/src/main/java/net/minecraft/server/PersistentRaid.java @@ -9,6 +9,7 @@ import javax.annotation.Nullable; @@ -51,7 +51,7 @@ index b46b20ca..89be52ca 100644 List list = (List) this.b.y().c(VillagePlaceType.b, blockposition, 64, VillagePlace.Occupancy.IS_OCCUPIED).collect(Collectors.toList()); int i = 0; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index fcfc684f..8d5d841c 100644 +index 755a46ee8..54e460ca8 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -155,6 +155,7 @@ public class PurpurWorldConfig { diff --git a/scripts/upstream.sh b/scripts/upstream.sh index 1250720e5..31196c9b5 100755 --- a/scripts/upstream.sh +++ b/scripts/upstream.sh @@ -11,7 +11,7 @@ done if [[ "$1" == up* ]]; then ( cd "$basedir/Paper/" || exit - git fetch && git reset --hard progress/1.16.2 + git fetch && git reset --hard origin/master cd ../ git add Paper )