Compare commits

..
Author SHA1 Message Date
99-i 76d2ac758c [ci skip] Fix AreaEffectCloud doc comments (#13926) 2026-06-03 19:31:16 +02:00
Pedro 20938c7217 Set Obsolete the use of PotionMeta in Potion entities (#13892) 2026-06-03 19:31:07 +02:00
Pedro ca5e948ace Fix override of new item for Firework entity (#13891) 2026-06-03 19:30:57 +02:00
Nassim Jahnke e2c7e5cff2 Limit projectiles size 2026-06-03 19:30:24 +02:00
Bjarne Koll d4fe85375a [ci skip] Move paperweight and mache to non snapshots
Paper was previously depending on snapshots of paperweight and,
indirectly through the mache build, sculptor and codebook.

As we prepare work on 26.2, a new snapshot cycle for some of these tools
is required and 26.1.x cannot keep depending on them.
2026-06-02 20:08:53 +02:00
Martijn 3580fa4066 Use internal block to item conversion for flower pots (#13880) 2026-06-02 13:55:17 +02:00
Warrior 10a73fe40f Add and clarify Attribute#getDefaultValue (#13345) 2026-05-31 19:07:56 +02:00
roro1506HD 34cf3ab0f9 Fix loot tables being reset before death event (#13886) 2026-05-26 17:00:28 +02:00
Bjarne KollandLulu13022002 fd45f4b2e3 Upgrade to vineflower 12.0.0 (#13882)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-05-22 10:45:39 +01:00
Shane Freeder 5c917dabab [ci skip] Fixed accidently test plugin changes 2026-05-16 23:34:09 +01:00
Shane Freeder 2186e1e407 Fix BlockRecieveGameEvent destination block 2026-05-16 23:31:38 +01:00
Nassim Jahnke 711c5de2b0 Add counting ops 2026-05-11 08:56:48 +02:00
Pedro 687ba1e391 Adds missing deprecation for Player#boostElytra (#13088) 2026-05-10 14:34:55 -04:00
Nassim Jahnke 8dea6f1761 Fork friendly byte buf correctly 2026-05-08 19:19:07 +02:00
Alejandro Nieto b4682bfef6 Fix clicked items disappearing when player dies (#13002) 2026-05-04 08:23:40 +02:00
Warrior b685281d74 [ci skip] Mention documenting new config options in CONTRIBUTING.md (#13664) 2026-05-03 16:43:03 -04:00
Lulu13022002 b8b4a1c7cd Update Player#getClientViewDistance (#13530) 2026-05-03 16:40:33 -04:00
Lulu13022002 11dbf11014 Call BlockRedstoneEvent for more interactions (#12206) 2026-05-03 16:38:16 -04:00
Nassim Jahnke 39bd1bac06 [ci skip] Rebuild patches 2026-05-03 21:23:19 +02:00
Harry afea65c2d2 Fix leash event for boats and elytra (#13697) 2026-05-03 12:47:36 -04:00
masmc05 1835b0468f Call AsyncPlayerPreLoginEvent/AsyncPlayerConnectionConfigureEvent on virtual threads (#13816) 2026-05-03 12:46:14 -04:00
Owen b80b604636 fix: Attack strength ticker cooldown incorrectly reset (#13856) 2026-05-03 12:38:13 -04:00
Pedro 6048c2d97c Fix LivingEntity#knockback ignored when its Player (#13842) 2026-05-03 12:38:02 -04:00
Lulu13022002 2e7bb166b1 Deprecate dyes custom tag in favour of vanilla tag (#13855) 2026-05-03 12:14:01 -04:00
Nassim Jahnke 39a1aa5c7f Promote build channel to stable 2026-04-30 18:21:45 +02:00
𝑩𝒊𝒒𝒖𝒂𝒕𝒆𝒓𝒏𝒊𝒐𝒏𝒔 174eab0192 Update Improve exact choice recipe ingredients (#13788) 2026-04-29 08:08:28 +00:00
masmc05 5d62ec0ed9 Prevent spawn location getters from allowing making the location invalid (#13831) 2026-04-27 17:52:49 +01:00
masmc05 17524d0ee0 Add precondition to spawn location setter in spawn events (#13830) 2026-04-27 16:56:47 +01:00
Jason Penilla 7799bf28ae Update Paperclip to v3.0.4
Updates Java runtime version check
2026-04-26 13:58:31 -07:00
Coredex 55be6c0ef5 Fix boat and minecart inventories on region switch [ci skip] (#13826) 2026-04-26 16:01:07 -04:00
Nassim Jahnke 5dc4afc1dd Promote build channel to BETA 2026-04-26 20:20:48 +02:00
PedroandLulu13022002 f4e769a74d Improvements checks for arguments numbers (#13290)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-04-26 17:55:35 +02:00
Lulu13022002 651d8481b7 Finish world key initial migration (#13824) 2026-04-26 17:26:40 +02:00
Nassim Jahnke acfe105b9d Add options to disable chunk and block entity ticking (#13821) 2026-04-26 17:09:05 +02:00
Nassim Jahnke a64ea13e8e Re-implement per-world and per-player time (#13814) 2026-04-26 13:37:46 +02:00
Warrior 1f8197327f Allow ServerboundChangeGameModePacket if player has /gamemode permissions (#13507) 2026-04-26 01:00:30 -04:00
Owen 8021488ef4 Disconnect State Fixes (#13616)
Replaces the processedDisconnect flag and executeBlocking cleanup with a force kill flag processed by the connection listener tick. executeBlocking(connection::handleDisconnection) did not actually Work, as the the channel is still open at that point because the disconnect packet hasn't been flushed. Replaced with handleConnectionDisconnectOnNextTick, which the connection listener processes on the next tick.

processedDisconnect was an old flag preventing double disconnect.

The same protection is now provided by vanilla's disconnectionHandled check on Connection.

Drops the SPIGOT-924 player.doTick() call on quit. This is an ancient spigot bug fix that causes issues and weird event fires whilst the player is disconnected.

Removes the login side disconnecting flag and the matching tick guard, since the connection now closes properly on its own. The login disconnect path moves to disconnectAsync so it doesn't block on IO.
2026-04-25 18:06:21 -04:00
Miles 182b2f8a2a Add Point Of Interest API (#12117) 2026-04-25 16:27:55 -04:00
Owen a8c05a35c2 Add an option to WorldCreator to avoid spawn location computation on world creation (#13407) 2026-04-25 15:31:47 -04:00
Pedro 945aea9961 Fix Damager for HangingBreakByEntityEvent and minor improvements (#12615) 2026-04-25 14:52:57 -04:00
Pedro 4aef3f0a67 Remove already fixed vanilla bug MC-244739 (#13787) 2026-04-25 14:26:37 -04:00
Pedro 60073714ba Update MOJIRA reference in DeOp command response for multiple targets [ci skip] (#13812) 2026-04-25 14:20:54 -04:00
Rothes 4f184db3c9 Fix memory leak on constantly damage (#13455) 2026-04-25 14:19:52 -04:00
Illia Bondar 57d84f68a3 Prevent NPE on ThrownPotion#splash (#13683) 2026-04-25 14:16:47 -04:00
Warrior 49daadd25d Fix insomniaStartTicks option being ignored for phantom spawning (#13609) 2026-04-25 13:57:03 -04:00
Pedro b2b1e177cb Improvement to Vehicle damage events (#13572) 2026-04-25 13:46:17 -04:00
PedroandLulu13022002 90aee8e007 Update world methods to take in account environment attributes (#13543)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-04-25 19:20:49 +02:00
Pedro d74f6bc77a Support for Kill damageable entities (#13667) 2026-04-25 13:12:18 -04:00
Kezz dd203a2716 chore: Don't log errors for accepting the EULA via the system property (#13681) 2026-04-25 13:02:42 -04:00
David Lüdtke dcf5577aae Fix PlayerProfile applySkinToPlayerHeadContents (#13692) 2026-04-25 12:53:39 -04:00
Harold c39822ae08 reset pending keepalive state on listener handoff during reconfiguration (#13712) 2026-04-25 12:50:10 -04:00
David 4af86ff3e0 Handle null ServerLevel in fromGlobalPos (#13703) 2026-04-25 12:41:23 -04:00
ac15CR 1a8417b12b [ci skip] Add Javadocs for PotionEffect withX methods (#13723) 2026-04-25 12:39:33 -04:00
personalized-advertising 65461225ef Update health after setPlayerProfile() (#13717) 2026-04-25 12:32:53 -04:00
PedroandLulu13022002 7b31cc2b6b Make leaveMessage in PlayerKickEvent nullable (#13804)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-04-25 12:30:26 -04:00
sovdeeandLulu13022002 aa6f09b098 Prevent Happy Ghast from playing mount/dismount noises when silenced (#13807)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-04-25 12:01:24 -04:00
Nassim Jahnke 944ce44a4a Fix CraftWorld identifier passing 2026-04-25 11:59:27 +02:00
Pedro 6fe7eb5aae Load World Key when its instance is created (#13818) 2026-04-25 09:58:13 +02:00
Spottedleaf 948acae8c2 Raise existing level.dat data size quota
It appears that custom data may push it to be higher than
what the default quota allows for.

See https://mojira.dev/MC-307144

Fixes https://github.com/PaperMC/Paper/issues/13820
2026-04-24 19:25:14 -07:00
Nassim Jahnke ef4e85d6db Replace remaining relevant getWorld(String) use 2026-04-24 19:16:43 +02:00
Shane Freeder 3611a815e6 Fix String#toLower/UpperCase usages 2026-04-23 16:37:29 +01:00
Jason Penilla 1d14197790 fix setSpawnLocation changing respawn dimension
it was carrying some leftover intermediary shape from before PaperLevelOverrides design was finalized - revert to original shape for correct behavior

also revert ordering change in setRespawnData
2026-04-21 09:49:28 -07:00
Spottedleaf 6bac3c95bf Delay open/close callbacks for chests
The logic for chests may invoke block updates, which may not
be safe to perform. For example, inventory closing due to
player logout (which restricts chunk loading due to being
inside an entity status callback) or during shutdown (which has
chunk loading restrictions due to the chunk system being halted).

This also fixes the recheckOpeners function not firing
the redstone event if the open count changes.
2026-04-20 03:05:27 -07:00
Spottedleaf 9b1dd57135 Do not empty beehives from worldgen threads
The level is not set here, so emptying would cause a crash
due to NPE, and of course the logic is not safe to run from
the worldgen thread even if the level was set.
2026-04-20 02:48:53 -07:00
Spottedleaf 4be1a310c2 Add EntityScheduler#scheduleOrExecute
This is useful on Folia where we may want to try to avoid
scheduling a delayed task.
2026-04-20 02:15:28 -07:00
Nassim Jahnke 66d3bbed38 Update frosted ice patch for 26.1 2026-04-19 18:41:44 +02:00
Jonathan d0be5e20fd Call BlockFadeEvent for FrostedIce (#13764) 2026-04-19 16:14:54 +02:00
Asish Kumar dd0810c4af Skip inactive AI ticks for unaware mobs (#13781) 2026-04-19 16:14:21 +02:00
Pedro 04ee8eac9b Remove Paper config unsupported-settings.compression-format (#13800) 2026-04-19 16:08:48 +02:00
Warrior c58cba39fb Port blockstate validation patch (#13786) 2026-04-19 16:08:32 +02:00
Lulu13022002andJake Potrebic 0c79f00b00 Improve GameRule API (#13668)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2026-04-18 20:09:16 +02:00
Pedro 144a7c7f34 Add missing deprecation for Material#getCreativeCategory (#13686) 2026-04-18 19:49:21 +02:00
Warrior 392e594c10 Fix EntityLungeEvent#setLungePower being ignored (#13784) 2026-04-18 19:29:26 +02:00
Pedro 0026eacf79 Remove unused config for logging.deobfuscate-stacktraces (#13778) 2026-04-18 19:05:33 +02:00
Lulu13022002 0a3a73c18f Fix fireball entity class (#13676) 2026-04-18 19:03:43 +02:00
Jason Penilla 02ec8e9585 [ci skip] Remove dead disableGameRuleLimits property reading 2026-04-15 11:48:36 -07:00
Jason Penilla 6f4b0045e4 Add earlier trigger for world migration delay in vanilla logic (#13792) 2026-04-15 20:37:07 +02:00
Jason PenillaandOwen1212055 78eb3aaf13 Start discouraging world name use (#13760)
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2026-04-15 18:31:47 +00:00
Mika 8987f91c92 [ci skip] chore(jd): ChunkGenerator improvements (#13655) 2026-04-11 17:20:49 +02:00
Bjarne Koll d61d8df477 Cleanup crafter slot diff (#13662) 2026-04-11 16:20:46 +02:00
Creeam 73aded4302 Fix spigot config silentCommandBlocks filtering player commands (#13649) 2026-04-11 15:47:03 +02:00
David 1241f406b1 [ci skip] Update Player#performCommand javadoc and signature (#13698) 2026-04-11 15:45:28 +02:00
Dueris 67a54b3117 Add EntityLungeEvent (#13637) 2026-04-11 15:25:42 +02:00
Nassim Jahnke ce56a02f94 Update Vanilla base to 26.1.2
No actual server changes aside from the usual data version bumps
2026-04-11 13:38:25 +02:00
Pedro 7773669d2b [ci skip] Update README and CONTRIBUTING for 26.1 (#13739) 2026-04-11 09:31:24 +02:00
Lulu13022002 7c923b7259 [ci skip] migrate remaining patches to jspecify 2026-04-10 14:39:04 +02:00
Jason Penilla 8650896cc9 handle legacy uid in vanilla migration and always write metadata during migration 2026-04-10 14:39:03 +02:00
Jason Penilla 870df9d3e6 [ci skip] Drop stale TODO
This is no longer needed as we explicitly add the correct gen settings to the SavedDataStorage for custom dimensions in CraftServer. We no longer have multiple PrimaryLevelData, and WorldGenSettings is saved in its own file.
2026-04-10 14:39:03 +02:00
Warrior 6a99268219 Add PlayerToggleEntityAgeLockEvent (#13742) 2026-04-10 14:39:02 +02:00
Nassim Jahnke bc8f592891 Fix attack check 2026-04-10 14:39:02 +02:00
Owen1212055 7e34fba076 feat: Optimize ServerWaypointManager when locator bar is disabled
The waypoint system  iterates over each player for running waypoint calculations. This, most notably, is done on setPosRaw which is executed twice for each player (one for non players).
This results in every time a player moves, it iterates over each player twice.

So instead, we cache the game rule and instead use this to prevent iterating over all the players and avoid the redundant connection logic checks.

This performance issue is most noticeable with many players on the same level.
2026-04-10 14:39:02 +02:00
tofik.07 9d2db14272 Cache the climbing check in activation range (#12764) 2026-04-10 14:39:01 +02:00
Owen1212055 5e9a9188c0 Lazy set Entity.projectileSource in AbstractProjectile#getShooter
Fixes #13475
Supersedes #13643
Supersedes 13481
2026-04-10 14:39:01 +02:00
Lulu13022002 79ad7f65bd Update unpick definitions 2026-04-10 14:39:00 +02:00
Jason Penilla 980122193f Implement new version schema: <mcver>.build.<paper_build_no>-<paper_status> / <mcver>.local-SNAPSHOT 2026-04-10 14:39:00 +02:00
Jason Penilla a0eb01aacd Change world storage layout to be closer to vanilla & implement migration (#13736) 2026-04-10 14:39:00 +02:00
28f8027abb 26.1
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Pedro <3602279+Doc94@users.noreply.github.com>
2026-04-10 14:38:59 +02:00
Riley ParkandHannes Greule bd74bf6581 feat: PlayerSwapWithEquipmentSlotEvent (#13687)
Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
2026-03-09 19:54:02 -07:00
Strokkur24 3f5728e249 Cleanup CLI args (#13646) 2026-02-28 12:48:51 +01:00
PedroandLulu13022002 c58f844300 Check for valid NamespacedKey in OldEnum#valueOf (#13596)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-02-28 12:14:14 +01:00
Lulu13022002 75bbf4fb27 Fix infinite loop for legacy wrapper (#13659) 2026-02-28 11:53:57 +01:00
notsneakybeaky 7e80cef519 Add ItemStack getter to FurnaceExactEvent (#13569) 2026-02-26 18:09:41 +01:00
Joshua Prince 32dff6b180 Fix crafter slot ID conversions (#13497) 2026-02-26 18:03:40 +01:00
masmc05 10235641e3 Fix item entity data serialization to json (#13632) 2026-02-26 17:54:18 +01:00
Yannick Lamprecht 13887c99a2 feature(#13558): add copper golem state api (#13561) 2026-02-26 17:49:15 +01:00
Timon Seidel 47aef92a92 [ci skip] chore(jd): improve PlayerConnectionValidateLoginEvent (#13591) 2026-02-26 14:40:31 +01:00
tofik.07 37e02efd95 feat: Add new overloads for Pathfinder (#13192) 2026-02-26 13:41:00 +01:00
TonytheMacaroni ad767b0c5c Fix MC-259832 (#13464) 2026-02-26 13:31:13 +01:00
KezzandLulu13022002 79c77f5d7d Pre-Adventure 5.0 changes (#13300)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-02-19 16:02:08 -08:00
Spottedleaf 6f71be809b Sync Moonrise
We do not implement the chunk unload settings, as I am not currently
aware of any need for this on Paper. Maybe in the future that changes.
2026-02-15 11:07:05 -08:00
Spottedleaf 1f1406f1b6 Fix collision inconsistency with Vanilla
We need to avoid performing intersection checks with the epsilon value
when checking intersection against whole blocks.

I'm sure this is going to cause some collision problem but we will
cross that bridge when it happens.

Fixes https://github.com/PaperMC/Paper/issues/13579
2026-02-15 11:00:11 -08:00
Jason Penilla e17a767f17 Logging fixes around plugin disable and shutdown; logging cleanup (#13622)
This fixes a race where a late log message to the async appender could cause console reinitialization during shutdown

Also fixes issues when plugin log messages with classloader scoped context tries to print after the plugin classloader is closed by flushing the async appender as a part of disabling plugins.

Remove StacktraceDeobfuscator and ExtraClassInfoRewritePolicy

- Stacktrace deobfuscator has not been useful for a while and will be completely useless with MC 26.1
- ThrowableProxy is deprecated with no replacement in Log4j 2.25.0 and newer (getThrownProxy is no longer called by built in throwable formatters, so our code is already dead)
2026-02-14 18:34:57 -07:00
Gero 255c25e276 fix "do not prematurely disconnect players on stop" (#13625) 2026-02-14 22:50:49 +01:00
Lulu13022002 6103cc7f60 Expand mobs-can-always-pick-up-loot.zombies for husk (#13624) 2026-02-10 15:25:58 -05:00
Lulu13022002 d10c3129c5 Update inactive tick handler (#13621) 2026-02-10 13:04:33 +01:00
Owen 302c47c0dd Don't tick disconnected connections (#13614) 2026-02-07 22:58:34 +00:00
Lulu13022002 c59990d92d Update affects spawning api (#13556) 2026-02-06 12:10:45 +01:00
Emil 04739de18f Make SkinSource Player implementation reflect profile changes (#13585) 2026-02-06 12:02:59 +01:00
Nassim Jahnke 9d303299bd Fix pre-tick cooldown reset on swap (#13589)
Possible TODO: Not calling it for every equipment update, only the ones a hand item could have changed (including checking the original patche's calls)
2026-02-06 12:01:24 +01:00
Warrior e2b76dfd33 Implement deprecated getItemStack method in ItemTypeRecipeChoice (#13607) 2026-02-06 11:54:23 +01:00
Jake Potrebic 0d768aac6e Add RecipeChoice.ItemTypeChoice (#12049) 2026-02-05 13:15:09 +01:00
Creeam 581214ad63 Fix fixClimbingBypassingCramming option (#12793) 2026-02-05 12:14:48 +01:00
orang3i ae0c3a9e84 Add ItemCraftedEvent (#12245) 2026-02-05 11:01:03 +01:00
Timon Seidel e5718dce6d fix: PlayerServerFullCheckEvent#deny not setting the allow flag (#13601) 2026-02-04 19:07:30 +00:00
tofik.07 a687a82cd4 [ci skip] chore: remove unneeded task configuration (#13484) 2026-02-04 19:21:22 +01:00
Warrior fd39dbdbdf Provide locale pointer for config connection audience (#13600) 2026-02-04 09:31:14 -05:00
Jason Penilla 57c7aac4e4 Propagate failures from suggestion futures fixes #13587 (#13598) 2026-02-03 11:02:32 -07:00
CreeamandBjarne Koll 4873e3fb7e Fix Bee anger never gets timeout (#13546)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2026-01-29 11:01:06 +00:00
Lulu13022002 81b9122470 Fix PlayerClientLoadedWorldEvent#isTimeout being always true (#13573) 2026-01-20 19:07:33 +00:00
Nassim Jahnke 8a6654cd07 Redirect attacks with piercing weapon 2026-01-19 11:55:51 +01:00
Martijn b5e7257841 Remove hard-coded max stack sizes from Material (#13518) 2026-01-17 18:41:55 +01:00
Martijn 290414e7e8 Fix legacy conversion for maxDurability / data (#13529) 2026-01-17 00:11:41 +00:00
Martijn 3bf1cb81d3 Add LEGACY_BARRIER to isTransparent (#13515) 2026-01-16 23:24:08 +00:00
Lulu13022002 fc1d2c4293 Check spawn_mobs gamerule for spawnEnemies flag (#13510) 2026-01-16 23:22:58 +00:00
MartijnandBjarne Koll c3b18bdf7f Fix tracking depth in Scope (#13538)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2026-01-16 21:55:47 +00:00
Antti Koponen e7445e169c Prevent ticking virtual world borders multiple times per server tick (#13513) 2026-01-11 23:36:12 +00:00
Dominilk 0bd2eca070 [ci skip] Clarify AsyncPlayerPreLoginEvent is post authentication (#13519) 2026-01-11 22:23:32 +00:00
Lulu13022002 a0f626b552 Fix backward compat for EnchantmentTarget.WEAPON (#13508) 2026-01-09 19:50:02 +01:00
Yannick Lamprecht 4b35f5cb99 Fix using experience bottle does not award item used stat (#13522) 2026-01-09 19:46:59 +01:00
Lulu13022002 b3edd3f4db Clamp respawn location pitch to correct bounds (#13509) 2026-01-09 12:48:53 -05:00
tofik.07 8556cb41ce Clamp negative site api distances in the version fetcher to avoid caching issues (#13506) 2026-01-05 10:38:00 +01:00
Ruoyi Xu 5be5b3876a Make merchant accessible in PlayerPurchaseEvent (#13062) 2026-01-04 17:03:09 -05:00
93e81bfc7d Add support for loading plugins from extra directories (#13447)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2026-01-04 21:31:36 +00:00
ColinNason 444a2ba10d Change thrown trident item to use copy of ItemStack of count 1 (#13394) 2026-01-04 16:31:10 -05:00
Yannick LamprechtandOwen1212055 ede8d0df8d Format paper-api mob goals in debug renderer (#13495)
As paper wraps API goals, the previous debug rendering output
did not visualize the actual goal impl class for api added goals.

Instead, resolve the handle of  the goal and suffix it with a star to
indicate that the goal name was resolved from a non vanilla goal.

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2026-01-04 20:39:51 +00:00
benniofficialdev 51239f4b31 Fix usage message on spigot reload command (#13494)
Fixes #13492
2026-01-04 15:37:31 -05:00
A248 575df562d6 Add zip error reporting to PaperPluginClassLoader (#13505) 2026-01-04 20:34:58 +00:00
Lulu13022002 350fd5e3fe Prevent negative anger level for neutral mobs (#13504) 2026-01-04 20:07:42 +00:00
Lulu13022002 1fd9d08540 Fix backward compat for World#setPVP (#13503) 2026-01-04 20:04:00 +00:00
Yannick Lamprecht 5fa4be9335 feature: expose mannequin poses (#13429) 2026-01-04 14:37:20 -05:00
Lulu13022002 179626d555 Fix a few inverted checks for skulls (#13502) 2026-01-04 20:01:22 +01:00
Lulu13022002 ebf50865b5 Expand wateranimal-spawn-height config for nautilus (#13488) 2026-01-04 16:21:48 +01:00
Pedro a47cb98c41 Add check for null player name in Team methods (#13468) 2026-01-04 15:52:03 +01:00
Bjarne Koll 173bd93c7c [ci skip] Rebuild patches 2026-01-04 12:53:02 +00:00
Pedro 3ebc5b3320 Don't apply oversized sanitizers in components disabled by config (#13466) 2026-01-02 20:01:05 +01:00
tofik.07andMiniDigger | Martin 8f736dbf07 Improve outdated version check (#12589)
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
2026-01-02 12:57:12 +01:00
chickeneer cd445fdb26 Do not set gamerules when they are not set before conversion
See https://github.com/PaperMC/DataConverter/pull/29

Note that this is just a sync from DataConverter, as we do not
make use of the LEVEL data type for converting (we use DFU).
2025-12-31 09:01:14 -08:00
Warrior 95c6067dc3 Allow disabling incoming-packet-threshold (#13477) 2025-12-31 17:50:43 +01:00
chickeneer 37c0bcf369 Add the Vehicle interface to Nautilus (#13474) 2025-12-31 17:28:17 +01:00
bookyandBjarne Koll 94d0c97acd Don't try to save scoreboard if there is no world loaded (#13471)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2025-12-30 21:31:55 +01:00
Lulu13022002andBjarne Koll e90c034fec Finalize unpick migration (#13463)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2025-12-30 18:30:12 +01:00
Nassim Jahnke bc0c3d88fc Promote build channel to STABLE 2025-12-30 18:26:10 +01:00
Emil 5875d88002 Fix inventory desyncs with certain cancelled interactions (#12960) 2025-12-30 15:13:53 +01:00
Warrior 8c6b632718 Properly update hidden effects (#13173) 2025-12-29 22:54:32 +01:00
TonytheMacaroni 6d5a450ffb Add additional ray trace API (#12162) 2025-12-28 21:00:18 -05:00
Sam Russell 7813de1222 Fix arrow immunity loophole (#13452) 2025-12-28 19:38:12 -05:00
Lulu13022002 2a8353a00b Fix display's glow color override interpreting alpha channel (#13441) 2025-12-28 01:33:29 +01:00
Lulu13022002 e06e691a0a Fix inverted check in PiglinAi#pickUpItem (#13419) 2025-12-28 01:00:52 +01:00
6aa085b830 Raid max Groups configurable by API (#12896)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2025-12-28 00:40:52 +01:00
Sam Russell 3f07f0216e Make arrow despawn rate override configurable (#13409) 2025-12-28 00:27:26 +01:00
tofik.07 f7840d62c2 fix: bump netty-codec-haproxy in order to match mojang's bump in mc netty deps (#13403) 2025-12-28 00:16:17 +01:00
AyaandOwen1212055 8b35361faf Add UnsafeValues#deserializeItemHover (#13067)
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2025-12-27 23:21:23 +01:00
Mart 1d3d8206c3 Don't print missing profile stacktrace (#13420) 2025-12-27 23:10:40 +01:00
PedroandLulu13022002 b36b49ac23 Don't create direct holder for structures in World#locateNearestStructure (#13432)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-12-26 17:46:04 +01:00
Maddy Miller 6da8af7ca4 Update 1.21.11 reobf mapping data (#13388) 2025-12-23 20:11:41 +01:00
okx-code b6b53a6dca Use correct explosion type for TNT in the createExplosion API (#13413) 2025-12-23 17:11:18 +01:00
Spottedleaf 89fdae86ce Fix incorrect per-world view distance handling
The non-moonrise system in the file patches should be using
the feature hooks to retrieve the view distance, as it may be
changed via the API.

For the Moonrise system, we avoid sending the view distance packets
when changing worlds as Moonrise will handle them in
RegionizedPlayerChunkLoader (as it needs to handle per-player
view distances).
2025-12-23 05:29:10 -08:00
Spottedleaf 90191f725a Commit missing TickTime diff
This was meant to be in the previous commit...
2025-12-21 14:05:46 -08:00
Spottedleaf d9a3fa7d4a Update ConcurrentUtil to 0.0.8
https://github.com/Tuinity/Moonrise/commit/c77ed8a746191036b1fa52e4a78781ef217ae3bc

Right now for Paper, there are effectively no changes. This is just
for Folia.
2025-12-21 13:57:25 -08:00
Nassim Jahnke 899570337e Promote build channel to BETA 2025-12-21 20:55:43 +01:00
Shane Freeder 997f505457 Mark client as loading after API respawn (Fixes #13417) (#13418) 2025-12-21 11:38:53 +00:00
just_lofe f76defd390 Fix javadocs in UseCooldownComponent (#13416) 2025-12-21 11:22:24 +01:00
Miles 8e5e54f566 Add Waypoint Styling API (#12964) 2025-12-19 20:37:34 -05:00
niho2 f0298536eb Fix allowEnteringNetherUsingPortals gamerule not being respected (#13263) 2025-12-19 23:41:40 +00:00
xSnowyk 1f94f1f7af Fix inverted logic in SwellGoal (MC-179072) (#13396) 2025-12-17 21:31:24 +00:00
MiniDigger | Martin 1bef00445b [ci skip] bump fill to fix publishing 2025-12-17 21:29:36 +00:00
Warrior 53bfe4afa0 Do not save entity fire override if it's unset (#13320) 2025-12-17 21:24:07 +00:00
Camden Cove 4e1e44fbd1 update connection hostname after player handshake event (#13386) 2025-12-17 21:23:45 +00:00
Lulu13022002 2bfaa8b1e6 Fix inverted check in Rotations (#13399) 2025-12-17 21:14:02 +00:00
Owen e5e2c50ed3 Move scoreboard overrides to a separate field (#13378) 2025-12-12 21:58:54 +00:00
Bjarne Koll 4446f17f65 Fix PlayerClientLoadedWorldEvent calls (#13374) 2025-12-09 22:51:01 +00:00
Spottedleaf cc3dae7a39 Re-add DataConverter patch
Updated for 1.21.11
2025-12-09 11:45:46 -08:00
Nassim Jahnke ba4b700e13 1.21.11 2025-12-09 17:15:26 +01:00
Bjarne Koll f6e937b978 Reimplement int based gamerule access (#13372) 2025-12-08 19:50:19 +00:00
Bjarne Koll 7db609b00f [ci skip] diff housekeeping
Mostly removal of non-required diff introduced by bringing over old
1.21.10 code when resolving conflicts.
2025-12-08 19:47:35 +00:00
Jason Penilla 843cafd8bf Update to 1.21.11-rc3 2025-12-08 09:28:35 -07:00
Bjarne Koll a339457c06 Readd dropped shulker box block hunk
Diff was dropped as mojang initially removed the getDrops method from
the ShulkerBoxBlock, then re-added it a couple of snapshots later.

The diff implements the
lootables.retain-unlooted-shulker-box-loot-table-on-non-player-break
option.
2025-12-07 23:36:37 +00:00
TraksandBjarne Koll 5f03e110eb Fix isInteractable for copper chests (#13325)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2025-12-07 22:53:00 +00:00
Warrior f08aad23a7 [ci skip] Clarify Metadata API deprecation message (#13371) 2025-12-07 19:12:50 +00:00
roro1506HD bb6c2d081d Use correct addresses for PlayerConnection (#13307) 2025-12-07 19:05:58 +00:00
BaconCat__ 7fdc16a80d Add configuration option to control fix for MC-159283 end rings (#13363) 2025-12-07 14:04:26 -05:00
AnnotationVisitor 62dc8b32f9 Use book packet for both methods (#13298) 2025-12-07 14:01:40 -05:00
James Lyne 252cfe1450 Fix unnecessary player info remove packets being sent when hiding players (#12587) 2025-12-07 13:59:14 -05:00
Bjarne Koll 31af44d283 Re-add dropped hunk for visibility sounds
Player#attack had some diff required to not send sounds to players that
had other players hidden, which got dropped in the update.
2025-12-07 18:44:00 +00:00
Bjarne Koll eb37433d81 Re-add configurable combat exhaustion and event 2025-12-07 14:41:33 +00:00
Bjarne Koll f34efdb791 Pass SWEEP_ATTACK knockback reason
Dropped during the 1.21.11 update.
2025-12-07 00:47:57 +00:00
Jason Penilla 15309f9aea Update to 1.21.11-rc2 2025-12-05 09:00:56 -07:00
Jason Penilla 51c1b16b5b Optimize getEntityCount by directly accessing Moonrise data structures 2025-12-04 13:18:14 -07:00
Jason Penilla 1cb31fd3b7 Update to 1.21.11-rc1 2025-12-04 10:25:21 -07:00
brickmonster ffce96cf3e Fix wrong translation key in /give command (#13364)
See: MC-151857
2025-12-03 17:47:56 +00:00
Jason Penilla ec0ad8b907 Update to 1.21.11-pre5 2025-12-03 09:49:33 -07:00
Valgrifer 84a789b263 Add Decorated Pot wobble API (#12994) 2025-12-03 10:30:29 -05:00
aerulion 1d09b617f2 Fix ItemType#isEdible to also check for DataComponents#CONSUMABLE (#13348) 2025-12-03 09:23:42 -05:00
Owen c7a138b06c Remove ItemStack mutation on drop methods (#11831)
This caused drop methods to no longer cause mutation of the underlying ItemStack being dropped (turning it into air).
This caused a large amount of unintended behavior changes and broke stuff.
2025-12-02 21:01:02 -05:00
Spottedleaf 889c6617d9 Flush region storage if configured for ChunkMap#synchronize
This is just to maintain closer behaviour to Vanilla if mods
invoke this function.

https://github.com/Tuinity/Moonrise/commit/adddf3cd96256285a2dffe49499b1fd3b545cf4d
2025-12-01 21:23:07 -08:00
Jason Penilla b786cbe83a Update to 1.21.11-pre4 (#13357) 2025-12-01 10:24:41 -07:00
Jason Penilla 6348ac89df Schedule PlayerSpawnFinder chunk callbacks to mainThreadProcessor instead of server queue fixes #13354 2025-11-30 16:00:12 -07:00
Jason Penilla fdfdec6600 Trigger build after merge commit 2025-11-30 15:25:15 -07:00
Shane Freeder 2efb4e7a5a Merge branch 'ver/1.21.10' 2025-11-30 21:48:24 +00:00
Shane Freeder df4b668117 Restore legacy command restrictions 2025-11-30 21:39:57 +00:00
Pedro 354a5d5491 [ci skip] Add missing Nullable annotation for KineticWeapon.Builder methods (#13347) 2025-11-26 20:38:16 +01:00
Jake Potrebic 168287b27b Update exact choice recipe patch (#13346) 2025-11-26 10:48:04 -07:00
a2c9f58a8a Update to 1.21.11-pre3 (#13194)
Co-authored-by: roro1506HD <roro1506MCpro@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Pedro <3602279+Doc94@users.noreply.github.com>
Co-authored-by: Doc <nachito94@msn.com>
Co-authored-by: Miles <81843550+Y2Kwastaken@users.noreply.github.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2025-11-26 10:18:28 -07:00
Pedro f8cf03d68c [ci skip] Mention damage behavior for Server#createWorldBorder (#13338) 2025-11-22 18:24:31 +00:00
Warrior af06383701 Add field renames for lead sounds and iron chain (#13168) 2025-11-21 23:41:18 +00:00
UrAvgCode f67a1b6e65 fix: Player#setPlayerTime sends time update packet to client (#13315) 2025-11-21 23:03:17 +00:00
Jason Penilla 9fc21bcbf2 Promote build channel from BETA to STABLE 2025-11-14 09:09:50 -07:00
Spottedleaf f393100d5d Update ConcurrentUtil to 0.0.7 2025-11-13 17:40:07 -08:00
Spottedleaf 0e10753e46 Update ConcurrentUtil to 0.0.6
Fixes https://github.com/PaperMC/Paper/issues/13275

See
- https://github.com/Tuinity/ConcurrentUtil/releases/tag/v0.0.6
- https://github.com/Tuinity/ConcurrentUtil/commit/42e72d7efdc33cbadc6f07a2e93fb276bb5b6328
2025-11-13 17:04:23 -08:00
Jason Penilla d16e03fbaa [ci skip] Add IntelliJ tips to CONTRIBUTING.md (#13299) 2025-11-12 10:01:48 -07:00
Pedro 97452e19d9 Improvements for Player#openBook (#12582) 2025-11-10 13:27:10 -05:00
Žiga Slatnar Štagar cf02a0719a Add Particle.Spell support to ParticleBuilder#color(Color, float) (#13128) 2025-11-10 13:00:08 -05:00
Yannick Lamprecht 1d2d956629 fix(#13144): Entity pathfinding paths do not appear with 1.21.9 debug flag enabled (#13202) 2025-11-10 12:55:43 -05:00
Spottedleaf 1f31ee5ebe Do not record task execution time as TickTime individually
The number of recorded instances may be high and subsequently
cause calculations of MSPT or TPS to be abnormally high.

Instead, we record task execution time as a sum on TickTime itself.
Task execution time is tracked for the next tick.
2025-11-04 11:29:11 -08:00
Jason Penilla a41043f2e6 Add back command source for command blocks with output disabled and fix bukkit->minecraft not respecting output disabled for minecart command blocks (#13271) 2025-11-04 11:07:38 -07:00
Spottedleaf 893ea746a0 Make stage 2 chunk unload utilise I/O future write
When the I/O scheduler was rewritten, it was designed to
take writes as futures (i.e. CallbackCompletable, Completable).
We can utilise this functionality in entity and chunk unloading.

Provided that the write is scheduled during stage 3, we can remove
the unload tasks - even if the write value is not yet ready.

For entity chunk unloading, when the entity chunk is transient it needs
to load the current data on-disk to save. We can create a write future
which depends on the result from loading the current data from disk.
The previous behavior was to perform a blocking read on the chunk data,
as the previous behavior was designed with an I/O scheduler which
could not perform future writes.

For chunk unloading, the logic already issues a future value write.
The only changes made are to forward exceptions to the I/O thread
and to move the unload task completion to the stage 2 function
itself (which additionally avoids a double write schedule).

With these changes, all of chunk, entity, and poi tasks issue
an I/O write during unload (unless there is nothing to write). This
allows for all of the unload tasks to be removed during stage 3.

Additionally, make the I/O scheduler properly handle exceptions from
future writes - print the exception and avoid the write. Previously,
the behavior was to not print an exception and to delete the data
from disk.

The main benefit from these changes is that transient entity chunk
unloads no longer issue a blocking read from disk.

https://github.com/Tuinity/Moonrise/pull/144
https://github.com/Tuinity/Moonrise/pull/146
2025-11-04 07:55:16 -08:00
Super e8c6ba5068 Expose JukeboxSong variables (#13214) 2025-11-01 22:04:02 +00:00
Glicz 5fd3c951d4 Add Entity#teleportAsync(Location, TeleportFlag...) (#13208) 2025-11-01 21:56:04 +00:00
Warrior fcb2956ae6 Add debug logging for entities with invalid ids (#13229) 2025-11-01 21:53:22 +00:00
roro1506HD e74d70233d Fix HelpMap topic creation for bootstrap commands (#13231) 2025-11-01 21:50:47 +00:00
Owen f55a34fd3f Properly handle provider plugins in load order (#13242) 2025-11-01 20:27:59 +00:00
Jake Potrebic 6794db4fcb Make spawning more accurately track vanilla (#12627) 2025-11-01 20:15:58 +00:00
Preva1l c68a55ca72 Optimise CraftWorld#spawnParticle (#13250) 2025-11-01 19:40:24 +00:00
Warrior ea9cd17c14 Use version fetcher from unsafe values in new version command (#13246) 2025-11-01 19:25:26 +00:00
Nathan ae5e78a487 [ci skip] Clarify the functionality of AbstractVillager#resetOffers (#13260) 2025-11-01 18:55:37 +00:00
Owen 9934c17322 Set chunk loading radius to 0 in PlayerSpawnFinder
https://github.com/Tuinity/Moonrise/pull/143

Fixes incorrect port from the Moonrise mixin causing a significant
number of chunks to be loaded for spawn.
2025-10-27 10:18:13 -07:00
Jason Penilla 13e9c107fe [ci skip] Update mache for new unpick definitions 2025-10-27 10:08:22 -07:00
Jason Penilla 9d427a5e57 [ci skip] Enable unpick (#13241) 2025-10-26 12:52:07 -07:00
David c7714bbf34 Update PlayerPostRespawnEvent to include full location data (#13237) 2025-10-26 14:48:18 -04:00
Spottedleaf 2a1871bba6 Use static ThreadLocal for light engine propagator
The propagator has been changed so that its world may be updated.
This reduces extra memory by only requiring one propagator to be
cached per thread, rather than one propagator per world per thread.

This change also avoids the dodgy behavior of ThreadLocal retaining
references to values long after they would be collectable.

Fixes https://github.com/PaperMC/Paper/issues/13234
2025-10-25 16:56:51 -07:00
Jason Penilla b5b7c7910e Promote build channel from ALPHA to BETA 2025-10-25 12:04:35 -07:00
Jake Potrebic b278a92285 Don't run player loot table for spectators (#11801) 2025-10-24 23:30:05 -07:00
Owen d98142efca Rework API teleportation to better align with Vanilla (#13181)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>


This patch includes extensive changes to teleport logic in the API to better represent vanilla behavior. In particular, teleporting with passengers is now supported by default. This also allows for entities to be teleported across dimensions with passengers, except for players, which is still not supported. Entity state related teleportation flags have been deprecated, as that behavior occurs by default now. Additionally, relative teleportation flags are now supported on entities. 

Most importantly, we no longer hack onto the respawn logic when teleporting players between dimensions in the API. This is a good step towards working on no longer reusing player entities on dimension swap, which is something we are trying to no longer do as it causes a large amount of desync issues on the client/server.

Entity teleportation via /tp now aligns with vanilla too, which now maintains velocity when teleporting.

This is a breaking change.
2025-10-23 13:09:01 -04:00
roro1506HD 080a72f208 [ci skip] Add myself (roro1506HD) to MIT licensing (#13212) 2025-10-20 16:10:10 +01:00
Pedro bac3da12da Migrate external JD links from javadoc.io to javadocs.dev (#13205) 2025-10-19 19:10:27 -07:00
Jason Penilla e75678b6d7 Update Mache for Java 25 setup runtime support 2025-10-19 10:21:14 -07:00
PedroandJason Penilla 1e67ca8ec5 Add SpawnReason for REANIMATE a Copper Golem Statue (#13126)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2025-10-18 10:44:19 -07:00
roro1506HD 7845cba0a5 Fix help.yml index-topics not working for non-console senders (#13193) 2025-10-17 20:12:25 -04:00
Lulu13022002andAeltumn 952a024fed Fix some issues with PlayerLeashEntityEvent (#13015)
Co-authored-by: Aeltumn <12281102+Aeltumn@users.noreply.github.com>
2025-10-17 19:52:48 -04:00
Warrior dd8f9f86f6 Expose PlayerConnection#isConnected (#13166) 2025-10-17 19:24:06 -04:00
zBinFinn ae1e6b72b7 Add PersistentDataContainerView#getSize (#13157) 2025-10-17 19:23:50 -04:00
Kezz 3799cbeb24 Use Adventure properties default override provider to set a global flattener nesting limit (#13156) 2025-10-17 16:22:30 -07:00
Dreeam 7b9a47298c Fix inverted disabled in CraftCrafter#setSlotDisabled (#13195) 2025-10-17 14:17:05 -07:00
roro1506HD 81b7a57864 Fixed Ender Dragon using wrong tracking range (#13046) 2025-10-16 15:40:59 +02:00
Pedro ab99393c07 Fix charged creeper explosions not dropping mob skulls (#13167) 2025-10-15 20:59:55 +02:00
Pedro e5cc256041 [ci skip] Update CONTRIBUTING.md for Gradle and Windows Docs (#13190) 2025-10-15 19:36:56 +02:00
Bjarne Koll 89ca94ab24 [ci skip] Rebuild patches 2025-10-15 16:42:08 +02:00
Jason Penilla af1823d47c Reduce impact of tick time calculations (#13188) 2025-10-14 22:15:07 -07:00
Emilia Kond b57d6410f6 Expose isReplaceable on BlockData (#13180) 2025-10-14 20:29:37 +02:00
mintychochip c710b6679b Add MapPalette.getNearestColor (#13104) 2025-10-14 20:28:18 +02:00
Jason Penilla c33a9ce18c Fix incorrect variable use in Entity#startRiding
This diff applied and compiled after updating Parchment, but was incorrectly pointing to a field instead of the parameter

fixes #13182
2025-10-13 14:10:41 -07:00
ffcb7b2209 Update Parchment (#13177)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Pedro <3602279+Doc94@users.noreply.github.com>
2025-10-13 12:55:54 -07:00
Jason Penilla 610f1d2177 Update fill-gradle to v1.0.9 2025-10-11 18:30:55 -07:00
Jason Penilla 9d95cd55a8 Use BUILD_STARTED_AT instead of Instant.now() for build timestamp (#13175) 2025-10-11 17:52:08 -07:00
Jason Penilla ce983d73f0 Misc fixes to tick reporting (#13174) 2025-10-11 16:49:08 -07:00
lucko ba2fb8c9a3 Update spark-paper dependency version (#13171) 2025-10-11 14:56:31 +01:00
Jason Penilla a0ea7297c5 Fix minimum tick time reporting and off thread reading 2025-10-10 19:19:55 -07:00
JustAHuman-xD 056268edf2 [ci skip] Correct javadoc for Weapon Component (#13096) 2025-10-11 02:19:03 +02:00
Spottedleaf fba780d6a2 Rebuild patches
Actually do what the last commit said it was doing...
2025-10-07 11:22:54 -07:00
Spottedleaf fa57d4b7da Remove Vanilla packet processing at start of tick
Our call to runAllTasksAtTickStart() runs that logic and
times it correctly, whereas Vanilla does not record task execution
time for it.
2025-10-07 11:19:00 -07:00
Spottedleaf 3982efa098 Sync Moonrise
See https://github.com/Tuinity/Moonrise/commit/b2968ce710b3365d8b22d537d343477d807bcf45#diff-4ac4a0af7a908348ccdb1ae58ba7819ec41e5ba3f599e058f7060aa06331cacd
We already perform a watchdog shutdown on Paper so these changes
are just to keep the codebases in-sync.
2025-10-07 11:15:12 -07:00
Spottedleaf 8339bb3118 Update DataConverter constants for 1.21.10
https://github.com/PaperMC/DataConverter/commit/77cc8c2f7473a08419734b1ec0b00d13f6f121cb
2025-10-07 11:04:57 -07:00
Jason PenillaandLulu13022002 bae47d3e6b Update to 1.21.10 (#13127)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-10-07 11:00:42 -07:00
Bjarne Koll 0ff899dae3 Prevent world mutation on copper golem spawn cancel (#13152) 2025-10-07 11:32:34 +00:00
Spottedleaf e9fa3a7393 Use correct queue when blocking on futures
See https://github.com/Tuinity/Moonrise/commit/a3ac9c7d2e8d264ffa2a1500dcc23ef357ac8c62
2025-10-06 20:59:42 -07:00
Spottedleaf 914fb084ef Fix Entity#updateFluidHeightAndDoFluidPushing inconsistency with Vanilla
See https://github.com/Tuinity/Moonrise/commit/57982e273e560ca4799eefe8247dfee19902852f
2025-10-06 13:08:03 -07:00
Bjarne Koll 8483163895 Yield millis from Bukkit#getAverageTickTime 2025-10-06 20:49:10 +02:00
Shane Freeder b3d215831a Disable javadoc.io links
revert me when jd.io comes back, maybe
2025-10-06 18:04:03 +01:00
Pedro b4b1f11f40 [ci skip] Add docs for virtual createMerchant in MerchantInventoryViewBuilder#merchant (#13125) 2025-10-06 17:55:32 +01:00
Maddy Miller ffd5158a93 Update 1.21.9 reobf mappings data (#13135) 2025-10-06 17:52:40 +01:00
Matt Baxter 4dcd8377a2 Add CommandSourceStack to UnknownCommandEvent (#13083) 2025-10-05 23:20:51 +01:00
Bjarne Koll 523efa416f Flatten currentTick incr into file patches 2025-10-06 00:18:09 +02:00
Shane Freeder b63dc92e2c Restore currentTick counter increment as temp feature patch 2025-10-05 18:51:42 +01:00
Spottedleaf dc66e8cf6b Return Server#getTPS over minute intervals instead of seconds 2025-10-04 19:21:23 -07:00
Spottedleaf a4a7461cef Rebase fixups
Oops
2025-10-04 11:41:00 -07:00
Spottedleaf dcd7847dc0 Improve server tick loop
See https://github.com/Tuinity/Moonrise/commit/0b842a906ce0cc22bbb3f5c5f228a7dc22a623c4
2025-10-04 11:34:59 -07:00
Spottedleaf 21b49306ab Fix diff in FlowingFluid#canPassThroughWall
The function should not be returning false if the block states
are uncachable.
2025-10-03 11:08:41 -07:00
Jason Penilla e0ba395d37 Add missing plugin ticket comparator fixes #13130 2025-10-03 10:57:04 -07:00
luigiofthebakery a3f247c258 Fix command-block-overrides from commands.yml 2025-10-02 18:36:05 +02:00
Lulu13022002 0102872d87 validate mannequin pose 2025-10-02 18:01:53 +02:00
Lulu13022002 2d7f5ea8a3 add shelf inventory type 2025-10-02 17:32:38 +02:00
Bjarne Koll 5e42ae950c Correctly reset quick crafting state on out of order packet
Correctly emit a inventory click event for out-of-order click packets to
prevent ghost items.
2025-10-02 16:28:37 +02:00
Jason Penilla ec686f7a39 Add ItemTransportingEntityValidateTargetEvent closes #13114 (#13115) 2025-10-01 21:46:45 -07:00
Lulu13022002 311810fa82 fix copper chest inventory
Closes https://github.com/PaperMC/Paper/issues/13117
2025-10-01 18:42:07 +02:00
Lulu13022002 00bf1284d3 remove old test 2025-10-01 17:55:11 +02:00
Lulu13022002 ce3fe65457 fix NPE in legacy profiles
Closes https://github.com/PaperMC/Paper/issues/13120
2025-10-01 17:40:57 +02:00
Lulu13022002 36e0c0ab4e update enchantment target and rework some component impl 2025-10-01 17:03:32 +02:00
Jason Penilla 27f926e7ec Expose Copper Golem weathering state to API (#13089) 2025-09-30 16:55:07 -07:00
Nassim Jahnke dad730f294 [ci skip] Update README 2025-09-30 17:22:58 +02:00
Nassim Jahnke 6950f05d11 Update to 1.21.9 2025-09-30 17:11:04 +02:00
granny 5b6165c48d Add spawnreason for building copper golems (#13112) 2025-09-30 14:26:15 +01:00
Jason Penilla b61b3c9dd2 Update paperweight to 2.0.0-beta.19 2025-09-29 18:05:51 -07:00
Jason Penilla 0b565e9639 Update Gradle wrapper to 9.1.0 2025-09-29 17:36:09 -07:00
Spottedleaf 9df83bc5a2 Update DataConverter to 1.21.9-rc1
https://github.com/PaperMC/DataConverter/commit/3138b268fdb26bccdb8d8c78e6549ba2807216ad
2025-09-29 05:37:45 -07:00
Jason Penilla 79198b18b7 Expose ResolvableProfile for Skull blocks (#13095) 2025-09-28 18:34:19 -07:00
Lulu13022002 f57fd54176 remove api scheduled for removal 2025-09-27 22:20:12 +02:00
Lulu13022002 c1013989b4 remove old configs 2025-09-27 18:57:11 +02:00
EmilandLulu13022002 922c85fe9d Add GAMEMODE_SWITCHER gamemode change cause (#13097)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-09-27 17:16:20 +02:00
Spottedleaf e16b369f6e Resize propagator queues less aggressively
https://github.com/Tuinity/Moonrise/commit/cca38110864f65ab3dd0d7ad1a421ee639fc14fb
2025-09-26 14:59:59 -07:00
Spottedleaf c3a60b8df2 Use ThreadLocal for Starlight and ticket level propagator cache
https://github.com/Tuinity/Moonrise/commit/46d3cbf1eaa159140777a8addc5a44c874083b57
2025-09-26 14:57:58 -07:00
Spottedleaf e97fb4044e Remove parallel generation config option
https://github.com/Tuinity/Moonrise/commit/22e7dd06e87690e43619de1fe06adf349d5cca3f
2025-09-26 14:55:03 -07:00
Jason Penilla 3a0dc7faba Fix a couple PlayerProfile mutability issues 2025-09-26 10:41:48 -07:00
Lulu13022002 673abf4b97 use PlayerShieldDisableEvent#getCooldown 2025-09-26 17:41:47 +02:00
Lulu13022002 5613a35972 fix PlayerGameModeChangeEvent#cancelMessage 2025-09-26 17:31:39 +02:00
Adrian 51fe7aaaf3 Fixed modern forwarding support (#13098) 2025-09-26 00:18:47 -07:00
Jason Penilla 4055274204 Fix empty SkinPatch initialization and swapped dynamic/static heuristic in ResolvableProfile build method 2025-09-25 20:12:28 -07:00
Jason Penilla 404e49fdc6 Update to 1.21.9-rc1 2025-09-25 12:48:24 -07:00
Jason Penilla 1d6ee7dbcc Update adventure 2025-09-24 23:15:54 -07:00
Jason Penilla f6fabc5f4f Call EntityChangeBlockEvent for copper golem statue changes (#13090) 2025-09-24 23:04:19 -07:00
Jason Penilla 6b0b29a9b7 Update publishing endpoint 2025-09-24 21:31:50 -07:00
Spottedleaf 037179fa88 Update Starlight stored version
https://github.com/Tuinity/Moonrise/commit/d2d297b804b98faeb5aab80c73aa247afe3806df
2025-09-23 15:53:35 -07:00
Spottedleaf fada3a7ffb Update DataConverter to 1.21.9-pre4
https://github.com/PaperMC/DataConverter/commit/a3321c9b42d8a5f546ea99adcf047ad6e75a80a0
https://github.com/PaperMC/DataConverter/commit/9c1546f41101ab2b32f9d11a41d1a4742cd96df6
2025-09-23 15:43:58 -07:00
Jason Penilla 634f51e3fc Update to 1.21.9-pre4
includes parchment update
2025-09-23 14:08:14 -07:00
Jason Penilla 44259ea529 Add ResolvableProfile.SkinPatch (#13091) 2025-09-23 11:28:10 -07:00
Jason Penilla e6f14832db Update to 1.21.9-pre3 2025-09-22 10:10:08 -07:00
Jason Penilla 0e23b0242c Add back null check for chunkPacketBlockController
This is needed due to a circular reference during controller init
2025-09-21 12:16:59 -07:00
Jason Penilla dc474a8946 Fixup vanilla code for Anti-Xray changes 2025-09-20 12:13:47 -07:00
Jason Penilla 4d7185f6ab Add AsyncPlayerSpawnLocationEvent#isNewPlayer (#13081) 2025-09-20 12:01:34 -07:00
Jason Penilla 25ecc59009 Enable Anti-Xray 2025-09-20 11:40:48 -07:00
Lulu13022002 cb9fc05d6d simplify overloads 2025-09-20 19:10:19 +02:00
Jason Penilla 2efb400a13 [ci skip] Adjust spawn location event docs 2025-09-19 15:49:41 -07:00
Lulu13022002 1f79388ddd fix end portal teleportation 2025-09-19 23:42:08 +02:00
Spottedleaf f43641f86f Use ConcurrentUtil 0.0.5
For
https://github.com/Tuinity/ConcurrentUtil/commit/c3293d1d16b0196cbc8dc7ee8e813fbfbe9caa30
2025-09-19 11:53:28 -07:00
Jason Penilla 121ac2eb29 Port the last Anti-XRay hunk 2025-09-19 11:31:32 -07:00
Jason Penilla 4a8e88dcb2 Disable oldPaperCommit to fix CI build 2025-09-19 11:14:04 -07:00
Nassim Jahnke 90b29c4ccf Port most of the anti-xray patch 2025-09-19 20:13:32 +02:00
Jason Penilla f2cb073aad Set build channel to alpha 2025-09-19 10:58:38 -07:00
Jason Penilla 4025289290 Add pre2 to api version
This is similar to what we did with 1.18-rc3 builds
2025-09-19 10:43:33 -07:00
Lulu13022002 60cb0dfc7f generate ClientOption enums and mark CraftBlockData impl as null marked 2025-09-19 17:13:07 +02:00
Lulu13022002 cf78f2a288 bump api-version/datapack format and add a copper torch tag 2025-09-19 15:59:34 +02:00
Bjarne Koll 0ea15c97a0 Drop no longer applicable ATs 2025-09-19 15:54:52 +02:00
Owen1212055 22ad451907 Move some stuff to ATs 2025-09-19 09:45:03 -04:00
Bjarne Koll 5d3aa53748 Some diff improvements in prepare spawn task 2025-09-19 14:41:14 +02:00
Bjarne Koll 9360ba426a Identifying comments for MinecraftServer 2025-09-19 14:40:32 +02:00
Bjarne Koll 0249204303 1.21.9-pre2 feature patches 2025-09-19 14:22:20 +02:00
Bjarne Koll bb017458ff 1.21.9-pre2 2025-09-19 14:15:47 +02:00
Spottedleaf eb421583b4 Use 0.0.4 release of ConcurrentUtil
https://github.com/Tuinity/Moonrise/commit/bab92354c01990ae54d734bc4395873918a330ca
2025-09-18 21:55:54 -07:00
Jason Penilla bc2ae1075b Fix default respawn dimension being null for new worlds 2025-09-18 19:39:30 -07:00
Jason Penilla 24874e5369 Also rename Mannequin profile getter/setters for consistency 2025-09-18 17:43:40 -07:00
Jason Penilla 6f9957e82b Mannequin#createDefaultProfile -> Mannequin#defaultProfile
ResolvableProfile is immutable
2025-09-18 17:40:55 -07:00
Lulu13022002 2779a538bb deprecate #lanterns material tag in favour of vanilla tag 2025-09-18 21:32:43 +02:00
Lulu13022002 6b7bf0141c bump built-in datapack version 2025-09-18 20:41:55 +02:00
Lulu13022002 03eb18bb32 replace requireNonNull by checkArgument and deprecate MCUtil#toLocation 2025-09-18 20:09:54 +02:00
Lulu13022002 fcc763adaf Call BlockRedstoneEvent for the shelf 2025-09-18 18:50:49 +02:00
Lulu13022002 a3c89a8f95 add javadocs for new api
and fix some typos
2025-09-18 18:40:25 +02:00
Lulu13022002 388e6936ea update generator
Couple of changes coming from the other branch/PRs:
- add support for defining registry constants out
of their value class (already required by at least 4 PRs).
- remove version hint in the generated annotation (to avoid noise during updates)
- basic support for parameterized types in API
- tweaks bootstrap to allow usage of dimension registries
2025-09-18 16:51:09 +02:00
Spottedleaf b6d955746f Apply "Optimize Hoppers" 2025-09-17 18:46:17 -07:00
Spottedleaf 2f4211edf2 Apply "Improve cancelling PreCreatureSpawnEvent with per player mob spawns" 2025-09-17 18:41:12 -07:00
Spottedleaf 086b4fd4f6 Apply "Optional per player mob spawns" 2025-09-17 18:28:34 -07:00
Spottedleaf 8f659478cd Apply "Optimise EntityScheduler ticking" 2025-09-17 18:22:13 -07:00
Spottedleaf ec492d3fa5 Apply "Improve keepalive ping system" 2025-09-17 18:18:47 -07:00
Spottedleaf 920e8d35a9 Apply "Optimise collision checking in player move packet handling" 2025-09-17 18:10:35 -07:00
Spottedleaf 55d56d9138 Apply "Flush regionfiles on save configuration option" 2025-09-17 18:02:07 -07:00
Spottedleaf 65250cbe30 Drop "Optimize Collision to not load chunks"
Covered by Moonrise
2025-09-17 18:00:36 -07:00
Spottedleaf 9a626dd7ed Rewrite ticket counter system
The old method of tracking the counts was to copy a
Long2IntOpenHashMap each time a count was removed or added. This
was under the assumption that tickets with counter types were not
being added or removed frequently.

The new system uses ConcurrentLong2LongChainedHashTable instead
to support concurrently updating ticket counters for different
positions.
We copy the map when retrieving the forced chunks, however this
appears to only be used in the ForceLoad command so this shouldn't
be an issue.

Additionally, the ticket counts were not updated if the ticket
were to expire or if the ticket was UNKNOWN and added during
ChunkHolderManager#removeTicket(). These issues are now resolved.
2025-09-17 17:54:25 -07:00
Spottedleaf e3aca9211d Replace ConcurrentUtil's Validate with Objects
Validate will be removed, and the methods in Objects are a
suitable replacement.
2025-09-17 15:54:32 -07:00
Jason Penilla 8bb12cbd35 Fix compile 2025-09-17 12:36:53 -07:00
Jason Penilla 9b69cc5a8f Add some more Mannequin API 2025-09-17 12:34:14 -07:00
Jason Penilla b31ca18cfc Update 'Incremental chunk and player saving', 'Optimise general POI access' 2025-09-17 11:48:43 -07:00
Jason Penilla 181f9bbc08 Update 'Entity load/save limit per chunk', 'Attempt to recalculate regionfile header if it is corrupt' 2025-09-17 11:45:16 -07:00
Jason Penilla 35e973d387 Update 'Improve exact choice recipe ingredients', 'Only write chunk data to disk if it serializes without throwing' 2025-09-17 11:43:49 -07:00
Jason Penilla 87e05257b6 Update alternate redstone impls 2025-09-17 11:40:46 -07:00
Jason Penilla 49e49d057b Update 'Fix entity tracker desync when new players are added to the tracker' 2025-09-17 11:33:11 -07:00
Jason Penilla 98e745a0a8 Update 'Optimize Pathfinder - Remove Streams / Optimized collections' 2025-09-17 11:32:15 -07:00
Jason Penilla 92f822d4ee Update 'Optimize Bit Operations by inlining', 'Remove streams from hot code' 2025-09-17 11:22:54 -07:00
Jason Penilla f0b3d62594 Update 'optimize dirt and snow spreading' and drop 'Optimise getChunkAt calls for loaded chunks' patch to code replaced by Moonrise 2025-09-17 11:17:05 -07:00
Jason Penilla 5aac8b4893 Update 'Handle Oversized block entities in chunks' 2025-09-17 11:12:38 -07:00
Jason Penilla 532348681e Update 'Optimize Voxel Shape Merging' 2025-09-17 11:09:25 -07:00
Jason Penilla 87f3e2f00f Update 'Optimize GoalSelector Goal.Flag Set operations' 2025-09-17 11:08:29 -07:00
Jason Penilla 6b44820108 Update 'Use Velocity compression and cipher natives' 2025-09-17 11:05:59 -07:00
Jason Penilla bcd75d8518 Update EAR 2.0 patch and enable oldPaperCommit for better 3-way merges 2025-09-17 10:58:32 -07:00
Jason Penilla 89cc24a863 Update 'Allow Saving of Oversized Chunks' 2025-09-17 10:18:29 -07:00
Jason Penilla 510aa9b421 Update 'Optimize Network Manager and add advanced packet support' 2025-09-17 10:13:08 -07:00
Jason Penilla 114105815d Shift feature patch #s for Moonrise being first 2025-09-17 10:03:18 -07:00
Spottedleaf 1870261762 Update Moonrise to 1.21.9-pre1 2025-09-16 21:34:37 -07:00
Owen1212055 810b3c6cd6 Deprecate the Conversation API (for removal), Metadata API, and PlayerSpawnLocationEvent (for removal)
The Conversation API has been left to rot for the past few years and is considered dead. It does not support components and has had functionality ripped out over the years. Because of this, it is being deprecated for removal.

The metadata API is extremely misleading and causes memory leaks on every server I have seen use it. It just promotes bad practices and is misleading. The PDC system and just having their own solutions is better for developers.

Lastly deprecate PlayerSpawnLocationEvent for removal as events using this hack will be aggressively removed as we move towards better supporting the config API.
2025-09-16 23:41:19 -04:00
Jason Penilla f9434d2cf0 Use pitch when setting spawn position with Location 2025-09-16 19:38:06 -07:00
Jason Penilla 68f26a1ba6 Drop no-longer-needed packet diffs
We don't need to scale this anymore as vanilla has per-level world borders
2025-09-16 19:34:45 -07:00
Jason Penilla b67fa6ddf6 move todos txt content into tracking issue 2025-09-16 18:54:41 -07:00
Jason Penilla 0a2881674e Add Server#getRespawnWorld and Server#setRespawnWorld(World) 2025-09-16 18:48:59 -07:00
7e706369b4 Initial 1.21.9 update (squashed)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2025-09-16 18:32:37 -07:00
Jason Penilla 29c8822d90 Remove no longer needed MC-210802 fix (#13059) 2025-09-06 14:38:29 -07:00
Lulu13022002 19156cdd3b Give the right amount of experience after mending (#13047) 2025-09-06 13:49:56 -07:00
Spottedleaf 9aaaadffaa Backport DFU changes from snapshots
When converting to components:
 - Remove enchantments with levels <= 0
 - Remove the item name if it is not valid JSON
 - Remove lore entries that are not valid JSON
2025-09-03 14:59:39 -07:00
Spottedleaf 78aecfebaf Do not remove plugin chunk tickets on shutdown
The chunk system may not be responsive in a shutdown (i.e
watchdog timeout). Therefore, we should avoid interacting
with the chunk system to increase the odds of a graceful
shutdown.
2025-09-03 14:25:27 -07:00
Jason Penilla 65641d1006 Only log name instead of full profile for configuration phase disconnects (#13038) 2025-08-29 13:32:10 -07:00
Emil 49ca2d2d76 chore: remove experimental status from Damageable#damage (#13021) 2025-08-29 18:15:29 +01:00
Jason Penilla 63cd4af408 Fix createProfile not always returning a new profile (#13036) 2025-08-29 09:42:35 -07:00
Jason Penilla 704107c3dd Resend frozen ticks when cancelling EntityInsideBlockEvent for powder snow fixes #13033 (#13035) 2025-08-28 18:11:29 -07:00
Jason Penilla 9d1d0ef3f3 Add and call RegionizedServerInitEvent from Folia (#13034) 2025-08-28 18:09:09 -07:00
Jason Penilla b6168b7ccc Get console Brig suggestions from main thread fixes #13027 (#13028) 2025-08-28 17:25:42 -07:00
Shane Freeder 51706e5ac1 Fixed DyeItem sheep dye hunk 2025-08-25 02:49:26 +01:00
614e9acfca Improve APIs around riptide tridents (#12996)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-08-23 21:12:30 +00:00
MCdragonmaster 52d9a2216c [ci skip] Fix typo in Display javadoc (#13010) 2025-08-23 20:59:05 +00:00
42b653b197 Expose more argument types (#12665)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-08-23 21:10:41 +01:00
Strokkur24andLulu13022002 5622c9dd73 Expose attribute sentiment (#12974)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-08-23 17:15:16 +00:00
Pedro a9e7674933 Support for showNotification in PlayerRecipeDiscoverEvent (#12992) 2025-08-23 17:53:46 +01:00
MC_XiaoHeiandJake Potrebic ea014f7a77 feat: add stuckEntityPoiRetryDelay config (#12949)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2025-08-23 09:39:19 -07:00
Warrior 79cf1353b9 Ignore HopperInventorySearchEvent when it has no listeners (#13009) 2025-08-23 16:25:40 +00:00
Lulu13022002 1922be9074 Update custom tags (#12183) 2025-08-23 16:53:07 +01:00
Pedro b0da38c278 Repository details in RuntimeException for MavenLibraryResolver#addRepository (#12939) 2025-08-22 11:25:08 +01:00
Moulberry 38fe16b5f2 Fix missing reason in disconnectAsync (#13001) 2025-08-21 22:13:31 +01:00
Moulberry f866a5fd54 Use LinkedHashMap in ChannelInitializeListenerHolder (#13000) 2025-08-19 17:53:03 +02:00
Esophose 616a8795ea Add LootTable to BlockDispenseLootEvent (#12917) 2025-08-17 15:53:00 +01:00
Strokkur24 47f983f430 Add allow-remote-ender-dragon-respawning setting (#12602) 2025-08-17 13:49:30 +02:00
Pedro b200237c7d Fix clone return for Paper PlayerProfile (#12984) 2025-08-15 21:56:54 +01:00
David a22447a555 Added getWorldPath to World API (#12952) 2025-08-15 21:39:09 +01:00
Warrior a743e6b1c7 [ci skip] Clarify tab completion ordering in event jd (#12965) 2025-08-15 21:33:10 +01:00
Warrior 2456ff26ed [ci skip] Update javadoc for tinted leaves particle (#12962) 2025-08-15 21:30:16 +01:00
Emil 651fa124c5 Fix cancelled EnderDragonShootFireballEvent playing sound (#12977) 2025-08-15 21:55:31 +02:00
swim5678 f0c1f856f2 Fix Phantom entity Spawn reason (#12980) 2025-08-14 17:46:02 +01:00
Jason Penilla 86b716bc5b Fix BlockFadeEvent not being called when fire extinguishes in rain (#12972) 2025-08-13 08:29:06 -07:00
Alejandro Nieto 4fe66e5800 Fix lead_break sound playing after cancelling EntityUnleashEvent (#12944) 2025-08-12 11:01:39 +02:00
Alejandro Nieto 3d1425f086 Fix phantoms failing to target players near non-insomniacs (#12953) 2025-08-11 22:13:29 +02:00
Pedro abf6b6c228 Allow replace effects in Consumable Component Builder (#12938) 2025-08-08 18:17:34 +02:00
Žiga Slatnar Štagar a664311f0f Fix AbstractArrow not setting noPhysics flag (#12935) 2025-08-07 12:55:48 -04:00
Lumine1909andHelvetica Volubi 9694886daa Fix endermite spawn position
The player teleport has been moved up in ThrownEnderpearl to prevent
endermite spawning in case of a cancelled teleport. This however placed
the player at the teleport destination prior to the endermite spawn
logic, creating the entity at the wrong location.

The commit stores the location of the player pre teleportation and uses
said location for spawning the endermite instead.

Co-authored-by: Helvetica Volubi <suisuroru@blue-millennium.fun>
Reviewed-in: https://github.com/PaperMC/Paper/pull/12912
2025-08-07 12:36:47 +02:00
Pedro 6d0833ece5 Use target level for waypoint modify command (#12933) 2025-08-07 12:36:23 +02:00
Emily 846c64f4d1 Allow for sending plugin messages during configuration stage (#12915) 2025-08-04 15:06:52 +02:00
Bjarne Koll e9380882f2 Lazy evaluate ender chest inventory holder 2025-08-04 14:45:52 +02:00
Warrior c60f4436f0 Restore players being the inventory holder of an enderchest (#12923) 2025-08-04 13:53:50 +02:00
Gero bf465e0029 Cancel hit for all vanished entities, not only players (#12906) 2025-08-03 17:17:41 +02:00
Red ed31825a8d HIDE_ADDITIONAL_TOOLTIP backwards compat. not hiding disc names (#12900) 2025-07-30 22:26:35 -04:00
Jason Penilla 0c8efe4d02 [ci skip] Remove redundant adventure version specification
This is handled by a version constraint from the BOM dependency in -api
2025-07-30 10:48:12 -07:00
Kezz ec9c83fa2b Adventure 4.24.0 (#12908) 2025-07-30 10:43:51 -07:00
TonytheMacaroni a4da45e3b2 Fix typo in give command (#12905) 2025-07-30 08:52:40 +01:00
Jake Potrebic 4f79e9eeca [ci skip] no need to ever import non-library files ever again (#12765) 2025-07-29 20:25:43 -04:00
Théo SZANTO 4d44b5fd55 Remove @Experimental annotation from the org.bukkit.damage package (#12898) 2025-07-29 20:22:46 -04:00
Noah van der Aa dbc367ba2d Keep non-container slots synced when in container view (#12881) 2025-07-26 21:46:30 +00:00
David a57636189a Add WorldDifficultyChangeEvent (#12471) 2025-07-26 23:38:16 +02:00
David Mayr 57c13137e4 Allow to change despawnInPeaceful (#12880) 2025-07-26 14:13:42 -07:00
Alejandro Nieto 9ccc51df43 Fix legacy pearls forgetting owner on disconnect (#12884) 2025-07-26 21:53:29 +02:00
Lulu13022002 840dd9e1f8 Fix dialog preconditions (#12895) 2025-07-26 21:35:19 +02:00
David 6bb9dc6b73 Normalize and trim spaces in Player#performCommand (#12892) 2025-07-26 21:29:47 +02:00
Bjarne Koll 103187750e [ci skip] Update mache for codebook 1.0.15 (#12887) 2025-07-24 01:24:41 +02:00
Nassim Jahnke a5f2f6140d Fix offhand item desync on cancelling interact events (#12828) 2025-07-22 10:42:22 +02:00
c8a8c0ef89 feat(plugin): make Plugin extend Namespaced (#12867)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2025-07-20 22:01:22 +00:00
ookiegajwaandBjarne Koll 602ea9f0e1 Restore previous PlayerToggleSneakEvent behaviour (#12815)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2025-07-20 23:54:27 +02:00
Jake Potrebic 617e5a46a1 Update to configurate 4.2.0 (#12869) 2025-07-20 23:05:42 +02:00
Jake Potrebic a2d37f12fb Remove invalid team colors nicely (#12874) 2025-07-20 22:42:24 +02:00
Fisher 782ce950b8 Allow forcing break effects when using breakNaturally (#12734) 2025-07-18 22:17:38 +02:00
Umbre11as 0dad7f150b Add Bee#set/getTimeSinceSting() methods (#12792) 2025-07-18 22:17:06 +02:00
metabrix f7c59f914c Fix broken resource pack API when configured in configuration stage (#12866)
Correctly return the resource pack status from Player#getResourcePackStatus()
when the resource pack was send and accepted during the configuration stage.
2025-07-18 20:22:28 +02:00
Spottedleaf aa4ef06748 Update DataConverter constants for 1.21.8 2025-07-17 16:23:33 -07:00
Junhyung Park 6fb36e34b6 Replace compileOnly with implementation for test visibility (#12841) 2025-07-17 18:01:04 +02:00
Tamion 1f93f56670 [ci-skip] Improve getPotentialBedLocation deprecation (#12857) 2025-07-17 17:59:36 +02:00
Spottedleaf d8cb3f5852 Update DataConverter to 1.21.8-RC1
Add a non-Vanilla converter which removes ENTITY fall_distance
entries if they are equal to 0.0. This fixes incorrectly
converted data before https://github.com/PaperMC/DataConverter/commit/b6675e47ca068f152c3b648b3869fe63ca12b720
2025-07-17 07:03:10 -07:00
Bjarne Koll 6db4bc01a6 1.21.8 generators 2025-07-17 15:48:06 +02:00
Bjarne Koll a4feb28898 Update to 1.21.8 2025-07-17 15:47:55 +02:00
David e792779dd8 Allow AreaEffectCloud#setColor to reset color for null (#12760) 2025-07-16 22:00:54 +02:00
David a6e0c08fdf Add getRotation to Location (#12799) 2025-07-16 21:52:05 +02:00
Jason Penilla 22d80a3b3b [ci skip] Update Gradle wrapper and Fill plugin (#12846) 2025-07-16 11:00:29 -07:00
Spottedleaf 04f95191f1 Fix spawners converted from 1.21.4 not running finalisation logic
DataConverter incorrectly placed a fall_distance value with 0.0
if the entity did not have a FallDistance entry. This results in the
entity spawn data having 2 entries, which prevents finalisation
logic from running.

We can fix this by removing the fall_distance entry if it is 0.0.

In 1.21.8 there will be a proper fix for this and the patch can be
dropped.
2025-07-16 10:33:06 -07:00
Spottedleaf 21fb54246e Do not write fall_distance tag unless it already existed before
It looks like BaseSpawner will not run natural spawn finalization
unless the entire data tag only contains the ID.

This only fixes converting old data, we need a fix for already
converted data.
2025-07-15 17:09:06 -07:00
Shane Freeder 94d60e15b3 Copy thrown pearls list for removal (#12840) 2025-07-14 23:04:02 +02:00
Clexus bda84069b4 [ci skip] fix typo in AttributeInstance (#12843) 2025-07-14 17:57:12 +02:00
Brokkonaut d9b5003fa1 Dried Ghast events and Happy Ghast spawn reason (#12788) 2025-07-14 17:56:44 +02:00
Jake Potrebic 533d93c758 Don't consume anchor charge if loc changes (#12835) 2025-07-12 19:03:48 +00:00
Jake Potrebic ba7c982605 Add missing Range annotations to dialog types
Closes #12825
2025-07-12 09:01:14 -07:00
Lach 25d358cf01 [ci skip] javadoc: Fix grammatical error for getState (#12817) 2025-07-12 17:44:23 +02:00
David 4000fcc3d7 Fix typo in PluginBootstrap javadocs (#12821) 2025-07-12 17:43:49 +02:00
caramel fcfc6c3fe8 Expose HexColor argument type (#12833) 2025-07-12 17:41:21 +02:00
partydev 76fb5060c1 Add vanilla error message to precondition for DialogBaseImpl (#12831) 2025-07-12 11:15:48 +02:00
Jason Penilla 1bf6364b97 Update Mache for horse decompile fix 2025-07-11 18:07:23 -07:00
Bjarne Koll 40764534a2 Specify the class loader when loading services (#12829) 2025-07-11 18:05:07 -07:00
Nassim Jahnke cb47e01823 Remove more dead code, fix pre-existing desync when cancelling and closing container 2025-07-11 22:24:20 +02:00
Nassim Jahnke a939945148 Fixup sendAllDataToRemote calls
Reduces unnecessary item copies by a lot
2025-07-11 17:43:05 +02:00
Jake Potrebic b4466ec981 Dialog API (#12671) 2025-07-06 20:49:43 +02:00
Jason Penilla f7d5a0a017 [ci skip] Add remote build cache configuration through Gradle properties (#12797) 2025-07-04 13:12:45 -07:00
6e598f8527 Fix incorrect createPath overload arguments, fixes #12043 (#12794)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2025-07-03 12:40:19 -07:00
Owen 0cadaefc09 Fix quitmessage nullability issues (#12783) 2025-07-01 18:44:17 -04:00
David 2141ca5273 Port plugins command to brigadier (#12632) 2025-07-01 16:24:38 -04:00
Shane Freeder 108255cbbb Reduce PlayerLoginEvent alt behavior nag for now (#12782) 2025-07-01 21:47:37 +02:00
Nassim Jahnke 3fec37a9c1 Move the double call into the dispatch method
At some point later,
2025-07-01 21:44:24 +02:00
Nassim Jahnke c3be00f0ec Always call plugin message dispatch on PlayerConnection 2025-07-01 21:09:44 +02:00
Owen 6ea679eb07 Allow listening to plugin messages during configuration phase (#12775) 2025-07-01 15:40:50 +02:00
Newwind 51d28af8fa [ci skip] Typo in CartographyInventory (#12777) 2025-06-30 19:17:27 -07:00
PedroandLulu13022002 5661fbbab9 Add registry builder for Instrument (#12682)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-06-30 21:33:02 +02:00
masmc05 6e021c8272 Fix CraftContainer#getNotchInventoryType detection of player inventory (#12751) 2025-06-30 19:33:40 +02:00
masmc05 00e79dfb22 Fix wrong size in InventoryType#PLAYER (#12758) 2025-06-30 19:32:05 +02:00
Jake Potrebic 4cdcf00dca Only namespaced reload (#12773) 2025-06-30 10:27:30 -07:00
Pedro 723510f9aa Make warning of PlayerLoginEvent use unique plugin names (#12772) 2025-06-30 19:27:20 +02:00
Noah van der Aa 9686f8b34d Enable obfuscation mappings for 1.21.7 (#12770) 2025-06-30 17:31:40 +02:00
Spottedleaf 4c47c76ecf Update DataConverter constants for 1.21.7
https://github.com/PaperMC/DataConverter/commit/04b08a102a3d2473420edceed05420b5ccb3b771
2025-06-30 08:28:39 -07:00
Nassim Jahnke 4045339e4c 1.21.7 2025-06-30 16:16:56 +02:00
Owen1212055 a9f74cbf6e Readd dropped diff during 1.21.6 2025-06-30 11:49:21 +02:00
Jake Potrebic 371a422567 Remove a bunch more experimental annotations (#12712) 2025-06-30 11:49:19 +02:00
Owen 7f60924390 Configuration API (#12301)
This implements a solution that preemptively exits the tick loop if we have already marked the connection as disconnecting. This avoids changing the result of Connection#isConnected in order to avoid other possibly unintentional changes. Fundamentally it should be investigated if closing the connection async is really still needed.

This also additionally removes the login disconnecting logic for server stopping, as this was also a possible issue in the config stage but also shouldn't be an issue as connections are closed on server stop very early.

Additionally, do not check for isConnecting() on VERIFYING, as that seemed to be an old diff originally trying to resolve this code, however isConnected is not updated at this point so it pretty much was useless.
2025-06-30 11:49:15 +02:00
Bjarne Koll dda39a0f05 1.21.7-rc2 2025-06-30 11:49:13 +02:00
Nassim Jahnke 4d854e66b8 Disable MC-163962 fix by default
It changes restocking behavior pretty drastically compared to Vanilla, keep it as a config option for those that want it

Fixes #12761
2025-06-30 11:39:07 +02:00
Jake Potrebic 57c202e015 Allow adventure nbt codec to parse all tags 2025-06-28 13:05:31 -07: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.

https://github.com/Tuinity/Moonrise/commit/aef2b81d6e805f6af7d12d904fb88cdca1f721ca
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 https://github.com/PaperMC/DataConverter/commit/142ec80d2892a1978ccd0a85a8f99e704e4b3a8d
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
https://github.com/PaperMC/DataConverter/commit/b388a85809b1af6a762339d33c6afa6a4bd45d50

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
https://github.com/Tuinity/Moonrise/commit/0451444abfd5f0011afe13054347c11a8f57de59
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
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
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
DavidandOwen1212055 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
OwenandWarrior 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 TowneandBjarne Koll 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
PedroandTamion 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
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
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
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
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
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
+1 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
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
MartandWarrior 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
Davidanddavid 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 AaandWarrior 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
bonanandTamion 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
masmc05andBjarne Koll 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
caramelandBjarne Koll 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 KollandTonytheMacaroni 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 Aaandleguan 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
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
powercas_gamer bdfad1c838 Add sendRich/PlainMessage methods to Server (#11872) 2024-12-31 19:47:57 -05:00
Jason Penilla 9298f593b7 Update paperweight to 2.0.0-beta.10 2024-12-30 12:35:18 -08:00
3614 changed files with 135264 additions and 102000 deletions

No files matched your search

+14 -12
View File
@@ -1,32 +1,34 @@
root = true
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=4
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
ij_any_block_comment_add_space = false
ij_any_block_comment_at_first_column = false
ij_any_line_comment_at_first_column = false
ij_any_line_comment_add_space = true
[*.tiny]
indent_style=tab
indent_style = tab
[*.bat]
end_of_line=crlf
end_of_line = crlf
[*.yml]
indent_size=2
indent_size = 2
[*.patch]
trim_trailing_whitespace=false
trim_trailing_whitespace = false
[*.java]
ij_continuation_indent_size = 4
ij_java_class_count_to_use_import_on_demand = 999999
ij_java_insert_inner_class_imports = false
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_parameters = 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]
indent_size = 2
[paper-api-generator/generated/**/*.java]
ij_java_imports_layout = $*,|,*
[paper-{server,api}/src/generated/java/**/*.java]
ij_java_imports_layout = $*, |, *
+29 -11
View File
@@ -16,37 +16,48 @@ on:
jobs:
build:
env:
ORG_GRADLE_PROJECT_paperBuildCacheEnabled: true
ORG_GRADLE_PROJECT_paperBuildCacheUsername: ${{ secrets.PAPER_BUILD_CACHE_USERNAME }}
ORG_GRADLE_PROJECT_paperBuildCachePassword: ${{ secrets.PAPER_BUILD_CACHE_PASSWORD }}
ORG_GRADLE_PROJECT_paperBuildCachePush: true
# The goal of the build workflow is split into multiple requirements.
# 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)
# 3. Run on labeled PRs that have the build-pr-jar flag.
# 3. Run on labeled PRs that have the publish-pr flag.
if: >
(
(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.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
strategy:
matrix:
java: [21]
fail-fast: true
steps:
- if: ${{ github.event_name == 'push' }}
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' }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: JDK ${{ matrix.java }}
- name: JDK 25
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
java-version: 25
distribution: 'zulu'
- name: Setup Gradle
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
uses: actions/github-script@v7
@@ -69,14 +80,14 @@ jobs:
if (event_name === "push" && ref_type === "branch") {
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) {
result["pr"] = pull.number;
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)})`);
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["action"] = "paperclip";
core.notice(`This is a pull request action with a build paperclip label (${JSON.stringify(result)})`);
@@ -98,20 +109,27 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Results (${{ matrix.java }})
name: Test Results
path: |
**/build/test-results/test/TEST-*.xml
- name: Create Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
run: ./gradlew createMojmapPaperclipJar --stacktrace
run: ./gradlew createPaperclipJar --stacktrace
- name: Upload Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
uses: actions/upload-artifact@v4
with:
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
path: paper-server/build/libs/paper-paperclip-*-mojmap.jar
path: paper-server/build/libs/paper-paperclip-*.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:
name: "Event File"
# Only run on PRs if the source branch is on someone else's repo
-84
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);
+3 -2
View File
@@ -18,10 +18,11 @@ jobs:
steps:
- name: "authenticate"
id: "authenticate"
uses: "tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92" # v1
uses: "tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a" # v2.1.0
with:
installation_retrieval_mode: id
installation_retrieval_payload: "36153445"
app_id: "${{ secrets.PROJECTS_APP_ID }}"
installation_id: "36153445"
private_key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
- uses: PaperMC/update-projects-action@v0.2.0
+36
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]'
+5 -3
View File
@@ -21,12 +21,14 @@ jobs:
uses: dawidd6/action-download-artifact@v6
with:
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
uses: EnricoMi/publish-unit-test-result-action@v2
with:
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 }}
files: "artifacts/**/*.xml"
files: "test_artifacts/**/*.xml"
comment_mode: off
+2 -1
View File
@@ -20,6 +20,7 @@ nbactions.xml
bin/
dist/
manifest.mf
__pycache__/
# Mac filesystem dust
.DS_Store/
@@ -45,7 +46,7 @@ logs/
!gradle/wrapper/gradle-wrapper.jar
test-plugin.settings.gradle.kts
paper-api-generator.settings.gradle.kts
paper-generator.settings.gradle.kts
# Don't track patched vanilla submodules
paper-server/src/minecraft/
+97 -39
View File
@@ -21,13 +21,13 @@ which can be obtained in (most) package managers such as `apt` (Debian / Ubuntu;
you will most likely use this for WSL), `homebrew` (macOS / Linux), and more:
- `git` (package `git` everywhere);
- A Java 21 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
- A Java 25 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
- [Adoptium](https://adoptium.net/) has builds for most operating systems.
- Paper requires JDK 21 to build, however, makes use of Gradle's
- Paper requires JDK 25 to build, however, makes use of Gradle's
[Toolchains](https://docs.gradle.org/current/userguide/toolchains.html)
feature to allow building with only JRE 11 or later installed. (Gradle will
automatically provision JDK 21 for compilation if it cannot find an existing
install).
feature to allow building with only JRE 21 or later installed. (Gradle will
automatically provision JDK 25 for compilation if it cannot find an existing
installation).
If you're on Windows, check
[the section on WSL](#patching-and-building-is-really-slow-what-can-i-do).
@@ -36,11 +36,11 @@ If you're compiling with Docker, you can use Adoptium's
[`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin/) images like so:
```console
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:21.0.5_11-jdk bash
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:25.0.2_10-jdk bash
Pulling image...
root@abcdefg1234:/# javac -version
javac 21.0.5
javac 25.0.2
```
## Understanding Patches
@@ -66,7 +66,7 @@ On Windows, remove the `./` the beginning of `gradlew` commands;
**Only changes made in `paper-server/src/minecraft` have to deal with the patch system.**
`paper-server/src/minecraft` is not a git repositories in the traditional sense. Its
initial commits are the decompiled and deobfuscated Minecraft source files. The per-file
initial commits are the decompiled Minecraft source files. The per-file
patches are applied on top of these files as a single, large commit, which is then followed
by the individual feature-patch commits.
@@ -184,14 +184,37 @@ These steps assume the `origin` remote is your fork of this repository and `upst
## PR Policy
We'll accept changes that make sense. You should be able to justify their
existence, along with any maintenance costs that come with them. Using
[obfuscation helpers](#obfuscation-helpers) aids in the maintenance costs.
existence, along with any maintenance costs that come with them.
Remember that these changes will affect everyone who runs Paper, not just you
and your server.
While we will fix minor formatting issues, you should stick to the guide below
when making and submitting changes.
### Branches and Minecraft Versions
Generally, PRs should be targeted at the `main` branch, where active development for
the latest Minecraft release happens.
If a new Minecraft release is imminent, it may be wise to wait until it's released
and merged to `main` to avoid having to rebase your PR, as the `main` branch will be
frozen during this time (you can ask in the Paper Discord if you're unsure).
For old Minecraft versions - we are unlikely to accept PRs targeting any versions not
marked as supported at https://fill-ui.papermc.io/projects/paper.
For snapshots and other pre-release versions - you should only target these branches
for changes specific to features or changes in those versions. For example, if Copper
Golem is going to be added in 1.21.9, you can PR to the relevant dev branch as it would
not make sense to merge that into `main`. Or, if you are fixing a bug that only exists in
a dev branch, you should target that branch. When submitting PRs to dev branches, please
coordinate with the dev team in Discord or open an issue before starting work to ensure
it's an area we want to accept changes for. The team prefers to handle initial updating
work through to the server running ourselves, so do not attempt to PR version updates
(i.e. 25w42a -> 25w43a, etc.) or while there are still unapplied source patches. Feature
patches are also not applied until at earliest the pre-release phase to avoid unnecessary
churn.
## Formatting
All modifications to Vanilla files should be marked. For historical reasons,
@@ -208,7 +231,8 @@ required.
with `// Paper end - <COMMIT DESCRIPTION>`.
- 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.
Here's an example of how to mark changes by Paper:
@@ -256,13 +280,47 @@ public class SomeVanillaClass {
We are in the process of switching nullability annotation libraries, so you might need to use one or the other:
**For classes we add**: Fields, method parameters and return types that are nullable should be marked via the
**For classes, we add or modifications to Vanilla Files**: Fields, method parameters and return types that are nullable should be marked via the
`@Nullable` annotation from `org.jspecify.annotations`. Whenever you create a new class, add `@NullMarked`, meaning types
are assumed to be non-null by default. For less obvious placing such as on generics or arrays, see the [JSpecify docs](https://jspecify.dev/docs/user-guide/).
**For other classes**: Keep using both `@Nullable` and `@NotNull` from `org.jetbrains.annotations`. These
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
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
@@ -323,26 +381,6 @@ index a92bf8967..d0ab87d0f 100644
```
-->
## Obfuscation Helpers
While rarely needed, obfuscation helpers are sometimes useful when it comes
to unmapped local variables, or poorly named method parameters. In an effort
to make future updates easier on ourselves, Paper tries to use obfuscation
helpers wherever it makes sense. The purpose of these helpers is to make the
code more readable and maintainable. These helpers should be made easy to
inline by the JVM wherever possible.
An example of an obfuscation helper for a local variable:
```java
double d0 = entity.getX(); final double fromX = d0; // Paper - OBFHELPER
// ...
this.someMethod(fromX); // Paper
```
While they may not always be done in exactly the same way, the general goal is
always to improve readability and maintainability. Use your best judgment and do
what fits best in your situation.
## Configuration files
To use a configurable value in your patch, add a new field in either the
@@ -382,13 +420,19 @@ int maxPlayers = GlobalConfiguration.get().misc.maxNumOfPlayers;
Generally for global config values you will use the fully qualified class name,
`io.papermc.paper.configuration.GlobalConfiguration` since it's not imported in
most places.
---
If you are adding a new world config value, you must have access to an instance
of the `net.minecraft.world.level.Level` which you can then access the config by doing
```java
int maxPlayers = level.paperConfig().misc.maxNumOfPlayers;
```
#### Documentation
When adding or removing a config option, you should open a pull request in our [documentation repository](https://github.com/PaperMC/docs)
to keep it in sync and accurate. If you're unsure whether your original change will be accepted, then it's fine to wait with making the documentation
pull request until a maintainer has reviewed your changes. Once everything is done, the documentation pull request will be merged at the same time
that your original pull request is.
## Testing API changes
### Using the Paper Test Plugin
@@ -417,14 +461,28 @@ If you use Maven to build your plugin:
If you use Windows and don't usually build using WSL, you might not need to
do this.
## Tips and Tricks
### IntelliJ IDEA
- Under `Settings > Appearance & Behavior > System Settings`, disable
`Sync external changes: Periodically when the IDE is inactive (experimental)`.
When disabled, the IDE will not attempt to reindex files while patches are applying
unless you interact with the IDE during the process. This avoids severe slowdowns and freezes.
- Under `Settings > Appearance & Behavior > System Settings`, you may also want to
disable `Reopen projects on startup` to avoid freeze loops.
## Frequently Asked Questions
### My commit doesn't need a build, what do I do?
Quite simple: You add `[ci skip]` to the start of your commit subject.
Quite simple: You add `[ci skip]` to the start of your pull request title.
This case most often applies to changes to files like `README.md`, this very
file (`CONTRIBUTING.md`), the `LICENSE.md` file, and so forth.
file (`CONTRIBUTING.md`), the `LICENSE.md` file, and also small updates to Javadocs or other documentation.
Do *not* add [ci skip] to the start of your individual commit subjects, as your
pull request will not be mergeable until a new commit is added due to status check requirements.
### Patching and building is *really* slow, what can I do?
@@ -434,11 +492,11 @@ release, either update to Windows 10/11 or move to macOS/Linux/BSD.
In order to speed up patching process on Windows, it's recommended you get WSL 2.
This is available in Windows 10 v2004, build 19041 or higher. (You can check
your version by running `winver` in the run window (Windows key + R)). If you're
using an out of date version of Windows 10, update your system with the
using an out-of-date version of Windows 10, update your system with the
[Windows 10 Update Assistant](https://www.microsoft.com/en-us/software-download/windows10) or [Windows 11 Update Assistant](https://www.microsoft.com/en-us/software-download/windows11).
To set up WSL 2, follow the information here:
<https://docs.microsoft.com/en-us/windows/wsl/install>
<https://learn.microsoft.com/en-us/windows/wsl/install>
You will most likely want to use the Ubuntu apps. Once it's set up, install the
required tools with `sudo apt-get update && sudo apt-get install $TOOL_NAMES
@@ -447,5 +505,5 @@ required tools with `sudo apt-get update && sudo apt-get install $TOOL_NAMES
everything like usual.
> ❗ Do not use the `/mnt/` directory in WSL! Instead, mount the WSL directories
> in Windows like described here:
> <https://docs.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
> in Windows as described here:
> <https://learn.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
+2
View File
@@ -65,4 +65,6 @@ aerulion <aerulion@gmail.com>
Lukas Planz <lukas.planz@web.de>
granny <contact@granny.dev>
mja00 <me@mja00.dev>
roro1506HD <16260475+roro1506HD@users.noreply.github.com>
Toffikk <slodkitofik@gmail.com>
```
+23 -20
View File
@@ -1,4 +1,6 @@
Paper [![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=main)](https://github.com/PaperMC/Paper/actions)
Paper [![Version](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifactory.papermc.io%2Fartifactory%2Funiverse%2Fio%2Fpapermc%2Fpaper%2Fpaper-api%2Fmaven-metadata.xml&strategy=highestVersion&filter=26.1*&label=version&color=%23344ceb
)](https://papermc.io/downloads/paper)
[![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=main)](https://github.com/PaperMC/Paper/actions)
[![Discord](https://img.shields.io/discord/289587909051416579.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/papermc)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/papermc?label=GitHub%20Sponsors)](https://github.com/sponsors/PaperMC)
[![Open Collective](https://img.shields.io/opencollective/all/papermc?label=OpenCollective%20Sponsors)](https://opencollective.com/papermc)
@@ -27,6 +29,23 @@ How To (Plugin Developers)
* See upcoming, pending, and recently added API [here](https://github.com/orgs/PaperMC/projects/2/views/4)
* Paper API javadocs here: [papermc.io/javadocs](https://papermc.io/javadocs/)
#### Repository (for paper-api)
See [the docs](https://docs.papermc.io/paper/dev/project-setup/#adding-paper-as-a-dependency) for more details.
##### Gradle
```kotlin
repositories {
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:26.1.2.build.+")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
}
```
##### Maven
```xml
@@ -40,32 +59,16 @@ How To (Plugin Developers)
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.4-R0.1-SNAPSHOT</version>
<version>[26.1.2.build,)</version>
<scope>provided</scope>
</dependency>
```
##### Gradle
```kotlin
repositories {
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
```
How To (Compiling Jar From Source)
------
To compile Paper, you need JDK 21 and an internet connection.
To compile Paper, you need JDK 25 and an internet connection.
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createMojmapBundlerJar` from your terminal. You can find the compiled jar in the `paper-server/build/libs` directory.
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createPaperclipJar` from your terminal. You can find the compiled jar in the `paper-server/build/libs` directory.
To get a full list of tasks, run `./gradlew tasks`.
-7
View File
@@ -5,10 +5,3 @@
# authlib com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
# datafixerupper com.mojang.datafixers.DataFixerBuilder
# datafixerupper com/mojang/datafixers/util/Either.java
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
# To import minecraft data files, like the default chat type, use `mc_data` as the prefix:
# mc_data chat_type/chat.json
# mc_data dimension_type/overworld.json
#
+1 -1
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
# is imported and not fully qualified. Easiest fix is to just change the name
+249 -176
View File
@@ -3,33 +3,26 @@
private-f net.minecraft.network.CompressionDecoder inflater
private-f net.minecraft.server.MinecraftServer connection
private-f net.minecraft.server.MinecraftServer levels
private-f net.minecraft.server.jsonrpc.internalapi.MinecraftGameRuleServiceImpl gameRules
private-f net.minecraft.world.item.ItemStack components
private-f net.minecraft.world.item.ItemStack item
private-f net.minecraft.world.level.block.entity.BeehiveBlockEntity stored
protected net.minecraft.world.entity.LivingEntity skipDropExperience
protected-f net.minecraft.server.MinecraftServer worldData
public net.minecraft.ChatFormatting code
public net.minecraft.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
public net.minecraft.advancements.Advancement decorateName(Lnet/minecraft/advancements/DisplayInfo;)Lnet/minecraft/network/chat/Component;
public net.minecraft.commands.CommandSourceStack source
public net.minecraft.commands.arguments.DimensionArgument ERROR_INVALID_VALUE
public net.minecraft.commands.arguments.blocks.BlockInput tag
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.TagParser readArrayTag()Lnet/minecraft/nbt/Tag;
public net.minecraft.nbt.TagParser type(Ljava/lang/String;)Lnet/minecraft/nbt/Tag;
public net.minecraft.nbt.ListTag <init>(Ljava/util/List;)V
public net.minecraft.nbt.ListTag identifyRawElementType()B
public net.minecraft.network.Connection address
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.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
public net.minecraft.network.chat.numbers.FixedFormat value
public net.minecraft.network.chat.numbers.StyledFormat style
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket <init>(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/entity/BlockEntityType;Lnet/minecraft/nbt/CompoundTag;)V
public net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket blockState
public net.minecraft.network.protocol.game.ClientboundSetDefaultSpawnPositionPacket pos
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket hasPos
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket hasRot
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket x
@@ -37,6 +30,7 @@ public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket xRot
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket y
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket yRot
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$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
@@ -45,15 +39,16 @@ public net.minecraft.server.MinecraftServer doRunTask(Lnet/minecraft/server/Tick
public net.minecraft.server.MinecraftServer executor
public net.minecraft.server.MinecraftServer fixerUpper
public net.minecraft.server.MinecraftServer playerDataStorage
public net.minecraft.server.MinecraftServer prepareLevels(Lnet/minecraft/server/level/progress/ChunkProgressListener;)V
public net.minecraft.server.MinecraftServer progressListenerFactory
public net.minecraft.server.MinecraftServer resources
public net.minecraft.server.MinecraftServer serverThread
public net.minecraft.server.MinecraftServer$ReloadableResources
public net.minecraft.server.MinecraftServer$ReloadableResources <init>(Lnet/minecraft/server/packs/resources/CloseableResourceManager;Lnet/minecraft/server/ReloadableServerResources;)V
public net.minecraft.server.RegistryLayer STATIC_ACCESS
public net.minecraft.server.ReloadableServerResources
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 <init>(Lcom/google/gson/JsonObject;Ljava/lang/String;)V
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
public net.minecraft.server.dedicated.Settings properties
public net.minecraft.server.level.ChunkHolder oldTicketLevel
@@ -65,24 +60,24 @@ public net.minecraft.server.level.ChunkMap distanceManager
public net.minecraft.server.level.ChunkMap entityMap
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ChunkMap level
public net.minecraft.server.level.ChunkMap progressListener
public net.minecraft.server.level.ChunkMap save(Lnet/minecraft/world/level/chunk/ChunkAccess;)Z
public net.minecraft.server.level.ChunkMap serverViewDistance
public net.minecraft.server.level.ChunkMap setServerViewDistance(I)V
public net.minecraft.server.level.ChunkMap toDrop
public net.minecraft.server.level.ChunkMap updatingChunkMap
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 seenBy
public net.minecraft.server.level.ChunkMap$TrackedEntity serverEntity
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 visible
public net.minecraft.server.level.ServerChunkCache mainThread
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 spawnFriendlies
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor
public net.minecraft.server.level.ServerLevel chunkSource
public net.minecraft.server.level.ServerLevel entityManager
@@ -91,7 +86,7 @@ public net.minecraft.server.level.ServerLevel getEntities()Lnet/minecraft/world/
public net.minecraft.server.level.ServerLevel serverLevelData
public net.minecraft.server.level.ServerPlayer completeUsingItem()V
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 isChangingDimension
public net.minecraft.server.level.ServerPlayer language
@@ -99,29 +94,37 @@ public net.minecraft.server.level.ServerPlayer lastSentExp
public net.minecraft.server.level.ServerPlayer nextContainerCounter()V
public net.minecraft.server.level.ServerPlayer particleStatus
public net.minecraft.server.level.ServerPlayer seenCredits
public net.minecraft.server.level.ServerPlayer setShoulderEntityLeft(Lnet/minecraft/nbt/CompoundTag;)V
public net.minecraft.server.level.ServerPlayer setShoulderEntityRight(Lnet/minecraft/nbt/CompoundTag;)V
public net.minecraft.server.level.ServerPlayer triggerDimensionChangeTriggers(Lnet/minecraft/server/level/ServerLevel;)V
public net.minecraft.server.level.ServerPlayer wardenSpawnTracker
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle <init>(Lnet/minecraft/world/phys/Vec3;FF)V
public net.minecraft.server.level.ServerPlayerGameMode level
public net.minecraft.server.level.Ticket key
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl clientInformation
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl currentTask
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl finishCurrentTask(Lnet/minecraft/server/network/ConfigurationTask$Type;)V
public net.minecraft.server.network.ServerGamePacketListenerImpl isChatMessageIllegal(Ljava/lang/String;)Z
public net.minecraft.server.network.ServerGamePacketListenerImpl restartClientLoadTimerAfterRespawn()V
public net.minecraft.server.network.ServerLoginPacketListenerImpl authenticatedProfile
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.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 <init>(Lnet/minecraft/world/level/validation/DirectoryValidator;)V
public net.minecraft.server.packs.repository.Pack resources
public net.minecraft.server.players.PlayerList playerIo
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 verifyChatTrusted(Lnet/minecraft/network/chat/PlayerChatMessage;)Z
public net.minecraft.server.players.StoredUserEntry getUser()Ljava/lang/Object;
public net.minecraft.stats.ServerRecipeBook known
public net.minecraft.tags.TagEntry id
public net.minecraft.tags.TagEntry required
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.AbstractListBuilder
public net.minecraft.util.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)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.ItemSpawnEggFix ID_TO_ENTITY
public net.minecraft.world.BossEvent color
@@ -130,18 +133,26 @@ public net.minecraft.world.BossEvent overlay
public net.minecraft.world.CompoundContainer container1
public net.minecraft.world.CompoundContainer container2
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.effect.MobEffect attributeModifiers
public net.minecraft.world.effect.MobEffect$AttributeTemplate
public net.minecraft.world.effect.MobEffect$AttributeTemplate <init>(Lnet/minecraft/resources/Identifier;DLnet/minecraft/world/entity/ai/attributes/AttributeModifier$Operation;)V
public net.minecraft.world.effect.MobEffectInstance hiddenEffect
public net.minecraft.world.effect.MobEffectInstance isShorterDurationThan(Lnet/minecraft/world/effect/MobEffectInstance;)Z
public net.minecraft.world.entity.AgeableMob setAgeLocked(Z)V
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 radiusOnUse
public net.minecraft.world.entity.AreaEffectCloud radiusPerTick
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.Avatar DATA_PLAYER_MODE_CUSTOMISATION
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 getBillboardConstraints()Lnet/minecraft/world/entity/Display$BillboardConstraints;
@@ -181,12 +192,16 @@ public net.minecraft.world.entity.Display$TextDisplay getTextOpacity()B
public net.minecraft.world.entity.Display$TextDisplay setFlags(B)V
public net.minecraft.world.entity.Display$TextDisplay setText(Lnet/minecraft/network/chat/Component;)V
public net.minecraft.world.entity.Display$TextDisplay setTextOpacity(B)V
public net.minecraft.world.entity.Entity DATA_TICKS_FROZEN
public net.minecraft.world.entity.Entity FLAG_INVISIBLE
public net.minecraft.world.entity.Entity getEncodeId()Ljava/lang/String;
public net.minecraft.world.entity.Entity getFireImmuneTicks()I
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 isInBubbleColumn()Z
public net.minecraft.world.entity.Entity isAffectedByBlocks()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 onGround
@@ -196,11 +211,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 setRot(FF)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 wasTouchingWater
public net.minecraft.world.entity.ExperienceOrb count
public net.minecraft.world.entity.ExperienceOrb value
public net.minecraft.world.entity.GlowSquid setDarkTicks(I)V
public net.minecraft.world.entity.ExperienceOrb setValue(I)V
public net.minecraft.world.entity.Interaction attack
public net.minecraft.world.entity.Interaction getHeight()F
public net.minecraft.world.entity.Interaction getResponse()Z
@@ -210,6 +225,7 @@ public net.minecraft.world.entity.Interaction setHeight(F)V
public net.minecraft.world.entity.Interaction setResponse(Z)V
public net.minecraft.world.entity.Interaction setWidth(F)V
public net.minecraft.world.entity.Interaction$PlayerAction
public net.minecraft.world.entity.Interaction$PlayerAction <init>(Ljava/util/UUID;J)V
public net.minecraft.world.entity.ItemBasedSteering boostTime
public net.minecraft.world.entity.ItemBasedSteering boostTimeTotal()I
public net.minecraft.world.entity.ItemBasedSteering boosting
@@ -225,23 +241,26 @@ public net.minecraft.world.entity.LivingEntity detectEquipmentUpdates()V
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 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 jumping
public net.minecraft.world.entity.LivingEntity lastHurt
public net.minecraft.world.entity.LivingEntity lastHurtByMob
public net.minecraft.world.entity.LivingEntity lastHurtByMobTimestamp
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 useItemRemaining
public net.minecraft.world.entity.Mob armorDropChances
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 getAmbientSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.Mob isSunBurnTick()Z
public net.minecraft.world.entity.Mob lootTable
public net.minecraft.world.entity.Mob lootTableSeed
public net.minecraft.world.entity.Mob persistenceRequired
public net.minecraft.world.entity.OminousItemSpawner setItem(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.OminousItemSpawner spawnItemAfterTicks
public net.minecraft.world.entity.ai.attributes.Attribute sentiment
public net.minecraft.world.entity.ai.attributes.AttributeSupplier getAttributeInstance(Lnet/minecraft/core/Holder;)Lnet/minecraft/world/entity/ai/attributes/AttributeInstance;
public net.minecraft.world.entity.ai.control.MoveControl$Operation
public net.minecraft.world.entity.ai.gossip.GossipContainer gossips
@@ -249,72 +268,90 @@ public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
public net.minecraft.world.entity.ai.navigation.PathNavigation pathFinder
public net.minecraft.world.entity.ambient.Bat targetPosition
public net.minecraft.world.entity.animal.AbstractSchoolingFish leader
public net.minecraft.world.entity.animal.AbstractSchoolingFish schoolSize
public net.minecraft.world.entity.animal.Animal inLove
public net.minecraft.world.entity.animal.Animal loveCause
public net.minecraft.world.entity.animal.Bee hivePos
public net.minecraft.world.entity.animal.Bee isRolling()Z
public net.minecraft.world.entity.animal.Bee numCropsGrownSincePollination
public net.minecraft.world.entity.animal.Bee setHasNectar(Z)V
public net.minecraft.world.entity.animal.Bee setHasStung(Z)V
public net.minecraft.world.entity.animal.Bee setRolling(Z)V
public net.minecraft.world.entity.animal.Bee stayOutOfHiveCountdown
public net.minecraft.world.entity.animal.Bee ticksWithoutNectarSinceExitingHive
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 setRelaxStateOne(Z)V
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 isDefending()Z
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 setSleeping(Z)V
public net.minecraft.world.entity.animal.MushroomCow stewEffects
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.Panda getEatCounter()I
public net.minecraft.world.entity.animal.Panda setEatCounter(I)V
public net.minecraft.world.entity.animal.Pig steering
public net.minecraft.world.entity.animal.Rabbit moreCarrotTicks
public net.minecraft.world.entity.animal.Rabbit registerGoals()V
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.Turtle getHomePos()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.animal.Turtle isGoingHome()Z
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 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 duplicateAllay()V
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 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.bee.Bee hivePos
public net.minecraft.world.entity.animal.bee.Bee isRolling()Z
public net.minecraft.world.entity.animal.bee.Bee numCropsGrownSincePollination
public net.minecraft.world.entity.animal.bee.Bee setHasNectar(Z)V
public net.minecraft.world.entity.animal.bee.Bee setHasStung(Z)V
public net.minecraft.world.entity.animal.bee.Bee setRolling(Z)V
public net.minecraft.world.entity.animal.bee.Bee stayOutOfHiveCountdown
public net.minecraft.world.entity.animal.bee.Bee ticksWithoutNectarSinceExitingHive
public net.minecraft.world.entity.animal.bee.Bee timeSinceSting
public net.minecraft.world.entity.animal.chicken.Chicken getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.chicken.Chicken setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.cow.Cow getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.cow.Cow setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.cow.MushroomCow setVariant(Lnet/minecraft/world/entity/animal/cow/MushroomCow$Variant;)V
public net.minecraft.world.entity.animal.cow.MushroomCow stewEffects
public net.minecraft.world.entity.animal.dolphin.Dolphin treasurePos
public net.minecraft.world.entity.animal.equine.AbstractHorse createInventory()V
public net.minecraft.world.entity.animal.equine.AbstractHorse inventory
public net.minecraft.world.entity.animal.equine.AbstractHorse owner
public net.minecraft.world.entity.animal.equine.Horse setVariantAndMarkings(Lnet/minecraft/world/entity/animal/equine/Variant;Lnet/minecraft/world/entity/animal/equine/Markings;)V
public net.minecraft.world.entity.animal.equine.Llama setVariant(Lnet/minecraft/world/entity/animal/equine/Llama$Variant;)V
public net.minecraft.world.entity.animal.equine.SkeletonHorse trapTime
public net.minecraft.world.entity.animal.feline.Cat getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.feline.Cat isRelaxStateOne()Z
public net.minecraft.world.entity.animal.feline.Cat setCollarColor(Lnet/minecraft/world/item/DyeColor;)V
public net.minecraft.world.entity.animal.feline.Cat setRelaxStateOne(Z)V
public net.minecraft.world.entity.animal.feline.Cat setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.feline.Cat setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.feline.Ocelot isTrusting()Z
public net.minecraft.world.entity.animal.feline.Ocelot setTrusting(Z)V
public net.minecraft.world.entity.animal.fish.AbstractSchoolingFish leader
public net.minecraft.world.entity.animal.fish.AbstractSchoolingFish schoolSize
public net.minecraft.world.entity.animal.fish.Salmon setVariant(Lnet/minecraft/world/entity/animal/fish/Salmon$Variant;)V
public net.minecraft.world.entity.animal.fish.TropicalFish getPackedVariant()I
public net.minecraft.world.entity.animal.fish.TropicalFish setPackedVariant(I)V
public net.minecraft.world.entity.animal.fox.Fox DATA_TRUSTED_ID_0
public net.minecraft.world.entity.animal.fox.Fox DATA_TRUSTED_ID_1
public net.minecraft.world.entity.animal.fox.Fox isDefending()Z
public net.minecraft.world.entity.animal.fox.Fox setDefending(Z)V
public net.minecraft.world.entity.animal.fox.Fox setFaceplanted(Z)V
public net.minecraft.world.entity.animal.fox.Fox setSleeping(Z)V
public net.minecraft.world.entity.animal.fox.Fox setVariant(Lnet/minecraft/world/entity/animal/fox/Fox$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.goat.Goat DATA_HAS_LEFT_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 inventory
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.SkeletonHorse trapTime
public net.minecraft.world.entity.animal.nautilus.AbstractNautilus inventory
public net.minecraft.world.entity.animal.panda.Panda getEatCounter()I
public net.minecraft.world.entity.animal.panda.Panda setEatCounter(I)V
public net.minecraft.world.entity.animal.parrot.Parrot setVariant(Lnet/minecraft/world/entity/animal/parrot/Parrot$Variant;)V
public net.minecraft.world.entity.animal.pig.Pig getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.pig.Pig setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.pig.Pig setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.pig.Pig steering
public net.minecraft.world.entity.animal.rabbit.Rabbit moreCarrotTicks
public net.minecraft.world.entity.animal.rabbit.Rabbit registerGoals()V
public net.minecraft.world.entity.animal.rabbit.Rabbit setVariant(Lnet/minecraft/world/entity/animal/rabbit/Rabbit$Variant;)V
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 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 storeExploredPosition(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/entity/animal/sniffer/Sniffer;
public net.minecraft.world.entity.animal.squid.GlowSquid setDarkTicks(I)V
public net.minecraft.world.entity.animal.turtle.Turtle goingHome
public net.minecraft.world.entity.animal.turtle.Turtle homePos
public net.minecraft.world.entity.animal.turtle.Turtle setHasEgg(Z)V
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.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 headPose
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 setSmall(Z)V
public net.minecraft.world.entity.decoration.HangingEntity setDirection(Lnet/minecraft/core/Direction;)V
@@ -323,6 +360,16 @@ public net.minecraft.world.entity.decoration.ItemFrame DATA_ROTATION
public net.minecraft.world.entity.decoration.ItemFrame dropChance
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.Mannequin ALL_LAYERS
public net.minecraft.world.entity.decoration.Mannequin DEFAULT_DESCRIPTION
public net.minecraft.world.entity.decoration.Mannequin getDescription()Lnet/minecraft/network/chat/Component;
public net.minecraft.world.entity.decoration.Mannequin getImmovable()Z
public net.minecraft.world.entity.decoration.Mannequin getProfile()Lnet/minecraft/world/item/component/ResolvableProfile;
public net.minecraft.world.entity.decoration.Mannequin setDescription(Lnet/minecraft/network/chat/Component;)V
public net.minecraft.world.entity.decoration.Mannequin setHideDescription(Z)V
public net.minecraft.world.entity.decoration.Mannequin setImmovable(Z)V
public net.minecraft.world.entity.decoration.Mannequin setProfile(Lnet/minecraft/world/item/component/ResolvableProfile;)V
public net.minecraft.world.entity.decoration.painting.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 blockState
public net.minecraft.world.entity.item.FallingBlockEntity cancelDrop
@@ -336,23 +383,19 @@ public net.minecraft.world.entity.item.ItemEntity target
public net.minecraft.world.entity.item.ItemEntity thrower
public net.minecraft.world.entity.item.PrimedTnt explosionPower
public net.minecraft.world.entity.item.PrimedTnt owner
public net.minecraft.world.entity.monster.Creeper droppedSkulls
public net.minecraft.world.entity.monster.Creeper explodeCreeper()V
public net.minecraft.world.entity.monster.Creeper explosionRadius
public net.minecraft.world.entity.monster.Creeper maxSwell
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 teleportTowards(Lnet/minecraft/world/entity/Entity;)Z
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 setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V
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$GuardianAttackGoal
public net.minecraft.world.entity.monster.Guardian$GuardianAttackGoal attackTime
public net.minecraft.world.entity.monster.Phantom anchorPoint
public net.minecraft.world.entity.monster.Pillager inventory
public net.minecraft.world.entity.monster.Ravager attackTick
public net.minecraft.world.entity.monster.Ravager roarTick
public net.minecraft.world.entity.monster.Ravager stunnedTick
@@ -360,64 +403,59 @@ public net.minecraft.world.entity.monster.Shulker DATA_COLOR_ID
public net.minecraft.world.entity.monster.Shulker getRawPeekAmount()I
public net.minecraft.world.entity.monster.Shulker setAttachFace(Lnet/minecraft/core/Direction;)V
public net.minecraft.world.entity.monster.Shulker setRawPeekAmount(I)V
public net.minecraft.world.entity.monster.Skeleton DATA_STRAY_CONVERSION_ID
public net.minecraft.world.entity.monster.Skeleton conversionTime
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
public net.minecraft.world.entity.monster.SpellcasterIllager getCurrentSpell()Lnet/minecraft/world/entity/monster/SpellcasterIllager$IllagerSpell;
public net.minecraft.world.entity.monster.SpellcasterIllager$IllagerSpell
public net.minecraft.world.entity.monster.Strider steering
public net.minecraft.world.entity.monster.Vex hasLimitedLife
public net.minecraft.world.entity.monster.Vex limitedLifeTicks
public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.Vindicator isJohnny
public net.minecraft.world.entity.monster.Vex owner
public net.minecraft.world.entity.monster.Witch usingTime
public net.minecraft.world.entity.monster.Zombie DATA_DROWNED_CONVERSION_ID
public net.minecraft.world.entity.monster.Zombie DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.Zombie conversionTime
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
public net.minecraft.world.entity.monster.Zombie startUnderWaterConversion(I)V
public net.minecraft.world.entity.monster.ZombieVillager DATA_CONVERTING_ID
public net.minecraft.world.entity.monster.ZombieVillager conversionStarter
public net.minecraft.world.entity.monster.ZombieVillager startConverting(Ljava/util/UUID;I)V
public net.minecraft.world.entity.monster.ZombieVillager villagerConversionTime
public net.minecraft.world.entity.monster.hoglin.Hoglin cannotBeHunted
public net.minecraft.world.entity.monster.hoglin.Hoglin isImmuneToZombification()Z
public net.minecraft.world.entity.monster.hoglin.Hoglin timeInOverworld
public net.minecraft.world.entity.monster.illager.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/sheep/Sheep;
public net.minecraft.world.entity.monster.illager.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/sheep/Sheep;)V
public net.minecraft.world.entity.monster.illager.Pillager inventory
public net.minecraft.world.entity.monster.illager.SpellcasterIllager getCurrentSpell()Lnet/minecraft/world/entity/monster/illager/SpellcasterIllager$IllagerSpell;
public net.minecraft.world.entity.monster.illager.SpellcasterIllager$IllagerSpell
public net.minecraft.world.entity.monster.illager.Vindicator DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.illager.Vindicator isJohnny
public net.minecraft.world.entity.monster.piglin.AbstractPiglin isImmuneToZombification()Z
public net.minecraft.world.entity.monster.piglin.AbstractPiglin timeInOverworld
public net.minecraft.world.entity.monster.piglin.Piglin cannotHunt
public net.minecraft.world.entity.monster.piglin.Piglin inventory
public net.minecraft.world.entity.monster.piglin.Piglin isChargingCrossbow()Z
public net.minecraft.world.entity.monster.skeleton.Skeleton DATA_STRAY_CONVERSION_ID
public net.minecraft.world.entity.monster.skeleton.Skeleton conversionTime
public net.minecraft.world.entity.monster.skeleton.Skeleton inPowderSnowTime
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTicks
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker ticksSinceLastWarning
public net.minecraft.world.entity.npc.Villager increaseMerchantCareer()V
public net.minecraft.world.entity.npc.Villager numberOfRestocksToday
public net.minecraft.world.entity.npc.Villager releaseAllPois()V
public net.minecraft.world.entity.npc.Villager setUnhappy()V
public net.minecraft.world.entity.npc.WanderingTrader getWanderTarget()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.monster.zombie.Zombie DATA_DROWNED_CONVERSION_ID
public net.minecraft.world.entity.monster.zombie.Zombie DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.zombie.Zombie conversionTime
public net.minecraft.world.entity.monster.zombie.Zombie isSunSensitive()Z
public net.minecraft.world.entity.monster.zombie.Zombie startUnderWaterConversion(I)V
public net.minecraft.world.entity.monster.zombie.ZombieVillager DATA_CONVERTING_ID
public net.minecraft.world.entity.monster.zombie.ZombieVillager conversionStarter
public net.minecraft.world.entity.monster.zombie.ZombieVillager startConverting(Ljava/util/UUID;I)V
public net.minecraft.world.entity.monster.zombie.ZombieVillager villagerConversionTime
public net.minecraft.world.entity.npc.villager.Villager numberOfRestocksToday
public net.minecraft.world.entity.npc.villager.Villager releaseAllPois()V
public net.minecraft.world.entity.npc.villager.Villager setUnhappy()V
public net.minecraft.world.entity.npc.villager.Villager updateDemand()V
public net.minecraft.world.entity.npc.wanderingtrader.WanderingTrader getWanderTarget()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.player.Abilities flyingSpeed
public net.minecraft.world.entity.player.Abilities walkingSpeed
public net.minecraft.world.entity.player.Inventory compartments
public net.minecraft.world.entity.player.Player DATA_PLAYER_MODE_CUSTOMISATION
public net.minecraft.world.entity.player.Inventory equipment
public net.minecraft.world.entity.player.Player closeContainer()V
public net.minecraft.world.entity.player.Player enchantmentSeed
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 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 sleepCounter
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 getPotionContents()Lnet/minecraft/world/item/alchemy/PotionContents;
public net.minecraft.world.entity.projectile.Arrow setPotionContents(Lnet/minecraft/world/item/alchemy/PotionContents;)V
public net.minecraft.world.entity.projectile.Arrow updateColor()V
public net.minecraft.world.entity.projectile.EvokerFangs warmupDelayTicks
public net.minecraft.world.entity.projectile.EyeOfEnder life
public net.minecraft.world.entity.projectile.EyeOfEnder surviveAfterDeath
public net.minecraft.world.entity.projectile.EyeOfEnder tx
public net.minecraft.world.entity.projectile.EyeOfEnder ty
public net.minecraft.world.entity.projectile.EyeOfEnder tz
public net.minecraft.world.entity.projectile.EyeOfEnder 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_SHOT_AT_ANGLE
@@ -436,80 +474,105 @@ public net.minecraft.world.entity.projectile.FishingHook setHookedEntity(Lnet/mi
public net.minecraft.world.entity.projectile.FishingHook timeUntilHooked
public net.minecraft.world.entity.projectile.FishingHook timeUntilLured
public net.minecraft.world.entity.projectile.FishingHook$FishHookState
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 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 flightSteps
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaX
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaY
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaZ
public net.minecraft.world.entity.projectile.SpectralArrow duration
public net.minecraft.world.entity.projectile.ThrownPotion isLingering()Z
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.BreezeWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.windcharge.WindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.arrow.AbstractArrow baseDamage
public net.minecraft.world.entity.projectile.arrow.AbstractArrow firedFromWeapon
public net.minecraft.world.entity.projectile.arrow.AbstractArrow getHitGroundSoundEvent()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.projectile.arrow.AbstractArrow getPickupItem()Lnet/minecraft/world/item/ItemStack;
public net.minecraft.world.entity.projectile.arrow.AbstractArrow isInGround()Z
public net.minecraft.world.entity.projectile.arrow.AbstractArrow life
public net.minecraft.world.entity.projectile.arrow.AbstractArrow pickupItemStack
public net.minecraft.world.entity.projectile.arrow.AbstractArrow setPickupItemStack(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.projectile.arrow.AbstractArrow setPierceLevel(B)V
public net.minecraft.world.entity.projectile.arrow.Arrow NO_EFFECT_COLOR
public net.minecraft.world.entity.projectile.arrow.Arrow getPotionContents()Lnet/minecraft/world/item/alchemy/PotionContents;
public net.minecraft.world.entity.projectile.arrow.Arrow setPotionContents(Lnet/minecraft/world/item/alchemy/PotionContents;)V
public net.minecraft.world.entity.projectile.arrow.Arrow updateColor()V
public net.minecraft.world.entity.projectile.arrow.SpectralArrow duration
public net.minecraft.world.entity.projectile.arrow.ThrownTrident dealtDamage
public net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile assignDirectionalMovement(Lnet/minecraft/world/phys/Vec3;D)V
public net.minecraft.world.entity.projectile.hurtingprojectile.LargeFireball explosionPower
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.AbstractWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.BreezeWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.WindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.throwableitemprojectile.ThrowableItemProjectile getDefaultItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.entity.raid.Raid heroesOfTheVillage
public net.minecraft.world.entity.raid.Raid numGroups
public net.minecraft.world.entity.raid.Raid raidEvent
public net.minecraft.world.entity.raid.Raid raidOmenLevel
public net.minecraft.world.entity.raid.Raid ticksActive
public net.minecraft.world.entity.raid.Raid totalHealth
public net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal
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 status
public net.minecraft.world.entity.vehicle.AbstractMinecartContainer lootTable
public net.minecraft.world.entity.vehicle.AbstractMinecartContainer lootTableSeed
public net.minecraft.world.entity.vehicle.MinecartCommandBlock DATA_ID_COMMAND_NAME
public net.minecraft.world.entity.vehicle.MinecartFurnace fuel
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 explosionSpeedFactor
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.entity.vehicle.boat.AbstractBoat getStatus()Lnet/minecraft/world/entity/vehicle/boat/AbstractBoat$Status;
public net.minecraft.world.entity.vehicle.boat.AbstractBoat status
public net.minecraft.world.entity.vehicle.minecart.AbstractMinecartContainer lootTable
public net.minecraft.world.entity.vehicle.minecart.AbstractMinecartContainer lootTableSeed
public net.minecraft.world.entity.vehicle.minecart.MinecartCommandBlock DATA_ID_COMMAND_NAME
public net.minecraft.world.entity.vehicle.minecart.MinecartFurnace fuel
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explode(Lnet/minecraft/world/damagesource/DamageSource;D)V
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explosionPowerBase
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explosionSpeedFactor
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT fuse
public net.minecraft.world.flag.FeatureFlag mask
public net.minecraft.world.flag.FeatureFlag universe
public net.minecraft.world.flag.FeatureFlagRegistry names
public net.minecraft.world.food.FoodData exhaustionLevel
public net.minecraft.world.food.FoodData foodLevel
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 quickcraftStatus
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftType
public net.minecraft.world.inventory.AbstractContainerMenu resetQuickCraft()V
public net.minecraft.world.inventory.AbstractContainerMenu synchronizeSlotToRemote(ILnet/minecraft/world/item/ItemStack;Ljava/util/function/Supplier;)V
public net.minecraft.world.inventory.AbstractContainerMenu triggerSlotListeners(ILnet/minecraft/world/item/ItemStack;Ljava/util/function/Supplier;)V
public net.minecraft.world.inventory.AbstractCraftingMenu craftSlots
public net.minecraft.world.inventory.AbstractCraftingMenu resultSlots
public net.minecraft.world.inventory.AbstractMountInventoryMenu SLOT_BODY_ARMOR
public net.minecraft.world.inventory.AbstractMountInventoryMenu SLOT_INVENTORY_START
public net.minecraft.world.inventory.AbstractMountInventoryMenu SLOT_SADDLE
public net.minecraft.world.inventory.AbstractMountInventoryMenu mount
public net.minecraft.world.inventory.AnvilMenu cost
public net.minecraft.world.inventory.AnvilMenu itemName
public net.minecraft.world.inventory.AnvilMenu repairItemCountCost
public net.minecraft.world.inventory.BrewingStandMenu brewingStandData
public net.minecraft.world.inventory.CraftingMenu access
public net.minecraft.world.inventory.DispenserMenu dispenser
public net.minecraft.world.inventory.HorseInventoryMenu SLOT_BODY_ARMOR
public net.minecraft.world.inventory.MerchantContainer selectionHint
public net.minecraft.world.inventory.Slot slot
public net.minecraft.world.item.AdventureModePredicate predicates
public net.minecraft.world.item.BucketItem content
public net.minecraft.world.item.CrossbowItem FIREWORK_POWER
public net.minecraft.world.item.DebugStickItem handleInteraction(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/item/ItemStack;)Z
public net.minecraft.world.item.DebugStickItem handleInteraction(Lnet/minecraft/server/level/ServerPlayer;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/item/ItemStack;)Z
public net.minecraft.world.item.ItemCooldowns cooldowns
public net.minecraft.world.item.ItemCooldowns tickCount
public net.minecraft.world.item.ItemCooldowns$CooldownInstance
public net.minecraft.world.item.ItemCooldowns$CooldownInstance <init>(II)V
public net.minecraft.world.item.ItemStackLinkedSet TYPE_AND_TAG
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.component.ItemContainerContents MAX_SIZE
public net.minecraft.world.item.component.ItemContainerContents items
public net.minecraft.world.item.component.ResolvableProfile unpack()Lcom/mojang/datafixers/util/Either;
public net.minecraft.world.item.component.ResolvableProfile$Dynamic <init>(Lcom/mojang/datafixers/util/Either;Lnet/minecraft/world/entity/player/PlayerSkin$Patch;)V
public net.minecraft.world.item.component.ResolvableProfile$Partial
public net.minecraft.world.item.component.ResolvableProfile$Partial <init>(Ljava/util/Optional;Ljava/util/Optional;Lcom/mojang/authlib/properties/PropertyMap;)V
public net.minecraft.world.item.component.ResolvableProfile$Partial MAP_CODEC
public net.minecraft.world.item.component.ResolvableProfile$Static <init>(Lcom/mojang/datafixers/util/Either;Lnet/minecraft/world/entity/player/PlayerSkin$Patch;)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.Ingredient values
public net.minecraft.world.item.crafting.RecipeManager recipes
public net.minecraft.world.item.crafting.RecipeMap byKey
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 result
public net.minecraft.world.item.trading.MerchantOffer specialPriceDiff
@@ -526,7 +589,8 @@ public net.minecraft.world.level.BaseSpawner spawnCount
public net.minecraft.world.level.BaseSpawner spawnDelay
public net.minecraft.world.level.BaseSpawner spawnPotentials
public net.minecraft.world.level.BaseSpawner spawnRange
public net.minecraft.world.level.GameRules$Value onChanged(Lnet/minecraft/server/MinecraftServer;)V
public net.minecraft.world.level.Level DEFAULT_EXPLOSION_BLOCK_PARTICLES
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 levelData
public net.minecraft.world.level.Level rainLevel
@@ -534,13 +598,13 @@ public net.minecraft.world.level.Level thread
public net.minecraft.world.level.Level thunderLevel
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
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 getTemperature(Lnet/minecraft/core/BlockPos;I)F
public net.minecraft.world.level.biome.Biome$ClimateSettings
public net.minecraft.world.level.biome.Biome$ClimateSettings <init>(ZFLnet/minecraft/world/level/biome/Biome$TemperatureModifier;F)V
public net.minecraft.world.level.block.Block popExperience(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;I)V
public net.minecraft.world.level.block.ChestBlock isBlockedChestByBlock(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.level.block.ChiseledBookShelfBlock getHitSlot(Lnet/minecraft/world/phys/BlockHitResult;Lnet/minecraft/world/level/block/state/BlockState;)Ljava/util/OptionalInt;
public net.minecraft.world.level.block.ChiseledBookShelfBlock getSection(F)I
public net.minecraft.world.level.block.ComposterBlock$EmptyContainer
public net.minecraft.world.level.block.ComposterBlock$InputContainer
public net.minecraft.world.level.block.ComposterBlock$OutputContainer
@@ -549,6 +613,7 @@ public net.minecraft.world.level.block.DropperBlock dispenseFrom(Lnet/minecraft/
public net.minecraft.world.level.block.FireBlock igniteOdds
public net.minecraft.world.level.block.RedStoneWireBlock canSurvive(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelReader;Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal
public net.minecraft.world.level.block.SelectableSlotContainer getSection(FI)I
public net.minecraft.world.level.block.ShulkerBoxBlock color
public net.minecraft.world.level.block.SoundType breakSound
public net.minecraft.world.level.block.SoundType hitSound
@@ -558,6 +623,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 litTimeRemaining
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 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
@@ -572,7 +638,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.BellBlockEntity resonating
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.BrewingStandBlockEntity brewTime
public net.minecraft.world.level.block.entity.BrewingStandBlockEntity fuel
@@ -581,13 +647,15 @@ public net.minecraft.world.level.block.entity.BrushableBlockEntity lootTable
public net.minecraft.world.level.block.entity.BrushableBlockEntity lootTableSeed
public net.minecraft.world.level.block.entity.CampfireBlockEntity cookingProgress
public net.minecraft.world.level.block.entity.CampfireBlockEntity cookingTime
public net.minecraft.world.level.block.entity.ChestBlockEntity DEFAULT_NAME
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.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 destroyTargetUUID
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 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.DecoratedPotBlockEntity decorations
public net.minecraft.world.level.block.entity.EnderChestBlockEntity openersCounter
@@ -602,6 +670,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.ShulkerBoxBlockEntity openCount
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 owner
public net.minecraft.world.level.block.entity.StructureBlockEntity author
@@ -620,11 +689,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 exitPortal
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 stateAccessor
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData currentMobs
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData detectedPlayers
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData nextSpawnData
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData cooldownEndsAt
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData currentMobs
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 hasCollision
public net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase destroySpeed
@@ -637,27 +714,27 @@ public net.minecraft.world.level.chunk.ChunkGenerator generationSettingsGetter
public net.minecraft.world.level.chunk.LevelChunk level
public net.minecraft.world.level.chunk.LevelChunk loaded
public net.minecraft.world.level.chunk.LevelChunkSection states
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 level
public net.minecraft.world.level.chunk.storage.RegionFileStorage regionCache
public net.minecraft.world.level.chunk.storage.SerializableChunkData BLOCK_STATE_CODEC
public net.minecraft.world.level.dimension.end.EndDragonFight GATEWAY_COUNT
public net.minecraft.world.level.dimension.end.EndDragonFight dragonEvent
public net.minecraft.world.level.dimension.end.EndDragonFight dragonUUID
public net.minecraft.world.level.dimension.end.EndDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
public net.minecraft.world.level.dimension.end.EndDragonFight gateways
public net.minecraft.world.level.dimension.end.EndDragonFight level
public net.minecraft.world.level.dimension.end.EndDragonFight portalLocation
public net.minecraft.world.level.dimension.end.EndDragonFight previouslyKilled
public net.minecraft.world.level.dimension.end.EndDragonFight respawnCrystals
public net.minecraft.world.level.dimension.end.EndDragonFight respawnDragon(Ljava/util/List;)V
public net.minecraft.world.level.dimension.end.EndDragonFight respawnStage
public net.minecraft.world.level.dimension.end.EndDragonFight setRespawnStage(Lnet/minecraft/world/level/dimension/end/DragonRespawnAnimation;)V
public net.minecraft.world.level.dimension.end.EndDragonFight spawnExitPortal(Z)V
public net.minecraft.world.level.dimension.end.EndDragonFight spawnNewGateway(Lnet/minecraft/core/BlockPos;)V
public net.minecraft.world.level.dimension.end.EnderDragonFight GATEWAY_COUNT
public net.minecraft.world.level.dimension.end.EnderDragonFight dragonEvent
public net.minecraft.world.level.dimension.end.EnderDragonFight dragonUUID
public net.minecraft.world.level.dimension.end.EnderDragonFight exitPortalLocation
public net.minecraft.world.level.dimension.end.EnderDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
public net.minecraft.world.level.dimension.end.EnderDragonFight gateways
public net.minecraft.world.level.dimension.end.EnderDragonFight hasPreviouslyKilledDragon
public net.minecraft.world.level.dimension.end.EnderDragonFight level
public net.minecraft.world.level.dimension.end.EnderDragonFight respawnCrystals
public net.minecraft.world.level.dimension.end.EnderDragonFight respawnDragon(Ljava/util/List;)V
public net.minecraft.world.level.dimension.end.EnderDragonFight respawnStage
public net.minecraft.world.level.dimension.end.EnderDragonFight setRespawnStage(Lnet/minecraft/world/level/dimension/end/DragonRespawnStage;)V
public net.minecraft.world.level.dimension.end.EnderDragonFight spawnExitPortal(Z)V
public net.minecraft.world.level.dimension.end.EnderDragonFight spawnNewGateway(Lnet/minecraft/core/BlockPos;)V
public net.minecraft.world.level.entity.PersistentEntitySectionManager ensureChunkQueuedForLoad(J)V
public net.minecraft.world.level.entity.PersistentEntitySectionManager permanentStorage
public net.minecraft.world.level.gamerules.GameRules rules
public net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator settings
public net.minecraft.world.level.levelgen.SurfaceRules$Condition
public net.minecraft.world.level.levelgen.SurfaceRules$Context
@@ -670,6 +747,8 @@ public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
public net.minecraft.world.level.levelgen.SurfaceRules$SurfaceRule
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource <init>(Lnet/minecraft/resources/Identifier;Lnet/minecraft/world/level/levelgen/VerticalAnchor;Lnet/minecraft/world/level/levelgen/VerticalAnchor;)V
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 frequency
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequencyReductionMethod
@@ -677,10 +756,11 @@ public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement salt
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate entityInfoList
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate palettes
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager loadFromGenerated(Lnet/minecraft/resources/ResourceLocation;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager loadFromResource(Lnet/minecraft/resources/ResourceLocation;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager readStructure(Ljava/io/InputStream;)Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager resourceManagerSource
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager structureRepository
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager tryLoad(Lnet/minecraft/resources/Identifier;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.loader.TemplateSource readStructure(Ljava/io/InputStream;)Lnet/minecraft/nbt/CompoundTag;
public net.minecraft.world.level.levelgen.structure.templatesystem.loader.TemplateSource readStructure(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;
public net.minecraft.world.level.material.MapColor MATERIAL_COLORS
public net.minecraft.world.level.pathfinder.Path nodes
public net.minecraft.world.level.pathfinder.PathFinder nodeEvaluator
@@ -689,10 +769,11 @@ public net.minecraft.world.level.saveddata.maps.MapItemSavedData carriedByPlayer
public net.minecraft.world.level.saveddata.maps.MapItemSavedData decorations
public net.minecraft.world.level.saveddata.maps.MapItemSavedData setColorsDirty(II)V
public net.minecraft.world.level.saveddata.maps.MapItemSavedData setDecorationsDirty()V
public net.minecraft.world.level.storage.DimensionDataStorage cache
public net.minecraft.world.level.storage.LevelStorageSource baseDir
public net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess levelDirectory
public net.minecraft.world.level.storage.PrimaryLevelData settings
public net.minecraft.world.level.storage.SavedDataStorage cache
public net.minecraft.world.level.storage.TagValueInput input
public net.minecraft.world.scores.Objective displayName
public net.minecraft.world.scores.criteria.ObjectiveCriteria CRITERIA_CACHE
public-f net.minecraft.server.MinecraftServer potionBrewing
@@ -701,33 +782,25 @@ public-f net.minecraft.server.ReloadableServerResources commands
public-f net.minecraft.server.dedicated.DedicatedServer serverLinks
public-f net.minecraft.server.dedicated.DedicatedServer settings
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.world.entity.LivingEntity combatTracker
public-f net.minecraft.world.entity.LivingEntity invulnerableDuration
public-f net.minecraft.world.entity.Mob goalSelector
public-f net.minecraft.world.entity.Mob targetSelector
public-f net.minecraft.world.entity.ai.attributes.RangedAttribute maxValue
public-f net.minecraft.world.entity.player.Player gameProfile
public-f net.minecraft.world.entity.raid.Raid numGroups
public-f net.minecraft.world.inventory.AbstractContainerMenu dataSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu lastSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteDataSlots
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteSlots
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 costB
public-f net.minecraft.world.item.trading.MerchantOffer maxUses
public-f net.minecraft.world.item.trading.MerchantOffer priceMultiplier
public-f net.minecraft.world.item.trading.MerchantOffer rewardExp
public-f net.minecraft.world.item.trading.MerchantOffer xp
public-f net.minecraft.world.level.LevelSettings hardcore
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.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 centerZ
public-f net.minecraft.world.level.saveddata.maps.MapItemSavedData dimension
+4 -4
View File
@@ -10,18 +10,18 @@
# 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.
tiny 2 0 mojang+yarn spigot
tiny 2 0 mojang spigot
# CraftBukkit changes type
c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData L
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData I
c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chunk
f Lnet/minecraft/server/level/ServerLevel; level r
f Lnet/minecraft/server/level/ServerLevel; level q
# See mappings-patch.tiny
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 D
# The method is made public by Spigot, which then causes accidental overrides
c net/minecraft/world/entity/Entity net/minecraft/world/entity/Entity
+10 -269
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.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 {
id("io.papermc.paperweight.core") version "2.0.0-beta.8" apply false
id("io.papermc.paperweight.core") version "2.0.0-beta.21" apply false
}
subprojects {
@@ -21,31 +11,27 @@ subprojects {
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
}
}
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
subprojects {
tasks.withType<JavaCompile> {
tasks.withType<JavaCompile>().configureEach {
options.encoding = Charsets.UTF_8.name()
options.release = 21
options.release = 25
options.isFork = true
options.compilerArgs.addAll(listOf("-Xlint:-deprecation", "-Xlint:-removal"))
}
tasks.withType<Javadoc> {
tasks.withType<Javadoc>().configureEach {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<ProcessResources> {
tasks.withType<ProcessResources>().configureEach {
filteringCharset = Charsets.UTF_8.name()
}
tasks.withType<Test> {
tasks.withType<Test>().configureEach {
testLogging {
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
@@ -60,8 +46,8 @@ subprojects {
extensions.configure<PublishingExtension> {
repositories {
maven("https://repo.papermc.io/repository/maven-snapshots/") {
name = "paperSnapshots"
maven("https://artifactory.papermc.io/artifactory/releases/") {
name = "paperReleases"
credentials(PasswordCredentials::class)
}
}
@@ -81,248 +67,3 @@ tasks.register("printPaperVersion") {
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()
}
}
*/
+5 -3
View File
@@ -1,10 +1,12 @@
group=io.papermc.paper
version=1.21.4-R0.1-SNAPSHOT
mcVersion=1.21.4
mcVersion=26.1.2
# This is the current API version for use in (paper-)plugin.yml files
# During snapshot cycles this should be the anticipated version of the release target
apiVersion=26.1.2
channel=STABLE
# Set to true while updating Minecraft version
updatingMinecraft=false
updateTaskListIssue=https://github.com/PaperMC/Paper/issues/11736
org.gradle.configuration-cache=true
org.gradle.caching=true
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+4 -7
View File
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -205,15 +203,14 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# 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.
# * 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.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
Vendored
+1 -2
View File
@@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@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%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
-37
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:26.0.1")
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"
@@ -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);
}
}
@@ -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);
}
}
}
@@ -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");
}
}
@@ -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");
}
}
@@ -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;
}
}
@@ -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() {
}
}
@@ -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() {
}
}
@@ -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() {
}
}
@@ -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() {
}
}
+61 -56
View File
@@ -1,3 +1,5 @@
import paper.libs.com.google.gson.Gson
plugins {
`java-library`
`maven-publish`
@@ -9,11 +11,11 @@ java {
withJavadocJar()
}
val annotationsVersion = "26.0.1"
val bungeeCordChatVersion = "1.20-R0.2"
val adventureVersion = "4.18.0"
val slf4jVersion = "2.0.9"
val log4jVersion = "2.17.1"
val annotationsVersion = "26.0.2"
val adventureVersion = "4.26.1"
val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21"
val slf4jVersion = "2.0.17"
val log4jVersion = "2.25.2"
val apiAndDocs: Configuration by configurations.creating {
attributes {
@@ -39,24 +41,20 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
}
dependencies {
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:33.3.1-jre")
api("com.google.code.gson:gson:2.11.0")
api("com.google.guava:guava:33.5.0-jre")
api("com.google.code.gson:gson:2.13.2")
api("org.yaml:snakeyaml:2.2")
api("org.joml:joml:1.10.8") {
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.18")
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion")
api("com.mojang:brigadier:1.3.10")
// 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")
}
@@ -69,40 +67,40 @@ dependencies {
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
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-transport-http:1.9.18")
implementation("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
implementation("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
// Annotations - Slowly migrate to jspecify
val annotations = "org.jetbrains:annotations:$annotationsVersion"
compileOnly(annotations)
testCompileOnly(annotations)
val checkerQual = "org.checkerframework:checker-qual:3.33.0"
val checkerQual = "org.checkerframework:checker-qual:3.49.2"
compileOnlyApi(checkerQual)
testCompileOnly(checkerQual)
api("org.jspecify:jspecify:1.0.0")
// Test dependencies
testImplementation("org.apache.commons:commons-lang3:3.12.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation("org.apache.commons:commons-lang3:3.20.0")
testImplementation("org.junit.jupiter:junit-jupiter:6.0.3")
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:5.14.1")
testImplementation("org.ow2.asm:asm-tree:9.7.1")
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")
testImplementation("org.mockito:mockito-core:5.22.0")
testImplementation("org.ow2.asm:asm-tree:9.9.1")
mockitoAgent("org.mockito:mockito-core:5.22.0") { isTransitive = false } // configure mockito agent that is needed in newer java versions
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.3")
}
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 {
module {
generatedSourceDirs.add(generatedApiPath.toFile())
generatedSourceDirs.add(generatedDir.toFile())
}
}
sourceSets {
main {
java {
srcDir(generatedApiPath)
srcDir(generatedDir)
}
}
}
@@ -140,20 +138,36 @@ configure<PublishingExtension> {
}
}
val generateApiVersioningFile by tasks.registering {
inputs.property("version", project.version)
val pomProps = layout.buildDirectory.file("pom.properties")
outputs.file(pomProps)
val projectVersion = project.version
doLast {
pomProps.get().asFile.writeText("version=$projectVersion")
abstract class GenerateApiVersioningFile : DefaultTask() {
@get:OutputFile
abstract val outputFile: RegularFileProperty
@get:Input
abstract val projectVersion: Property<String>
@get:Input
abstract val apiVersion: Property<String>
@TaskAction
fun generate() {
val file = outputFile.get().asFile
file.parentFile.mkdirs()
val map = mapOf(
"version" to projectVersion.get(),
"currentApiVersion" to apiVersion.get()
)
file.writeText(Gson().toJson(map))
}
}
val generateApiVersioningFile = tasks.register<GenerateApiVersioningFile>("generateApiVersioningFile") {
outputFile.set(layout.buildDirectory.file("apiVersioning.json"))
projectVersion.set(project.version.toString())
apiVersion.set(rootProject.providers.gradleProperty("apiVersion"))
}
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
}
from(generateApiVersioningFile.flatMap { it.outputFile })
manifest {
attributes(
"Automatic-Module-Name" to "org.bukkit"
@@ -167,17 +181,17 @@ abstract class Services {
}
val services = objects.newInstance<Services>()
tasks.withType<Javadoc> {
tasks.withType<Javadoc>().configureEach {
val options = options as StandardJavadocDocletOptions
options.overview = "src/main/javadoc/overview.html"
options.use()
options.isDocFilesSubDirs = true
options.links(
"https://guava.dev/releases/33.3.1-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/",
"https://javadoc.io/doc/org.joml/joml/1.10.8/index.html",
"https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
"https://guava.dev/releases/33.5.0-jre/api/docs/",
"https://www.javadocs.dev/org.yaml/snakeyaml/2.2/",
"https://www.javadocs.dev/org.jetbrains/annotations/$annotationsVersion/",
"https://www.javadocs.dev/org.joml/joml/1.10.8/",
"https://www.javadocs.dev/com.google.code.gson/gson/2.13.2",
"https://jspecify.dev/docs/api/",
"https://jd.advntr.dev/api/$adventureVersion/",
"https://jd.advntr.dev/key/$adventureVersion/",
@@ -186,11 +200,12 @@ tasks.withType<Javadoc> {
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
"https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
"https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
"https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
"https://www.javadocs.dev/org.slf4j/slf4j-api/$slf4jVersion/",
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
"https://www.javadocs.dev/org.apache.maven.resolver/maven-resolver-api/1.7.3",
)
options.tags("apiNote:a:API Note:")
options.tags("implNote:a:Implementation Note:")
inputs.files(apiAndDocs).ignoreEmptyDirectories().withPropertyName(apiAndDocs.name + "-configuration")
val apiAndDocsElements = apiAndDocs.elements
@@ -228,21 +243,11 @@ tasks.compileTestJava {
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;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath)
}
tasks.check {
dependsOn(scanJar)
}
val scanJarForOldGeneratedCode = tasks.register("scanJarForOldGeneratedCode", io.papermc.paperweight.tasks.ScanJarForOldGeneratedCode::class) {
mcVersion.set(providers.gradleProperty("mcVersion"))
annotation.set("Lio/papermc/paper/generated/GeneratedFrom;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath)
}
tasks.check {
dependsOn(scanJarForOldGeneratedCode)
dependsOn(scanJarForBadCalls)
}
@@ -1,8 +1,8 @@
package com.destroystokyo.paper.entity.ai;
import com.destroystokyo.paper.entity.RangedEntity;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.entity.SchoolableFish;
import io.papermc.paper.generated.GeneratedFrom;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.AbstractHorse;
import org.bukkit.entity.AbstractSkeleton;
@@ -21,6 +21,7 @@ import org.bukkit.entity.Fish;
import org.bukkit.entity.Fox;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Guardian;
import org.bukkit.entity.HappyGhast;
import org.bukkit.entity.Illager;
import org.bukkit.entity.Illusioner;
import org.bukkit.entity.IronGolem;
@@ -66,18 +67,20 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedClass
public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class);
GoalKey<AbstractHorse> HORSE_MOUNT_PANIC = create("horse_mount_panic", AbstractHorse.class);
GoalKey<AbstractHorse> RUN_AROUND_LIKE_CRAZY = create("run_around_like_crazy", AbstractHorse.class);
GoalKey<AbstractHorse> HORSE_RANDOM_STAND = create("horse_random_stand", AbstractHorse.class);
GoalKey<AbstractSkeleton> ABSTRACT_SKELETON_MELEE = create("abstract_skeleton_melee", AbstractSkeleton.class);
GoalKey<AbstractHorse> HORSE_RUN_AROUND_LIKE_CRAZY = create("horse_run_around_like_crazy", AbstractHorse.class);
GoalKey<AbstractVillager> LOOK_AT_TRADING_PLAYER = create("look_at_trading_player", AbstractVillager.class);
GoalKey<AbstractSkeleton> SKELETON_MELEE = create("skeleton_melee", AbstractSkeleton.class);
GoalKey<AbstractVillager> TRADE_WITH_PLAYER = create("trade_with_player", AbstractVillager.class);
GoalKey<AbstractVillager> VILLAGER_LOOK_AT_TRADING_PLAYER = create("villager_look_at_trading_player", AbstractVillager.class);
GoalKey<AbstractVillager> VILLAGER_TRADE_WITH_PLAYER = create("villager_trade_with_player", AbstractVillager.class);
GoalKey<Animals> BREED = create("breed", Animals.class);
@@ -101,12 +104,12 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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> 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<Cat> CAT_AVOID_ENTITY = create("cat_avoid_entity", Cat.class);
@@ -127,7 +130,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Creature> FLEE_SUN = create("flee_sun", Creature.class);
GoalKey<Creature> FOLLOW_BOAT = create("follow_boat", Creature.class);
GoalKey<Creature> FOLLOW_PLAYER_RIDDEN_ENTITY = create("follow_player_ridden_entity", Creature.class);
GoalKey<Creature> GOLEM_RANDOM_STROLL_IN_VILLAGE = create("golem_random_stroll_in_village", Creature.class);
@@ -165,16 +168,16 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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_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_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_GO_TO_BEACH = create("drowned_go_to_beach", Drowned.class);
@@ -199,14 +202,14 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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_DEFEND_TRUSTED = create("fox_defend_trusted", 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_FOLLOW_PARENT = create("fox_follow_parent", Fox.class);
@@ -217,29 +220,27 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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_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> 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> RANDOM_FLOAT_AROUND = create("random_float_around", Ghast.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);
@@ -247,9 +248,9 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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);
@@ -269,6 +270,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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> LEAP_AT = create("leap_at", Mob.class);
@@ -281,10 +284,14 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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> 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> VINDICATOR_BREAK_DOOR = create("vindicator_break_door", Mob.class);
@@ -293,6 +300,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Monster> RANGED_CROSSBOW_ATTACK = create("ranged_crossbow_attack", Monster.class);
GoalKey<Monster> SPEAR_USE = create("spear_use", Monster.class);
GoalKey<Ocelot> OCELOT_AVOID_ENTITY = create("ocelot_avoid_entity", Ocelot.class);
GoalKey<Ocelot> OCELOT_TEMPT = create("ocelot_tempt", Ocelot.class);
@@ -317,7 +326,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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);
@@ -339,27 +348,27 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Rabbit> RABBIT_PANIC = create("rabbit_panic", Rabbit.class);
GoalKey<Rabbit> RAID_GARDEN = create("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<Rabbit> RABBIT_RAID_GARDEN = create("rabbit_raid_garden", Rabbit.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_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> 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);
@@ -373,7 +382,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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);
@@ -429,14 +438,14 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
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<Wolf> BEG = create("beg", 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_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.attribute.Attribute;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class AttributeKeys {
/**
* {@code minecraft:armor}
@@ -83,6 +81,13 @@ public final class AttributeKeys {
*/
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}
*
@@ -251,6 +256,20 @@ public final class AttributeKeys {
*/
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() {
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.banner.PatternType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class BannerPatternKeys {
/**
* {@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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<PatternType> create(final Key key) {
return TypedKey.create(RegistryKey.BANNER_PATTERN, key);
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.Biome;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class BiomeKeys {
/**
* {@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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Biome> create(final Key key) {
return TypedKey.create(RegistryKey.BIOME, key);
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.BlockType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class BlockTypeKeys {
/**
* {@code minecraft:acacia_button}
@@ -97,6 +95,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> ACACIA_SAPLING = create(key("acacia_sapling"));
/**
* {@code minecraft:acacia_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> ACACIA_SHELF = create(key("acacia_shelf"));
/**
* {@code minecraft:acacia_sign}
*
@@ -349,6 +354,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BAMBOO_SAPLING = create(key("bamboo_sapling"));
/**
* {@code minecraft:bamboo_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BAMBOO_SHELF = create(key("bamboo_shelf"));
/**
* {@code minecraft:bamboo_sign}
*
@@ -538,6 +550,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BIRCH_SAPLING = create(key("birch_sapling"));
/**
* {@code minecraft:birch_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BIRCH_SHELF = create(key("birch_shelf"));
/**
* {@code minecraft:birch_sign}
*
@@ -1063,6 +1082,13 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -1070,6 +1096,13 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -1161,13 +1194,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CAVE_VINES_PLANT = create(key("cave_vines_plant"));
/**
* {@code minecraft:chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CHAIN = create(key("chain"));
/**
* {@code minecraft:chain_command_block}
*
@@ -1245,6 +1271,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CHERRY_SAPLING = create(key("cherry_sapling"));
/**
* {@code minecraft:cherry_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CHERRY_SHELF = create(key("cherry_shelf"));
/**
* {@code minecraft:cherry_sign}
*
@@ -1539,6 +1572,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CONDUIT = create(key("conduit"));
/**
* {@code minecraft:copper_bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> COPPER_BARS = create(key("copper_bars"));
/**
* {@code minecraft:copper_block}
*
@@ -1553,6 +1593,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> COPPER_BULB = create(key("copper_bulb"));
/**
* {@code minecraft:copper_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> COPPER_CHAIN = create(key("copper_chain"));
/**
* {@code minecraft:copper_chest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> COPPER_CHEST = create(key("copper_chest"));
/**
* {@code minecraft:copper_door}
*
@@ -1560,6 +1614,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> COPPER_DOOR = create(key("copper_door"));
/**
* {@code minecraft:copper_golem_statue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> COPPER_GOLEM_STATUE = create(key("copper_golem_statue"));
/**
* {@code minecraft:copper_grate}
*
@@ -1567,6 +1628,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> COPPER_GRATE = create(key("copper_grate"));
/**
* {@code minecraft:copper_lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> COPPER_LANTERN = create(key("copper_lantern"));
/**
* {@code minecraft:copper_ore}
*
@@ -1574,6 +1642,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> COPPER_ORE = create(key("copper_ore"));
/**
* {@code minecraft:copper_torch}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> COPPER_TORCH = create(key("copper_torch"));
/**
* {@code minecraft:copper_trapdoor}
*
@@ -1581,6 +1656,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> COPPER_TRAPDOOR = create(key("copper_trapdoor"));
/**
* {@code minecraft:copper_wall_torch}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> COPPER_WALL_TORCH = create(key("copper_wall_torch"));
/**
* {@code minecraft:cornflower}
*
@@ -1735,6 +1817,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CRIMSON_ROOTS = create(key("crimson_roots"));
/**
* {@code minecraft:crimson_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CRIMSON_SHELF = create(key("crimson_shelf"));
/**
* {@code minecraft:crimson_sign}
*
@@ -2022,6 +2111,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> DARK_OAK_SAPLING = create(key("dark_oak_sapling"));
/**
* {@code minecraft:dark_oak_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> DARK_OAK_SHELF = create(key("dark_oak_shelf"));
/**
* {@code minecraft:dark_oak_sign}
*
@@ -2463,6 +2559,13 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -2589,6 +2692,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> EXPOSED_COPPER = create(key("exposed_copper"));
/**
* {@code minecraft:exposed_copper_bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> EXPOSED_COPPER_BARS = create(key("exposed_copper_bars"));
/**
* {@code minecraft:exposed_copper_bulb}
*
@@ -2596,6 +2706,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> EXPOSED_COPPER_BULB = create(key("exposed_copper_bulb"));
/**
* {@code minecraft:exposed_copper_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> EXPOSED_COPPER_CHAIN = create(key("exposed_copper_chain"));
/**
* {@code minecraft:exposed_copper_chest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> EXPOSED_COPPER_CHEST = create(key("exposed_copper_chest"));
/**
* {@code minecraft:exposed_copper_door}
*
@@ -2603,6 +2727,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> EXPOSED_COPPER_DOOR = create(key("exposed_copper_door"));
/**
* {@code minecraft:exposed_copper_golem_statue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> EXPOSED_COPPER_GOLEM_STATUE = create(key("exposed_copper_golem_statue"));
/**
* {@code minecraft:exposed_copper_grate}
*
@@ -2610,6 +2741,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> EXPOSED_COPPER_GRATE = create(key("exposed_copper_grate"));
/**
* {@code minecraft:exposed_copper_lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> EXPOSED_COPPER_LANTERN = create(key("exposed_copper_lantern"));
/**
* {@code minecraft:exposed_copper_trapdoor}
*
@@ -2638,6 +2776,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> EXPOSED_CUT_COPPER_STAIRS = create(key("exposed_cut_copper_stairs"));
/**
* {@code minecraft:exposed_lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> EXPOSED_LIGHTNING_ROD = create(key("exposed_lightning_rod"));
/**
* {@code minecraft:farmland}
*
@@ -2687,6 +2832,13 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -2785,6 +2937,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> GOLD_ORE = create(key("gold_ore"));
/**
* {@code minecraft:golden_dandelion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> GOLDEN_DANDELION = create(key("golden_dandelion"));
/**
* {@code minecraft:granite}
*
@@ -3177,6 +3336,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> IRON_BLOCK = create(key("iron_block"));
/**
* {@code minecraft:iron_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> IRON_CHAIN = create(key("iron_chain"));
/**
* {@code minecraft:iron_door}
*
@@ -3289,6 +3455,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> JUNGLE_SAPLING = create(key("jungle_sapling"));
/**
* {@code minecraft:jungle_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> JUNGLE_SHELF = create(key("jungle_shelf"));
/**
* {@code minecraft:jungle_sign}
*
@@ -3408,6 +3581,13 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -3954,6 +4134,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> MANGROVE_ROOTS = create(key("mangrove_roots"));
/**
* {@code minecraft:mangrove_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> MANGROVE_SHELF = create(key("mangrove_shelf"));
/**
* {@code minecraft:mangrove_sign}
*
@@ -4325,6 +4512,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> OAK_SAPLING = create(key("oak_sapling"));
/**
* {@code minecraft:oak_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> OAK_SHELF = create(key("oak_shelf"));
/**
* {@code minecraft:oak_sign}
*
@@ -4528,6 +4722,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER = create(key("oxidized_copper"));
/**
* {@code minecraft:oxidized_copper_bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER_BARS = create(key("oxidized_copper_bars"));
/**
* {@code minecraft:oxidized_copper_bulb}
*
@@ -4535,6 +4736,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER_BULB = create(key("oxidized_copper_bulb"));
/**
* {@code minecraft:oxidized_copper_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER_CHAIN = create(key("oxidized_copper_chain"));
/**
* {@code minecraft:oxidized_copper_chest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER_CHEST = create(key("oxidized_copper_chest"));
/**
* {@code minecraft:oxidized_copper_door}
*
@@ -4542,6 +4757,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER_DOOR = create(key("oxidized_copper_door"));
/**
* {@code minecraft:oxidized_copper_golem_statue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER_GOLEM_STATUE = create(key("oxidized_copper_golem_statue"));
/**
* {@code minecraft:oxidized_copper_grate}
*
@@ -4549,6 +4771,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER_GRATE = create(key("oxidized_copper_grate"));
/**
* {@code minecraft:oxidized_copper_lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> OXIDIZED_COPPER_LANTERN = create(key("oxidized_copper_lantern"));
/**
* {@code minecraft:oxidized_copper_trapdoor}
*
@@ -4577,6 +4806,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> OXIDIZED_CUT_COPPER_STAIRS = create(key("oxidized_cut_copper_stairs"));
/**
* {@code minecraft:oxidized_lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> OXIDIZED_LIGHTNING_ROD = create(key("oxidized_lightning_rod"));
/**
* {@code minecraft:packed_ice}
*
@@ -4682,6 +4918,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> PALE_OAK_SAPLING = create(key("pale_oak_sapling"));
/**
* {@code minecraft:pale_oak_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> PALE_OAK_SHELF = create(key("pale_oak_shelf"));
/**
* {@code minecraft:pale_oak_sign}
*
@@ -5277,6 +5520,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> POTTED_FLOWERING_AZALEA_BUSH = create(key("potted_flowering_azalea_bush"));
/**
* {@code minecraft:potted_golden_dandelion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POTTED_GOLDEN_DANDELION = create(key("potted_golden_dandelion"));
/**
* {@code minecraft:potted_jungle_sapling}
*
@@ -6082,6 +6332,13 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -6397,6 +6654,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> SPRUCE_SAPLING = create(key("spruce_sapling"));
/**
* {@code minecraft:spruce_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SPRUCE_SHELF = create(key("spruce_shelf"));
/**
* {@code minecraft:spruce_sign}
*
@@ -6733,6 +6997,13 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -6761,6 +7032,20 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -7041,6 +7326,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WARPED_ROOTS = create(key("warped_roots"));
/**
* {@code minecraft:warped_shelf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WARPED_SHELF = create(key("warped_shelf"));
/**
* {@code minecraft:warped_sign}
*
@@ -7118,6 +7410,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_CHISELED_COPPER = create(key("waxed_chiseled_copper"));
/**
* {@code minecraft:waxed_copper_bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_COPPER_BARS = create(key("waxed_copper_bars"));
/**
* {@code minecraft:waxed_copper_block}
*
@@ -7132,6 +7431,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_COPPER_BULB = create(key("waxed_copper_bulb"));
/**
* {@code minecraft:waxed_copper_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_COPPER_CHAIN = create(key("waxed_copper_chain"));
/**
* {@code minecraft:waxed_copper_chest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_COPPER_CHEST = create(key("waxed_copper_chest"));
/**
* {@code minecraft:waxed_copper_door}
*
@@ -7139,6 +7452,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_COPPER_DOOR = create(key("waxed_copper_door"));
/**
* {@code minecraft:waxed_copper_golem_statue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_COPPER_GOLEM_STATUE = create(key("waxed_copper_golem_statue"));
/**
* {@code minecraft:waxed_copper_grate}
*
@@ -7146,6 +7466,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_COPPER_GRATE = create(key("waxed_copper_grate"));
/**
* {@code minecraft:waxed_copper_lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_COPPER_LANTERN = create(key("waxed_copper_lantern"));
/**
* {@code minecraft:waxed_copper_trapdoor}
*
@@ -7188,6 +7515,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER = create(key("waxed_exposed_copper"));
/**
* {@code minecraft:waxed_exposed_copper_bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER_BARS = create(key("waxed_exposed_copper_bars"));
/**
* {@code minecraft:waxed_exposed_copper_bulb}
*
@@ -7195,6 +7529,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER_BULB = create(key("waxed_exposed_copper_bulb"));
/**
* {@code minecraft:waxed_exposed_copper_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER_CHAIN = create(key("waxed_exposed_copper_chain"));
/**
* {@code minecraft:waxed_exposed_copper_chest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER_CHEST = create(key("waxed_exposed_copper_chest"));
/**
* {@code minecraft:waxed_exposed_copper_door}
*
@@ -7202,6 +7550,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER_DOOR = create(key("waxed_exposed_copper_door"));
/**
* {@code minecraft:waxed_exposed_copper_golem_statue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER_GOLEM_STATUE = create(key("waxed_exposed_copper_golem_statue"));
/**
* {@code minecraft:waxed_exposed_copper_grate}
*
@@ -7209,6 +7564,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER_GRATE = create(key("waxed_exposed_copper_grate"));
/**
* {@code minecraft:waxed_exposed_copper_lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_COPPER_LANTERN = create(key("waxed_exposed_copper_lantern"));
/**
* {@code minecraft:waxed_exposed_copper_trapdoor}
*
@@ -7237,6 +7599,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_CUT_COPPER_STAIRS = create(key("waxed_exposed_cut_copper_stairs"));
/**
* {@code minecraft:waxed_exposed_lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_EXPOSED_LIGHTNING_ROD = create(key("waxed_exposed_lightning_rod"));
/**
* {@code minecraft:waxed_lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_LIGHTNING_ROD = create(key("waxed_lightning_rod"));
/**
* {@code minecraft:waxed_oxidized_chiseled_copper}
*
@@ -7251,6 +7627,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER = create(key("waxed_oxidized_copper"));
/**
* {@code minecraft:waxed_oxidized_copper_bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER_BARS = create(key("waxed_oxidized_copper_bars"));
/**
* {@code minecraft:waxed_oxidized_copper_bulb}
*
@@ -7258,6 +7641,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER_BULB = create(key("waxed_oxidized_copper_bulb"));
/**
* {@code minecraft:waxed_oxidized_copper_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER_CHAIN = create(key("waxed_oxidized_copper_chain"));
/**
* {@code minecraft:waxed_oxidized_copper_chest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER_CHEST = create(key("waxed_oxidized_copper_chest"));
/**
* {@code minecraft:waxed_oxidized_copper_door}
*
@@ -7265,6 +7662,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER_DOOR = create(key("waxed_oxidized_copper_door"));
/**
* {@code minecraft:waxed_oxidized_copper_golem_statue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER_GOLEM_STATUE = create(key("waxed_oxidized_copper_golem_statue"));
/**
* {@code minecraft:waxed_oxidized_copper_grate}
*
@@ -7272,6 +7676,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER_GRATE = create(key("waxed_oxidized_copper_grate"));
/**
* {@code minecraft:waxed_oxidized_copper_lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_COPPER_LANTERN = create(key("waxed_oxidized_copper_lantern"));
/**
* {@code minecraft:waxed_oxidized_copper_trapdoor}
*
@@ -7300,6 +7711,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_CUT_COPPER_STAIRS = create(key("waxed_oxidized_cut_copper_stairs"));
/**
* {@code minecraft:waxed_oxidized_lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_OXIDIZED_LIGHTNING_ROD = create(key("waxed_oxidized_lightning_rod"));
/**
* {@code minecraft:waxed_weathered_chiseled_copper}
*
@@ -7314,6 +7732,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER = create(key("waxed_weathered_copper"));
/**
* {@code minecraft:waxed_weathered_copper_bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER_BARS = create(key("waxed_weathered_copper_bars"));
/**
* {@code minecraft:waxed_weathered_copper_bulb}
*
@@ -7321,6 +7746,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER_BULB = create(key("waxed_weathered_copper_bulb"));
/**
* {@code minecraft:waxed_weathered_copper_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER_CHAIN = create(key("waxed_weathered_copper_chain"));
/**
* {@code minecraft:waxed_weathered_copper_chest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER_CHEST = create(key("waxed_weathered_copper_chest"));
/**
* {@code minecraft:waxed_weathered_copper_door}
*
@@ -7328,6 +7767,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER_DOOR = create(key("waxed_weathered_copper_door"));
/**
* {@code minecraft:waxed_weathered_copper_golem_statue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER_GOLEM_STATUE = create(key("waxed_weathered_copper_golem_statue"));
/**
* {@code minecraft:waxed_weathered_copper_grate}
*
@@ -7335,6 +7781,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER_GRATE = create(key("waxed_weathered_copper_grate"));
/**
* {@code minecraft:waxed_weathered_copper_lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_COPPER_LANTERN = create(key("waxed_weathered_copper_lantern"));
/**
* {@code minecraft:waxed_weathered_copper_trapdoor}
*
@@ -7363,6 +7816,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_CUT_COPPER_STAIRS = create(key("waxed_weathered_cut_copper_stairs"));
/**
* {@code minecraft:waxed_weathered_lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WAXED_WEATHERED_LIGHTNING_ROD = create(key("waxed_weathered_lightning_rod"));
/**
* {@code minecraft:weathered_chiseled_copper}
*
@@ -7377,6 +7837,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WEATHERED_COPPER = create(key("weathered_copper"));
/**
* {@code minecraft:weathered_copper_bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WEATHERED_COPPER_BARS = create(key("weathered_copper_bars"));
/**
* {@code minecraft:weathered_copper_bulb}
*
@@ -7384,6 +7851,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WEATHERED_COPPER_BULB = create(key("weathered_copper_bulb"));
/**
* {@code minecraft:weathered_copper_chain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WEATHERED_COPPER_CHAIN = create(key("weathered_copper_chain"));
/**
* {@code minecraft:weathered_copper_chest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WEATHERED_COPPER_CHEST = create(key("weathered_copper_chest"));
/**
* {@code minecraft:weathered_copper_door}
*
@@ -7391,6 +7872,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WEATHERED_COPPER_DOOR = create(key("weathered_copper_door"));
/**
* {@code minecraft:weathered_copper_golem_statue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WEATHERED_COPPER_GOLEM_STATUE = create(key("weathered_copper_golem_statue"));
/**
* {@code minecraft:weathered_copper_grate}
*
@@ -7398,6 +7886,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WEATHERED_COPPER_GRATE = create(key("weathered_copper_grate"));
/**
* {@code minecraft:weathered_copper_lantern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WEATHERED_COPPER_LANTERN = create(key("weathered_copper_lantern"));
/**
* {@code minecraft:weathered_copper_trapdoor}
*
@@ -7426,6 +7921,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WEATHERED_CUT_COPPER_STAIRS = create(key("weathered_cut_copper_stairs"));
/**
* {@code minecraft:weathered_lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WEATHERED_LIGHTNING_ROD = create(key("weathered_lightning_rod"));
/**
* {@code minecraft:weeping_vines}
*
@@ -7559,6 +8061,13 @@ public final class BlockTypeKeys {
*/
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}
*
@@ -0,0 +1,54 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#CAT_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
@GeneratedClass
public final class CatSoundVariantKeys {
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:royal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.SoundVariant> ROYAL = create(key("royal"));
private CatSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Cat.SoundVariant} in the registry {@code minecraft:cat_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Cat.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.CAT_SOUND_VARIANT, key);
}
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class CatVariantKeys {
/**
* {@code minecraft:all_black}
@@ -107,7 +105,13 @@ public final class 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);
}
}
@@ -0,0 +1,54 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
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_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
@GeneratedClass
public final class ChickenSoundVariantKeys {
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Chicken.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:picky}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Chicken.SoundVariant> PICKY = create(key("picky"));
private ChickenSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Chicken.SoundVariant} in the registry {@code minecraft:chicken_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Chicken.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.CHICKEN_SOUND_VARIANT, key);
}
}
@@ -0,0 +1,61 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
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
@GeneratedClass
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);
}
}
@@ -0,0 +1,54 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
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_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
@GeneratedClass
public final class CowSoundVariantKeys {
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cow.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:moody}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cow.SoundVariant> MOODY = create(key("moody"));
private CowSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Cow.SoundVariant} in the registry {@code minecraft:cow_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Cow.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.COW_SOUND_VARIANT, key);
}
}
@@ -0,0 +1,61 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
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
@GeneratedClass
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);
}
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class DamageTypeKeys {
/**
* {@code minecraft:arrow}
@@ -286,6 +284,13 @@ public final class DamageTypeKeys {
*/
public static final TypedKey<DamageType> SONIC_BOOM = create(key("sonic_boom"));
/**
* {@code minecraft:spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> SPEAR = create(key("spear"));
/**
* {@code minecraft:spit}
*
@@ -374,12 +379,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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<DamageType> create(final Key key) {
return TypedKey.create(RegistryKey.DAMAGE_TYPE, key);
}
@@ -0,0 +1,804 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.datacomponent.DataComponentType;
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
@GeneratedClass
public final class DataComponentTypeKeys {
/**
* {@code minecraft:additional_trade_cost}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ADDITIONAL_TRADE_COST = create(key("additional_trade_cost"));
/**
* {@code minecraft:attack_range}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ATTACK_RANGE = create(key("attack_range"));
/**
* {@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/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAT_SOUND_VARIANT = create(key("cat/sound_variant"));
/**
* {@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/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CHICKEN_SOUND_VARIANT = create(key("chicken/sound_variant"));
/**
* {@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/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> COW_SOUND_VARIANT = create(key("cow/sound_variant"));
/**
* {@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:damage_type}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DAMAGE_TYPE = create(key("damage_type"));
/**
* {@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:dye}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DYE = create(key("dye"));
/**
* {@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:kinetic_weapon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> KINETIC_WEAPON = create(key("kinetic_weapon"));
/**
* {@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:minimum_attack_charge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MINIMUM_ATTACK_CHARGE = create(key("minimum_attack_charge"));
/**
* {@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:piercing_weapon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PIERCING_WEAPON = create(key("piercing_weapon"));
/**
* {@code minecraft:pig/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PIG_SOUND_VARIANT = create(key("pig/sound_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:swing_animation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SWING_ANIMATION = create(key("swing_animation"));
/**
* {@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_effects}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> USE_EFFECTS = create(key("use_effects"));
/**
* {@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"));
/**
* {@code minecraft:zombie_nautilus/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ZOMBIE_NAUTILUS_VARIANT = create(key("zombie_nautilus/variant"));
private DataComponentTypeKeys() {
}
private static TypedKey<DataComponentType> create(final Key key) {
return TypedKey.create(RegistryKey.DATA_COMPONENT_TYPE, key);
}
}
@@ -0,0 +1,61 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.dialog.Dialog;
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#DIALOG}.
*
* @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
@GeneratedClass
public final class DialogKeys {
/**
* {@code minecraft:custom_options}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Dialog> CUSTOM_OPTIONS = create(key("custom_options"));
/**
* {@code minecraft:quick_actions}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Dialog> QUICK_ACTIONS = create(key("quick_actions"));
/**
* {@code minecraft:server_links}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Dialog> SERVER_LINKS = create(key("server_links"));
private DialogKeys() {
}
/**
* Creates a typed key for {@link Dialog} in the registry {@code minecraft:dialog}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Dialog> create(final Key key) {
return TypedKey.create(RegistryKey.DIALOG, key);
}
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.enchantments.Enchantment;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class EnchantmentKeys {
/**
* {@code minecraft:aqua_affinity}
@@ -174,6 +172,13 @@ public final class EnchantmentKeys {
*/
public static final TypedKey<Enchantment> LUCK_OF_THE_SEA = create(key("luck_of_the_sea"));
/**
* {@code minecraft:lunge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> LUNGE = create(key("lunge"));
/**
* {@code minecraft:lure}
*
@@ -325,12 +330,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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Enchantment> create(final Key key) {
return TypedKey.create(RegistryKey.ENCHANTMENT, key);
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Fluid;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class FluidKeys {
/**
* {@code minecraft:empty}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Frog;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class FrogVariantKeys {
/**
* {@code minecraft:cold}
@@ -51,7 +49,13 @@ public final class 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);
}
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.GameEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class GameEventKeys {
/**
* {@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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<GameEvent> create(final Key key) {
return TypedKey.create(RegistryKey.GAME_EVENT, key);
}
@@ -0,0 +1,451 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.GameRule;
import org.bukkit.MinecraftExperimental;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#GAME_RULE}.
*
* @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
@GeneratedClass
public final class GameRuleKeys {
/**
* {@code minecraft:advance_time}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ADVANCE_TIME = create(key("advance_time"));
/**
* {@code minecraft:advance_weather}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ADVANCE_WEATHER = create(key("advance_weather"));
/**
* {@code minecraft:allow_entering_nether_using_portals}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ALLOW_ENTERING_NETHER_USING_PORTALS = create(key("allow_entering_nether_using_portals"));
/**
* {@code minecraft:block_drops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> BLOCK_DROPS = create(key("block_drops"));
/**
* {@code minecraft:block_explosion_drop_decay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> BLOCK_EXPLOSION_DROP_DECAY = create(key("block_explosion_drop_decay"));
/**
* {@code minecraft:command_block_output}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> COMMAND_BLOCK_OUTPUT = create(key("command_block_output"));
/**
* {@code minecraft:command_blocks_work}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> COMMAND_BLOCKS_WORK = create(key("command_blocks_work"));
/**
* {@code minecraft:drowning_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> DROWNING_DAMAGE = create(key("drowning_damage"));
/**
* {@code minecraft:elytra_movement_check}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ELYTRA_MOVEMENT_CHECK = create(key("elytra_movement_check"));
/**
* {@code minecraft:ender_pearls_vanish_on_death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ENDER_PEARLS_VANISH_ON_DEATH = create(key("ender_pearls_vanish_on_death"));
/**
* {@code minecraft:entity_drops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> ENTITY_DROPS = create(key("entity_drops"));
/**
* {@code minecraft:fall_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FALL_DAMAGE = create(key("fall_damage"));
/**
* {@code minecraft:fire_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FIRE_DAMAGE = create(key("fire_damage"));
/**
* {@code minecraft:fire_spread_radius_around_player}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FIRE_SPREAD_RADIUS_AROUND_PLAYER = create(key("fire_spread_radius_around_player"));
/**
* {@code minecraft:forgive_dead_players}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FORGIVE_DEAD_PLAYERS = create(key("forgive_dead_players"));
/**
* {@code minecraft:freeze_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> FREEZE_DAMAGE = create(key("freeze_damage"));
/**
* {@code minecraft:global_sound_events}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> GLOBAL_SOUND_EVENTS = create(key("global_sound_events"));
/**
* {@code minecraft:immediate_respawn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> IMMEDIATE_RESPAWN = create(key("immediate_respawn"));
/**
* {@code minecraft:keep_inventory}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> KEEP_INVENTORY = create(key("keep_inventory"));
/**
* {@code minecraft:lava_source_conversion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> LAVA_SOURCE_CONVERSION = create(key("lava_source_conversion"));
/**
* {@code minecraft:limited_crafting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> LIMITED_CRAFTING = create(key("limited_crafting"));
/**
* {@code minecraft:locator_bar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> LOCATOR_BAR = create(key("locator_bar"));
/**
* {@code minecraft:log_admin_commands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> LOG_ADMIN_COMMANDS = create(key("log_admin_commands"));
/**
* {@code minecraft:max_block_modifications}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_BLOCK_MODIFICATIONS = create(key("max_block_modifications"));
/**
* {@code minecraft:max_command_forks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_COMMAND_FORKS = create(key("max_command_forks"));
/**
* {@code minecraft:max_command_sequence_length}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_COMMAND_SEQUENCE_LENGTH = create(key("max_command_sequence_length"));
/**
* {@code minecraft:max_entity_cramming}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_ENTITY_CRAMMING = create(key("max_entity_cramming"));
/**
* {@code minecraft:max_minecart_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS)
public static final TypedKey<GameRule<?>> MAX_MINECART_SPEED = create(key("max_minecart_speed"));
/**
* {@code minecraft:max_snow_accumulation_height}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MAX_SNOW_ACCUMULATION_HEIGHT = create(key("max_snow_accumulation_height"));
/**
* {@code minecraft:mob_drops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MOB_DROPS = create(key("mob_drops"));
/**
* {@code minecraft:mob_explosion_drop_decay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MOB_EXPLOSION_DROP_DECAY = create(key("mob_explosion_drop_decay"));
/**
* {@code minecraft:mob_griefing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> MOB_GRIEFING = create(key("mob_griefing"));
/**
* {@code minecraft:natural_health_regeneration}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> NATURAL_HEALTH_REGENERATION = create(key("natural_health_regeneration"));
/**
* {@code minecraft:player_movement_check}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PLAYER_MOVEMENT_CHECK = create(key("player_movement_check"));
/**
* {@code minecraft:players_nether_portal_creative_delay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = create(key("players_nether_portal_creative_delay"));
/**
* {@code minecraft:players_nether_portal_default_delay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = create(key("players_nether_portal_default_delay"));
/**
* {@code minecraft:players_sleeping_percentage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PLAYERS_SLEEPING_PERCENTAGE = create(key("players_sleeping_percentage"));
/**
* {@code minecraft:projectiles_can_break_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PROJECTILES_CAN_BREAK_BLOCKS = create(key("projectiles_can_break_blocks"));
/**
* {@code minecraft:pvp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> PVP = create(key("pvp"));
/**
* {@code minecraft:raids}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> RAIDS = create(key("raids"));
/**
* {@code minecraft:random_tick_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> RANDOM_TICK_SPEED = create(key("random_tick_speed"));
/**
* {@code minecraft:reduced_debug_info}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> REDUCED_DEBUG_INFO = create(key("reduced_debug_info"));
/**
* {@code minecraft:respawn_radius}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> RESPAWN_RADIUS = create(key("respawn_radius"));
/**
* {@code minecraft:send_command_feedback}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SEND_COMMAND_FEEDBACK = create(key("send_command_feedback"));
/**
* {@code minecraft:show_advancement_messages}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SHOW_ADVANCEMENT_MESSAGES = create(key("show_advancement_messages"));
/**
* {@code minecraft:show_death_messages}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SHOW_DEATH_MESSAGES = create(key("show_death_messages"));
/**
* {@code minecraft:spawn_mobs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_MOBS = create(key("spawn_mobs"));
/**
* {@code minecraft:spawn_monsters}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_MONSTERS = create(key("spawn_monsters"));
/**
* {@code minecraft:spawn_patrols}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_PATROLS = create(key("spawn_patrols"));
/**
* {@code minecraft:spawn_phantoms}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_PHANTOMS = create(key("spawn_phantoms"));
/**
* {@code minecraft:spawn_wandering_traders}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_WANDERING_TRADERS = create(key("spawn_wandering_traders"));
/**
* {@code minecraft:spawn_wardens}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWN_WARDENS = create(key("spawn_wardens"));
/**
* {@code minecraft:spawner_blocks_work}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPAWNER_BLOCKS_WORK = create(key("spawner_blocks_work"));
/**
* {@code minecraft:spectators_generate_chunks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPECTATORS_GENERATE_CHUNKS = create(key("spectators_generate_chunks"));
/**
* {@code minecraft:spread_vines}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> SPREAD_VINES = create(key("spread_vines"));
/**
* {@code minecraft:tnt_explodes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> TNT_EXPLODES = create(key("tnt_explodes"));
/**
* {@code minecraft:tnt_explosion_drop_decay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> TNT_EXPLOSION_DROP_DECAY = create(key("tnt_explosion_drop_decay"));
/**
* {@code minecraft:universal_anger}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> UNIVERSAL_ANGER = create(key("universal_anger"));
/**
* {@code minecraft:water_source_conversion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameRule<?>> WATER_SOURCE_CONVERSION = create(key("water_source_conversion"));
private GameRuleKeys() {
}
private static TypedKey<GameRule<?>> create(final Key key) {
return TypedKey.create(RegistryKey.GAME_RULE, key);
}
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MusicInstrument;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class InstrumentKeys {
/**
* {@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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<MusicInstrument> create(final Key key) {
return TypedKey.create(RegistryKey.INSTRUMENT, key);
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.JukeboxSong;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class JukeboxSongKeys {
/**
* {@code minecraft:11}
@@ -90,6 +88,13 @@ public final class JukeboxSongKeys {
*/
public static final TypedKey<JukeboxSong> FAR = create(key("far"));
/**
* {@code minecraft:lava_chicken}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> LAVA_CHICKEN = create(key("lava_chicken"));
/**
* {@code minecraft:mall}
*
@@ -146,6 +151,13 @@ public final class JukeboxSongKeys {
*/
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}
*
@@ -164,12 +176,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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<JukeboxSong> create(final Key key) {
return TypedKey.create(RegistryKey.JUKEBOX_SONG, key);
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.map.MapCursor;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class MapDecorationTypeKeys {
/**
* {@code minecraft:banner_black}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.MenuType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class MenuTypeKeys {
/**
* {@code minecraft:anvil}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class MobEffectKeys {
/**
* {@code minecraft:absorption}
@@ -48,6 +46,13 @@ public final class MobEffectKeys {
*/
public static final TypedKey<PotionEffectType> BLINDNESS = create(key("blindness"));
/**
* {@code minecraft:breath_of_the_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> BREATH_OF_THE_NAUTILUS = create(key("breath_of_the_nautilus"));
/**
* {@code minecraft:conduit_power}
*
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Art;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class PaintingVariantKeys {
/**
* {@code minecraft:alban}
@@ -125,6 +123,13 @@ public final class PaintingVariantKeys {
*/
public static final TypedKey<Art> CREEBET = create(key("creebet"));
/**
* {@code minecraft:dennis}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> DENNIS = create(key("dennis"));
/**
* {@code minecraft:donkey_kong}
*
@@ -381,12 +386,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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Art> create(final Key key) {
return TypedKey.create(RegistryKey.PAINTING_VARIANT, key);
}
@@ -0,0 +1,61 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
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_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
@GeneratedClass
public final class PigSoundVariantKeys {
/**
* {@code minecraft:big}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.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<Pig.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:mini}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.SoundVariant> MINI = create(key("mini"));
private PigSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Pig.SoundVariant} in the registry {@code minecraft:pig_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Pig.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.PIG_SOUND_VARIANT, key);
}
}
@@ -0,0 +1,61 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
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
@GeneratedClass
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);
}
}
@@ -0,0 +1,181 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.entity.poi.PoiType;
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#POINT_OF_INTEREST_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
@GeneratedClass
public final class PoiTypeKeys {
/**
* {@code minecraft:armorer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> ARMORER = create(key("armorer"));
/**
* {@code minecraft:bee_nest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BEE_NEST = create(key("bee_nest"));
/**
* {@code minecraft:beehive}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BEEHIVE = create(key("beehive"));
/**
* {@code minecraft:butcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BUTCHER = create(key("butcher"));
/**
* {@code minecraft:cartographer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> CARTOGRAPHER = create(key("cartographer"));
/**
* {@code minecraft:cleric}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> CLERIC = create(key("cleric"));
/**
* {@code minecraft:farmer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FARMER = create(key("farmer"));
/**
* {@code minecraft:fisherman}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FISHERMAN = create(key("fisherman"));
/**
* {@code minecraft:fletcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FLETCHER = create(key("fletcher"));
/**
* {@code minecraft:home}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> HOME = create(key("home"));
/**
* {@code minecraft:leatherworker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LEATHERWORKER = create(key("leatherworker"));
/**
* {@code minecraft:librarian}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LIBRARIAN = create(key("librarian"));
/**
* {@code minecraft:lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LIGHTNING_ROD = create(key("lightning_rod"));
/**
* {@code minecraft:lodestone}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LODESTONE = create(key("lodestone"));
/**
* {@code minecraft:mason}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> MASON = create(key("mason"));
/**
* {@code minecraft:meeting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> MEETING = create(key("meeting"));
/**
* {@code minecraft:nether_portal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> NETHER_PORTAL = create(key("nether_portal"));
/**
* {@code minecraft:shepherd}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> SHEPHERD = create(key("shepherd"));
/**
* {@code minecraft:test_instance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> TEST_INSTANCE = create(key("test_instance"));
/**
* {@code minecraft:toolsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> TOOLSMITH = create(key("toolsmith"));
/**
* {@code minecraft:weaponsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> WEAPONSMITH = create(key("weaponsmith"));
private PoiTypeKeys() {
}
private static TypedKey<PoiType> create(final Key key) {
return TypedKey.create(RegistryKey.POINT_OF_INTEREST_TYPE, key);
}
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.generator.structure.Structure;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class StructureKeys {
/**
* {@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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Structure> create(final Key key) {
return TypedKey.create(RegistryKey.STRUCTURE, key);
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.generator.structure.StructureType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class StructureTypeKeys {
/**
* {@code minecraft:buried_treasure}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class TrimMaterialKeys {
/**
* {@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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<TrimMaterial> create(final Key key) {
return TypedKey.create(RegistryKey.TRIM_MATERIAL, key);
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimPattern;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class TrimPatternKeys {
/**
* {@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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<TrimPattern> create(final Key key) {
return TypedKey.create(RegistryKey.TRIM_PATTERN, key);
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Villager;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class VillagerProfessionKeys {
/**
* {@code minecraft:armorer}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Villager;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class VillagerTypeKeys {
/**
* {@code minecraft:desert}
@@ -0,0 +1,89 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
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
@GeneratedClass
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);
}
}
@@ -2,12 +2,11 @@ package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.annotation.GeneratedClass;
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.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class WolfVariantKeys {
/**
* {@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
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Wolf.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.WOLF_VARIANT, key);
}
@@ -0,0 +1,54 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.ZombieNautilus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#ZOMBIE_NAUTILUS_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
@GeneratedClass
public final class ZombieNautilusVariantKeys {
/**
* {@code minecraft:temperate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ZombieNautilus.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<ZombieNautilus.Variant> WARM = create(key("warm"));
private ZombieNautilusVariantKeys() {
}
/**
* Creates a typed key for {@link ZombieNautilus.Variant} in the registry {@code minecraft:zombie_nautilus_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<ZombieNautilus.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.ZOMBIE_NAUTILUS_VARIANT, key);
}
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.banner.PatternType;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class BannerPatternTagKeys {
/**
* {@code #minecraft:no_item_required}
@@ -113,7 +111,6 @@ public final class BannerPatternTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<PatternType> create(final Key key) {
return TagKey.create(RegistryKey.BANNER_PATTERN, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.Biome;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class BiomeTagKeys {
/**
* {@code #minecraft:allows_surface_slime_spawns}
@@ -41,13 +39,6 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> ALLOWS_TROPICAL_FISH_SPAWNS_AT_ANY_HEIGHT = create(key("allows_tropical_fish_spawns_at_any_height"));
/**
* {@code #minecraft:has_closer_water_fog}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_CLOSER_WATER_FOG = create(key("has_closer_water_fog"));
/**
* {@code #minecraft:has_structure/ancient_city}
*
@@ -286,13 +277,6 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> HAS_STRUCTURE_WOODLAND_MANSION = create(key("has_structure/woodland_mansion"));
/**
* {@code #minecraft:increased_fire_burnout}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> INCREASED_FIRE_BURNOUT = create(key("increased_fire_burnout"));
/**
* {@code #minecraft:is_badlands}
*
@@ -405,13 +389,6 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> MORE_FREQUENT_DROWNED_SPAWNS = create(key("more_frequent_drowned_spawns"));
/**
* {@code #minecraft:plays_underwater_music}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> PLAYS_UNDERWATER_MUSIC = create(key("plays_underwater_music"));
/**
* {@code #minecraft:polar_bears_spawn_on_alternate_blocks}
*
@@ -441,11 +418,11 @@ public final class BiomeTagKeys {
public static final TagKey<Biome> REQUIRED_OCEAN_MONUMENT_SURROUNDING = create(key("required_ocean_monument_surrounding"));
/**
* {@code #minecraft: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> SNOW_GOLEM_MELTS = create(key("snow_golem_melts"));
public static final TagKey<Biome> SPAWNS_COLD_VARIANT_FARM_ANIMALS = create(key("spawns_cold_variant_farm_animals"));
/**
* {@code #minecraft:spawns_cold_variant_frogs}
@@ -454,6 +431,13 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> SPAWNS_COLD_VARIANT_FROGS = create(key("spawns_cold_variant_frogs"));
/**
* {@code #minecraft:spawns_coral_variant_zombie_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_CORAL_VARIANT_ZOMBIE_NAUTILUS = create(key("spawns_coral_variant_zombie_nautilus"));
/**
* {@code #minecraft:spawns_gold_rabbits}
*
@@ -468,6 +452,13 @@ public final class BiomeTagKeys {
*/
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}
*
@@ -496,13 +487,6 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> WATER_ON_MAP_OUTLINES = create(key("water_on_map_outlines"));
/**
* {@code #minecraft:without_patrol_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> WITHOUT_PATROL_SPAWNS = create(key("without_patrol_spawns"));
/**
* {@code #minecraft:without_wandering_trader_spawns}
*
@@ -526,7 +510,6 @@ public final class BiomeTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Biome> create(final Key key) {
return TagKey.create(RegistryKey.BIOME, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.BlockType;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class BlockTypeTagKeys {
/**
* {@code #minecraft:acacia_logs}
@@ -118,13 +116,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> BAMBOO_BLOCKS = create(key("bamboo_blocks"));
/**
* {@code #minecraft:bamboo_plantable_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BAMBOO_PLANTABLE_ON = create(key("bamboo_plantable_on"));
/**
* {@code #minecraft:banners}
*
@@ -132,6 +123,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> BANNERS = create(key("banners"));
/**
* {@code #minecraft:bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BARS = create(key("bars"));
/**
* {@code #minecraft:base_stone_nether}
*
@@ -189,11 +187,18 @@ public final class BlockTypeTagKeys {
public static final TagKey<BlockType> BEEHIVES = create(key("beehives"));
/**
* {@code #minecraft:big_dripleaf_placeable}
* {@code #minecraft:beneath_bamboo_podzol_replaceable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BIG_DRIPLEAF_PLACEABLE = create(key("big_dripleaf_placeable"));
public static final TagKey<BlockType> BENEATH_BAMBOO_PODZOL_REPLACEABLE = create(key("beneath_bamboo_podzol_replaceable"));
/**
* {@code #minecraft:beneath_tree_podzol_replaceable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> BENEATH_TREE_PODZOL_REPLACEABLE = create(key("beneath_tree_podzol_replaceable"));
/**
* {@code #minecraft:birch_logs}
@@ -223,6 +228,13 @@ public final class BlockTypeTagKeys {
*/
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}
*
@@ -230,6 +242,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CAMPFIRES = create(key("campfires"));
/**
* {@code #minecraft:can_glide_through}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CAN_GLIDE_THROUGH = create(key("can_glide_through"));
/**
* {@code #minecraft:candle_cakes}
*
@@ -244,6 +263,34 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CANDLES = create(key("candles"));
/**
* {@code #minecraft:cannot_replace_below_tree_trunk}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_REPLACE_BELOW_TREE_TRUNK = create(key("cannot_replace_below_tree_trunk"));
/**
* {@code #minecraft:cannot_support_kelp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_SUPPORT_KELP = create(key("cannot_support_kelp"));
/**
* {@code #minecraft:cannot_support_seagrass}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_SUPPORT_SEAGRASS = create(key("cannot_support_seagrass"));
/**
* {@code #minecraft:cannot_support_snow_layer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CANNOT_SUPPORT_SNOW_LAYER = create(key("cannot_support_snow_layer"));
/**
* {@code #minecraft:cauldrons}
*
@@ -265,6 +312,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CEILING_HANGING_SIGNS = create(key("ceiling_hanging_signs"));
/**
* {@code #minecraft:chains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CHAINS = create(key("chains"));
/**
* {@code #minecraft:cherry_logs}
*
@@ -314,6 +368,27 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CONVERTABLE_TO_MUD = create(key("convertable_to_mud"));
/**
* {@code #minecraft:copper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> COPPER = create(key("copper"));
/**
* {@code #minecraft:copper_chests}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> COPPER_CHESTS = create(key("copper_chests"));
/**
* {@code #minecraft:copper_golem_statues}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> COPPER_GOLEM_STATUES = create(key("copper_golem_statues"));
/**
* {@code #minecraft:copper_ores}
*
@@ -377,13 +452,6 @@ public final class BlockTypeTagKeys {
*/
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}
*
@@ -440,6 +508,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> DRIPSTONE_REPLACEABLE_BLOCKS = create(key("dripstone_replaceable_blocks"));
/**
* {@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}
*
@@ -447,6 +522,20 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> EMERALD_ORES = create(key("emerald_ores"));
/**
* {@code #minecraft:enables_bubble_column_drag_down}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ENABLES_BUBBLE_COLUMN_DRAG_DOWN = create(key("enables_bubble_column_drag_down"));
/**
* {@code #minecraft:enables_bubble_column_push_up}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ENABLES_BUBBLE_COLUMN_PUSH_UP = create(key("enables_bubble_column_push_up"));
/**
* {@code #minecraft:enchantment_power_provider}
*
@@ -517,6 +606,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> FLOWERS = create(key("flowers"));
/**
* {@code #minecraft:forest_rock_can_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> FOREST_ROCK_CAN_PLACE_ON = create(key("forest_rock_can_place_on"));
/**
* {@code #minecraft:foxes_spawnable_on}
*
@@ -559,6 +655,20 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> GOLD_ORES = create(key("gold_ores"));
/**
* {@code #minecraft:grass_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> GRASS_BLOCKS = create(key("grass_blocks"));
/**
* {@code #minecraft:grows_crops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> GROWS_CROPS = create(key("grows_crops"));
/**
* {@code #minecraft:guarded_by_piglins}
*
@@ -566,6 +676,13 @@ public final class BlockTypeTagKeys {
*/
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}
*
@@ -573,6 +690,20 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> HOGLIN_REPELLENTS = create(key("hoglin_repellents"));
/**
* {@code #minecraft:huge_brown_mushroom_can_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> HUGE_BROWN_MUSHROOM_CAN_PLACE_ON = create(key("huge_brown_mushroom_can_place_on"));
/**
* {@code #minecraft:huge_red_mushroom_can_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> HUGE_RED_MUSHROOM_CAN_PLACE_ON = create(key("huge_red_mushroom_can_place_on"));
/**
* {@code #minecraft:ice}
*
@@ -580,6 +711,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> ICE = create(key("ice"));
/**
* {@code #minecraft:ice_spike_replaceable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> ICE_SPIKE_REPLACEABLE = create(key("ice_spike_replaceable"));
/**
* {@code #minecraft:impermeable}
*
@@ -587,6 +725,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> IMPERMEABLE = create(key("impermeable"));
/**
* {@code #minecraft:incorrect_for_copper_tool}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> INCORRECT_FOR_COPPER_TOOL = create(key("incorrect_for_copper_tool"));
/**
* {@code #minecraft:incorrect_for_diamond_tool}
*
@@ -678,6 +823,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> JUNGLE_LOGS = create(key("jungle_logs"));
/**
* {@code #minecraft:lanterns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> LANTERNS = create(key("lanterns"));
/**
* {@code #minecraft:lapis_ores}
*
@@ -699,6 +851,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> LEAVES = create(key("leaves"));
/**
* {@code #minecraft:lightning_rods}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> LIGHTNING_RODS = create(key("lightning_rods"));
/**
* {@code #minecraft:logs}
*
@@ -790,6 +949,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> MOOSHROOMS_SPAWNABLE_ON = create(key("mooshrooms_spawnable_on"));
/**
* {@code #minecraft:moss_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> MOSS_BLOCKS = create(key("moss_blocks"));
/**
* {@code #minecraft:moss_replaceable}
*
@@ -798,11 +964,11 @@ public final class BlockTypeTagKeys {
public static final TagKey<BlockType> MOSS_REPLACEABLE = create(key("moss_replaceable"));
/**
* {@code #minecraft:mushroom_grow_block}
* {@code #minecraft:mud}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> MUSHROOM_GROW_BLOCK = create(key("mushroom_grow_block"));
public static final TagKey<BlockType> MUD = create(key("mud"));
/**
* {@code #minecraft:needs_diamond_tool}
@@ -853,6 +1019,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> OCCLUDES_VIBRATION_SIGNALS = create(key("occludes_vibration_signals"));
/**
* {@code #minecraft:overrides_mushroom_light_requirement}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> OVERRIDES_MUSHROOM_LIGHT_REQUIREMENT = create(key("overrides_mushroom_light_requirement"));
/**
* {@code #minecraft:overworld_carver_replaceables}
*
@@ -923,6 +1096,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> PREVENT_MOB_SPAWNING_INSIDE = create(key("prevent_mob_spawning_inside"));
/**
* {@code #minecraft:prevents_nearby_leaf_decay}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> PREVENTS_NEARBY_LEAF_DECAY = create(key("prevents_nearby_leaf_decay"));
/**
* {@code #minecraft:rabbits_spawnable_on}
*
@@ -951,6 +1131,13 @@ public final class BlockTypeTagKeys {
*/
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}
*
@@ -1007,13 +1194,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SLABS = create(key("slabs"));
/**
* {@code #minecraft:small_dripleaf_placeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SMALL_DRIPLEAF_PLACEABLE = create(key("small_dripleaf_placeable"));
/**
* {@code #minecraft:small_flowers}
*
@@ -1056,20 +1236,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SNOW = create(key("snow"));
/**
* {@code #minecraft:snow_layer_can_survive_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SNOW_LAYER_CAN_SURVIVE_ON = create(key("snow_layer_can_survive_on"));
/**
* {@code #minecraft:snow_layer_cannot_survive_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SNOW_LAYER_CANNOT_SURVIVE_ON = create(key("snow_layer_cannot_survive_on"));
/**
* {@code #minecraft:soul_fire_base_blocks}
*
@@ -1140,6 +1306,237 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> STRIDER_WARM_BLOCKS = create(key("strider_warm_blocks"));
/**
* {@code #minecraft:substrate_overworld}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUBSTRATE_OVERWORLD = create(key("substrate_overworld"));
/**
* {@code #minecraft:support_override_cactus_flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORT_OVERRIDE_CACTUS_FLOWER = create(key("support_override_cactus_flower"));
/**
* {@code #minecraft:support_override_snow_layer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORT_OVERRIDE_SNOW_LAYER = create(key("support_override_snow_layer"));
/**
* {@code #minecraft:supports_azalea}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_AZALEA = create(key("supports_azalea"));
/**
* {@code #minecraft:supports_bamboo}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_BAMBOO = create(key("supports_bamboo"));
/**
* {@code #minecraft:supports_big_dripleaf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_BIG_DRIPLEAF = create(key("supports_big_dripleaf"));
/**
* {@code #minecraft:supports_cactus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CACTUS = create(key("supports_cactus"));
/**
* {@code #minecraft:supports_chorus_flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CHORUS_FLOWER = create(key("supports_chorus_flower"));
/**
* {@code #minecraft:supports_chorus_plant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CHORUS_PLANT = create(key("supports_chorus_plant"));
/**
* {@code #minecraft:supports_cocoa}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_COCOA = create(key("supports_cocoa"));
/**
* {@code #minecraft:supports_crimson_fungus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CRIMSON_FUNGUS = create(key("supports_crimson_fungus"));
/**
* {@code #minecraft:supports_crimson_roots}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CRIMSON_ROOTS = create(key("supports_crimson_roots"));
/**
* {@code #minecraft:supports_crops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_CROPS = create(key("supports_crops"));
/**
* {@code #minecraft:supports_dry_vegetation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_DRY_VEGETATION = create(key("supports_dry_vegetation"));
/**
* {@code #minecraft:supports_frogspawn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_FROGSPAWN = create(key("supports_frogspawn"));
/**
* {@code #minecraft:supports_hanging_mangrove_propagule}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_HANGING_MANGROVE_PROPAGULE = create(key("supports_hanging_mangrove_propagule"));
/**
* {@code #minecraft:supports_lily_pad}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_LILY_PAD = create(key("supports_lily_pad"));
/**
* {@code #minecraft:supports_mangrove_propagule}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_MANGROVE_PROPAGULE = create(key("supports_mangrove_propagule"));
/**
* {@code #minecraft:supports_melon_stem}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_MELON_STEM = create(key("supports_melon_stem"));
/**
* {@code #minecraft:supports_melon_stem_fruit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_MELON_STEM_FRUIT = create(key("supports_melon_stem_fruit"));
/**
* {@code #minecraft:supports_nether_sprouts}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_NETHER_SPROUTS = create(key("supports_nether_sprouts"));
/**
* {@code #minecraft:supports_nether_wart}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_NETHER_WART = create(key("supports_nether_wart"));
/**
* {@code #minecraft:supports_pumpkin_stem}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_PUMPKIN_STEM = create(key("supports_pumpkin_stem"));
/**
* {@code #minecraft:supports_pumpkin_stem_fruit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_PUMPKIN_STEM_FRUIT = create(key("supports_pumpkin_stem_fruit"));
/**
* {@code #minecraft:supports_small_dripleaf}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_SMALL_DRIPLEAF = create(key("supports_small_dripleaf"));
/**
* {@code #minecraft:supports_stem_crops}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_STEM_CROPS = create(key("supports_stem_crops"));
/**
* {@code #minecraft:supports_stem_fruit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_STEM_FRUIT = create(key("supports_stem_fruit"));
/**
* {@code #minecraft:supports_sugar_cane}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_SUGAR_CANE = create(key("supports_sugar_cane"));
/**
* {@code #minecraft:supports_sugar_cane_adjacently}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_SUGAR_CANE_ADJACENTLY = create(key("supports_sugar_cane_adjacently"));
/**
* {@code #minecraft:supports_vegetation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_VEGETATION = create(key("supports_vegetation"));
/**
* {@code #minecraft:supports_warped_fungus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_WARPED_FUNGUS = create(key("supports_warped_fungus"));
/**
* {@code #minecraft:supports_warped_roots}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_WARPED_ROOTS = create(key("supports_warped_roots"));
/**
* {@code #minecraft:supports_wither_rose}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPORTS_WITHER_ROSE = create(key("supports_wither_rose"));
/**
* {@code #minecraft:sword_efficient}
*
@@ -1147,6 +1544,13 @@ public final class BlockTypeTagKeys {
*/
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}
*
@@ -1168,6 +1572,27 @@ public final class BlockTypeTagKeys {
*/
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}
*
@@ -1294,6 +1719,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> WOODEN_PRESSURE_PLATES = create(key("wooden_pressure_plates"));
/**
* {@code #minecraft:wooden_shelves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> WOODEN_SHELVES = create(key("wooden_shelves"));
/**
* {@code #minecraft:wooden_slabs}
*
@@ -1338,7 +1770,6 @@ public final class BlockTypeTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<BlockType> create(final Key key) {
return TagKey.create(RegistryKey.BLOCK, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class DamageTypeTagKeys {
/**
* {@code #minecraft:always_hurts_ender_dragons}
@@ -267,7 +265,6 @@ public final class DamageTypeTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<DamageType> create(final Key key) {
return TagKey.create(RegistryKey.DAMAGE_TYPE, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.dialog.Dialog;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Fluid;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#FLUID}.
* Vanilla tag keys for {@link RegistryKey#DIALOG}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@@ -23,35 +22,33 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class FluidTagKeys {
@GeneratedClass
public final class DialogTagKeys {
/**
* {@code #minecraft:lava}
* {@code #minecraft:pause_screen_additions}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> LAVA = create(key("lava"));
public static final TagKey<Dialog> PAUSE_SCREEN_ADDITIONS = create(key("pause_screen_additions"));
/**
* {@code #minecraft:water}
* {@code #minecraft:quick_actions}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> WATER = create(key("water"));
public static final TagKey<Dialog> QUICK_ACTIONS = create(key("quick_actions"));
private FluidTagKeys() {
private DialogTagKeys() {
}
/**
* Creates a tag key for {@link Fluid} in the registry {@code minecraft:fluid}.
* Creates a tag key for {@link Dialog} in the registry {@code minecraft:dialog}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Fluid> create(final Key key) {
return TagKey.create(RegistryKey.FLUID, key);
public static TagKey<Dialog> create(final Key key) {
return TagKey.create(RegistryKey.DIALOG, key);
}
}
@@ -2,7 +2,7 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -24,9 +24,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class EnchantmentTagKeys {
/**
* {@code #minecraft:curse}
@@ -184,15 +183,6 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_DESERT_COMMON = create(key("trades/desert_common"));
/**
* {@code #minecraft:trades/desert_special}
*
* @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<Enchantment> TRADES_DESERT_SPECIAL = create(key("trades/desert_special"));
/**
* {@code #minecraft:trades/jungle_common}
*
@@ -202,15 +192,6 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_JUNGLE_COMMON = create(key("trades/jungle_common"));
/**
* {@code #minecraft:trades/jungle_special}
*
* @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<Enchantment> TRADES_JUNGLE_SPECIAL = create(key("trades/jungle_special"));
/**
* {@code #minecraft:trades/plains_common}
*
@@ -220,15 +201,6 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_PLAINS_COMMON = create(key("trades/plains_common"));
/**
* {@code #minecraft:trades/plains_special}
*
* @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<Enchantment> TRADES_PLAINS_SPECIAL = create(key("trades/plains_special"));
/**
* {@code #minecraft:trades/savanna_common}
*
@@ -238,15 +210,6 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SAVANNA_COMMON = create(key("trades/savanna_common"));
/**
* {@code #minecraft:trades/savanna_special}
*
* @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<Enchantment> TRADES_SAVANNA_SPECIAL = create(key("trades/savanna_special"));
/**
* {@code #minecraft:trades/snow_common}
*
@@ -256,15 +219,6 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SNOW_COMMON = create(key("trades/snow_common"));
/**
* {@code #minecraft:trades/snow_special}
*
* @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<Enchantment> TRADES_SNOW_SPECIAL = create(key("trades/snow_special"));
/**
* {@code #minecraft:trades/swamp_common}
*
@@ -274,15 +228,6 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SWAMP_COMMON = create(key("trades/swamp_common"));
/**
* {@code #minecraft:trades/swamp_special}
*
* @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<Enchantment> TRADES_SWAMP_SPECIAL = create(key("trades/swamp_special"));
/**
* {@code #minecraft:trades/taiga_common}
*
@@ -292,15 +237,6 @@ public final class EnchantmentTagKeys {
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_TAIGA_COMMON = create(key("trades/taiga_common"));
/**
* {@code #minecraft:trades/taiga_special}
*
* @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<Enchantment> TRADES_TAIGA_SPECIAL = create(key("trades/taiga_special"));
/**
* {@code #minecraft:treasure}
*
@@ -317,7 +253,6 @@ public final class EnchantmentTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Enchantment> create(final Key key) {
return TagKey.create(RegistryKey.ENCHANTMENT, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.EntityType;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,10 +22,16 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class EntityTypeTagKeys {
/**
* {@code #minecraft:accepts_iron_golem_gift}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> ACCEPTS_IRON_GOLEM_GIFT = create(key("accepts_iron_golem_gift"));
/**
* {@code #minecraft:aquatic}
*
@@ -76,6 +81,13 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> BOAT = create(key("boat"));
/**
* {@code #minecraft:burn_in_daylight}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> BURN_IN_DAYLIGHT = create(key("burn_in_daylight"));
/**
* {@code #minecraft:can_breathe_under_water}
*
@@ -83,6 +95,27 @@ public final class EntityTypeTagKeys {
*/
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_float_while_ridden}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_FLOAT_WHILE_RIDDEN = create(key("can_float_while_ridden"));
/**
* {@code #minecraft:can_turn_in_boats}
*
@@ -90,6 +123,41 @@ public final class EntityTypeTagKeys {
*/
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:can_wear_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_WEAR_NAUTILUS_ARMOR = create(key("can_wear_nautilus_armor"));
/**
* {@code #minecraft:candidate_for_iron_golem_gift}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CANDIDATE_FOR_IRON_GOLEM_GIFT = create(key("candidate_for_iron_golem_gift"));
/**
* {@code #minecraft:cannot_be_age_locked}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CANNOT_BE_AGE_LOCKED = create(key("cannot_be_age_locked"));
/**
* {@code #minecraft:cannot_be_pushed_onto_boats}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CANNOT_BE_PUSHED_ONTO_BOATS = create(key("cannot_be_pushed_onto_boats"));
/**
* {@code #minecraft:deflects_projectiles}
*
@@ -111,6 +179,13 @@ public final class EntityTypeTagKeys {
*/
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}
*
@@ -181,6 +256,13 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> INVERTED_HEALING_AND_HARM = create(key("inverted_healing_and_harm"));
/**
* {@code #minecraft:nautilus_hostiles}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> NAUTILUS_HOSTILES = create(key("nautilus_hostiles"));
/**
* {@code #minecraft:no_anger_from_wind_charge}
*
@@ -281,7 +363,6 @@ public final class EntityTypeTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<EntityType> create(final Key key) {
return TagKey.create(RegistryKey.ENTITY_TYPE, key);
}
@@ -0,0 +1,82 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Fluid;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla tag keys for {@link RegistryKey#FLUID}.
*
* @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
@GeneratedClass
public final class FluidTagKeys {
/**
* {@code #minecraft:bubble_column_can_occupy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> BUBBLE_COLUMN_CAN_OCCUPY = create(key("bubble_column_can_occupy"));
/**
* {@code #minecraft:lava}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> LAVA = create(key("lava"));
/**
* {@code #minecraft:supports_frogspawn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> SUPPORTS_FROGSPAWN = create(key("supports_frogspawn"));
/**
* {@code #minecraft:supports_lily_pad}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> SUPPORTS_LILY_PAD = create(key("supports_lily_pad"));
/**
* {@code #minecraft:supports_sugar_cane_adjacently}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> SUPPORTS_SUGAR_CANE_ADJACENTLY = create(key("supports_sugar_cane_adjacently"));
/**
* {@code #minecraft:water}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> WATER = create(key("water"));
private FluidTagKeys() {
}
/**
* Creates a tag key for {@link Fluid} in the registry {@code minecraft:fluid}.
*
* @param key the tag key's key
* @return a new tag key
*/
public static TagKey<Fluid> create(final Key key) {
return TagKey.create(RegistryKey.FLUID, key);
}
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.GameEvent;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class GameEventTagKeys {
/**
* {@code #minecraft:allay_can_listen}
@@ -71,7 +69,6 @@ public final class GameEventTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<GameEvent> create(final Key key) {
return TagKey.create(RegistryKey.GAME_EVENT, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MusicInstrument;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class InstrumentTagKeys {
/**
* {@code #minecraft:goat_horns}
@@ -57,7 +55,6 @@ public final class InstrumentTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<MusicInstrument> create(final Key key) {
return TagKey.create(RegistryKey.INSTRUMENT, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.ItemType;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class ItemTypeTagKeys {
/**
* {@code #minecraft:acacia_logs}
@@ -83,6 +81,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> BANNERS = create(key("banners"));
/**
* {@code #minecraft:bars}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> BARS = create(key("bars"));
/**
* {@code #minecraft:beacon_payment_items}
*
@@ -118,6 +123,13 @@ public final class ItemTypeTagKeys {
*/
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}
*
@@ -160,6 +172,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CAMEL_FOOD = create(key("camel_food"));
/**
* {@code #minecraft:camel_husk_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CAMEL_HUSK_FOOD = create(key("camel_husk_food"));
/**
* {@code #minecraft:candles}
*
@@ -167,6 +186,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CANDLES = create(key("candles"));
/**
* {@code #minecraft:cat_collar_dyes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CAT_COLLAR_DYES = create(key("cat_collar_dyes"));
/**
* {@code #minecraft:cat_food}
*
@@ -174,6 +200,20 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> CAT_FOOD = create(key("cat_food"));
/**
* {@code #minecraft:cauldron_can_remove_dye}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CAULDRON_CAN_REMOVE_DYE = create(key("cauldron_can_remove_dye"));
/**
* {@code #minecraft:chains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CHAINS = create(key("chains"));
/**
* {@code #minecraft:cherry_logs}
*
@@ -237,6 +277,27 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> COMPLETES_FIND_TREE_TUTORIAL = create(key("completes_find_tree_tutorial"));
/**
* {@code #minecraft:copper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> COPPER = create(key("copper"));
/**
* {@code #minecraft:copper_chests}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> COPPER_CHESTS = create(key("copper_chests"));
/**
* {@code #minecraft:copper_golem_statues}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> COPPER_GOLEM_STATUES = create(key("copper_golem_statues"));
/**
* {@code #minecraft:copper_ores}
*
@@ -244,6 +305,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> COPPER_ORES = create(key("copper_ores"));
/**
* {@code #minecraft:copper_tool_materials}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> COPPER_TOOL_MATERIALS = create(key("copper_tool_materials"));
/**
* {@code #minecraft:cow_food}
*
@@ -343,11 +411,18 @@ public final class ItemTypeTagKeys {
public static final TagKey<ItemType> DUPLICATES_ALLAYS = create(key("duplicates_allays"));
/**
* {@code #minecraft:dyeable}
* {@code #minecraft:dyes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> DYEABLE = create(key("dyeable"));
public static final TagKey<ItemType> DYES = create(key("dyes"));
/**
* {@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}
@@ -433,6 +508,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> ENCHANTABLE_LEG_ARMOR = create(key("enchantable/leg_armor"));
/**
* {@code #minecraft:enchantable/lunge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ENCHANTABLE_LUNGE = create(key("enchantable/lunge"));
/**
* {@code #minecraft:enchantable/mace}
*
@@ -440,6 +522,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> ENCHANTABLE_MACE = create(key("enchantable/mace"));
/**
* {@code #minecraft:enchantable/melee_weapon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ENCHANTABLE_MELEE_WEAPON = create(key("enchantable/melee_weapon"));
/**
* {@code #minecraft:enchantable/mining}
*
@@ -462,11 +551,11 @@ public final class ItemTypeTagKeys {
public static final TagKey<ItemType> ENCHANTABLE_SHARP_WEAPON = create(key("enchantable/sharp_weapon"));
/**
* {@code #minecraft:enchantable/sword}
* {@code #minecraft:enchantable/sweeping}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ENCHANTABLE_SWORD = create(key("enchantable/sword"));
public static final TagKey<ItemType> ENCHANTABLE_SWEEPING = create(key("enchantable/sweeping"));
/**
* {@code #minecraft:enchantable/trident}
@@ -510,6 +599,13 @@ public final class ItemTypeTagKeys {
*/
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}
*
@@ -573,6 +669,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> GOLD_TOOL_MATERIALS = create(key("gold_tool_materials"));
/**
* {@code #minecraft:grass_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> GRASS_BLOCKS = create(key("grass_blocks"));
/**
* {@code #minecraft:hanging_signs}
*
@@ -580,6 +683,27 @@ public final class ItemTypeTagKeys {
*/
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}
*
@@ -643,6 +767,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> JUNGLE_LOGS = create(key("jungle_logs"));
/**
* {@code #minecraft:lanterns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> LANTERNS = create(key("lanterns"));
/**
* {@code #minecraft:lapis_ores}
*
@@ -671,6 +802,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> LEG_ARMOR = create(key("leg_armor"));
/**
* {@code #minecraft:lightning_rods}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> LIGHTNING_RODS = create(key("lightning_rods"));
/**
* {@code #minecraft:llama_food}
*
@@ -699,6 +837,20 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> LOGS_THAT_BURN = create(key("logs_that_burn"));
/**
* {@code #minecraft:loom_dyes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> LOOM_DYES = create(key("loom_dyes"));
/**
* {@code #minecraft:loom_patterns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> LOOM_PATTERNS = create(key("loom_patterns"));
/**
* {@code #minecraft:mangrove_logs}
*
@@ -720,6 +872,48 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> MEAT = create(key("meat"));
/**
* {@code #minecraft:metal_nuggets}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> METAL_NUGGETS = create(key("metal_nuggets"));
/**
* {@code #minecraft:moss_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> MOSS_BLOCKS = create(key("moss_blocks"));
/**
* {@code #minecraft:mud}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> MUD = create(key("mud"));
/**
* {@code #minecraft:nautilus_bucket_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> NAUTILUS_BUCKET_FOOD = create(key("nautilus_bucket_food"));
/**
* {@code #minecraft:nautilus_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> NAUTILUS_FOOD = create(key("nautilus_food"));
/**
* {@code #minecraft:nautilus_taming_items}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> NAUTILUS_TAMING_ITEMS = create(key("nautilus_taming_items"));
/**
* {@code #minecraft:netherite_tool_materials}
*
@@ -881,6 +1075,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> REPAIRS_CHAIN_ARMOR = create(key("repairs_chain_armor"));
/**
* {@code #minecraft:repairs_copper_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> REPAIRS_COPPER_ARMOR = create(key("repairs_copper_armor"));
/**
* {@code #minecraft:repairs_diamond_armor}
*
@@ -944,6 +1145,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> SAPLINGS = create(key("saplings"));
/**
* {@code #minecraft:shearable_from_copper_golem}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SHEARABLE_FROM_COPPER_GOLEM = create(key("shearable_from_copper_golem"));
/**
* {@code #minecraft:sheep_food}
*
@@ -1021,6 +1229,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> SOUL_FIRE_BASE_BLOCKS = create(key("soul_fire_base_blocks"));
/**
* {@code #minecraft:spears}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SPEARS = create(key("spears"));
/**
* {@code #minecraft:spruce_logs}
*
@@ -1161,6 +1376,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> WITHER_SKELETON_DISLIKED_WEAPONS = create(key("wither_skeleton_disliked_weapons"));
/**
* {@code #minecraft:wolf_collar_dyes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> WOLF_COLLAR_DYES = create(key("wolf_collar_dyes"));
/**
* {@code #minecraft:wolf_food}
*
@@ -1196,6 +1418,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> WOODEN_PRESSURE_PLATES = create(key("wooden_pressure_plates"));
/**
* {@code #minecraft:wooden_shelves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> WOODEN_SHELVES = create(key("wooden_shelves"));
/**
* {@code #minecraft:wooden_slabs}
*
@@ -1238,6 +1467,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> WOOL_CARPETS = create(key("wool_carpets"));
/**
* {@code #minecraft:zombie_horse_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> ZOMBIE_HORSE_FOOD = create(key("zombie_horse_food"));
private ItemTypeTagKeys() {
}
@@ -1247,7 +1483,6 @@ public final class ItemTypeTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<ItemType> create(final Key key) {
return TagKey.create(RegistryKey.ITEM, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Art;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -23,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class PaintingVariantTagKeys {
/**
* {@code #minecraft:placeable}
@@ -43,7 +41,6 @@ public final class PaintingVariantTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Art> create(final Key key) {
return TagKey.create(RegistryKey.PAINTING_VARIANT, key);
}
@@ -2,16 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.entity.poi.PoiType;
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}.
* Vanilla tag keys for {@link RegistryKey#POINT_OF_INTEREST_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@@ -23,35 +22,40 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class CatVariantTagKeys {
@GeneratedClass
public final class PoiTypeTagKeys {
/**
* {@code #minecraft:default_spawns}
* {@code #minecraft:acquirable_job_site}
*
* @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"));
public static final TagKey<PoiType> ACQUIRABLE_JOB_SITE = create(key("acquirable_job_site"));
/**
* {@code #minecraft:full_moon_spawns}
* {@code #minecraft:bee_home}
*
* @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"));
public static final TagKey<PoiType> BEE_HOME = create(key("bee_home"));
private CatVariantTagKeys() {
/**
* {@code #minecraft:village}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PoiType> VILLAGE = create(key("village"));
private PoiTypeTagKeys() {
}
/**
* Creates a tag key for {@link Cat.Type} in the registry {@code minecraft:cat_variant}.
* Creates a tag key for {@link PoiType} in the registry {@code minecraft:point_of_interest_type}.
*
* @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);
public static TagKey<PoiType> create(final Key key) {
return TagKey.create(RegistryKey.POINT_OF_INTEREST_TYPE, key);
}
}
@@ -0,0 +1,47 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.potion.PotionType;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla tag keys for {@link RegistryKey#POTION}.
*
* @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
@GeneratedClass
public final class PotionTypeTagKeys {
/**
* {@code #minecraft:tradeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PotionType> TRADEABLE = create(key("tradeable"));
private PotionTypeTagKeys() {
}
/**
* Creates a tag key for {@link PotionType} in the registry {@code minecraft:potion}.
*
* @param key the tag key's key
* @return a new tag key
*/
public static TagKey<PotionType> create(final Key key) {
return TagKey.create(RegistryKey.POTION, key);
}
}
@@ -2,17 +2,15 @@ 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.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MinecraftExperimental;
import org.bukkit.generator.structure.Structure;
import org.jetbrains.annotations.ApiStatus;
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
* what is available from the vanilla game source. They may be
@@ -24,9 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
@GeneratedClass
public final class StructureTagKeys {
/**
* {@code #minecraft:cats_spawn_as_black}
@@ -75,8 +72,6 @@ public final class StructureTagKeys {
*
* @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"));
/**
@@ -84,8 +79,6 @@ public final class StructureTagKeys {
*
* @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"));
/**
@@ -100,8 +93,6 @@ public final class StructureTagKeys {
*
* @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"));
/**
@@ -109,8 +100,6 @@ public final class StructureTagKeys {
*
* @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"));
/**
@@ -118,8 +107,6 @@ public final class StructureTagKeys {
*
* @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"));
/**
@@ -127,8 +114,6 @@ public final class StructureTagKeys {
*
* @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"));
/**
@@ -136,8 +121,6 @@ public final class StructureTagKeys {
*
* @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"));
/**
@@ -191,7 +174,6 @@ public final class StructureTagKeys {
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Structure> create(final Key key) {
return TagKey.create(RegistryKey.STRUCTURE, key);
}
@@ -51,8 +51,7 @@ import static co.aikar.timings.TimingsManager.MINUTE_REPORTS;
import static co.aikar.util.JSONUtil.*;
/**
* Internal.
*
* @hidden
* @deprecated Timings will be removed in the future
*/
@Deprecated(forRemoval = true)
@@ -135,7 +134,7 @@ public class TimingHistory {
}
}
return pair(
worldMap.get(world.getName()),
worldMap.get(world.key().asString()),
toArrayMapper(regions.values(),new Function<RegionData, Object>() {
@NotNull
@Override
@@ -289,7 +288,7 @@ public class TimingHistory {
final TicksRecord ticksRecord = new TicksRecord();
final PingRecord pingRecord = new PingRecord();
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 freeMemory = TimingsManager.FULL_SERVER_TICK.avgFreeMemory;
final double loadAvg = ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage();
@@ -153,9 +153,9 @@ public final class TimingsManager {
public static Timing getCommandTiming(@Nullable String pluginName, @NotNull Command command) {
Plugin plugin = null;
final Server server = Bukkit.getServer();
if (!( server == null || pluginName == null ||
"minecraft".equals(pluginName) || "bukkit".equals(pluginName) ||
"spigot".equalsIgnoreCase(pluginName) || "paper".equals(pluginName)
if (!(server == null || pluginName == null ||
"minecraft".equals(pluginName) || "bukkit".equals(pluginName) ||
"spigot".equalsIgnoreCase(pluginName) || "paper".equals(pluginName)
)) {
plugin = server.getPluginManager().getPlugin(pluginName);
}
@@ -5,10 +5,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.jetbrains.annotations.NotNull;
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.List;
import java.util.Map;
@@ -82,9 +82,9 @@ public class LoadingMap <K, V> extends AbstractMap<K, V> {
/**
* Creates a LoadingMap with an auto instantiating loader.
*
* Will auto construct class of of Value when not found
* Will auto construct class of Value when not found
*
* Since this uses Reflection, It is more effecient to define your own static loader
* Since this uses Reflection, It is more efficient to define your own static loader
* than using this helper, but if performance is not critical, this is easier.
*
* @param backingMap Actual map being used.
@@ -102,9 +102,9 @@ public class LoadingMap <K, V> extends AbstractMap<K, V> {
/**
* Creates a LoadingMap with an auto instantiating loader.
*
* Will auto construct class of of Value when not found
* Will auto construct class of Value when not found
*
* Since this uses Reflection, It is more effecient to define your own static loader
* Since this uses Reflection, It is more efficient to define your own static loader
* than using this helper, but if performance is not critical, this is easier.
*
* @param backingMap Actual map being used.
@@ -1,5 +1,6 @@
package com.destroystokyo.paper;
import java.util.Locale;
import net.kyori.adventure.translation.Translatable;
import net.kyori.adventure.util.Index;
import org.bukkit.inventory.MainHand;
@@ -29,9 +30,11 @@ public final class ClientOption<T> {
}
public enum ChatVisibility implements Translatable {
FULL("full"),
SYSTEM("system"),
HIDDEN("hidden"),
// Start generate - ChatVisibility
FULL("options.chat.visibility.full"),
SYSTEM("options.chat.visibility.system"),
HIDDEN("options.chat.visibility.hidden"),
// End generate - ChatVisibility
/**
* @deprecated no longer used anymore since 1.15.2, the value fallback
* to the default value of the setting when unknown on the server.
@@ -40,37 +43,39 @@ public final class ClientOption<T> {
@Deprecated(since = "1.15.2", forRemoval = true)
UNKNOWN("unknown");
public static final Index<String, ChatVisibility> NAMES = Index.create(ChatVisibility.class, chatVisibility -> chatVisibility.name);
private final String name;
public static final Index<String, ChatVisibility> NAMES = Index.create(ChatVisibility.class, chatVisibility -> chatVisibility.name().toLowerCase(Locale.ENGLISH));
private final String translationKey;
ChatVisibility(final String name) {
this.name = name;
ChatVisibility(final String translationKey) {
this.translationKey = translationKey;
}
@Override
public String translationKey() {
if (this == UNKNOWN) {
throw new UnsupportedOperationException(this.name + " doesn't have a translation key");
throw new UnsupportedOperationException(this.name() + " doesn't have a translation key");
}
return "options.chat.visibility." + this.name;
return this.translationKey;
}
}
public enum ParticleVisibility implements Translatable {
ALL("all"),
DECREASED("decreased"),
MINIMAL("minimal");
// Start generate - ParticleVisibility
ALL("options.particles.all"),
DECREASED("options.particles.decreased"),
MINIMAL("options.particles.minimal");
// End generate - ParticleVisibility
public static final Index<String, ParticleVisibility> NAMES = Index.create(ParticleVisibility.class, particleVisibility -> particleVisibility.name);
private final String name;
public static final Index<String, ParticleVisibility> NAMES = Index.create(ParticleVisibility.class, particleVisibility -> particleVisibility.name().toLowerCase(Locale.ENGLISH));
private final String translationKey;
ParticleVisibility(final String name) {
this.name = name;
ParticleVisibility(final String translationKey) {
this.translationKey = translationKey;
}
@Override
public String translationKey() {
return "options.particles." + this.name;
return this.translationKey;
}
}
}
@@ -6,18 +6,17 @@ package com.destroystokyo.paper;
import com.google.common.collect.Lists;
import io.papermc.paper.tag.BaseTag;
import java.util.Collection;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.data.BlockData;
import org.bukkit.inventory.ItemStack;
import java.util.Collection;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -94,7 +93,8 @@ public class MaterialSetTag extends BaseTag<Material, MaterialSetTag> {
return isTagged(item.getType());
}
@Override
public boolean isTagged(@NotNull Material material) {
return this.tagged.contains(material);
return super.isTagged(material);
}
}
@@ -23,6 +23,7 @@
package com.destroystokyo.paper;
import java.util.Objects;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Tag;
@@ -38,19 +39,32 @@ import org.bukkit.Tag;
public class MaterialTags {
private static NamespacedKey keyFor(String key) {
//noinspection deprecation
return new NamespacedKey("paper", key + "_settag");
}
public static final MaterialSetTag ARROWS = new MaterialSetTag(keyFor("arrows"))
.endsWith("ARROW")
.ensureSize("ARROWS", 3).lock();
private static MaterialSetTag replacedBy(Tag<Material> vanillaTag) {
return replacedBy(vanillaTag, Objects.requireNonNull(vanillaTag).key().value());
}
@SuppressWarnings("unchecked")
private static MaterialSetTag replacedBy(Tag<Material> vanillaTag, String legacyKey) {
Objects.requireNonNull(vanillaTag);
return new MaterialSetTag(keyFor(legacyKey)).add(vanillaTag).lock();
}
/**
* @deprecated in favour of {@link Tag#ITEMS_ARROWS}
*/
@Deprecated(since = "1.21.8")
public static final MaterialSetTag ARROWS = replacedBy(Tag.ITEMS_ARROWS);
/**
* Covers all colors of beds.
*
* @deprecated in favour of {@link Tag#BEDS}
*/
public static final MaterialSetTag BEDS = new MaterialSetTag(keyFor("beds"))
.endsWith("_BED")
.ensureSize("BEDS", 16).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag BEDS = replacedBy(Tag.BEDS);
/**
* Covers all bucket items.
@@ -61,9 +75,11 @@ public class MaterialTags {
/**
* Covers coal and charcoal.
*
* @deprecated in favour of {@link Tag#ITEMS_COALS}
*/
public static final MaterialSetTag COALS = new MaterialSetTag(keyFor("coals"))
.add(Material.COAL, Material.CHARCOAL).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag COALS = replacedBy(Tag.ITEMS_COALS);
/**
* Covers both cobblestone wall variants.
@@ -87,10 +103,11 @@ public class MaterialTags {
/**
* Covers all colors of concrete powder.
*
* @deprecated in favour of {@link Tag#CONCRETE_POWDER}
*/
public static final MaterialSetTag CONCRETE_POWDER = new MaterialSetTag(keyFor("concrete_powder"))
.endsWith("_CONCRETE_POWDER")
.ensureSize("CONCRETE_POWDER", 16).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag CONCRETE_POWDER = replacedBy(Tag.CONCRETE_POWDER);
/**
* Covers the two types of cooked fish.
@@ -100,31 +117,35 @@ public class MaterialTags {
/**
* Covers all variants of doors.
*
* @deprecated in favour of {@link Tag#DOORS}
*/
public static final MaterialSetTag DOORS = new MaterialSetTag(keyFor("doors"))
.endsWith("_DOOR")
.ensureSize("DOORS", 21).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag DOORS = replacedBy(Tag.DOORS);
/**
* Covers all dyes.
*
* @deprecated in favour of {@link Tag#ITEMS_DYES}
*/
public static final MaterialSetTag DYES = new MaterialSetTag(keyFor("dyes"))
.endsWith("_DYE")
.ensureSize("DYES", 16).lock();
@Deprecated(since = "26.1")
public static final MaterialSetTag DYES = replacedBy(Tag.ITEMS_DYES);
/**
* Covers all variants of gates.
*
* @deprecated in favour of {@link Tag#FENCE_GATES}
*/
public static final MaterialSetTag FENCE_GATES = new MaterialSetTag(keyFor("fence_gates"))
.endsWith("_GATE")
.ensureSize("FENCE_GATES", 12).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag FENCE_GATES = replacedBy(Tag.FENCE_GATES);
/**
* Covers all variants of fences.
*
* @deprecated in favour of {@link Tag#FENCES}
*/
public static final MaterialSetTag FENCES = new MaterialSetTag(keyFor("fences"))
.endsWith("_FENCE")
.ensureSize("FENCES", 13).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag FENCES = replacedBy(Tag.FENCES);
/**
* Covers all variants of fish buckets.
@@ -133,7 +154,7 @@ public class MaterialTags {
.add(Material.COD_BUCKET, Material.PUFFERFISH_BUCKET, Material.SALMON_BUCKET, Material.TROPICAL_FISH_BUCKET).lock();
/**
* Covers the non-colored glass and 16 stained glass (not panes).
* Covers the non-colored glass and 16 stained glasses (not panes).
*/
public static final MaterialSetTag GLASS = new MaterialSetTag(keyFor("glass"))
.endsWith("_GLASS")
@@ -182,7 +203,7 @@ public class MaterialTags {
*/
public static final MaterialSetTag HORSE_ARMORS = new MaterialSetTag(keyFor("horse_armors"))
.endsWith("_HORSE_ARMOR")
.ensureSize("HORSE_ARMORS", 4).lock();
.ensureSize("HORSE_ARMORS", 6).lock();
/**
* Covers the variants of infested blocks.
@@ -214,10 +235,11 @@ public class MaterialTags {
/**
* Covers all ores.
*/
@SuppressWarnings("unchecked")
public static final MaterialSetTag ORES = new MaterialSetTag(keyFor("ores"))
.add(Material.ANCIENT_DEBRIS)
.endsWith("_ORE")
.ensureSize("ORES", 19).lock();
.add(Tag.COAL_ORES, Tag.COPPER_ORES, Tag.IRON_ORES, Tag.GOLD_ORES,
Tag.LAPIS_ORES, Tag.REDSTONE_ORES, Tag.DIAMOND_ORES, Tag.EMERALD_ORES)
.add(Material.ANCIENT_DEBRIS, Material.NETHER_QUARTZ_ORE).lock();
/**
* Covers all piston typed items and blocks including the piston head and moving piston.
@@ -235,10 +257,11 @@ public class MaterialTags {
/**
* Covers all wooden pressure plates and the weighted pressure plates and the stone pressure plate.
*
* @deprecated in favour of {@link Tag#PRESSURE_PLATES}
*/
public static final MaterialSetTag PRESSURE_PLATES = new MaterialSetTag(keyFor("pressure_plates"))
.endsWith("_PRESSURE_PLATE")
.ensureSize("PRESSURE_PLATES", 16).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag PRESSURE_PLATES = replacedBy(Tag.PRESSURE_PLATES);
/**
* Covers the variants of prismarine blocks.
@@ -298,10 +321,11 @@ public class MaterialTags {
/**
* Covers the non-colored and colored shulker boxes.
*
* @deprecated in favour of {@link Tag#SHULKER_BOXES}
*/
public static final MaterialSetTag SHULKER_BOXES = new MaterialSetTag(keyFor("shulker_boxes"))
.endsWith("SHULKER_BOX")
.ensureSize("SHULKER_BOXES", 17).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag SHULKER_BOXES = replacedBy(Tag.SHULKER_BOXES);
/**
* Covers zombie, creeper, skeleton, dragon, and player heads.
@@ -317,7 +341,7 @@ public class MaterialTags {
*/
public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs"))
.endsWith("_SPAWN_EGG")
.ensureSize("SPAWN_EGGS", 81).lock();
.ensureSize("SPAWN_EGGS", 87).lock();
/**
* Covers all colors of stained glass.
@@ -335,43 +359,43 @@ public class MaterialTags {
/**
* Covers all variants of trapdoors.
*
* @deprecated in favour of {@link Tag#TRAPDOORS}
*/
public static final MaterialSetTag TRAPDOORS = new MaterialSetTag(keyFor("trapdoors"))
.endsWith("_TRAPDOOR")
.ensureSize("TRAPDOORS", 21).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag TRAPDOORS = replacedBy(Tag.TRAPDOORS);
/**
* Covers all wood variants of doors.
*
* @deprecated in favour of {@link Tag#WOODEN_DOORS}
*/
public static final MaterialSetTag WOODEN_DOORS = new MaterialSetTag(keyFor("wooden_doors"))
.endsWith("_DOOR")
.not(Material.IRON_DOOR)
.notContains("COPPER")
.ensureSize("WOODEN_DOORS", 12).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag WOODEN_DOORS = replacedBy(Tag.WOODEN_DOORS);
/**
* Covers all wood variants of fences.
*
* @deprecated in favour of {@link Tag#WOODEN_FENCES}
*/
public static final MaterialSetTag WOODEN_FENCES = new MaterialSetTag(keyFor("wooden_fences"))
.endsWith("_FENCE")
.not(Material.NETHER_BRICK_FENCE)
.ensureSize("WOODEN_FENCES", 12).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag WOODEN_FENCES = replacedBy(Tag.WOODEN_FENCES);
/**
* Covers all wood variants of trapdoors.
*
* @deprecated in favour of {@link Tag#WOODEN_TRAPDOORS}
*/
public static final MaterialSetTag WOODEN_TRAPDOORS = new MaterialSetTag(keyFor("wooden_trapdoors"))
.endsWith("_TRAPDOOR")
.not(Material.IRON_TRAPDOOR)
.notContains("COPPER")
.ensureSize("WOODEN_TRAPDOORS", 12).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag WOODEN_TRAPDOORS = replacedBy(Tag.WOODEN_TRAPDOORS);
/**
* Covers the wood variants of gates.
*
* @deprecated in favour of {@link Tag#FENCE_GATES}
*/
public static final MaterialSetTag WOODEN_GATES = new MaterialSetTag(keyFor("wooden_gates"))
.endsWith("_GATE")
.ensureSize("WOODEN_GATES", 12).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag WOODEN_GATES = replacedBy(Tag.FENCE_GATES, "wooden_gates");
/**
* Covers the variants of purpur.
@@ -382,10 +406,11 @@ public class MaterialTags {
/**
* Covers the variants of signs.
*
* @deprecated in favour of {@link Tag#ALL_SIGNS}
*/
public static final MaterialSetTag SIGNS = new MaterialSetTag(keyFor("signs"))
.endsWith("_SIGN")
.ensureSize("SIGNS", 48).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag SIGNS = replacedBy(Tag.ALL_SIGNS, "signs");
/**
* Covers the variants of a regular torch.
@@ -408,112 +433,137 @@ public class MaterialTags {
.add(Material.SOUL_TORCH, Material.SOUL_WALL_TORCH)
.ensureSize("SOUL_TORCH", 2).lock();
/**
* Covers the variants of a copper torch.
*/
public static final MaterialSetTag COPPER_TORCH = new MaterialSetTag(keyFor("copper_torch"))
.add(Material.COPPER_TORCH, Material.COPPER_WALL_TORCH)
.ensureSize("COPPER_TORCH", 2).lock();
/**
* Covers the variants of torches.
*/
public static final MaterialSetTag TORCHES = new MaterialSetTag(keyFor("torches"))
.add(TORCH, REDSTONE_TORCH, SOUL_TORCH)
.ensureSize("TORCHES", 6).lock();
.add(TORCH, REDSTONE_TORCH, SOUL_TORCH, COPPER_TORCH)
.ensureSize("TORCHES", 8).lock();
/**
* Covers the variants of lanterns.
*
* @deprecated in favour of {@link Tag#LANTERNS}
*/
public static final MaterialSetTag LANTERNS = new MaterialSetTag(keyFor("lanterns"))
.add(Material.LANTERN, Material.SOUL_LANTERN)
.ensureSize("LANTERNS", 2).lock();
@Deprecated(since = "1.21.9")
public static final MaterialSetTag LANTERNS = replacedBy(Tag.LANTERNS);
/**
* Covers the variants of rails.
*
* @deprecated in favour of {@link Tag#RAILS}
*/
public static final MaterialSetTag RAILS = new MaterialSetTag(keyFor("rails"))
.endsWith("RAIL")
.ensureSize("RAILS", 4).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag RAILS = replacedBy(Tag.RAILS);
/**
* Covers the variants of swords.
*
* @deprecated in favour of {@link Tag#ITEMS_SWORDS}
*/
public static final MaterialSetTag SWORDS = new MaterialSetTag(keyFor("swords"))
.endsWith("_SWORD")
.ensureSize("SWORDS", 6).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag SWORDS = replacedBy(Tag.ITEMS_SWORDS);
/**
* Covers the variants of shovels.
*
* @deprecated in favour of {@link Tag#ITEMS_SHOVELS}
*/
public static final MaterialSetTag SHOVELS = new MaterialSetTag(keyFor("shovels"))
.endsWith("_SHOVEL")
.ensureSize("SHOVELS", 6).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag SHOVELS = replacedBy(Tag.ITEMS_SHOVELS);
/**
* Covers the variants of pickaxes.
*
* @deprecated in favour of {@link Tag#ITEMS_PICKAXES}
*/
public static final MaterialSetTag PICKAXES = new MaterialSetTag(keyFor("pickaxes"))
.endsWith("_PICKAXE")
.ensureSize("PICKAXES", 6).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag PICKAXES = replacedBy(Tag.ITEMS_PICKAXES);
/**
* Covers the variants of axes.
*
* @deprecated in favour of {@link Tag#ITEMS_AXES}
*/
public static final MaterialSetTag AXES = new MaterialSetTag(keyFor("axes"))
.endsWith("_AXE")
.ensureSize("AXES", 6).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag AXES = replacedBy(Tag.ITEMS_AXES);
/**
* Covers the variants of hoes.
*
* @deprecated in favour of {@link Tag#ITEMS_HOES}
*/
public static final MaterialSetTag HOES = new MaterialSetTag(keyFor("hoes"))
.endsWith("_HOE")
.ensureSize("HOES", 6).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag HOES = replacedBy(Tag.ITEMS_HOES);
/**
* Covers the variants of helmets.
*
* @deprecated in favour of {@link Tag#ITEMS_HEAD_ARMOR}
*/
public static final MaterialSetTag HELMETS = new MaterialSetTag(keyFor("helmets"))
.endsWith("_HELMET")
.ensureSize("HELMETS", 7).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag HELMETS = replacedBy(Tag.ITEMS_HEAD_ARMOR, "helmets");
/**
* Covers the variants of items that can be equipped in the helmet slot.
*
* @deprecated any item can be equippable with the right data component set on it
*/
@Deprecated(since = "1.21.8")
@SuppressWarnings("unchecked")
public static final MaterialSetTag HEAD_EQUIPPABLE = new MaterialSetTag(keyFor("head_equippable"))
.endsWith("_HELMET")
.add(SKULLS)
.add(Material.CARVED_PUMPKIN)
.ensureSize("HEAD_EQUIPPABLE", 22).lock();
.add(Tag.ITEMS_HEAD_ARMOR, Tag.ITEMS_SKULLS)
.add(Material.CARVED_PUMPKIN).lock();
/**
* Covers the variants of chestplate.
*
* @deprecated in favour of {@link Tag#ITEMS_CHEST_ARMOR}
*/
public static final MaterialSetTag CHESTPLATES = new MaterialSetTag(keyFor("chestplates"))
.endsWith("_CHESTPLATE")
.ensureSize("CHESTPLATES", 6).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag CHESTPLATES = replacedBy(Tag.ITEMS_CHEST_ARMOR, "chestplates");
/**
* Covers the variants of items that can be equipped in the chest slot.
*
* @deprecated any item can be equippable with the right data component set on it
*/
@Deprecated(since = "1.21.8")
@SuppressWarnings("unchecked")
public static final MaterialSetTag CHEST_EQUIPPABLE = new MaterialSetTag(keyFor("chest_equippable"))
.endsWith("_CHESTPLATE")
.add(Material.ELYTRA)
.ensureSize("CHEST_EQUIPPABLE", 7).lock();
.add(Tag.ITEMS_CHEST_ARMOR)
.add(Material.ELYTRA).lock();
/**
* Covers the variants of leggings.
*
* @deprecated in favour of {@link Tag#ITEMS_LEG_ARMOR}
*/
public static final MaterialSetTag LEGGINGS = new MaterialSetTag(keyFor("leggings"))
.endsWith("_LEGGINGS")
.ensureSize("LEGGINGS", 6).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag LEGGINGS = replacedBy(Tag.ITEMS_LEG_ARMOR, "leggings");
/**
* Covers the variants of boots.
*
* @deprecated in favour of {@link Tag#ITEMS_FOOT_ARMOR}
*/
public static final MaterialSetTag BOOTS = new MaterialSetTag(keyFor("boots"))
.endsWith("_BOOTS")
.ensureSize("BOOTS", 6).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag BOOTS = replacedBy(Tag.ITEMS_FOOT_ARMOR, "boots");
/**
* Covers all variants of armor.
*/
public static final MaterialSetTag ARMOR = new MaterialSetTag(keyFor("armor")).add(HELMETS, CHESTPLATES, LEGGINGS, BOOTS)
.ensureSize("ARMOR", 25).lock();
@SuppressWarnings("unchecked")
public static final MaterialSetTag ARMOR = new MaterialSetTag(keyFor("armor"))
.add(Tag.ITEMS_HEAD_ARMOR, Tag.ITEMS_CHEST_ARMOR, Tag.ITEMS_LEG_ARMOR, Tag.ITEMS_FOOT_ARMOR)
.lock();
/**
* Covers the variants of bows.
@@ -521,21 +571,27 @@ public class MaterialTags {
public static final MaterialSetTag BOWS = new MaterialSetTag(keyFor("bows"))
.add(Material.BOW)
.add(Material.CROSSBOW)
.ensureSize("BOWS", 2).lock();
.lock();
/**
* Covers the variants of player-throwable projectiles (not requiring a bow or any other "assistance").
*/
@SuppressWarnings("unchecked")
public static final MaterialSetTag THROWABLE_PROJECTILES = new MaterialSetTag(keyFor("throwable_projectiles"))
.add(Material.EGG, Material.SNOWBALL, Material.SPLASH_POTION, Material.TRIDENT, Material.ENDER_PEARL, Material.EXPERIENCE_BOTTLE, Material.FIREWORK_ROCKET).lock();
.add(Tag.ITEMS_EGGS)
.add(Material.SNOWBALL, Material.SPLASH_POTION, Material.LINGERING_POTION,
Material.TRIDENT, Material.ENDER_PEARL, Material.EXPERIENCE_BOTTLE, Material.FIREWORK_ROCKET,
Material.WIND_CHARGE)
.lock();
/**
* Covers materials that can be colored, such as wool, shulker boxes, stained glass etc.
* Covers materials that can be colored, such as wool, shulker boxes, stained glasses etc.
*/
@SuppressWarnings("unchecked")
public static final MaterialSetTag COLORABLE = new MaterialSetTag(keyFor("colorable"))
.add(Tag.WOOL, Tag.CARPETS).add(SHULKER_BOXES, STAINED_GLASS, STAINED_GLASS_PANES, CONCRETES, BEDS).lock();
//.ensureSize("COLORABLE", 81).lock(); unit test don't have the vanilla item tags, so counts don't line up for real
.add(Tag.WOOL, Tag.WOOL_CARPETS, Tag.SHULKER_BOXES, Tag.BEDS)
.add(STAINED_GLASS, STAINED_GLASS_PANES, CONCRETES)
.lock();
/**
* Covers the variants of coral.
@@ -561,15 +617,11 @@ public class MaterialTags {
/**
* Covers all items that can be enchanted from the enchantment table or anvil.
*
* @deprecated in favour of {@link Tag#ITEMS_ENCHANTABLE_VANISHING} and other similar enchantable tags
*/
public static final MaterialSetTag ENCHANTABLE = new MaterialSetTag(keyFor("enchantable"))
.add(PICKAXES, SWORDS, SHOVELS, AXES, HOES, HELMETS, CHEST_EQUIPPABLE, LEGGINGS, BOOTS, BOWS)
.add(Material.TRIDENT, Material.SHIELD, Material.FISHING_ROD, Material.SHEARS,
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.WITHER_SKELETON_SKULL, Material.PLAYER_HEAD, Material.ZOMBIE_HEAD,
Material.CREEPER_HEAD, Material.DRAGON_HEAD, Material.PIGLIN_HEAD)
.ensureSize("ENCHANTABLE", 75).lock();
@Deprecated(since = "1.21.8")
public static final MaterialSetTag ENCHANTABLE = replacedBy(Tag.ITEMS_ENCHANTABLE_VANISHING, "enchantable"); // this tag already cover the others
/**
* Covers the variants of raw ores.
@@ -601,19 +653,19 @@ public class MaterialTags {
* Covers all oxidized copper blocks.
*/
public static final MaterialSetTag OXIDIZED_COPPER_BLOCKS = new MaterialSetTag(keyFor("oxidized_copper_blocks"))
.startsWith("OXIDIZED_").startsWith("WAXED_OXIDIZED_").ensureSize("OXIDIZED_COPPER_BLOCKS", 18).lock();
.startsWith("OXIDIZED_").startsWith("WAXED_OXIDIZED_").ensureSize("OXIDIZED_COPPER_BLOCKS", 30).lock();
/**
* Covers all weathered copper blocks.
*/
public static final MaterialSetTag WEATHERED_COPPER_BLOCKS = new MaterialSetTag(keyFor("weathered_copper_blocks"))
.startsWith("WEATHERED_").startsWith("WAXED_WEATHERED_").ensureSize("WEATHERED_COPPER_BLOCKS", 18).lock();
.startsWith("WEATHERED_").startsWith("WAXED_WEATHERED_").ensureSize("WEATHERED_COPPER_BLOCKS", 30).lock();
/**
* Covers all exposed copper blocks.
*/
public static final MaterialSetTag EXPOSED_COPPER_BLOCKS = new MaterialSetTag(keyFor("exposed_copper_blocks"))
.startsWith("EXPOSED_").startsWith("WAXED_EXPOSED_").ensureSize("EXPOSED_COPPER_BLOCKS", 18).lock();
.startsWith("EXPOSED_").startsWith("WAXED_EXPOSED_").ensureSize("EXPOSED_COPPER_BLOCKS", 30).lock();
/**
* Covers all un-weathered copper blocks.
@@ -622,8 +674,12 @@ public class MaterialTags {
.startsWith("CUT_COPPER").startsWith("WAXED_CUT_COPPER")
.startsWith("WAXED_COPPER_").startsWith("COPPER_")
.add(Material.CHISELED_COPPER, Material.WAXED_CHISELED_COPPER)
.not(Material.COPPER_INGOT, Material.COPPER_ORE)
.ensureSize("UNAFFECTED_COPPER_BLOCKS", 18).lock();
.not(Material.COPPER_INGOT, Material.COPPER_ORE, Material.COPPER_NUGGET)
.not(Material.COPPER_HORSE_ARMOR, Material.COPPER_GOLEM_SPAWN_EGG)
.not(Material.COPPER_HELMET, Material.COPPER_CHESTPLATE, Material.COPPER_LEGGINGS, Material.COPPER_BOOTS)
.not(Material.COPPER_AXE, Material.COPPER_HOE, Material.COPPER_PICKAXE, Material.COPPER_SHOVEL, Material.COPPER_SWORD)
.not(Material.COPPER_NAUTILUS_ARMOR, Material.COPPER_SPEAR)
.ensureSize("UNAFFECTED_COPPER_BLOCKS", 30).lock();
/**
* Covers all waxed copper blocks.
@@ -631,7 +687,7 @@ public class MaterialTags {
* Combine with other copper-related tags to filter is-waxed or not.
*/
public static final MaterialSetTag WAXED_COPPER_BLOCKS = new MaterialSetTag(keyFor("waxed_copper_blocks"))
.add(m -> m.name().startsWith("WAXED_") && m.name().contains("COPPER")).ensureSize("WAXED_COPPER_BLOCKS", 36).lock();
.add(m -> m.name().startsWith("WAXED_") && m.name().contains("COPPER")).ensureSize("WAXED_COPPER_BLOCKS", 56).lock();
/**
* Covers all un-waxed copper blocks.
@@ -642,13 +698,14 @@ public class MaterialTags {
.startsWith("EXPOSED_").startsWith("WEATHERED_").startsWith("OXIDIZED_")
.startsWith("CUT_COPPER")
.add(Material.COPPER_BLOCK, Material.CHISELED_COPPER, Material.COPPER_DOOR, Material.COPPER_TRAPDOOR, Material.COPPER_GRATE, Material.COPPER_BULB)
.ensureSize("UNWAXED_COPPER_BLOCKS", 36).lock();
.add(Material.COPPER_BARS, Material.COPPER_TORCH, Material.COPPER_CHEST, Material.COPPER_CHAIN, Material.COPPER_WALL_TORCH, Material.COPPER_LANTERN, Material.COPPER_GOLEM_STATUE)
.ensureSize("UNWAXED_COPPER_BLOCKS", 61).lock();
/**
* Covers all copper block variants.
*/
public static final MaterialSetTag COPPER_BLOCKS = new MaterialSetTag(keyFor("copper_blocks"))
.add(WAXED_COPPER_BLOCKS).add(UNWAXED_COPPER_BLOCKS).ensureSize("COPPER_BLOCKS", 72).lock();
.add(WAXED_COPPER_BLOCKS).add(UNWAXED_COPPER_BLOCKS).ensureSize("COPPER_BLOCKS", 117).lock();
/**
* Covers all weathering/waxed states of the plain copper block.
@@ -683,42 +740,49 @@ public class MaterialTags {
* Covers all Wooden Tools.
*/
public static final MaterialSetTag WOODEN_TOOLS = new MaterialSetTag(keyFor("wooden_tools"))
.add(Material.WOODEN_AXE, Material.WOODEN_HOE, Material.WOODEN_PICKAXE, Material.WOODEN_SHOVEL, Material.WOODEN_SWORD)
.ensureSize("WOODEN_TOOLS", 5).lock();
.add(Material.WOODEN_AXE, Material.WOODEN_HOE, Material.WOODEN_PICKAXE, Material.WOODEN_SHOVEL, Material.WOODEN_SWORD, Material.WOODEN_SPEAR)
.lock();
/**
* Covers all Stone Tools.
*/
public static final MaterialSetTag STONE_TOOLS = new MaterialSetTag(keyFor("stone_tools"))
.add(Material.STONE_AXE, Material.STONE_HOE, Material.STONE_PICKAXE, Material.STONE_SHOVEL, Material.STONE_SWORD)
.ensureSize("STONE_TOOLS", 5).lock();
.add(Material.STONE_AXE, Material.STONE_HOE, Material.STONE_PICKAXE, Material.STONE_SHOVEL, Material.STONE_SWORD, Material.STONE_SPEAR)
.lock();
/**
* Covers all copper Tools.
*/
public static final MaterialSetTag COPPER_TOOLS = new MaterialSetTag(keyFor("copper_tools"))
.add(Material.COPPER_AXE, Material.COPPER_HOE, Material.COPPER_PICKAXE, Material.COPPER_SHOVEL, Material.COPPER_SWORD, Material.COPPER_SPEAR)
.lock();
/**
* Covers all Iron Tools.
*/
public static final MaterialSetTag IRON_TOOLS = new MaterialSetTag(keyFor("iron_tools"))
.add(Material.IRON_AXE, Material.IRON_HOE, Material.IRON_PICKAXE, Material.IRON_SHOVEL, Material.IRON_SWORD)
.ensureSize("IRON_TOOLS", 5).lock();
.add(Material.IRON_AXE, Material.IRON_HOE, Material.IRON_PICKAXE, Material.IRON_SHOVEL, Material.IRON_SWORD, Material.IRON_SPEAR)
.lock();
/**
* Covers all Gold Tools.
*/
public static final MaterialSetTag GOLDEN_TOOLS = new MaterialSetTag(keyFor("golden_tools"))
.add(Material.GOLDEN_AXE, Material.GOLDEN_HOE, Material.GOLDEN_PICKAXE, Material.GOLDEN_SHOVEL, Material.GOLDEN_SWORD)
.ensureSize("GOLDEN_TOOLS", 5).lock();
.add(Material.GOLDEN_AXE, Material.GOLDEN_HOE, Material.GOLDEN_PICKAXE, Material.GOLDEN_SHOVEL, Material.GOLDEN_SWORD, Material.GOLDEN_SPEAR)
.lock();
/**
* Covers all Diamond Tools.
*/
public static final MaterialSetTag DIAMOND_TOOLS = new MaterialSetTag(keyFor("diamond_tools"))
.add(Material.DIAMOND_AXE, Material.DIAMOND_HOE, Material.DIAMOND_PICKAXE, Material.DIAMOND_SHOVEL, Material.DIAMOND_SWORD)
.ensureSize("DIAMOND_TOOLS", 5).lock();
.add(Material.DIAMOND_AXE, Material.DIAMOND_HOE, Material.DIAMOND_PICKAXE, Material.DIAMOND_SHOVEL, Material.DIAMOND_SWORD, Material.DIAMOND_SPEAR)
.lock();
/**
* Covers all Netherite Tools.
*/
public static final MaterialSetTag NETHERITE_TOOLS = new MaterialSetTag(keyFor("netherite_tools"))
.add(Material.NETHERITE_AXE, Material.NETHERITE_HOE, Material.NETHERITE_PICKAXE, Material.NETHERITE_SHOVEL, Material.NETHERITE_SWORD)
.ensureSize("NETHERITE_TOOLS", 5).lock();
.add(Material.NETHERITE_AXE, Material.NETHERITE_HOE, Material.NETHERITE_PICKAXE, Material.NETHERITE_SHOVEL, Material.NETHERITE_SWORD, Material.NETHERITE_SPEAR)
.lock();
}
@@ -5,6 +5,7 @@ import java.util.Locale;
import java.util.UUID;
import java.util.regex.Pattern;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
@@ -31,10 +32,10 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
* compatibility measures.
*/
public static final String BUKKIT = "bukkit";
//
private static final Pattern VALID_NAMESPACE = Pattern.compile("[a-z0-9._-]+");
private static final Pattern VALID_KEY = Pattern.compile("[a-z0-9/._-]+");
//
private final String namespace;
private final String key;
@@ -74,7 +75,7 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
Preconditions.checkArgument(key != null, "Key cannot be null");
this.namespace = plugin.getName().toLowerCase(Locale.ROOT);
this.key = key.toLowerCase().toLowerCase(Locale.ROOT);
this.key = key.toLowerCase(Locale.ROOT);
// Check validity after normalization
Preconditions.checkArgument(VALID_NAMESPACE.matcher(this.namespace).matches(), "Invalid namespace. Must be [a-z0-9._-]: %s", this.namespace);
@@ -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
@ApiStatus.Internal
public static NamespacedTag randomKey() {
return new NamespacedTag(BUKKIT, UUID.randomUUID().toString());
}
@@ -165,8 +165,7 @@ public class ParticleBuilder implements Cloneable {
throw new IllegalStateException("Please set location first");
}
this.receivers = Lists.newArrayList();
for (final Player nearbyPlayer : this.location.getWorld()
.getNearbyPlayers(this.location, radius, radius, radius)) {
for (final Player nearbyPlayer : this.location.getWorld().getNearbyPlayers(this.location, radius, radius, radius)) {
final Location loc = nearbyPlayer.getLocation();
final double x = NumberConversions.square(this.location.getX() - loc.getX());
final double y = NumberConversions.square(this.location.getY() - loc.getY());
@@ -422,7 +421,7 @@ public class ParticleBuilder implements Cloneable {
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color} or {@link Particle.DustOptions}.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
*
* @param color the new particle color
* @return a reference to this object.
@@ -435,33 +434,37 @@ public class ParticleBuilder implements Cloneable {
}
/**
* Sets the particle Color and size.
* Only valid for particles with a data type of {@link Particle.DustOptions}.
* Sets the particle Color and size or power.
* Only valid for particles with a data type of {@link Particle.DustOptions} or {@link Particle.Spell}.
*
* @param color the new particle color
* @param size the size of the particle
* @param value the size or power of the particle
* @return a reference to this object.
*/
public ParticleBuilder color(final @Nullable Color color, final float size) {
if (this.particle.getDataType() != Particle.DustOptions.class && color != null) {
throw new IllegalStateException("The combination of Color and size cannot be set on this particle type.");
public ParticleBuilder color(final @Nullable Color color, final float value) {
if (this.particle.getDataType() != Particle.DustOptions.class && this.particle.getDataType() != Particle.Spell.class && color != null) {
throw new IllegalStateException("The combination of Color and float value cannot be set on this particle type.");
}
// We don't officially support reusing these objects, but here we go
if (color == null) {
if (this.data instanceof Particle.DustOptions) {
if (this.data instanceof Particle.DustOptions || this.data instanceof Particle.Spell) {
return this.data(null);
} else {
return this;
}
}
return this.data(new Particle.DustOptions(color, size));
if (this.particle.getDataType() == Particle.DustOptions.class) {
return this.data(new Particle.DustOptions(color, value));
} else {
return this.data(new Particle.Spell(color, value));
}
}
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color} or {@link Particle.DustOptions}.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
*
* @param r red color component
* @param g green color component
@@ -474,7 +477,7 @@ public class ParticleBuilder implements Cloneable {
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color} or {@link Particle.DustOptions}.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
* <p>
* This method detects if the provided color integer is in RGB or ARGB format.
* If the alpha channel is zero, it treats the color as RGB. Otherwise, it treats it as ARGB.
@@ -493,7 +496,7 @@ public class ParticleBuilder implements Cloneable {
/**
* Sets the particle Color.
* Only valid for particles with a data type of {@link Color} or {@link Particle.DustOptions}.
* Only valid for particles with a data type of {@link Color}, {@link Particle.DustOptions} or {@link Particle.Spell}.
*
* @param a alpha color component
* @param r red color component
@@ -1,7 +1,25 @@
package com.destroystokyo.paper;
import io.papermc.paper.InternalAPIBridge;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
/**
* Represents the different parts of a player's skin that can be toggled on or off.
*/
@NullMarked
public interface SkinParts {
/**
* Creates a new instance of {@link SkinParts} with all parts enabled.
*
* @return a new {@link SkinParts} instance
*/
@Contract(value = "-> new", pure = true)
static SkinParts.Mutable allParts() {
return InternalAPIBridge.get().allSkinParts();
}
boolean hasCapeEnabled();
boolean hasJacketEnabled();
@@ -17,4 +35,25 @@ public interface SkinParts {
boolean hasHatsEnabled();
int getRaw();
Mutable mutableCopy();
interface Mutable extends SkinParts {
void setCapeEnabled(boolean enabled);
void setJacketEnabled(boolean enabled);
void setLeftSleeveEnabled(boolean enabled);
void setRightSleeveEnabled(boolean enabled);
void setLeftPantsEnabled(boolean enabled);
void setRightPantsEnabled(boolean enabled);
void setHatsEnabled(boolean enabled);
SkinParts immutableCopy();
}
}
@@ -162,7 +162,7 @@ public final class Title {
/**
* Creates a new title.
*
* <p>It is recommended to the {@link BaseComponent} constrctors.</p>
* <p>It is recommended to use the {@link BaseComponent} constructors.</p>
*
* @param title the main text of the title
* @param subtitle the secondary text of the title
@@ -234,7 +234,7 @@ public final class Title {
}
/**
* Sends the title directly to an player
* Sends the title directly to a player
*
* @param player the receiver of the title
*/
@@ -315,7 +315,7 @@ public final class Title {
/**
* Sets the title to the given text.
*
* <p>It is recommended to the {@link BaseComponent} methods.</p>
* <p>It is recommended to use the {@link BaseComponent} methods.</p>
*
* @param title the title text
* @return this builder instance
@@ -352,7 +352,7 @@ public final class Title {
/**
* Sets the subtitle to the given text.
*
* <p>It is recommended to the {@link BaseComponent} methods.</p>
* <p>It is recommended to use the {@link BaseComponent} methods.</p>
*
* @param subtitle the title text
* @return this builder instance
@@ -3,6 +3,7 @@ package com.destroystokyo.paper.entity;
import java.util.List;
import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Mob;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
@@ -45,19 +46,37 @@ public interface Pathfinder {
@Nullable PathResult findPath(Location loc);
/**
* Calculates a destination for the Entity to navigate to to reach the target entity,
* Calculates a destination for the Entity to navigate to reach the target entity,
* but does not set it as the current target.
* Useful for calculating what would happen before setting it.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the games behavior.
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
*/
@Nullable PathResult findPath(LivingEntity target);
@Nullable
default PathResult findPath(LivingEntity target) {
return this.findPath((Entity) target);
}
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* but does not set it as the current target.
* Useful for calculating what would happen before setting it.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
*/
@Nullable PathResult findPath(Entity target);
/**
* Calculates a destination for the Entity to navigate to, and sets it with default speed
@@ -84,13 +103,13 @@ public interface Pathfinder {
}
/**
* Calculates a destination for the Entity to navigate to to reach the target entity,
* Calculates a destination for the Entity to navigate to reach the target entity,
* and sets it with default speed.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the games behavior.
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @return If the pathfinding was successfully started
@@ -100,19 +119,52 @@ public interface Pathfinder {
}
/**
* Calculates a destination for the Entity to navigate to to reach the target entity,
* Calculates a destination for the Entity to navigate to reach the target entity,
* and sets it with specified speed.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the games behavior.
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @param speed Speed multiplier to navigate at, where 1 is 'normal'
* @return If the pathfinding was successfully started
*/
default boolean moveTo(LivingEntity target, double speed) {
return this.moveTo((Entity) target, speed);
}
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* and sets it with default speed.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @return If the pathfinding was successfully started
*/
default boolean moveTo(Entity target) {
return this.moveTo(target, 1);
}
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
* and sets it with specified speed.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the game's behavior.
*
* @param target the Entity to navigate to
* @param speed Speed multiplier to navigate at, where 1 is 'normal'
* @return If the pathfinding was successfully started
*/
default boolean moveTo(Entity target, double speed) {
PathResult path = this.findPath(target);
return path != null && this.moveTo(path, speed);
}
@@ -1,6 +1,6 @@
package com.destroystokyo.paper.entity.ai;
import com.google.common.base.Objects;
import java.util.Objects;
import java.util.StringJoiner;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Mob;
@@ -15,45 +15,46 @@ import org.jspecify.annotations.Nullable;
@NullMarked
public final class GoalKey<T extends Mob> {
private final Class<T> entityClass;
private final NamespacedKey namespacedKey;
private final Class<T> type;
private final NamespacedKey key;
private GoalKey(Class<T> entityClass, NamespacedKey namespacedKey) {
this.entityClass = entityClass;
this.namespacedKey = namespacedKey;
private GoalKey(Class<T> type, NamespacedKey key) {
this.type = type;
this.key = key;
}
public Class<T> getEntityClass() {
return this.entityClass;
return this.type;
}
public NamespacedKey getNamespacedKey() {
return this.namespacedKey;
return this.key;
}
@Override
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || this.getClass() != o.getClass()) return false;
GoalKey<?> goalKey = (GoalKey<?>) o;
return Objects.equal(this.entityClass, goalKey.entityClass) &&
Objects.equal(this.namespacedKey, goalKey.namespacedKey);
return Objects.equals(this.type, goalKey.type) &&
Objects.equals(this.key, goalKey.key);
}
@Override
public int hashCode() {
return Objects.hashCode(this.entityClass, this.namespacedKey);
return Objects.hash(this.type, this.key);
}
@Override
public String toString() {
return new StringJoiner(", ", GoalKey.class.getSimpleName() + "[", "]")
.add("entityClass=" + this.entityClass)
.add("namespacedKey=" + this.namespacedKey)
.add("type=" + this.type)
.add("key=" + this.key)
.toString();
}
public static <A extends Mob> GoalKey<A> of(Class<A> entityClass, NamespacedKey namespacedKey) {
return new GoalKey<>(entityClass, namespacedKey);
public static <A extends Mob> GoalKey<A> of(Class<A> type, NamespacedKey key) {
return new GoalKey<>(type, key);
}
}
@@ -1,6 +1,5 @@
package com.destroystokyo.paper.entity.ai;
import java.util.Collection;
import org.bukkit.entity.Mob;
import org.jspecify.annotations.NullMarked;
@@ -18,7 +18,7 @@ public final class Reputation {
}
public Reputation(final Map<ReputationType, Integer> reputation) {
Preconditions.checkNotNull(reputation, "reputation cannot be null");
Preconditions.checkArgument(reputation != null, "reputation cannot be null");
this.reputation = reputation;
}
@@ -29,7 +29,7 @@ public final class Reputation {
* @return The value of the {@link ReputationType type}.
*/
public int getReputation(final ReputationType type) {
Preconditions.checkNotNull(type, "the reputation type cannot be null");
Preconditions.checkArgument(type != null, "type cannot be null");
return this.reputation.getOrDefault(type, 0);
}
@@ -40,7 +40,7 @@ public final class Reputation {
* @param value The value of the {@link ReputationType type}.
*/
public void setReputation(final ReputationType type, final int value) {
Preconditions.checkNotNull(type, "the reputation type cannot be null");
Preconditions.checkArgument(type != null, "type cannot be null");
this.reputation.put(type, value);
}
Loaded 100 of 3614 files, more files were not shown because too many files have changed in this diff. Show more