431 Commits

Author SHA1 Message Date
52fb02fa2e Fix New Features
All checks were successful
SteamWarCI Build successful
2025-06-26 22:45:52 +02:00
5751108142 Fix New Features
All checks were successful
SteamWarCI Build successful
2025-06-26 22:41:12 +02:00
ad42e22284 Merge remote-tracking branch 'upstream/main' 2025-06-26 22:39:23 +02:00
e3a46b30d9 Merge remote-tracking branch 'upstream/main' 2025-06-26 22:38:27 +02:00
FlorianMichael
bd79e20c66 [ci skip] PluginManager#getPlugin and PluginManager#isPluginEnabled are case-insensitive (#12723) 2025-06-26 21:17:20 +02:00
Shane Freeder
35b2c6ece4 Use dropped item for stats info (#12747)
We are already using the dropped stack to determine the type, we
might as well also use it for the count, given that plugins can already
mutate the type, might as well let them mess with the amount.
2025-06-26 19:44:29 +01:00
Nassim Jahnke
e382e6872c Fix 0 yield on explosion events
Fixes #12745

That cooked is mildly cooked and should be fixed differently, e.g. a custom loot context param, but reverting the recent change in this line works for now
2025-06-26 16:58:05 +02:00
Nassim Jahnke
4e1a2555be Update try catch for command handling
Fixes #12729
2025-06-25 22:42:38 +02:00
Nassim Jahnke
7ec3174a33 Jump out of experimental phase 2025-06-25 22:14:31 +02:00
Lulu13022002
c9e89f49b0 Expose arrow velocity in EntityShootBowEvent for mobs (#12688) 2025-06-25 22:11:18 +02:00
Pedro
aa6cd74c03 Remove unnecesary item check for ServerboundPlayerActionPacket RELEASE_USE_ITEM (#12668) 2025-06-25 22:09:11 +02:00
Owen
ea10fa4a79 Don't mutate the position of Items for MC-4 Fix (#12702) 2025-06-25 21:51:26 +02:00
Spottedleaf
692e93a91f Fix MC-299110
When converting entity/poi data (SimpleRegionStorage),
we need to insert the new data version so that force upgrading
will write the data back with the correct version.
2025-06-25 12:25:45 -07:00
Kezz
bee287927c Adventure 4.23.0 (#12690) 2025-06-25 21:16:18 +02:00
Owen
0caf75f839 Fix #12721 (#12725)
* Fix #12721

Track when knots are created and only fire the event then

* Use mutable boolean + check if actually spawned
2025-06-25 14:16:03 -04:00
Owen
d7510efc16 Fix #12722 (#12726)
Use our getRegistryAccess to null check against world
2025-06-24 15:26:37 -04:00
Spottedleaf
aa6ee44a7a Re-add global region scheduler tick erroneously removed in last commit 2025-06-24 08:14:29 -07:00
Spottedleaf
7c90c7c497 Optimise EntityScheduler ticking
The vast majority of the time, there are no tasks scheduled to
the EntityScheduler. We can avoid iterating the entire entity list
by tracking which schedulers have any tasks scheduled.
2025-06-24 07:19:33 -07:00
Spottedleaf
2f083acbed Ensure player entity schedulers are ticked when they are dead
If the player dies, then they are removed from the world and
as a result are not present in the world entity map.

To guarantee that the player entity scheduler is ticked, we can
tick all schedulers for players in the server player list, and
then skip all players we find in the world entity map.

This problem is not present on Folia since Folia must guarantee
that the player remains in the world.
2025-06-24 05:12:58 -07:00
Spottedleaf
38c1ddb52a Add and use FeatureHooks.getAllEntities
The ServerLevel#getAllEntities function only returns entities which
are accessible. FeatureHooks#getAllEntities will return all
entities, whether or not they are accessible.

Use the new hook in the EntityCommand, which allows server admins
to inspect entities in unloaded chunks.

Use the hook as well for ticking the EntityScheduler. This fixes
an issue whether unloaded entities did not have their scheduler ticked.
2025-06-24 04:55:58 -07:00
Spottedleaf
46b4b0b8d5 Improve keepalive ping system
Send more keepalives, record all transactions within the last minute.
We send more keepalives so that the latency calculation is more
accurate. Since we send more keepalives, we track all pending
keepalives in case multiple end up in flight.

Additionally, replace the latency calculation with a true
average over the last 5 seconds of keepalive transactions.
2025-06-24 04:23:08 -07:00
Spottedleaf
d0e808f44c Move player to correct position in vehicle move packet handler
We add the change to guarantee that the player position moves
in-sync with the vehicle's. As a result, it should be teleporting
the player using the new position of the vehicle rather than the
old.
2025-06-24 02:09:39 -07:00
wiicart
e454fef40e Add support for private constructors in plugin main classes (#12652) 2025-06-23 22:50:59 -04:00
Riley Park
1814d8b47a build: publish to fill (#12717) 2025-06-23 14:13:13 -07:00
Pedro
803baf0ba6 Support hidden entities in Waypoints (#12715) 2025-06-22 13:42:06 -04:00
Owen
5edcf6ddf6 Cleanup/command dispatching (#12713) 2025-06-21 21:44:07 -04:00
Strokkur24
186e9e331b Relocate CommandMap#registerServerAliases() call to after lifecycle events have been run (#12601) 2025-06-21 14:44:07 -04:00
Jake Potrebic
cceffe3d98 Release ItemType and BlockType (#12708) 2025-06-21 11:27:46 -07:00
Pedro
6d0821d2b5 [ci skip] Fix docs for Spawner class and cleanup (#12710) 2025-06-21 17:54:24 +02:00
CraftBukkit/Spigot
e714de6365 Fix excess slot updates
By: AJ Ferguson <fergusonjva@gmail.com>
2025-06-21 13:16:55 +02:00
David
c0dda0ea14 Add isForceDefaultGameMode method (#12673) 2025-06-21 13:10:11 +02:00
David
5652882134 Add isProxyEnabled method to ServerConfiguration (#12664) 2025-06-21 13:09:44 +02:00
Kezz
4419afb9c9 fix: Safely handle nanosecond overflow in ClickCallback (#12686)
If you are creating a click callback using e.g. ChronoUnit.FOREVER.getDuration() this code will throw an ArithmeticException because toNanos overflows. The only way toNanos throws this exception is if the nanos overflow, so we can just safely cap it here as the max value for a long.
2025-06-21 12:58:46 +02:00
Lulu13022002
29fc853271 Allow empty paths in namespaced keys (#12687) 2025-06-21 01:56:45 -04:00
Strokkur24
d61a51e81e Add ItemType#getBurnDuration() (#12604) 2025-06-21 01:54:29 -04:00
Pedro
3750927a06 [ci skip] Fix PermissionManager#clearPermissions() docs bad wording (#12657) 2025-06-21 01:01:11 -04:00
Owen
71b0c76861 Adds support for vanilla negative explosions (#12705)
Fixes #10460
2025-06-21 00:54:53 -04:00
Spottedleaf
e4eb69b8a1 Do not allow ticket level decreases to be processed asynchronously
Note: This cannot happen on the Fabric/NeoForge versions since
async ticket level processing is not allowed, but can happen on
Paper. This change is made here so that Paper can
remain in sync.

Ticket level decreases may be handled asynchronously when the
off-thread invokes processTicketUpdates() when the main thread
is running ChunkHolderManager#tick(). This is because the ticket
update is queued during tick(), but not executed (invoking
processTicketUpdates) until after releasing the ticket lock.
This creates a small window for an off-thread to invoke
processTicketUpdates() and steal the update.

When the update is stolen, the full chunk status update (if any)
will be eventually queued to execute via the chunk task queue.
If the chunk queue is processed during the server tick at any
point other than the ChunkHolderManager tick, then any ticket
level decrease will violate an important invariant in the
Moonrise chunk system: ticket level decreases only occur during
ChunkHolderManager tick. This invariant exists to make interfacing
with the chunk system easier, especially working with off-thread
contexts.

This change is specifically made to work towards fixing
https://github.com/PaperMC/Folia/issues/363
2025-06-20 21:10:09 -07:00
Spottedleaf
219f86ee06 Implement chunk unload delay config option
Fixes https://github.com/PaperMC/Paper/issues/12056
2025-06-20 21:07:21 -07:00
Spottedleaf
c77d5f99f9 Fix MC-297591
Vanilla does not increment ticket timeouts if the chunk is
progressing in generation. They made this change in 1.21.6
so that the ender pearl ticket does not expire if the chunk
fails to generate before the timeout expires. Rather than
blindly adjusting the entire system behavior to fix this
small issue, we instead add non-expirable tickets to keep
ender pearls ticking.
2025-06-20 20:53:01 -07:00
Owen
839c6a1845 Fix #11169 (#12706)
This technically fixes the improperly updated patch, and also no longer checks canPickUpLoot.
2025-06-20 19:22:27 -04:00
Owen
6a51c44ec2 Cleanup Primed TNT Fix (#12704)
This option should probably be removed as its a descendant of an option that allows "old tnt cannon" behavior before ~1.9 But this improves the fix so properly update the velocity/position rather than the questionable way it was doing it before.
2025-06-20 18:22:37 -04:00
Bjarne Koll
a7dd263566 Enable spigot obfuscation support (#12695) 2025-06-20 22:11:33 +01:00
Owen
4b3f967e49 Improve Fix MC-44654 (#12703)
This more properly implement spigot's fix for teleportation area effect clouds, now however supporting many other entity types specified in this bug report.

Currently, this is not an issue for (all) hanging blocks since they have a fix identical to this inside of setPos. Note however the client does not nicely support moving these entities anyways.
2025-06-20 16:02:24 -04:00
Pedro
74fbcce5ae Check type of Material in get/set stats (#12607) 2025-06-20 16:45:40 +02:00
Antti Koponen
4781d28b4b Re-add Log4j Javadocs (#12693) 2025-06-18 18:31:59 -07:00
Lulu13022002
f5534cb7c7 [ci skip] Run generators (#12691) 2025-06-18 20:05:50 +02:00
Jason Penilla
62b7f86dae Avoid and discourage use of Maven Central as a CDN (#12689)
* Default LibraryLoader to Google's Maven Central mirror, add MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR, and warn on use of Maven Central with MavenLibraryResolver

* Account for both Maven Central URLs

* Update Javadoc
2025-06-18 10:47:21 -07:00
Shane Freeder
5613ed6dfb Provide env environment variable and copy spigots sys prop for overriding default repository 2025-06-18 11:04:48 +01:00
Spottedleaf
8980ead7ea Directly walk text component after converting from JSON
It's important to convert the ItemStack present inside
the text component. The ItemStack nests TEXT_COMPONENT (written
book pages, custom name, ...) which would otherwise not be walked
since we have set a breakpoint at the version and moved the walker
to the next version step.

This fixes item names for hover events inside written book pages
failing to convert to NBT. This issue is also present on DFU.
2025-06-17 19:02:35 -07:00
Spottedleaf
e4d7178a3c Implement WaypointTransmitter#isChunkVisible
The Vanilla chunk tracker on Moonrise always returns false. We need
to redirect to Moonrise's chunk loader.

aef2b81d6e
2025-06-17 17:53:12 -07:00
Spottedleaf
1fcc4162d1 Implement FeatureHooks#isChunkSent for Moonrise chunk system
Need to use the player chunk loader, as that will contain the
sent chunks.
2025-06-17 17:47:50 -07:00
Spottedleaf
40d5d31c83 Fix recursively converting JSON Text Components
See 142ec80d28
2025-06-17 16:38:01 -07:00
Bjarne Koll
023e6c2953 Ensure waypoints are per world 2025-06-17 23:43:05 +02:00
Shane Freeder
d2b1158e6c Set correct world access on BSL snapshots 2025-06-17 20:38:39 +01:00
Spottedleaf
8318dcb74b Update DataConverter to 1.21.6-rc1
b388a85809

The 1.21.6 update will include better handling of legacy
hover events.
2025-06-17 10:00:54 -07:00
Spottedleaf
b28d77b3e3 Update Moonrise to 1.21.6
0451444abf
2025-06-17 09:46:59 -07:00
Nassim Jahnke
245b5473a0 Update base to 1.21.6 2025-06-17 17:17:44 +02:00
Nassim Jahnke
457a0a69bf Bump version string and protocol version to 1.21.6 release
Notably, this does not bump the world data version. This will be left for when the actual Vanilla base is updated, just in case. This early bump will likely be the exception for more ironed out update previews in the future.
2025-06-17 15:54:23 +02:00
Bjarne Koll
a24f9b204c 1.21.6 dev
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2025-06-17 15:45:25 +02:00
Jason Penilla
39203a65e0 [ci skip] Publish PR API and dev bundles (#12672)
* Setup PR publishing

also remove the JDK matrix, it's pointless with one value and other parts of the workflow depend on a single value...

* Use PaperMC action

* Change base PR maven url

* Update action

* Update action

* Update action

* Update action

* Update action

* Re-enable javadoc...?

* Delete PR comment workflow

* Rename publish tag

* comment broken jd link

* update bot name
2025-06-16 17:35:54 -07:00
Jake Potrebic
ba7fb23ddd Finish moving over to Holderable (#12646) 2025-06-10 16:29:10 -07:00
Spottedleaf
519e4224b1 Fix infinite loop in RegionFile IO
If an exception is thrown during decompress then the read process
would be started again, which of course would eventually throw in
the decompress process.
2025-06-09 02:46:34 -07:00
Jake Potrebic
95565e0f4f Add missing attribute serialization updater 2025-06-08 18:33:24 -07:00
David
320f25cb04 fix sponge-absorb deleting chest content (#12647) 2025-06-07 22:28:37 +01:00
Mart
3527ccdf2e feat: expose updateDemand and restock on Villager (#12608) 2025-06-07 12:42:11 +02:00
David Polt
03efecf0d3 Do not fire PlayerDropItemEvent for /give command 2025-06-07 12:22:48 +02:00
Shane Freeder
94f2903584 Do not blow up accessing unregistered memories from API (Fixes #12618) (#12639) 2025-06-06 22:37:52 -04:00
Warrior
e87320d5f2 Fix UOE when using generateTree with pale oak (#12616) 2025-06-06 21:51:42 -04:00
Strokkur24
7ebc94c2a6 Add Registry#getTagValues (#12603) 2025-06-06 18:23:02 -07:00
Shane Freeder
4eda045b15 Backport fix for MC-296337 (Fixes #12617) (#12619) 2025-06-06 19:05:30 +01:00
11b4356fb4 Merge remote-tracking branch 'upstream/main'
All checks were successful
SteamWarCI Build successful
2025-05-31 19:42:03 +02:00
Spottedleaf
2ba1675c75 Replace deprecated Thread#getId usage with Thread#threadId 2025-05-29 04:59:52 -07:00
Spottedleaf
6f315356b6 Add MCUtil#toLocation from Folia
Helper methods to convert NMS world/position to Bukkit Location
2025-05-29 04:58:00 -07:00
Jason Penilla
4765010083 Improve error messages when PluginRemapper fails to initialize (#12598) 2025-05-28 12:33:25 -07:00
Nassim Jahnke
a033e3b9ef Fix ancient player custom name converter
Who knows for how long it's been broken, but it only came up now given DataConverter isn't applied
Fixes #12565
Supersedes #12568
2025-05-25 09:24:49 +02:00
Pedro
b9d6ba243c Expose more data for MusicInstrument (#12415) 2025-05-24 17:16:54 -04:00
Newwind
84ee4249c9 Add Map filled event (#12574) 2025-05-24 22:45:32 +02:00
Bjarne Koll
ee3b405316 Replace spigot check with generation check 2025-05-24 22:43:48 +02:00
Bjarne Koll
b8fe22c9cd Do not call EntityRemoveEvent during worldgen (#12588)
Ports the follow commits from spigot to paper.
All credits to go the respective commit authors listed below.

CraftBukkit: 3b4fd5b321f4440a2b3a67f3945739b45e6e687f

By: md_5 <git@md-5.net>
2025-05-24 22:17:42 +02:00
Pedro
220b57add4 Fixs and Improvements for EndermanEscapeEvent (#12570) 2025-05-24 21:53:02 +02:00
A248 🇵🇸🇪🇭
7774243d11 Add plugin details to zip file errors (#12580)
Helps debug classloading across plugin boundaries. Zip file errors
can be thrown for multiple reasons, and they are capable of
affecting other plugins' classloading.
2025-05-24 21:18:41 +02:00
Pedro
a3909f5486 [ci skip] Fix bad format for jd @link (#12581) 2025-05-24 21:17:16 +02:00
Md5Lukas
3efaf477c4 Add API for client-side signs (#11903) 2025-05-24 21:16:23 +02:00
Nassim Jahnke
b70bca6b69 Revert "fix: Don't hardcode checks for translation registries (#12571)"
This reverts commit f303a076bc.
2025-05-23 21:29:51 +02:00
Pedro
87349c317f Fix CombatTracker stale on death (#12562) 2025-05-21 18:19:08 +02:00
Kezz
f303a076bc fix: Don't hardcode checks for translation registries (#12571)
Devs can register custom Translator instances, and we can use the new `#canTranslate` method to avoid having to iterate through the whole set of sources.
2025-05-21 18:19:00 +02:00
Jason Penilla
113b18ee08 Update paperweight and Gradle wrapper (#12573) 2025-05-19 17:34:49 -07:00
brickmonster
fa360aa836 Add some missing annotations and an incorrect one (#12204) 2025-05-18 18:31:49 -04:00
David
ce0fa4c438 Replace old version command with brigadier equivalent (#12502)
---------

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2025-05-18 16:24:02 -04:00
Reason
6f73e62ecd Add getPickItemStack (#12552) 2025-05-18 20:42:14 +02:00
Pedro
7171d29985 [ci skip] Mention CAN_PLACE/CAN_BREAK component in ItemMeta (#12559) 2025-05-18 19:49:57 +02:00
Pedro
358786774c [ci skip] Fix format and mentions for ItemDamageFunction (#12560) 2025-05-18 13:23:52 -04:00
Pedro
cc38032bee Deprecate TeleportCause CHORUS_FRUIT for CONSUMABLE_EFFECT (#12546) 2025-05-18 16:33:21 +02:00
Pedro
f1dbed072c Implement BlocksAttack DamageReduction and ItemDamage (#12538) 2025-05-18 16:31:34 +02:00
Nassim Jahnke
28d7df75ac Backport HeroesOfTheVillage datafixer fix
Fixes #12515
2025-05-18 16:13:19 +02:00
Hjalmar Gunnarsson
c000b352ad fix(bukkit-brig-forwarding-map): Invert isEmpty method (#12555) 2025-05-18 09:12:59 +02:00
Pedro
841d634230 Fix ItemStack#addUnsafeEnchantment ignored for missing enchantment component (#12549) 2025-05-17 16:13:08 +02:00
Bjarne Koll
369ad1706b Cached tag parser for itemstack reading (#12547) 2025-05-17 13:42:51 +02:00
Namiu/うにたろう
d683970d40 Add FishHookStateChangeEvent (#12165) 2025-05-15 20:17:32 +02:00
Bjarne Koll
a25258190b Update mache 2025-05-11 22:28:25 +02:00
Nassim Jahnke
04ffca0b6b Also remove CraftPlayer methods 2025-05-09 14:55:41 +02:00
Nassim Jahnke
358e72ec0d Remove simplify remote item matching stuff for now
Twas broken for some time and I haven't had time to address it, this may be revisited later in a different way
2025-05-09 14:47:24 +02:00
Spottedleaf
d2ad2e668d Add missing EntityLookup#getAllMapped from Moonrise
Not used but the sources should remain synced.
2025-05-07 18:31:25 -07:00
Owen
6c3964d2f5 Properly save level data async (#12530)
Previously we added a parameter allowing for level data to be saved asynchronously which was then overriden by a vanilla parameter which does the opposite.

This reverts back to the previous behavior that we were doing before.

Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2025-05-07 17:34:58 -04:00
David
cbcf75a57c Update visual fire handling with TriState support (#12303)
Replaced the Boolean-based visual fire system with TriState for improved clarity and flexibility, enabling three distinct states: TRUE, FALSE, and NOT_SET. Deprecated older methods in favor of new ones and updated internal handling to reflect these changes. Adjusted serialization and deserialization logic to accommodate the new TriState implementation.
2025-05-07 23:33:41 +02:00
Jakub Zacek
ab0253fecd Expand PlayerDeathEvent API (#12221) 2025-05-06 20:14:58 -04:00
Bert Towne
e2da5d2f0a Registry API for supported Mob Variants (#12417)
---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2025-05-06 17:13:00 -04:00
Pedro
753cff7c8a Improvements for Dump paper commands (#12512) 2025-05-06 16:45:17 -04:00
Owen
42a2a6c2b5 Supports the ability for commands to be registered internally (#12520) 2025-05-06 16:05:00 -04:00
David
c98cd65802 Add configuration interface to expose certain config values (#12273) 2025-05-03 16:33:25 -04:00
Tamion
53d1d04ec5 Disable Item Obfuscation for entity related stacks (#12297) 2025-05-03 20:52:33 +02:00
Mart
88a3a87015 Configurable xp orb merge group count (#12503) 2025-05-03 20:51:19 +02:00
Pedro
6f1f5b67e0 Fix ArmorStand items for canceled EntityDeathEvent (#12288)
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
2025-05-02 23:19:15 +02:00
Isaac - The456
2bd84f6f0e Expand PotionMeta Api to allow getting effective potion colour and effects (#12390) 2025-05-02 22:31:39 +02:00
David
825685f82f Add PlayerPickBlockEvent and PlayerPickEntityEvent (#12425)
Extensions of the existing PlayerPickItemEvent that allow more fine grained access to relevant context, like the picked block or the entity.
2025-05-02 22:14:27 +02:00
TonytheMacaroni
1074237311 Pass correct draw strength for EntityShootBowEvent (#12308) 2025-05-02 16:05:50 -04:00
Pedro
d637ae85dd Fix NoSuchElementException in EntityTransformEvent for slimes (#12510) 2025-05-02 21:15:58 +02:00
Shane Freeder
cb3ffd0b4a Don't store empty PDCs on raids 2025-05-02 20:02:34 +01:00
Shane Freeder
93246a0730 Fix errors when loading raid files without a PDC 2025-05-02 19:43:06 +01:00
Bjarne Koll
51345a1cc8 Correct nullable fall location type 2025-05-02 18:57:18 +02:00
Owen
ec421715ed Add missing spaces back (#12508) 2025-05-02 07:39:46 +02:00
Epic
b9b3cd652e Use components instead of ChatColor in more places (#12507) 2025-05-02 02:11:25 +02:00
Epic
1acf3b3837 Infer block entity data in brigadier blockstate argument (#12197) 2025-05-01 16:08:41 +02:00
Pedro
c9411bfb83 Fix min ItemStack amount check for asHoverEvent (#12505) 2025-05-01 16:00:23 +02:00
Glicz
835b955913 Add a method on InventoryView to get the MenuType (#12193)
Since there is a new (better) way to create views for players using MenuType, it would be nice to also be able to get it back from InventoryView after creating.
2025-04-30 21:43:51 -04:00
Pedro
0e9b94d533 Fix ItemStack amount issues with Chat Components (#12216) 2025-04-30 21:24:49 -04:00
Lulu13022002
bc3d946fdf Normalizes CraftEntity#toString/getHandle (#12170) 2025-04-30 21:21:04 -04:00
Lulu13022002
567f63ae34 Parity for respawn events (#11792) 2025-04-30 20:04:24 +02:00
Miles
2754d7c3b9 Add Throw EntityChangeBlockEvent for BrushableBlockEntity#brush (#12133) 2025-04-30 14:03:40 -04:00
Pedro
5acfdd6af4 Fix save/load NaN Entity Motion (#12269) 2025-04-30 19:53:32 +02:00
Bjarne Koll
cd4fe5b7d0 [ci skip] Drop non-applicable ATs (#12498) 2025-04-30 19:30:45 +02:00
Illia Bondar
e663f99982 Add combat tracker API (#11853) 2025-04-30 19:24:33 +02:00
Dqu1J
646b80ca53 Fix unnecessary map data saves (#12296) 2025-04-30 11:51:13 -04:00
Warrior
1e930763d2 Fix ipv6 loopback addresses being able to get connection throttled (#12155) 2025-04-30 11:50:18 -04:00
Epic
a74400d92c Update adventure to 4.21.0 (#12499) 2025-04-30 11:36:52 +02:00
d4be73c990 Merge remote-tracking branch 'upstream/main'
All checks were successful
SteamWarCI Build successful
2025-04-29 19:41:25 +02:00
Pedro
a7a76c8fc7 Add methods for Armadillo (#12031) 2025-04-29 15:44:37 +02:00
Shane Freeder
fc0c371761 Fix handling of resultant crafting container from craftItemResult (#12307)
The result object of overhanging items is based upon a derived view
of the provided crafting slots, meaning that we need to consider this
when handing back the resultant slots.
2025-04-29 15:38:11 +02:00
Lulu13022002
9e873f50d3 Fix inconsistencies between offline/online spawn position getter (#11960) 2025-04-29 14:57:36 +02:00
David
02d20ff7eb Fix NPE in Server#getMap before worlds are loaded (#12492) 2025-04-28 21:22:33 +02:00
David
d1810f241c Allow Server#getDefaultGameMode before worlds are initialized (#12490) 2025-04-28 17:36:46 +02:00
Oleksandr Semenishchev
1db3785307 [ci skip] improve javadoc for off-hand swaps through getHotbarButton (#12489) 2025-04-28 17:22:05 +02:00
David
952338b33e [ci skip] Add missing exception docs to Player#listPlayer (#12488) 2025-04-28 15:00:02 +02:00
Bjarne Koll
b9d3147d3b Use correct placed block position for sound (#12410)
Previously the server attempted to compute the block placed by using the
BlockPlaceContext. This approach however fails on replacable blocks, as
the BlockPlaceContext computes this during its construction, which
happened after the actual world modification.

The commit reworks this approach and now stores metadata in the
InteractionResult which can later be read.
The diff is structured to allow for easy future expansion of the tracked
metadata.
2025-04-27 14:19:42 +02:00
Shane Bee
f8fa4f6f5e Add method to retrieve FishHook (#12310) 2025-04-27 14:12:01 +02:00
b418321d85 Merge remote-tracking branch 'upstream/main'
All checks were successful
SteamWarCI Build successful
2025-04-27 01:51:28 +02:00
Gero
3e3b42cdf5 Update player chat session sync (#12382) 2025-04-26 23:26:20 +02:00
Warrior
f86b435228 Add vault change state event (#12069) 2025-04-26 16:34:12 +02:00
Isaac - The456
deaccd2c42 [ci skip] Add file reference url to help.yml (#12481) 2025-04-26 16:01:06 +02:00
58f12b93f8 Merge pull request 'Reenable commands in Commands.java' (#2) from reenable-commands into main
All checks were successful
SteamWarCI Build successful
Reviewed-on: #2
Reviewed-by: Lixfel <lixfel@noreply.localhost>
2025-04-26 09:44:06 +02:00
284f5adefd Re-enabling WhitelistCommand.
All checks were successful
SteamWarCI Build successful
2025-04-26 09:43:24 +02:00
Bjarne Koll
3222985e43 [ci skip] Rebuild patches 2025-04-25 20:06:10 +02:00
Maddy Miller
1cfc96bcf7 Add keyStream() API to registries (#12479) 2025-04-25 14:26:56 +02:00
Blue Bandit
3409e2d73f Mace was not included in the ENCHANTABLE MaterialSetTag (#12476) 2025-04-25 11:25:05 +02:00
Pedro
ae512811db Add isSuffocating to Block and BlockState (#12445) 2025-04-25 10:48:24 +02:00
SpigotRCE
a211ac2ec5 Remove unused warning (#12478) 2025-04-25 10:46:06 +02:00
Lulu13022002
a112d37025 Fix horse_variant and tropical_fish_pattern (#12472) 2025-04-24 22:39:33 +02:00
6652bb7612 Reenable commands in Commands.java
All checks were successful
SteamWarCI Build successful
2025-04-24 18:31:12 +02:00
gecko10000
9cddf136d7 Fix portal create event block list (#12373) 2025-04-24 18:10:13 +02:00
Lulu13022002
767868ddbf Fix some components (#12457) 2025-04-24 16:57:20 +02:00
Nassim Jahnke
1410a22bb2 Fix passengers sending when riding players
Fixes #12468
2025-04-24 13:59:28 +02:00
d05bf33c05 Fix CI
All checks were successful
SteamWarCI Build successful
2025-04-23 22:46:58 +02:00
2b50a2ea07 Trigger Rebuild
Some checks failed
SteamWarCI Build failed
2025-04-23 22:43:42 +02:00
67a5148512 Trigger Rebuild
Some checks failed
SteamWarCI Build failed
2025-04-23 22:41:22 +02:00
a5269d76c0 Trigger Rebuild
Some checks failed
SteamWarCI Build failed
2025-04-23 22:35:18 +02:00
adc22129ae Trigger Rebuild
Some checks failed
SteamWarCI Build failed
2025-04-23 22:34:35 +02:00
cf7e54ea59 Trigger Rebuild
Some checks failed
SteamWarCI Build failed
2025-04-23 22:33:21 +02:00
5d6f544ed1 Merge branch 'update/1.21.4'
Some checks failed
SteamWarCI Build failed
2025-04-23 22:32:06 +02:00
871373ac27 Trigger Rebuild
Some checks failed
SteamWarCI Build failed
2025-04-23 22:31:43 +02:00
cb9578f90f Merge pull request 'Update patches to latest 1.21.4' (#1) from update/1.21.4 into main
Some checks failed
SteamWarCI Build failed
Reviewed-on: #1
2025-04-23 22:27:10 +02:00
956a7cc263 Rename and update patches to align with new feature structure.
Some checks failed
SteamWarCI Build failed
2025-04-23 19:58:03 +02:00
0eb6b0403e Merge remote-tracking branch 'upstream/main' into update/1.21.4 2025-04-23 19:50:01 +02:00
42581a1d4b Fix Build
Some checks failed
SteamWarCI Build failed
2025-04-23 19:49:07 +02:00
wizjany
55f2020926 Fix CCE in LingeringPotionSplashEvent (#12463) 2025-04-22 21:08:29 +01:00
Illia Bondar
a820bdaeb9 [ci skip] Some javadoc fixes 2025-04-22 13:55:41 +02:00
Pedro Aguiar
df429932ca Fix floating warning log when the kick event is canceled (#12374) 2025-04-22 11:44:55 +02:00
Jakub Zacek
d22644aada Expand cooldown API (#12435) 2025-04-22 11:30:00 +02:00
Isaac - The456
def0532ffc Fix writing headers and update to be more papery (#12459) 2025-04-21 20:38:07 +02:00
Pedro
04b91129a5 Update projects dependents GitHub Action (#12436) 2025-04-21 20:28:15 +02:00
Spottedleaf
5f0b82925e Re-add chunk position check to regionfile recalculation patch 2025-04-19 12:40:59 -07:00
Pedro
89cdcba573 [ci skip] Replace wiki mention for BlockType#isOccluding (#12446) 2025-04-17 19:27:57 +02:00
Bjarne Koll
6c2b0378fe Use correct saved data key for maps 2025-04-16 20:26:53 +02:00
Shane Freeder
2948eb296d Mitigate an issue when loading a spigot config with null spam exclusion entries 2025-04-15 15:54:10 +01:00
Shane Freeder
a55345f991 Add support for deserializing manually deserialized items, also add caller note 2025-04-15 09:30:44 +01:00
Pedro
c0bd5688b5 Add logic for Human canUseEquipmentSlot (#12433) 2025-04-14 22:12:09 +02:00
David
6b4ad08259 Add PlayerRespawnEvent#isMissingRespawnBlock (#12422) 2025-04-14 19:43:19 +02:00
Bjarne Koll
ed322043d0 Clone blockpos in InsideBlockEffectApplier record 2025-04-14 18:31:39 +02:00
Emily
723b511fe1 Clone exit location passed to teleport event (#12354)
The exit location passed to PlayerTeleportEvent/PlayerTeleportEndGatewayEvent in ServerPlayer#teleport(TeleportTransition) needs to be cloned, as it is later compared in case it was changed. Not cloning it results in the ability for plugins to mutate it but such changes will be ignored, as the instance of the Location being the same results in a successful equality check.

It is not necessary to clone the location in other instantiations of the event (or subclasses) as those are not compared afterwards to change the outcome.
2025-04-14 17:28:29 +02:00
David
33e8928f53 Add support for bonus chest configuration in WorldCreator (#12344) 2025-04-14 17:24:19 +02:00
Bjarne Koll
de410d13ef Fix reobf mappings regression in GameRules.Type (#12437)
The recent commit 121a7bf4eb added
the interface FeatureElement to the GameRules.Type class to expose the
stored feature flags of gamerules.
This however messed with the reobf mappings spigot uses, as the now
overridden method requiredFeatures needs to be mapped to the same
obfuscated name as FeatureElement#requiredFeatures.

To avoid having this in the mappings patch, the commit removes the
inheritance again and instead exposes a wrapper method.
2025-04-14 17:05:01 +02:00
Bjarne Koll
7d5695d774 Improve ItemMeta#hasCustomModelData compatibility (#12414)
Ports the follow commits from spigot to paper.
All credits to go the respective commit authors listed below.

Bukkit: 47480cd07c0957a94b220f3087b851594b063e54
CraftBukkit: c6c8165aa0d5679b9b015b209c1645a222f8c3a6
CraftBukkit: d275d3b96e041f6421f3bb7de1e6022ea8be5456

By: md_5 <git@md-5.net>
By: Doc <nachito94@msn.com>
2025-04-14 13:23:39 +02:00
DerEchtePilz
121a7bf4eb Make GameRule a FeatureDependant (#12429) 2025-04-14 13:21:14 +02:00
KioProject
91bfb6fb7e Fix freeze locked (#12434) 2025-04-14 11:47:27 +02:00
Nassim Jahnke
dcb755acc6 Update log4j jd link
No longer available on javadoc.io apparently after 2.20.0
2025-04-14 11:28:43 +02:00
Nassim Jahnke
79036210c1 Remove json-simple imports from API, keep it as implementation in server 2025-04-14 10:24:42 +02:00
Nassim Jahnke
8ff94c6344 Update a bunch of dependencies
Either to match Vanilla or to update our own
2025-04-14 10:16:12 +02:00
TonytheMacaroni
1b889688a5 Add Entity#isTrackedBy (#12332) 2025-04-14 10:12:48 +02:00
Nassim Jahnke
de64e70458 Update spark 2025-04-14 09:19:47 +02:00
Illia Bondar
652cea57e8 Allow getAsString()-ing non-persistent entities (#12424) 2025-04-14 09:00:24 +02:00
Bjarne Koll
8f62e0fb31 Correctly order getArmorContents
Mojangs EQUIPMENT_SLOT_MAPPING uses an Int2ObjectArrayMap and hence
technically does provide iteration stability, however it is filled from
a MapN, which destroys the well order of the entries.
To iterate from smallest to largest inventory index correctly, this
commit introduces a sorted array based on the EQUIPMENT_SLOT_MAPPING.
2025-04-13 11:41:59 +02:00
masmc05
4511edb849 [ci skip] Don't promote checking enchantment by legacy lore (#12421) 2025-04-13 11:28:03 +02:00
Shane Freeder
f517267c0c Add passthrough for air serialization 2025-04-12 18:44:48 +01:00
Nassim Jahnke
93b6829e83 Also fix AbstractHorse getSize and isEmpty 2025-04-12 19:14:13 +02:00
Nassim Jahnke
8eede4bb8a Fix AbstractHorse get/setSaddle
Fixes #12412
2025-04-12 18:59:52 +02:00
Nassim Jahnke
f00727c57e 1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2025-04-12 17:27:00 +02:00
Shane Bee
0767902699 CraftBlock - fix applyBoneMeal false result (#12407) 2025-04-11 22:38:33 +01:00
Bjarne Koll
0cf731589a Bump to adventure 4.20.0 (#12391)
* Update adventure to 4.19.0

The update only includes a new configuration for MiniMessage,
specifically one to prevent it from emitting virtual components.
As virtual components break the generated component tree, items quickly
become unstackable with items generated before adventure 4.18.

Plugin developers may construct their own mini message instance which
will emit virtual components if they so choose.

* Bump to adventure 4.20.0
2025-04-07 13:29:57 +02:00
da0ba1e34b Update patches to latest 1.21.4
Some checks failed
SteamWarCI Build failed
2025-03-30 12:24:13 +02:00
6bc3fc6acd Merge remote-tracking branch 'upstream/main' into update/1.21.4 2025-03-30 11:43:18 +02:00
Nassim Jahnke
9b1798d643 Simplify custom payload handling (#12347) 2025-03-27 14:22:38 +01:00
TonytheMacaroni
c467df95a2 Add ItemStack#copyDataFrom (#12224) 2025-03-24 01:12:57 +01:00
Shane Bee
5a6ab97be6 Add config to remove player as vehicle restriction in /ride (#12327) 2025-03-24 00:55:15 +01:00
Tamion
515e12ca2d Check if BUNDLE_CONTENTS is present in InventoryClickEvent (#12321) 2025-03-24 00:38:25 +01:00
Strokkur24
37b9ca1f90 Add flush parameter to World#save (#12330) 2025-03-24 00:37:48 +01:00
Shane Bee
7819df10a4 Add getHeight method to ChunkData (#12311) 2025-03-24 00:33:34 +01:00
Pedro
f225858235 Fix firework entity not being removed when FireworkExplodeEvent is cancelled (#12268)
* Fix Firework not removed when FireworkExplodeEvent is canceled

* JUnit require pass null

* tweaks
2025-03-24 00:20:14 +01:00
Miles
058455e4ca InventoryView QOL open method (#12282)
* Add QOL open method to InventoryView

* Check to ensure the opening isn't a InventoryMenu, allow HorseMenus

* Fix instanceof against API instaed of AbstractContainerMenu

* [ci skip] Remove suggested comment
2025-03-23 23:46:10 +01:00
Nassim Jahnke
bb3b7e6979 Fix annotation mistakes 2025-03-23 22:33:28 +01:00
Shane Freeder
2aad131e74 Add config option for command spam whitelist 2025-03-23 18:31:39 +00:00
Matthew Peters
894631f0d0 Make advancement ordering predictable (#12292) 2025-03-21 17:52:42 +01:00
Shane Bee
f49d18df89 Add get/set customName to Skull block (#12302) 2025-03-21 17:52:00 +01:00
TonytheMacaroni
7cc6cb5013 Check for trailing input in ItemFactory#createItemStack (#12312) 2025-03-21 17:51:09 +01:00
Pedro
72f13f8bbb [ci skip] Mention API Checks for CONTRIBUTING.md (#12315) 2025-03-21 17:50:58 +01:00
Nassim Jahnke
9f00461456 Update a whole lot of deprecated annotations 2025-03-21 17:50:04 +01:00
Mart
bb1beda67b feat: add event to wind charge explode (#12248)
* feat: add event to wind charge explode

* fix: use correct parameters

* feat: allow setters to work

* fix: use consts

* Unify paper comments

---------

Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2025-03-17 10:54:49 +01:00
Nassim Jahnke
aaaeb4e1e6 [ci skip] Make compilation logs actually readable (#12276)
* [ci skip] Make compilation logs actually readable

* Specifically disable deprecation and removal warnings instead
2025-03-17 10:53:56 +01:00
David
2d3a1385f1 [ci skip] Refine recipe management API documentation. (#12287)
* Refine recipe management API documentation.

Improve Javadoc clarity for recipe addition methods, specifying client update behavior and stability considerations. Adjust formatting for better readability and consistency.

* Fix typo in original javadoc

---------

Co-authored-by: david <mrminecraft00@gmail.com>
2025-03-17 10:53:06 +01:00
Tamion
6ea42025a4 Send all attributes on respawn (#12274) 2025-03-13 12:41:03 +01:00
Nassim Jahnke
310f52293b Add unsupported config option and internal API to simplify remote item matching
This is important for 1.21.5 servers/clients and non-Vanilla clients that may not be able to match 1.21.5 data hashes anymore
2025-03-13 12:32:50 +01:00
Nassim Jahnke
c37b890c8b More deferred requireNonNull message creation 2025-03-13 12:27:12 +01:00
Pedro
f0388e2f38 Call EntityPushedByEntityAttackEvent for Mace AoE (#12257) 2025-03-12 11:13:47 +01:00
Tamion
102c8bbc54 Add config for updating equipment on player actions (#12275) 2025-03-12 11:09:27 +01:00
Github-Citizen
f4f275519f [ci skip] Clarify BlockFadeEvent#getNewState javadocs (#12250) 2025-03-09 21:58:56 +01:00
Spottedleaf
1a7288aa05 Adjust unloaded chunk check for block digging 2025-03-09 11:11:02 -07:00
0x22
743346a5da Force update attributes
See https://github.com/PaperMC/Paper/pull/12241/
2025-03-09 11:11:02 -07:00
Bjarne Koll
e5d988df85 Revert "Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215)"
This reverts commit a2b0ff0644.
2025-03-09 18:39:08 +01:00
Warrior
7afae7f465 Add client tick end event (#12199) 2025-03-09 13:14:44 -04:00
MiniDigger | Martin
3d13b11514 fix: switch back to using a snapshot for velocity-natives
we delete old snapshots (age > 10 days), keeping only the last 5 at minimum
2025-03-09 10:28:05 +01:00
Shane Bee
34c794dc51 ServerTickManager#requestGameToSprint - Silence command like feedback (#12220)
* CraftServerTickManager - silence feedback when sprinting

* CraftServerTickManager - forgot secondary note

* ServerTickRateManager - only set to silent if not already sprinting
2025-03-08 17:09:40 -05:00
Lulu13022002
2565497897 Cancel PlayerLaunchProjectileEvent properly for enderpearls (#12223) 2025-03-08 17:02:10 -05:00
Lulu13022002
df96f8a0fa Correctly handle events for end portal (#12246) 2025-03-08 16:59:43 -05:00
Noah van der Aa
a2b0ff0644 Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215)
---------

Co-authored-by: Warrior <50800980+warriorrrr@users.noreply.github.com>
2025-03-08 16:52:10 -05:00
Esophose
43f37b1b5e Remove ItemFactory#enchantWithLevels range check for vanilla parity (#12209) 2025-03-08 15:38:14 -05:00
Tamion
20df25d3a5 Don't resync all attributes when updating scaled health (#12232) 2025-03-08 12:31:21 -08:00
TonytheMacaroni
2526fe063a Add type to represent unimplemented data component types (#12222) 2025-03-08 15:20:53 -05:00
Shane Bee
8e69d981fa Player - Expose player score (#12243) 2025-03-08 11:38:50 -08:00
Spottedleaf
4519857817 Set old position / rotation for newly created entities
Set the old pos/rot to be the same as the current pos/rot for new
entities as the default value for the old pos/rot is zero.

Fixes https://github.com/PaperMC/Folia/issues/302
2025-03-08 06:33:29 -08:00
Lulu13022002
ce30016218 Skip alpha channel for custom model data component (#12205) 2025-03-07 23:27:05 -05:00
Lulu13022002
a6ce734fd0 Fix zombie villager not dropping item once cured (#12230) 2025-03-07 23:13:25 -05:00
Lulu13022002
7a3d0c4e98 Fix recipe being always null in PrepareItemCraftEvent from the api (#12237) 2025-03-07 23:11:12 -05:00
0x22
0a4eb8f3bb Send the pong response packet immediately. This packet is similar to the keep alive packet and is processed async. (#12242) 2025-03-07 19:40:58 -08:00
Vincenzo Reina
5538d24d72 Fix "DEFAULT" SpawnReason of fish spawned by bucket (#12227)
* Add SpawnReason "Bucket". Fix "DEFAULT" SpawnReason for entity spawning from mob bucket

* Clarify SpawnReason description for bucket entity spawning
2025-03-05 13:28:25 +01:00
tgbhy
a866e366b2 Fix MenuType.SMITHING JavaDocs (#12226) 2025-03-05 10:45:16 +01:00
Dylan
8de7e356fa Add null check to level ref in Entity constructor (#12218) 2025-03-03 17:46:20 +01:00
Warrior
1d5e5a57e9 Document replacement for Skull owner profile methods (#12195) 2025-02-28 20:51:39 +01:00
Warrior
b506626824 Remove unused light queue size option (#12201) 2025-02-28 17:58:45 +01:00
okx-code
0a6e7435b3 Fix invulnerability damage and armour (#12190) 2025-02-26 14:06:42 +01:00
Jake Potrebic
9421f22372 Make CustomArgumentType use parse(reader,source) (#12191) 2025-02-26 13:12:23 +01:00
Warrior
f63dbeafde Fix cancelled HangingPlaceEvent inventory desync (#12161) 2025-02-25 22:33:35 +01:00
Pedro
fc56c728c0 Add methods for Creaking (#12094) 2025-02-25 22:23:47 +01:00
Lulu13022002
9b9f046f41 Remove broken code (#12171) 2025-02-25 22:14:21 +01:00
_Novit_
7f3d3591de Use MiniMessage#deserialize(String, Pointered) in sendRichMessage for send messages (#12177) 2025-02-25 22:06:20 +01:00
Warrior
a501c45918 Deprecate server config getters (#12189) 2025-02-25 22:03:38 +01:00
Warrior
ca2610904b Don't process empty rcon commands (#12188) 2025-02-25 22:03:14 +01:00
Glicz
b00875f86d Add a method on Registry to get the size (#12182) 2025-02-25 22:02:48 +01:00
Warrior
5f2ee83ed4 Fix first execution of async delayed/repeating tasks being sync (#12166) 2025-02-25 21:45:33 +01:00
Warrior
1d9b399427 Add config option for failed beehive release cooldowns (#12186) 2025-02-25 21:45:18 +01:00
Nassim Jahnke
f12d33f04e Track codec writing 2025-02-25 21:45:02 +01:00
Bjarne Koll
9be4e07a3e Pin snapshot dependencies (#12185)
Additionally pins configurate-core as a transitive dependency of
configurate-yml, as the yaml snapshot depends on a snapshot itself.
2025-02-25 21:44:42 +01:00
Spottedleaf
636ae0cd87 Add missing Paper comments to player movement patch 2025-02-24 21:32:39 -08:00
Jason Penilla
fcb2e81590 Clear lastSection on game event listener removal
Fixes https://github.com/Tuinity/Moonrise/issues/87

See comments in code
2025-02-24 21:32:39 -08:00
bonan
e5a8ee849f Hide soul speed particles for vanished players (#12152)
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
2025-02-21 12:02:32 +01:00
Bjarne Koll
7b4d44f573 Revert "Always pass event block to damage source (#12158)"
This reverts commit ab984a0711.

The block damage is null *and has been* null in cases where the block
has already been cleared. Consumers are supposed to use the
getDamagerBlockState instead.
2025-02-21 11:52:04 +01:00
Bjarne Koll
ab984a0711 Always pass event block to damage source (#12158)
Always passes the respective block to a damage source when passing a
block state. While we could technically use the damageSourcePosition
here by, we'd have to translate it back to a block position by
subtracting .5 from all its components.
Such behaviour however relies on the caller logic's mutation of the
damageSourcePosition and will break once this position is not the centre
of the block.

Passing in the block at the specific callsite is a lot more future
proof.
2025-02-20 20:22:46 +01:00
Emilia Kond
5e2a3bc0e2 Call EntityChangeBlockEvent with correct block when waxing (#12154) 2025-02-20 10:46:11 +01:00
Warrior
edda0db18b Fix server crash when no enchantments are present (#12149) 2025-02-18 15:44:52 +01:00
Warrior
09f1f88f58 Fix getForwards/SidewaysMovement for players (#12140) 2025-02-18 01:03:48 +01:00
Jake Potrebic
f070081825 Remove Experimental from TypedKey (#12134) 2025-02-17 15:33:26 -08:00
Jake Potrebic
b386a8f527 Add simpler JavaPlugin command registration (#12142) 2025-02-18 00:21:29 +01:00
Epic
e494f2894e Correctly call BlockFadeEvents (#12141) 2025-02-18 00:19:30 +01:00
Bjarne Koll
142695eb00 Default minecraft alias to redirect (#12146)
While the running server will still be using the recently introduced
copy-mechanic for vanilla command namespacing, the data converter logic
relies on the fact that namespaced aliases were redirects as well.

To not break the converted, the commands type now takes a modern flag
only set by the running server.
2025-02-18 00:09:54 +01:00
Jake Potrebic
d26a9e90c8 Fix plugin commands (#12144) 2025-02-17 15:00:06 -08:00
Bjarne Koll
3b9106c7d1 Readd dead redirect recovery (#12136)
While the paper command system no longer uses redirects for namespaced
registration, vanilla still does. This means that removal of vanilla
redirecting target nodes still causes issues, e.g. the removal of the
vanilla 'msg' node in favour of a command alias one.
Redirecting nodes like tell, minecraft:msg and minecraft:tell are broken
by this and need to by flattened before sending them to the client.
2025-02-17 23:51:52 +01:00
Dqu1J
fd69140d80 Fix disable-tripwire-updates option not cancelling tripwire hook updates (#12129) 2025-02-17 20:07:02 +01:00
Miles
8eb8e44ac3 Allow For Default Titles in InventoryView Builders (#12013) 2025-02-16 23:07:00 +01:00
Jake Potrebic
84609dc046 Don't auto-create any brig redirects (#11954) 2025-02-16 13:55:27 -08:00
FlorianMichael
88cdd22076 Fixup luck and random implementation in CB loot-tables (#11926) 2025-02-16 13:06:01 -08:00
Warrior
b27e11cce6 Fix bad world to chunk coordinate example in javadocs (#12131) 2025-02-16 13:04:15 -08:00
Tamion
60394c5b98 Fix PlayerReadyArrowEvent cancellation desync (#12111) 2025-02-16 21:44:08 +01:00
Jake Potrebic
28d07dc5ab use correct spigot plugin count 2025-02-16 12:18:29 -08:00
Pedro
06f96dd655 Improvement in /plugins command (#12121) 2025-02-16 12:10:45 -08:00
TonytheMacaroni
2a4a115432 Add EntityEquipmentChangedEvent (#12011) 2025-02-16 20:46:59 +01:00
Creeam
a3781ff3be Separate tick count to ensure vanilla parity (#12077) 2025-02-16 20:46:37 +01:00
Chaosdave34
b9023b5dc3 Add EntityAttemptSmashAttackEvent (#12113) 2025-02-16 20:19:28 +01:00
Lulu13022002
7bee99714a Cleanup damage source a bit (#12106) 2025-02-16 20:14:00 +01:00
Jake Potrebic
608f004a2c add method on ItemStack to edit pdc (#12022) 2025-02-16 11:01:37 -08:00
Pedro
00701267c8 [ci skip] improvement example in javadoc for DatapackRegistrar (#12122) 2025-02-16 19:19:42 +01:00
Pedro
cb25c0cf31 [ci skip] Fix annotation fields used in NMS getBukkitEntity (#12120) 2025-02-16 19:17:26 +01:00
Warrior
a6e82d90ce [ci skip] Clarify getChunkAtAsyncUrgently javadocs (#12125) 2025-02-16 19:13:35 +01:00
masmc05
404167841d [ci-skip] Mention missing World#regenerateChunk implementation in jd (#12109)
* Mention missing impl

* Clean the implementation out of years old code

* Change the jd comment

* Move to default method

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2025-02-15 23:31:42 +01:00
Epic
c62252e19f Add lore content guard (#12116)
* add content guard

* use preconditions for null check
2025-02-15 23:30:32 +01:00
Space Walker
9b9de82706 Update Alternate Current patch to v1.9.1 (#12115) 2025-02-15 12:40:31 +01:00
David
6cfa2f7f31 [ci skip] Add missing nullability annotation to sendEquipmentChange method (#12112)
Marked ItemStack parameter as `@Nullable` to explicitly indicate it can be null. This improves clarity, avoids nullability problems, and aligns with the method's documented behavior for handling null values.
2025-02-14 18:39:44 +01:00
David
46f4fdaae3 Add support for rotation argument handling (#12090) 2025-02-12 23:30:41 +01:00
Pedro
0680485095 Expand TrialSpawner API (#12025) 2025-02-12 23:24:46 +01:00
Lulu13022002
0a04c3fe22 Fix some NPEs (#12105) 2025-02-12 23:15:37 +01:00
Warrior
e616498ed7 Add Vault block API (#12068) 2025-02-12 23:15:22 +01:00
Lulu13022002
a06179a018 Update entity effect (#12104) 2025-02-12 23:14:07 +01:00
Warrior
1be2e5f311 Fix vanilla map decorations sending when not dirty (#12098) 2025-02-12 23:13:34 +01:00
Tamion
072a8317b2 Add proper attached blocks API to AbstractArrow (#12099) 2025-02-12 23:13:07 +01:00
Pedro
cf7c6c7483 [ci skip] Fix incomplete example in javadocs for PostFlattenTagRegistrar (#12103) 2025-02-12 11:27:13 +01:00
Pedro
db2aa1803d [ci skip] Fix incomplete example in javadocs for PreFlattenTagRegistrar (#12102) 2025-02-12 11:16:40 +01:00
aerulion
13c80a5eb3 [ci skip] Fix PlayerShearBlockEvent javadoc typos (#12101) 2025-02-12 11:06:42 +01:00
David
3bd69f2e56 [ci skip] Enhance javadoc for World#setAutoSave method (#12088)
Clarify that disabling auto-save does not stop all saving operations. This addition explicitly mentions that the world will still save on shutdown and explains the intended purpose of the method.
2025-02-10 23:07:46 +01:00
Owen
fa5824e4c8 Add skipTripwireHookPlacementValidation (#12091)
This allows for the configuration of tripwire hook duping.
2025-02-10 23:04:38 +01:00
Dreeam
cafef9ce9b [ci skip] Move EntityUtil to correct directory (#12092) 2025-02-10 13:34:52 +01:00
Bjarne Koll
edacfdf462 Do not queue player info packets (#12080)
Player info packets carry chat state to other clients since the
introduction of chat signatures. Queuing these packets while force
pushing chat packets allows for potentially inverted packet order, which
may cause chain corruption on clients.
2025-02-09 11:51:11 +01:00
Lulu13022002
eff617b8f8 [ci skip] Deprecate Server#setSpawnRadius (#12024) 2025-02-08 22:10:08 +01:00
Lulu13022002
1a04e96ab7 Fix EntityBreedEvent cancellation (#12046) 2025-02-08 20:59:13 +01:00
Jason Penilla
61312fdb59 Switch to jspecify annotations for Player (#12042)
Fixes compilation issues for plugins from recent API addition with double-annotated parameter (JetBrains annotations are type-use and parameter, so nonnull array of nonnull elements ends up with duplicates)
2025-02-08 20:57:35 +01:00
Lulu13022002
51acc802b8 Prevent duplicate raider in RaidSpawnWaveEvent list (#12040) 2025-02-08 20:55:57 +01:00
Roni Äikäs
cb6c57e0f8 Fix Squid and Dolphin spawn height (#12045) 2025-02-08 20:24:07 +01:00
masmc05
786ddf53c6 Default piston block entity direction to DOWN (#12039) 2025-02-08 20:17:45 +01:00
David
53ae5c95b7 Make Sittable interface extend Entity (#12016) 2025-02-08 20:16:23 +01:00
Shane Freeder
597dcfffb9 Add support for lz4 (#12053)
Mojang added this early 2024, however, it wasn't ever added to the actual config option
inside of paper
2025-02-08 19:07:43 +01:00
Warrior
742968e078 [ci skip] Increase outdated build delay to two weeks (#12063) 2025-02-04 18:34:11 +00:00
Warrior
5395ae37bd Fix composter block setting bukkit owner twice (#12058) 2025-02-02 22:38:01 +01:00
Spottedleaf
8927091a08 Do not record movement for vehicles/players unaffected by blocks
If the player is not affected by movement through blocks, then
storing the movement would eventually invoke logic to apply effects
caused by moving through such blocks. For example, moving through
a portal in spectator mode and then later switching to creative mode
would portal the player.
2025-02-02 11:16:59 -08:00
Lulu13022002
e0711af5d5 Deprecate UnsafeValues#getSpawnEggLayerColor (#12041) 2025-01-31 13:17:45 +01:00
Lulu13022002
5bcfb12a99 Fix activation range config and water animal status (#12047) 2025-01-31 13:13:14 +01:00
Lulu13022002
d4a957849c Experimental annotation changes (#12028) 2025-01-30 20:02:14 +01:00
Spottedleaf
54b2e9d973 Add buffer to CraftWorld#warnUnsafeChunk
This allows plugins to access chunks slightly outside of the
max world border (such as ones which may be loaded naturally
by players) without tripping any logs.
2025-01-28 17:43:30 -08:00
Spottedleaf
e2f0efd1af Remove nms.Entity#isChunkLoaded
This method was used pre 1.17 era where an Entity was explicitly
tied to a (then called) Chunk's entity slices. If an entity
was not inside a Chunk, then it was considered invalid as
it was not possible to save the entity.

In 1.17+, entities are now tied to a separately tracked entity
section management system. This system is far more reliable now
as it no longer requires a full chunk load to properly track
entities for saving. As a result, an Entity if inside the world
is always attached to some entity chunk section (except in rare
cases in Vanilla which are fixed in Moonrise).

As a result, whether the chunk the entity is in is loaded is no
longer an indication of whether they are tracked in the world
and we can reliably infer that the entity is correctly in the
world through the valid field alone.

Additionally drop the isInWorld() check, as valid=true implies
isInWorld=true. More importantly, the isInWorld() check invokes
getHandle which may trip a thread check on Folia. This will fix
World#getEntities() and friends exploding on Folia.

However, World#getEntities() on Folia still cannot reliably return
all entities in the world as actions such as cross-region
(not cross-world) teleporting will remove entities from the world.
2025-01-28 17:33:48 -08:00
Spottedleaf
1004374a83 Add further information to thread check errors
The entity data is more complete, which will help debug problems
on Folia.
2025-01-28 13:43:34 -08:00
Spottedleaf
a392d475c2 Make Watchdog thread extend TickThread
This allows the watchdog thread to be seen as the
primary thread during shutdown, which prevents it
from tripping thread checks in various areas.

Fixes https://github.com/PaperMC/Paper/issues/12030
2025-01-27 16:35:23 -08:00
Spottedleaf
5a34bf0425 Correctly retrun true for empty input shapes in EntityGetter#isUnobstructed
Vanilla will return true for empty shapes, so we should as well.
2025-01-27 13:45:44 -08:00
caramel
7e21cb8181 fix PlayerChangedMainHandEvent javadoc (#12020)
* fix PlayerChangedMainHandEvent javadoc

* Obsolete

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2025-01-26 14:00:32 -08:00
masmc05
3af5e77132 Add Player#give (#11995) 2025-01-26 21:19:00 +01:00
EnZaXD
fb5b173c6a Add PlayerClientLoadedWorldEvent (#11940) 2025-01-25 21:47:08 +01:00
Pedro
2477f1f6a9 [ci skip] fix and improvements for docs in ConsumeEffect component (#11998) 2025-01-25 21:39:25 +01:00
Warrior
ce95b5d653 Use proper default for setting null display background color (#12010) 2025-01-25 21:33:47 +01:00
Creeam
81bb82f521 Fix wrong piston world border check (#12007) 2025-01-25 21:13:21 +01:00
Tamion
939bb7828f Add RayTraceConfigurationBuilder (#11907) 2025-01-25 20:58:16 +01:00
Creeam
336ea9dfeb Check for empty when sending equipment changes (#12008) 2025-01-25 20:04:47 +01:00
Spottedleaf
88bbead13b Flush regionfiles on save configuration option
The windows file system does not write metadata unless
the FileChannel is explicitly flushed with metaData=true.

Note: Setting SYNC (not DSYNC) on the FileChannel does not appear
to write the metadata.

Specifically, we are interested in writing the last modified
timestamp so that fs watchers can detect when RegionFiles are
modified.
2025-01-22 11:55:39 -08:00
TomTom
30046e0410 Fix a rare crash with a concurrent modification of scaled health attributes (#12002) 2025-01-22 18:58:44 +00:00
Bjarne Koll
6b7650d81b Only add goat horn once (#12001) 2025-01-22 18:20:24 +01:00
Pedro
30fdfb1aa1 [ci skip] Fix docs for DamageResistant (#11992) 2025-01-20 15:47:07 +01:00
Pedro
73f7736eb9 Drop patch for MC-273635 fixed in MC 1.21.4 (#11987) 2025-01-18 14:30:13 +01:00
Shane Freeder
a35cfe93f9 Correct version of some network related dependencies 2025-01-17 15:31:45 +00:00
Shane Freeder
e150ffd272 Add missing final
"muh checkstyle" more like "muh missing style config"
2025-01-17 13:49:38 +00:00
Shane Freeder
938a84fc39 Add missing TagSerializable to GsonDataComponentValue converter (Fixes #11768) 2025-01-17 13:47:28 +00:00
Jason Penilla
b1b88cd316 [ci skip] Update paperweight to 2.0.0-beta.14 2025-01-15 12:58:10 -07:00
Nassim Jahnke
cd9d6d6998 Allow duplicate relative flags in entity teleport
Fixes #11976
2025-01-15 12:13:58 +01:00
Jason Penilla
b6be7cd0ae [ci skip] Move generated API sources to src/generated/java (#11977)
This removes a required patch set for forks.
2025-01-14 21:38:56 -07:00
Bjarne Koll
8e80d4e158 Correctly construct StructureManager 2025-01-14 19:21:52 +01:00
Bjarne Koll
209e5f8580 Readd dropped hunk for ender dragon fight data (#11975)
Dragon fight data should be read from the now split world instead of the
main world level.dat.
Partial hunk was dropped during hardfork.
2025-01-14 19:03:30 +01:00
Bjarne Koll
eeec611b9d Fix zombie villager infection chance hunk (#11974)
Dropped during hardfork, now moved to a false-ed out if statement to
prevent dropping in future updates.
2025-01-14 17:15:47 +01:00
Bjarne Koll
9f74858760 [ci skip] Cleanup test plugin 2025-01-14 14:36:30 +01:00
masmc05
e82f7e6bb6 [ci skip] Fix Inventory#setMaxStackSize jd (#11968) 2025-01-14 13:43:28 +01:00
masmc05
85d0040f57 [ci skip] Fix getTemperature javadocs (#11967)
In 1.15 spigot changed the behavior of all temperature methods to always return height adjusted temperature.
Correctly reflect this in the javadocs.
2025-01-14 13:42:34 +01:00
masmc05
c44f891d99 Fix PlayerUseUnknownEntityEvent jd (#11969) 2025-01-14 12:11:20 +01:00
Jake Potrebic
fe75eaf09a split direct holder support up from ctor accepting Holder
Enchantment shouldn't support direct holders despite the ctor
accepting a Holder type. We want to limit the types
to ones that are actually used as direct holders in the game
2025-01-13 20:12:13 -08:00
Jake Potrebic
6fde26d7f8 remove .paperassetsroot
No longer needed with new build system
2025-01-13 18:48:51 -08:00
Jason Penilla
d69981b611 [ci skip] Remove redundant build configuration
This is already the default path for the reobf mappings patch.
2025-01-13 13:51:40 -07:00
Bjarne Koll
1bb3677651 Remove deprecation from EntityRemoveEvent (#11961)
Bukkits entity remove event is called at a different time than the
existing paper event, specifically it is called after an entity has been
stored during chunk unloads.

This means that, while the bukkit event can have a defined reason, it
does not allow modification to the entity data. In this regard it
differs from the paper implementation and prevents developers from using
the paper event as an alternative.

Co-authored-by: TonytheMacaroni <tonythemacaroni123@gmail.com>
2025-01-13 17:51:58 +01:00
Tamion
ab1b312064 Call PlayerItemDamageEvent for tridents (#11899) 2025-01-12 15:29:52 -08:00
Jake Potrebic
5e23d28ad2 Remove entity tag selector tag completion fix (#11964)
The fix was causing too many issues, it really needs a client-side fix
MC-235045
2025-01-12 15:07:24 -08:00
masmc05
3709150bc1 Expose all possible block data states (#11958) 2025-01-12 14:56:56 -08:00
Emily
50c2c59c4e Fix unstable Suggestion comparison by sorting int suggestions before text ones (#11941) 2025-01-12 23:49:29 +01:00
Pedro
ad74b673fa Fix client visual desync if cooldown events are cancelled (#11892) 2025-01-12 22:56:11 +01:00
Lulu13022002
2ea6aee343 Deprecate Turtle#isDigging (#11959) 2025-01-12 12:49:25 -08:00
Creeam
86c6308faf Fix locate command dist overflow/underflow (#11956) 2025-01-12 17:55:45 +01:00
caramel
76617ddf43 Add EntityEffectTickEvent (#11838) 2025-01-12 17:50:22 +01:00
Tamion
eb4db794eb Make CommandSourceStack respect hidden players (#11898) 2025-01-12 17:50:08 +01:00
Bjarne Koll
e5542cfdc3 Hide unnecessary decorated pot data (#11957)
Prevent decorated pots from sending their contents to clients as
contents are not needed for rendering.
2025-01-12 17:49:49 +01:00
Nassim Jahnke
9746d73ade Add back known movement check 2025-01-12 15:29:07 +01:00
masmc05
08ac057fda Rename getPotentialBedLocation to getPotentialRespawnLocation (#11950) 2025-01-12 02:17:46 +01:00
Noah van der Aa
ed75b0e54b Disallow calling JavaPlugin#getCommand during onEnable for Paper plugins (#11914)
Co-authored-by: leguan <longboard.noah@gmail.com>
2025-01-11 22:46:36 +01:00
Strokkur24
c2f24e1567 Feat: Add 'with' methods to CommandSourceStack (#11868) 2025-01-11 13:29:16 -08:00
Miles
c94922514a MenuType API addition InventoryView Builders (#11816) 2025-01-11 20:21:24 +01:00
David
775002a357 [ci skip] Remove nullable from SyncedEntityData#packAll (#11949) 2025-01-11 20:03:13 +01:00
Jake Potrebic
ac3aaa248b Don't use delayed registries in impl anywhere (#11918) 2025-01-11 20:02:28 +01:00
Tamion
19ddbeff9e Fix InventoryAction wrong for Bundles (#11902) 2025-01-11 19:50:24 +01:00
Miles
79ffcd1536 Fix vanilla parity on enchantable items with no targets (#11896) 2025-01-11 18:44:20 +01:00
Spottedleaf
3ad3fbc19a Update to Concurrentutil 0.0.3 2025-01-11 06:28:56 -08:00
Spottedleaf
3d9ecc4e08 Log thread check parameters when the thread check fails
This provides additional debug information that may be useful.
2025-01-11 04:56:54 -08:00
Shane Bee
3e42518b34 Fix snow accumulating in custom biomes without precipitation (#11854) 2025-01-11 11:10:32 +01:00
SoSeDiK
b242f1eb15 Prevent day cycle on the client when using fixed time (#11924) 2025-01-11 10:59:50 +01:00
Owen
ea7b961926 Fix MapItem incorectly fetching water biomes on treasure maps (#11936) 2025-01-11 10:49:31 +01:00
Spottedleaf
6316a50dbd Make CraftServer#isPrimaryThread use TickThread check
This diff was accidentally dropped when updating to hard fork.

This diff importantly:
 - Does not return true if the async catcher is disabled
 - Does not return true during shutdown
 - Returns true for any instance of TickThread (enables
   watchdog and Folia threads to be considered main)
2025-01-11 00:13:45 -08:00
Jason Penilla
b03d39b5ce [ci skip] Update paperweight to 2.0.0-beta.13 2025-01-10 21:01:17 -07:00
Bjarne Koll
1b38f2810e Fix reading recipes used on furnace (#11947) 2025-01-10 19:49:58 +01:00
Bjarne Koll
400717174e Correct obfuscation of oversized items (#11944) 2025-01-10 14:38:50 +01:00
Pedro
5e14504f20 [ci skip] Add missing deprecated docs for isEnabledByFeature (#11938) 2025-01-09 21:08:28 +01:00
spring-dependency-management
08fc33ca03 Update CustomTimingsHandler Nag Message (#11923) 2025-01-09 19:02:03 +01:00
Owen
55f3f280cb Reimplement ItemStack Obfuscation (#11817)
Reimplementation of the itemstack obfuscation config that
leverages the component patch map codec to drop
unwanted components on items or replaces them with
sanitized versions.

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2025-01-09 18:58:18 +01:00
Isaac - The456
efdcaa25ee Fix removing the "LootTable" nbt tag from Block entities (#11929)
This bug affects vanilla, and was reported as MC-279196
2025-01-09 18:44:50 +01:00
Warrior
b34ae4fb3c Fix wolves ignoring result of damage event (#11932) 2025-01-08 21:46:58 +01:00
Lulu13022002
49d15f6345 Fix DiscoveredDatapack#getSource (#11928) 2025-01-07 19:40:45 +01:00
Warrior
337557044e Fix MapCanvas#drawImage (#11865) 2025-01-07 13:54:34 +01:00
Jake Potrebic
486e521105 Re-add droped MapLike spam fix (#11917) 2025-01-05 19:07:35 +01:00
Tamion
9f90b4c324 Fix ItemDamageEvents called for 0 damage (#11900) 2025-01-04 21:54:40 +01:00
Pedro
f367f107cf Add rotation helpers to Location (#11908) 2025-01-04 21:54:27 +01:00
Pedro
33a590bca6 Fix TargetHitEvent#getSignalStrength() post-hard-fork (#11897) 2025-01-04 21:30:41 +01:00
ChromMob
6ab13521b7 Improve performance of PoiCompetitorScan by unrolling stream (#11871) 2025-01-04 21:23:21 +01:00
Shane Bee
4106da712c Fix retain passengers teleport flag (#11858) 2025-01-04 21:19:07 +01:00
Pedro
edde7264c6 [ci skip] Add missing Nullable annotations for NMS DamageSource (#11875) 2025-01-03 11:22:20 -08:00
Hannes Greule
daddcf6742 Fix JOML javadoc URL (#11883) 2025-01-02 08:15:47 +00:00
Noah van der Aa
83995d7e80 Fix settings changes not being saved (#11881)
Closes #11878
2025-01-01 21:56:23 +01:00
Nassim Jahnke
1dd52bed49 Use playerlist whitelist status instead of properties
The actual property value is final, only the serialized output is changed. This uses the correct value from PlayerList instead
Fixes #11878
2025-01-01 18:53:23 +01:00
Lixfel
d764c3ff8c Merge pull request 'Merge Latest Changes' (#2) from update into main
Some checks failed
Build Paper / build (21) (push) Has been cancelled
Build Paper / Event File (push) Has been cancelled
Reviewed-on: https://steamwar.de/devlabs/SteamWar/Paper/pulls/2
2025-01-01 12:39:18 +01:00
powercas_gamer
bdfad1c838 Add sendRich/PlainMessage methods to Server (#11872) 2024-12-31 19:47:57 -05:00
53747c723b Merge remote-tracking branch 'upstream/main' into update 2024-12-31 17:12:20 +01:00
Jason Penilla
9298f593b7 Update paperweight to 2.0.0-beta.10 2024-12-30 12:35:18 -08:00
David
1e4669e8be [ci skip] Clarify loot table behavior when set to null. (#11861)
Updated documentation to specify that setting a null loot table resets it to its default behavior.
2024-12-30 11:07:40 +01:00
Nassim Jahnke
a81990e0e8 Update mache, fixes dev bundle use with Java 23 2024-12-30 11:04:58 +01:00
Nicolas RAYNAUD
60edd611f2 [ci skip] Fix spelling of ignition's word into javadoc (#11864) 2024-12-29 22:30:51 +01:00
Jake Potrebic
d00344af65 update jb annotations to 26.0.1 (#11860) 2024-12-29 06:53:38 -08:00
Bjarne Koll
887f3f74d1 [ci skip] Replace FQN with import in EventExecutor 2024-12-29 00:34:45 +01:00
Hannes Greule
287eb52fa4 Use hidden classes for event executors (#11848)
Static final MethodHandles perform similar to direct calls. Additionally,
hidden classes simplify logic around ClassLoaders as they can be defined
weakly coupled to their defining class loader. All variants of methods
(static, private, non-void) can be covered by this mechanism.
2024-12-29 00:11:09 +01:00
Strokkur24
93a3df085c Extend HumanEntity#dropItem API (#11810) 2024-12-28 23:47:21 +01:00
a6bd638bab Compile pls? 2024-12-26 18:50:36 +01:00
04924c1385 Revert "Fix Compile?"
This reverts commit 44cf7ff229.
2024-12-26 11:00:01 +01:00
44cf7ff229 Fix Compile? 2024-12-26 10:58:07 +01:00
Lixfel
c06d6c6ae2 Merge pull request 'Paper 1.21.4 & Hardfork' (#1) from init into main
Reviewed-on: https://steamwar.de/devlabs/SteamWar/Paper/pulls/1
2024-12-26 10:49:10 +01:00
Lixfel
eb48d457d9 Change maven name to prevent automatic compilation failures 2024-12-26 10:48:44 +01:00
1f3cbc08da SW Remove Debug Message 2024-12-25 12:37:36 +01:00
94b0d30c7f SW Disable Commands 2024-12-25 12:37:24 +01:00
2833e4c0a5 SW Remove Worldlock and Symlink Check 2024-12-25 12:37:14 +01:00
2634 changed files with 101546 additions and 57425 deletions

View File

@@ -1,32 +1,34 @@
root = true
[*] [*]
charset=utf-8 charset = utf-8
end_of_line=lf end_of_line = lf
insert_final_newline=true insert_final_newline = true
indent_style=space indent_style = space
indent_size=4 indent_size = 4
ij_any_block_comment_add_space = false ij_any_block_comment_add_space = false
ij_any_block_comment_at_first_column = false ij_any_block_comment_at_first_column = false
ij_any_line_comment_at_first_column = false ij_any_line_comment_at_first_column = false
ij_any_line_comment_add_space = true ij_any_line_comment_add_space = true
[*.tiny] [*.tiny]
indent_style=tab indent_style = tab
[*.bat] [*.bat]
end_of_line=crlf end_of_line = crlf
[*.yml] [*.yml]
indent_size=2 indent_size = 2
[*.patch] [*.patch]
trim_trailing_whitespace=false trim_trailing_whitespace = false
[*.java] [*.java]
ij_continuation_indent_size = 4 ij_continuation_indent_size = 4
ij_java_class_count_to_use_import_on_demand = 999999 ij_java_class_count_to_use_import_on_demand = 999999
ij_java_insert_inner_class_imports = false ij_java_insert_inner_class_imports = false
ij_java_names_count_to_use_import_on_demand = 999999 ij_java_names_count_to_use_import_on_demand = 999999
ij_java_imports_layout = *,|,$* ij_java_imports_layout = *, |, $*
ij_java_generate_final_locals = true ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true ij_java_generate_final_parameters = true
ij_java_method_parameters_new_line_after_left_paren = true ij_java_method_parameters_new_line_after_left_paren = true
@@ -40,5 +42,5 @@ ij_java_use_fq_class_names = true
[paper-server/src/minecraft/resources/data/**/*.json] [paper-server/src/minecraft/resources/data/**/*.json]
indent_size = 2 indent_size = 2
[paper-api-generator/generated/**/*.java] [paper-{server,api}/src/generated/java/**/*.java]
ij_java_imports_layout = $*,|,* ij_java_imports_layout = $*, |, *

View File

@@ -19,34 +19,39 @@ jobs:
# The goal of the build workflow is split into multiple requirements. # The goal of the build workflow is split into multiple requirements.
# 1. Run on pushes to same repo. # 1. Run on pushes to same repo.
# 2. Run on PR open/reopen/syncs from repos that are not the same (PRs from the same repo are covered by 1) # 2. Run on PR open/reopen/syncs from repos that are not the same (PRs from the same repo are covered by 1)
# 3. Run on labeled PRs that have the build-pr-jar flag. # 3. Run on labeled PRs that have the publish-pr flag.
if: > if: >
( (
(github.event_name == 'push') (github.event_name == 'push')
|| (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name && contains(fromJSON('["opened", "reopened", "synchronize"]'), github.event.action)) || (github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name && contains(fromJSON('["opened", "reopened", "synchronize"]'), github.event.action))
|| (github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'build-pr-jar') || (github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'publish-pr')
) )
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix:
java: [21]
fail-fast: true fail-fast: true
steps: steps:
- if: ${{ github.event_name == 'push' }} - if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
# todo remove me again after the update
ref: ${{ github.ref_name }}
fetch-depth: 0
- if: ${{ github.event_name == 'pull_request' }} - if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- name: JDK ${{ matrix.java }} - name: JDK 21
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
java-version: ${{ matrix.java }} java-version: 21
distribution: 'zulu' distribution: 'zulu'
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v4 uses: gradle/actions/setup-gradle@v4
with:
# Allow cache writes on main and dev branches
cache-read-only: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/dev/') }}
- name: Configure Build - name: Configure Build
uses: actions/github-script@v7 uses: actions/github-script@v7
@@ -69,14 +74,14 @@ jobs:
if (event_name === "push" && ref_type === "branch") { if (event_name === "push" && ref_type === "branch") {
const {data: pulls} = await github.rest.pulls.list({ owner, repo, head: `${owner}:${ref_name}`, state: "open" }); const {data: pulls} = await github.rest.pulls.list({ owner, repo, head: `${owner}:${ref_name}`, state: "open" });
const pull = pulls.find((pr) => !!pr.labels.find((l) => l.name === "build-pr-jar")); const pull = pulls.find((pr) => !!pr.labels.find((l) => l.name === "publish-pr"));
if (pull) { if (pull) {
result["pr"] = pull.number; result["pr"] = pull.number;
result["action"] = "paperclip"; result["action"] = "paperclip";
core.notice(`This is a push action but to a branch with an open PR with the build paperclip label (${JSON.stringify(result)})`); core.notice(`This is a push action but to a branch with an open PR with the build paperclip label (${JSON.stringify(result)})`);
return result; return result;
} }
} else if (event_name === "pull_request" && event.pull_request.labels.find((l) => l.name === "build-pr-jar")) { } else if (event_name === "pull_request" && event.pull_request.labels.find((l) => l.name === "publish-pr")) {
result["pr"] = event.pull_request.number; result["pr"] = event.pull_request.number;
result["action"] = "paperclip"; result["action"] = "paperclip";
core.notice(`This is a pull request action with a build paperclip label (${JSON.stringify(result)})`); core.notice(`This is a pull request action with a build paperclip label (${JSON.stringify(result)})`);
@@ -98,7 +103,7 @@ jobs:
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Test Results (${{ matrix.java }}) name: Test Results
path: | path: |
**/build/test-results/test/TEST-*.xml **/build/test-results/test/TEST-*.xml
@@ -112,6 +117,13 @@ jobs:
with: with:
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }} name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
path: paper-server/build/libs/paper-paperclip-*-mojmap.jar path: paper-server/build/libs/paper-paperclip-*-mojmap.jar
- name: Publish Artifacts
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
uses: PaperMC/action-pr-publishing/upload@paper
with:
# TODO fallback for failing javadoc
publishing-task: ":paper-api:publishAllPublicationsTo_githubPackages_PRsRepository publishDevBundlePublicationTo_githubPackages_PRsRepository -PpublishDevBundle"
event_file: event_file:
name: "Event File" name: "Event File"
# Only run on PRs if the source branch is on someone else's repo # Only run on PRs if the source branch is on someone else's repo

View File

@@ -1,84 +0,0 @@
# This workflow run on the completion of the
# build workflow but only does anything if the
# triggering workflow uploaded an artifact.
#
# Do note that it is then the trigger workflow that
# determines if this will update the PR text body. All
# this workflow does is check if an uploaded artifact
# exists and there is a PR tied to the previous workflow.
name: Comment on pull request
on:
workflow_run:
workflows: ['Build Paper']
types: [completed]
jobs:
pr_comment:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
env:
BRANCH_NAME: "${{ github.event.workflow_run.head_branch }}"
PR_OWNER: "${{ github.event.workflow_run.head_repository.owner.login }}"
PR_SHA: "${{ github.event.workflow_run.head_sha }}"
RUN_ID: "${{ github.event.workflow_run.id }}"
REPO_ID: "${{ github.event.repository.id }}"
EVENT_TYPE: "${{ github.event.workflow_run.event}}"
PULL_REQUESTS: "${{ toJSON(github.event.workflow_run.pull_requests) }}"
with:
# This snippet is public-domain, taken from
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
# Modified extensively by Machine_Maker
script: |
async function updatePR(owner, repo, issue_number, purpose, body) {
const { data } = await github.rest.issues.get({ owner, repo, issue_number });
core.debug(JSON.stringify(data, null, 2));
const marker = `<!-- bot: ${purpose} -->`;
let new_body = data.body ? data.body.trim().split(marker)[0].trim() : "";
new_body += `\n${marker}\n---\n${body}`;
core.info(`Updating the text body of PR #${issue_number} in ${owner}/${repo}`);
await github.rest.issues.update({ owner, repo, issue_number, body: new_body });
}
const { owner, repo } = context.repo;
const run_id = `${process.env.RUN_ID}`;
const repo_id = `${process.env.REPO_ID}`;
let pulls = [];
const event_type = `${process.env.EVENT_TYPE}`;
if (event_type === "push") { // if push, it's from the same repo which means `pull_requests` is populated
pulls = JSON.parse(`${process.env.PULL_REQUESTS}`);
} else {
const pr_branch = `${process.env.BRANCH_NAME}`;
const pr_sha = `${process.env.PR_SHA}`;
const pr_owner = `${process.env.PR_OWNER}`;
const { data } = await github.rest.pulls.list({ owner, repo, head: `${pr_owner}:${pr_branch}`, state: "open" });
core.debug(JSON.stringify(data, null, 2));
pulls = data.filter((pr) => pr.head.sha === pr_sha && pr.labels.find((l) => l.name === "build-pr-jar"));
}
if (!pulls.length) {
return core.notice("This workflow doesn't have any pull requests!");
} else if (pulls.length > 1) {
core.info(JSON.stringify(pulls, null, 2));
return core.error("Found multiple matching PRs");
}
const pull_request = pulls[0];
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, { owner, repo, run_id });
if (!artifacts.length) {
return core.info("Skipping comment due to no artifact found");
}
const artifact = artifacts.find((art) => art.name === `paper-${pull_request.number}`);
if (!artifact) {
return core.info("Skipping comment to no matching artifact found");
}
const link = `https://nightly.link/${owner}/${repo}/actions/artifacts/${artifact.id}.zip`;
const body = `Download the paperclip jar for this pull request: [${artifact.name}.zip](${link})`;
core.info(`Adding a link to ${link}`);
await updatePR(owner, repo, pull_request.number, "paperclip-pr-build", body);

View File

@@ -18,10 +18,11 @@ jobs:
steps: steps:
- name: "authenticate" - name: "authenticate"
id: "authenticate" id: "authenticate"
uses: "tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92" # v1 uses: "tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a" # v2.1.0
with: with:
installation_retrieval_mode: id
installation_retrieval_payload: "36153445"
app_id: "${{ secrets.PROJECTS_APP_ID }}" app_id: "${{ secrets.PROJECTS_APP_ID }}"
installation_id: "36153445"
private_key: "${{ secrets.PROJECTS_PRIVATE_KEY }}" private_key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
- uses: PaperMC/update-projects-action@v0.2.0 - uses: PaperMC/update-projects-action@v0.2.0

36
.github/workflows/publish_pr.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Publish PR
on:
workflow_run:
workflows: [ "Build Paper" ]
types:
- completed
permissions:
packages: write # To upload the PR
actions: write # To get information about the uploading workflow run and to delete the run artifacts
contents: write # To download the `maven-publish` artifact, and to be able to create commit comments
issues: write # To be able to create PR comments
pull-requests: write # To be able to create PR comments
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Generate an Application repository access token
id: gen_repo_token
uses: kattecon/gh-app-access-token-gen@v1
with:
app_id: 1408328
private_key: ${{ secrets.PR_PUBLISHING_GH_APP_KEY }}
repository: ${{ github.repository }}
- name: Publish PR
uses: PaperMC/action-pr-publishing@paper
env:
GITHUB_TOKEN: ${{ steps.gen_repo_token.outputs.token }}
with:
publishing-token: ${{ github.token }}
uploader-workflow-name: Build Paper
artifacts-base-path: io/papermc/paper
base-maven-url: 'https://maven-prs.papermc.io'
self-name: 'papermc-pr-publishing[bot]'

View File

@@ -21,12 +21,14 @@ jobs:
uses: dawidd6/action-download-artifact@v6 uses: dawidd6/action-download-artifact@v6
with: with:
run_id: ${{ github.event.workflow_run.id }} run_id: ${{ github.event.workflow_run.id }}
path: artifacts path: test_artifacts
name: "Test Results|Event File"
name_is_regexp: true
- name: Publish Test Results - name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2 uses: EnricoMi/publish-unit-test-result-action@v2
with: with:
commit: ${{ github.event.workflow_run.head_sha }} commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json event_file: test_artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }} event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml" files: "test_artifacts/**/*.xml"
comment_mode: off comment_mode: off

2
.gitignore vendored
View File

@@ -45,7 +45,7 @@ logs/
!gradle/wrapper/gradle-wrapper.jar !gradle/wrapper/gradle-wrapper.jar
test-plugin.settings.gradle.kts test-plugin.settings.gradle.kts
paper-api-generator.settings.gradle.kts paper-generator.settings.gradle.kts
# Don't track patched vanilla submodules # Don't track patched vanilla submodules
paper-server/src/minecraft/ paper-server/src/minecraft/

View File

@@ -208,7 +208,8 @@ required.
with `// Paper end - <COMMIT DESCRIPTION>`. with `// Paper end - <COMMIT DESCRIPTION>`.
- One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line. - One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line.
> [!NOTE] These comments are incredibly important to be able to keep track of changes > [!NOTE]
> These comments are incredibly important to be able to keep track of changes
> across files and to remember what they are for, even a decade into the future. > across files and to remember what they are for, even a decade into the future.
Here's an example of how to mark changes by Paper: Here's an example of how to mark changes by Paper:
@@ -263,6 +264,40 @@ are assumed to be non-null by default. For less obvious placing such as on gener
**For other classes**: Keep using both `@Nullable` and `@NotNull` from `org.jetbrains.annotations`. These **For other classes**: Keep using both `@Nullable` and `@NotNull` from `org.jetbrains.annotations`. These
will be replaced later. will be replaced later.
### API checks
When performing API-related checks where an exception needs to be thrown under specific conditions, you should use the `Preconditions` class.
#### Checking Method Arguments
To validate method arguments, use `Preconditions#checkArgument`. This will throw an `IllegalArgumentException` if the condition is not met.
> Don't use Preconditions#checkNotNull, as it throws a NullPointerException, which makes it harder to determine whether the error was caused by an internal issue or invalid arguments.
ex:
```java
@Override
public void sendMessage(Player player, Component message) {
Preconditions.checkArgument(player != null, "player cannot be null");
Preconditions.checkArgument(player.isOnline(), "player %s must be online", player.getName());
Preconditions.checkArgument(message != null, "message cannot be null");
// rest of code
}
```
#### Checking Object State
To validate the state of an object inside a method, use `Preconditions#checkState`. This will throw an `IllegalStateException` if the condition is not met.
ex:
```java
private Player player;
@Override
public void sendMessage(Component message) {
Preconditions.checkArgument(message != null, "message cannot be null");
Preconditions.checkState(this.player != null, "player cannot be null");
Preconditions.checkState(this.player.isOnline(), "player %s must be online", this.player.getName());
// rest of code
}
```
## Access Transformers ## Access Transformers
Sometimes, Vanilla code already contains a field, method, or type you want to access Sometimes, Vanilla code already contains a field, method, or type you want to access
but the visibility is too low (e.g. a private field in an entity class). Paper can use access transformers but the visibility is too low (e.g. a private field in an entity class). Paper can use access transformers

View File

@@ -40,7 +40,7 @@ How To (Plugin Developers)
<dependency> <dependency>
<groupId>io.papermc.paper</groupId> <groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId> <artifactId>paper-api</artifactId>
<version>1.21.4-R0.1-SNAPSHOT</version> <version>1.21.6-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
``` ```
@@ -53,7 +53,7 @@ repositories {
} }
dependencies { dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.21.6-R0.1-SNAPSHOT")
} }
java { java {

View File

@@ -1,4 +1,4 @@
tiny 2 0 spigot mojang+yarn tiny 2 0 spigot mojang
# Originally DistanceManager, which also implements DistanceManager, so clashes since the implemented class # Originally DistanceManager, which also implements DistanceManager, so clashes since the implemented class
# is imported and not fully qualified. Easiest fix is to just change the name # is imported and not fully qualified. Easiest fix is to just change the name

View File

@@ -15,14 +15,10 @@ public net.minecraft.commands.CommandSourceStack source
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
public net.minecraft.commands.arguments.blocks.BlockInput tag public net.minecraft.commands.arguments.blocks.BlockInput tag
public net.minecraft.core.MappedRegistry validateWrite(Lnet/minecraft/resources/ResourceKey;)V public net.minecraft.core.MappedRegistry validateWrite(Lnet/minecraft/resources/ResourceKey;)V
public net.minecraft.nbt.ListTag <init>(Ljava/util/List;B)V public net.minecraft.nbt.ListTag <init>(Ljava/util/List;)V
public net.minecraft.nbt.TagParser readArrayTag()Lnet/minecraft/nbt/Tag; public net.minecraft.nbt.ListTag identifyRawElementType()B
public net.minecraft.nbt.TagParser type(Ljava/lang/String;)Lnet/minecraft/nbt/Tag;
public net.minecraft.network.Connection address public net.minecraft.network.Connection address
public net.minecraft.network.Connection channel public net.minecraft.network.Connection channel
public net.minecraft.network.chat.HoverEvent$ItemStackInfo components
public net.minecraft.network.chat.HoverEvent$ItemStackInfo count
public net.minecraft.network.chat.HoverEvent$ItemStackInfo item
public net.minecraft.network.chat.TextColor name public net.minecraft.network.chat.TextColor name
public net.minecraft.network.chat.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult; public net.minecraft.network.chat.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
public net.minecraft.network.chat.numbers.FixedFormat value public net.minecraft.network.chat.numbers.FixedFormat value
@@ -37,9 +33,10 @@ public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket xRot
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket y public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket y
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket yRot public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket yRot
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket z public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket z
public net.minecraft.network.syncher.SynchedEntityData getItem(Lnet/minecraft/network/syncher/EntityDataAccessor;)Lnet/minecraft/network/syncher/SynchedEntityData$DataItem;
public net.minecraft.resources.RegistryOps lookupProvider public net.minecraft.resources.RegistryOps lookupProvider
public net.minecraft.resources.RegistryOps$HolderLookupAdapter public net.minecraft.resources.RegistryOps$HolderLookupAdapter
public net.minecraft.server.Main forceUpgrade(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lcom/mojang/datafixers/DataFixer;ZLjava/util/function/BooleanSupplier;Lnet/minecraft/core/RegistryAccess;Z)V public net.minecraft.server.Main forceUpgrade(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lnet/minecraft/world/level/storage/WorldData;Lcom/mojang/datafixers/DataFixer;ZLjava/util/function/BooleanSupplier;Lnet/minecraft/core/RegistryAccess;Z)V
public net.minecraft.server.MinecraftServer LOGGER public net.minecraft.server.MinecraftServer LOGGER
public net.minecraft.server.MinecraftServer doRunTask(Lnet/minecraft/server/TickTask;)V public net.minecraft.server.MinecraftServer doRunTask(Lnet/minecraft/server/TickTask;)V
public net.minecraft.server.MinecraftServer executor public net.minecraft.server.MinecraftServer executor
@@ -53,6 +50,7 @@ public net.minecraft.server.MinecraftServer$ReloadableResources
public net.minecraft.server.RegistryLayer STATIC_ACCESS public net.minecraft.server.RegistryLayer STATIC_ACCESS
public net.minecraft.server.ReloadableServerResources public net.minecraft.server.ReloadableServerResources
public net.minecraft.server.ServerAdvancementManager advancements public net.minecraft.server.ServerAdvancementManager advancements
public net.minecraft.server.Services USERID_CACHE_FILE
public net.minecraft.server.dedicated.DedicatedServerProperties$WorldDimensionData public net.minecraft.server.dedicated.DedicatedServerProperties$WorldDimensionData
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String; public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
public net.minecraft.server.dedicated.Settings properties public net.minecraft.server.dedicated.Settings properties
@@ -72,15 +70,17 @@ public net.minecraft.server.level.ChunkMap setServerViewDistance(I)V
public net.minecraft.server.level.ChunkMap toDrop public net.minecraft.server.level.ChunkMap toDrop
public net.minecraft.server.level.ChunkMap updatingChunkMap public net.minecraft.server.level.ChunkMap updatingChunkMap
public net.minecraft.server.level.ChunkMap visibleChunkMap public net.minecraft.server.level.ChunkMap visibleChunkMap
public net.minecraft.server.level.ChunkMap$DistanceManager
public net.minecraft.server.level.ChunkMap$TrackedEntity public net.minecraft.server.level.ChunkMap$TrackedEntity
public net.minecraft.server.level.ChunkMap$TrackedEntity seenBy public net.minecraft.server.level.ChunkMap$TrackedEntity seenBy
public net.minecraft.server.level.ChunkMap$TrackedEntity serverEntity public net.minecraft.server.level.ChunkMap$TrackedEntity serverEntity
public net.minecraft.server.level.DistanceManager simulationDistance public net.minecraft.server.level.DistanceManager simulationDistance
public net.minecraft.server.level.DistanceManager tickets public net.minecraft.server.level.DistanceManager ticketStorage
public net.minecraft.server.level.ServerBossEvent broadcast(Ljava/util/function/Function;)V public net.minecraft.server.level.ServerBossEvent broadcast(Ljava/util/function/Function;)V
public net.minecraft.server.level.ServerBossEvent visible public net.minecraft.server.level.ServerBossEvent visible
public net.minecraft.server.level.ServerChunkCache mainThread public net.minecraft.server.level.ServerChunkCache mainThread
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
public net.minecraft.server.level.ServerChunkCache runDistanceManagerUpdates()Z
public net.minecraft.server.level.ServerChunkCache spawnEnemies public net.minecraft.server.level.ServerChunkCache spawnEnemies
public net.minecraft.server.level.ServerChunkCache spawnFriendlies public net.minecraft.server.level.ServerChunkCache spawnFriendlies
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor
@@ -91,7 +91,7 @@ public net.minecraft.server.level.ServerLevel getEntities()Lnet/minecraft/world/
public net.minecraft.server.level.ServerLevel serverLevelData public net.minecraft.server.level.ServerLevel serverLevelData
public net.minecraft.server.level.ServerPlayer completeUsingItem()V public net.minecraft.server.level.ServerPlayer completeUsingItem()V
public net.minecraft.server.level.ServerPlayer containerSynchronizer public net.minecraft.server.level.ServerPlayer containerSynchronizer
public net.minecraft.server.level.ServerPlayer findRespawnAndUseSpawnBlock(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;FZZ)Ljava/util/Optional; public net.minecraft.server.level.ServerPlayer findRespawnAndUseSpawnBlock(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/server/level/ServerPlayer$RespawnConfig;Z)Ljava/util/Optional;
public net.minecraft.server.level.ServerPlayer initMenu(Lnet/minecraft/world/inventory/AbstractContainerMenu;)V public net.minecraft.server.level.ServerPlayer initMenu(Lnet/minecraft/world/inventory/AbstractContainerMenu;)V
public net.minecraft.server.level.ServerPlayer isChangingDimension public net.minecraft.server.level.ServerPlayer isChangingDimension
public net.minecraft.server.level.ServerPlayer language public net.minecraft.server.level.ServerPlayer language
@@ -103,25 +103,25 @@ public net.minecraft.server.level.ServerPlayer triggerDimensionChangeTriggers(Ln
public net.minecraft.server.level.ServerPlayer wardenSpawnTracker public net.minecraft.server.level.ServerPlayer wardenSpawnTracker
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle public net.minecraft.server.level.ServerPlayer$RespawnPosAngle
public net.minecraft.server.level.ServerPlayerGameMode level public net.minecraft.server.level.ServerPlayerGameMode level
public net.minecraft.server.level.Ticket key public net.minecraft.server.level.TicketType register(Ljava/lang/String;JZLnet/minecraft/server/level/TicketType$TicketUse;)Lnet/minecraft/server/level/TicketType;
public net.minecraft.server.network.ServerGamePacketListenerImpl isChatMessageIllegal(Ljava/lang/String;)Z public net.minecraft.server.network.ServerGamePacketListenerImpl isChatMessageIllegal(Ljava/lang/String;)Z
public net.minecraft.server.network.ServerLoginPacketListenerImpl authenticatedProfile public net.minecraft.server.network.ServerLoginPacketListenerImpl authenticatedProfile
public net.minecraft.server.network.ServerLoginPacketListenerImpl connection public net.minecraft.server.network.ServerLoginPacketListenerImpl connection
public net.minecraft.server.network.ServerLoginPacketListenerImpl state public net.minecraft.server.network.ServerLoginPacketListenerImpl state
public net.minecraft.server.network.ServerLoginPacketListenerImpl$State public net.minecraft.server.network.ServerLoginPacketListenerImpl$State
public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/net/URI;)Ljava/nio/file/Path;
public net.minecraft.server.packs.repository.FolderRepositorySource$FolderPackDetector public net.minecraft.server.packs.repository.FolderRepositorySource$FolderPackDetector
public net.minecraft.server.packs.repository.FolderRepositorySource$FolderPackDetector <init>(Lnet/minecraft/world/level/validation/DirectoryValidator;)V public net.minecraft.server.packs.repository.FolderRepositorySource$FolderPackDetector <init>(Lnet/minecraft/world/level/validation/DirectoryValidator;)V
public net.minecraft.server.packs.repository.Pack resources public net.minecraft.server.packs.repository.Pack resources
public net.minecraft.server.players.PlayerList playerIo public net.minecraft.server.players.PlayerList playerIo
public net.minecraft.server.players.PlayerList players public net.minecraft.server.players.PlayerList players
public net.minecraft.server.players.PlayerList updateEntireScoreboard(Lnet/minecraft/server/ServerScoreboard;Lnet/minecraft/server/level/ServerPlayer;)V public net.minecraft.server.players.PlayerList updateEntireScoreboard(Lnet/minecraft/server/ServerScoreboard;Lnet/minecraft/server/level/ServerPlayer;)V
public net.minecraft.server.players.PlayerList verifyChatTrusted(Lnet/minecraft/network/chat/PlayerChatMessage;)Z
public net.minecraft.server.players.StoredUserEntry getUser()Ljava/lang/Object; public net.minecraft.server.players.StoredUserEntry getUser()Ljava/lang/Object;
public net.minecraft.stats.ServerRecipeBook known public net.minecraft.stats.ServerRecipeBook known
public net.minecraft.tags.TagEntry id public net.minecraft.tags.TagEntry id
public net.minecraft.tags.TagEntry required public net.minecraft.tags.TagEntry required
public net.minecraft.tags.TagEntry tag public net.minecraft.tags.TagEntry tag
public net.minecraft.util.datafix.fixes.BlockStateData register(ILjava/lang/String;[Ljava/lang/String;)V public net.minecraft.util.datafix.fixes.BlockStateData register(ILcom/mojang/serialization/Dynamic;[Lcom/mojang/serialization/Dynamic;)V
public net.minecraft.util.datafix.fixes.ItemIdFix ITEM_NAMES public net.minecraft.util.datafix.fixes.ItemIdFix ITEM_NAMES
public net.minecraft.util.datafix.fixes.ItemSpawnEggFix ID_TO_ENTITY public net.minecraft.util.datafix.fixes.ItemSpawnEggFix ID_TO_ENTITY
public net.minecraft.world.BossEvent color public net.minecraft.world.BossEvent color
@@ -130,17 +130,21 @@ public net.minecraft.world.BossEvent overlay
public net.minecraft.world.CompoundContainer container1 public net.minecraft.world.CompoundContainer container1
public net.minecraft.world.CompoundContainer container2 public net.minecraft.world.CompoundContainer container2
public net.minecraft.world.SimpleContainer items public net.minecraft.world.SimpleContainer items
public net.minecraft.world.damagesource.CombatTracker entries
public net.minecraft.world.damagesource.CombatTracker getMostSignificantFall()Lnet/minecraft/world/damagesource/CombatEntry;
public net.minecraft.world.damagesource.CombatTracker inCombat
public net.minecraft.world.damagesource.CombatTracker mob
public net.minecraft.world.damagesource.CombatTracker takingDamage
public net.minecraft.world.damagesource.DamageSource <init>(Lnet/minecraft/core/Holder;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/Vec3;)V public net.minecraft.world.damagesource.DamageSource <init>(Lnet/minecraft/core/Holder;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.effect.MobEffect attributeModifiers public net.minecraft.world.effect.MobEffect attributeModifiers
public net.minecraft.world.effect.MobEffect$AttributeTemplate public net.minecraft.world.effect.MobEffect$AttributeTemplate
public net.minecraft.world.effect.MobEffectInstance hiddenEffect public net.minecraft.world.effect.MobEffectInstance hiddenEffect
public net.minecraft.world.entity.AreaEffectCloud durationOnUse public net.minecraft.world.entity.AreaEffectCloud durationOnUse
public net.minecraft.world.entity.AreaEffectCloud ownerUUID public net.minecraft.world.entity.AreaEffectCloud owner
public net.minecraft.world.entity.AreaEffectCloud potionContents public net.minecraft.world.entity.AreaEffectCloud potionContents
public net.minecraft.world.entity.AreaEffectCloud radiusOnUse public net.minecraft.world.entity.AreaEffectCloud radiusOnUse
public net.minecraft.world.entity.AreaEffectCloud radiusPerTick public net.minecraft.world.entity.AreaEffectCloud radiusPerTick
public net.minecraft.world.entity.AreaEffectCloud reapplicationDelay public net.minecraft.world.entity.AreaEffectCloud reapplicationDelay
public net.minecraft.world.entity.AreaEffectCloud updateColor()V
public net.minecraft.world.entity.AreaEffectCloud waitTime public net.minecraft.world.entity.AreaEffectCloud waitTime
public net.minecraft.world.entity.Display DATA_POS_ROT_INTERPOLATION_DURATION_ID public net.minecraft.world.entity.Display DATA_POS_ROT_INTERPOLATION_DURATION_ID
public net.minecraft.world.entity.Display createTransformation(Lnet/minecraft/network/syncher/SynchedEntityData;)Lcom/mojang/math/Transformation; public net.minecraft.world.entity.Display createTransformation(Lnet/minecraft/network/syncher/SynchedEntityData;)Lcom/mojang/math/Transformation;
@@ -185,8 +189,11 @@ public net.minecraft.world.entity.Entity FLAG_INVISIBLE
public net.minecraft.world.entity.Entity getEncodeId()Ljava/lang/String; public net.minecraft.world.entity.Entity getEncodeId()Ljava/lang/String;
public net.minecraft.world.entity.Entity getFireImmuneTicks()I public net.minecraft.world.entity.Entity getFireImmuneTicks()I
public net.minecraft.world.entity.Entity getSharedFlag(I)Z public net.minecraft.world.entity.Entity getSharedFlag(I)Z
public net.minecraft.world.entity.Entity getSwimHighSpeedSplashSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.Entity getSwimSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.Entity getSwimSplashSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.Entity hasVisualFire public net.minecraft.world.entity.Entity hasVisualFire
public net.minecraft.world.entity.Entity isInBubbleColumn()Z public net.minecraft.world.entity.Entity isAffectedByBlocks()Z
public net.minecraft.world.entity.Entity isInRain()Z public net.minecraft.world.entity.Entity isInRain()Z
public net.minecraft.world.entity.Entity isInvulnerableToBase(Lnet/minecraft/world/damagesource/DamageSource;)Z public net.minecraft.world.entity.Entity isInvulnerableToBase(Lnet/minecraft/world/damagesource/DamageSource;)Z
public net.minecraft.world.entity.Entity onGround public net.minecraft.world.entity.Entity onGround
@@ -196,10 +203,11 @@ public net.minecraft.world.entity.Entity random
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
public net.minecraft.world.entity.Entity setRot(FF)V public net.minecraft.world.entity.Entity setRot(FF)V
public net.minecraft.world.entity.Entity setSharedFlag(IZ)V public net.minecraft.world.entity.Entity setSharedFlag(IZ)V
public net.minecraft.world.entity.Entity teleportPassengers()V
public net.minecraft.world.entity.Entity unsetRemoved()V public net.minecraft.world.entity.Entity unsetRemoved()V
public net.minecraft.world.entity.Entity wasTouchingWater public net.minecraft.world.entity.Entity wasTouchingWater
public net.minecraft.world.entity.ExperienceOrb count public net.minecraft.world.entity.ExperienceOrb count
public net.minecraft.world.entity.ExperienceOrb value public net.minecraft.world.entity.ExperienceOrb setValue(I)V
public net.minecraft.world.entity.GlowSquid setDarkTicks(I)V public net.minecraft.world.entity.GlowSquid setDarkTicks(I)V
public net.minecraft.world.entity.Interaction attack public net.minecraft.world.entity.Interaction attack
public net.minecraft.world.entity.Interaction getHeight()F public net.minecraft.world.entity.Interaction getHeight()F
@@ -225,18 +233,19 @@ public net.minecraft.world.entity.LivingEntity detectEquipmentUpdates()V
public net.minecraft.world.entity.LivingEntity effectsDirty public net.minecraft.world.entity.LivingEntity effectsDirty
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent; public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.LivingEntity getFallDamageSound(I)Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.LivingEntity getHurtSound(Lnet/minecraft/world/damagesource/DamageSource;)Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.LivingEntity getSoundVolume()F public net.minecraft.world.entity.LivingEntity getSoundVolume()F
public net.minecraft.world.entity.LivingEntity jumping public net.minecraft.world.entity.LivingEntity jumping
public net.minecraft.world.entity.LivingEntity lastHurt public net.minecraft.world.entity.LivingEntity lastHurt
public net.minecraft.world.entity.LivingEntity lastHurtByMob public net.minecraft.world.entity.LivingEntity lastHurtByMob
public net.minecraft.world.entity.LivingEntity lastHurtByMobTimestamp public net.minecraft.world.entity.LivingEntity lastHurtByMobTimestamp
public net.minecraft.world.entity.LivingEntity lastHurtByPlayer public net.minecraft.world.entity.LivingEntity lastHurtByPlayer
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime public net.minecraft.world.entity.LivingEntity lastHurtByPlayerMemoryTime
public net.minecraft.world.entity.LivingEntity playSecondaryHurtSound(Lnet/minecraft/world/damagesource/DamageSource;)V
public net.minecraft.world.entity.LivingEntity setLivingEntityFlag(IZ)V public net.minecraft.world.entity.LivingEntity setLivingEntityFlag(IZ)V
public net.minecraft.world.entity.LivingEntity useItemRemaining public net.minecraft.world.entity.LivingEntity useItemRemaining
public net.minecraft.world.entity.Mob armorDropChances public net.minecraft.world.entity.Mob getAmbientSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.Mob getEquipmentDropChance(Lnet/minecraft/world/entity/EquipmentSlot;)F
public net.minecraft.world.entity.Mob handDropChances
public net.minecraft.world.entity.Mob isSunBurnTick()Z public net.minecraft.world.entity.Mob isSunBurnTick()Z
public net.minecraft.world.entity.Mob lootTable public net.minecraft.world.entity.Mob lootTable
public net.minecraft.world.entity.Mob lootTableSeed public net.minecraft.world.entity.Mob lootTableSeed
@@ -264,57 +273,64 @@ public net.minecraft.world.entity.animal.Bee ticksWithoutNectarSinceExitingHive
public net.minecraft.world.entity.animal.Cat isRelaxStateOne()Z public net.minecraft.world.entity.animal.Cat isRelaxStateOne()Z
public net.minecraft.world.entity.animal.Cat setCollarColor(Lnet/minecraft/world/item/DyeColor;)V public net.minecraft.world.entity.animal.Cat setCollarColor(Lnet/minecraft/world/item/DyeColor;)V
public net.minecraft.world.entity.animal.Cat setRelaxStateOne(Z)V public net.minecraft.world.entity.animal.Cat setRelaxStateOne(Z)V
public net.minecraft.world.entity.animal.Cat setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.Dolphin treasurePos
public net.minecraft.world.entity.animal.Fox DATA_TRUSTED_ID_0 public net.minecraft.world.entity.animal.Fox DATA_TRUSTED_ID_0
public net.minecraft.world.entity.animal.Fox DATA_TRUSTED_ID_1 public net.minecraft.world.entity.animal.Fox DATA_TRUSTED_ID_1
public net.minecraft.world.entity.animal.Fox isDefending()Z public net.minecraft.world.entity.animal.Fox isDefending()Z
public net.minecraft.world.entity.animal.Fox setDefending(Z)V public net.minecraft.world.entity.animal.Fox setDefending(Z)V
public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V
public net.minecraft.world.entity.animal.Fox setSleeping(Z)V public net.minecraft.world.entity.animal.Fox setSleeping(Z)V
public net.minecraft.world.entity.animal.Fox setVariant(Lnet/minecraft/world/entity/animal/Fox$Variant;)V
public net.minecraft.world.entity.animal.MushroomCow setVariant(Lnet/minecraft/world/entity/animal/MushroomCow$Variant;)V
public net.minecraft.world.entity.animal.MushroomCow stewEffects public net.minecraft.world.entity.animal.MushroomCow stewEffects
public net.minecraft.world.entity.animal.Ocelot isTrusting()Z public net.minecraft.world.entity.animal.Ocelot isTrusting()Z
public net.minecraft.world.entity.animal.Ocelot setTrusting(Z)V public net.minecraft.world.entity.animal.Ocelot setTrusting(Z)V
public net.minecraft.world.entity.animal.Panda getEatCounter()I public net.minecraft.world.entity.animal.Panda getEatCounter()I
public net.minecraft.world.entity.animal.Panda setEatCounter(I)V public net.minecraft.world.entity.animal.Panda setEatCounter(I)V
public net.minecraft.world.entity.animal.Parrot setVariant(Lnet/minecraft/world/entity/animal/Parrot$Variant;)V
public net.minecraft.world.entity.animal.Pig setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.Pig steering public net.minecraft.world.entity.animal.Pig steering
public net.minecraft.world.entity.animal.Rabbit moreCarrotTicks public net.minecraft.world.entity.animal.Rabbit moreCarrotTicks
public net.minecraft.world.entity.animal.Rabbit registerGoals()V public net.minecraft.world.entity.animal.Rabbit registerGoals()V
public net.minecraft.world.entity.animal.Rabbit setVariant(Lnet/minecraft/world/entity/animal/Rabbit$Variant;)V
public net.minecraft.world.entity.animal.Salmon setVariant(Lnet/minecraft/world/entity/animal/Salmon$Variant;)V
public net.minecraft.world.entity.animal.TropicalFish getPackedVariant()I public net.minecraft.world.entity.animal.TropicalFish getPackedVariant()I
public net.minecraft.world.entity.animal.TropicalFish setPackedVariant(I)V public net.minecraft.world.entity.animal.TropicalFish setPackedVariant(I)V
public net.minecraft.world.entity.animal.Turtle getHomePos()Lnet/minecraft/core/BlockPos; public net.minecraft.world.entity.animal.Turtle goingHome
public net.minecraft.world.entity.animal.Turtle isGoingHome()Z public net.minecraft.world.entity.animal.Turtle homePos
public net.minecraft.world.entity.animal.Turtle isTravelling()Z
public net.minecraft.world.entity.animal.Turtle setGoingHome(Z)V
public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V
public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V
public net.minecraft.world.entity.animal.Wolf isWet
public net.minecraft.world.entity.animal.Wolf setCollarColor(Lnet/minecraft/world/item/DyeColor;)V
public net.minecraft.world.entity.animal.allay.Allay canDuplicate()Z public net.minecraft.world.entity.animal.allay.Allay canDuplicate()Z
public net.minecraft.world.entity.animal.allay.Allay duplicateAllay()V public net.minecraft.world.entity.animal.allay.Allay duplicateAllay()V
public net.minecraft.world.entity.animal.allay.Allay duplicationCooldown public net.minecraft.world.entity.animal.allay.Allay duplicationCooldown
public net.minecraft.world.entity.animal.allay.Allay jukeboxPos public net.minecraft.world.entity.animal.allay.Allay jukeboxPos
public net.minecraft.world.entity.animal.allay.Allay resetDuplicationCooldown()V public net.minecraft.world.entity.animal.allay.Allay resetDuplicationCooldown()V
public net.minecraft.world.entity.animal.axolotl.Axolotl setVariant(Lnet/minecraft/world/entity/animal/axolotl/Axolotl$Variant;)V
public net.minecraft.world.entity.animal.frog.Frog setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.frog.Tadpole age public net.minecraft.world.entity.animal.frog.Tadpole age
public net.minecraft.world.entity.animal.goat.Goat DATA_HAS_LEFT_HORN public net.minecraft.world.entity.animal.goat.Goat DATA_HAS_LEFT_HORN
public net.minecraft.world.entity.animal.goat.Goat DATA_HAS_RIGHT_HORN public net.minecraft.world.entity.animal.goat.Goat DATA_HAS_RIGHT_HORN
public net.minecraft.world.entity.animal.horse.AbstractHorse createInventory()V public net.minecraft.world.entity.animal.horse.AbstractHorse createInventory()V
public net.minecraft.world.entity.animal.horse.AbstractHorse inventory public net.minecraft.world.entity.animal.horse.AbstractHorse inventory
public net.minecraft.world.entity.animal.horse.AbstractHorse owner
public net.minecraft.world.entity.animal.horse.Horse setVariantAndMarkings(Lnet/minecraft/world/entity/animal/horse/Variant;Lnet/minecraft/world/entity/animal/horse/Markings;)V public net.minecraft.world.entity.animal.horse.Horse setVariantAndMarkings(Lnet/minecraft/world/entity/animal/horse/Variant;Lnet/minecraft/world/entity/animal/horse/Markings;)V
public net.minecraft.world.entity.animal.horse.Llama setVariant(Lnet/minecraft/world/entity/animal/horse/Llama$Variant;)V
public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime
public net.minecraft.world.entity.animal.sniffer.Sniffer calculateDigPosition()Ljava/util/Optional; public net.minecraft.world.entity.animal.sniffer.Sniffer calculateDigPosition()Ljava/util/Optional;
public net.minecraft.world.entity.animal.sniffer.Sniffer canDig()Z public net.minecraft.world.entity.animal.sniffer.Sniffer canDig()Z
public net.minecraft.world.entity.animal.sniffer.Sniffer getExploredPositions()Ljava/util/stream/Stream; public net.minecraft.world.entity.animal.sniffer.Sniffer getExploredPositions()Ljava/util/stream/Stream;
public net.minecraft.world.entity.animal.sniffer.Sniffer getState()Lnet/minecraft/world/entity/animal/sniffer/Sniffer$State; public net.minecraft.world.entity.animal.sniffer.Sniffer getState()Lnet/minecraft/world/entity/animal/sniffer/Sniffer$State;
public net.minecraft.world.entity.animal.sniffer.Sniffer storeExploredPosition(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/entity/animal/sniffer/Sniffer; public net.minecraft.world.entity.animal.sniffer.Sniffer storeExploredPosition(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/entity/animal/sniffer/Sniffer;
public net.minecraft.world.entity.animal.wolf.Wolf getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.wolf.Wolf getVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.wolf.Wolf isWet
public net.minecraft.world.entity.animal.wolf.Wolf setCollarColor(Lnet/minecraft/world/item/DyeColor;)V
public net.minecraft.world.entity.animal.wolf.Wolf setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.wolf.Wolf setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.boss.enderdragon.EnderDragon subEntities public net.minecraft.world.entity.boss.enderdragon.EnderDragon subEntities
public net.minecraft.world.entity.boss.wither.WitherBoss bossEvent public net.minecraft.world.entity.boss.wither.WitherBoss bossEvent
public net.minecraft.world.entity.decoration.ArmorStand bodyPose
public net.minecraft.world.entity.decoration.ArmorStand disabledSlots public net.minecraft.world.entity.decoration.ArmorStand disabledSlots
public net.minecraft.world.entity.decoration.ArmorStand headPose
public net.minecraft.world.entity.decoration.ArmorStand isDisabled(Lnet/minecraft/world/entity/EquipmentSlot;)Z public net.minecraft.world.entity.decoration.ArmorStand isDisabled(Lnet/minecraft/world/entity/EquipmentSlot;)Z
public net.minecraft.world.entity.decoration.ArmorStand leftArmPose
public net.minecraft.world.entity.decoration.ArmorStand leftLegPose
public net.minecraft.world.entity.decoration.ArmorStand rightArmPose
public net.minecraft.world.entity.decoration.ArmorStand rightLegPose
public net.minecraft.world.entity.decoration.ArmorStand setMarker(Z)V public net.minecraft.world.entity.decoration.ArmorStand setMarker(Z)V
public net.minecraft.world.entity.decoration.ArmorStand setSmall(Z)V public net.minecraft.world.entity.decoration.ArmorStand setSmall(Z)V
public net.minecraft.world.entity.decoration.HangingEntity setDirection(Lnet/minecraft/core/Direction;)V public net.minecraft.world.entity.decoration.HangingEntity setDirection(Lnet/minecraft/core/Direction;)V
@@ -323,6 +339,7 @@ public net.minecraft.world.entity.decoration.ItemFrame DATA_ROTATION
public net.minecraft.world.entity.decoration.ItemFrame dropChance public net.minecraft.world.entity.decoration.ItemFrame dropChance
public net.minecraft.world.entity.decoration.ItemFrame fixed public net.minecraft.world.entity.decoration.ItemFrame fixed
public net.minecraft.world.entity.decoration.ItemFrame setDirection(Lnet/minecraft/core/Direction;)V public net.minecraft.world.entity.decoration.ItemFrame setDirection(Lnet/minecraft/core/Direction;)V
public net.minecraft.world.entity.decoration.Painting setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.item.FallingBlockEntity <init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V public net.minecraft.world.entity.item.FallingBlockEntity <init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V
public net.minecraft.world.entity.item.FallingBlockEntity blockState public net.minecraft.world.entity.item.FallingBlockEntity blockState
public net.minecraft.world.entity.item.FallingBlockEntity cancelDrop public net.minecraft.world.entity.item.FallingBlockEntity cancelDrop
@@ -340,13 +357,11 @@ public net.minecraft.world.entity.monster.Creeper explodeCreeper()V
public net.minecraft.world.entity.monster.Creeper explosionRadius public net.minecraft.world.entity.monster.Creeper explosionRadius
public net.minecraft.world.entity.monster.Creeper maxSwell public net.minecraft.world.entity.monster.Creeper maxSwell
public net.minecraft.world.entity.monster.Creeper swell public net.minecraft.world.entity.monster.Creeper swell
public net.minecraft.world.entity.monster.Drowned groundNavigation
public net.minecraft.world.entity.monster.Drowned waterNavigation
public net.minecraft.world.entity.monster.EnderMan teleport()Z public net.minecraft.world.entity.monster.EnderMan teleport()Z
public net.minecraft.world.entity.monster.EnderMan teleportTowards(Lnet/minecraft/world/entity/Entity;)Z public net.minecraft.world.entity.monster.EnderMan teleportTowards(Lnet/minecraft/world/entity/Entity;)Z
public net.minecraft.world.entity.monster.Endermite life public net.minecraft.world.entity.monster.Endermite life
public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/Sheep; public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/sheep/Sheep;
public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/sheep/Sheep;)V
public net.minecraft.world.entity.monster.Guardian randomStrollGoal public net.minecraft.world.entity.monster.Guardian randomStrollGoal
public net.minecraft.world.entity.monster.Guardian setActiveAttackTarget(I)V public net.minecraft.world.entity.monster.Guardian setActiveAttackTarget(I)V
public net.minecraft.world.entity.monster.Guardian$GuardianAttackGoal public net.minecraft.world.entity.monster.Guardian$GuardianAttackGoal
@@ -368,6 +383,7 @@ public net.minecraft.world.entity.monster.SpellcasterIllager$IllagerSpell
public net.minecraft.world.entity.monster.Strider steering public net.minecraft.world.entity.monster.Strider steering
public net.minecraft.world.entity.monster.Vex hasLimitedLife public net.minecraft.world.entity.monster.Vex hasLimitedLife
public net.minecraft.world.entity.monster.Vex limitedLifeTicks public net.minecraft.world.entity.monster.Vex limitedLifeTicks
public net.minecraft.world.entity.monster.Vex owner
public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.Vindicator isJohnny public net.minecraft.world.entity.monster.Vindicator isJohnny
public net.minecraft.world.entity.monster.Witch usingTime public net.minecraft.world.entity.monster.Witch usingTime
@@ -395,18 +411,29 @@ public net.minecraft.world.entity.npc.Villager increaseMerchantCareer()V
public net.minecraft.world.entity.npc.Villager numberOfRestocksToday public net.minecraft.world.entity.npc.Villager numberOfRestocksToday
public net.minecraft.world.entity.npc.Villager releaseAllPois()V public net.minecraft.world.entity.npc.Villager releaseAllPois()V
public net.minecraft.world.entity.npc.Villager setUnhappy()V public net.minecraft.world.entity.npc.Villager setUnhappy()V
public net.minecraft.world.entity.npc.Villager updateDemand()V
public net.minecraft.world.entity.npc.WanderingTrader getWanderTarget()Lnet/minecraft/core/BlockPos; public net.minecraft.world.entity.npc.WanderingTrader getWanderTarget()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.player.Abilities flyingSpeed public net.minecraft.world.entity.player.Abilities flyingSpeed
public net.minecraft.world.entity.player.Abilities walkingSpeed public net.minecraft.world.entity.player.Abilities walkingSpeed
public net.minecraft.world.entity.player.Inventory compartments public net.minecraft.world.entity.player.Inventory equipment
public net.minecraft.world.entity.player.Player DATA_PLAYER_MODE_CUSTOMISATION public net.minecraft.world.entity.player.Player DATA_PLAYER_MODE_CUSTOMISATION
public net.minecraft.world.entity.player.Player closeContainer()V public net.minecraft.world.entity.player.Player closeContainer()V
public net.minecraft.world.entity.player.Player enchantmentSeed public net.minecraft.world.entity.player.Player enchantmentSeed
public net.minecraft.world.entity.player.Player getFireImmuneTicks()I public net.minecraft.world.entity.player.Player getFireImmuneTicks()I
public net.minecraft.world.entity.player.Player hurtDir
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
public net.minecraft.world.entity.player.Player setShoulderEntityLeft(Lnet/minecraft/nbt/CompoundTag;)V public net.minecraft.world.entity.player.Player setShoulderEntityLeft(Lnet/minecraft/nbt/CompoundTag;)V
public net.minecraft.world.entity.player.Player setShoulderEntityRight(Lnet/minecraft/nbt/CompoundTag;)V public net.minecraft.world.entity.player.Player setShoulderEntityRight(Lnet/minecraft/nbt/CompoundTag;)V
public net.minecraft.world.entity.player.Player sleepCounter public net.minecraft.world.entity.player.Player sleepCounter
public net.minecraft.world.entity.projectile.AbstractArrow baseDamage
public net.minecraft.world.entity.projectile.AbstractArrow firedFromWeapon
public net.minecraft.world.entity.projectile.AbstractArrow getHitGroundSoundEvent()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.projectile.AbstractArrow getPickupItem()Lnet/minecraft/world/item/ItemStack;
public net.minecraft.world.entity.projectile.AbstractArrow isInGround()Z
public net.minecraft.world.entity.projectile.AbstractArrow life
public net.minecraft.world.entity.projectile.AbstractArrow pickupItemStack
public net.minecraft.world.entity.projectile.AbstractArrow setPickupItemStack(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.projectile.AbstractArrow setPierceLevel(B)V
public net.minecraft.world.entity.projectile.AbstractHurtingProjectile assignDirectionalMovement(Lnet/minecraft/world/phys/Vec3;D)V public net.minecraft.world.entity.projectile.AbstractHurtingProjectile assignDirectionalMovement(Lnet/minecraft/world/phys/Vec3;D)V
public net.minecraft.world.entity.projectile.Arrow NO_EFFECT_COLOR public net.minecraft.world.entity.projectile.Arrow NO_EFFECT_COLOR
public net.minecraft.world.entity.projectile.Arrow getPotionContents()Lnet/minecraft/world/item/alchemy/PotionContents; public net.minecraft.world.entity.projectile.Arrow getPotionContents()Lnet/minecraft/world/item/alchemy/PotionContents;
@@ -415,9 +442,7 @@ public net.minecraft.world.entity.projectile.Arrow updateColor()V
public net.minecraft.world.entity.projectile.EvokerFangs warmupDelayTicks public net.minecraft.world.entity.projectile.EvokerFangs warmupDelayTicks
public net.minecraft.world.entity.projectile.EyeOfEnder life public net.minecraft.world.entity.projectile.EyeOfEnder life
public net.minecraft.world.entity.projectile.EyeOfEnder surviveAfterDeath public net.minecraft.world.entity.projectile.EyeOfEnder surviveAfterDeath
public net.minecraft.world.entity.projectile.EyeOfEnder tx public net.minecraft.world.entity.projectile.EyeOfEnder target
public net.minecraft.world.entity.projectile.EyeOfEnder ty
public net.minecraft.world.entity.projectile.EyeOfEnder tz
public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_ATTACHED_TO_TARGET public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_ATTACHED_TO_TARGET
public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_ID_FIREWORKS_ITEM public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_ID_FIREWORKS_ITEM
public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_SHOT_AT_ANGLE public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_SHOT_AT_ANGLE
@@ -437,17 +462,16 @@ public net.minecraft.world.entity.projectile.FishingHook timeUntilHooked
public net.minecraft.world.entity.projectile.FishingHook timeUntilLured public net.minecraft.world.entity.projectile.FishingHook timeUntilLured
public net.minecraft.world.entity.projectile.FishingHook$FishHookState public net.minecraft.world.entity.projectile.FishingHook$FishHookState
public net.minecraft.world.entity.projectile.LargeFireball explosionPower public net.minecraft.world.entity.projectile.LargeFireball explosionPower
public net.minecraft.world.entity.projectile.Projectile cachedOwner
public net.minecraft.world.entity.projectile.Projectile hasBeenShot public net.minecraft.world.entity.projectile.Projectile hasBeenShot
public net.minecraft.world.entity.projectile.Projectile leftOwner public net.minecraft.world.entity.projectile.Projectile leftOwner
public net.minecraft.world.entity.projectile.Projectile ownerUUID public net.minecraft.world.entity.projectile.Projectile owner
public net.minecraft.world.entity.projectile.ShulkerBullet currentMoveDirection public net.minecraft.world.entity.projectile.ShulkerBullet currentMoveDirection
public net.minecraft.world.entity.projectile.ShulkerBullet flightSteps public net.minecraft.world.entity.projectile.ShulkerBullet flightSteps
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaX public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaX
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaY public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaY
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaZ public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaZ
public net.minecraft.world.entity.projectile.SpectralArrow duration public net.minecraft.world.entity.projectile.SpectralArrow duration
public net.minecraft.world.entity.projectile.ThrownPotion isLingering()Z public net.minecraft.world.entity.projectile.ThrowableItemProjectile getDefaultItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.entity.projectile.ThrownTrident dealtDamage public net.minecraft.world.entity.projectile.ThrownTrident dealtDamage
public net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V public net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.windcharge.BreezeWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V public net.minecraft.world.entity.projectile.windcharge.BreezeWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
@@ -460,7 +484,6 @@ public net.minecraft.world.entity.raid.Raid ticksActive
public net.minecraft.world.entity.raid.Raid totalHealth public net.minecraft.world.entity.raid.Raid totalHealth
public net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal public net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal
public net.minecraft.world.entity.raid.Raids raidMap public net.minecraft.world.entity.raid.Raids raidMap
public net.minecraft.world.entity.vehicle.AbstractBoat getDropItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.entity.vehicle.AbstractBoat getStatus()Lnet/minecraft/world/entity/vehicle/AbstractBoat$Status; public net.minecraft.world.entity.vehicle.AbstractBoat getStatus()Lnet/minecraft/world/entity/vehicle/AbstractBoat$Status;
public net.minecraft.world.entity.vehicle.AbstractBoat status public net.minecraft.world.entity.vehicle.AbstractBoat status
public net.minecraft.world.entity.vehicle.AbstractMinecartContainer lootTable public net.minecraft.world.entity.vehicle.AbstractMinecartContainer lootTable
@@ -471,12 +494,14 @@ public net.minecraft.world.entity.vehicle.MinecartTNT explode(D)V
public net.minecraft.world.entity.vehicle.MinecartTNT explosionPowerBase public net.minecraft.world.entity.vehicle.MinecartTNT explosionPowerBase
public net.minecraft.world.entity.vehicle.MinecartTNT explosionSpeedFactor public net.minecraft.world.entity.vehicle.MinecartTNT explosionSpeedFactor
public net.minecraft.world.entity.vehicle.MinecartTNT fuse public net.minecraft.world.entity.vehicle.MinecartTNT fuse
public net.minecraft.world.entity.vehicle.VehicleEntity getDropItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.flag.FeatureFlag mask public net.minecraft.world.flag.FeatureFlag mask
public net.minecraft.world.flag.FeatureFlag universe public net.minecraft.world.flag.FeatureFlag universe
public net.minecraft.world.flag.FeatureFlagRegistry names public net.minecraft.world.flag.FeatureFlagRegistry names
public net.minecraft.world.food.FoodData exhaustionLevel public net.minecraft.world.food.FoodData exhaustionLevel
public net.minecraft.world.food.FoodData foodLevel public net.minecraft.world.food.FoodData foodLevel
public net.minecraft.world.food.FoodData saturationLevel public net.minecraft.world.food.FoodData saturationLevel
public net.minecraft.world.inventory.AbstractContainerMenu menuType
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftSlots public net.minecraft.world.inventory.AbstractContainerMenu quickcraftSlots
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftStatus public net.minecraft.world.inventory.AbstractContainerMenu quickcraftStatus
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftType public net.minecraft.world.inventory.AbstractContainerMenu quickcraftType
@@ -490,6 +515,9 @@ public net.minecraft.world.inventory.BrewingStandMenu brewingStandData
public net.minecraft.world.inventory.CraftingMenu access public net.minecraft.world.inventory.CraftingMenu access
public net.minecraft.world.inventory.DispenserMenu dispenser public net.minecraft.world.inventory.DispenserMenu dispenser
public net.minecraft.world.inventory.HorseInventoryMenu SLOT_BODY_ARMOR public net.minecraft.world.inventory.HorseInventoryMenu SLOT_BODY_ARMOR
public net.minecraft.world.inventory.HorseInventoryMenu SLOT_HORSE_INVENTORY_START
public net.minecraft.world.inventory.HorseInventoryMenu SLOT_SADDLE
public net.minecraft.world.inventory.HorseInventoryMenu horse
public net.minecraft.world.inventory.MerchantContainer selectionHint public net.minecraft.world.inventory.MerchantContainer selectionHint
public net.minecraft.world.inventory.Slot slot public net.minecraft.world.inventory.Slot slot
public net.minecraft.world.item.AdventureModePredicate predicates public net.minecraft.world.item.AdventureModePredicate predicates
@@ -501,15 +529,15 @@ public net.minecraft.world.item.ItemCooldowns tickCount
public net.minecraft.world.item.ItemCooldowns$CooldownInstance public net.minecraft.world.item.ItemCooldowns$CooldownInstance
public net.minecraft.world.item.ItemStackLinkedSet TYPE_AND_TAG public net.minecraft.world.item.ItemStackLinkedSet TYPE_AND_TAG
public net.minecraft.world.item.JukeboxSongPlayer song public net.minecraft.world.item.JukeboxSongPlayer song
public net.minecraft.world.item.MapItem createNewSavedData(Lnet/minecraft/world/level/Level;IIIZZLnet/minecraft/resources/ResourceKey;)Lnet/minecraft/world/level/saveddata/maps/MapId; public net.minecraft.world.item.MapItem createNewSavedData(Lnet/minecraft/server/level/ServerLevel;IIIZZLnet/minecraft/resources/ResourceKey;)Lnet/minecraft/world/level/saveddata/maps/MapId;
public net.minecraft.world.item.StandingAndWallBlockItem wallBlock public net.minecraft.world.item.StandingAndWallBlockItem wallBlock
public net.minecraft.world.item.component.BundleContents$Mutable getMaxAmountToAdd(Lnet/minecraft/world/item/ItemStack;)I
public net.minecraft.world.item.component.ItemContainerContents MAX_SIZE public net.minecraft.world.item.component.ItemContainerContents MAX_SIZE
public net.minecraft.world.item.component.ItemContainerContents items public net.minecraft.world.item.component.ItemContainerContents items
public net.minecraft.world.item.context.UseOnContext <init>(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/InteractionHand;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/phys/BlockHitResult;)V public net.minecraft.world.item.context.UseOnContext <init>(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/InteractionHand;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/phys/BlockHitResult;)V
public net.minecraft.world.item.crafting.RecipeManager recipes public net.minecraft.world.item.crafting.RecipeManager recipes
public net.minecraft.world.item.crafting.RecipeMap byKey public net.minecraft.world.item.crafting.RecipeMap byKey
public net.minecraft.world.item.crafting.RecipeMap byType public net.minecraft.world.item.crafting.RecipeMap byType
public net.minecraft.world.item.enchantment.ItemEnchantments showInTooltip
public net.minecraft.world.item.trading.MerchantOffer demand public net.minecraft.world.item.trading.MerchantOffer demand
public net.minecraft.world.item.trading.MerchantOffer result public net.minecraft.world.item.trading.MerchantOffer result
public net.minecraft.world.item.trading.MerchantOffer specialPriceDiff public net.minecraft.world.item.trading.MerchantOffer specialPriceDiff
@@ -526,7 +554,10 @@ public net.minecraft.world.level.BaseSpawner spawnCount
public net.minecraft.world.level.BaseSpawner spawnDelay public net.minecraft.world.level.BaseSpawner spawnDelay
public net.minecraft.world.level.BaseSpawner spawnPotentials public net.minecraft.world.level.BaseSpawner spawnPotentials
public net.minecraft.world.level.BaseSpawner spawnRange public net.minecraft.world.level.BaseSpawner spawnRange
public net.minecraft.world.level.GameRules GAME_RULE_TYPES
public net.minecraft.world.level.GameRules$Value deserialize(Ljava/lang/String;)V
public net.minecraft.world.level.GameRules$Value onChanged(Lnet/minecraft/server/MinecraftServer;)V public net.minecraft.world.level.GameRules$Value onChanged(Lnet/minecraft/server/MinecraftServer;)V
public net.minecraft.world.level.Level blockEntityTickers
public net.minecraft.world.level.Level getEntities()Lnet/minecraft/world/level/entity/LevelEntityGetter; public net.minecraft.world.level.Level getEntities()Lnet/minecraft/world/level/entity/LevelEntityGetter;
public net.minecraft.world.level.Level levelData public net.minecraft.world.level.Level levelData
public net.minecraft.world.level.Level rainLevel public net.minecraft.world.level.Level rainLevel
@@ -534,6 +565,7 @@ public net.minecraft.world.level.Level thread
public net.minecraft.world.level.Level thunderLevel public net.minecraft.world.level.Level thunderLevel
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
public net.minecraft.world.level.StructureManager level public net.minecraft.world.level.StructureManager level
public net.minecraft.world.level.TicketStorage tickets
public net.minecraft.world.level.biome.Biome climateSettings public net.minecraft.world.level.biome.Biome climateSettings
public net.minecraft.world.level.biome.Biome getTemperature(Lnet/minecraft/core/BlockPos;I)F public net.minecraft.world.level.biome.Biome getTemperature(Lnet/minecraft/core/BlockPos;I)F
public net.minecraft.world.level.biome.Biome$ClimateSettings public net.minecraft.world.level.biome.Biome$ClimateSettings
@@ -558,6 +590,7 @@ public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity cooking
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity getTotalCookTime(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity;)I public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity getTotalCookTime(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity;)I
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity litTimeRemaining public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity litTimeRemaining
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity recipesUsed public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity recipesUsed
public net.minecraft.world.level.block.entity.BannerBlockEntity name
public net.minecraft.world.level.block.entity.BarrelBlockEntity openersCounter public net.minecraft.world.level.block.entity.BarrelBlockEntity openersCounter
public net.minecraft.world.level.block.entity.BarrelBlockEntity playSound(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/sounds/SoundEvent;)V public net.minecraft.world.level.block.entity.BarrelBlockEntity playSound(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/sounds/SoundEvent;)V
public net.minecraft.world.level.block.entity.BarrelBlockEntity updateBlockState(Lnet/minecraft/world/level/block/state/BlockState;Z)V public net.minecraft.world.level.block.entity.BarrelBlockEntity updateBlockState(Lnet/minecraft/world/level/block/state/BlockState;Z)V
@@ -572,7 +605,7 @@ public net.minecraft.world.level.block.entity.BedBlockEntity color
public net.minecraft.world.level.block.entity.BeehiveBlockEntity savedFlowerPos public net.minecraft.world.level.block.entity.BeehiveBlockEntity savedFlowerPos
public net.minecraft.world.level.block.entity.BellBlockEntity resonating public net.minecraft.world.level.block.entity.BellBlockEntity resonating
public net.minecraft.world.level.block.entity.BellBlockEntity resonationTicks public net.minecraft.world.level.block.entity.BellBlockEntity resonationTicks
public net.minecraft.world.level.block.entity.BlockEntity saveId(Lnet/minecraft/nbt/CompoundTag;)V public net.minecraft.world.level.block.entity.BlockEntity saveId(Lnet/minecraft/world/level/storage/ValueOutput;)V
public net.minecraft.world.level.block.entity.BlockEntityType validBlocks public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
public net.minecraft.world.level.block.entity.BrewingStandBlockEntity brewTime public net.minecraft.world.level.block.entity.BrewingStandBlockEntity brewTime
public net.minecraft.world.level.block.entity.BrewingStandBlockEntity fuel public net.minecraft.world.level.block.entity.BrewingStandBlockEntity fuel
@@ -584,10 +617,11 @@ public net.minecraft.world.level.block.entity.CampfireBlockEntity cookingTime
public net.minecraft.world.level.block.entity.ChestBlockEntity openersCounter public net.minecraft.world.level.block.entity.ChestBlockEntity openersCounter
public net.minecraft.world.level.block.entity.ChestBlockEntity playSound(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/sounds/SoundEvent;)V public net.minecraft.world.level.block.entity.ChestBlockEntity playSound(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/sounds/SoundEvent;)V
public net.minecraft.world.level.block.entity.ChiseledBookShelfBlockEntity lastInteractedSlot public net.minecraft.world.level.block.entity.ChiseledBookShelfBlockEntity lastInteractedSlot
public net.minecraft.world.level.block.entity.ConduitBlockEntity MIN_KILL_SIZE
public net.minecraft.world.level.block.entity.ConduitBlockEntity destroyTarget public net.minecraft.world.level.block.entity.ConduitBlockEntity destroyTarget
public net.minecraft.world.level.block.entity.ConduitBlockEntity destroyTargetUUID
public net.minecraft.world.level.block.entity.ConduitBlockEntity effectBlocks public net.minecraft.world.level.block.entity.ConduitBlockEntity effectBlocks
public net.minecraft.world.level.block.entity.ConduitBlockEntity getDestroyRangeAABB(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/phys/AABB; public net.minecraft.world.level.block.entity.ConduitBlockEntity getDestroyRangeAABB(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/phys/AABB;
public net.minecraft.world.level.block.entity.ConduitBlockEntity updateDestroyTarget(Lnet/minecraft/world/entity/EntityReference;Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;Z)Lnet/minecraft/world/entity/EntityReference;
public net.minecraft.world.level.block.entity.CrafterBlockEntity craftingTicksRemaining public net.minecraft.world.level.block.entity.CrafterBlockEntity craftingTicksRemaining
public net.minecraft.world.level.block.entity.DecoratedPotBlockEntity decorations public net.minecraft.world.level.block.entity.DecoratedPotBlockEntity decorations
public net.minecraft.world.level.block.entity.EnderChestBlockEntity openersCounter public net.minecraft.world.level.block.entity.EnderChestBlockEntity openersCounter
@@ -602,6 +636,7 @@ public net.minecraft.world.level.block.entity.SculkSensorBlockEntity lastVibrati
public net.minecraft.world.level.block.entity.SculkShriekerBlockEntity warningLevel public net.minecraft.world.level.block.entity.SculkShriekerBlockEntity warningLevel
public net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity openCount public net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity openCount
public net.minecraft.world.level.block.entity.SignBlockEntity playerWhoMayEdit public net.minecraft.world.level.block.entity.SignBlockEntity playerWhoMayEdit
public net.minecraft.world.level.block.entity.SkullBlockEntity customName
public net.minecraft.world.level.block.entity.SkullBlockEntity noteBlockSound public net.minecraft.world.level.block.entity.SkullBlockEntity noteBlockSound
public net.minecraft.world.level.block.entity.SkullBlockEntity owner public net.minecraft.world.level.block.entity.SkullBlockEntity owner
public net.minecraft.world.level.block.entity.StructureBlockEntity author public net.minecraft.world.level.block.entity.StructureBlockEntity author
@@ -620,11 +655,19 @@ public net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity age
public net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity exactTeleport public net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity exactTeleport
public net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity exitPortal public net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity exitPortal
public net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity trialSpawner public net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity trialSpawner
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawner config
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawner isOminous public net.minecraft.world.level.block.entity.trialspawner.TrialSpawner isOminous
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawner stateAccessor public net.minecraft.world.level.block.entity.trialspawner.TrialSpawner stateAccessor
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData currentMobs public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData cooldownEndsAt
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData detectedPlayers public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData currentMobs
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData nextSpawnData public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData detectedPlayers
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData nextMobSpawnsAt
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData nextSpawnData
public net.minecraft.world.level.block.entity.vault.VaultBlockEntity serverData
public net.minecraft.world.level.block.entity.vault.VaultServerData getRewardedPlayers()Ljava/util/Set;
public net.minecraft.world.level.block.entity.vault.VaultServerData pauseStateUpdatingUntil(J)V
public net.minecraft.world.level.block.entity.vault.VaultServerData stateUpdatingResumesAt()J
public net.minecraft.world.level.block.entity.vault.VaultSharedData getConnectedPlayers()Ljava/util/Set;
public net.minecraft.world.level.block.state.BlockBehaviour getMenuProvider(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/MenuProvider; public net.minecraft.world.level.block.state.BlockBehaviour getMenuProvider(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/MenuProvider;
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
public net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase destroySpeed public net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase destroySpeed
@@ -638,6 +681,7 @@ public net.minecraft.world.level.chunk.LevelChunk level
public net.minecraft.world.level.chunk.LevelChunk loaded public net.minecraft.world.level.chunk.LevelChunk loaded
public net.minecraft.world.level.chunk.LevelChunkSection states public net.minecraft.world.level.chunk.LevelChunkSection states
public net.minecraft.world.level.chunk.PalettedContainer registry public net.minecraft.world.level.chunk.PalettedContainer registry
public net.minecraft.world.level.chunk.status.ChunkStatusTasks postLoadProtoChunk(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/storage/ValueInput$ValueInputList;)V
public net.minecraft.world.level.chunk.storage.EntityStorage entityDeserializerQueue public net.minecraft.world.level.chunk.storage.EntityStorage entityDeserializerQueue
public net.minecraft.world.level.chunk.storage.EntityStorage level public net.minecraft.world.level.chunk.storage.EntityStorage level
public net.minecraft.world.level.chunk.storage.RegionFileStorage regionCache public net.minecraft.world.level.chunk.storage.RegionFileStorage regionCache
@@ -670,6 +714,7 @@ public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
public net.minecraft.world.level.levelgen.SurfaceRules$SurfaceRule public net.minecraft.world.level.levelgen.SurfaceRules$SurfaceRule
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource
public net.minecraft.world.level.levelgen.structure.StructurePiece SHAPE_CHECK_BLOCKS
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement exclusionZone public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement exclusionZone
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequency public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequency
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequencyReductionMethod public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequencyReductionMethod
@@ -701,7 +746,6 @@ public-f net.minecraft.server.ReloadableServerResources commands
public-f net.minecraft.server.dedicated.DedicatedServer serverLinks public-f net.minecraft.server.dedicated.DedicatedServer serverLinks
public-f net.minecraft.server.dedicated.DedicatedServer settings public-f net.minecraft.server.dedicated.DedicatedServer settings
public-f net.minecraft.server.dedicated.DedicatedServerProperties pauseWhenEmptySeconds public-f net.minecraft.server.dedicated.DedicatedServerProperties pauseWhenEmptySeconds
public-f net.minecraft.server.level.TicketType timeout
public-f net.minecraft.server.players.PlayerList maxPlayers public-f net.minecraft.server.players.PlayerList maxPlayers
public-f net.minecraft.world.entity.LivingEntity combatTracker public-f net.minecraft.world.entity.LivingEntity combatTracker
public-f net.minecraft.world.entity.LivingEntity invulnerableDuration public-f net.minecraft.world.entity.LivingEntity invulnerableDuration
@@ -714,7 +758,6 @@ public-f net.minecraft.world.inventory.AbstractContainerMenu lastSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteDataSlots public-f net.minecraft.world.inventory.AbstractContainerMenu remoteDataSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteSlots public-f net.minecraft.world.inventory.AbstractContainerMenu remoteSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu slots public-f net.minecraft.world.inventory.AbstractContainerMenu slots
public-f net.minecraft.world.item.enchantment.ItemEnchantments$Mutable showInTooltip
public-f net.minecraft.world.item.trading.MerchantOffer baseCostA public-f net.minecraft.world.item.trading.MerchantOffer baseCostA
public-f net.minecraft.world.item.trading.MerchantOffer costB public-f net.minecraft.world.item.trading.MerchantOffer costB
public-f net.minecraft.world.item.trading.MerchantOffer maxUses public-f net.minecraft.world.item.trading.MerchantOffer maxUses
@@ -723,11 +766,8 @@ public-f net.minecraft.world.item.trading.MerchantOffer rewardExp
public-f net.minecraft.world.item.trading.MerchantOffer xp public-f net.minecraft.world.item.trading.MerchantOffer xp
public-f net.minecraft.world.level.LevelSettings hardcore public-f net.minecraft.world.level.LevelSettings hardcore
public-f net.minecraft.world.level.LevelSettings levelName public-f net.minecraft.world.level.LevelSettings levelName
public-f net.minecraft.world.level.block.ChestBlock MENU_PROVIDER_COMBINER
public-f net.minecraft.world.level.block.entity.BannerBlockEntity baseColor public-f net.minecraft.world.level.block.entity.BannerBlockEntity baseColor
public-f net.minecraft.world.level.block.entity.trialspawner.TrialSpawner normalConfig
public-f net.minecraft.world.level.block.entity.trialspawner.TrialSpawner ominousConfig
public-f net.minecraft.world.level.block.entity.trialspawner.TrialSpawner requiredPlayerRange
public-f net.minecraft.world.level.block.entity.trialspawner.TrialSpawner targetCooldownLength
public-f net.minecraft.world.level.saveddata.maps.MapItemSavedData centerX public-f net.minecraft.world.level.saveddata.maps.MapItemSavedData centerX
public-f net.minecraft.world.level.saveddata.maps.MapItemSavedData centerZ public-f net.minecraft.world.level.saveddata.maps.MapItemSavedData centerZ
public-f net.minecraft.world.level.saveddata.maps.MapItemSavedData dimension public-f net.minecraft.world.level.saveddata.maps.MapItemSavedData dimension

View File

@@ -10,7 +10,7 @@
# a significant amount of time for us to track down every possible issue, so this file will likely be around and in # a significant amount of time for us to track down every possible issue, so this file will likely be around and in
# use - at least in some capacity - for a long time. # use - at least in some capacity - for a long time.
tiny 2 0 mojang+yarn spigot tiny 2 0 mojang spigot
# CraftBukkit changes type # CraftBukkit changes type
c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer
@@ -21,7 +21,7 @@ c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chu
# See mappings-patch.tiny # See mappings-patch.tiny
c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager G f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager H
# The method is made public by Spigot, which then causes accidental overrides # The method is made public by Spigot, which then causes accidental overrides
c net/minecraft/world/entity/Entity net/minecraft/world/entity/Entity c net/minecraft/world/entity/Entity net/minecraft/world/entity/Entity

View File

@@ -1,18 +1,8 @@
import io.papermc.paperweight.util.*
import io.papermc.paperweight.util.constants.*
import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent import org.gradle.api.tasks.testing.logging.TestLogEvent
import java.io.IOException
import java.net.URI
import java.nio.file.FileVisitResult
import java.nio.file.Files
import java.nio.file.SimpleFileVisitor
import kotlin.io.path.*
import java.nio.file.Path
import kotlin.random.Random
plugins { plugins {
id("io.papermc.paperweight.core") version "2.0.0-beta.8" apply false id("io.papermc.paperweight.core") version "2.0.0-beta.17" apply false
} }
subprojects { subprojects {
@@ -38,6 +28,7 @@ subprojects {
options.encoding = Charsets.UTF_8.name() options.encoding = Charsets.UTF_8.name()
options.release = 21 options.release = 21
options.isFork = true options.isFork = true
options.compilerArgs.addAll(listOf("-Xlint:-deprecation", "-Xlint:-removal"))
} }
tasks.withType<Javadoc> { tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name() options.encoding = Charsets.UTF_8.name()
@@ -81,248 +72,3 @@ tasks.register("printPaperVersion") {
println(paperVersion.get()) println(paperVersion.get())
} }
} }
/*
// Used when updating to a new Minecraft version
tasks.register("pickUpdateDirectory") {
val issue = providers.gradleProperty("updateTaskListIssue").get()
val patchesFolder = layout.projectDirectory.dir("paper-server/patches/").convertToPath()
val storage = layout.cache.resolve("last-updating-folder").also { it.parent.createDirectories() }
doLast {
val html = URI(issue).toURL().readText()
val beginMarker = "```[tasklist]"
val start = html.indexOf(beginMarker)
val end = html.indexOf("```", start + beginMarker.length)
val taskList = html.substring(start + beginMarker.length, end)
// Extract all incomplete tasks and select a random one
val incompleteTasks = taskList.split("\\n").filter { it.startsWith("- [ ]") }.map { it.replace("- [ ] ", "") }
if (incompleteTasks.isEmpty()) {
error("No incomplete tasks found in the task list.")
}
val next = incompleteTasks[Random.nextInt(incompleteTasks.size)]
println("checking out $next...")
val dir = patchesFolder.resolve("unapplied").resolve(next)
if (!dir.exists()) {
error("Unapplied patch folder $next does not exist, did someone else already check it out and forgot to mark it?")
}
dir.listDirectoryEntries("*.patch").forEach { patch ->
patch.copyTo(patchesFolder.resolve("sources").resolve(next).resolve(patch.fileName).also { it.createDirectories() }, overwrite = true)
patch.deleteIfExists()
}
if (dir.listDirectoryEntries().isEmpty()) {
dir.deleteIfExists()
}
storage.writeText(next)
println("please tick the box in the issue: $issue")
println("if you don't finish it, uncheck the task again after you commited")
}
}
tasks.register("showUpdateDirectories") {
val patchDir = layout.projectDirectory.dir("paper-server/patches/unapplied/").convertToPath()
doLast {
Files.walkFileTree(patchDir, object : SimpleFileVisitor<Path>() {
override fun postVisitDirectory(dir: Path?, exc: IOException?): FileVisitResult {
dir?.takeIf { it.listDirectoryEntries("*.patch").isNotEmpty() }?.let {
println("- [ ] ${patchDir.relativize(it).pathString.replace("\\", "/")}")
}
return FileVisitResult.CONTINUE
}
})
}
}
tasks.register("moveUpdateDirectory") {
notCompatibleWithConfigurationCache("This task is interactive")
fun expandUserHome(path: String): Path {
return Path.of(path.replaceFirst("^~".toRegex(), System.getProperty("user.home")))
}
val input = providers.fileContents(layout.projectDirectory.file("$CACHE_PATH/last-updating-folder")).asText.map { it.trim() }
val patchFolder = layout.projectDirectory.dir("paper-server/patches/sources").dir(input)
val sourceFolder = layout.projectDirectory.dir("paper-server/src/minecraft/java").dir(input)
val targetFolder = providers.gradleProperty("cleanPaperRepo").map {
expandUserHome(it).resolve(input.get())
}
fun copy(back: Boolean = false) {
patchFolder.path.listDirectoryEntries().forEach {
val relative = patchFolder.path.relativize(it).toString().replace(".patch", "")
val source = sourceFolder.path.resolve(relative)
val target = targetFolder.get().resolve(relative)
if (target.isDirectory()) { return@forEach }
if (back) {
target.copyTo(source, overwrite = true)
} else {
source.copyTo(target, overwrite = true)
}
}
}
doLast {
if (!targetFolder.isPresent) {
error("cleanPaperRepo is required, define it in gradle.properties")
}
copy()
val files = patchFolder.path.listDirectoryEntries().map { it.fileName.toString().replace(".patch", "") }
println("Copied $files from $sourceFolder to $targetFolder")
println("Make the files compile, then press enter to copy them back!")
System.`in`.read()
copy(back = true)
println("copied back!")
}
}
// see gradle.properties
if (providers.gradleProperty("updatingMinecraft").getOrElse("false").toBoolean()) {
tasks.collectAtsFromPatches {
val dir = layout.projectDirectory.dir("patches/unapplied/server")
if (dir.path.isDirectory()) {
extraPatchDir = dir
}
}
tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches>().configureEach {
filterPatches = false
}
tasks.register("continueServerUpdate", RebasePatches::class) {
description = "Moves the next X patches from unapplied to applied, and applies them. X being the number of patches that apply cleanly, plus the terminal failure if any."
projectDir = project.projectDir
appliedPatches = file("patches/server")
unappliedPatches = file("patches/unapplied/server")
applyTaskName = "applyServerPatches"
patchedDir = "Paper-Server"
}
}
@UntrackedTask(because = "Does not make sense to track state")
abstract class RebasePatches : BaseTask() {
@get:Internal
abstract val projectDir: DirectoryProperty
@get:InputFiles
abstract val appliedPatches: DirectoryProperty
@get:InputFiles
abstract val unappliedPatches: DirectoryProperty
@get:Input
abstract val applyTaskName: Property<String>
@get:Input
abstract val patchedDir: Property<String>
private fun unapplied(): List<Path> =
unappliedPatches.path.listDirectoryEntries("*.patch").sortedBy { it.name }
private fun appliedLoc(patch: Path): Path = appliedPatches.path.resolve(unappliedPatches.path.relativize(patch))
companion object {
val regex = Pattern.compile("Patch failed at ([0-9]{4}) (.*)")
val continuationRegex = Pattern.compile("^\\s{1}.+\$")
const val subjectPrefix = "Subject: [PATCH] "
}
@TaskAction
fun run() {
val patchedDirPath = projectDir.path.resolve(patchedDir.get())
if (patchedDirPath.isDirectory()) {
val status = Git(patchedDirPath)("status").getText()
if (status.contains("You are in the middle of an am session.")) {
throw PaperweightException("Cannot continue update when $patchedDirPath is in the middle of an am session.")
}
}
val unapplied = unapplied()
for (patch in unapplied) {
patch.copyTo(appliedLoc(patch))
}
val out = ByteArrayOutputStream()
val proc = ProcessBuilder()
.directory(projectDir.path)
.command("./gradlew", applyTaskName.get())
.redirectErrorStream(true)
.start()
val f = redirect(proc.inputStream, out)
val exit = proc.waitFor()
f.get()
if (exit != 0) {
val outStr = String(out.toByteArray())
val matcher = regex.matcher(outStr)
if (!matcher.find()) error("Could not determine failure point")
val failedSubjectFragment = matcher.group(2)
val failed = unapplied.single { p ->
p.useLines { lines ->
val collect = mutableListOf<String>()
for (line in lines) {
if (line.startsWith(subjectPrefix)) {
collect += line
} else if (collect.size == 1) {
if (continuationRegex.matcher(line).matches()) {
collect += line
} else {
break
}
}
}
val subjectLine = collect.joinToString("").substringAfter(subjectPrefix)
subjectLine.startsWith(failedSubjectFragment)
}
}
// delete successful & failure point from unapplied patches dir
for (path in unapplied) {
path.deleteIfExists()
if (path == failed) {
break
}
}
// delete failed from patches dir
var started = false
for (path in unapplied) {
if (path == failed) {
started = true
continue
}
if (started) {
appliedLoc(path).deleteIfExists()
}
}
// Delete the build file before resetting the AM session in case it has compilation errors
patchedDirPath.resolve("build.gradle.kts").deleteIfExists()
// Apply again to reset the am session (so it ends on the failed patch, to allow us to rebuild after fixing it)
val apply2 = ProcessBuilder()
.directory(projectDir.path)
.command("./gradlew", applyTaskName.get())
.redirectErrorStream(true)
.start()
val f1 = redirect(apply2.inputStream, System.out)
apply2.waitFor()
f1.get()
logger.lifecycle(outStr)
logger.lifecycle("Patch failed at $failed; See Git output above.")
} else {
unapplied.forEach { it.deleteIfExists() }
logger.lifecycle("All patches applied!")
}
val git = Git(projectDir.path)
git("add", appliedPatches.path.toString() + "/*").runSilently()
git("add", unappliedPatches.path.toString() + "/*").runSilently()
}
}
*/

View File

@@ -1,10 +1,9 @@
group=io.papermc.paper group=io.papermc.paper
version=1.21.4-R0.1-SNAPSHOT version=1.21.6-R0.1-SNAPSHOT
mcVersion=1.21.4 mcVersion=1.21.6
# Set to true while updating Minecraft version # Set to true while updating Minecraft version
updatingMinecraft=false updatingMinecraft=false
updateTaskListIssue=https://github.com/PaperMC/Paper/issues/11736
org.gradle.configuration-cache=true org.gradle.configuration-cache=true
org.gradle.caching=true org.gradle.caching=true

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

6
gradlew vendored
View File

@@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -205,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command: # Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped. # and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line. # treated as '${Hostname}' itself on the command line.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \ -classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@" "$@"
# Stop when "xargs" is not available. # Stop when "xargs" is not available.

4
gradlew.bat vendored
View File

@@ -70,11 +70,11 @@ goto fail
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell

View File

@@ -1,37 +0,0 @@
import io.papermc.paperweight.util.defaultJavaLauncher
plugins {
java
id("io.papermc.paperweight.source-generator")
}
paperweight {
atFile.set(layout.projectDirectory.file("wideners.at"))
}
dependencies {
minecraftJar(project(":paper-server", "mappedJarOutgoing"))
implementation(project(":paper-server", "macheMinecraftLibraries"))
implementation("com.squareup:javapoet:1.13.0")
implementation(project(":paper-api"))
implementation("io.github.classgraph:classgraph:4.8.47")
implementation("org.jetbrains:annotations:24.1.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.register<JavaExec>("generate") {
dependsOn(tasks.check)
mainClass.set("io.papermc.generator.Main")
classpath(sourceSets.main.map { it.runtimeClasspath })
args(projectDir.toPath().resolve("generated").toString())
javaLauncher = javaToolchains.defaultJavaLauncher(project)
}
tasks.test {
useJUnitPlatform()
}
group = "io.papermc.paper"
version = "1.0-SNAPSHOT"

View File

@@ -1,57 +0,0 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#CAT_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class CatVariantTagKeys {
/**
* {@code #minecraft:default_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Cat.Type> DEFAULT_SPAWNS = create(key("default_spawns"));
/**
* {@code #minecraft:full_moon_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Cat.Type> FULL_MOON_SPAWNS = create(key("full_moon_spawns"));
private CatVariantTagKeys() {
}
/**
* Creates a tag key for {@link Cat.Type} in the registry {@code minecraft:cat_variant}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Cat.Type> create(final Key key) {
return TagKey.create(RegistryKey.CAT_VARIANT, key);
}
}

View File

@@ -1,96 +0,0 @@
package io.papermc.generator;
import io.papermc.generator.types.GeneratedKeyType;
import io.papermc.generator.types.GeneratedTagKeyType;
import io.papermc.generator.types.SourceGenerator;
import io.papermc.generator.types.goal.MobGoalGenerator;
import io.papermc.paper.registry.RegistryKey;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import org.bukkit.Art;
import org.bukkit.Fluid;
import org.bukkit.GameEvent;
import org.bukkit.JukeboxSong;
import org.bukkit.MusicInstrument;
import org.bukkit.Sound;
import org.bukkit.attribute.Attribute;
import org.bukkit.block.Biome;
import org.bukkit.block.BlockType;
import org.bukkit.block.banner.PatternType;
import org.bukkit.damage.DamageType;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Cat;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Frog;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.generator.structure.Structure;
import org.bukkit.generator.structure.StructureType;
import org.bukkit.inventory.ItemType;
import org.bukkit.inventory.MenuType;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.bukkit.inventory.meta.trim.TrimPattern;
import org.bukkit.map.MapCursor;
import org.bukkit.potion.PotionEffectType;
public interface Generators {
SourceGenerator[] API = {
// built-ins
simpleKey("GameEventKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT, true),
simpleKey("StructureTypeKeys", StructureType.class, Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, false),
simpleKey("MobEffectKeys", PotionEffectType.class, Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, false),
simpleKey("BlockTypeKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK, false),
simpleKey("ItemTypeKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM, false),
simpleKey("CatVariantKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT, false),
simpleKey("FrogVariantKeys", Frog.Variant.class, Registries.FROG_VARIANT, RegistryKey.FROG_VARIANT, false),
simpleKey("VillagerProfessionKeys", Villager.Profession.class, Registries.VILLAGER_PROFESSION, RegistryKey.VILLAGER_PROFESSION, false),
simpleKey("VillagerTypeKeys", Villager.Type.class, Registries.VILLAGER_TYPE, RegistryKey.VILLAGER_TYPE, false),
simpleKey("MapDecorationTypeKeys", MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, RegistryKey.MAP_DECORATION_TYPE, false),
simpleKey("MenuTypeKeys", MenuType.class, Registries.MENU, RegistryKey.MENU, false),
simpleKey("AttributeKeys", Attribute.class, Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, false),
simpleKey("FluidKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID, false),
simpleKey("SoundEventKeys", Sound.class, Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, false),
// data-driven
simpleKey("BiomeKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME, true),
simpleKey("StructureKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE, true),
simpleKey("TrimMaterialKeys", TrimMaterial.class, Registries.TRIM_MATERIAL, RegistryKey.TRIM_MATERIAL, true),
simpleKey("TrimPatternKeys", TrimPattern.class, Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, true),
simpleKey("DamageTypeKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, true),
simpleKey("WolfVariantKeys", Wolf.Variant.class, Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, true),
simpleKey("EnchantmentKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, true),
simpleKey("JukeboxSongKeys", JukeboxSong.class, Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, true),
simpleKey("BannerPatternKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, true),
simpleKey("PaintingVariantKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT, true),
simpleKey("InstrumentKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT, true),
// tags
simpleTagKey("GameEventTagKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT),
simpleTagKey("BlockTypeTagKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK),
simpleTagKey("ItemTypeTagKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM),
simpleTagKey("CatVariantTagKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT),
simpleTagKey("FluidTagKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID),
simpleTagKey("BiomeTagKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME),
simpleTagKey("StructureTagKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE),
simpleTagKey("DamageTypeTagKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE),
simpleTagKey("EnchantmentTagKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT),
simpleTagKey("BannerPatternTagKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN),
simpleTagKey("PaintingVariantTagKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT),
simpleTagKey("InstrumentTagKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT),
// api only
simpleTagKey("EntityTypeTagKeys", EntityType.class, Registries.ENTITY_TYPE, RegistryKey.ENTITY_TYPE),
new MobGoalGenerator("VanillaGoal", "com.destroystokyo.paper.entity.ai")
};
private static <T, A> SourceGenerator simpleKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
return new GeneratedKeyType<>(className, apiType, "io.papermc.paper.registry.keys", registryKey, apiRegistryKey, publicCreateKeyMethod);
}
private static <T, A> SourceGenerator simpleTagKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey) {
return new GeneratedTagKeyType<>(className, apiType, "io.papermc.paper.registry.keys.tags", registryKey, apiRegistryKey, true);
}
}

View File

@@ -1,93 +0,0 @@
package io.papermc.generator;
import com.google.common.util.concurrent.MoreExecutors;
import com.mojang.logging.LogUtils;
import io.papermc.generator.types.SourceGenerator;
import io.papermc.generator.utils.TagCollector;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import net.minecraft.SharedConstants;
import net.minecraft.commands.Commands;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.LayeredRegistryAccess;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistryAccess;
import net.minecraft.resources.RegistryDataLoader;
import net.minecraft.server.Bootstrap;
import net.minecraft.server.RegistryLayer;
import net.minecraft.server.ReloadableServerResources;
import net.minecraft.server.packs.PackType;
import net.minecraft.server.packs.repository.Pack;
import net.minecraft.server.packs.repository.PackRepository;
import net.minecraft.server.packs.repository.ServerPacksSource;
import net.minecraft.server.packs.resources.MultiPackResourceManager;
import net.minecraft.tags.TagKey;
import net.minecraft.tags.TagLoader;
import net.minecraft.world.flag.FeatureFlags;
import org.apache.commons.io.file.PathUtils;
import org.slf4j.Logger;
public final class Main {
private static final Logger LOGGER = LogUtils.getLogger();
public static final RegistryAccess.Frozen REGISTRY_ACCESS;
public static final Map<TagKey<?>, String> EXPERIMENTAL_TAGS;
static {
SharedConstants.tryDetectVersion();
Bootstrap.bootStrap();
Bootstrap.validate();
final PackRepository resourceRepository = ServerPacksSource.createVanillaTrustedRepository();
resourceRepository.reload();
final MultiPackResourceManager resourceManager = new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().map(Pack::open).toList());
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
final List<Registry.PendingTags<?>> pendingTags = TagLoader.loadTagsForExistingRegistries(resourceManager, layers.getLayer(RegistryLayer.STATIC));
final List<HolderLookup.RegistryLookup<?>> worldGenLayer = TagLoader.buildUpdatedLookups(layers.getAccessForLoading(RegistryLayer.WORLDGEN), pendingTags);
final RegistryAccess.Frozen frozenWorldgenRegistries = RegistryDataLoader.load(resourceManager, worldGenLayer, RegistryDataLoader.WORLDGEN_REGISTRIES);
layers = layers.replaceFrom(RegistryLayer.WORLDGEN, frozenWorldgenRegistries);
REGISTRY_ACCESS = layers.compositeAccess().freeze();
final ReloadableServerResources reloadableServerResources = ReloadableServerResources.loadResources(
resourceManager,
layers,
pendingTags,
FeatureFlags.VANILLA_SET,
Commands.CommandSelection.DEDICATED,
0,
MoreExecutors.directExecutor(),
MoreExecutors.directExecutor()
).join();
reloadableServerResources.updateStaticRegistryTags();
EXPERIMENTAL_TAGS = TagCollector.grabExperimental(resourceManager);
}
private Main() {
}
public static void main(final String[] args) {
LOGGER.info("Running API generators...");
generate(Paths.get(args[0]), Generators.API);
// LOGGER.info("Running Server generators...");
// generate(Paths.get(args[1]), Generators.SERVER);
}
private static void generate(Path output, SourceGenerator[] generators) {
try {
if (Files.exists(output)) {
PathUtils.deleteDirectory(output);
}
Files.createDirectories(output);
for (final SourceGenerator generator : generators) {
generator.writeToFile(output);
}
LOGGER.info("Files written to {}", output.toAbsolutePath());
} catch (final Exception ex) {
throw new RuntimeException(ex);
}
}
}

View File

@@ -1,207 +0,0 @@
package io.papermc.generator.types;
import com.google.common.collect.Sets;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import io.papermc.generator.Main;
import io.papermc.generator.utils.Annotations;
import io.papermc.generator.utils.CollectingContext;
import io.papermc.generator.utils.Formatting;
import io.papermc.generator.utils.Javadocs;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Collections;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import javax.lang.model.SourceVersion;
import net.kyori.adventure.key.Key;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistrySetBuilder;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.registries.VanillaRegistries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.flag.FeatureElement;
import net.minecraft.world.flag.FeatureFlags;
import org.bukkit.MinecraftExperimental;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.framework.qual.DefaultQualifier;
import static com.squareup.javapoet.TypeSpec.classBuilder;
import static io.papermc.generator.utils.Annotations.EXPERIMENTAL_API_ANNOTATION;
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
import static java.util.Objects.requireNonNull;
import static javax.lang.model.element.Modifier.FINAL;
import static javax.lang.model.element.Modifier.PRIVATE;
import static javax.lang.model.element.Modifier.PUBLIC;
import static javax.lang.model.element.Modifier.STATIC;
@DefaultQualifier(NonNull.class)
public class GeneratedKeyType<T, A> extends SimpleGenerator {
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> VANILLA_REGISTRY_ENTRIES = VanillaRegistries.BUILDER.entries.stream()
.collect(Collectors.toMap(RegistrySetBuilder.RegistryStub::key, RegistrySetBuilder.RegistryStub::bootstrap));
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> EXPERIMENTAL_REGISTRY_ENTRIES = Map.of(); // Update for Experimental API
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
static {
final Map<RegistryKey<?>, String> map = new HashMap<>();
try {
for (final Field field : RegistryKey.class.getFields()) {
if (!Modifier.isStatic(field.getModifiers()) || !Modifier.isFinal(field.getModifiers()) || field.getType() != RegistryKey.class) {
continue;
}
map.put((RegistryKey<?>) field.get(null), field.getName());
}
REGISTRY_KEY_FIELD_NAMES = Map.copyOf(map);
} catch (final ReflectiveOperationException ex) {
throw new RuntimeException(ex);
}
}
private static final String CREATE_JAVADOC = """
Creates a key for {@link $T} in the registry {@code $L}.
@param key the value's key in the registry
@return a new typed key
""";
private final Class<A> apiType;
private final ResourceKey<? extends Registry<T>> registryKey;
private final RegistryKey<A> apiRegistryKey;
private final boolean publicCreateKeyMethod;
public GeneratedKeyType(final String keysClassName, final Class<A> apiType, final String pkg, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
super(keysClassName, pkg);
this.apiType = apiType;
this.registryKey = registryKey;
this.apiRegistryKey = apiRegistryKey;
this.publicCreateKeyMethod = publicCreateKeyMethod;
}
private MethodSpec.Builder createMethod(final TypeName returnType) {
final TypeName keyType = TypeName.get(Key.class);
final ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
final MethodSpec.Builder create = MethodSpec.methodBuilder("create")
.addModifiers(this.publicCreateKeyMethod ? PUBLIC : PRIVATE, STATIC)
.addParameter(keyParam)
.addCode("return $T.create($T.$L, $N);", TypedKey.class, RegistryKey.class, requireNonNull(REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey), "Missing field for " + this.apiRegistryKey), keyParam)
.returns(returnType);
if (this.publicCreateKeyMethod) {
create.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO remove once not experimental
create.addJavadoc(CREATE_JAVADOC, this.apiType, this.registryKey.location().toString());
}
return create;
}
private TypeSpec.Builder keyHolderType() {
return classBuilder(this.className)
.addModifiers(PUBLIC, FINAL)
.addJavadoc(Javadocs.getVersionDependentClassHeader("{@link $T#$L}"), RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
.addAnnotations(Annotations.CLASS_HEADER)
.addMethod(MethodSpec.constructorBuilder()
.addModifiers(PRIVATE)
.build()
);
}
@Deprecated
private static final Map<String, String> JUKEBOX_SONG_NAMES = Map.of(
"5", "FIVE",
"11", "ELEVEN",
"13", "THIRTEEN"
);
@Override
protected TypeSpec getTypeSpec() {
final TypeName typedKey = ParameterizedTypeName.get(TypedKey.class, this.apiType);
final TypeSpec.Builder typeBuilder = this.keyHolderType();
final MethodSpec.Builder createMethod = this.createMethod(typedKey);
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
final Set<ResourceKey<T>> experimental = this.collectExperimentalKeys(registry);
boolean allExperimental = true;
for (final Holder.Reference<T> reference : registry.listElements().sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList()) {
final ResourceKey<T> key = reference.key();
final String keyPath = key.location().getPath();
String fieldName = Formatting.formatKeyAsField(keyPath);
if (!SourceVersion.isIdentifier(fieldName) && this.registryKey.equals(Registries.JUKEBOX_SONG) && JUKEBOX_SONG_NAMES.containsKey(fieldName)) {
fieldName = JUKEBOX_SONG_NAMES.get(fieldName);
}
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(typedKey, fieldName, PUBLIC, STATIC, FINAL)
.initializer("$N(key($S))", createMethod.build(), keyPath)
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), key.location().toString());
if (experimental.contains(key)) {
fieldBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
} else {
allExperimental = false;
}
typeBuilder.addField(fieldBuilder.build());
}
if (allExperimental) {
typeBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
createMethod.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
} else {
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
}
return typeBuilder.addMethod(createMethod.build()).build();
}
// todo at some point this should be per feature data pack not all merged
private Set<ResourceKey<T>> collectExperimentalKeys(final Registry<T> registry) {
if (FeatureElement.FILTERED_REGISTRIES.contains(registry.key())) {
return this.collectExperimentalKeysBuiltIn(registry);
} else {
return this.collectExperimentalKeysDataDriven(registry);
}
}
private Set<ResourceKey<T>> collectExperimentalKeysBuiltIn(final Registry<T> registry) {
final HolderLookup.RegistryLookup<T> filteredLookup = registry.filterElements(v -> {
return v instanceof final FeatureElement featureElement && FeatureFlags.isExperimental(featureElement.requiredFeatures()); // Update for Experimental API
});
return filteredLookup.listElementIds().collect(Collectors.toUnmodifiableSet());
}
@SuppressWarnings("unchecked")
private Set<ResourceKey<T>> collectExperimentalKeysDataDriven(final Registry<T> registry) {
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> experimentalBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) EXPERIMENTAL_REGISTRY_ENTRIES.get(this.registryKey);
if (experimentalBootstrap == null) {
return Collections.emptySet();
}
final Set<ResourceKey<T>> experimental = Collections.newSetFromMap(new IdentityHashMap<>());
final CollectingContext<T> experimentalCollector = new CollectingContext<>(experimental, registry);
experimentalBootstrap.run(experimentalCollector);
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> vanillaBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) VANILLA_REGISTRY_ENTRIES.get(this.registryKey);
if (vanillaBootstrap != null) {
final Set<ResourceKey<T>> vanilla = Collections.newSetFromMap(new IdentityHashMap<>());
final CollectingContext<T> vanillaCollector = new CollectingContext<>(vanilla, registry);
vanillaBootstrap.run(vanillaCollector);
return Sets.difference(experimental, vanilla);
}
return experimental;
}
@Override
protected JavaFile.Builder file(final JavaFile.Builder builder) {
return builder
.addStaticImport(Key.class, "key");
}
}

View File

@@ -1,138 +0,0 @@
package io.papermc.generator.types;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import io.papermc.generator.Main;
import io.papermc.generator.utils.Annotations;
import io.papermc.generator.utils.Formatting;
import io.papermc.generator.utils.Javadocs;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import net.kyori.adventure.key.Key;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey;
import org.bukkit.MinecraftExperimental;
import static com.squareup.javapoet.TypeSpec.classBuilder;
import static io.papermc.generator.utils.Annotations.EXPERIMENTAL_API_ANNOTATION;
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
import static java.util.Objects.requireNonNull;
import static javax.lang.model.element.Modifier.FINAL;
import static javax.lang.model.element.Modifier.PRIVATE;
import static javax.lang.model.element.Modifier.PUBLIC;
import static javax.lang.model.element.Modifier.STATIC;
public class GeneratedTagKeyType<T, A> extends SimpleGenerator {
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
static {
final Map<RegistryKey<?>, String> map = new HashMap<>();
try {
for (final Field field : RegistryKey.class.getFields()) {
if (!Modifier.isStatic(field.getModifiers()) || !Modifier.isFinal(field.getModifiers()) || field.getType() != RegistryKey.class) {
continue;
}
map.put((RegistryKey<?>) field.get(null), field.getName());
}
REGISTRY_KEY_FIELD_NAMES = Map.copyOf(map);
} catch (final ReflectiveOperationException ex) {
throw new RuntimeException(ex);
}
}
private static final String CREATE_JAVADOC = """
Creates a tag key for {@link $T} in the registry {@code $L}.
@param key the tag key's key
@return a new tag key
""";
private final Class<A> apiType;
private final ResourceKey<? extends Registry<T>> registryKey;
private final RegistryKey<A> apiRegistryKey;
private final boolean publicCreateKeyMethod;
public GeneratedTagKeyType(final String keysClassName, final Class<A> apiType, final String pkg, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
super(keysClassName, pkg);
this.apiType = apiType;
this.registryKey = registryKey;
this.apiRegistryKey = apiRegistryKey;
this.publicCreateKeyMethod = publicCreateKeyMethod;
}
private MethodSpec.Builder createMethod(final TypeName returnType) {
final TypeName keyType = TypeName.get(Key.class);
final ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
final MethodSpec.Builder create = MethodSpec.methodBuilder("create")
.addModifiers(this.publicCreateKeyMethod ? PUBLIC : PRIVATE, STATIC)
.addParameter(keyParam)
.addCode("return $T.create($T.$L, $N);", TagKey.class, RegistryKey.class, requireNonNull(REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey), "Missing field for " + this.apiRegistryKey), keyParam)
.returns(returnType);
if (this.publicCreateKeyMethod) {
create.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO remove once not experimental
create.addJavadoc(CREATE_JAVADOC, this.apiType, this.registryKey.location().toString());
}
return create;
}
private TypeSpec.Builder keyHolderType() {
return classBuilder(this.className)
.addModifiers(PUBLIC, FINAL)
.addJavadoc(Javadocs.getVersionDependentClassHeader("{@link $T#$L}"), RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
.addAnnotations(Annotations.CLASS_HEADER)
.addMethod(MethodSpec.constructorBuilder()
.addModifiers(PRIVATE)
.build()
);
}
@Override
protected TypeSpec getTypeSpec() {
final TypeName tagKey = ParameterizedTypeName.get(TagKey.class, this.apiType);
final TypeSpec.Builder typeBuilder = this.keyHolderType();
final MethodSpec.Builder createMethod = this.createMethod(tagKey);
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
final AtomicBoolean allExperimental = new AtomicBoolean(true);
registry.listTagIds().sorted(Formatting.alphabeticKeyOrder(nmsTagKey -> nmsTagKey.location().getPath())).forEach(nmsTagKey -> {
final String fieldName = Formatting.formatKeyAsField(nmsTagKey.location().getPath());
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(tagKey, fieldName, PUBLIC, STATIC, FINAL)
.initializer("$N(key($S))", createMethod.build(), nmsTagKey.location().getPath())
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), "#" + nmsTagKey.location());
final String featureFlagName = Main.EXPERIMENTAL_TAGS.get(nmsTagKey);
if (featureFlagName != null) {
fieldBuilder.addAnnotations(experimentalAnnotations(MinecraftExperimental.Requires.valueOf(featureFlagName.toUpperCase(Locale.ENGLISH)))); // Update for Experimental API
} else {
allExperimental.set(false);
}
typeBuilder.addField(fieldBuilder.build());
});
if (allExperimental.get()) {
typeBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
createMethod.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
} else {
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
}
return typeBuilder.addMethod(createMethod.build()).build();
}
@Override
protected JavaFile.Builder file(final JavaFile.Builder builder) {
return builder
.addStaticImport(Key.class, "key");
}
}

View File

@@ -1,336 +0,0 @@
package io.papermc.generator.types.goal;
import com.destroystokyo.paper.entity.RangedEntity;
import com.destroystokyo.paper.entity.ai.GoalKey;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import net.minecraft.world.entity.FlyingMob;
import net.minecraft.world.entity.PathfinderMob;
import net.minecraft.world.entity.TamableAnimal;
import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.ambient.AmbientCreature;
import net.minecraft.world.entity.animal.AbstractFish;
import net.minecraft.world.entity.animal.AbstractGolem;
import net.minecraft.world.entity.animal.AbstractSchoolingFish;
import net.minecraft.world.entity.animal.Animal;
import net.minecraft.world.entity.animal.Pufferfish;
import net.minecraft.world.entity.animal.ShoulderRidingEntity;
import net.minecraft.world.entity.animal.SnowGolem;
import net.minecraft.world.entity.animal.WaterAnimal;
import net.minecraft.world.entity.animal.horse.AbstractChestedHorse;
import net.minecraft.world.entity.boss.wither.WitherBoss;
import net.minecraft.world.entity.monster.AbstractIllager;
import net.minecraft.world.entity.monster.EnderMan;
import net.minecraft.world.entity.monster.PatrollingMonster;
import net.minecraft.world.entity.monster.RangedAttackMob;
import net.minecraft.world.entity.monster.SpellcasterIllager;
import net.minecraft.world.entity.monster.ZombifiedPiglin;
import net.minecraft.world.entity.monster.piglin.AbstractPiglin;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.AbstractHorse;
import org.bukkit.entity.AbstractSkeleton;
import org.bukkit.entity.AbstractVillager;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Ambient;
import org.bukkit.entity.Animals;
import org.bukkit.entity.Bat;
import org.bukkit.entity.Bee;
import org.bukkit.entity.Blaze;
import org.bukkit.entity.Cat;
import org.bukkit.entity.CaveSpider;
import org.bukkit.entity.ChestedHorse;
import org.bukkit.entity.Chicken;
import org.bukkit.entity.Cod;
import org.bukkit.entity.Cow;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.Dolphin;
import org.bukkit.entity.Donkey;
import org.bukkit.entity.Drowned;
import org.bukkit.entity.ElderGuardian;
import org.bukkit.entity.EnderDragon;
import org.bukkit.entity.Enderman;
import org.bukkit.entity.Endermite;
import org.bukkit.entity.Evoker;
import org.bukkit.entity.Fish;
import org.bukkit.entity.Flying;
import org.bukkit.entity.Fox;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Giant;
import org.bukkit.entity.Golem;
import org.bukkit.entity.Guardian;
import org.bukkit.entity.Hoglin;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Husk;
import org.bukkit.entity.Illager;
import org.bukkit.entity.Illusioner;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Llama;
import org.bukkit.entity.MagmaCube;
import org.bukkit.entity.Mob;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Mule;
import org.bukkit.entity.MushroomCow;
import org.bukkit.entity.Ocelot;
import org.bukkit.entity.Panda;
import org.bukkit.entity.Parrot;
import org.bukkit.entity.Phantom;
import org.bukkit.entity.Pig;
import org.bukkit.entity.PigZombie;
import org.bukkit.entity.Piglin;
import org.bukkit.entity.PiglinAbstract;
import org.bukkit.entity.PiglinBrute;
import org.bukkit.entity.Pillager;
import org.bukkit.entity.PolarBear;
import org.bukkit.entity.PufferFish;
import org.bukkit.entity.Rabbit;
import org.bukkit.entity.Raider;
import org.bukkit.entity.Ravager;
import org.bukkit.entity.Salmon;
import org.bukkit.entity.Sheep;
import org.bukkit.entity.Shulker;
import org.bukkit.entity.Silverfish;
import org.bukkit.entity.Skeleton;
import org.bukkit.entity.SkeletonHorse;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Snowman;
import org.bukkit.entity.Spellcaster;
import org.bukkit.entity.Spider;
import org.bukkit.entity.Squid;
import org.bukkit.entity.Stray;
import org.bukkit.entity.Strider;
import org.bukkit.entity.Tameable;
import org.bukkit.entity.TraderLlama;
import org.bukkit.entity.TropicalFish;
import org.bukkit.entity.Turtle;
import org.bukkit.entity.Vex;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Vindicator;
import org.bukkit.entity.WanderingTrader;
import org.bukkit.entity.WaterMob;
import org.bukkit.entity.Witch;
import org.bukkit.entity.Wither;
import org.bukkit.entity.WitherSkeleton;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.Zoglin;
import org.bukkit.entity.Zombie;
import org.bukkit.entity.ZombieHorse;
import org.bukkit.entity.ZombieVillager;
import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
public class MobGoalNames {
private static final Map<Class<? extends Goal>, Class<? extends Mob>> entityClassCache = new HashMap<>();
public static final Map<Class<? extends net.minecraft.world.entity.Mob>, Class<? extends Mob>> bukkitMap = new HashMap<>();
static {
//<editor-fold defaultstate="collapsed" desc="bukkitMap Entities">
bukkitMap.put(net.minecraft.world.entity.Mob.class, Mob.class);
bukkitMap.put(net.minecraft.world.entity.AgeableMob.class, Ageable.class);
bukkitMap.put(AmbientCreature.class, Ambient.class);
bukkitMap.put(Animal.class, Animals.class);
bukkitMap.put(net.minecraft.world.entity.ambient.Bat.class, Bat.class);
bukkitMap.put(net.minecraft.world.entity.animal.Bee.class, Bee.class);
bukkitMap.put(net.minecraft.world.entity.monster.Blaze.class, Blaze.class);
bukkitMap.put(net.minecraft.world.entity.animal.Cat.class, Cat.class);
bukkitMap.put(net.minecraft.world.entity.monster.CaveSpider.class, CaveSpider.class);
bukkitMap.put(net.minecraft.world.entity.animal.Chicken.class, Chicken.class);
bukkitMap.put(net.minecraft.world.entity.animal.Cod.class, Cod.class);
bukkitMap.put(net.minecraft.world.entity.animal.Cow.class, Cow.class);
bukkitMap.put(PathfinderMob.class, Creature.class);
bukkitMap.put(net.minecraft.world.entity.monster.Creeper.class, Creeper.class);
bukkitMap.put(net.minecraft.world.entity.animal.Dolphin.class, Dolphin.class);
bukkitMap.put(net.minecraft.world.entity.monster.Drowned.class, Drowned.class);
bukkitMap.put(net.minecraft.world.entity.boss.enderdragon.EnderDragon.class, EnderDragon.class);
bukkitMap.put(EnderMan.class, Enderman.class);
bukkitMap.put(net.minecraft.world.entity.monster.Endermite.class, Endermite.class);
bukkitMap.put(net.minecraft.world.entity.monster.Evoker.class, Evoker.class);
bukkitMap.put(AbstractFish.class, Fish.class);
bukkitMap.put(AbstractSchoolingFish.class, io.papermc.paper.entity.SchoolableFish.class);
bukkitMap.put(FlyingMob.class, Flying.class);
bukkitMap.put(net.minecraft.world.entity.animal.Fox.class, Fox.class);
bukkitMap.put(net.minecraft.world.entity.monster.Ghast.class, Ghast.class);
bukkitMap.put(net.minecraft.world.entity.monster.Giant.class, Giant.class);
bukkitMap.put(AbstractGolem.class, Golem.class);
bukkitMap.put(net.minecraft.world.entity.monster.Guardian.class, Guardian.class);
bukkitMap.put(net.minecraft.world.entity.monster.ElderGuardian.class, ElderGuardian.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.Horse.class, Horse.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.AbstractHorse.class, AbstractHorse.class);
bukkitMap.put(AbstractChestedHorse.class, ChestedHorse.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.Donkey.class, Donkey.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.Mule.class, Mule.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.SkeletonHorse.class, SkeletonHorse.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.ZombieHorse.class, ZombieHorse.class);
bukkitMap.put(net.minecraft.world.entity.animal.camel.Camel.class, org.bukkit.entity.Camel.class);
bukkitMap.put(AbstractIllager.class, Illager.class);
bukkitMap.put(net.minecraft.world.entity.monster.Illusioner.class, Illusioner.class);
bukkitMap.put(SpellcasterIllager.class, Spellcaster.class);
bukkitMap.put(net.minecraft.world.entity.animal.IronGolem.class, IronGolem.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.Llama.class, Llama.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.TraderLlama.class, TraderLlama.class);
bukkitMap.put(net.minecraft.world.entity.monster.MagmaCube.class, MagmaCube.class);
bukkitMap.put(net.minecraft.world.entity.monster.Monster.class, Monster.class);
bukkitMap.put(PatrollingMonster.class, Raider.class); // close enough
bukkitMap.put(net.minecraft.world.entity.animal.MushroomCow.class, MushroomCow.class);
bukkitMap.put(net.minecraft.world.entity.animal.Ocelot.class, Ocelot.class);
bukkitMap.put(net.minecraft.world.entity.animal.Panda.class, Panda.class);
bukkitMap.put(net.minecraft.world.entity.animal.Parrot.class, Parrot.class);
bukkitMap.put(ShoulderRidingEntity.class, Parrot.class); // close enough
bukkitMap.put(net.minecraft.world.entity.monster.Phantom.class, Phantom.class);
bukkitMap.put(net.minecraft.world.entity.animal.Pig.class, Pig.class);
bukkitMap.put(ZombifiedPiglin.class, PigZombie.class);
bukkitMap.put(net.minecraft.world.entity.monster.Pillager.class, Pillager.class);
bukkitMap.put(net.minecraft.world.entity.animal.PolarBear.class, PolarBear.class);
bukkitMap.put(Pufferfish.class, PufferFish.class);
bukkitMap.put(net.minecraft.world.entity.animal.Rabbit.class, Rabbit.class);
bukkitMap.put(net.minecraft.world.entity.raid.Raider.class, Raider.class);
bukkitMap.put(net.minecraft.world.entity.monster.Ravager.class, Ravager.class);
bukkitMap.put(net.minecraft.world.entity.animal.Salmon.class, Salmon.class);
bukkitMap.put(net.minecraft.world.entity.animal.Sheep.class, Sheep.class);
bukkitMap.put(net.minecraft.world.entity.monster.Shulker.class, Shulker.class);
bukkitMap.put(net.minecraft.world.entity.monster.Silverfish.class, Silverfish.class);
bukkitMap.put(net.minecraft.world.entity.monster.Skeleton.class, Skeleton.class);
bukkitMap.put(net.minecraft.world.entity.monster.AbstractSkeleton.class, AbstractSkeleton.class);
bukkitMap.put(net.minecraft.world.entity.monster.Stray.class, Stray.class);
bukkitMap.put(net.minecraft.world.entity.monster.WitherSkeleton.class, WitherSkeleton.class);
bukkitMap.put(net.minecraft.world.entity.monster.Slime.class, Slime.class);
bukkitMap.put(SnowGolem.class, Snowman.class);
bukkitMap.put(net.minecraft.world.entity.monster.Spider.class, Spider.class);
bukkitMap.put(net.minecraft.world.entity.animal.Squid.class, Squid.class);
bukkitMap.put(TamableAnimal.class, Tameable.class);
bukkitMap.put(net.minecraft.world.entity.animal.TropicalFish.class, TropicalFish.class);
bukkitMap.put(net.minecraft.world.entity.animal.Turtle.class, Turtle.class);
bukkitMap.put(net.minecraft.world.entity.monster.Vex.class, Vex.class);
bukkitMap.put(net.minecraft.world.entity.npc.Villager.class, Villager.class);
bukkitMap.put(net.minecraft.world.entity.npc.AbstractVillager.class, AbstractVillager.class);
bukkitMap.put(net.minecraft.world.entity.npc.WanderingTrader.class, WanderingTrader.class);
bukkitMap.put(net.minecraft.world.entity.monster.Vindicator.class, Vindicator.class);
bukkitMap.put(WaterAnimal.class, WaterMob.class);
bukkitMap.put(net.minecraft.world.entity.monster.Witch.class, Witch.class);
bukkitMap.put(WitherBoss.class, Wither.class);
bukkitMap.put(net.minecraft.world.entity.animal.Wolf.class, Wolf.class);
bukkitMap.put(net.minecraft.world.entity.monster.Zombie.class, Zombie.class);
bukkitMap.put(net.minecraft.world.entity.monster.Husk.class, Husk.class);
bukkitMap.put(net.minecraft.world.entity.monster.ZombieVillager.class, ZombieVillager.class);
bukkitMap.put(net.minecraft.world.entity.monster.hoglin.Hoglin.class, Hoglin.class);
bukkitMap.put(net.minecraft.world.entity.monster.piglin.Piglin.class, Piglin.class);
bukkitMap.put(AbstractPiglin.class, PiglinAbstract.class);
bukkitMap.put(net.minecraft.world.entity.monster.piglin.PiglinBrute.class, PiglinBrute.class);
bukkitMap.put(net.minecraft.world.entity.monster.Strider.class, Strider.class);
bukkitMap.put(net.minecraft.world.entity.monster.Zoglin.class, Zoglin.class);
bukkitMap.put(net.minecraft.world.entity.GlowSquid.class, org.bukkit.entity.GlowSquid.class);
bukkitMap.put(net.minecraft.world.entity.animal.axolotl.Axolotl.class, org.bukkit.entity.Axolotl.class);
bukkitMap.put(net.minecraft.world.entity.animal.goat.Goat.class, org.bukkit.entity.Goat.class);
bukkitMap.put(net.minecraft.world.entity.animal.frog.Frog.class, org.bukkit.entity.Frog.class);
bukkitMap.put(net.minecraft.world.entity.animal.frog.Tadpole.class, org.bukkit.entity.Tadpole.class);
bukkitMap.put(net.minecraft.world.entity.monster.warden.Warden.class, org.bukkit.entity.Warden.class);
bukkitMap.put(net.minecraft.world.entity.animal.allay.Allay.class, org.bukkit.entity.Allay.class);
bukkitMap.put(net.minecraft.world.entity.animal.sniffer.Sniffer.class, org.bukkit.entity.Sniffer.class);
bukkitMap.put(net.minecraft.world.entity.monster.breeze.Breeze.class, org.bukkit.entity.Breeze.class);
bukkitMap.put(net.minecraft.world.entity.animal.armadillo.Armadillo.class, org.bukkit.entity.Armadillo.class);
bukkitMap.put(net.minecraft.world.entity.monster.Bogged.class, org.bukkit.entity.Bogged.class);
bukkitMap.put(net.minecraft.world.entity.monster.creaking.Creaking.class, org.bukkit.entity.Creaking.class);
bukkitMap.put(net.minecraft.world.entity.animal.AgeableWaterCreature.class, org.bukkit.entity.Squid.class); // close enough
//</editor-fold>
}
private static final BiMap<String, String> deobfuscationMap = HashBiMap.create();
static final Set<String> ignored = new HashSet<>();
static {
deobfuscationMap.put("abstract_skeleton_1", "abstract_skeleton_melee");
ignored.add("goal_selector_1");
ignored.add("goal_selector_2");
ignored.add("selector_1");
ignored.add("selector_2");
ignored.add("wrapped");
}
public static String getUsableName(String name) {
final String original = name;
name = name.substring(name.lastIndexOf(".") + 1);
boolean flag = false;
// inner classes
if (name.contains("$")) {
String cut = name.substring(name.indexOf("$") + 1);
if (cut.length() <= 2) {
name = name.replace("Entity", "");
name = name.replace("$", "_");
flag = true;
} else {
// mapped, wooo
name = cut;
}
}
name = name.replace("PathfinderGoal", "");
name = name.replace("TargetGoal", "");
name = name.replace("Goal", "");
StringBuilder sb = new StringBuilder();
for (char c : name.toCharArray()) {
if (c >= 'A' && c <= 'Z') {
sb.append("_");
sb.append(Character.toLowerCase(c));
} else {
sb.append(c);
}
}
name = sb.toString();
name = name.replaceFirst("_", "");
if (flag && !deobfuscationMap.containsKey(name.toLowerCase(Locale.ROOT)) && !ignored.contains(name)) {
System.out.println("need to map " + original + " (" + name.toLowerCase(Locale.ROOT) + ")");
}
// did we rename this key?
return deobfuscationMap.getOrDefault(name, name);
}
public static boolean isIgnored(String name) {
return ignored.contains(name);
}
public static <T extends Mob> GoalKey<T> getKey(String clazzName, Class<? extends Goal> goalClass) {
String name = getUsableName(clazzName);
if (MobGoalNames.isIgnored(name)) {
//noinspection unchecked
return (GoalKey<T>) GoalKey.of(Mob.class, NamespacedKey.minecraft(name));
}
return GoalKey.of(getEntity(goalClass), NamespacedKey.minecraft(name));
}
public static <T extends Mob> Class<T> getEntity(Class<? extends Goal> goalClass) {
//noinspection unchecked
return (Class<T>) entityClassCache.computeIfAbsent(goalClass, key -> {
for (Constructor<?> ctor : key.getDeclaredConstructors()) {
for (int i = 0; i < ctor.getParameterCount(); i++) {
Class<?> param = ctor.getParameterTypes()[i];
if (net.minecraft.world.entity.Mob.class.isAssignableFrom(param)) {
//noinspection unchecked
return toBukkitClass((Class<? extends net.minecraft.world.entity.Mob>) param);
} else if (RangedAttackMob.class.isAssignableFrom(param)) {
return RangedEntity.class;
}
}
}
throw new RuntimeException("Can't figure out applicable entity for mob goal " + goalClass); // maybe just return EntityInsentient?
});
}
public static Class<? extends Mob> toBukkitClass(Class<? extends net.minecraft.world.entity.Mob> nmsClass) {
Class<? extends Mob> bukkitClass = bukkitMap.get(nmsClass);
if (bukkitClass == null) {
throw new RuntimeException("Can't figure out applicable bukkit entity for nms entity " + nmsClass); // maybe just return Mob?
}
return bukkitClass;
}
}

View File

@@ -1,65 +0,0 @@
package io.papermc.generator.utils;
import com.squareup.javapoet.AnnotationSpec;
import java.util.ArrayList;
import java.util.List;
import io.papermc.paper.generated.GeneratedFrom;
import net.minecraft.SharedConstants;
import org.bukkit.MinecraftExperimental;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
import org.jspecify.annotations.NullMarked;
public final class Annotations {
public static List<AnnotationSpec> experimentalAnnotations(final MinecraftExperimental.@Nullable Requires requiredFeatureFlag) {
final List<AnnotationSpec> annotationSpecs = new ArrayList<>();
annotationSpecs.add(AnnotationSpec.builder(ApiStatus.Experimental.class).build());
if (requiredFeatureFlag != null) {
annotationSpecs.add(AnnotationSpec.builder(MinecraftExperimental.class)
.addMember("value", "$T.$L", MinecraftExperimental.Requires.class, requiredFeatureFlag.name())
.build());
} else {
annotationSpecs.add(AnnotationSpec.builder(MinecraftExperimental.class).build());
}
return annotationSpecs;
}
public static AnnotationSpec deprecatedVersioned(final @Nullable String version, final boolean forRemoval) {
final AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(Deprecated.class);
if (forRemoval) {
annotationSpec.addMember("forRemoval", "$L", true);
}
if (version != null) {
annotationSpec.addMember("since", "$S", version);
}
return annotationSpec.build();
}
public static AnnotationSpec scheduledRemoval(final @Nullable String version) {
return AnnotationSpec.builder(ApiStatus.ScheduledForRemoval.class)
.addMember("inVersion", "$S", version)
.build();
}
@ApiStatus.Experimental
public static final AnnotationSpec EXPERIMENTAL_API_ANNOTATION = AnnotationSpec.builder(ApiStatus.Experimental.class).build();
public static final AnnotationSpec NULL_MARKED = AnnotationSpec.builder(NullMarked.class).build();
private static final AnnotationSpec SUPPRESS_WARNINGS = AnnotationSpec.builder(SuppressWarnings.class)
.addMember("value", "$S", "unused")
.addMember("value", "$S", "SpellCheckingInspection")
.build();
private static final AnnotationSpec GENERATED_FROM = AnnotationSpec.builder(GeneratedFrom.class)
.addMember("value", "$S", SharedConstants.getCurrentVersion().getName())
.build();
public static final Iterable<AnnotationSpec> CLASS_HEADER = List.of(
SUPPRESS_WARNINGS,
GENERATED_FROM,
NULL_MARKED
);
private Annotations() {
}
}

View File

@@ -1,59 +0,0 @@
package io.papermc.generator.utils;
import java.util.Optional;
import org.apache.commons.lang3.math.NumberUtils;
import java.util.Comparator;
import java.util.Locale;
import java.util.OptionalInt;
import java.util.function.Function;
import java.util.regex.Pattern;
public final class Formatting {
private static final Pattern ILLEGAL_FIELD_CHARACTERS = Pattern.compile("[.-/]");
public static String formatKeyAsField(String path) {
return ILLEGAL_FIELD_CHARACTERS.matcher(path.toUpperCase(Locale.ROOT)).replaceAll("_");
}
public static Optional<String> formatTagKey(String tagDir, String resourcePath) {
int tagsIndex = resourcePath.indexOf(tagDir);
int dotIndex = resourcePath.lastIndexOf('.');
if (tagsIndex == -1 || dotIndex == -1) {
return Optional.empty();
}
return Optional.of(resourcePath.substring(tagsIndex + tagDir.length() + 1, dotIndex)); // namespace/tags/registry_key/[tag_key].json
}
public static Comparator<String> ALPHABETIC_KEY_ORDER = alphabeticKeyOrder(path -> path);
public static <T> Comparator<T> alphabeticKeyOrder(Function<T, String> mapper) {
return (o1, o2) -> {
String path1 = mapper.apply(o1);
String path2 = mapper.apply(o2);
OptionalInt trailingInt1 = tryParseTrailingInt(path1);
OptionalInt trailingInt2 = tryParseTrailingInt(path2);
if (trailingInt1.isPresent() && trailingInt2.isPresent()) {
return Integer.compare(trailingInt1.getAsInt(), trailingInt2.getAsInt());
}
return path1.compareTo(path2);
};
}
private static OptionalInt tryParseTrailingInt(String path) {
int delimiterIndex = path.lastIndexOf('_');
if (delimiterIndex != -1) {
String score = path.substring(delimiterIndex + 1);
if (NumberUtils.isDigits(score)) {
return OptionalInt.of(Integer.parseInt(score));
}
}
return OptionalInt.empty();
}
private Formatting() {
}
}

View File

@@ -1,27 +0,0 @@
package io.papermc.generator.utils;
public final class Javadocs {
public static String getVersionDependentClassHeader(String headerIdentifier) {
return """
Vanilla keys for %s.
@apiNote The fields provided here are a direct representation of
what is available from the vanilla game source. They may be
changed (including removals) on any Minecraft version
bump, so cross-version compatibility is not provided on the
same level as it is on most of the other API.
""".formatted(headerIdentifier);
}
public static String getVersionDependentField(String headerIdentifier) {
return """
%s
@apiNote This field is version-dependant and may be removed in future Minecraft versions
""".formatted(headerIdentifier);
}
private Javadocs() {
}
}

View File

@@ -1,79 +0,0 @@
package io.papermc.generator.utils;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.mojang.logging.LogUtils;
import io.papermc.generator.Main;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;
import java.util.function.BiConsumer;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistryAccess;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.server.packs.PackResources;
import net.minecraft.server.packs.PackType;
import net.minecraft.server.packs.repository.BuiltInPackSource;
import net.minecraft.server.packs.resources.MultiPackResourceManager;
import net.minecraft.tags.TagKey;
import org.slf4j.Logger;
// collect all the tags by grabbing the json from the data-packs
// another (probably) way is to hook into the data generator like the typed keys generator
public final class TagCollector {
private static final Logger LOGGER = LogUtils.getLogger();
public static Map<TagKey<?>, String> grabExperimental(final MultiPackResourceManager resourceManager) {
Map<TagKey<?>, String> result = new IdentityHashMap<>();
// collect all vanilla tags
Multimap<ResourceKey<? extends Registry<?>>, String> vanillaTags = HashMultimap.create();
PackResources vanillaPack = resourceManager.listPacks()
.filter(packResources -> packResources.packId().equals(BuiltInPackSource.VANILLA_ID))
.findFirst()
.orElseThrow();
collectFromPack(vanillaPack, (entry, path) -> vanillaTags.put(entry.key(), path));
// then distinct with other data-pack tags to know for sure newly created tags and so experimental one
resourceManager.listPacks().forEach(pack -> {
String packId = pack.packId();
if (packId.equals(BuiltInPackSource.VANILLA_ID)) return;
collectFromPack(pack, (entry, path) -> {
if (vanillaTags.get(entry.key()).contains(path)) {
return;
}
result.put(entry.value().listTagIds()
.filter(tagKey -> tagKey.location().getPath().equals(path))
.findFirst()
.orElseThrow(), packId);
});
});
return Collections.unmodifiableMap(result);
}
private static void collectFromPack(PackResources pack, BiConsumer<RegistryAccess.RegistryEntry<?>, String> output) {
Set<String> namespaces = pack.getNamespaces(PackType.SERVER_DATA);
for (String namespace : namespaces) {
Main.REGISTRY_ACCESS.registries().forEach(entry -> {
// this is probably expensive but can't find another way around and data-pack loader has similar logic
// the issue is that registry key can have parent/key (and custom folder too) but tag key can also have parent/key so parsing become a mess
// without having at least one of the two values
String tagDir = Registries.tagsDirPath(entry.key());
pack.listResources(PackType.SERVER_DATA, namespace, tagDir, (id, supplier) -> {
Formatting.formatTagKey(tagDir, id.getPath()).ifPresentOrElse(path -> output.accept(entry, path), () -> {
LOGGER.warn("Unable to parse the path: {}/{}/{}.json in the data-pack {} into a tag key", namespace, tagDir, id.getPath(), pack.packId());
});
});
});
}
}
private TagCollector() {
}
}

View File

@@ -9,11 +9,12 @@ java {
withJavadocJar() withJavadocJar()
} }
val annotationsVersion = "24.1.0" val annotationsVersion = "26.0.2"
val bungeeCordChatVersion = "1.20-R0.2" // Keep in sync with paper-server adventure-text-serializer-ansi dep
val adventureVersion = "4.18.0" val adventureVersion = "4.23.0"
val slf4jVersion = "2.0.9" val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21"
val log4jVersion = "2.17.1" val slf4jVersion = "2.0.16"
val log4jVersion = "2.24.1"
val apiAndDocs: Configuration by configurations.creating { val apiAndDocs: Configuration by configurations.creating {
attributes { attributes {
@@ -39,7 +40,6 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
} }
dependencies { dependencies {
// api dependencies are listed transitively to API consumers // api dependencies are listed transitively to API consumers
api("com.google.guava:guava:33.3.1-jre") api("com.google.guava:guava:33.3.1-jre")
api("com.google.code.gson:gson:2.11.0") api("com.google.code.gson:gson:2.11.0")
@@ -47,16 +47,13 @@ dependencies {
api("org.joml:joml:1.10.8") { api("org.joml:joml:1.10.8") {
isTransitive = false // https://github.com/JOML-CI/JOML/issues/352 isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
} }
api("com.googlecode.json-simple:json-simple:1.1.1") {
isTransitive = false // includes junit
}
api("it.unimi.dsi:fastutil:8.5.15") api("it.unimi.dsi:fastutil:8.5.15")
api("org.apache.logging.log4j:log4j-api:$log4jVersion") api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion") api("org.slf4j:slf4j-api:$slf4jVersion")
api("com.mojang:brigadier:1.3.10") api("com.mojang:brigadier:1.3.10")
// Deprecate bungeecord-chat in favor of adventure // Deprecate bungeecord-chat in favor of adventure
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.19") { api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") {
exclude("com.google.guava", "guava") exclude("com.google.guava", "guava")
} }
@@ -68,9 +65,6 @@ dependencies {
apiAndDocs("net.kyori:adventure-text-serializer-plain") apiAndDocs("net.kyori:adventure-text-serializer-plain")
apiAndDocs("net.kyori:adventure-text-logger-slf4j") apiAndDocs("net.kyori:adventure-text-logger-slf4j")
implementation("org.ow2.asm:asm:9.7.1")
implementation("org.ow2.asm:asm-commons:9.7.1")
api("org.apache.maven:maven-resolver-provider:3.9.6") // make API dependency for Paper Plugins api("org.apache.maven:maven-resolver-provider:3.9.6") // make API dependency for Paper Plugins
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
@@ -80,32 +74,32 @@ dependencies {
compileOnly(annotations) compileOnly(annotations)
testCompileOnly(annotations) testCompileOnly(annotations)
val checkerQual = "org.checkerframework:checker-qual:3.33.0" val checkerQual = "org.checkerframework:checker-qual:3.49.2"
compileOnlyApi(checkerQual) compileOnlyApi(checkerQual)
testCompileOnly(checkerQual) testCompileOnly(checkerQual)
api("org.jspecify:jspecify:1.0.0") api("org.jspecify:jspecify:1.0.0")
// Test dependencies // Test dependencies
testImplementation("org.apache.commons:commons-lang3:3.12.0") testImplementation("org.apache.commons:commons-lang3:3.17.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.junit.jupiter:junit-jupiter:5.12.2")
testImplementation("org.hamcrest:hamcrest:2.2") testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:5.14.1") testImplementation("org.mockito:mockito-core:5.14.1")
testImplementation("org.ow2.asm:asm-tree:9.7.1") testImplementation("org.ow2.asm:asm-tree:9.8")
mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // configure mockito agent that is needed in newer java versions mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // configure mockito agent that is needed in newer java versions
testRuntimeOnly("org.junit.platform:junit-platform-launcher") testRuntimeOnly("org.junit.platform:junit-platform-launcher")
} }
val generatedApiPath: java.nio.file.Path = rootProject.projectDir.toPath().resolve("paper-api-generator/generated") val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
idea { idea {
module { module {
generatedSourceDirs.add(generatedApiPath.toFile()) generatedSourceDirs.add(generatedDir.toFile())
} }
} }
sourceSets { sourceSets {
main { main {
java { java {
srcDir(generatedApiPath) srcDir(generatedDir)
} }
} }
} }
@@ -179,7 +173,7 @@ tasks.withType<Javadoc> {
"https://guava.dev/releases/33.3.1-jre/api/docs/", "https://guava.dev/releases/33.3.1-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/", "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/",
"https://javadoc.io/doc/org.joml/joml/1.10.8/index.html", "https://javadoc.io/doc/org.joml/joml/1.10.8/",
"https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0", "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
"https://jspecify.dev/docs/api/", "https://jspecify.dev/docs/api/",
"https://jd.advntr.dev/api/$adventureVersion/", "https://jd.advntr.dev/api/$adventureVersion/",
@@ -190,7 +184,7 @@ tasks.withType<Javadoc> {
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/", "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
"https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/", "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
"https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/", "https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
"https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
) )
options.tags("apiNote:a:API Note:") options.tags("apiNote:a:API Note:")
@@ -231,21 +225,23 @@ tasks.compileTestJava {
options.compilerArgs.add("-parameters") options.compilerArgs.add("-parameters")
} }
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) { val scanJarForBadCalls by tasks.registering(io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;") badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile }) jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath) classpath.from(configurations.compileClasspath)
} }
tasks.check { tasks.check {
dependsOn(scanJar) dependsOn(scanJarForBadCalls)
} }
val scanJarForOldGeneratedCode = tasks.register("scanJarForOldGeneratedCode", io.papermc.paperweight.tasks.ScanJarForOldGeneratedCode::class) { if (providers.gradleProperty("updatingMinecraft").getOrElse("false").toBoolean()) {
val scanJarForOldGeneratedCode by tasks.registering(io.papermc.paperweight.tasks.ScanJarForOldGeneratedCode::class) {
mcVersion.set(providers.gradleProperty("mcVersion")) mcVersion.set(providers.gradleProperty("mcVersion"))
annotation.set("Lio/papermc/paper/generated/GeneratedFrom;") annotation.set("Lio/papermc/paper/generated/GeneratedFrom;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile }) jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath) classpath.from(configurations.compileClasspath)
} }
tasks.check { tasks.check {
dependsOn(scanJarForOldGeneratedCode) dependsOn(scanJarForOldGeneratedCode)
}
} }

View File

@@ -21,6 +21,7 @@ import org.bukkit.entity.Fish;
import org.bukkit.entity.Fox; import org.bukkit.entity.Fox;
import org.bukkit.entity.Ghast; import org.bukkit.entity.Ghast;
import org.bukkit.entity.Guardian; import org.bukkit.entity.Guardian;
import org.bukkit.entity.HappyGhast;
import org.bukkit.entity.Illager; import org.bukkit.entity.Illager;
import org.bukkit.entity.Illusioner; import org.bukkit.entity.Illusioner;
import org.bukkit.entity.IronGolem; import org.bukkit.entity.IronGolem;
@@ -66,18 +67,18 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
public interface VanillaGoal<T extends Mob> extends Goal<T> { public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class); GoalKey<AbstractHorse> HORSE_RANDOM_STAND = create("horse_random_stand", AbstractHorse.class);
GoalKey<AbstractHorse> RUN_AROUND_LIKE_CRAZY = create("run_around_like_crazy", AbstractHorse.class); GoalKey<AbstractHorse> HORSE_RUN_AROUND_LIKE_CRAZY = create("horse_run_around_like_crazy", AbstractHorse.class);
GoalKey<AbstractSkeleton> ABSTRACT_SKELETON_MELEE = create("abstract_skeleton_melee", AbstractSkeleton.class); GoalKey<AbstractSkeleton> SKELETON_MELEE = create("skeleton_melee", AbstractSkeleton.class);
GoalKey<AbstractVillager> LOOK_AT_TRADING_PLAYER = create("look_at_trading_player", AbstractVillager.class); GoalKey<AbstractVillager> VILLAGER_LOOK_AT_TRADING_PLAYER = create("villager_look_at_trading_player", AbstractVillager.class);
GoalKey<AbstractVillager> TRADE_WITH_PLAYER = create("trade_with_player", AbstractVillager.class); GoalKey<AbstractVillager> VILLAGER_TRADE_WITH_PLAYER = create("villager_trade_with_player", AbstractVillager.class);
GoalKey<Animals> BREED = create("breed", Animals.class); GoalKey<Animals> BREED = create("breed", Animals.class);
@@ -101,12 +102,12 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Bee> BEE_POLLINATE = create("bee_pollinate", Bee.class); GoalKey<Bee> BEE_POLLINATE = create("bee_pollinate", Bee.class);
GoalKey<Bee> BEE_VALIDATE_FLOWER = create("bee_validate_flower", Bee.class);
GoalKey<Bee> BEE_VALIDATE_HIVE = create("bee_validate_hive", Bee.class);
GoalKey<Bee> BEE_WANDER = create("bee_wander", Bee.class); GoalKey<Bee> BEE_WANDER = create("bee_wander", Bee.class);
GoalKey<Bee> VALIDATE_FLOWER = create("validate_flower", Bee.class);
GoalKey<Bee> VALIDATE_HIVE = create("validate_hive", Bee.class);
GoalKey<Blaze> BLAZE_ATTACK = create("blaze_attack", Blaze.class); GoalKey<Blaze> BLAZE_ATTACK = create("blaze_attack", Blaze.class);
GoalKey<Cat> CAT_AVOID_ENTITY = create("cat_avoid_entity", Cat.class); GoalKey<Cat> CAT_AVOID_ENTITY = create("cat_avoid_entity", Cat.class);
@@ -165,16 +166,16 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Creature> WATER_AVOIDING_RANDOM_STROLL = create("water_avoiding_random_stroll", Creature.class); GoalKey<Creature> WATER_AVOIDING_RANDOM_STROLL = create("water_avoiding_random_stroll", Creature.class);
GoalKey<Creeper> SWELL = create("swell", Creeper.class); GoalKey<Creeper> CREEPER_SWELL = create("creeper_swell", Creeper.class);
GoalKey<Dolphin> DOLPHIN_JUMP = create("dolphin_jump", Dolphin.class); GoalKey<Dolphin> DOLPHIN_JUMP = create("dolphin_jump", Dolphin.class);
GoalKey<Dolphin> DOLPHIN_PLAY_WITH_ITEMS = create("dolphin_play_with_items", Dolphin.class);
GoalKey<Dolphin> DOLPHIN_SWIM_TO_TREASURE = create("dolphin_swim_to_treasure", Dolphin.class); GoalKey<Dolphin> DOLPHIN_SWIM_TO_TREASURE = create("dolphin_swim_to_treasure", Dolphin.class);
GoalKey<Dolphin> DOLPHIN_SWIM_WITH_PLAYER = create("dolphin_swim_with_player", Dolphin.class); GoalKey<Dolphin> DOLPHIN_SWIM_WITH_PLAYER = create("dolphin_swim_with_player", Dolphin.class);
GoalKey<Dolphin> PLAY_WITH_ITEMS = create("play_with_items", Dolphin.class);
GoalKey<Drowned> DROWNED_ATTACK = create("drowned_attack", Drowned.class); GoalKey<Drowned> DROWNED_ATTACK = create("drowned_attack", Drowned.class);
GoalKey<Drowned> DROWNED_GO_TO_BEACH = create("drowned_go_to_beach", Drowned.class); GoalKey<Drowned> DROWNED_GO_TO_BEACH = create("drowned_go_to_beach", Drowned.class);
@@ -199,14 +200,14 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Fish> FISH_SWIM = create("fish_swim", Fish.class); GoalKey<Fish> FISH_SWIM = create("fish_swim", Fish.class);
GoalKey<Fox> DEFEND_TRUSTED = create("defend_trusted", Fox.class);
GoalKey<Fox> FACEPLANT = create("faceplant", Fox.class);
GoalKey<Fox> FOX_BREED = create("fox_breed", Fox.class); GoalKey<Fox> FOX_BREED = create("fox_breed", Fox.class);
GoalKey<Fox> FOX_DEFEND_TRUSTED = create("fox_defend_trusted", Fox.class);
GoalKey<Fox> FOX_EAT_BERRIES = create("fox_eat_berries", Fox.class); GoalKey<Fox> FOX_EAT_BERRIES = create("fox_eat_berries", Fox.class);
GoalKey<Fox> FOX_FACEPLANT = create("fox_faceplant", Fox.class);
GoalKey<Fox> FOX_FLOAT = create("fox_float", Fox.class); GoalKey<Fox> FOX_FLOAT = create("fox_float", Fox.class);
GoalKey<Fox> FOX_FOLLOW_PARENT = create("fox_follow_parent", Fox.class); GoalKey<Fox> FOX_FOLLOW_PARENT = create("fox_follow_parent", Fox.class);
@@ -217,29 +218,27 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Fox> FOX_PANIC = create("fox_panic", Fox.class); GoalKey<Fox> FOX_PANIC = create("fox_panic", Fox.class);
GoalKey<Fox> FOX_PERCH_AND_SEARCH = create("fox_perch_and_search", Fox.class);
GoalKey<Fox> FOX_POUNCE = create("fox_pounce", Fox.class); GoalKey<Fox> FOX_POUNCE = create("fox_pounce", Fox.class);
GoalKey<Fox> FOX_SEARCH_FOR_ITEMS = create("fox_search_for_items", Fox.class); GoalKey<Fox> FOX_SEARCH_FOR_ITEMS = create("fox_search_for_items", Fox.class);
GoalKey<Fox> FOX_SEEK_SHELTER = create("fox_seek_shelter", Fox.class);
GoalKey<Fox> FOX_SLEEP = create("fox_sleep", Fox.class);
GoalKey<Fox> FOX_STALK_PREY = create("fox_stalk_prey", Fox.class);
GoalKey<Fox> FOX_STROLL_THROUGH_VILLAGE = create("fox_stroll_through_village", Fox.class); GoalKey<Fox> FOX_STROLL_THROUGH_VILLAGE = create("fox_stroll_through_village", Fox.class);
GoalKey<Fox> PERCH_AND_SEARCH = create("perch_and_search", Fox.class);
GoalKey<Fox> SEEK_SHELTER = create("seek_shelter", Fox.class);
GoalKey<Fox> SLEEP = create("sleep", Fox.class);
GoalKey<Fox> STALK_PREY = create("stalk_prey", Fox.class);
GoalKey<Ghast> GHAST_LOOK = create("ghast_look", Ghast.class);
GoalKey<Ghast> GHAST_SHOOT_FIREBALL = create("ghast_shoot_fireball", Ghast.class); GoalKey<Ghast> GHAST_SHOOT_FIREBALL = create("ghast_shoot_fireball", Ghast.class);
GoalKey<Ghast> RANDOM_FLOAT_AROUND = create("random_float_around", Ghast.class);
GoalKey<Guardian> GUARDIAN_ATTACK = create("guardian_attack", Guardian.class); GoalKey<Guardian> GUARDIAN_ATTACK = create("guardian_attack", Guardian.class);
GoalKey<Illager> HOLD_GROUND_ATTACK = create("hold_ground_attack", Illager.class); GoalKey<HappyGhast> HAPPY_GHAST_FLOAT = create("happy_ghast_float", HappyGhast.class);
GoalKey<Illager> ILLAGER_HOLD_GROUND_ATTACK = create("illager_hold_ground_attack", Illager.class);
GoalKey<Illager> RAIDER_OPEN_DOOR = create("raider_open_door", Illager.class); GoalKey<Illager> RAIDER_OPEN_DOOR = create("raider_open_door", Illager.class);
@@ -247,9 +246,9 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Illusioner> ILLUSIONER_MIRROR_SPELL = create("illusioner_mirror_spell", Illusioner.class); GoalKey<Illusioner> ILLUSIONER_MIRROR_SPELL = create("illusioner_mirror_spell", Illusioner.class);
GoalKey<IronGolem> DEFEND_VILLAGE = create("defend_village", IronGolem.class); GoalKey<IronGolem> IRON_GOLEM_DEFEND_VILLAGE = create("iron_golem_defend_village", IronGolem.class);
GoalKey<IronGolem> OFFER_FLOWER = create("offer_flower", IronGolem.class); GoalKey<IronGolem> IRON_GOLEM_OFFER_FLOWER = create("iron_golem_offer_flower", IronGolem.class);
GoalKey<Llama> LLAMA_ATTACK_WOLF = create("llama_attack_wolf", Llama.class); GoalKey<Llama> LLAMA_ATTACK_WOLF = create("llama_attack_wolf", Llama.class);
@@ -269,6 +268,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Mob> FOLLOW_MOB = create("follow_mob", Mob.class); GoalKey<Mob> FOLLOW_MOB = create("follow_mob", Mob.class);
GoalKey<Mob> GHAST_LOOK = create("ghast_look", Mob.class);
GoalKey<Mob> INTERACT = create("interact", Mob.class); GoalKey<Mob> INTERACT = create("interact", Mob.class);
GoalKey<Mob> LEAP_AT = create("leap_at", Mob.class); GoalKey<Mob> LEAP_AT = create("leap_at", Mob.class);
@@ -281,10 +282,14 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Mob> OPEN_DOOR = create("open_door", Mob.class); GoalKey<Mob> OPEN_DOOR = create("open_door", Mob.class);
GoalKey<Mob> RANDOM_FLOAT_AROUND = create("random_float_around", Mob.class);
GoalKey<Mob> RANDOM_LOOK_AROUND = create("random_look_around", Mob.class); GoalKey<Mob> RANDOM_LOOK_AROUND = create("random_look_around", Mob.class);
GoalKey<Mob> RESET_UNIVERSAL_ANGER = create("reset_universal_anger", Mob.class); GoalKey<Mob> RESET_UNIVERSAL_ANGER = create("reset_universal_anger", Mob.class);
GoalKey<Mob> TEMPT_FOR_NON_PATHFINDERS = create("tempt_for_non_pathfinders", Mob.class);
GoalKey<Mob> USE_ITEM = create("use_item", Mob.class); GoalKey<Mob> USE_ITEM = create("use_item", Mob.class);
GoalKey<Mob> VINDICATOR_BREAK_DOOR = create("vindicator_break_door", Mob.class); GoalKey<Mob> VINDICATOR_BREAK_DOOR = create("vindicator_break_door", Mob.class);
@@ -317,7 +322,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Panda> PANDA_SNEEZE = create("panda_sneeze", Panda.class); GoalKey<Panda> PANDA_SNEEZE = create("panda_sneeze", Panda.class);
GoalKey<Parrot> LAND_ON_OWNERS_SHOULDER = create("land_on_owners_shoulder", Parrot.class); GoalKey<Parrot> PARROT_LAND_ON_OWNERS_SHOULDER = create("parrot_land_on_owners_shoulder", Parrot.class);
GoalKey<Phantom> PHANTOM_ATTACK_PLAYER = create("phantom_attack_player", Phantom.class); GoalKey<Phantom> PHANTOM_ATTACK_PLAYER = create("phantom_attack_player", Phantom.class);
@@ -339,27 +344,27 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Rabbit> RABBIT_PANIC = create("rabbit_panic", Rabbit.class); GoalKey<Rabbit> RABBIT_PANIC = create("rabbit_panic", Rabbit.class);
GoalKey<Rabbit> RAID_GARDEN = create("raid_garden", Rabbit.class); GoalKey<Rabbit> RABBIT_RAID_GARDEN = create("rabbit_raid_garden", Rabbit.class);
GoalKey<Raider> LONG_DISTANCE_PATROL = create("long_distance_patrol", Raider.class);
GoalKey<Raider> NEAREST_ATTACKABLE_WITCH = create("nearest_attackable_witch", Raider.class);
GoalKey<Raider> NEAREST_HEALABLE_RAIDER = create("nearest_healable_raider", Raider.class);
GoalKey<Raider> OBTAIN_RAID_LEADER_BANNER = create("obtain_raid_leader_banner", Raider.class);
GoalKey<Raider> PATHFIND_TO_RAID = create("pathfind_to_raid", Raider.class);
GoalKey<Raider> RAIDER_CELEBRATION = create("raider_celebration", Raider.class); GoalKey<Raider> RAIDER_CELEBRATION = create("raider_celebration", Raider.class);
GoalKey<Raider> RAIDER_LONG_DISTANCE_PATROL = create("raider_long_distance_patrol", Raider.class);
GoalKey<Raider> RAIDER_MOVE_THROUGH_VILLAGE = create("raider_move_through_village", Raider.class); GoalKey<Raider> RAIDER_MOVE_THROUGH_VILLAGE = create("raider_move_through_village", Raider.class);
GoalKey<Raider> RAIDER_NEAREST_ATTACKABLE_WITCH = create("raider_nearest_attackable_witch", Raider.class);
GoalKey<Raider> RAIDER_NEAREST_HEALABLE_RAIDER = create("raider_nearest_healable_raider", Raider.class);
GoalKey<Raider> RAIDER_OBTAIN_RAID_LEADER_BANNER = create("raider_obtain_raid_leader_banner", Raider.class);
GoalKey<Raider> RAIDER_PATHFIND_TO_RAID = create("raider_pathfind_to_raid", Raider.class);
GoalKey<RangedEntity> DROWNED_TRIDENT_ATTACK = create("drowned_trident_attack", RangedEntity.class); GoalKey<RangedEntity> DROWNED_TRIDENT_ATTACK = create("drowned_trident_attack", RangedEntity.class);
GoalKey<RangedEntity> RANGED_ATTACK = create("ranged_attack", RangedEntity.class); GoalKey<RangedEntity> RANGED_ATTACK = create("ranged_attack", RangedEntity.class);
GoalKey<SchoolableFish> FOLLOW_FLOCK_LEADER = create("follow_flock_leader", SchoolableFish.class); GoalKey<SchoolableFish> SCHOOLABLE_FISH_FOLLOW_FLOCK_LEADER = create("schoolable_fish_follow_flock_leader", SchoolableFish.class);
GoalKey<Shulker> SHULKER_ATTACK = create("shulker_attack", Shulker.class); GoalKey<Shulker> SHULKER_ATTACK = create("shulker_attack", Shulker.class);
@@ -373,7 +378,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Silverfish> SILVERFISH_WAKE_UP_FRIENDS = create("silverfish_wake_up_friends", Silverfish.class); GoalKey<Silverfish> SILVERFISH_WAKE_UP_FRIENDS = create("silverfish_wake_up_friends", Silverfish.class);
GoalKey<SkeletonHorse> SKELETON_TRAP = create("skeleton_trap", SkeletonHorse.class); GoalKey<SkeletonHorse> SKELETON_HORSE_SKELETON_TRAP = create("skeleton_horse_skeleton_trap", SkeletonHorse.class);
GoalKey<Slime> SLIME_ATTACK = create("slime_attack", Slime.class); GoalKey<Slime> SLIME_ATTACK = create("slime_attack", Slime.class);
@@ -429,14 +434,14 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Vindicator> VINDICATOR_JOHNNY_ATTACK = create("vindicator_johnny_attack", Vindicator.class); GoalKey<Vindicator> VINDICATOR_JOHNNY_ATTACK = create("vindicator_johnny_attack", Vindicator.class);
GoalKey<WanderingTrader> WANDER_TO_POSITION = create("wander_to_position", WanderingTrader.class); GoalKey<WanderingTrader> WANDERING_TRADER_WANDER_TO_POSITION = create("wandering_trader_wander_to_position", WanderingTrader.class);
GoalKey<Wither> WITHER_DO_NOTHING = create("wither_do_nothing", Wither.class); GoalKey<Wither> WITHER_DO_NOTHING = create("wither_do_nothing", Wither.class);
GoalKey<Wolf> BEG = create("beg", Wolf.class);
GoalKey<Wolf> WOLF_AVOID_ENTITY = create("wolf_avoid_entity", Wolf.class); GoalKey<Wolf> WOLF_AVOID_ENTITY = create("wolf_avoid_entity", Wolf.class);
GoalKey<Wolf> WOLF_BEG = create("wolf_beg", Wolf.class);
GoalKey<Zombie> ZOMBIE_ATTACK = create("zombie_attack", Zombie.class); GoalKey<Zombie> ZOMBIE_ATTACK = create("zombie_attack", Zombie.class);
GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class); GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.attribute.Attribute; import org.bukkit.attribute.Attribute;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class AttributeKeys { public final class AttributeKeys {
/** /**
* {@code minecraft:armor} * {@code minecraft:armor}
@@ -83,6 +81,13 @@ public final class AttributeKeys {
*/ */
public static final TypedKey<Attribute> BURNING_TIME = create(key("burning_time")); public static final TypedKey<Attribute> BURNING_TIME = create(key("burning_time"));
/**
* {@code minecraft:camera_distance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> CAMERA_DISTANCE = create(key("camera_distance"));
/** /**
* {@code minecraft:entity_interaction_range} * {@code minecraft:entity_interaction_range}
* *
@@ -251,6 +256,20 @@ public final class AttributeKeys {
*/ */
public static final TypedKey<Attribute> WATER_MOVEMENT_EFFICIENCY = create(key("water_movement_efficiency")); public static final TypedKey<Attribute> WATER_MOVEMENT_EFFICIENCY = create(key("water_movement_efficiency"));
/**
* {@code minecraft:waypoint_receive_range}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> WAYPOINT_RECEIVE_RANGE = create(key("waypoint_receive_range"));
/**
* {@code minecraft:waypoint_transmit_range}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> WAYPOINT_TRANSMIT_RANGE = create(key("waypoint_transmit_range"));
private AttributeKeys() { private AttributeKeys() {
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.block.banner.PatternType; import org.bukkit.block.banner.PatternType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class BannerPatternKeys { public final class BannerPatternKeys {
/** /**
* {@code minecraft:base} * {@code minecraft:base}
@@ -332,12 +330,11 @@ public final class BannerPatternKeys {
} }
/** /**
* Creates a key for {@link PatternType} in the registry {@code minecraft:banner_pattern}. * Creates a typed key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<PatternType> create(final Key key) { public static TypedKey<PatternType> create(final Key key) {
return TypedKey.create(RegistryKey.BANNER_PATTERN, key); return TypedKey.create(RegistryKey.BANNER_PATTERN, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.block.Biome; import org.bukkit.block.Biome;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class BiomeKeys { public final class BiomeKeys {
/** /**
* {@code minecraft:badlands} * {@code minecraft:badlands}
@@ -486,12 +484,11 @@ public final class BiomeKeys {
} }
/** /**
* Creates a key for {@link Biome} in the registry {@code minecraft:worldgen/biome}. * Creates a typed key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<Biome> create(final Key key) { public static TypedKey<Biome> create(final Key key) {
return TypedKey.create(RegistryKey.BIOME, key); return TypedKey.create(RegistryKey.BIOME, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.block.BlockType; import org.bukkit.block.BlockType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class BlockTypeKeys { public final class BlockTypeKeys {
/** /**
* {@code minecraft:acacia_button} * {@code minecraft:acacia_button}
@@ -1063,6 +1061,13 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> BUDDING_AMETHYST = create(key("budding_amethyst")); public static final TypedKey<BlockType> BUDDING_AMETHYST = create(key("budding_amethyst"));
/**
* {@code minecraft:bush}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BUSH = create(key("bush"));
/** /**
* {@code minecraft:cactus} * {@code minecraft:cactus}
* *
@@ -1070,6 +1075,13 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> CACTUS = create(key("cactus")); public static final TypedKey<BlockType> CACTUS = create(key("cactus"));
/**
* {@code minecraft:cactus_flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CACTUS_FLOWER = create(key("cactus_flower"));
/** /**
* {@code minecraft:cake} * {@code minecraft:cake}
* *
@@ -2463,6 +2475,13 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> DRAGON_WALL_HEAD = create(key("dragon_wall_head")); public static final TypedKey<BlockType> DRAGON_WALL_HEAD = create(key("dragon_wall_head"));
/**
* {@code minecraft:dried_ghast}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> DRIED_GHAST = create(key("dried_ghast"));
/** /**
* {@code minecraft:dried_kelp_block} * {@code minecraft:dried_kelp_block}
* *
@@ -2687,6 +2706,13 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> FIRE_CORAL_WALL_FAN = create(key("fire_coral_wall_fan")); public static final TypedKey<BlockType> FIRE_CORAL_WALL_FAN = create(key("fire_coral_wall_fan"));
/**
* {@code minecraft:firefly_bush}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> FIREFLY_BUSH = create(key("firefly_bush"));
/** /**
* {@code minecraft:fletching_table} * {@code minecraft:fletching_table}
* *
@@ -3408,6 +3434,13 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> LAVA_CAULDRON = create(key("lava_cauldron")); public static final TypedKey<BlockType> LAVA_CAULDRON = create(key("lava_cauldron"));
/**
* {@code minecraft:leaf_litter}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LEAF_LITTER = create(key("leaf_litter"));
/** /**
* {@code minecraft:lectern} * {@code minecraft:lectern}
* *
@@ -6082,6 +6115,13 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> SEAGRASS = create(key("seagrass")); public static final TypedKey<BlockType> SEAGRASS = create(key("seagrass"));
/**
* {@code minecraft:short_dry_grass}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SHORT_DRY_GRASS = create(key("short_dry_grass"));
/** /**
* {@code minecraft:short_grass} * {@code minecraft:short_grass}
* *
@@ -6733,6 +6773,13 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> SWEET_BERRY_BUSH = create(key("sweet_berry_bush")); public static final TypedKey<BlockType> SWEET_BERRY_BUSH = create(key("sweet_berry_bush"));
/**
* {@code minecraft:tall_dry_grass}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> TALL_DRY_GRASS = create(key("tall_dry_grass"));
/** /**
* {@code minecraft:tall_grass} * {@code minecraft:tall_grass}
* *
@@ -6761,6 +6808,20 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> TERRACOTTA = create(key("terracotta")); public static final TypedKey<BlockType> TERRACOTTA = create(key("terracotta"));
/**
* {@code minecraft:test_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> TEST_BLOCK = create(key("test_block"));
/**
* {@code minecraft:test_instance_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> TEST_INSTANCE_BLOCK = create(key("test_instance_block"));
/** /**
* {@code minecraft:tinted_glass} * {@code minecraft:tinted_glass}
* *
@@ -7559,6 +7620,13 @@ public final class BlockTypeKeys {
*/ */
public static final TypedKey<BlockType> WHITE_WOOL = create(key("white_wool")); public static final TypedKey<BlockType> WHITE_WOOL = create(key("white_wool"));
/**
* {@code minecraft:wildflowers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WILDFLOWERS = create(key("wildflowers"));
/** /**
* {@code minecraft:wither_rose} * {@code minecraft:wither_rose}
* *

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat; import org.bukkit.entity.Cat;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class CatVariantKeys { public final class CatVariantKeys {
/** /**
* {@code minecraft:all_black} * {@code minecraft:all_black}
@@ -107,7 +105,13 @@ public final class CatVariantKeys {
private CatVariantKeys() { private CatVariantKeys() {
} }
private static TypedKey<Cat.Type> create(final Key key) { /**
* Creates a typed key for {@link Cat.Type} in the registry {@code minecraft:cat_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Cat.Type> create(final Key key) {
return TypedKey.create(RegistryKey.CAT_VARIANT, key); return TypedKey.create(RegistryKey.CAT_VARIANT, key);
} }
} }

View File

@@ -0,0 +1,61 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Chicken;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#CHICKEN_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedFrom("1.21.6")
public final class ChickenVariantKeys {
/**
* {@code minecraft:cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Chicken.Variant> COLD = create(key("cold"));
/**
* {@code minecraft:temperate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Chicken.Variant> TEMPERATE = create(key("temperate"));
/**
* {@code minecraft:warm}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Chicken.Variant> WARM = create(key("warm"));
private ChickenVariantKeys() {
}
/**
* Creates a typed key for {@link Chicken.Variant} in the registry {@code minecraft:chicken_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Chicken.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.CHICKEN_VARIANT, key);
}
}

View File

@@ -0,0 +1,61 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cow;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#COW_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedFrom("1.21.6")
public final class CowVariantKeys {
/**
* {@code minecraft:cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cow.Variant> COLD = create(key("cold"));
/**
* {@code minecraft:temperate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cow.Variant> TEMPERATE = create(key("temperate"));
/**
* {@code minecraft:warm}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cow.Variant> WARM = create(key("warm"));
private CowVariantKeys() {
}
/**
* Creates a typed key for {@link Cow.Variant} in the registry {@code minecraft:cow_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Cow.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.COW_VARIANT, key);
}
}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType; import org.bukkit.damage.DamageType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class DamageTypeKeys { public final class DamageTypeKeys {
/** /**
* {@code minecraft:arrow} * {@code minecraft:arrow}
@@ -374,12 +372,11 @@ public final class DamageTypeKeys {
} }
/** /**
* Creates a key for {@link DamageType} in the registry {@code minecraft:damage_type}. * Creates a typed key for {@link DamageType} in the registry {@code minecraft:damage_type}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<DamageType> create(final Key key) { public static TypedKey<DamageType> create(final Key key) {
return TypedKey.create(RegistryKey.DAMAGE_TYPE, key); return TypedKey.create(RegistryKey.DAMAGE_TYPE, key);
} }

View File

@@ -0,0 +1,706 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.datacomponent.DataComponentType;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#DATA_COMPONENT_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedFrom("1.21.6")
public final class DataComponentTypeKeys {
/**
* {@code minecraft:attribute_modifiers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ATTRIBUTE_MODIFIERS = create(key("attribute_modifiers"));
/**
* {@code minecraft:axolotl/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> AXOLOTL_VARIANT = create(key("axolotl/variant"));
/**
* {@code minecraft:banner_patterns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BANNER_PATTERNS = create(key("banner_patterns"));
/**
* {@code minecraft:base_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BASE_COLOR = create(key("base_color"));
/**
* {@code minecraft:bees}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BEES = create(key("bees"));
/**
* {@code minecraft:block_entity_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BLOCK_ENTITY_DATA = create(key("block_entity_data"));
/**
* {@code minecraft:block_state}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BLOCK_STATE = create(key("block_state"));
/**
* {@code minecraft:blocks_attacks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BLOCKS_ATTACKS = create(key("blocks_attacks"));
/**
* {@code minecraft:break_sound}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BREAK_SOUND = create(key("break_sound"));
/**
* {@code minecraft:bucket_entity_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BUCKET_ENTITY_DATA = create(key("bucket_entity_data"));
/**
* {@code minecraft:bundle_contents}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BUNDLE_CONTENTS = create(key("bundle_contents"));
/**
* {@code minecraft:can_break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAN_BREAK = create(key("can_break"));
/**
* {@code minecraft:can_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAN_PLACE_ON = create(key("can_place_on"));
/**
* {@code minecraft:cat/collar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAT_COLLAR = create(key("cat/collar"));
/**
* {@code minecraft:cat/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAT_VARIANT = create(key("cat/variant"));
/**
* {@code minecraft:charged_projectiles}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CHARGED_PROJECTILES = create(key("charged_projectiles"));
/**
* {@code minecraft:chicken/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CHICKEN_VARIANT = create(key("chicken/variant"));
/**
* {@code minecraft:consumable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CONSUMABLE = create(key("consumable"));
/**
* {@code minecraft:container}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CONTAINER = create(key("container"));
/**
* {@code minecraft:container_loot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CONTAINER_LOOT = create(key("container_loot"));
/**
* {@code minecraft:cow/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> COW_VARIANT = create(key("cow/variant"));
/**
* {@code minecraft:creative_slot_lock}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CREATIVE_SLOT_LOCK = create(key("creative_slot_lock"));
/**
* {@code minecraft:custom_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CUSTOM_DATA = create(key("custom_data"));
/**
* {@code minecraft:custom_model_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CUSTOM_MODEL_DATA = create(key("custom_model_data"));
/**
* {@code minecraft:custom_name}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CUSTOM_NAME = create(key("custom_name"));
/**
* {@code minecraft:damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DAMAGE = create(key("damage"));
/**
* {@code minecraft:damage_resistant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DAMAGE_RESISTANT = create(key("damage_resistant"));
/**
* {@code minecraft:death_protection}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DEATH_PROTECTION = create(key("death_protection"));
/**
* {@code minecraft:debug_stick_state}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DEBUG_STICK_STATE = create(key("debug_stick_state"));
/**
* {@code minecraft:dyed_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DYED_COLOR = create(key("dyed_color"));
/**
* {@code minecraft:enchantable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ENCHANTABLE = create(key("enchantable"));
/**
* {@code minecraft:enchantment_glint_override}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ENCHANTMENT_GLINT_OVERRIDE = create(key("enchantment_glint_override"));
/**
* {@code minecraft:enchantments}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ENCHANTMENTS = create(key("enchantments"));
/**
* {@code minecraft:entity_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ENTITY_DATA = create(key("entity_data"));
/**
* {@code minecraft:equippable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> EQUIPPABLE = create(key("equippable"));
/**
* {@code minecraft:firework_explosion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FIREWORK_EXPLOSION = create(key("firework_explosion"));
/**
* {@code minecraft:fireworks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FIREWORKS = create(key("fireworks"));
/**
* {@code minecraft:food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FOOD = create(key("food"));
/**
* {@code minecraft:fox/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FOX_VARIANT = create(key("fox/variant"));
/**
* {@code minecraft:frog/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FROG_VARIANT = create(key("frog/variant"));
/**
* {@code minecraft:glider}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> GLIDER = create(key("glider"));
/**
* {@code minecraft:horse/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> HORSE_VARIANT = create(key("horse/variant"));
/**
* {@code minecraft:instrument}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> INSTRUMENT = create(key("instrument"));
/**
* {@code minecraft:intangible_projectile}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> INTANGIBLE_PROJECTILE = create(key("intangible_projectile"));
/**
* {@code minecraft:item_model}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ITEM_MODEL = create(key("item_model"));
/**
* {@code minecraft:item_name}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ITEM_NAME = create(key("item_name"));
/**
* {@code minecraft:jukebox_playable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> JUKEBOX_PLAYABLE = create(key("jukebox_playable"));
/**
* {@code minecraft:llama/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> LLAMA_VARIANT = create(key("llama/variant"));
/**
* {@code minecraft:lock}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> LOCK = create(key("lock"));
/**
* {@code minecraft:lodestone_tracker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> LODESTONE_TRACKER = create(key("lodestone_tracker"));
/**
* {@code minecraft:lore}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> LORE = create(key("lore"));
/**
* {@code minecraft:map_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_COLOR = create(key("map_color"));
/**
* {@code minecraft:map_decorations}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_DECORATIONS = create(key("map_decorations"));
/**
* {@code minecraft:map_id}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_ID = create(key("map_id"));
/**
* {@code minecraft:map_post_processing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_POST_PROCESSING = create(key("map_post_processing"));
/**
* {@code minecraft:max_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAX_DAMAGE = create(key("max_damage"));
/**
* {@code minecraft:max_stack_size}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAX_STACK_SIZE = create(key("max_stack_size"));
/**
* {@code minecraft:mooshroom/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MOOSHROOM_VARIANT = create(key("mooshroom/variant"));
/**
* {@code minecraft:note_block_sound}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> NOTE_BLOCK_SOUND = create(key("note_block_sound"));
/**
* {@code minecraft:ominous_bottle_amplifier}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> OMINOUS_BOTTLE_AMPLIFIER = create(key("ominous_bottle_amplifier"));
/**
* {@code minecraft:painting/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PAINTING_VARIANT = create(key("painting/variant"));
/**
* {@code minecraft:parrot/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PARROT_VARIANT = create(key("parrot/variant"));
/**
* {@code minecraft:pig/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PIG_VARIANT = create(key("pig/variant"));
/**
* {@code minecraft:pot_decorations}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> POT_DECORATIONS = create(key("pot_decorations"));
/**
* {@code minecraft:potion_contents}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> POTION_CONTENTS = create(key("potion_contents"));
/**
* {@code minecraft:potion_duration_scale}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> POTION_DURATION_SCALE = create(key("potion_duration_scale"));
/**
* {@code minecraft:profile}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PROFILE = create(key("profile"));
/**
* {@code minecraft:provides_banner_patterns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PROVIDES_BANNER_PATTERNS = create(key("provides_banner_patterns"));
/**
* {@code minecraft:provides_trim_material}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PROVIDES_TRIM_MATERIAL = create(key("provides_trim_material"));
/**
* {@code minecraft:rabbit/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> RABBIT_VARIANT = create(key("rabbit/variant"));
/**
* {@code minecraft:rarity}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> RARITY = create(key("rarity"));
/**
* {@code minecraft:recipes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> RECIPES = create(key("recipes"));
/**
* {@code minecraft:repair_cost}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> REPAIR_COST = create(key("repair_cost"));
/**
* {@code minecraft:repairable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> REPAIRABLE = create(key("repairable"));
/**
* {@code minecraft:salmon/size}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SALMON_SIZE = create(key("salmon/size"));
/**
* {@code minecraft:sheep/color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SHEEP_COLOR = create(key("sheep/color"));
/**
* {@code minecraft:shulker/color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SHULKER_COLOR = create(key("shulker/color"));
/**
* {@code minecraft:stored_enchantments}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> STORED_ENCHANTMENTS = create(key("stored_enchantments"));
/**
* {@code minecraft:suspicious_stew_effects}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SUSPICIOUS_STEW_EFFECTS = create(key("suspicious_stew_effects"));
/**
* {@code minecraft:tool}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TOOL = create(key("tool"));
/**
* {@code minecraft:tooltip_display}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TOOLTIP_DISPLAY = create(key("tooltip_display"));
/**
* {@code minecraft:tooltip_style}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TOOLTIP_STYLE = create(key("tooltip_style"));
/**
* {@code minecraft:trim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TRIM = create(key("trim"));
/**
* {@code minecraft:tropical_fish/base_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TROPICAL_FISH_BASE_COLOR = create(key("tropical_fish/base_color"));
/**
* {@code minecraft:tropical_fish/pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TROPICAL_FISH_PATTERN = create(key("tropical_fish/pattern"));
/**
* {@code minecraft:tropical_fish/pattern_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TROPICAL_FISH_PATTERN_COLOR = create(key("tropical_fish/pattern_color"));
/**
* {@code minecraft:unbreakable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> UNBREAKABLE = create(key("unbreakable"));
/**
* {@code minecraft:use_cooldown}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> USE_COOLDOWN = create(key("use_cooldown"));
/**
* {@code minecraft:use_remainder}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> USE_REMAINDER = create(key("use_remainder"));
/**
* {@code minecraft:villager/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> VILLAGER_VARIANT = create(key("villager/variant"));
/**
* {@code minecraft:weapon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WEAPON = create(key("weapon"));
/**
* {@code minecraft:wolf/collar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WOLF_COLLAR = create(key("wolf/collar"));
/**
* {@code minecraft:wolf/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WOLF_SOUND_VARIANT = create(key("wolf/sound_variant"));
/**
* {@code minecraft:wolf/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WOLF_VARIANT = create(key("wolf/variant"));
/**
* {@code minecraft:writable_book_content}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WRITABLE_BOOK_CONTENT = create(key("writable_book_content"));
/**
* {@code minecraft:written_book_content}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WRITTEN_BOOK_CONTENT = create(key("written_book_content"));
private DataComponentTypeKeys() {
}
private static TypedKey<DataComponentType> create(final Key key) {
return TypedKey.create(RegistryKey.DATA_COMPONENT_TYPE, key);
}
}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class EnchantmentKeys { public final class EnchantmentKeys {
/** /**
* {@code minecraft:aqua_affinity} * {@code minecraft:aqua_affinity}
@@ -325,12 +323,11 @@ public final class EnchantmentKeys {
} }
/** /**
* Creates a key for {@link Enchantment} in the registry {@code minecraft:enchantment}. * Creates a typed key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<Enchantment> create(final Key key) { public static TypedKey<Enchantment> create(final Key key) {
return TypedKey.create(RegistryKey.ENCHANTMENT, key); return TypedKey.create(RegistryKey.ENCHANTMENT, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.Fluid; import org.bukkit.Fluid;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class FluidKeys { public final class FluidKeys {
/** /**
* {@code minecraft:empty} * {@code minecraft:empty}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.entity.Frog; import org.bukkit.entity.Frog;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class FrogVariantKeys { public final class FrogVariantKeys {
/** /**
* {@code minecraft:cold} * {@code minecraft:cold}
@@ -51,7 +49,13 @@ public final class FrogVariantKeys {
private FrogVariantKeys() { private FrogVariantKeys() {
} }
private static TypedKey<Frog.Variant> create(final Key key) { /**
* Creates a typed key for {@link Frog.Variant} in the registry {@code minecraft:frog_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Frog.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.FROG_VARIANT, key); return TypedKey.create(RegistryKey.FROG_VARIANT, key);
} }
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.GameEvent; import org.bukkit.GameEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class GameEventKeys { public final class GameEventKeys {
/** /**
* {@code minecraft:block_activate} * {@code minecraft:block_activate}
@@ -451,12 +449,11 @@ public final class GameEventKeys {
} }
/** /**
* Creates a key for {@link GameEvent} in the registry {@code minecraft:game_event}. * Creates a typed key for {@link GameEvent} in the registry {@code minecraft:game_event}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<GameEvent> create(final Key key) { public static TypedKey<GameEvent> create(final Key key) {
return TypedKey.create(RegistryKey.GAME_EVENT, key); return TypedKey.create(RegistryKey.GAME_EVENT, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.MusicInstrument; import org.bukkit.MusicInstrument;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class InstrumentKeys { public final class InstrumentKeys {
/** /**
* {@code minecraft:admire_goat_horn} * {@code minecraft:admire_goat_horn}
@@ -87,12 +85,11 @@ public final class InstrumentKeys {
} }
/** /**
* Creates a key for {@link MusicInstrument} in the registry {@code minecraft:instrument}. * Creates a typed key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<MusicInstrument> create(final Key key) { public static TypedKey<MusicInstrument> create(final Key key) {
return TypedKey.create(RegistryKey.INSTRUMENT, key); return TypedKey.create(RegistryKey.INSTRUMENT, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.inventory.ItemType; import org.bukkit.inventory.ItemType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class ItemTypeKeys { public final class ItemTypeKeys {
/** /**
* {@code minecraft:acacia_boat} * {@code minecraft:acacia_boat}
@@ -748,6 +746,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> BLACK_GLAZED_TERRACOTTA = create(key("black_glazed_terracotta")); public static final TypedKey<ItemType> BLACK_GLAZED_TERRACOTTA = create(key("black_glazed_terracotta"));
/**
* {@code minecraft:black_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> BLACK_HARNESS = create(key("black_harness"));
/** /**
* {@code minecraft:black_shulker_box} * {@code minecraft:black_shulker_box}
* *
@@ -902,6 +907,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> BLUE_DYE = create(key("blue_dye")); public static final TypedKey<ItemType> BLUE_DYE = create(key("blue_dye"));
/**
* {@code minecraft:blue_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> BLUE_EGG = create(key("blue_egg"));
/** /**
* {@code minecraft:blue_glazed_terracotta} * {@code minecraft:blue_glazed_terracotta}
* *
@@ -909,6 +921,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> BLUE_GLAZED_TERRACOTTA = create(key("blue_glazed_terracotta")); public static final TypedKey<ItemType> BLUE_GLAZED_TERRACOTTA = create(key("blue_glazed_terracotta"));
/**
* {@code minecraft:blue_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> BLUE_HARNESS = create(key("blue_harness"));
/** /**
* {@code minecraft:blue_ice} * {@code minecraft:blue_ice}
* *
@@ -1175,6 +1194,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> BROWN_DYE = create(key("brown_dye")); public static final TypedKey<ItemType> BROWN_DYE = create(key("brown_dye"));
/**
* {@code minecraft:brown_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> BROWN_EGG = create(key("brown_egg"));
/** /**
* {@code minecraft:brown_glazed_terracotta} * {@code minecraft:brown_glazed_terracotta}
* *
@@ -1182,6 +1208,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> BROWN_GLAZED_TERRACOTTA = create(key("brown_glazed_terracotta")); public static final TypedKey<ItemType> BROWN_GLAZED_TERRACOTTA = create(key("brown_glazed_terracotta"));
/**
* {@code minecraft:brown_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> BROWN_HARNESS = create(key("brown_harness"));
/** /**
* {@code minecraft:brown_mushroom} * {@code minecraft:brown_mushroom}
* *
@@ -1287,6 +1320,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> BURN_POTTERY_SHERD = create(key("burn_pottery_sherd")); public static final TypedKey<ItemType> BURN_POTTERY_SHERD = create(key("burn_pottery_sherd"));
/**
* {@code minecraft:bush}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> BUSH = create(key("bush"));
/** /**
* {@code minecraft:cactus} * {@code minecraft:cactus}
* *
@@ -1294,6 +1334,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> CACTUS = create(key("cactus")); public static final TypedKey<ItemType> CACTUS = create(key("cactus"));
/**
* {@code minecraft:cactus_flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CACTUS_FLOWER = create(key("cactus_flower"));
/** /**
* {@code minecraft:cake} * {@code minecraft:cake}
* *
@@ -2330,6 +2377,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> CYAN_GLAZED_TERRACOTTA = create(key("cyan_glazed_terracotta")); public static final TypedKey<ItemType> CYAN_GLAZED_TERRACOTTA = create(key("cyan_glazed_terracotta"));
/**
* {@code minecraft:cyan_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CYAN_HARNESS = create(key("cyan_harness"));
/** /**
* {@code minecraft:cyan_shulker_box} * {@code minecraft:cyan_shulker_box}
* *
@@ -2918,76 +2972,6 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> DIRT_PATH = create(key("dirt_path")); public static final TypedKey<ItemType> DIRT_PATH = create(key("dirt_path"));
/**
* {@code minecraft:field_masoned_banner_pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FIELD_MASONED_BANNER_PATTERN = create(key("field_masoned_banner_pattern"));
/**
* {@code minecraft:fletching_table}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FLETCHING_TABLE = create(key("fletching_table"));
/**
* {@code minecraft:flow_banner_pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FLOW_BANNER_PATTERN = create(key("flow_banner_pattern"));
/**
* {@code minecraft:flower_banner_pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FLOWER_BANNER_PATTERN = create(key("flower_banner_pattern"));
/**
* {@code minecraft:glow_berries}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GLOW_BERRIES = create(key("glow_berries"));
/**
* {@code minecraft:goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GOAT_HORN = create(key("goat_horn"));
/**
* {@code minecraft:grindstone}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GRINDSTONE = create(key("grindstone"));
/**
* {@code minecraft:honeycomb}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> HONEYCOMB = create(key("honeycomb"));
/**
* {@code minecraft:lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> LANTERN = create(key("lantern"));
/**
* {@code minecraft:music_disc_5}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> MUSIC_DISC_5 = create(key("music_disc_5"));
/** /**
* {@code minecraft:disc_fragment_5} * {@code minecraft:disc_fragment_5}
* *
@@ -3037,6 +3021,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> DRAGON_HEAD = create(key("dragon_head")); public static final TypedKey<ItemType> DRAGON_HEAD = create(key("dragon_head"));
/**
* {@code minecraft:dried_ghast}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> DRIED_GHAST = create(key("dried_ghast"));
/** /**
* {@code minecraft:dried_kelp} * {@code minecraft:dried_kelp}
* *
@@ -3366,6 +3357,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> FERN = create(key("fern")); public static final TypedKey<ItemType> FERN = create(key("fern"));
/**
* {@code minecraft:field_masoned_banner_pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FIELD_MASONED_BANNER_PATTERN = create(key("field_masoned_banner_pattern"));
/** /**
* {@code minecraft:filled_map} * {@code minecraft:filled_map}
* *
@@ -3401,6 +3399,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> FIRE_CORAL_FAN = create(key("fire_coral_fan")); public static final TypedKey<ItemType> FIRE_CORAL_FAN = create(key("fire_coral_fan"));
/**
* {@code minecraft:firefly_bush}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FIREFLY_BUSH = create(key("firefly_bush"));
/** /**
* {@code minecraft:firework_rocket} * {@code minecraft:firework_rocket}
* *
@@ -3422,6 +3427,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> FISHING_ROD = create(key("fishing_rod")); public static final TypedKey<ItemType> FISHING_ROD = create(key("fishing_rod"));
/**
* {@code minecraft:fletching_table}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FLETCHING_TABLE = create(key("fletching_table"));
/** /**
* {@code minecraft:flint} * {@code minecraft:flint}
* *
@@ -3443,6 +3455,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> FLOW_ARMOR_TRIM_SMITHING_TEMPLATE = create(key("flow_armor_trim_smithing_template")); public static final TypedKey<ItemType> FLOW_ARMOR_TRIM_SMITHING_TEMPLATE = create(key("flow_armor_trim_smithing_template"));
/**
* {@code minecraft:flow_banner_pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FLOW_BANNER_PATTERN = create(key("flow_banner_pattern"));
/** /**
* {@code minecraft:flow_pottery_sherd} * {@code minecraft:flow_pottery_sherd}
* *
@@ -3450,6 +3469,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> FLOW_POTTERY_SHERD = create(key("flow_pottery_sherd")); public static final TypedKey<ItemType> FLOW_POTTERY_SHERD = create(key("flow_pottery_sherd"));
/**
* {@code minecraft:flower_banner_pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> FLOWER_BANNER_PATTERN = create(key("flower_banner_pattern"));
/** /**
* {@code minecraft:flower_pot} * {@code minecraft:flower_pot}
* *
@@ -3569,6 +3595,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> GLOBE_BANNER_PATTERN = create(key("globe_banner_pattern")); public static final TypedKey<ItemType> GLOBE_BANNER_PATTERN = create(key("globe_banner_pattern"));
/**
* {@code minecraft:glow_berries}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GLOW_BERRIES = create(key("glow_berries"));
/** /**
* {@code minecraft:glow_ink_sac} * {@code minecraft:glow_ink_sac}
* *
@@ -3611,6 +3644,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> GLOWSTONE_DUST = create(key("glowstone_dust")); public static final TypedKey<ItemType> GLOWSTONE_DUST = create(key("glowstone_dust"));
/**
* {@code minecraft:goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GOAT_HORN = create(key("goat_horn"));
/** /**
* {@code minecraft:goat_spawn_egg} * {@code minecraft:goat_spawn_egg}
* *
@@ -3835,6 +3875,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> GRAY_GLAZED_TERRACOTTA = create(key("gray_glazed_terracotta")); public static final TypedKey<ItemType> GRAY_GLAZED_TERRACOTTA = create(key("gray_glazed_terracotta"));
/**
* {@code minecraft:gray_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GRAY_HARNESS = create(key("gray_harness"));
/** /**
* {@code minecraft:gray_shulker_box} * {@code minecraft:gray_shulker_box}
* *
@@ -3933,6 +3980,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> GREEN_GLAZED_TERRACOTTA = create(key("green_glazed_terracotta")); public static final TypedKey<ItemType> GREEN_GLAZED_TERRACOTTA = create(key("green_glazed_terracotta"));
/**
* {@code minecraft:green_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GREEN_HARNESS = create(key("green_harness"));
/** /**
* {@code minecraft:green_shulker_box} * {@code minecraft:green_shulker_box}
* *
@@ -3968,6 +4022,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> GREEN_WOOL = create(key("green_wool")); public static final TypedKey<ItemType> GREEN_WOOL = create(key("green_wool"));
/**
* {@code minecraft:grindstone}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GRINDSTONE = create(key("grindstone"));
/** /**
* {@code minecraft:guardian_spawn_egg} * {@code minecraft:guardian_spawn_egg}
* *
@@ -4003,6 +4064,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> HANGING_ROOTS = create(key("hanging_roots")); public static final TypedKey<ItemType> HANGING_ROOTS = create(key("hanging_roots"));
/**
* {@code minecraft:happy_ghast_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> HAPPY_GHAST_SPAWN_EGG = create(key("happy_ghast_spawn_egg"));
/** /**
* {@code minecraft:hay_block} * {@code minecraft:hay_block}
* *
@@ -4066,6 +4134,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> HONEY_BOTTLE = create(key("honey_bottle")); public static final TypedKey<ItemType> HONEY_BOTTLE = create(key("honey_bottle"));
/**
* {@code minecraft:honeycomb}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> HONEYCOMB = create(key("honeycomb"));
/** /**
* {@code minecraft:honeycomb_block} * {@code minecraft:honeycomb_block}
* *
@@ -4493,6 +4568,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> LADDER = create(key("ladder")); public static final TypedKey<ItemType> LADDER = create(key("ladder"));
/**
* {@code minecraft:lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> LANTERN = create(key("lantern"));
/** /**
* {@code minecraft:lapis_block} * {@code minecraft:lapis_block}
* *
@@ -4542,6 +4624,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> LEAD = create(key("lead")); public static final TypedKey<ItemType> LEAD = create(key("lead"));
/**
* {@code minecraft:leaf_litter}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> LEAF_LITTER = create(key("leaf_litter"));
/** /**
* {@code minecraft:leather} * {@code minecraft:leather}
* *
@@ -4668,6 +4757,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> LIGHT_BLUE_GLAZED_TERRACOTTA = create(key("light_blue_glazed_terracotta")); public static final TypedKey<ItemType> LIGHT_BLUE_GLAZED_TERRACOTTA = create(key("light_blue_glazed_terracotta"));
/**
* {@code minecraft:light_blue_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> LIGHT_BLUE_HARNESS = create(key("light_blue_harness"));
/** /**
* {@code minecraft:light_blue_shulker_box} * {@code minecraft:light_blue_shulker_box}
* *
@@ -4766,6 +4862,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> LIGHT_GRAY_GLAZED_TERRACOTTA = create(key("light_gray_glazed_terracotta")); public static final TypedKey<ItemType> LIGHT_GRAY_GLAZED_TERRACOTTA = create(key("light_gray_glazed_terracotta"));
/**
* {@code minecraft:light_gray_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> LIGHT_GRAY_HARNESS = create(key("light_gray_harness"));
/** /**
* {@code minecraft:light_gray_shulker_box} * {@code minecraft:light_gray_shulker_box}
* *
@@ -4899,6 +5002,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> LIME_GLAZED_TERRACOTTA = create(key("lime_glazed_terracotta")); public static final TypedKey<ItemType> LIME_GLAZED_TERRACOTTA = create(key("lime_glazed_terracotta"));
/**
* {@code minecraft:lime_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> LIME_HARNESS = create(key("lime_harness"));
/** /**
* {@code minecraft:lime_shulker_box} * {@code minecraft:lime_shulker_box}
* *
@@ -5032,6 +5142,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> MAGENTA_GLAZED_TERRACOTTA = create(key("magenta_glazed_terracotta")); public static final TypedKey<ItemType> MAGENTA_GLAZED_TERRACOTTA = create(key("magenta_glazed_terracotta"));
/**
* {@code minecraft:magenta_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> MAGENTA_HARNESS = create(key("magenta_harness"));
/** /**
* {@code minecraft:magenta_shulker_box} * {@code minecraft:magenta_shulker_box}
* *
@@ -5424,6 +5541,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> MUSHROOM_STEW = create(key("mushroom_stew")); public static final TypedKey<ItemType> MUSHROOM_STEW = create(key("mushroom_stew"));
/**
* {@code minecraft:music_disc_5}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> MUSIC_DISC_5 = create(key("music_disc_5"));
/** /**
* {@code minecraft:music_disc_11} * {@code minecraft:music_disc_11}
* *
@@ -5536,6 +5660,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> MUSIC_DISC_STRAD = create(key("music_disc_strad")); public static final TypedKey<ItemType> MUSIC_DISC_STRAD = create(key("music_disc_strad"));
/**
* {@code minecraft:music_disc_tears}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> MUSIC_DISC_TEARS = create(key("music_disc_tears"));
/** /**
* {@code minecraft:music_disc_wait} * {@code minecraft:music_disc_wait}
* *
@@ -5998,6 +6129,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> ORANGE_GLAZED_TERRACOTTA = create(key("orange_glazed_terracotta")); public static final TypedKey<ItemType> ORANGE_GLAZED_TERRACOTTA = create(key("orange_glazed_terracotta"));
/**
* {@code minecraft:orange_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> ORANGE_HARNESS = create(key("orange_harness"));
/** /**
* {@code minecraft:orange_shulker_box} * {@code minecraft:orange_shulker_box}
* *
@@ -6432,6 +6570,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> PINK_GLAZED_TERRACOTTA = create(key("pink_glazed_terracotta")); public static final TypedKey<ItemType> PINK_GLAZED_TERRACOTTA = create(key("pink_glazed_terracotta"));
/**
* {@code minecraft:pink_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> PINK_HARNESS = create(key("pink_harness"));
/** /**
* {@code minecraft:pink_petals} * {@code minecraft:pink_petals}
* *
@@ -6964,6 +7109,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> PURPLE_GLAZED_TERRACOTTA = create(key("purple_glazed_terracotta")); public static final TypedKey<ItemType> PURPLE_GLAZED_TERRACOTTA = create(key("purple_glazed_terracotta"));
/**
* {@code minecraft:purple_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> PURPLE_HARNESS = create(key("purple_harness"));
/** /**
* {@code minecraft:purple_shulker_box} * {@code minecraft:purple_shulker_box}
* *
@@ -7237,6 +7389,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> RED_GLAZED_TERRACOTTA = create(key("red_glazed_terracotta")); public static final TypedKey<ItemType> RED_GLAZED_TERRACOTTA = create(key("red_glazed_terracotta"));
/**
* {@code minecraft:red_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> RED_HARNESS = create(key("red_harness"));
/** /**
* {@code minecraft:red_mushroom} * {@code minecraft:red_mushroom}
* *
@@ -7678,6 +7837,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> SHIELD = create(key("shield")); public static final TypedKey<ItemType> SHIELD = create(key("shield"));
/**
* {@code minecraft:short_dry_grass}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SHORT_DRY_GRASS = create(key("short_dry_grass"));
/** /**
* {@code minecraft:short_grass} * {@code minecraft:short_grass}
* *
@@ -8553,6 +8719,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> TADPOLE_SPAWN_EGG = create(key("tadpole_spawn_egg")); public static final TypedKey<ItemType> TADPOLE_SPAWN_EGG = create(key("tadpole_spawn_egg"));
/**
* {@code minecraft:tall_dry_grass}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> TALL_DRY_GRASS = create(key("tall_dry_grass"));
/** /**
* {@code minecraft:tall_grass} * {@code minecraft:tall_grass}
* *
@@ -8574,6 +8747,20 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> TERRACOTTA = create(key("terracotta")); public static final TypedKey<ItemType> TERRACOTTA = create(key("terracotta"));
/**
* {@code minecraft:test_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> TEST_BLOCK = create(key("test_block"));
/**
* {@code minecraft:test_instance_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> TEST_INSTANCE_BLOCK = create(key("test_instance_block"));
/** /**
* {@code minecraft:tide_armor_trim_smithing_template} * {@code minecraft:tide_armor_trim_smithing_template}
* *
@@ -9428,6 +9615,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> WHITE_GLAZED_TERRACOTTA = create(key("white_glazed_terracotta")); public static final TypedKey<ItemType> WHITE_GLAZED_TERRACOTTA = create(key("white_glazed_terracotta"));
/**
* {@code minecraft:white_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> WHITE_HARNESS = create(key("white_harness"));
/** /**
* {@code minecraft:white_shulker_box} * {@code minecraft:white_shulker_box}
* *
@@ -9477,6 +9671,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> WILD_ARMOR_TRIM_SMITHING_TEMPLATE = create(key("wild_armor_trim_smithing_template")); public static final TypedKey<ItemType> WILD_ARMOR_TRIM_SMITHING_TEMPLATE = create(key("wild_armor_trim_smithing_template"));
/**
* {@code minecraft:wildflowers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> WILDFLOWERS = create(key("wildflowers"));
/** /**
* {@code minecraft:wind_charge} * {@code minecraft:wind_charge}
* *
@@ -9645,6 +9846,13 @@ public final class ItemTypeKeys {
*/ */
public static final TypedKey<ItemType> YELLOW_GLAZED_TERRACOTTA = create(key("yellow_glazed_terracotta")); public static final TypedKey<ItemType> YELLOW_GLAZED_TERRACOTTA = create(key("yellow_glazed_terracotta"));
/**
* {@code minecraft:yellow_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> YELLOW_HARNESS = create(key("yellow_harness"));
/** /**
* {@code minecraft:yellow_shulker_box} * {@code minecraft:yellow_shulker_box}
* *

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.JukeboxSong; import org.bukkit.JukeboxSong;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class JukeboxSongKeys { public final class JukeboxSongKeys {
/** /**
* {@code minecraft:11} * {@code minecraft:11}
@@ -146,6 +144,13 @@ public final class JukeboxSongKeys {
*/ */
public static final TypedKey<JukeboxSong> STRAD = create(key("strad")); public static final TypedKey<JukeboxSong> STRAD = create(key("strad"));
/**
* {@code minecraft:tears}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> TEARS = create(key("tears"));
/** /**
* {@code minecraft:wait} * {@code minecraft:wait}
* *
@@ -164,12 +169,11 @@ public final class JukeboxSongKeys {
} }
/** /**
* Creates a key for {@link JukeboxSong} in the registry {@code minecraft:jukebox_song}. * Creates a typed key for {@link JukeboxSong} in the registry {@code minecraft:jukebox_song}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<JukeboxSong> create(final Key key) { public static TypedKey<JukeboxSong> create(final Key key) {
return TypedKey.create(RegistryKey.JUKEBOX_SONG, key); return TypedKey.create(RegistryKey.JUKEBOX_SONG, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.map.MapCursor; import org.bukkit.map.MapCursor;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class MapDecorationTypeKeys { public final class MapDecorationTypeKeys {
/** /**
* {@code minecraft:banner_black} * {@code minecraft:banner_black}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.inventory.MenuType; import org.bukkit.inventory.MenuType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class MenuTypeKeys { public final class MenuTypeKeys {
/** /**
* {@code minecraft:anvil} * {@code minecraft:anvil}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class MobEffectKeys { public final class MobEffectKeys {
/** /**
* {@code minecraft:absorption} * {@code minecraft:absorption}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.Art; import org.bukkit.Art;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class PaintingVariantKeys { public final class PaintingVariantKeys {
/** /**
* {@code minecraft:alban} * {@code minecraft:alban}
@@ -381,12 +379,11 @@ public final class PaintingVariantKeys {
} }
/** /**
* Creates a key for {@link Art} in the registry {@code minecraft:painting_variant}. * Creates a typed key for {@link Art} in the registry {@code minecraft:painting_variant}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<Art> create(final Key key) { public static TypedKey<Art> create(final Key key) {
return TypedKey.create(RegistryKey.PAINTING_VARIANT, key); return TypedKey.create(RegistryKey.PAINTING_VARIANT, key);
} }

View File

@@ -0,0 +1,61 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Pig;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#PIG_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedFrom("1.21.6")
public final class PigVariantKeys {
/**
* {@code minecraft:cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.Variant> COLD = create(key("cold"));
/**
* {@code minecraft:temperate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.Variant> TEMPERATE = create(key("temperate"));
/**
* {@code minecraft:warm}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.Variant> WARM = create(key("warm"));
private PigVariantKeys() {
}
/**
* Creates a typed key for {@link Pig.Variant} in the registry {@code minecraft:pig_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Pig.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.PIG_VARIANT, key);
}
}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class SoundEventKeys { public final class SoundEventKeys {
/** /**
* {@code minecraft:ambient.basalt_deltas.additions} * {@code minecraft:ambient.basalt_deltas.additions}
@@ -881,6 +879,20 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> BLOCK_BUBBLE_COLUMN_WHIRLPOOL_INSIDE = create(key("block.bubble_column.whirlpool_inside")); public static final TypedKey<Sound> BLOCK_BUBBLE_COLUMN_WHIRLPOOL_INSIDE = create(key("block.bubble_column.whirlpool_inside"));
/**
* {@code minecraft:block.cactus_flower.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CACTUS_FLOWER_BREAK = create(key("block.cactus_flower.break"));
/**
* {@code minecraft:block.cactus_flower.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CACTUS_FLOWER_PLACE = create(key("block.cactus_flower.place"));
/** /**
* {@code minecraft:block.cake.add_candle} * {@code minecraft:block.cake.add_candle}
* *
@@ -1728,6 +1740,13 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> BLOCK_CROP_BREAK = create(key("block.crop.break")); public static final TypedKey<Sound> BLOCK_CROP_BREAK = create(key("block.crop.break"));
/**
* {@code minecraft:block.deadbush.idle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DEADBUSH_IDLE = create(key("block.deadbush.idle"));
/** /**
* {@code minecraft:block.decorated_pot.break} * {@code minecraft:block.decorated_pot.break}
* *
@@ -1910,6 +1929,62 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> BLOCK_DISPENSER_LAUNCH = create(key("block.dispenser.launch")); public static final TypedKey<Sound> BLOCK_DISPENSER_LAUNCH = create(key("block.dispenser.launch"));
/**
* {@code minecraft:block.dried_ghast.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRIED_GHAST_AMBIENT = create(key("block.dried_ghast.ambient"));
/**
* {@code minecraft:block.dried_ghast.ambient_water}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRIED_GHAST_AMBIENT_WATER = create(key("block.dried_ghast.ambient_water"));
/**
* {@code minecraft:block.dried_ghast.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRIED_GHAST_BREAK = create(key("block.dried_ghast.break"));
/**
* {@code minecraft:block.dried_ghast.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRIED_GHAST_FALL = create(key("block.dried_ghast.fall"));
/**
* {@code minecraft:block.dried_ghast.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRIED_GHAST_PLACE = create(key("block.dried_ghast.place"));
/**
* {@code minecraft:block.dried_ghast.place_in_water}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRIED_GHAST_PLACE_IN_WATER = create(key("block.dried_ghast.place_in_water"));
/**
* {@code minecraft:block.dried_ghast.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRIED_GHAST_STEP = create(key("block.dried_ghast.step"));
/**
* {@code minecraft:block.dried_ghast.transition}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRIED_GHAST_TRANSITION = create(key("block.dried_ghast.transition"));
/** /**
* {@code minecraft:block.dripstone_block.break} * {@code minecraft:block.dripstone_block.break}
* *
@@ -1945,6 +2020,13 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> BLOCK_DRIPSTONE_BLOCK_STEP = create(key("block.dripstone_block.step")); public static final TypedKey<Sound> BLOCK_DRIPSTONE_BLOCK_STEP = create(key("block.dripstone_block.step"));
/**
* {@code minecraft:block.dry_grass.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DRY_GRASS_AMBIENT = create(key("block.dry_grass.ambient"));
/** /**
* {@code minecraft:block.enchantment_table.use} * {@code minecraft:block.enchantment_table.use}
* *
@@ -2050,6 +2132,13 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> BLOCK_FIRE_EXTINGUISH = create(key("block.fire.extinguish")); public static final TypedKey<Sound> BLOCK_FIRE_EXTINGUISH = create(key("block.fire.extinguish"));
/**
* {@code minecraft:block.firefly_bush.idle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_FIREFLY_BUSH_IDLE = create(key("block.firefly_bush.idle"));
/** /**
* {@code minecraft:block.flowering_azalea.break} * {@code minecraft:block.flowering_azalea.break}
* *
@@ -2512,6 +2601,41 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> BLOCK_HONEY_BLOCK_STEP = create(key("block.honey_block.step")); public static final TypedKey<Sound> BLOCK_HONEY_BLOCK_STEP = create(key("block.honey_block.step"));
/**
* {@code minecraft:block.iron.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_BREAK = create(key("block.iron.break"));
/**
* {@code minecraft:block.iron.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_FALL = create(key("block.iron.fall"));
/**
* {@code minecraft:block.iron.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_HIT = create(key("block.iron.hit"));
/**
* {@code minecraft:block.iron.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_PLACE = create(key("block.iron.place"));
/**
* {@code minecraft:block.iron.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_STEP = create(key("block.iron.step"));
/** /**
* {@code minecraft:block.iron_door.close} * {@code minecraft:block.iron_door.close}
* *
@@ -2645,6 +2769,41 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> BLOCK_LAVA_POP = create(key("block.lava.pop")); public static final TypedKey<Sound> BLOCK_LAVA_POP = create(key("block.lava.pop"));
/**
* {@code minecraft:block.leaf_litter.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_BREAK = create(key("block.leaf_litter.break"));
/**
* {@code minecraft:block.leaf_litter.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_FALL = create(key("block.leaf_litter.fall"));
/**
* {@code minecraft:block.leaf_litter.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_HIT = create(key("block.leaf_litter.hit"));
/**
* {@code minecraft:block.leaf_litter.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_PLACE = create(key("block.leaf_litter.place"));
/**
* {@code minecraft:block.leaf_litter.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_STEP = create(key("block.leaf_litter.step"));
/** /**
* {@code minecraft:block.lever.click} * {@code minecraft:block.lever.click}
* *
@@ -3996,6 +4155,13 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> BLOCK_SAND_HIT = create(key("block.sand.hit")); public static final TypedKey<Sound> BLOCK_SAND_HIT = create(key("block.sand.hit"));
/**
* {@code minecraft:block.sand.idle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SAND_IDLE = create(key("block.sand.idle"));
/** /**
* {@code minecraft:block.sand.place} * {@code minecraft:block.sand.place}
* *
@@ -7097,6 +7263,34 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ENTITY_GHAST_WARN = create(key("entity.ghast.warn")); public static final TypedKey<Sound> ENTITY_GHAST_WARN = create(key("entity.ghast.warn"));
/**
* {@code minecraft:entity.ghastling.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_GHASTLING_AMBIENT = create(key("entity.ghastling.ambient"));
/**
* {@code minecraft:entity.ghastling.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_GHASTLING_DEATH = create(key("entity.ghastling.death"));
/**
* {@code minecraft:entity.ghastling.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_GHASTLING_HURT = create(key("entity.ghastling.hurt"));
/**
* {@code minecraft:entity.ghastling.spawn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_GHASTLING_SPAWN = create(key("entity.ghastling.spawn"));
/** /**
* {@code minecraft:entity.glow_item_frame.add_item} * {@code minecraft:entity.glow_item_frame.add_item}
* *
@@ -7342,6 +7536,62 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ENTITY_GUARDIAN_HURT_LAND = create(key("entity.guardian.hurt_land")); public static final TypedKey<Sound> ENTITY_GUARDIAN_HURT_LAND = create(key("entity.guardian.hurt_land"));
/**
* {@code minecraft:entity.happy_ghast.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_HAPPY_GHAST_AMBIENT = create(key("entity.happy_ghast.ambient"));
/**
* {@code minecraft:entity.happy_ghast.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_HAPPY_GHAST_DEATH = create(key("entity.happy_ghast.death"));
/**
* {@code minecraft:entity.happy_ghast.equip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_HAPPY_GHAST_EQUIP = create(key("entity.happy_ghast.equip"));
/**
* {@code minecraft:entity.happy_ghast.harness_goggles_down}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_HAPPY_GHAST_HARNESS_GOGGLES_DOWN = create(key("entity.happy_ghast.harness_goggles_down"));
/**
* {@code minecraft:entity.happy_ghast.harness_goggles_up}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_HAPPY_GHAST_HARNESS_GOGGLES_UP = create(key("entity.happy_ghast.harness_goggles_up"));
/**
* {@code minecraft:entity.happy_ghast.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_HAPPY_GHAST_HURT = create(key("entity.happy_ghast.hurt"));
/**
* {@code minecraft:entity.happy_ghast.riding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_HAPPY_GHAST_RIDING = create(key("entity.happy_ghast.riding"));
/**
* {@code minecraft:entity.happy_ghast.unequip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_HAPPY_GHAST_UNEQUIP = create(key("entity.happy_ghast.unequip"));
/** /**
* {@code minecraft:entity.hoglin.ambient} * {@code minecraft:entity.hoglin.ambient}
* *
@@ -7706,20 +7956,6 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ENTITY_ITEM_FRAME_ROTATE_ITEM = create(key("entity.item_frame.rotate_item")); public static final TypedKey<Sound> ENTITY_ITEM_FRAME_ROTATE_ITEM = create(key("entity.item_frame.rotate_item"));
/**
* {@code minecraft:entity.leash_knot.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_LEASH_KNOT_BREAK = create(key("entity.leash_knot.break"));
/**
* {@code minecraft:entity.leash_knot.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_LEASH_KNOT_PLACE = create(key("entity.leash_knot.place"));
/** /**
* {@code minecraft:entity.lightning_bolt.impact} * {@code minecraft:entity.lightning_bolt.impact}
* *
@@ -8770,13 +9006,6 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ENTITY_POLAR_BEAR_WARNING = create(key("entity.polar_bear.warning")); public static final TypedKey<Sound> ENTITY_POLAR_BEAR_WARNING = create(key("entity.polar_bear.warning"));
/**
* {@code minecraft:entity.puffer_fish.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PUFFER_FISH_AMBIENT = create(key("entity.puffer_fish.ambient"));
/** /**
* {@code minecraft:entity.puffer_fish.blow_out} * {@code minecraft:entity.puffer_fish.blow_out}
* *
@@ -10219,13 +10448,6 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ENTITY_WOLF_GROWL = create(key("entity.wolf.growl")); public static final TypedKey<Sound> ENTITY_WOLF_GROWL = create(key("entity.wolf.growl"));
/**
* {@code minecraft:entity.wolf.howl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_HOWL = create(key("entity.wolf.howl"));
/** /**
* {@code minecraft:entity.wolf.hurt} * {@code minecraft:entity.wolf.hurt}
* *
@@ -10261,6 +10483,258 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ENTITY_WOLF_WHINE = create(key("entity.wolf.whine")); public static final TypedKey<Sound> ENTITY_WOLF_WHINE = create(key("entity.wolf.whine"));
/**
* {@code minecraft:entity.wolf_angry.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_AMBIENT = create(key("entity.wolf_angry.ambient"));
/**
* {@code minecraft:entity.wolf_angry.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_DEATH = create(key("entity.wolf_angry.death"));
/**
* {@code minecraft:entity.wolf_angry.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_GROWL = create(key("entity.wolf_angry.growl"));
/**
* {@code minecraft:entity.wolf_angry.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_HURT = create(key("entity.wolf_angry.hurt"));
/**
* {@code minecraft:entity.wolf_angry.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_PANT = create(key("entity.wolf_angry.pant"));
/**
* {@code minecraft:entity.wolf_angry.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_WHINE = create(key("entity.wolf_angry.whine"));
/**
* {@code minecraft:entity.wolf_big.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_AMBIENT = create(key("entity.wolf_big.ambient"));
/**
* {@code minecraft:entity.wolf_big.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_DEATH = create(key("entity.wolf_big.death"));
/**
* {@code minecraft:entity.wolf_big.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_GROWL = create(key("entity.wolf_big.growl"));
/**
* {@code minecraft:entity.wolf_big.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_HURT = create(key("entity.wolf_big.hurt"));
/**
* {@code minecraft:entity.wolf_big.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_PANT = create(key("entity.wolf_big.pant"));
/**
* {@code minecraft:entity.wolf_big.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_WHINE = create(key("entity.wolf_big.whine"));
/**
* {@code minecraft:entity.wolf_cute.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_AMBIENT = create(key("entity.wolf_cute.ambient"));
/**
* {@code minecraft:entity.wolf_cute.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_DEATH = create(key("entity.wolf_cute.death"));
/**
* {@code minecraft:entity.wolf_cute.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_GROWL = create(key("entity.wolf_cute.growl"));
/**
* {@code minecraft:entity.wolf_cute.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_HURT = create(key("entity.wolf_cute.hurt"));
/**
* {@code minecraft:entity.wolf_cute.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_PANT = create(key("entity.wolf_cute.pant"));
/**
* {@code minecraft:entity.wolf_cute.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_WHINE = create(key("entity.wolf_cute.whine"));
/**
* {@code minecraft:entity.wolf_grumpy.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_AMBIENT = create(key("entity.wolf_grumpy.ambient"));
/**
* {@code minecraft:entity.wolf_grumpy.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_DEATH = create(key("entity.wolf_grumpy.death"));
/**
* {@code minecraft:entity.wolf_grumpy.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_GROWL = create(key("entity.wolf_grumpy.growl"));
/**
* {@code minecraft:entity.wolf_grumpy.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_HURT = create(key("entity.wolf_grumpy.hurt"));
/**
* {@code minecraft:entity.wolf_grumpy.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_PANT = create(key("entity.wolf_grumpy.pant"));
/**
* {@code minecraft:entity.wolf_grumpy.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_WHINE = create(key("entity.wolf_grumpy.whine"));
/**
* {@code minecraft:entity.wolf_puglin.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_AMBIENT = create(key("entity.wolf_puglin.ambient"));
/**
* {@code minecraft:entity.wolf_puglin.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_DEATH = create(key("entity.wolf_puglin.death"));
/**
* {@code minecraft:entity.wolf_puglin.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_GROWL = create(key("entity.wolf_puglin.growl"));
/**
* {@code minecraft:entity.wolf_puglin.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_HURT = create(key("entity.wolf_puglin.hurt"));
/**
* {@code minecraft:entity.wolf_puglin.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_PANT = create(key("entity.wolf_puglin.pant"));
/**
* {@code minecraft:entity.wolf_puglin.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_WHINE = create(key("entity.wolf_puglin.whine"));
/**
* {@code minecraft:entity.wolf_sad.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_AMBIENT = create(key("entity.wolf_sad.ambient"));
/**
* {@code minecraft:entity.wolf_sad.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_DEATH = create(key("entity.wolf_sad.death"));
/**
* {@code minecraft:entity.wolf_sad.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_GROWL = create(key("entity.wolf_sad.growl"));
/**
* {@code minecraft:entity.wolf_sad.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_HURT = create(key("entity.wolf_sad.hurt"));
/**
* {@code minecraft:entity.wolf_sad.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_PANT = create(key("entity.wolf_sad.pant"));
/**
* {@code minecraft:entity.wolf_sad.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_WHINE = create(key("entity.wolf_sad.whine"));
/** /**
* {@code minecraft:entity.zoglin.ambient} * {@code minecraft:entity.zoglin.ambient}
* *
@@ -10968,6 +11442,13 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ITEM_HONEYCOMB_WAX_ON = create(key("item.honeycomb.wax_on")); public static final TypedKey<Sound> ITEM_HONEYCOMB_WAX_ON = create(key("item.honeycomb.wax_on"));
/**
* {@code minecraft:item.horse_armor.unequip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_HORSE_ARMOR_UNEQUIP = create(key("item.horse_armor.unequip"));
/** /**
* {@code minecraft:item.ink_sac.use} * {@code minecraft:item.ink_sac.use}
* *
@@ -10975,6 +11456,34 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ITEM_INK_SAC_USE = create(key("item.ink_sac.use")); public static final TypedKey<Sound> ITEM_INK_SAC_USE = create(key("item.ink_sac.use"));
/**
* {@code minecraft:item.lead.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_LEAD_BREAK = create(key("item.lead.break"));
/**
* {@code minecraft:item.lead.tied}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_LEAD_TIED = create(key("item.lead.tied"));
/**
* {@code minecraft:item.lead.untied}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_LEAD_UNTIED = create(key("item.lead.untied"));
/**
* {@code minecraft:item.llama_carpet.unequip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_LLAMA_CARPET_UNEQUIP = create(key("item.llama_carpet.unequip"));
/** /**
* {@code minecraft:item.lodestone_compass.lock} * {@code minecraft:item.lodestone_compass.lock}
* *
@@ -11017,6 +11526,20 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> ITEM_OMINOUS_BOTTLE_DISPOSE = create(key("item.ominous_bottle.dispose")); public static final TypedKey<Sound> ITEM_OMINOUS_BOTTLE_DISPOSE = create(key("item.ominous_bottle.dispose"));
/**
* {@code minecraft:item.saddle.unequip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SADDLE_UNEQUIP = create(key("item.saddle.unequip"));
/**
* {@code minecraft:item.shears.snip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SHEARS_SNIP = create(key("item.shears.snip"));
/** /**
* {@code minecraft:item.shield.block} * {@code minecraft:item.shield.block}
* *
@@ -11479,6 +12002,13 @@ public final class SoundEventKeys {
*/ */
public static final TypedKey<Sound> MUSIC_DISC_STRAD = create(key("music_disc.strad")); public static final TypedKey<Sound> MUSIC_DISC_STRAD = create(key("music_disc.strad"));
/**
* {@code minecraft:music_disc.tears}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> MUSIC_DISC_TEARS = create(key("music_disc.tears"));
/** /**
* {@code minecraft:music_disc.wait} * {@code minecraft:music_disc.wait}
* *

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.generator.structure.Structure; import org.bukkit.generator.structure.Structure;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class StructureKeys { public final class StructureKeys {
/** /**
* {@code minecraft:ancient_city} * {@code minecraft:ancient_city}
@@ -269,12 +267,11 @@ public final class StructureKeys {
} }
/** /**
* Creates a key for {@link Structure} in the registry {@code minecraft:worldgen/structure}. * Creates a typed key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<Structure> create(final Key key) { public static TypedKey<Structure> create(final Key key) {
return TypedKey.create(RegistryKey.STRUCTURE, key); return TypedKey.create(RegistryKey.STRUCTURE, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.generator.structure.StructureType; import org.bukkit.generator.structure.StructureType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class StructureTypeKeys { public final class StructureTypeKeys {
/** /**
* {@code minecraft:buried_treasure} * {@code minecraft:buried_treasure}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimMaterial; import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class TrimMaterialKeys { public final class TrimMaterialKeys {
/** /**
* {@code minecraft:amethyst} * {@code minecraft:amethyst}
@@ -108,12 +106,11 @@ public final class TrimMaterialKeys {
} }
/** /**
* Creates a key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}. * Creates a typed key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<TrimMaterial> create(final Key key) { public static TypedKey<TrimMaterial> create(final Key key) {
return TypedKey.create(RegistryKey.TRIM_MATERIAL, key); return TypedKey.create(RegistryKey.TRIM_MATERIAL, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimPattern; import org.bukkit.inventory.meta.trim.TrimPattern;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class TrimPatternKeys { public final class TrimPatternKeys {
/** /**
* {@code minecraft:bolt} * {@code minecraft:bolt}
@@ -157,12 +155,11 @@ public final class TrimPatternKeys {
} }
/** /**
* Creates a key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}. * Creates a typed key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<TrimPattern> create(final Key key) { public static TypedKey<TrimPattern> create(final Key key) {
return TypedKey.create(RegistryKey.TRIM_PATTERN, key); return TypedKey.create(RegistryKey.TRIM_PATTERN, key);
} }

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.entity.Villager; import org.bukkit.entity.Villager;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class VillagerProfessionKeys { public final class VillagerProfessionKeys {
/** /**
* {@code minecraft:armorer} * {@code minecraft:armorer}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.entity.Villager; import org.bukkit.entity.Villager;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class VillagerTypeKeys { public final class VillagerTypeKeys {
/** /**
* {@code minecraft:desert} * {@code minecraft:desert}

View File

@@ -0,0 +1,89 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Wolf;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#WOLF_SOUND_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedFrom("1.21.6")
public final class WolfSoundVariantKeys {
/**
* {@code minecraft:angry}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> ANGRY = create(key("angry"));
/**
* {@code minecraft:big}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> BIG = create(key("big"));
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:cute}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> CUTE = create(key("cute"));
/**
* {@code minecraft:grumpy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> GRUMPY = create(key("grumpy"));
/**
* {@code minecraft:puglin}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> PUGLIN = create(key("puglin"));
/**
* {@code minecraft:sad}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> SAD = create(key("sad"));
private WolfSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Wolf.SoundVariant} in the registry {@code minecraft:wolf_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Wolf.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.WOLF_SOUND_VARIANT, key);
}
}

View File

@@ -7,7 +7,6 @@ import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey; import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.entity.Wolf; import org.bukkit.entity.Wolf;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@ApiStatus.Experimental @GeneratedFrom("1.21.6")
public final class WolfVariantKeys { public final class WolfVariantKeys {
/** /**
* {@code minecraft:ashen} * {@code minecraft:ashen}
@@ -94,12 +92,11 @@ public final class WolfVariantKeys {
} }
/** /**
* Creates a key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}. * Creates a typed key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}.
* *
* @param key the value's key in the registry * @param key the value's key in the registry
* @return a new typed key * @return a new typed key
*/ */
@ApiStatus.Experimental
public static TypedKey<Wolf.Variant> create(final Key key) { public static TypedKey<Wolf.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.WOLF_VARIANT, key); return TypedKey.create(RegistryKey.WOLF_VARIANT, key);
} }

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#BANNER_PATTERN}. * Vanilla tag keys for {@link RegistryKey#BANNER_PATTERN}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class BannerPatternTagKeys { public final class BannerPatternTagKeys {
/** /**

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#BIOME}. * Vanilla tag keys for {@link RegistryKey#BIOME}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class BiomeTagKeys { public final class BiomeTagKeys {
/** /**
@@ -447,6 +447,13 @@ public final class BiomeTagKeys {
*/ */
public static final TagKey<Biome> SNOW_GOLEM_MELTS = create(key("snow_golem_melts")); public static final TagKey<Biome> SNOW_GOLEM_MELTS = create(key("snow_golem_melts"));
/**
* {@code #minecraft:spawns_cold_variant_farm_animals}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_COLD_VARIANT_FARM_ANIMALS = create(key("spawns_cold_variant_farm_animals"));
/** /**
* {@code #minecraft:spawns_cold_variant_frogs} * {@code #minecraft:spawns_cold_variant_frogs}
* *
@@ -468,6 +475,13 @@ public final class BiomeTagKeys {
*/ */
public static final TagKey<Biome> SPAWNS_SNOW_FOXES = create(key("spawns_snow_foxes")); public static final TagKey<Biome> SPAWNS_SNOW_FOXES = create(key("spawns_snow_foxes"));
/**
* {@code #minecraft:spawns_warm_variant_farm_animals}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_WARM_VARIANT_FARM_ANIMALS = create(key("spawns_warm_variant_farm_animals"));
/** /**
* {@code #minecraft:spawns_warm_variant_frogs} * {@code #minecraft:spawns_warm_variant_frogs}
* *

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#BLOCK}. * Vanilla tag keys for {@link RegistryKey#BLOCK}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class BlockTypeTagKeys { public final class BlockTypeTagKeys {
/** /**
@@ -223,6 +223,13 @@ public final class BlockTypeTagKeys {
*/ */
public static final TagKey<BlockType> CAMEL_SAND_STEP_SOUND_BLOCKS = create(key("camel_sand_step_sound_blocks")); public static final TagKey<BlockType> CAMEL_SAND_STEP_SOUND_BLOCKS = create(key("camel_sand_step_sound_blocks"));
/**
* {@code #minecraft:camels_spawnable_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CAMELS_SPAWNABLE_ON = create(key("camels_spawnable_on"));
/** /**
* {@code #minecraft:campfires} * {@code #minecraft:campfires}
* *
@@ -377,13 +384,6 @@ public final class BlockTypeTagKeys {
*/ */
public static final TagKey<BlockType> DARK_OAK_LOGS = create(key("dark_oak_logs")); public static final TagKey<BlockType> DARK_OAK_LOGS = create(key("dark_oak_logs"));
/**
* {@code #minecraft:dead_bush_may_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> DEAD_BUSH_MAY_PLACE_ON = create(key("dead_bush_may_place_on"));
/** /**
* {@code #minecraft:deepslate_ore_replaceables} * {@code #minecraft:deepslate_ore_replaceables}
* *
@@ -440,6 +440,20 @@ public final class BlockTypeTagKeys {
*/ */
public static final TagKey<BlockType> DRIPSTONE_REPLACEABLE_BLOCKS = create(key("dripstone_replaceable_blocks")); public static final TagKey<BlockType> DRIPSTONE_REPLACEABLE_BLOCKS = create(key("dripstone_replaceable_blocks"));
/**
* {@code #minecraft:dry_vegetation_may_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> DRY_VEGETATION_MAY_PLACE_ON = create(key("dry_vegetation_may_place_on"));
/**
* {@code #minecraft:edible_for_sheep}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> EDIBLE_FOR_SHEEP = create(key("edible_for_sheep"));
/** /**
* {@code #minecraft:emerald_ores} * {@code #minecraft:emerald_ores}
* *
@@ -566,6 +580,13 @@ public final class BlockTypeTagKeys {
*/ */
public static final TagKey<BlockType> GUARDED_BY_PIGLINS = create(key("guarded_by_piglins")); public static final TagKey<BlockType> GUARDED_BY_PIGLINS = create(key("guarded_by_piglins"));
/**
* {@code #minecraft:happy_ghast_avoids}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> HAPPY_GHAST_AVOIDS = create(key("happy_ghast_avoids"));
/** /**
* {@code #minecraft:hoglin_repellents} * {@code #minecraft:hoglin_repellents}
* *
@@ -951,6 +972,13 @@ public final class BlockTypeTagKeys {
*/ */
public static final TagKey<BlockType> REPLACEABLE = create(key("replaceable")); public static final TagKey<BlockType> REPLACEABLE = create(key("replaceable"));
/**
* {@code #minecraft:replaceable_by_mushrooms}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> REPLACEABLE_BY_MUSHROOMS = create(key("replaceable_by_mushrooms"));
/** /**
* {@code #minecraft:replaceable_by_trees} * {@code #minecraft:replaceable_by_trees}
* *
@@ -1147,6 +1175,13 @@ public final class BlockTypeTagKeys {
*/ */
public static final TagKey<BlockType> SWORD_EFFICIENT = create(key("sword_efficient")); public static final TagKey<BlockType> SWORD_EFFICIENT = create(key("sword_efficient"));
/**
* {@code #minecraft:sword_instantly_mines}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SWORD_INSTANTLY_MINES = create(key("sword_instantly_mines"));
/** /**
* {@code #minecraft:terracotta} * {@code #minecraft:terracotta}
* *
@@ -1168,6 +1203,27 @@ public final class BlockTypeTagKeys {
*/ */
public static final TagKey<BlockType> TRAPDOORS = create(key("trapdoors")); public static final TagKey<BlockType> TRAPDOORS = create(key("trapdoors"));
/**
* {@code #minecraft:triggers_ambient_desert_dry_vegetation_block_sounds}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> TRIGGERS_AMBIENT_DESERT_DRY_VEGETATION_BLOCK_SOUNDS = create(key("triggers_ambient_desert_dry_vegetation_block_sounds"));
/**
* {@code #minecraft:triggers_ambient_desert_sand_block_sounds}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> TRIGGERS_AMBIENT_DESERT_SAND_BLOCK_SOUNDS = create(key("triggers_ambient_desert_sand_block_sounds"));
/**
* {@code #minecraft:triggers_ambient_dried_ghast_block_sounds}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> TRIGGERS_AMBIENT_DRIED_GHAST_BLOCK_SOUNDS = create(key("triggers_ambient_dried_ghast_block_sounds"));
/** /**
* {@code #minecraft:underwater_bonemeals} * {@code #minecraft:underwater_bonemeals}
* *

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#DAMAGE_TYPE}. * Vanilla tag keys for {@link RegistryKey#DAMAGE_TYPE}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class DamageTypeTagKeys { public final class DamageTypeTagKeys {
/** /**

View File

@@ -12,7 +12,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#ENCHANTMENT}. * Vanilla tag keys for {@link RegistryKey#ENCHANTMENT}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -24,8 +24,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class EnchantmentTagKeys { public final class EnchantmentTagKeys {
/** /**

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#ENTITY_TYPE}. * Vanilla tag keys for {@link RegistryKey#ENTITY_TYPE}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class EntityTypeTagKeys { public final class EntityTypeTagKeys {
/** /**
@@ -83,6 +83,20 @@ public final class EntityTypeTagKeys {
*/ */
public static final TagKey<EntityType> CAN_BREATHE_UNDER_WATER = create(key("can_breathe_under_water")); public static final TagKey<EntityType> CAN_BREATHE_UNDER_WATER = create(key("can_breathe_under_water"));
/**
* {@code #minecraft:can_equip_harness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_EQUIP_HARNESS = create(key("can_equip_harness"));
/**
* {@code #minecraft:can_equip_saddle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_EQUIP_SADDLE = create(key("can_equip_saddle"));
/** /**
* {@code #minecraft:can_turn_in_boats} * {@code #minecraft:can_turn_in_boats}
* *
@@ -90,6 +104,13 @@ public final class EntityTypeTagKeys {
*/ */
public static final TagKey<EntityType> CAN_TURN_IN_BOATS = create(key("can_turn_in_boats")); public static final TagKey<EntityType> CAN_TURN_IN_BOATS = create(key("can_turn_in_boats"));
/**
* {@code #minecraft:can_wear_horse_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_WEAR_HORSE_ARMOR = create(key("can_wear_horse_armor"));
/** /**
* {@code #minecraft:deflects_projectiles} * {@code #minecraft:deflects_projectiles}
* *
@@ -111,6 +132,13 @@ public final class EntityTypeTagKeys {
*/ */
public static final TagKey<EntityType> FALL_DAMAGE_IMMUNE = create(key("fall_damage_immune")); public static final TagKey<EntityType> FALL_DAMAGE_IMMUNE = create(key("fall_damage_immune"));
/**
* {@code #minecraft:followable_friendly_mobs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> FOLLOWABLE_FRIENDLY_MOBS = create(key("followable_friendly_mobs"));
/** /**
* {@code #minecraft:freeze_hurts_extra_types} * {@code #minecraft:freeze_hurts_extra_types}
* *

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#FLUID}. * Vanilla tag keys for {@link RegistryKey#FLUID}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class FluidTagKeys { public final class FluidTagKeys {
/** /**

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#GAME_EVENT}. * Vanilla tag keys for {@link RegistryKey#GAME_EVENT}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class GameEventTagKeys { public final class GameEventTagKeys {
/** /**

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#INSTRUMENT}. * Vanilla tag keys for {@link RegistryKey#INSTRUMENT}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class InstrumentTagKeys { public final class InstrumentTagKeys {
/** /**

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#ITEM}. * Vanilla tag keys for {@link RegistryKey#ITEM}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class ItemTypeTagKeys { public final class ItemTypeTagKeys {
/** /**
@@ -118,6 +118,13 @@ public final class ItemTypeTagKeys {
*/ */
public static final TagKey<ItemType> BOATS = create(key("boats")); public static final TagKey<ItemType> BOATS = create(key("boats"));
/**
* {@code #minecraft:book_cloning_target}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> BOOK_CLONING_TARGET = create(key("book_cloning_target"));
/** /**
* {@code #minecraft:bookshelf_books} * {@code #minecraft:bookshelf_books}
* *
@@ -349,6 +356,13 @@ public final class ItemTypeTagKeys {
*/ */
public static final TagKey<ItemType> DYEABLE = create(key("dyeable")); public static final TagKey<ItemType> DYEABLE = create(key("dyeable"));
/**
* {@code #minecraft:eggs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> EGGS = create(key("eggs"));
/** /**
* {@code #minecraft:emerald_ores} * {@code #minecraft:emerald_ores}
* *
@@ -510,6 +524,13 @@ public final class ItemTypeTagKeys {
*/ */
public static final TagKey<ItemType> FISHES = create(key("fishes")); public static final TagKey<ItemType> FISHES = create(key("fishes"));
/**
* {@code #minecraft:flowers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> FLOWERS = create(key("flowers"));
/** /**
* {@code #minecraft:foot_armor} * {@code #minecraft:foot_armor}
* *
@@ -580,6 +601,27 @@ public final class ItemTypeTagKeys {
*/ */
public static final TagKey<ItemType> HANGING_SIGNS = create(key("hanging_signs")); public static final TagKey<ItemType> HANGING_SIGNS = create(key("hanging_signs"));
/**
* {@code #minecraft:happy_ghast_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> HAPPY_GHAST_FOOD = create(key("happy_ghast_food"));
/**
* {@code #minecraft:happy_ghast_tempt_items}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> HAPPY_GHAST_TEMPT_ITEMS = create(key("happy_ghast_tempt_items"));
/**
* {@code #minecraft:harnesses}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> HARNESSES = create(key("harnesses"));
/** /**
* {@code #minecraft:head_armor} * {@code #minecraft:head_armor}
* *

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#PAINTING_VARIANT}. * Vanilla tag keys for {@link RegistryKey#PAINTING_VARIANT}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class PaintingVariantTagKeys { public final class PaintingVariantTagKeys {
/** /**

View File

@@ -6,13 +6,12 @@ import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey; import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey; import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Key;
import org.bukkit.MinecraftExperimental;
import org.bukkit.generator.structure.Structure; import org.bukkit.generator.structure.Structure;
import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
/** /**
* Vanilla keys for {@link RegistryKey#STRUCTURE}. * Vanilla tag keys for {@link RegistryKey#STRUCTURE}.
* *
* @apiNote The fields provided here are a direct representation of * @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be * what is available from the vanilla game source. They may be
@@ -24,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused", "unused",
"SpellCheckingInspection" "SpellCheckingInspection"
}) })
@GeneratedFrom("1.21.4")
@NullMarked @NullMarked
@GeneratedFrom("1.21.6")
@ApiStatus.Experimental @ApiStatus.Experimental
public final class StructureTagKeys { public final class StructureTagKeys {
/** /**
@@ -75,8 +74,6 @@ public final class StructureTagKeys {
* *
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_DESERT_VILLAGE_MAPS = create(key("on_desert_village_maps")); public static final TagKey<Structure> ON_DESERT_VILLAGE_MAPS = create(key("on_desert_village_maps"));
/** /**
@@ -84,8 +81,6 @@ public final class StructureTagKeys {
* *
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_JUNGLE_EXPLORER_MAPS = create(key("on_jungle_explorer_maps")); public static final TagKey<Structure> ON_JUNGLE_EXPLORER_MAPS = create(key("on_jungle_explorer_maps"));
/** /**
@@ -100,8 +95,6 @@ public final class StructureTagKeys {
* *
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_PLAINS_VILLAGE_MAPS = create(key("on_plains_village_maps")); public static final TagKey<Structure> ON_PLAINS_VILLAGE_MAPS = create(key("on_plains_village_maps"));
/** /**
@@ -109,8 +102,6 @@ public final class StructureTagKeys {
* *
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SAVANNA_VILLAGE_MAPS = create(key("on_savanna_village_maps")); public static final TagKey<Structure> ON_SAVANNA_VILLAGE_MAPS = create(key("on_savanna_village_maps"));
/** /**
@@ -118,8 +109,6 @@ public final class StructureTagKeys {
* *
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SNOWY_VILLAGE_MAPS = create(key("on_snowy_village_maps")); public static final TagKey<Structure> ON_SNOWY_VILLAGE_MAPS = create(key("on_snowy_village_maps"));
/** /**
@@ -127,8 +116,6 @@ public final class StructureTagKeys {
* *
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SWAMP_EXPLORER_MAPS = create(key("on_swamp_explorer_maps")); public static final TagKey<Structure> ON_SWAMP_EXPLORER_MAPS = create(key("on_swamp_explorer_maps"));
/** /**
@@ -136,8 +123,6 @@ public final class StructureTagKeys {
* *
* @apiNote This field is version-dependant and may be removed in future Minecraft versions * @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/ */
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_TAIGA_VILLAGE_MAPS = create(key("on_taiga_village_maps")); public static final TagKey<Structure> ON_TAIGA_VILLAGE_MAPS = create(key("on_taiga_village_maps"));
/** /**

View File

@@ -289,7 +289,7 @@ public class TimingHistory {
final TicksRecord ticksRecord = new TicksRecord(); final TicksRecord ticksRecord = new TicksRecord();
final PingRecord pingRecord = new PingRecord(); final PingRecord pingRecord = new PingRecord();
final TimingData fst = TimingsManager.FULL_SERVER_TICK.minuteData.clone(); final TimingData fst = TimingsManager.FULL_SERVER_TICK.minuteData.clone();
final double tps = 1E9 / ( System.nanoTime() - lastMinuteTime ) * ticksRecord.timed; final double tps = 1E9 / (System.nanoTime() - lastMinuteTime) * ticksRecord.timed;
final double usedMemory = TimingsManager.FULL_SERVER_TICK.avgUsedMemory; final double usedMemory = TimingsManager.FULL_SERVER_TICK.avgUsedMemory;
final double freeMemory = TimingsManager.FULL_SERVER_TICK.avgFreeMemory; final double freeMemory = TimingsManager.FULL_SERVER_TICK.avgFreeMemory;
final double loadAvg = ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage(); final double loadAvg = ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage();

View File

@@ -153,7 +153,7 @@ public final class TimingsManager {
public static Timing getCommandTiming(@Nullable String pluginName, @NotNull Command command) { public static Timing getCommandTiming(@Nullable String pluginName, @NotNull Command command) {
Plugin plugin = null; Plugin plugin = null;
final Server server = Bukkit.getServer(); final Server server = Bukkit.getServer();
if (!( server == null || pluginName == null || if (!(server == null || pluginName == null ||
"minecraft".equals(pluginName) || "bukkit".equals(pluginName) || "minecraft".equals(pluginName) || "bukkit".equals(pluginName) ||
"spigot".equalsIgnoreCase(pluginName) || "paper".equals(pluginName) "spigot".equalsIgnoreCase(pluginName) || "paper".equals(pluginName)
)) { )) {

View File

@@ -5,10 +5,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

View File

@@ -317,7 +317,7 @@ public class MaterialTags {
*/ */
public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs")) public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs"))
.endsWith("_SPAWN_EGG") .endsWith("_SPAWN_EGG")
.ensureSize("SPAWN_EGGS", 81).lock(); .ensureSize("SPAWN_EGGS", 82).lock();
/** /**
* Covers all colors of stained glass. * Covers all colors of stained glass.
@@ -568,8 +568,8 @@ public class MaterialTags {
Material.FLINT_AND_STEEL, Material.CARROT_ON_A_STICK, Material.WARPED_FUNGUS_ON_A_STICK, Material.FLINT_AND_STEEL, Material.CARROT_ON_A_STICK, Material.WARPED_FUNGUS_ON_A_STICK,
Material.BRUSH, Material.CARVED_PUMPKIN, Material.COMPASS, Material.SKELETON_SKULL, Material.BRUSH, Material.CARVED_PUMPKIN, Material.COMPASS, Material.SKELETON_SKULL,
Material.WITHER_SKELETON_SKULL, Material.PLAYER_HEAD, Material.ZOMBIE_HEAD, Material.WITHER_SKELETON_SKULL, Material.PLAYER_HEAD, Material.ZOMBIE_HEAD,
Material.CREEPER_HEAD, Material.DRAGON_HEAD, Material.PIGLIN_HEAD) Material.CREEPER_HEAD, Material.DRAGON_HEAD, Material.PIGLIN_HEAD, Material.MACE)
.ensureSize("ENCHANTABLE", 75).lock(); .ensureSize("ENCHANTABLE", 76).lock();
/** /**
* Covers the variants of raw ores. * Covers the variants of raw ores.

View File

@@ -5,6 +5,7 @@ import java.util.Locale;
import java.util.UUID; import java.util.UUID;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
/** /**
@@ -31,10 +32,10 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
* compatibility measures. * compatibility measures.
*/ */
public static final String BUKKIT = "bukkit"; public static final String BUKKIT = "bukkit";
//
private static final Pattern VALID_NAMESPACE = Pattern.compile("[a-z0-9._-]+"); private static final Pattern VALID_NAMESPACE = Pattern.compile("[a-z0-9._-]+");
private static final Pattern VALID_KEY = Pattern.compile("[a-z0-9/._-]+"); private static final Pattern VALID_KEY = Pattern.compile("[a-z0-9/._-]+");
//
private final String namespace; private final String namespace;
private final String key; private final String key;
@@ -126,6 +127,7 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
* @deprecated should never be used by plugins, for internal use only!! * @deprecated should never be used by plugins, for internal use only!!
*/ */
@Deprecated @Deprecated
@ApiStatus.Internal
public static NamespacedTag randomKey() { public static NamespacedTag randomKey() {
return new NamespacedTag(BUKKIT, UUID.randomUUID().toString()); return new NamespacedTag(BUKKIT, UUID.randomUUID().toString());
} }

View File

@@ -1,6 +1,6 @@
package com.destroystokyo.paper.entity.ai; package com.destroystokyo.paper.entity.ai;
import com.google.common.base.Objects; import java.util.Objects;
import java.util.StringJoiner; import java.util.StringJoiner;
import org.bukkit.NamespacedKey; import org.bukkit.NamespacedKey;
import org.bukkit.entity.Mob; import org.bukkit.entity.Mob;
@@ -15,45 +15,46 @@ import org.jspecify.annotations.Nullable;
@NullMarked @NullMarked
public final class GoalKey<T extends Mob> { public final class GoalKey<T extends Mob> {
private final Class<T> entityClass; private final Class<T> type;
private final NamespacedKey namespacedKey; private final NamespacedKey key;
private GoalKey(Class<T> entityClass, NamespacedKey namespacedKey) { private GoalKey(Class<T> type, NamespacedKey key) {
this.entityClass = entityClass; this.type = type;
this.namespacedKey = namespacedKey; this.key = key;
} }
public Class<T> getEntityClass() { public Class<T> getEntityClass() {
return this.entityClass; return this.type;
} }
public NamespacedKey getNamespacedKey() { public NamespacedKey getNamespacedKey() {
return this.namespacedKey; return this.key;
} }
@Override @Override
public boolean equals(@Nullable Object o) { public boolean equals(@Nullable Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || this.getClass() != o.getClass()) return false; if (o == null || this.getClass() != o.getClass()) return false;
GoalKey<?> goalKey = (GoalKey<?>) o; GoalKey<?> goalKey = (GoalKey<?>) o;
return Objects.equal(this.entityClass, goalKey.entityClass) && return Objects.equals(this.type, goalKey.type) &&
Objects.equal(this.namespacedKey, goalKey.namespacedKey); Objects.equals(this.key, goalKey.key);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hashCode(this.entityClass, this.namespacedKey); return Objects.hash(this.type, this.key);
} }
@Override @Override
public String toString() { public String toString() {
return new StringJoiner(", ", GoalKey.class.getSimpleName() + "[", "]") return new StringJoiner(", ", GoalKey.class.getSimpleName() + "[", "]")
.add("entityClass=" + this.entityClass) .add("type=" + this.type)
.add("namespacedKey=" + this.namespacedKey) .add("key=" + this.key)
.toString(); .toString();
} }
public static <A extends Mob> GoalKey<A> of(Class<A> entityClass, NamespacedKey namespacedKey) { public static <A extends Mob> GoalKey<A> of(Class<A> type, NamespacedKey key) {
return new GoalKey<>(entityClass, namespacedKey); return new GoalKey<>(type, key);
} }
} }

View File

@@ -24,8 +24,8 @@ public class BeaconEffectEvent extends BlockEvent implements Cancellable {
private boolean cancelled; private boolean cancelled;
@ApiStatus.Internal @ApiStatus.Internal
public BeaconEffectEvent(final Block block, final PotionEffect effect, final Player player, final boolean primary) { public BeaconEffectEvent(final Block beacon, final PotionEffect effect, final Player player, final boolean primary) {
super(block); super(beacon);
this.effect = effect; this.effect = effect;
this.player = player; this.player = player;
this.primary = primary; this.primary = primary;

View File

@@ -11,7 +11,7 @@ import org.jspecify.annotations.NullMarked;
/** /**
* Fired anytime the server intends to 'destroy' a block through some triggering reason. * Fired anytime the server intends to 'destroy' a block through some triggering reason.
* This does not fire anytime a block is set to air, but only with more direct triggers such * This does not fire anytime a block is set to air, but only with more direct triggers such
* as physics updates, pistons, Entities changing blocks, commands set to "Destroy". * as physics updates, pistons, entities changing blocks, commands set to "Destroy".
* <p> * <p>
* This event is associated with the game playing a sound effect at the block in question, when * This event is associated with the game playing a sound effect at the block in question, when
* something can be described as "intend to destroy what is there", * something can be described as "intend to destroy what is there",
@@ -39,7 +39,7 @@ public class BlockDestroyEvent extends BlockExpEvent implements Cancellable {
} }
/** /**
* Get the effect that will be played when the block is broken. * Gets the effect that will be played when the block is broken.
* *
* @return block break effect * @return block break effect
*/ */

View File

@@ -33,8 +33,8 @@ public class TNTPrimeEvent extends BlockEvent implements Cancellable {
private boolean cancelled; private boolean cancelled;
@ApiStatus.Internal @ApiStatus.Internal
public TNTPrimeEvent(@NotNull Block theBlock, @NotNull PrimeReason reason, @Nullable Entity primerEntity) { public TNTPrimeEvent(@NotNull Block block, @NotNull PrimeReason reason, @Nullable Entity primerEntity) {
super(theBlock); super(block);
this.reason = reason; this.reason = reason;
this.primerEntity = primerEntity; this.primerEntity = primerEntity;
} }

View File

@@ -27,7 +27,9 @@ public class EndermanEscapeEvent extends EntityEvent implements Cancellable {
} }
/** /**
* @return The reason the enderman is trying to escape * Gets the reason the enderman is trying to escape.
*
* @return The reason
*/ */
public Reason getReason() { public Reason getReason() {
return this.reason; return this.reason;
@@ -42,7 +44,8 @@ public class EndermanEscapeEvent extends EntityEvent implements Cancellable {
* Cancels the escape. * Cancels the escape.
* <p> * <p>
* If this escape normally had resulted in damage avoidance such as indirect, * If this escape normally had resulted in damage avoidance such as indirect,
* the enderman will now take damage. * the enderman will now take damage. However, this does not change the Enderman's
* innate immunities or damage behavior like arrows where the damage never happens.
*/ */
@Override @Override
public void setCancelled(final boolean cancel) { public void setCancelled(final boolean cancel) {
@@ -76,7 +79,7 @@ public class EndermanEscapeEvent extends EntityEvent implements Cancellable {
*/ */
STARE, STARE,
/** /**
* Specific case for {@link #CRITICAL_HIT} where the enderman is taking rain damage * Specific case for {@link #CRITICAL_HIT} where the enderman is taking damage by drowning (ex: rain)
*/ */
DROWN DROWN
} }

View File

@@ -1,6 +1,5 @@
package com.destroystokyo.paper.event.entity; package com.destroystokyo.paper.event.entity;
import com.google.common.collect.ImmutableList;
import java.util.List; import java.util.List;
import org.bukkit.entity.HumanEntity; import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.SkeletonHorse; import org.bukkit.entity.SkeletonHorse;
@@ -21,12 +20,6 @@ public class SkeletonHorseTrapEvent extends EntityEvent implements Cancellable {
private final List<HumanEntity> eligibleHumans; private final List<HumanEntity> eligibleHumans;
private boolean cancelled; private boolean cancelled;
@Deprecated
@ApiStatus.Internal
public SkeletonHorseTrapEvent(final SkeletonHorse horse) {
this(horse, ImmutableList.of());
}
@ApiStatus.Internal @ApiStatus.Internal
public SkeletonHorseTrapEvent(final SkeletonHorse horse, final List<HumanEntity> eligibleHumans) { public SkeletonHorseTrapEvent(final SkeletonHorse horse, final List<HumanEntity> eligibleHumans) {
super(horse); super(horse);

View File

@@ -1,54 +0,0 @@
package com.destroystokyo.paper.event.executor;
import com.destroystokyo.paper.util.SneakyThrow;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Method;
import org.bukkit.event.Event;
import org.bukkit.event.EventException;
import org.bukkit.event.Listener;
import org.bukkit.plugin.EventExecutor;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
@ApiStatus.Internal
@NullMarked
public class MethodHandleEventExecutor implements EventExecutor {
private final Class<? extends Event> eventClass;
private final MethodHandle handle;
private final @Nullable Method method;
public MethodHandleEventExecutor(final Class<? extends Event> eventClass, final MethodHandle handle) {
this.eventClass = eventClass;
this.handle = handle;
this.method = null;
}
public MethodHandleEventExecutor(final Class<? extends Event> eventClass, final Method m) {
this.eventClass = eventClass;
try {
m.setAccessible(true);
this.handle = MethodHandles.lookup().unreflect(m);
} catch (final IllegalAccessException e) {
throw new AssertionError("Unable to set accessible", e);
}
this.method = m;
}
@Override
public void execute(final Listener listener, final Event event) throws EventException {
if (!this.eventClass.isInstance(event)) return;
try {
this.handle.invoke(listener, event);
} catch (final Throwable t) {
SneakyThrow.sneaky(t);
}
}
@Override
public String toString() {
return "MethodHandleEventExecutor['" + this.method + "']";
}
}

View File

@@ -1,51 +0,0 @@
package com.destroystokyo.paper.event.executor;
import com.destroystokyo.paper.util.SneakyThrow;
import com.google.common.base.Preconditions;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import org.bukkit.event.Event;
import org.bukkit.event.EventException;
import org.bukkit.event.Listener;
import org.bukkit.plugin.EventExecutor;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@ApiStatus.Internal
@NullMarked
public class StaticMethodHandleEventExecutor implements EventExecutor {
private final Class<? extends Event> eventClass;
private final MethodHandle handle;
private final Method method;
public StaticMethodHandleEventExecutor(final Class<? extends Event> eventClass, final Method m) {
Preconditions.checkArgument(Modifier.isStatic(m.getModifiers()), "Not a static method: %s", m);
Preconditions.checkArgument(eventClass != null, "eventClass is null");
this.eventClass = eventClass;
try {
m.setAccessible(true);
this.handle = MethodHandles.lookup().unreflect(m);
} catch (final IllegalAccessException e) {
throw new AssertionError("Unable to set accessible", e);
}
this.method = m;
}
@Override
public void execute(final Listener listener, final Event event) throws EventException {
if (!this.eventClass.isInstance(event)) return;
try {
this.handle.invoke(event);
} catch (final Throwable throwable) {
SneakyThrow.sneaky(throwable);
}
}
@Override
public String toString() {
return "StaticMethodHandleEventExecutor['" + this.method + "']";
}
}

View File

@@ -1,59 +0,0 @@
package com.destroystokyo.paper.event.executor.asm;
import java.lang.reflect.Method;
import java.util.concurrent.atomic.AtomicInteger;
import org.bukkit.plugin.EventExecutor;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Type;
import org.objectweb.asm.commons.GeneratorAdapter;
import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static org.objectweb.asm.Opcodes.INVOKEINTERFACE;
import static org.objectweb.asm.Opcodes.INVOKESPECIAL;
import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL;
import static org.objectweb.asm.Opcodes.V1_8;
@ApiStatus.Internal
@NullMarked
public final class ASMEventExecutorGenerator {
private static final String EXECUTE_DESCRIPTOR = "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V";
public static byte[] generateEventExecutor(final Method m, final String name) {
final ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
writer.visit(V1_8, ACC_PUBLIC, name.replace('.', '/'), null, Type.getInternalName(Object.class), new String[]{Type.getInternalName(EventExecutor.class)});
// Generate constructor
GeneratorAdapter methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null), ACC_PUBLIC, "<init>", "()V");
methodGenerator.loadThis();
methodGenerator.visitMethodInsn(INVOKESPECIAL, Type.getInternalName(Object.class), "<init>", "()V", false); // Invoke the super class (Object) constructor
methodGenerator.returnValue();
methodGenerator.endMethod();
// Generate the execute method
methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "execute", EXECUTE_DESCRIPTOR, null, null), ACC_PUBLIC, "execute", EXECUTE_DESCRIPTOR);
methodGenerator.loadArg(0);
methodGenerator.checkCast(Type.getType(m.getDeclaringClass()));
methodGenerator.loadArg(1);
methodGenerator.checkCast(Type.getType(m.getParameterTypes()[0]));
methodGenerator.visitMethodInsn(m.getDeclaringClass().isInterface() ? INVOKEINTERFACE : INVOKEVIRTUAL, Type.getInternalName(m.getDeclaringClass()), m.getName(), Type.getMethodDescriptor(m), m.getDeclaringClass().isInterface());
// The only purpose of this switch statement is to generate the correct pop instruction, should the event handler method return something other than void.
// Non-void event handlers will be unsupported in a future release.
switch (Type.getType(m.getReturnType()).getSize()) {
// case 0 is omitted because the only type that has size 0 is void - no pop instruction needed.
case 1 -> methodGenerator.pop(); // handles reference types and most primitives
case 2 -> methodGenerator.pop2(); // handles long and double
}
methodGenerator.returnValue();
methodGenerator.endMethod();
writer.visitEnd();
return writer.toByteArray();
}
public static AtomicInteger NEXT_ID = new AtomicInteger(1);
public static String generateName() {
final int id = NEXT_ID.getAndIncrement();
return "com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor" + id;
}
}

View File

@@ -1,35 +0,0 @@
package com.destroystokyo.paper.event.executor.asm;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@ApiStatus.Internal
@NullMarked
public interface ClassDefiner {
/**
* Returns if the defined classes can bypass access checks
*
* @return if classes bypass access checks
*/
default boolean isBypassAccessChecks() {
return false;
}
/**
* Define a class
*
* @param parentLoader the parent classloader
* @param name the name of the class
* @param data the class data to load
* @return the defined class
* @throws ClassFormatError if the class data is invalid
* @throws NullPointerException if any of the arguments are null
*/
Class<?> defineClass(ClassLoader parentLoader, String name, byte[] data);
static ClassDefiner getInstance() {
return SafeClassDefiner.INSTANCE;
}
}

View File

@@ -1,66 +0,0 @@
package com.destroystokyo.paper.event.executor.asm;
import com.google.common.base.Preconditions;
import com.google.common.collect.MapMaker;
import java.util.concurrent.ConcurrentMap;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@ApiStatus.Internal
@NullMarked
public class SafeClassDefiner implements ClassDefiner {
/* default */ static final SafeClassDefiner INSTANCE = new SafeClassDefiner();
private SafeClassDefiner() {
}
private final ConcurrentMap<ClassLoader, GeneratedClassLoader> loaders = new MapMaker().weakKeys().makeMap();
@Override
public Class<?> defineClass(final ClassLoader parentLoader, final String name, final byte[] data) {
final GeneratedClassLoader loader = this.loaders.computeIfAbsent(parentLoader, GeneratedClassLoader::new);
synchronized (loader.getClassLoadingLock(name)) {
Preconditions.checkState(!loader.hasClass(name), "%s already defined", name);
final Class<?> c = loader.define(name, data);
assert c.getName().equals(name);
return c;
}
}
private static class GeneratedClassLoader extends ClassLoader {
static {
ClassLoader.registerAsParallelCapable();
}
protected GeneratedClassLoader(final ClassLoader parent) {
super(parent);
}
private Class<?> define(final String name, final byte[] data) {
synchronized (this.getClassLoadingLock(name)) {
assert !this.hasClass(name);
final Class<?> c = this.defineClass(name, data, 0, data.length);
this.resolveClass(c);
return c;
}
}
@Override
public Object getClassLoadingLock(final String name) {
return super.getClassLoadingLock(name);
}
public boolean hasClass(final String name) {
synchronized (this.getClassLoadingLock(name)) {
try {
Class.forName(name);
return true;
} catch (final ClassNotFoundException e) {
return false;
}
}
}
}
}

View File

@@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
/** /**
* @deprecated Not used * @deprecated Not used
*/ */
@Deprecated(since = "1.16.4") @Deprecated(since = "1.16.4", forRemoval = true)
public class IllegalPacketEvent extends PlayerEvent { public class IllegalPacketEvent extends PlayerEvent {
private static final HandlerList HANDLER_LIST = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();

View File

@@ -5,6 +5,7 @@ import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent; import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
@@ -16,8 +17,10 @@ import static org.bukkit.Material.*;
* Called when the player themselves change their armor items * Called when the player themselves change their armor items
* <p> * <p>
* Not currently called for environmental factors though it <strong>MAY BE IN THE FUTURE</strong> * Not currently called for environmental factors though it <strong>MAY BE IN THE FUTURE</strong>
* @apiNote Use {@link io.papermc.paper.event.entity.EntityEquipmentChangedEvent} for all entity equipment changes
*/ */
@NullMarked @NullMarked
@ApiStatus.Obsolete(since = "1.21.4")
public class PlayerArmorChangeEvent extends PlayerEvent { public class PlayerArmorChangeEvent extends PlayerEvent {
private static final HandlerList HANDLER_LIST = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
@@ -38,11 +41,27 @@ public class PlayerArmorChangeEvent extends PlayerEvent {
* Gets the type of slot being altered. * Gets the type of slot being altered.
* *
* @return type of slot being altered * @return type of slot being altered
* @deprecated {@link SlotType} does not accurately represent what item types are valid in each slot. Use {@link #getSlot()} instead.
*/ */
@Deprecated(since = "1.21.4")
public SlotType getSlotType() { public SlotType getSlotType() {
return this.slotType; return this.slotType;
} }
/**
* Gets the slot being altered.
*
* @return slot being altered
*/
public EquipmentSlot getSlot() {
return switch (this.slotType) {
case HEAD -> EquipmentSlot.HEAD;
case CHEST -> EquipmentSlot.CHEST;
case LEGS -> EquipmentSlot.LEGS;
case FEET -> EquipmentSlot.FEET;
};
}
/** /**
* Gets the existing item that's being replaced * Gets the existing item that's being replaced
* *
@@ -70,6 +89,10 @@ public class PlayerArmorChangeEvent extends PlayerEvent {
return HANDLER_LIST; return HANDLER_LIST;
} }
/**
* @deprecated {@link SlotType} does not accurately represent what item types are valid in each slot.
*/
@Deprecated(since = "1.21.4")
public enum SlotType { public enum SlotType {
HEAD(NETHERITE_HELMET, DIAMOND_HELMET, GOLDEN_HELMET, IRON_HELMET, CHAINMAIL_HELMET, LEATHER_HELMET, CARVED_PUMPKIN, PLAYER_HEAD, SKELETON_SKULL, ZOMBIE_HEAD, CREEPER_HEAD, WITHER_SKELETON_SKULL, TURTLE_HELMET, DRAGON_HEAD, PIGLIN_HEAD), HEAD(NETHERITE_HELMET, DIAMOND_HELMET, GOLDEN_HELMET, IRON_HELMET, CHAINMAIL_HELMET, LEATHER_HELMET, CARVED_PUMPKIN, PLAYER_HEAD, SKELETON_SKULL, ZOMBIE_HEAD, CREEPER_HEAD, WITHER_SKELETON_SKULL, TURTLE_HELMET, DRAGON_HEAD, PIGLIN_HEAD),
CHEST(NETHERITE_CHESTPLATE, DIAMOND_CHESTPLATE, GOLDEN_CHESTPLATE, IRON_CHESTPLATE, CHAINMAIL_CHESTPLATE, LEATHER_CHESTPLATE, ELYTRA), CHEST(NETHERITE_CHESTPLATE, DIAMOND_CHESTPLATE, GOLDEN_CHESTPLATE, IRON_CHESTPLATE, CHAINMAIL_CHESTPLATE, LEATHER_CHESTPLATE, ELYTRA),

View File

@@ -30,20 +30,6 @@ public class PlayerClientOptionsChangeEvent extends PlayerEvent {
private final boolean textFilteringEnabled; private final boolean textFilteringEnabled;
private final ParticleVisibility particleVisibility; private final ParticleVisibility particleVisibility;
@Deprecated
public PlayerClientOptionsChangeEvent(final Player player, final String locale, final int viewDistance, final ChatVisibility chatVisibility, final boolean chatColors, final SkinParts skinParts, final MainHand mainHand) {
super(player);
this.locale = locale;
this.viewDistance = viewDistance;
this.chatVisibility = chatVisibility;
this.chatColors = chatColors;
this.skinparts = skinParts;
this.mainHand = mainHand;
this.allowsServerListings = false;
this.textFilteringEnabled = false;
this.particleVisibility = ParticleVisibility.ALL;
}
@ApiStatus.Internal @ApiStatus.Internal
public PlayerClientOptionsChangeEvent(final Player player, final Map<ClientOption<?>, ?> options) { public PlayerClientOptionsChangeEvent(final Player player, final Map<ClientOption<?>, ?> options) {
super(player); super(player);

View File

@@ -50,32 +50,6 @@ public class PlayerHandshakeEvent extends Event implements Cancellable {
this.cancelled = cancelled; this.cancelled = cancelled;
} }
/**
* Determines if this event is cancelled.
* <p>
* When this event is cancelled, custom handshake logic will not
* be processed.
*
* @return {@code true} if this event is cancelled, {@code false} otherwise
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Sets if this event is cancelled.
* <p>
* When this event is cancelled, custom handshake logic will not
* be processed.
*
* @param cancel {@code true} if this event is cancelled, {@code false} otherwise
*/
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
/** /**
* Gets the original handshake string. * Gets the original handshake string.
* *
@@ -246,6 +220,32 @@ public class PlayerHandshakeEvent extends Event implements Cancellable {
this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage)); this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage));
} }
/**
* Determines if this event is cancelled.
* <p>
* When this event is cancelled, custom handshake logic will not
* be processed.
*
* @return {@code true} if this event is cancelled, {@code false} otherwise
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Sets if this event is cancelled.
* <p>
* When this event is cancelled, custom handshake logic will not
* be processed.
*
* @param cancel {@code true} if this event is cancelled, {@code false} otherwise
*/
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override @Override
public HandlerList getHandlers() { public HandlerList getHandlers() {
return HANDLER_LIST; return HANDLER_LIST;

View File

@@ -37,7 +37,7 @@ public class PlayerJumpEvent extends PlayerEvent implements Cancellable {
/** /**
* {@inheritDoc} * {@inheritDoc}
* <p> * <p>
* If a jump event is cancelled, the player will be moved or * If this event is cancelled, the player will be moved or
* teleported back to the Location as defined by {@link #getFrom()}. This will not * teleported back to the Location as defined by {@link #getFrom()}. This will not
* fire an event * fire an event
* *
@@ -51,7 +51,7 @@ public class PlayerJumpEvent extends PlayerEvent implements Cancellable {
/** /**
* {@inheritDoc} * {@inheritDoc}
* <p> * <p>
* If a jump event is cancelled, the player will be moved or * If this event is cancelled, the player will be moved or
* teleported back to the Location as defined by {@link #getFrom()}. This will not * teleported back to the Location as defined by {@link #getFrom()}. This will not
* fire an event * fire an event
* *

View File

@@ -1,9 +1,10 @@
package com.destroystokyo.paper.event.player; package com.destroystokyo.paper.event.player;
import io.papermc.paper.event.player.AbstractRespawnEvent;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent; import org.bukkit.event.player.PlayerRespawnEvent;
import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.NullMarked;
@@ -11,36 +12,31 @@ import org.jspecify.annotations.NullMarked;
* Fired after a player has respawned * Fired after a player has respawned
*/ */
@NullMarked @NullMarked
public class PlayerPostRespawnEvent extends PlayerEvent { public class PlayerPostRespawnEvent extends AbstractRespawnEvent {
private static final HandlerList HANDLER_LIST = new HandlerList(); private static final HandlerList HANDLER_LIST = new HandlerList();
private final Location respawnedLocation;
private final boolean isBedSpawn;
@ApiStatus.Internal @ApiStatus.Internal
public PlayerPostRespawnEvent(final Player respawnPlayer, final Location respawnedLocation, final boolean isBedSpawn) { public PlayerPostRespawnEvent(
super(respawnPlayer); final Player respawnPlayer,
this.respawnedLocation = respawnedLocation; final Location respawnLocation,
this.isBedSpawn = isBedSpawn; final boolean isBedSpawn,
final boolean isAnchorSpawn,
final boolean missingRespawnBlock,
final PlayerRespawnEvent.RespawnReason respawnReason
) {
super(respawnPlayer, respawnLocation, isBedSpawn, isAnchorSpawn, missingRespawnBlock, respawnReason);
} }
/** /**
* Returns the location of the respawned player * Returns the location of the respawned player.
* *
* @return location of the respawned player * @return location of the respawned player
* @see #getRespawnLocation()
*/ */
@ApiStatus.Obsolete
public Location getRespawnedLocation() { public Location getRespawnedLocation() {
return this.respawnedLocation.clone(); return super.getRespawnLocation();
}
/**
* Checks if the player respawned to their bed
*
* @return whether the player respawned to their bed
*/
public boolean isBedSpawn() {
return this.isBedSpawn;
} }
@Override @Override

View File

@@ -109,7 +109,7 @@ public class PlayerSetSpawnEvent extends PlayerEvent implements Cancellable {
/** /**
* Gets the notification message that will be sent to the player * Gets the notification message that will be sent to the player
* if {@link #willNotifyPlayer()} returns true. * if {@link #willNotifyPlayer()} returns {@code true}.
* *
* @return {@code null} if no notification * @return {@code null} if no notification
*/ */

View File

@@ -11,7 +11,7 @@ import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* Represents an event that is called when a player right-clicks an unknown entity. * Represents an event that is called when a player clicks an unknown entity.
* Useful for plugins dealing with virtual entities (entities that aren't actually spawned on the server). * Useful for plugins dealing with virtual entities (entities that aren't actually spawned on the server).
* <br> * <br>
* This event may be called multiple times per interaction with different interaction hands * This event may be called multiple times per interaction with different interaction hands

View File

@@ -50,12 +50,6 @@ public class ProfileWhitelistVerifyEvent extends Event {
private boolean whitelisted; private boolean whitelisted;
private @Nullable Component kickMessage; private @Nullable Component kickMessage;
@Deprecated
@ApiStatus.Internal
public ProfileWhitelistVerifyEvent(final PlayerProfile profile, final boolean whitelistEnabled, final boolean whitelisted, final boolean isOp, final @Nullable String kickMessage) {
this(profile, whitelistEnabled, whitelisted, isOp, kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage));
}
@ApiStatus.Internal @ApiStatus.Internal
public ProfileWhitelistVerifyEvent(final PlayerProfile profile, final boolean whitelistEnabled, final boolean whitelisted, final boolean isOp, final @Nullable Component kickMessage) { public ProfileWhitelistVerifyEvent(final PlayerProfile profile, final boolean whitelistEnabled, final boolean whitelisted, final boolean isOp, final @Nullable Component kickMessage) {
this.profile = profile; this.profile = profile;

View File

@@ -119,7 +119,7 @@ public class AsyncTabCompleteEvent extends Event implements Cancellable {
* the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])} * the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])}
* or current player names will not be called. * or current player names will not be called.
* <p> * <p>
* The passed collection will be cloned to a new {@code List}. You must call {{@link #getCompletions()}} to mutate from here * The passed collection will be cloned to a new {@code List}. You must call {@link #getCompletions()} to mutate from here
* *
* @param completions the new completions * @param completions the new completions
*/ */

View File

@@ -55,18 +55,6 @@ public class PaperServerListPingEvent extends ServerListPingEvent implements Can
private boolean originalPlayerCount = true; private boolean originalPlayerCount = true;
private Object[] players; private Object[] players;
@Deprecated
@ApiStatus.Internal
public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, int numPlayers, int maxPlayers,
@NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
super("", client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
this.client = client;
this.numPlayers = numPlayers;
this.version = version;
this.protocolVersion = protocolVersion;
setServerIcon(favicon);
}
@ApiStatus.Internal @ApiStatus.Internal
public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, int numPlayers, int maxPlayers, public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, int numPlayers, int maxPlayers,
@NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) { @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {

Some files were not shown because too many files have changed in this diff Show More