From 44e68c301a66443d6af95a832792a9d25f873b0b Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Fri, 26 Apr 2024 11:39:20 -0700 Subject: [PATCH] fix some more issues --- patches/api/0153-Add-Material-Tags.patch | 4 +- patches/api/0254-Add-missing-effects.patch | 26 +++++++-- ...-Add-methods-to-get-translation-keys.patch | 26 +++++++-- ...d-missing-default-perms-for-commands.patch | 9 +-- patches/server/0520-Item-Rarity-API.patch | 4 +- .../server/0552-More-Enchantment-API.patch | 40 ------------- .../server/0885-Bandaid-fix-for-Effect.patch | 34 ++++++++--- .../server/0932-Add-MaterialTagsTest.patch | 58 ------------------- ...ngEffect-powers-lightning-rods-and-.patch} | 0 ...h-event-for-all-player-interactions.patch} | 0 ...everal-issues-with-EntityBreedEvent.patch} | 0 ...935-Add-UUID-attribute-modifier-API.patch} | 0 ...-event-call-for-entity-teleport-API.patch} | 0 ...y-create-LootContext-for-criterions.patch} | 0 ...-t-fire-sync-events-during-worldgen.patch} | 0 ...tch => 0939-Add-Structure-check-API.patch} | 0 ...-getAttributeModifier-duplication-c.patch} | 0 ...store-vanilla-entity-drops-behavior.patch} | 0 ...-Dont-resend-blocks-on-interactions.patch} | 0 ...tch => 0943-add-more-scoreboard-API.patch} | 0 ...stry.patch => 0944-Improve-Registry.patch} | 0 ...on-null-loc-for-EntityTeleportEvent.patch} | 0 ...h => 0946-Add-experience-points-API.patch} | 0 ...h => 0947-Add-drops-to-shear-events.patch} | 38 ++++++++++++ ...> 0948-Add-PlayerShieldDisableEvent.patch} | 0 ...ate-ResourceLocation-in-NBT-reading.patch} | 0 ...-experience-dropping-on-block-break.patch} | 0 ...> 0951-Fixup-NamespacedKey-handling.patch} | 0 ...52-Expose-LootTable-of-DecoratedPot.patch} | 0 ...location-of-Vec3D-by-entity-tracker.patch} | 0 ...rTradeEvent-and-PlayerPurchaseEvent.patch} | 0 ...h => 0955-Add-ShulkerDuplicateEvent.patch} | 0 ...dd-api-for-spawn-egg-texture-colors.patch} | 0 ... => 0957-Add-Lifecycle-Event-system.patch} | 0 ...patch => 0958-ItemStack-Tooltip-API.patch} | 0 ...Snapshot-includeLightData-parameter.patch} | 0 ...PI.patch => 0960-Add-FluidState-API.patch} | 0 ...patch => 0961-add-number-format-api.patch} | 0 ...patch => 0962-improve-BanList-types.patch} | 0 ...I.patch => 0963-Expanded-Hopper-API.patch} | 0 ...4-Add-BlockBreakProgressUpdateEvent.patch} | 0 ...=> 0965-Deprecate-ItemStack-setType.patch} | 0 ...ch => 0966-Add-CartographyItemEvent.patch} | 0 ...aid-API.patch => 0967-More-Raid-API.patch} | 0 ...ng-message-for-initial-server-start.patch} | 0 ...-Configurable-max-block-fluid-ticks.patch} | 0 ...=> 0970-Fix-bees-aging-inside-hives.patch} | 0 ...1-Disable-memory-reserve-allocating.patch} | 0 ...ByEntityEvent-for-unowned-wither-sk.patch} | 0 ....patch => 0973-Fix-DamageSource-API.patch} | 0 ...nvalid-block-entity-during-world-ge.patch} | 0 ...ackOverflowError-for-some-dispenses.patch} | 0 ...=> 0976-Improve-tag-parser-handling.patch} | 0 ...s.patch => 0977-Item-Mutation-Fixes.patch} | 0 ...-Per-world-ticks-per-spawn-settings.patch} | 0 ...e-changed-item-from-dispense-events.patch} | 0 ...> 0980-Rewrite-dataconverter-system.patch} | 0 ...=> 0981-Suspicious-Effect-Entry-API.patch} | 0 ...eck-if-itemstack-is-stackable-first.patch} | 0 ...83-disable-forced-empty-world-ticks.patch} | 0 ...5-Starlight.patch => 0984-Starlight.patch} | 0 ....patch => 0985-Rewrite-chunk-system.patch} | 0 ...incremental-chunk-and-player-saving.patch} | 0 ...dBounds-and-getBlockState-for-inlin.patch} | 0 ...tem-frames-performance-and-bug-fixe.patch} | 0 ...ing-for-EntityLiving-hasLineOfSight.patch} | 0 ...Manager-and-add-advanced-packet-sup.patch} | 0 ...91-Allow-Saving-of-Oversized-Chunks.patch} | 0 ...92-Fix-World-isChunkGenerated-calls.patch} | 0 ...993-Flat-bedrock-generator-settings.patch} | 0 ...=> 0994-Entity-Activation-Range-2.0.patch} | 0 ...0995-Optional-per-player-mob-spawns.patch} | 0 ...7-Anti-Xray.patch => 0996-Anti-Xray.patch} | 0 ...g-PreCreatureSpawnEvent-with-per-pl.patch} | 0 ...timize-Collision-to-not-load-chunks.patch} | 0 ...alSelector-Goal.Flag-Set-operations.patch} | 0 ...00-Entity-load-save-limit-per-chunk.patch} | 0 ...h => 1001-Improved-Watchdog-Support.patch} | 0 ...> 1002-Optimize-Voxel-Shape-Merging.patch} | 0 ...ch => 1003-Write-SavedData-IO-async.patch} | 0 ...nd-End-Portal-Frames-from-being-des.patch} | 0 ...ance-map-to-optimise-entity-tracker.patch} | 0 ...Optimize-Bit-Operations-by-inlining.patch} | 0 ...> 1007-Remove-streams-from-hot-code.patch} | 0 ...-Eigencraft-redstone-implementation.patch} | 0 ...er-Remove-Streams-Optimized-collect.patch} | 0 ...-Improve-boat-collision-performance.patch} | 0 ...=> 1011-Optimise-general-POI-access.patch} | 0 ...ementation-for-blockstate-state-loo.patch} | 0 ...> 1013-Execute-chunk-tasks-mid-tick.patch} | 0 ... 1014-Optimise-random-block-ticking.patch} | 0 ...ulate-regionfile-header-if-it-is-co.patch} | 0 ...city-compression-and-cipher-natives.patch} | 0 ...-more-information-in-watchdog-dumps.patch} | 0 ...tch => 1018-Collision-optimisations.patch} | 0 ...n-checking-in-player-move-packet-ha.patch} | 0 ...e-disarming-not-working-as-intended.patch} | 0 ...-type-tags-suggestions-in-selectors.patch} | 0 ...ate-Current-redstone-implementation.patch} | 0 ...23-optimize-dirt-and-snow-spreading.patch} | 0 ...ch => 1024-Properly-resend-entities.patch} | 0 ...pers.patch => 1025-Optimize-Hoppers.patch} | 0 ...-Improve-performance-of-mass-crafts.patch} | 0 ...> 1027-Actually-optimise-explosions.patch} | 0 ... 1028-Optimise-chunk-tick-iteration.patch} | 0 ...atch => 1029-Lag-compensation-ticks.patch} | 0 ...30-Optimise-nearby-player-retrieval.patch} | 0 ... 1031-Distance-manager-tick-timings.patch} | 0 ...-Oversized-block-entities-in-chunks.patch} | 0 ...packets-for-hard-colliding-entities.patch} | 0 ...-and-optimise-world-force-upgrading.patch} | 0 ...> 1035-API-for-checking-sent-chunks.patch} | 0 ...ndle-pdc-and-custom-tags-in-ItemMeta.patch | 37 ++++++++++++ ...ng-old-serialized-names-to-new-names.patch | 32 ++++++++++ 114 files changed, 183 insertions(+), 125 deletions(-) delete mode 100644 patches/server/0932-Add-MaterialTagsTest.patch rename patches/server/{0933-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch => 0932-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch} (100%) rename patches/server/{0934-Add-hand-to-fish-event-for-all-player-interactions.patch => 0933-Add-hand-to-fish-event-for-all-player-interactions.patch} (100%) rename patches/server/{0935-Fix-several-issues-with-EntityBreedEvent.patch => 0934-Fix-several-issues-with-EntityBreedEvent.patch} (100%) rename patches/server/{0936-Add-UUID-attribute-modifier-API.patch => 0935-Add-UUID-attribute-modifier-API.patch} (100%) rename patches/server/{0937-Fix-missing-event-call-for-entity-teleport-API.patch => 0936-Fix-missing-event-call-for-entity-teleport-API.patch} (100%) rename patches/server/{0938-Lazily-create-LootContext-for-criterions.patch => 0937-Lazily-create-LootContext-for-criterions.patch} (100%) rename patches/server/{0939-Don-t-fire-sync-events-during-worldgen.patch => 0938-Don-t-fire-sync-events-during-worldgen.patch} (100%) rename patches/server/{0940-Add-Structure-check-API.patch => 0939-Add-Structure-check-API.patch} (100%) rename patches/server/{0941-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch => 0940-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch} (100%) rename patches/server/{0942-Restore-vanilla-entity-drops-behavior.patch => 0941-Restore-vanilla-entity-drops-behavior.patch} (100%) rename patches/server/{0943-Dont-resend-blocks-on-interactions.patch => 0942-Dont-resend-blocks-on-interactions.patch} (100%) rename patches/server/{0944-add-more-scoreboard-API.patch => 0943-add-more-scoreboard-API.patch} (100%) rename patches/server/{0945-Improve-Registry.patch => 0944-Improve-Registry.patch} (100%) rename patches/server/{0946-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch => 0945-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch} (100%) rename patches/server/{0947-Add-experience-points-API.patch => 0946-Add-experience-points-API.patch} (100%) rename patches/server/{0948-Add-drops-to-shear-events.patch => 0947-Add-drops-to-shear-events.patch} (90%) rename patches/server/{0949-Add-PlayerShieldDisableEvent.patch => 0948-Add-PlayerShieldDisableEvent.patch} (100%) rename patches/server/{0950-Validate-ResourceLocation-in-NBT-reading.patch => 0949-Validate-ResourceLocation-in-NBT-reading.patch} (100%) rename patches/server/{0951-Properly-handle-experience-dropping-on-block-break.patch => 0950-Properly-handle-experience-dropping-on-block-break.patch} (100%) rename patches/server/{0952-Fixup-NamespacedKey-handling.patch => 0951-Fixup-NamespacedKey-handling.patch} (100%) rename patches/server/{0953-Expose-LootTable-of-DecoratedPot.patch => 0952-Expose-LootTable-of-DecoratedPot.patch} (100%) rename patches/server/{0954-Reduce-allocation-of-Vec3D-by-entity-tracker.patch => 0953-Reduce-allocation-of-Vec3D-by-entity-tracker.patch} (100%) rename patches/server/{0955-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch => 0954-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch} (100%) rename patches/server/{0956-Add-ShulkerDuplicateEvent.patch => 0955-Add-ShulkerDuplicateEvent.patch} (100%) rename patches/server/{0957-Add-api-for-spawn-egg-texture-colors.patch => 0956-Add-api-for-spawn-egg-texture-colors.patch} (100%) rename patches/server/{0958-Add-Lifecycle-Event-system.patch => 0957-Add-Lifecycle-Event-system.patch} (100%) rename patches/server/{0959-ItemStack-Tooltip-API.patch => 0958-ItemStack-Tooltip-API.patch} (100%) rename patches/server/{0960-Add-getChunkSnapshot-includeLightData-parameter.patch => 0959-Add-getChunkSnapshot-includeLightData-parameter.patch} (100%) rename patches/server/{0961-Add-FluidState-API.patch => 0960-Add-FluidState-API.patch} (100%) rename patches/server/{0962-add-number-format-api.patch => 0961-add-number-format-api.patch} (100%) rename patches/server/{0963-improve-BanList-types.patch => 0962-improve-BanList-types.patch} (100%) rename patches/server/{0964-Expanded-Hopper-API.patch => 0963-Expanded-Hopper-API.patch} (100%) rename patches/server/{0965-Add-BlockBreakProgressUpdateEvent.patch => 0964-Add-BlockBreakProgressUpdateEvent.patch} (100%) rename patches/server/{0966-Deprecate-ItemStack-setType.patch => 0965-Deprecate-ItemStack-setType.patch} (100%) rename patches/server/{0967-Add-CartographyItemEvent.patch => 0966-Add-CartographyItemEvent.patch} (100%) rename patches/server/{0968-More-Raid-API.patch => 0967-More-Raid-API.patch} (100%) rename patches/server/{0969-Add-onboarding-message-for-initial-server-start.patch => 0968-Add-onboarding-message-for-initial-server-start.patch} (100%) rename patches/server/{0970-Configurable-max-block-fluid-ticks.patch => 0969-Configurable-max-block-fluid-ticks.patch} (100%) rename patches/server/{0971-Fix-bees-aging-inside-hives.patch => 0970-Fix-bees-aging-inside-hives.patch} (100%) rename patches/server/{0972-Disable-memory-reserve-allocating.patch => 0971-Disable-memory-reserve-allocating.patch} (100%) rename patches/server/{0973-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch => 0972-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch} (100%) rename patches/server/{0974-Fix-DamageSource-API.patch => 0973-Fix-DamageSource-API.patch} (100%) rename patches/server/{0975-Fix-creation-of-invalid-block-entity-during-world-ge.patch => 0974-Fix-creation-of-invalid-block-entity-during-world-ge.patch} (100%) rename patches/server/{0976-Fix-possible-StackOverflowError-for-some-dispenses.patch => 0975-Fix-possible-StackOverflowError-for-some-dispenses.patch} (100%) rename patches/server/{0977-Improve-tag-parser-handling.patch => 0976-Improve-tag-parser-handling.patch} (100%) rename patches/server/{0978-Item-Mutation-Fixes.patch => 0977-Item-Mutation-Fixes.patch} (100%) rename patches/server/{0979-Per-world-ticks-per-spawn-settings.patch => 0978-Per-world-ticks-per-spawn-settings.patch} (100%) rename patches/server/{0980-Properly-track-the-changed-item-from-dispense-events.patch => 0979-Properly-track-the-changed-item-from-dispense-events.patch} (100%) rename patches/server/{0981-Rewrite-dataconverter-system.patch => 0980-Rewrite-dataconverter-system.patch} (100%) rename patches/server/{0982-Suspicious-Effect-Entry-API.patch => 0981-Suspicious-Effect-Entry-API.patch} (100%) rename patches/server/{0983-check-if-itemstack-is-stackable-first.patch => 0982-check-if-itemstack-is-stackable-first.patch} (100%) rename patches/server/{0984-disable-forced-empty-world-ticks.patch => 0983-disable-forced-empty-world-ticks.patch} (100%) rename patches/server/{0985-Starlight.patch => 0984-Starlight.patch} (100%) rename patches/server/{0986-Rewrite-chunk-system.patch => 0985-Rewrite-chunk-system.patch} (100%) rename patches/server/{0987-incremental-chunk-and-player-saving.patch => 0986-incremental-chunk-and-player-saving.patch} (100%) rename patches/server/{0988-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch => 0987-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch} (100%) rename patches/server/{0989-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch => 0988-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch} (100%) rename patches/server/{0990-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch => 0989-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch} (100%) rename patches/server/{0991-Optimize-Network-Manager-and-add-advanced-packet-sup.patch => 0990-Optimize-Network-Manager-and-add-advanced-packet-sup.patch} (100%) rename patches/server/{0992-Allow-Saving-of-Oversized-Chunks.patch => 0991-Allow-Saving-of-Oversized-Chunks.patch} (100%) rename patches/server/{0993-Fix-World-isChunkGenerated-calls.patch => 0992-Fix-World-isChunkGenerated-calls.patch} (100%) rename patches/server/{0994-Flat-bedrock-generator-settings.patch => 0993-Flat-bedrock-generator-settings.patch} (100%) rename patches/server/{0995-Entity-Activation-Range-2.0.patch => 0994-Entity-Activation-Range-2.0.patch} (100%) rename patches/server/{0996-Optional-per-player-mob-spawns.patch => 0995-Optional-per-player-mob-spawns.patch} (100%) rename patches/server/{0997-Anti-Xray.patch => 0996-Anti-Xray.patch} (100%) rename patches/server/{0998-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch => 0997-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch} (100%) rename patches/server/{0999-Optimize-Collision-to-not-load-chunks.patch => 0998-Optimize-Collision-to-not-load-chunks.patch} (100%) rename patches/server/{1000-Optimize-GoalSelector-Goal.Flag-Set-operations.patch => 0999-Optimize-GoalSelector-Goal.Flag-Set-operations.patch} (100%) rename patches/server/{1001-Entity-load-save-limit-per-chunk.patch => 1000-Entity-load-save-limit-per-chunk.patch} (100%) rename patches/server/{1002-Improved-Watchdog-Support.patch => 1001-Improved-Watchdog-Support.patch} (100%) rename patches/server/{1003-Optimize-Voxel-Shape-Merging.patch => 1002-Optimize-Voxel-Shape-Merging.patch} (100%) rename patches/server/{1004-Write-SavedData-IO-async.patch => 1003-Write-SavedData-IO-async.patch} (100%) rename patches/server/{1005-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch => 1004-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch} (100%) rename patches/server/{1006-Use-distance-map-to-optimise-entity-tracker.patch => 1005-Use-distance-map-to-optimise-entity-tracker.patch} (100%) rename patches/server/{1007-Optimize-Bit-Operations-by-inlining.patch => 1006-Optimize-Bit-Operations-by-inlining.patch} (100%) rename patches/server/{1008-Remove-streams-from-hot-code.patch => 1007-Remove-streams-from-hot-code.patch} (100%) rename patches/server/{1009-Eigencraft-redstone-implementation.patch => 1008-Eigencraft-redstone-implementation.patch} (100%) rename patches/server/{1010-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch => 1009-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch} (100%) rename patches/server/{1011-Improve-boat-collision-performance.patch => 1010-Improve-boat-collision-performance.patch} (100%) rename patches/server/{1012-Optimise-general-POI-access.patch => 1011-Optimise-general-POI-access.patch} (100%) rename patches/server/{1013-Custom-table-implementation-for-blockstate-state-loo.patch => 1012-Custom-table-implementation-for-blockstate-state-loo.patch} (100%) rename patches/server/{1014-Execute-chunk-tasks-mid-tick.patch => 1013-Execute-chunk-tasks-mid-tick.patch} (100%) rename patches/server/{1015-Optimise-random-block-ticking.patch => 1014-Optimise-random-block-ticking.patch} (100%) rename patches/server/{1016-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch => 1015-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch} (100%) rename patches/server/{1017-Use-Velocity-compression-and-cipher-natives.patch => 1016-Use-Velocity-compression-and-cipher-natives.patch} (100%) rename patches/server/{1018-Detail-more-information-in-watchdog-dumps.patch => 1017-Detail-more-information-in-watchdog-dumps.patch} (100%) rename patches/server/{1019-Collision-optimisations.patch => 1018-Collision-optimisations.patch} (100%) rename patches/server/{1020-Optimise-collision-checking-in-player-move-packet-ha.patch => 1019-Optimise-collision-checking-in-player-move-packet-ha.patch} (100%) rename patches/server/{1021-Fix-tripwire-disarming-not-working-as-intended.patch => 1020-Fix-tripwire-disarming-not-working-as-intended.patch} (100%) rename patches/server/{1022-Fix-entity-type-tags-suggestions-in-selectors.patch => 1021-Fix-entity-type-tags-suggestions-in-selectors.patch} (100%) rename patches/server/{1023-Add-Alternate-Current-redstone-implementation.patch => 1022-Add-Alternate-Current-redstone-implementation.patch} (100%) rename patches/server/{1024-optimize-dirt-and-snow-spreading.patch => 1023-optimize-dirt-and-snow-spreading.patch} (100%) rename patches/server/{1025-Properly-resend-entities.patch => 1024-Properly-resend-entities.patch} (100%) rename patches/server/{1026-Optimize-Hoppers.patch => 1025-Optimize-Hoppers.patch} (100%) rename patches/server/{1027-Improve-performance-of-mass-crafts.patch => 1026-Improve-performance-of-mass-crafts.patch} (100%) rename patches/server/{1028-Actually-optimise-explosions.patch => 1027-Actually-optimise-explosions.patch} (100%) rename patches/server/{1029-Optimise-chunk-tick-iteration.patch => 1028-Optimise-chunk-tick-iteration.patch} (100%) rename patches/server/{1030-Lag-compensation-ticks.patch => 1029-Lag-compensation-ticks.patch} (100%) rename patches/server/{1031-Optimise-nearby-player-retrieval.patch => 1030-Optimise-nearby-player-retrieval.patch} (100%) rename patches/server/{1032-Distance-manager-tick-timings.patch => 1031-Distance-manager-tick-timings.patch} (100%) rename patches/server/{1033-Handle-Oversized-block-entities-in-chunks.patch => 1032-Handle-Oversized-block-entities-in-chunks.patch} (100%) rename patches/server/{1034-Send-full-pos-packets-for-hard-colliding-entities.patch => 1033-Send-full-pos-packets-for-hard-colliding-entities.patch} (100%) rename patches/server/{1035-Fix-and-optimise-world-force-upgrading.patch => 1034-Fix-and-optimise-world-force-upgrading.patch} (100%) rename patches/server/{1036-API-for-checking-sent-chunks.patch => 1035-API-for-checking-sent-chunks.patch} (100%) create mode 100644 patches/server/1036-Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch create mode 100644 patches/server/1037-handle-converting-old-serialized-names-to-new-names.patch diff --git a/patches/api/0153-Add-Material-Tags.patch b/patches/api/0153-Add-Material-Tags.patch index 87e49d154c..9c8781e5b6 100644 --- a/patches/api/0153-Add-Material-Tags.patch +++ b/patches/api/0153-Add-Material-Tags.patch @@ -115,7 +115,7 @@ index 0000000000000000000000000000000000000000..a02a02aa0c87e0f0ed9e509e4dcab015 +} diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java new file mode 100644 -index 0000000000000000000000000000000000000000..6dc176b694ff4f50ca4b665c3cf82212cf21f16f +index 0000000000000000000000000000000000000000..be212b4fbeabab32a4dab6ae554768c368efaa88 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java @@ -0,0 +1,717 @@ @@ -438,7 +438,7 @@ index 0000000000000000000000000000000000000000..6dc176b694ff4f50ca4b665c3cf82212 + */ + public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs")) + .endsWith("_SPAWN_EGG") -+ .ensureSize("SPAWN_EGGS", 78).lock(); ++ .ensureSize("SPAWN_EGGS", 80).lock(); + + /** + * Covers all colors of stained glass. diff --git a/patches/api/0254-Add-missing-effects.patch b/patches/api/0254-Add-missing-effects.patch index 63710b51cc..1bda7a8851 100644 --- a/patches/api/0254-Add-missing-effects.patch +++ b/patches/api/0254-Add-missing-effects.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing effects Co-authored-by: Jake Potrebic diff --git a/src/main/java/org/bukkit/Effect.java b/src/main/java/org/bukkit/Effect.java -index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..2d50f5e3f95e280ae5741514d5eba6440d9966ce 100644 +index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..326c99d91ae125b28054b5730b9576b214e4595e 100644 --- a/src/main/java/org/bukkit/Effect.java +++ b/src/main/java/org/bukkit/Effect.java @@ -131,9 +131,9 @@ public enum Effect { @@ -21,7 +21,17 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..2d50f5e3f95e280ae5741514d5eba644 * additional info. */ POTION_BREAK(2002, Type.VISUAL, Color.class), -@@ -336,21 +336,146 @@ public enum Effect { +@@ -177,7 +177,9 @@ public enum Effect { + /** + * Particles displayed when a villager grows a plant, data + * is the number of particles ++ * @deprecated partially replaced by {@link #BEE_GROWTH} + */ ++ @Deprecated(forRemoval = true, since = "1.20.5") // Paper + VILLAGER_PLANT_GROW(2005, Type.VISUAL, Integer.class), + /** + * The sound/particles used by the enderdragon's breath +@@ -336,21 +338,152 @@ public enum Effect { * block. */ OXIDISED_COPPER_SCRAPE(3005, Type.VISUAL), @@ -128,6 +138,11 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..2d50f5e3f95e280ae5741514d5eba644 + */ + SHOOT_WHITE_SMOKE(2010, Type.VISUAL, BlockFace.class), + ++ /** ++ * {@link Integer} param is the number of particles ++ */ ++ BEE_GROWTH(2011, Type.VISUAL, Integer.class), ++ + PARTICLES_SCULK_CHARGE(3006, Type.VISUAL, Integer.class), + + PARTICLES_SCULK_SHRIEK(3007, Type.SOUND), @@ -136,6 +151,7 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..2d50f5e3f95e280ae5741514d5eba644 + + PARTICLES_EGG_CRACK(3009, Type.VISUAL), + ++ @Deprecated(forRemoval = true, since = "1.20.5") + GUST_DUST(3010, Type.VISUAL), + + TRIAL_SPAWNER_SPAWN(3011, Type.VISUAL), @@ -172,7 +188,7 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..2d50f5e3f95e280ae5741514d5eba644 } /** -@@ -366,8 +491,10 @@ public enum Effect { +@@ -366,8 +499,10 @@ public enum Effect { /** * @return The type of the effect. @@ -183,7 +199,7 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..2d50f5e3f95e280ae5741514d5eba644 public Type getType() { return this.type; } -@@ -378,8 +505,15 @@ public enum Effect { +@@ -378,8 +513,15 @@ public enum Effect { */ @Nullable public Class getData() { @@ -200,7 +216,7 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..2d50f5e3f95e280ae5741514d5eba644 /** * Gets the Effect associated with the given ID. -@@ -396,12 +530,26 @@ public enum Effect { +@@ -396,12 +538,26 @@ public enum Effect { static { for (Effect effect : values()) { diff --git a/patches/server/0420-Add-methods-to-get-translation-keys.patch b/patches/server/0420-Add-methods-to-get-translation-keys.patch index cb88aca4df..e61dce6cd3 100644 --- a/patches/server/0420-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0420-Add-methods-to-get-translation-keys.patch @@ -5,7 +5,8 @@ Subject: [PATCH] Add methods to get translation keys == AT == public org.bukkit.craftbukkit.inventory.CraftMetaFirework -public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/FireworkEffect$Type;)I +public org.bukkit.craftbukkit.inventory.CraftMetaFirework power +public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/FireworkEffect$Type;)Lnet/minecraft/world/item/component/FireworkExplosion$Shape; Co-authored-by: MeFisto94 @@ -40,8 +41,21 @@ index d839a0edf31f6803e5813b28a23fa17e20916b2c..bb8a3e670924ebcce48669c5dce57e2d // Paper end @Override +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +index ebdb19d7ee0460d50c082b0a41b3a6a57a3534ee..b444bd26d6c3def3494d3cc0520e462408272be3 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java +@@ -111,7 +111,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta { + return new FireworkExplosion(CraftMetaFirework.getNBT(effect.getType()), colors, fadeColors, effect.hasTrail(), effect.hasFlicker()); + } + +- static FireworkExplosion.Shape getNBT(Type type) { ++ public static FireworkExplosion.Shape getNBT(Type type) { // Paper - package-private -> public + switch (type) { + case BALL: + return FireworkExplosion.Shape.SMALL_BALL; diff --git a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java b/src/test/java/io/papermc/paper/world/TranslationKeyTest.java -index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..dbd1dc4453bd26fb6116b62f6ccbf69e92e09fc4 100644 +index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..441e8fbd548e425ca9b0dfd69d08f7b83081888c 100644 --- a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java +++ b/src/test/java/io/papermc/paper/world/TranslationKeyTest.java @@ -1,12 +1,27 @@ @@ -73,7 +87,7 @@ index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..dbd1dc4453bd26fb6116b62f6ccbf69e @Test public void testChatVisibilityKeys() { -@@ -15,4 +30,67 @@ public class TranslationKeyTest { +@@ -15,4 +30,69 @@ public class TranslationKeyTest { Assertions.assertEquals(ChatVisiblity.valueOf(chatVisibility.name()).getKey(), chatVisibility.translationKey(), chatVisibility + "'s translation key doesn't match"); } } @@ -101,8 +115,10 @@ index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..dbd1dc4453bd26fb6116b62f6ccbf69e + + @Test + public void testFireworkEffectType() { -+ for (FireworkEffect.Type type : FireworkEffect.Type.values()) { -+ Assertions.assertEquals(net.minecraft.world.item.FireworkRocketItem.Shape.byId(org.bukkit.craftbukkit.inventory.CraftMetaFirework.getNBT(type)).getName(), org.bukkit.FireworkEffect.Type.NAMES.key(type), "translation key mismatch for " + type); ++ for (final FireworkEffect.Type type : FireworkEffect.Type.values()) { ++ final net.minecraft.world.item.component.FireworkExplosion.Shape nmsType = org.bukkit.craftbukkit.inventory.CraftMetaFirework.getNBT(type); ++ Assertions.assertTrue(nmsType.getName().getContents() instanceof TranslatableContents, "contents aren't translatable"); ++ Assertions.assertEquals(((TranslatableContents) nmsType.getName().getContents()).getKey(), type.translationKey(), "translation key mismatch for " + type); + } + } + diff --git a/patches/server/0456-Add-missing-default-perms-for-commands.patch b/patches/server/0456-Add-missing-default-perms-for-commands.patch index c2cc3ce8cc..d49628ee32 100644 --- a/patches/server/0456-Add-missing-default-perms-for-commands.patch +++ b/patches/server/0456-Add-missing-default-perms-for-commands.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add missing default perms for commands diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java -index a9ea2e38e4673686c9994a58c94ad19e59fd423c..dd95b3bfe59f2bb635afe92317288efcd2986326 100644 +index a9ea2e38e4673686c9994a58c94ad19e59fd423c..52649f82351ab4f675c3cc3cd6640956b0f76b91 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java +++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java -@@ -24,13 +24,74 @@ public final class CommandPermissions { +@@ -24,13 +24,75 @@ public final class CommandPermissions { DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "stop", "Allows the user to stop the server", PermissionDefault.OP, commands); DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "list", "Allows the user to list all online players", PermissionDefault.OP, commands); DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "gamemode", "Allows the user to change the gamemode of another player", PermissionDefault.OP, commands); @@ -75,6 +75,7 @@ index a9ea2e38e4673686c9994a58c94ad19e59fd423c..dd95b3bfe59f2bb635afe92317288efc + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "time", "Allows the user to change or query the world's game time", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "tick", "Allows the user to control the tick rate of the server", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "title", "Allows the user to manage screen titles", PermissionDefault.OP, commands); ++ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "transfer", "Allows the user to transfer to another server", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "weather", "Allows the user to set the weather", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "whitelist", "Allows the user to manage the server whitelist", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "worldborder", "Allows the user to manage the world border", PermissionDefault.OP, commands); @@ -87,7 +88,7 @@ index a9ea2e38e4673686c9994a58c94ad19e59fd423c..dd95b3bfe59f2bb635afe92317288efc diff --git a/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java new file mode 100644 -index 0000000000000000000000000000000000000000..afeb4271fffb7546209f1e651214065187c88302 +index 0000000000000000000000000000000000000000..ca71c688b37ce2c8b712a4f9216cf872c8edf78e --- /dev/null +++ b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java @@ -0,0 +1,82 @@ @@ -132,7 +133,7 @@ index 0000000000000000000000000000000000000000..afeb4271fffb7546209f1e6512140651 + CraftDefaultPermissions.registerCorePermissions(); + Set perms = collectMinecraftCommandPerms(); + -+ Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.configurable(AbstractTestingBase.REGISTRY_CUSTOM, FeatureFlags.VANILLA_SET)); ++ Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.simple(AbstractTestingBase.REGISTRY_CUSTOM, FeatureFlags.VANILLA_SET)); + RootCommandNode root = commands.getDispatcher().getRoot(); + Set missing = new LinkedHashSet<>(); + Set foundPerms = new HashSet<>(); diff --git a/patches/server/0520-Item-Rarity-API.patch b/patches/server/0520-Item-Rarity-API.patch index 789b4967f0..0939bc6a87 100644 --- a/patches/server/0520-Item-Rarity-API.patch +++ b/patches/server/0520-Item-Rarity-API.patch @@ -33,7 +33,7 @@ index c0592a85a1a0781b83232533b9ca1b30b116eb98..125ed63d8ae812284cd452b4387fd0d6 /** diff --git a/src/test/java/io/papermc/paper/inventory/ItemRarityTest.java b/src/test/java/io/papermc/paper/inventory/ItemRarityTest.java new file mode 100644 -index 0000000000000000000000000000000000000000..d310f86c57e4521ad7666d3f738f53ac83d221f2 +index 0000000000000000000000000000000000000000..8086e6a754cb94ce15428ac0cdbaa43590beb9fe --- /dev/null +++ b/src/test/java/io/papermc/paper/inventory/ItemRarityTest.java @@ -0,0 +1,24 @@ @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..d310f86c57e4521ad7666d3f738f53ac + @Test + public void testRarityFormatting() { + for (Rarity nmsRarity : Rarity.values()) { -+ assertEquals(nmsRarity.color, PaperAdventure.asVanilla(ItemRarity.values()[nmsRarity.ordinal()].color), "rarity formatting is mis-matched"); ++ assertEquals(nmsRarity.color(), PaperAdventure.asVanilla(ItemRarity.values()[nmsRarity.ordinal()].color), "rarity formatting is mis-matched"); + } + } +} diff --git a/patches/server/0552-More-Enchantment-API.patch b/patches/server/0552-More-Enchantment-API.patch index 5fa7b54c59..81b0f3ac5e 100644 --- a/patches/server/0552-More-Enchantment-API.patch +++ b/patches/server/0552-More-Enchantment-API.patch @@ -85,43 +85,3 @@ index bb8a3e670924ebcce48669c5dce57e2df03fad77..bb45dde0fd91796d5fd83a5fd20f5f1d // Paper end @Override -diff --git a/src/test/java/io/papermc/paper/entity/EntityCategoryTest.java b/src/test/java/io/papermc/paper/entity/EntityCategoryTest.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4ee48ef89f0e31a7bda4b04453fca8177874f540 ---- /dev/null -+++ b/src/test/java/io/papermc/paper/entity/EntityCategoryTest.java -@@ -0,0 +1,34 @@ -+package io.papermc.paper.entity; -+ -+import com.google.common.base.Joiner; -+import com.google.common.collect.Maps; -+import com.google.common.collect.Sets; -+import net.minecraft.world.entity.MobType; -+import org.bukkit.craftbukkit.entity.CraftLivingEntity; -+import org.bukkit.entity.EntityCategory; -+import org.junit.jupiter.api.Test; -+ -+import java.lang.reflect.Field; -+import java.util.Map; -+import java.util.Set; -+ -+import static org.junit.jupiter.api.Assertions.assertTrue; -+ -+public class EntityCategoryTest { -+ -+ @Test -+ public void test() throws IllegalAccessException { -+ -+ Map enumMonsterTypeFieldMap = Maps.newHashMap(); -+ for (Field field : MobType.class.getDeclaredFields()) { -+ if (field.getType() == MobType.class) { -+ enumMonsterTypeFieldMap.put( (MobType) field.get(null), field.getName()); -+ } -+ } -+ -+ for (EntityCategory entityCategory : EntityCategory.values()) { -+ enumMonsterTypeFieldMap.remove(CraftLivingEntity.fromBukkitEntityCategory(entityCategory)); -+ } -+ assertTrue(enumMonsterTypeFieldMap.size() == 0, MobType.class.getName() + " instance(s): " + Joiner.on(", ").join(enumMonsterTypeFieldMap.values()) + " do not have bukkit equivalents"); -+ } -+} diff --git a/patches/server/0885-Bandaid-fix-for-Effect.patch b/patches/server/0885-Bandaid-fix-for-Effect.patch index 8700267771..3ae9b87f07 100644 --- a/patches/server/0885-Bandaid-fix-for-Effect.patch +++ b/patches/server/0885-Bandaid-fix-for-Effect.patch @@ -9,19 +9,20 @@ upstream. Until then, this test and these fixes should address all the known issues with them diff --git a/src/main/java/org/bukkit/craftbukkit/CraftEffect.java b/src/main/java/org/bukkit/craftbukkit/CraftEffect.java -index 71733f918ed84b9879ac1b142ef6205c5e768a9c..7ee13c0a0cd12979c7f8cc2e403baf9300fd61c8 100644 +index 71733f918ed84b9879ac1b142ef6205c5e768a9c..239bbc2f5d2010e203eda2750777e507fc5937d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftEffect.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftEffect.java -@@ -15,6 +15,8 @@ public class CraftEffect { +@@ -15,6 +15,9 @@ public class CraftEffect { public static int getDataValue(Effect effect, T data) { int datavalue; switch (effect) { + case PARTICLES_SCULK_CHARGE: // Paper - add missing effects + case TRIAL_SPAWNER_DETECT_PLAYER: // Paper - add missing effects ++ case BEE_GROWTH: // Paper - add missing effects case VILLAGER_PLANT_GROW: datavalue = (Integer) data; break; -@@ -26,6 +28,13 @@ public class CraftEffect { +@@ -26,6 +29,13 @@ public class CraftEffect { Preconditions.checkArgument(data == Material.AIR || ((Material) data).isRecord(), "Invalid record type for Material %s!", data); datavalue = Item.getId(CraftItemType.bukkitToMinecraft((Material) data)); break; @@ -35,7 +36,7 @@ index 71733f918ed84b9879ac1b142ef6205c5e768a9c..7ee13c0a0cd12979c7f8cc2e403baf93 case SMOKE: switch ((BlockFace) data) { case DOWN: -@@ -57,8 +66,15 @@ public class CraftEffect { +@@ -57,8 +67,15 @@ public class CraftEffect { } break; case STEP_SOUND: @@ -79,24 +80,28 @@ index 1c264135c34117407bfbb2d230e2ea1f9ebd0671..463b24fd34f76632b590ad659676ba49 Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect); diff --git a/src/test/java/org/bukkit/EffectTest.java b/src/test/java/org/bukkit/EffectTest.java new file mode 100644 -index 0000000000000000000000000000000000000000..875eacc2e5776901ba8593d0183844db2571f71b +index 0000000000000000000000000000000000000000..eaccc9a154ff2f498d765a2932b6f3edb449f4f7 --- /dev/null +++ b/src/test/java/org/bukkit/EffectTest.java -@@ -0,0 +1,64 @@ +@@ -0,0 +1,79 @@ +package org.bukkit; + ++import com.google.common.base.Joiner; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.HashMap; ++import java.util.HashSet; +import java.util.List; +import java.util.Map; ++import java.util.Set; +import net.minecraft.world.level.block.LevelEvent; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; ++import static org.junit.jupiter.api.Assertions.fail; + +public class EffectTest { + @@ -125,12 +130,17 @@ index 0000000000000000000000000000000000000000..875eacc2e5776901ba8593d0183844db + } + } + ++ final Set missingEvents = new HashSet<>(); + for (final Integer event : collectNmsLevelEvents()) { -+ assertNotNull(toId.get(event), "missing API Effect: " + event); ++ if (toId.get(event) == null) { ++ missingEvents.add(event); ++ } ++ } ++ if (!missingEvents.isEmpty()) { ++ fail("Missing API Effects:\n" + Joiner.on("\n").join(missingEvents)); + } + } + -+ @SuppressWarnings("deprecation") + @Test + public void checkNoExtraApi() throws ReflectiveOperationException { + Map toId = new HashMap<>(); @@ -142,8 +152,14 @@ index 0000000000000000000000000000000000000000..875eacc2e5776901ba8593d0183844db + } + + final List nmsEvents = collectNmsLevelEvents(); ++ final Set extraApiEffects = new HashSet<>(); + for (final Map.Entry entry : toId.entrySet()) { -+ assertTrue(nmsEvents.contains(entry.getKey()), "Extra API Effect: " + entry.getValue()); ++ if (!nmsEvents.contains(entry.getKey())) { ++ extraApiEffects.add(entry.getValue()); ++ } ++ } ++ if (!extraApiEffects.isEmpty()) { ++ fail("Extra API Effects:\n" + Joiner.on("\n").join(extraApiEffects)); + } + } +} diff --git a/patches/server/0932-Add-MaterialTagsTest.patch b/patches/server/0932-Add-MaterialTagsTest.patch deleted file mode 100644 index 34233ba1ca..0000000000 --- a/patches/server/0932-Add-MaterialTagsTest.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Sat, 4 Nov 2023 18:39:18 -0400 -Subject: [PATCH] Add MaterialTagsTest - - -diff --git a/src/test/java/io/papermc/paper/inventory/item/MaterialTagsTest.java b/src/test/java/io/papermc/paper/inventory/item/MaterialTagsTest.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3f2734eae2053b4b8fccd7149178699e36ce8b78 ---- /dev/null -+++ b/src/test/java/io/papermc/paper/inventory/item/MaterialTagsTest.java -@@ -0,0 +1,46 @@ -+package io.papermc.paper.inventory.item; -+ -+import com.destroystokyo.paper.MaterialTags; -+import it.unimi.dsi.fastutil.objects.ObjectArrayList; -+import java.util.List; -+import java.util.stream.Collectors; -+import java.util.stream.Stream; -+import net.minecraft.core.registries.BuiltInRegistries; -+import net.minecraft.world.item.Item; -+import net.minecraft.world.item.enchantment.EnchantmentCategory; -+import org.bukkit.craftbukkit.util.CraftMagicNumbers; -+import org.bukkit.support.AbstractTestingBase; -+import org.jetbrains.annotations.NotNull; -+import org.junit.jupiter.api.Assertions; -+import org.junit.jupiter.params.ParameterizedTest; -+import org.junit.jupiter.params.provider.MethodSource; -+ -+public class MaterialTagsTest extends AbstractTestingBase { -+ -+ private final static EnchantmentCategory[] ENCHANTMENT_CATEGORIES = EnchantmentCategory.values(); -+ -+ @ParameterizedTest -+ @MethodSource("items") -+ public void testEnchantables(@NotNull final Item item) { -+ final List enchantableCategories = new ObjectArrayList<>(); -+ for (final EnchantmentCategory enchantmentCategory : ENCHANTMENT_CATEGORIES) { -+ if (enchantmentCategory.canEnchant(item)) enchantableCategories.add(enchantmentCategory); -+ } -+ -+ final boolean taggedAsEnchantable = MaterialTags.ENCHANTABLE.isTagged(CraftMagicNumbers.getMaterial(item)); -+ final boolean requiresTagByInternals = !enchantableCategories.isEmpty(); -+ Assertions.assertEquals( -+ requiresTagByInternals, -+ taggedAsEnchantable, -+ () -> "%s matches enchantment categories [%s] but was tagged by material tags as enchantable: %s".formatted( -+ item.getDescriptionId(), -+ enchantableCategories.stream().map(Enum::name).collect(Collectors.joining(", ")), -+ taggedAsEnchantable -+ ) -+ ); -+ } -+ -+ private static Stream items() { -+ return BuiltInRegistries.ITEM.stream(); -+ } -+} diff --git a/patches/server/0933-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/0932-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch similarity index 100% rename from patches/server/0933-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch rename to patches/server/0932-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch diff --git a/patches/server/0934-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/server/0933-Add-hand-to-fish-event-for-all-player-interactions.patch similarity index 100% rename from patches/server/0934-Add-hand-to-fish-event-for-all-player-interactions.patch rename to patches/server/0933-Add-hand-to-fish-event-for-all-player-interactions.patch diff --git a/patches/server/0935-Fix-several-issues-with-EntityBreedEvent.patch b/patches/server/0934-Fix-several-issues-with-EntityBreedEvent.patch similarity index 100% rename from patches/server/0935-Fix-several-issues-with-EntityBreedEvent.patch rename to patches/server/0934-Fix-several-issues-with-EntityBreedEvent.patch diff --git a/patches/server/0936-Add-UUID-attribute-modifier-API.patch b/patches/server/0935-Add-UUID-attribute-modifier-API.patch similarity index 100% rename from patches/server/0936-Add-UUID-attribute-modifier-API.patch rename to patches/server/0935-Add-UUID-attribute-modifier-API.patch diff --git a/patches/server/0937-Fix-missing-event-call-for-entity-teleport-API.patch b/patches/server/0936-Fix-missing-event-call-for-entity-teleport-API.patch similarity index 100% rename from patches/server/0937-Fix-missing-event-call-for-entity-teleport-API.patch rename to patches/server/0936-Fix-missing-event-call-for-entity-teleport-API.patch diff --git a/patches/server/0938-Lazily-create-LootContext-for-criterions.patch b/patches/server/0937-Lazily-create-LootContext-for-criterions.patch similarity index 100% rename from patches/server/0938-Lazily-create-LootContext-for-criterions.patch rename to patches/server/0937-Lazily-create-LootContext-for-criterions.patch diff --git a/patches/server/0939-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0938-Don-t-fire-sync-events-during-worldgen.patch similarity index 100% rename from patches/server/0939-Don-t-fire-sync-events-during-worldgen.patch rename to patches/server/0938-Don-t-fire-sync-events-during-worldgen.patch diff --git a/patches/server/0940-Add-Structure-check-API.patch b/patches/server/0939-Add-Structure-check-API.patch similarity index 100% rename from patches/server/0940-Add-Structure-check-API.patch rename to patches/server/0939-Add-Structure-check-API.patch diff --git a/patches/server/0941-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0940-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch similarity index 100% rename from patches/server/0941-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch rename to patches/server/0940-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch diff --git a/patches/server/0942-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0941-Restore-vanilla-entity-drops-behavior.patch similarity index 100% rename from patches/server/0942-Restore-vanilla-entity-drops-behavior.patch rename to patches/server/0941-Restore-vanilla-entity-drops-behavior.patch diff --git a/patches/server/0943-Dont-resend-blocks-on-interactions.patch b/patches/server/0942-Dont-resend-blocks-on-interactions.patch similarity index 100% rename from patches/server/0943-Dont-resend-blocks-on-interactions.patch rename to patches/server/0942-Dont-resend-blocks-on-interactions.patch diff --git a/patches/server/0944-add-more-scoreboard-API.patch b/patches/server/0943-add-more-scoreboard-API.patch similarity index 100% rename from patches/server/0944-add-more-scoreboard-API.patch rename to patches/server/0943-add-more-scoreboard-API.patch diff --git a/patches/server/0945-Improve-Registry.patch b/patches/server/0944-Improve-Registry.patch similarity index 100% rename from patches/server/0945-Improve-Registry.patch rename to patches/server/0944-Improve-Registry.patch diff --git a/patches/server/0946-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/0945-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch similarity index 100% rename from patches/server/0946-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch rename to patches/server/0945-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch diff --git a/patches/server/0947-Add-experience-points-API.patch b/patches/server/0946-Add-experience-points-API.patch similarity index 100% rename from patches/server/0947-Add-experience-points-API.patch rename to patches/server/0946-Add-experience-points-API.patch diff --git a/patches/server/0948-Add-drops-to-shear-events.patch b/patches/server/0947-Add-drops-to-shear-events.patch similarity index 90% rename from patches/server/0948-Add-drops-to-shear-events.patch rename to patches/server/0947-Add-drops-to-shear-events.patch index 093e1d3325..2c756b4953 100644 --- a/patches/server/0948-Add-drops-to-shear-events.patch +++ b/patches/server/0947-Add-drops-to-shear-events.patch @@ -232,6 +232,44 @@ index 2de1a2f666da9db1832907e1651dbff948e37252..5c2ed3c39c8eb850f3be1e2ea5b5a7ea } } +diff --git a/src/main/java/net/minecraft/world/entity/monster/Bogged.java b/src/main/java/net/minecraft/world/entity/monster/Bogged.java +index 9c0bfddd479eef688d2509ad700371c3c860ff1a..754eb747179d9318bc5a3883e5622cc400c4e06c 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Bogged.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Bogged.java +@@ -135,6 +135,11 @@ public class Bogged extends AbstractSkeleton implements Shearable { + } + + private void spawnShearedMushrooms() { ++ // Paper start - shear drops API ++ this.generateShearedMushrooms(this::spawnAtLocation); ++ } ++ private void generateShearedMushrooms(java.util.function.Consumer stackConsumer) { ++ // Paper end - shear drops API + if (this.level() instanceof ServerLevel serverLevel && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { + LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable(BuiltInLootTables.BOGGED_SHEAR); + LootParams lootParams = new LootParams.Builder(serverLevel) +@@ -143,11 +148,20 @@ public class Bogged extends AbstractSkeleton implements Shearable { + .create(LootContextParamSets.SHEARING); + + for (ItemStack itemStack : lootTable.getRandomItems(lootParams)) { +- this.spawnAtLocation(itemStack); ++ stackConsumer.accept(itemStack); // Paper + } + } + } + ++ // Paper start - shear drops API ++ @Override ++ public java.util.List generateDefaultDrops() { ++ final java.util.List drops = new java.util.ArrayList<>(); ++ this.generateShearedMushrooms(drops::add); ++ return drops; ++ } ++ // Paper end - shear drops API ++ + @Override + public boolean readyForShearing() { + return !this.isSheared() && this.isAlive(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 822bfebc779646dde655239ac217bad011a9eee4..444287fea080182df533198f5c659533de86c5dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/patches/server/0949-Add-PlayerShieldDisableEvent.patch b/patches/server/0948-Add-PlayerShieldDisableEvent.patch similarity index 100% rename from patches/server/0949-Add-PlayerShieldDisableEvent.patch rename to patches/server/0948-Add-PlayerShieldDisableEvent.patch diff --git a/patches/server/0950-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0949-Validate-ResourceLocation-in-NBT-reading.patch similarity index 100% rename from patches/server/0950-Validate-ResourceLocation-in-NBT-reading.patch rename to patches/server/0949-Validate-ResourceLocation-in-NBT-reading.patch diff --git a/patches/server/0951-Properly-handle-experience-dropping-on-block-break.patch b/patches/server/0950-Properly-handle-experience-dropping-on-block-break.patch similarity index 100% rename from patches/server/0951-Properly-handle-experience-dropping-on-block-break.patch rename to patches/server/0950-Properly-handle-experience-dropping-on-block-break.patch diff --git a/patches/server/0952-Fixup-NamespacedKey-handling.patch b/patches/server/0951-Fixup-NamespacedKey-handling.patch similarity index 100% rename from patches/server/0952-Fixup-NamespacedKey-handling.patch rename to patches/server/0951-Fixup-NamespacedKey-handling.patch diff --git a/patches/server/0953-Expose-LootTable-of-DecoratedPot.patch b/patches/server/0952-Expose-LootTable-of-DecoratedPot.patch similarity index 100% rename from patches/server/0953-Expose-LootTable-of-DecoratedPot.patch rename to patches/server/0952-Expose-LootTable-of-DecoratedPot.patch diff --git a/patches/server/0954-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0953-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 100% rename from patches/server/0954-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/0953-Reduce-allocation-of-Vec3D-by-entity-tracker.patch diff --git a/patches/server/0955-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0954-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch similarity index 100% rename from patches/server/0955-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/0954-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch diff --git a/patches/server/0956-Add-ShulkerDuplicateEvent.patch b/patches/server/0955-Add-ShulkerDuplicateEvent.patch similarity index 100% rename from patches/server/0956-Add-ShulkerDuplicateEvent.patch rename to patches/server/0955-Add-ShulkerDuplicateEvent.patch diff --git a/patches/server/0957-Add-api-for-spawn-egg-texture-colors.patch b/patches/server/0956-Add-api-for-spawn-egg-texture-colors.patch similarity index 100% rename from patches/server/0957-Add-api-for-spawn-egg-texture-colors.patch rename to patches/server/0956-Add-api-for-spawn-egg-texture-colors.patch diff --git a/patches/server/0958-Add-Lifecycle-Event-system.patch b/patches/server/0957-Add-Lifecycle-Event-system.patch similarity index 100% rename from patches/server/0958-Add-Lifecycle-Event-system.patch rename to patches/server/0957-Add-Lifecycle-Event-system.patch diff --git a/patches/server/0959-ItemStack-Tooltip-API.patch b/patches/server/0958-ItemStack-Tooltip-API.patch similarity index 100% rename from patches/server/0959-ItemStack-Tooltip-API.patch rename to patches/server/0958-ItemStack-Tooltip-API.patch diff --git a/patches/server/0960-Add-getChunkSnapshot-includeLightData-parameter.patch b/patches/server/0959-Add-getChunkSnapshot-includeLightData-parameter.patch similarity index 100% rename from patches/server/0960-Add-getChunkSnapshot-includeLightData-parameter.patch rename to patches/server/0959-Add-getChunkSnapshot-includeLightData-parameter.patch diff --git a/patches/server/0961-Add-FluidState-API.patch b/patches/server/0960-Add-FluidState-API.patch similarity index 100% rename from patches/server/0961-Add-FluidState-API.patch rename to patches/server/0960-Add-FluidState-API.patch diff --git a/patches/server/0962-add-number-format-api.patch b/patches/server/0961-add-number-format-api.patch similarity index 100% rename from patches/server/0962-add-number-format-api.patch rename to patches/server/0961-add-number-format-api.patch diff --git a/patches/server/0963-improve-BanList-types.patch b/patches/server/0962-improve-BanList-types.patch similarity index 100% rename from patches/server/0963-improve-BanList-types.patch rename to patches/server/0962-improve-BanList-types.patch diff --git a/patches/server/0964-Expanded-Hopper-API.patch b/patches/server/0963-Expanded-Hopper-API.patch similarity index 100% rename from patches/server/0964-Expanded-Hopper-API.patch rename to patches/server/0963-Expanded-Hopper-API.patch diff --git a/patches/server/0965-Add-BlockBreakProgressUpdateEvent.patch b/patches/server/0964-Add-BlockBreakProgressUpdateEvent.patch similarity index 100% rename from patches/server/0965-Add-BlockBreakProgressUpdateEvent.patch rename to patches/server/0964-Add-BlockBreakProgressUpdateEvent.patch diff --git a/patches/server/0966-Deprecate-ItemStack-setType.patch b/patches/server/0965-Deprecate-ItemStack-setType.patch similarity index 100% rename from patches/server/0966-Deprecate-ItemStack-setType.patch rename to patches/server/0965-Deprecate-ItemStack-setType.patch diff --git a/patches/server/0967-Add-CartographyItemEvent.patch b/patches/server/0966-Add-CartographyItemEvent.patch similarity index 100% rename from patches/server/0967-Add-CartographyItemEvent.patch rename to patches/server/0966-Add-CartographyItemEvent.patch diff --git a/patches/server/0968-More-Raid-API.patch b/patches/server/0967-More-Raid-API.patch similarity index 100% rename from patches/server/0968-More-Raid-API.patch rename to patches/server/0967-More-Raid-API.patch diff --git a/patches/server/0969-Add-onboarding-message-for-initial-server-start.patch b/patches/server/0968-Add-onboarding-message-for-initial-server-start.patch similarity index 100% rename from patches/server/0969-Add-onboarding-message-for-initial-server-start.patch rename to patches/server/0968-Add-onboarding-message-for-initial-server-start.patch diff --git a/patches/server/0970-Configurable-max-block-fluid-ticks.patch b/patches/server/0969-Configurable-max-block-fluid-ticks.patch similarity index 100% rename from patches/server/0970-Configurable-max-block-fluid-ticks.patch rename to patches/server/0969-Configurable-max-block-fluid-ticks.patch diff --git a/patches/server/0971-Fix-bees-aging-inside-hives.patch b/patches/server/0970-Fix-bees-aging-inside-hives.patch similarity index 100% rename from patches/server/0971-Fix-bees-aging-inside-hives.patch rename to patches/server/0970-Fix-bees-aging-inside-hives.patch diff --git a/patches/server/0972-Disable-memory-reserve-allocating.patch b/patches/server/0971-Disable-memory-reserve-allocating.patch similarity index 100% rename from patches/server/0972-Disable-memory-reserve-allocating.patch rename to patches/server/0971-Disable-memory-reserve-allocating.patch diff --git a/patches/server/0973-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch b/patches/server/0972-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch similarity index 100% rename from patches/server/0973-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch rename to patches/server/0972-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch diff --git a/patches/server/0974-Fix-DamageSource-API.patch b/patches/server/0973-Fix-DamageSource-API.patch similarity index 100% rename from patches/server/0974-Fix-DamageSource-API.patch rename to patches/server/0973-Fix-DamageSource-API.patch diff --git a/patches/server/0975-Fix-creation-of-invalid-block-entity-during-world-ge.patch b/patches/server/0974-Fix-creation-of-invalid-block-entity-during-world-ge.patch similarity index 100% rename from patches/server/0975-Fix-creation-of-invalid-block-entity-during-world-ge.patch rename to patches/server/0974-Fix-creation-of-invalid-block-entity-during-world-ge.patch diff --git a/patches/server/0976-Fix-possible-StackOverflowError-for-some-dispenses.patch b/patches/server/0975-Fix-possible-StackOverflowError-for-some-dispenses.patch similarity index 100% rename from patches/server/0976-Fix-possible-StackOverflowError-for-some-dispenses.patch rename to patches/server/0975-Fix-possible-StackOverflowError-for-some-dispenses.patch diff --git a/patches/server/0977-Improve-tag-parser-handling.patch b/patches/server/0976-Improve-tag-parser-handling.patch similarity index 100% rename from patches/server/0977-Improve-tag-parser-handling.patch rename to patches/server/0976-Improve-tag-parser-handling.patch diff --git a/patches/server/0978-Item-Mutation-Fixes.patch b/patches/server/0977-Item-Mutation-Fixes.patch similarity index 100% rename from patches/server/0978-Item-Mutation-Fixes.patch rename to patches/server/0977-Item-Mutation-Fixes.patch diff --git a/patches/server/0979-Per-world-ticks-per-spawn-settings.patch b/patches/server/0978-Per-world-ticks-per-spawn-settings.patch similarity index 100% rename from patches/server/0979-Per-world-ticks-per-spawn-settings.patch rename to patches/server/0978-Per-world-ticks-per-spawn-settings.patch diff --git a/patches/server/0980-Properly-track-the-changed-item-from-dispense-events.patch b/patches/server/0979-Properly-track-the-changed-item-from-dispense-events.patch similarity index 100% rename from patches/server/0980-Properly-track-the-changed-item-from-dispense-events.patch rename to patches/server/0979-Properly-track-the-changed-item-from-dispense-events.patch diff --git a/patches/server/0981-Rewrite-dataconverter-system.patch b/patches/server/0980-Rewrite-dataconverter-system.patch similarity index 100% rename from patches/server/0981-Rewrite-dataconverter-system.patch rename to patches/server/0980-Rewrite-dataconverter-system.patch diff --git a/patches/server/0982-Suspicious-Effect-Entry-API.patch b/patches/server/0981-Suspicious-Effect-Entry-API.patch similarity index 100% rename from patches/server/0982-Suspicious-Effect-Entry-API.patch rename to patches/server/0981-Suspicious-Effect-Entry-API.patch diff --git a/patches/server/0983-check-if-itemstack-is-stackable-first.patch b/patches/server/0982-check-if-itemstack-is-stackable-first.patch similarity index 100% rename from patches/server/0983-check-if-itemstack-is-stackable-first.patch rename to patches/server/0982-check-if-itemstack-is-stackable-first.patch diff --git a/patches/server/0984-disable-forced-empty-world-ticks.patch b/patches/server/0983-disable-forced-empty-world-ticks.patch similarity index 100% rename from patches/server/0984-disable-forced-empty-world-ticks.patch rename to patches/server/0983-disable-forced-empty-world-ticks.patch diff --git a/patches/server/0985-Starlight.patch b/patches/server/0984-Starlight.patch similarity index 100% rename from patches/server/0985-Starlight.patch rename to patches/server/0984-Starlight.patch diff --git a/patches/server/0986-Rewrite-chunk-system.patch b/patches/server/0985-Rewrite-chunk-system.patch similarity index 100% rename from patches/server/0986-Rewrite-chunk-system.patch rename to patches/server/0985-Rewrite-chunk-system.patch diff --git a/patches/server/0987-incremental-chunk-and-player-saving.patch b/patches/server/0986-incremental-chunk-and-player-saving.patch similarity index 100% rename from patches/server/0987-incremental-chunk-and-player-saving.patch rename to patches/server/0986-incremental-chunk-and-player-saving.patch diff --git a/patches/server/0988-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch b/patches/server/0987-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch similarity index 100% rename from patches/server/0988-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch rename to patches/server/0987-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch diff --git a/patches/server/0989-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0988-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch similarity index 100% rename from patches/server/0989-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch rename to patches/server/0988-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch diff --git a/patches/server/0990-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/server/0989-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch similarity index 100% rename from patches/server/0990-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch rename to patches/server/0989-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch diff --git a/patches/server/0991-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/server/0990-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from patches/server/0991-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to patches/server/0990-Optimize-Network-Manager-and-add-advanced-packet-sup.patch diff --git a/patches/server/0992-Allow-Saving-of-Oversized-Chunks.patch b/patches/server/0991-Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from patches/server/0992-Allow-Saving-of-Oversized-Chunks.patch rename to patches/server/0991-Allow-Saving-of-Oversized-Chunks.patch diff --git a/patches/server/0993-Fix-World-isChunkGenerated-calls.patch b/patches/server/0992-Fix-World-isChunkGenerated-calls.patch similarity index 100% rename from patches/server/0993-Fix-World-isChunkGenerated-calls.patch rename to patches/server/0992-Fix-World-isChunkGenerated-calls.patch diff --git a/patches/server/0994-Flat-bedrock-generator-settings.patch b/patches/server/0993-Flat-bedrock-generator-settings.patch similarity index 100% rename from patches/server/0994-Flat-bedrock-generator-settings.patch rename to patches/server/0993-Flat-bedrock-generator-settings.patch diff --git a/patches/server/0995-Entity-Activation-Range-2.0.patch b/patches/server/0994-Entity-Activation-Range-2.0.patch similarity index 100% rename from patches/server/0995-Entity-Activation-Range-2.0.patch rename to patches/server/0994-Entity-Activation-Range-2.0.patch diff --git a/patches/server/0996-Optional-per-player-mob-spawns.patch b/patches/server/0995-Optional-per-player-mob-spawns.patch similarity index 100% rename from patches/server/0996-Optional-per-player-mob-spawns.patch rename to patches/server/0995-Optional-per-player-mob-spawns.patch diff --git a/patches/server/0997-Anti-Xray.patch b/patches/server/0996-Anti-Xray.patch similarity index 100% rename from patches/server/0997-Anti-Xray.patch rename to patches/server/0996-Anti-Xray.patch diff --git a/patches/server/0998-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch b/patches/server/0997-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch similarity index 100% rename from patches/server/0998-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch rename to patches/server/0997-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch diff --git a/patches/server/0999-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0998-Optimize-Collision-to-not-load-chunks.patch similarity index 100% rename from patches/server/0999-Optimize-Collision-to-not-load-chunks.patch rename to patches/server/0998-Optimize-Collision-to-not-load-chunks.patch diff --git a/patches/server/1000-Optimize-GoalSelector-Goal.Flag-Set-operations.patch b/patches/server/0999-Optimize-GoalSelector-Goal.Flag-Set-operations.patch similarity index 100% rename from patches/server/1000-Optimize-GoalSelector-Goal.Flag-Set-operations.patch rename to patches/server/0999-Optimize-GoalSelector-Goal.Flag-Set-operations.patch diff --git a/patches/server/1001-Entity-load-save-limit-per-chunk.patch b/patches/server/1000-Entity-load-save-limit-per-chunk.patch similarity index 100% rename from patches/server/1001-Entity-load-save-limit-per-chunk.patch rename to patches/server/1000-Entity-load-save-limit-per-chunk.patch diff --git a/patches/server/1002-Improved-Watchdog-Support.patch b/patches/server/1001-Improved-Watchdog-Support.patch similarity index 100% rename from patches/server/1002-Improved-Watchdog-Support.patch rename to patches/server/1001-Improved-Watchdog-Support.patch diff --git a/patches/server/1003-Optimize-Voxel-Shape-Merging.patch b/patches/server/1002-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from patches/server/1003-Optimize-Voxel-Shape-Merging.patch rename to patches/server/1002-Optimize-Voxel-Shape-Merging.patch diff --git a/patches/server/1004-Write-SavedData-IO-async.patch b/patches/server/1003-Write-SavedData-IO-async.patch similarity index 100% rename from patches/server/1004-Write-SavedData-IO-async.patch rename to patches/server/1003-Write-SavedData-IO-async.patch diff --git a/patches/server/1005-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/1004-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 100% rename from patches/server/1005-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to patches/server/1004-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch diff --git a/patches/server/1006-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/1005-Use-distance-map-to-optimise-entity-tracker.patch similarity index 100% rename from patches/server/1006-Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/1005-Use-distance-map-to-optimise-entity-tracker.patch diff --git a/patches/server/1007-Optimize-Bit-Operations-by-inlining.patch b/patches/server/1006-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from patches/server/1007-Optimize-Bit-Operations-by-inlining.patch rename to patches/server/1006-Optimize-Bit-Operations-by-inlining.patch diff --git a/patches/server/1008-Remove-streams-from-hot-code.patch b/patches/server/1007-Remove-streams-from-hot-code.patch similarity index 100% rename from patches/server/1008-Remove-streams-from-hot-code.patch rename to patches/server/1007-Remove-streams-from-hot-code.patch diff --git a/patches/server/1009-Eigencraft-redstone-implementation.patch b/patches/server/1008-Eigencraft-redstone-implementation.patch similarity index 100% rename from patches/server/1009-Eigencraft-redstone-implementation.patch rename to patches/server/1008-Eigencraft-redstone-implementation.patch diff --git a/patches/server/1010-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/1009-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from patches/server/1010-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to patches/server/1009-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/patches/server/1011-Improve-boat-collision-performance.patch b/patches/server/1010-Improve-boat-collision-performance.patch similarity index 100% rename from patches/server/1011-Improve-boat-collision-performance.patch rename to patches/server/1010-Improve-boat-collision-performance.patch diff --git a/patches/server/1012-Optimise-general-POI-access.patch b/patches/server/1011-Optimise-general-POI-access.patch similarity index 100% rename from patches/server/1012-Optimise-general-POI-access.patch rename to patches/server/1011-Optimise-general-POI-access.patch diff --git a/patches/server/1013-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/1012-Custom-table-implementation-for-blockstate-state-loo.patch similarity index 100% rename from patches/server/1013-Custom-table-implementation-for-blockstate-state-loo.patch rename to patches/server/1012-Custom-table-implementation-for-blockstate-state-loo.patch diff --git a/patches/server/1014-Execute-chunk-tasks-mid-tick.patch b/patches/server/1013-Execute-chunk-tasks-mid-tick.patch similarity index 100% rename from patches/server/1014-Execute-chunk-tasks-mid-tick.patch rename to patches/server/1013-Execute-chunk-tasks-mid-tick.patch diff --git a/patches/server/1015-Optimise-random-block-ticking.patch b/patches/server/1014-Optimise-random-block-ticking.patch similarity index 100% rename from patches/server/1015-Optimise-random-block-ticking.patch rename to patches/server/1014-Optimise-random-block-ticking.patch diff --git a/patches/server/1016-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/1015-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch similarity index 100% rename from patches/server/1016-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch rename to patches/server/1015-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch diff --git a/patches/server/1017-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/1016-Use-Velocity-compression-and-cipher-natives.patch similarity index 100% rename from patches/server/1017-Use-Velocity-compression-and-cipher-natives.patch rename to patches/server/1016-Use-Velocity-compression-and-cipher-natives.patch diff --git a/patches/server/1018-Detail-more-information-in-watchdog-dumps.patch b/patches/server/1017-Detail-more-information-in-watchdog-dumps.patch similarity index 100% rename from patches/server/1018-Detail-more-information-in-watchdog-dumps.patch rename to patches/server/1017-Detail-more-information-in-watchdog-dumps.patch diff --git a/patches/server/1019-Collision-optimisations.patch b/patches/server/1018-Collision-optimisations.patch similarity index 100% rename from patches/server/1019-Collision-optimisations.patch rename to patches/server/1018-Collision-optimisations.patch diff --git a/patches/server/1020-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/1019-Optimise-collision-checking-in-player-move-packet-ha.patch similarity index 100% rename from patches/server/1020-Optimise-collision-checking-in-player-move-packet-ha.patch rename to patches/server/1019-Optimise-collision-checking-in-player-move-packet-ha.patch diff --git a/patches/server/1021-Fix-tripwire-disarming-not-working-as-intended.patch b/patches/server/1020-Fix-tripwire-disarming-not-working-as-intended.patch similarity index 100% rename from patches/server/1021-Fix-tripwire-disarming-not-working-as-intended.patch rename to patches/server/1020-Fix-tripwire-disarming-not-working-as-intended.patch diff --git a/patches/server/1022-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/1021-Fix-entity-type-tags-suggestions-in-selectors.patch similarity index 100% rename from patches/server/1022-Fix-entity-type-tags-suggestions-in-selectors.patch rename to patches/server/1021-Fix-entity-type-tags-suggestions-in-selectors.patch diff --git a/patches/server/1023-Add-Alternate-Current-redstone-implementation.patch b/patches/server/1022-Add-Alternate-Current-redstone-implementation.patch similarity index 100% rename from patches/server/1023-Add-Alternate-Current-redstone-implementation.patch rename to patches/server/1022-Add-Alternate-Current-redstone-implementation.patch diff --git a/patches/server/1024-optimize-dirt-and-snow-spreading.patch b/patches/server/1023-optimize-dirt-and-snow-spreading.patch similarity index 100% rename from patches/server/1024-optimize-dirt-and-snow-spreading.patch rename to patches/server/1023-optimize-dirt-and-snow-spreading.patch diff --git a/patches/server/1025-Properly-resend-entities.patch b/patches/server/1024-Properly-resend-entities.patch similarity index 100% rename from patches/server/1025-Properly-resend-entities.patch rename to patches/server/1024-Properly-resend-entities.patch diff --git a/patches/server/1026-Optimize-Hoppers.patch b/patches/server/1025-Optimize-Hoppers.patch similarity index 100% rename from patches/server/1026-Optimize-Hoppers.patch rename to patches/server/1025-Optimize-Hoppers.patch diff --git a/patches/server/1027-Improve-performance-of-mass-crafts.patch b/patches/server/1026-Improve-performance-of-mass-crafts.patch similarity index 100% rename from patches/server/1027-Improve-performance-of-mass-crafts.patch rename to patches/server/1026-Improve-performance-of-mass-crafts.patch diff --git a/patches/server/1028-Actually-optimise-explosions.patch b/patches/server/1027-Actually-optimise-explosions.patch similarity index 100% rename from patches/server/1028-Actually-optimise-explosions.patch rename to patches/server/1027-Actually-optimise-explosions.patch diff --git a/patches/server/1029-Optimise-chunk-tick-iteration.patch b/patches/server/1028-Optimise-chunk-tick-iteration.patch similarity index 100% rename from patches/server/1029-Optimise-chunk-tick-iteration.patch rename to patches/server/1028-Optimise-chunk-tick-iteration.patch diff --git a/patches/server/1030-Lag-compensation-ticks.patch b/patches/server/1029-Lag-compensation-ticks.patch similarity index 100% rename from patches/server/1030-Lag-compensation-ticks.patch rename to patches/server/1029-Lag-compensation-ticks.patch diff --git a/patches/server/1031-Optimise-nearby-player-retrieval.patch b/patches/server/1030-Optimise-nearby-player-retrieval.patch similarity index 100% rename from patches/server/1031-Optimise-nearby-player-retrieval.patch rename to patches/server/1030-Optimise-nearby-player-retrieval.patch diff --git a/patches/server/1032-Distance-manager-tick-timings.patch b/patches/server/1031-Distance-manager-tick-timings.patch similarity index 100% rename from patches/server/1032-Distance-manager-tick-timings.patch rename to patches/server/1031-Distance-manager-tick-timings.patch diff --git a/patches/server/1033-Handle-Oversized-block-entities-in-chunks.patch b/patches/server/1032-Handle-Oversized-block-entities-in-chunks.patch similarity index 100% rename from patches/server/1033-Handle-Oversized-block-entities-in-chunks.patch rename to patches/server/1032-Handle-Oversized-block-entities-in-chunks.patch diff --git a/patches/server/1034-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/1033-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/server/1034-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/server/1033-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/server/1035-Fix-and-optimise-world-force-upgrading.patch b/patches/server/1034-Fix-and-optimise-world-force-upgrading.patch similarity index 100% rename from patches/server/1035-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/1034-Fix-and-optimise-world-force-upgrading.patch diff --git a/patches/server/1036-API-for-checking-sent-chunks.patch b/patches/server/1035-API-for-checking-sent-chunks.patch similarity index 100% rename from patches/server/1036-API-for-checking-sent-chunks.patch rename to patches/server/1035-API-for-checking-sent-chunks.patch diff --git a/patches/server/1036-Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch b/patches/server/1036-Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch new file mode 100644 index 0000000000..b7399d5f48 --- /dev/null +++ b/patches/server/1036-Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Fri, 26 Apr 2024 11:38:28 -0700 +Subject: [PATCH] Properly handle pdc and custom tags in ItemMeta + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index 549d06b83b195c0a0207d18850b98d1e6e611460..bf0870590fcf5c502cd986047efec9f754faf9a7 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -369,6 +369,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + this.customTag = customData.copyTag(); + if (this.customTag.contains(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT)) { + CompoundTag compound = this.customTag.getCompound(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT); ++ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT); // Paper - remove PDC from custom tag ++ if (this.customTag.isEmpty()) this.customTag = null; // Paper - remove PDC from custom tag + Set keys = compound.getAllKeys(); + for (String key : keys) { + this.persistentDataContainer.put(key, compound.get(key).copy()); +@@ -573,6 +575,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(custom)); + try { + this.customTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap()); ++ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT); // Paper - ensure PDC isn't in custom tag ++ if (this.customTag.isEmpty()) this.customTag = null; // Paper - ensure PDC isn't in custom tag + } catch (IOException ex) { + Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex); + } +@@ -795,6 +799,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + + if (this.customTag != null) { + itemTag.put(CraftMetaItem.CUSTOM_DATA, CustomData.of(this.customTag)); ++ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT); ++ if (this.customTag.isEmpty()) this.customTag = null; + } + } + diff --git a/patches/server/1037-handle-converting-old-serialized-names-to-new-names.patch b/patches/server/1037-handle-converting-old-serialized-names-to-new-names.patch new file mode 100644 index 0000000000..50366dacd0 --- /dev/null +++ b/patches/server/1037-handle-converting-old-serialized-names-to-new-names.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Fri, 26 Apr 2024 11:38:40 -0700 +Subject: [PATCH] handle converting old serialized names to new names + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index bf0870590fcf5c502cd986047efec9f754faf9a7..dabbdadf3824d1132bd4aa6d2f2360c270fa299a 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -661,7 +661,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + enchantKey = "SWEEPING_EDGE"; + } + +- Enchantment enchantment = Enchantment.getByName(enchantKey); ++ Enchantment enchantment = Enchantment.getByName(org.bukkit.craftbukkit.legacy.FieldRename.convertEnchantmentName(org.bukkit.craftbukkit.util.ApiVersion.CURRENT, enchantKey)); // Paper - convert enchantment names + if ((enchantment != null) && (entry.getValue() instanceof Integer)) { + enchantments.put(enchantment, (Integer) entry.getValue()); + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +index a6d2370113eb44c0863b7837362dbb350f5057c6..21dbce78b1a0d42d20c9e7f87f8bee1c18c1353f 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +@@ -138,7 +138,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { + + String entityType = SerializableMeta.getString(map, CraftMetaSpawnEgg.ENTITY_ID.BUKKIT, true); + if (entityType != null) { +- this.spawnedType = EntityType.fromName(entityType); ++ this.spawnedType = EntityType.fromName(org.bukkit.craftbukkit.legacy.FieldRename.convertEntityTypeName(org.bukkit.craftbukkit.util.ApiVersion.CURRENT, entityType)); // Paper - handle old entity type field names + } + } +