Compare commits

...
Author SHA1 Message Date
Warrior e5146cf654 Replace var 2026-01-24 01:41:08 +01:00
Warrior db31c35c53 Merge branch 'main' into fix/13387 2026-01-24 01:39:15 +01: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
Jason Penilla f191496685 Attempt to provide position for no permission command source fixes #13387 2025-12-16 17:20:39 -07: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
1199 changed files with 16290 additions and 11592 deletions

No files matched your search

+41 -6
View File
@@ -25,9 +25,9 @@ you will most likely use this for WSL), `homebrew` (macOS / Linux), and more:
- [Adoptium](https://adoptium.net/) has builds for most operating systems.
- Paper requires JDK 21 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
feature to allow building with only JRE 17 or later installed. (Gradle will
automatically provision JDK 21 for compilation if it cannot find an existing
install).
installation).
If you're on Windows, check
[the section on WSL](#patching-and-building-is-really-slow-what-can-i-do).
@@ -192,6 +192,30 @@ 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,
@@ -452,6 +476,17 @@ 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?
@@ -469,11 +504,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
@@ -482,5 +517,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>
```
+2 -2
View File
@@ -40,7 +40,7 @@ How To (Plugin Developers)
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.10-R0.1-SNAPSHOT</version>
<version>1.21.11-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
@@ -53,7 +53,7 @@ repositories {
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
}
java {
+118 -119
View File
@@ -9,7 +9,6 @@ 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
@@ -21,8 +20,6 @@ public net.minecraft.network.Connection address
public net.minecraft.network.Connection channel
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.ServerboundMovePlayerPacket hasPos
@@ -104,6 +101,7 @@ public net.minecraft.server.network.ServerConfigurationPacketListenerImpl client
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
@@ -120,6 +118,7 @@ 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.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
@@ -138,6 +137,7 @@ public net.minecraft.world.damagesource.DamageSource <init>(Lnet/minecraft/core/
public net.minecraft.world.effect.MobEffect attributeModifiers
public net.minecraft.world.effect.MobEffect$AttributeTemplate
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.AreaEffectCloud durationOnUse
public net.minecraft.world.entity.AreaEffectCloud owner
public net.minecraft.world.entity.AreaEffectCloud potionContents
@@ -209,7 +209,6 @@ 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 setValue(I)V
public net.minecraft.world.entity.GlowSquid setDarkTicks(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
@@ -260,70 +259,72 @@ 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.Bee timeSinceSting
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.Cat setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.Dolphin treasurePos
public net.minecraft.world.entity.animal.Fox DATA_TRUSTED_ID_0
public net.minecraft.world.entity.animal.Fox DATA_TRUSTED_ID_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.Fox setVariant(Lnet/minecraft/world/entity/animal/Fox$Variant;)V
public net.minecraft.world.entity.animal.MushroomCow setVariant(Lnet/minecraft/world/entity/animal/MushroomCow$Variant;)V
public net.minecraft.world.entity.animal.MushroomCow stewEffects
public net.minecraft.world.entity.animal.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.Parrot setVariant(Lnet/minecraft/world/entity/animal/Parrot$Variant;)V
public net.minecraft.world.entity.animal.Pig setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.Pig steering
public net.minecraft.world.entity.animal.Rabbit moreCarrotTicks
public net.minecraft.world.entity.animal.Rabbit registerGoals()V
public net.minecraft.world.entity.animal.Rabbit setVariant(Lnet/minecraft/world/entity/animal/Rabbit$Variant;)V
public net.minecraft.world.entity.animal.Salmon setVariant(Lnet/minecraft/world/entity/animal/Salmon$Variant;)V
public net.minecraft.world.entity.animal.TropicalFish getPackedVariant()I
public net.minecraft.world.entity.animal.TropicalFish setPackedVariant(I)V
public net.minecraft.world.entity.animal.Turtle goingHome
public net.minecraft.world.entity.animal.Turtle homePos
public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)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.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 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 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.AbstractHorse owner
public net.minecraft.world.entity.animal.horse.Horse setVariantAndMarkings(Lnet/minecraft/world/entity/animal/horse/Variant;Lnet/minecraft/world/entity/animal/horse/Markings;)V
public net.minecraft.world.entity.animal.horse.Llama setVariant(Lnet/minecraft/world/entity/animal/horse/Llama$Variant;)V
public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime
public net.minecraft.world.entity.animal.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 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
@@ -351,7 +352,7 @@ public net.minecraft.world.entity.decoration.Mannequin setDescription(Lnet/minec
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 setVariant(Lnet/minecraft/core/Holder;)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
@@ -365,6 +366,7 @@ 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
@@ -372,14 +374,11 @@ public net.minecraft.world.entity.monster.Creeper swell
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/Sheep;
public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/sheep/Sheep;)V
public net.minecraft.world.entity.monster.Guardian randomStrollGoal
public net.minecraft.world.entity.monster.Guardian 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
@@ -387,44 +386,46 @@ 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.Vex owner
public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.Vindicator isJohnny
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.Villager updateDemand()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 equipment
@@ -434,20 +435,6 @@ 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 sleepCounter
public net.minecraft.world.entity.projectile.AbstractArrow baseDamage
public net.minecraft.world.entity.projectile.AbstractArrow firedFromWeapon
public net.minecraft.world.entity.projectile.AbstractArrow getHitGroundSoundEvent()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.projectile.AbstractArrow getPickupItem()Lnet/minecraft/world/item/ItemStack;
public net.minecraft.world.entity.projectile.AbstractArrow isInGround()Z
public net.minecraft.world.entity.projectile.AbstractArrow life
public net.minecraft.world.entity.projectile.AbstractArrow pickupItemStack
public net.minecraft.world.entity.projectile.AbstractArrow setPickupItemStack(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.projectile.AbstractArrow setPierceLevel(B)V
public net.minecraft.world.entity.projectile.AbstractHurtingProjectile assignDirectionalMovement(Lnet/minecraft/world/phys/Vec3;D)V
public net.minecraft.world.entity.projectile.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
@@ -470,7 +457,6 @@ 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 hasBeenShot
public net.minecraft.world.entity.projectile.Projectile leftOwner
public net.minecraft.world.entity.projectile.Projectile owner
@@ -479,31 +465,45 @@ 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.ThrowableItemProjectile getDefaultItem()Lnet/minecraft/world/item/Item;
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 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(Lnet/minecraft/world/damagesource/DamageSource;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
@@ -519,16 +519,16 @@ public net.minecraft.world.inventory.AbstractContainerMenu synchronizeSlotToRemo
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.HorseInventoryMenu SLOT_HORSE_INVENTORY_START
public net.minecraft.world.inventory.HorseInventoryMenu SLOT_SADDLE
public net.minecraft.world.inventory.HorseInventoryMenu horse
public net.minecraft.world.inventory.MerchantContainer selectionHint
public net.minecraft.world.inventory.Slot slot
public net.minecraft.world.item.AdventureModePredicate predicates
@@ -570,9 +570,6 @@ 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 GAME_RULE_TYPES
public net.minecraft.world.level.GameRules$Value deserialize(Ljava/lang/String;)V
public net.minecraft.world.level.GameRules$Value onChanged(Lnet/minecraft/server/MinecraftServer;)V
public net.minecraft.world.level.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;
@@ -717,6 +714,7 @@ public net.minecraft.world.level.dimension.end.EndDragonFight spawnExitPortal(Z)
public net.minecraft.world.level.dimension.end.EndDragonFight 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
@@ -737,8 +735,8 @@ 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 loadFromGenerated(Lnet/minecraft/resources/Identifier;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager loadFromResource(Lnet/minecraft/resources/Identifier;)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 structureRepository
public net.minecraft.world.level.material.MapColor MATERIAL_COLORS
@@ -753,6 +751,7 @@ 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.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
@@ -762,11 +761,11 @@ 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.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
+2 -2
View File
@@ -14,14 +14,14 @@ 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 J
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 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
+5 -2
View File
@@ -1,6 +1,9 @@
group=io.papermc.paper
version=1.21.10-R0.1-SNAPSHOT
mcVersion=1.21.10
version=1.21.11-R0.1-SNAPSHOT
mcVersion=1.21.11
# 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=1.21.11
# Set to true while updating Minecraft version
updatingMinecraft=false
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-9.1.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+34 -16
View File
@@ -1,3 +1,5 @@
import paper.libs.com.google.gson.Gson
plugins {
`java-library`
`maven-publish`
@@ -136,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"
@@ -170,10 +188,10 @@ tasks.withType<Javadoc>().configureEach {
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/",
//"https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
"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.11.0",
"https://jspecify.dev/docs/api/",
"https://jd.advntr.dev/api/$adventureVersion/",
"https://jd.advntr.dev/key/$adventureVersion/",
@@ -182,9 +200,9 @@ tasks.withType<Javadoc>().configureEach {
"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://www.javadocs.dev/org.slf4j/slf4j-api/$slf4jVersion/",
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
//"https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
"https://www.javadocs.dev/org.apache.maven.resolver/maven-resolver-api/1.7.3",
)
options.tags("apiNote:a:API Note:")
@@ -70,6 +70,8 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<AbstractHorse> HORSE_MOUNT_PANIC = create("horse_mount_panic", AbstractHorse.class);
GoalKey<AbstractHorse> HORSE_RANDOM_STAND = create("horse_random_stand", AbstractHorse.class);
GoalKey<AbstractHorse> HORSE_RUN_AROUND_LIKE_CRAZY = create("horse_run_around_like_crazy", AbstractHorse.class);
@@ -298,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);
@@ -284,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}
*
@@ -25,6 +25,13 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class DataComponentTypeKeys {
/**
* {@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}
*
@@ -214,6 +221,13 @@ public final class DataComponentTypeKeys {
*/
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}
*
@@ -354,6 +368,13 @@ public final class DataComponentTypeKeys {
*/
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}
*
@@ -424,6 +445,13 @@ public final class DataComponentTypeKeys {
*/
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}
*
@@ -459,6 +487,13 @@ public final class DataComponentTypeKeys {
*/
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/variant}
*
@@ -578,6 +613,13 @@ public final class DataComponentTypeKeys {
*/
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}
*
@@ -641,6 +683,13 @@ public final class DataComponentTypeKeys {
*/
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}
*
@@ -697,6 +746,13 @@ public final class DataComponentTypeKeys {
*/
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() {
}
@@ -172,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}
*
@@ -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);
}
}
@@ -1383,6 +1383,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> CALIBRATED_SCULK_SENSOR = create(key("calibrated_sculk_sensor"));
/**
* {@code minecraft:camel_husk_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CAMEL_HUSK_SPAWN_EGG = create(key("camel_husk_spawn_egg"));
/**
* {@code minecraft:camel_spawn_egg}
*
@@ -2139,6 +2146,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> COPPER_LEGGINGS = create(key("copper_leggings"));
/**
* {@code minecraft:copper_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> COPPER_NAUTILUS_ARMOR = create(key("copper_nautilus_armor"));
/**
* {@code minecraft:copper_nugget}
*
@@ -2167,6 +2181,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> COPPER_SHOVEL = create(key("copper_shovel"));
/**
* {@code minecraft:copper_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> COPPER_SPEAR = create(key("copper_spear"));
/**
* {@code minecraft:copper_sword}
*
@@ -3063,6 +3084,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> DIAMOND_LEGGINGS = create(key("diamond_leggings"));
/**
* {@code minecraft:diamond_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> DIAMOND_NAUTILUS_ARMOR = create(key("diamond_nautilus_armor"));
/**
* {@code minecraft:diamond_ore}
*
@@ -3084,6 +3112,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> DIAMOND_SHOVEL = create(key("diamond_shovel"));
/**
* {@code minecraft:diamond_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> DIAMOND_SPEAR = create(key("diamond_spear"));
/**
* {@code minecraft:diamond_sword}
*
@@ -3952,6 +3987,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> GOLDEN_LEGGINGS = create(key("golden_leggings"));
/**
* {@code minecraft:golden_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GOLDEN_NAUTILUS_ARMOR = create(key("golden_nautilus_armor"));
/**
* {@code minecraft:golden_pickaxe}
*
@@ -3966,6 +4008,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> GOLDEN_SHOVEL = create(key("golden_shovel"));
/**
* {@code minecraft:golden_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> GOLDEN_SPEAR = create(key("golden_spear"));
/**
* {@code minecraft:golden_sword}
*
@@ -4568,6 +4617,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> IRON_LEGGINGS = create(key("iron_leggings"));
/**
* {@code minecraft:iron_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> IRON_NAUTILUS_ARMOR = create(key("iron_nautilus_armor"));
/**
* {@code minecraft:iron_nugget}
*
@@ -4596,6 +4652,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> IRON_SHOVEL = create(key("iron_shovel"));
/**
* {@code minecraft:iron_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> IRON_SPEAR = create(key("iron_spear"));
/**
* {@code minecraft:iron_sword}
*
@@ -5940,6 +6003,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> NAUTILUS_SHELL = create(key("nautilus_shell"));
/**
* {@code minecraft:nautilus_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> NAUTILUS_SPAWN_EGG = create(key("nautilus_spawn_egg"));
/**
* {@code minecraft:nether_brick}
*
@@ -6066,6 +6136,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> NETHERITE_HOE = create(key("netherite_hoe"));
/**
* {@code minecraft:netherite_horse_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> NETHERITE_HORSE_ARMOR = create(key("netherite_horse_armor"));
/**
* {@code minecraft:netherite_ingot}
*
@@ -6080,6 +6157,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> NETHERITE_LEGGINGS = create(key("netherite_leggings"));
/**
* {@code minecraft:netherite_nautilus_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> NETHERITE_NAUTILUS_ARMOR = create(key("netherite_nautilus_armor"));
/**
* {@code minecraft:netherite_pickaxe}
*
@@ -6101,6 +6185,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> NETHERITE_SHOVEL = create(key("netherite_shovel"));
/**
* {@code minecraft:netherite_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> NETHERITE_SPEAR = create(key("netherite_spear"));
/**
* {@code minecraft:netherite_sword}
*
@@ -6710,6 +6801,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> PAPER = create(key("paper"));
/**
* {@code minecraft:parched_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> PARCHED_SPAWN_EGG = create(key("parched_spawn_egg"));
/**
* {@code minecraft:parrot_spawn_egg}
*
@@ -8733,6 +8831,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> STONE_SLAB = create(key("stone_slab"));
/**
* {@code minecraft:stone_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> STONE_SPEAR = create(key("stone_spear"));
/**
* {@code minecraft:stone_stairs}
*
@@ -10273,6 +10378,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> WOODEN_SHOVEL = create(key("wooden_shovel"));
/**
* {@code minecraft:wooden_spear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> WOODEN_SPEAR = create(key("wooden_spear"));
/**
* {@code minecraft:wooden_sword}
*
@@ -10420,6 +10532,13 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> ZOMBIE_HORSE_SPAWN_EGG = create(key("zombie_horse_spawn_egg"));
/**
* {@code minecraft:zombie_nautilus_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> ZOMBIE_NAUTILUS_SPAWN_EGG = create(key("zombie_nautilus_spawn_egg"));
/**
* {@code minecraft:zombie_spawn_egg}
*
@@ -46,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}
*
@@ -6031,6 +6031,62 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_AXOLOTL_SWIM = create(key("entity.axolotl.swim"));
/**
* {@code minecraft:entity.baby_nautilus.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_AMBIENT = create(key("entity.baby_nautilus.ambient"));
/**
* {@code minecraft:entity.baby_nautilus.ambient_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_AMBIENT_LAND = create(key("entity.baby_nautilus.ambient_land"));
/**
* {@code minecraft:entity.baby_nautilus.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_DEATH = create(key("entity.baby_nautilus.death"));
/**
* {@code minecraft:entity.baby_nautilus.death_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_DEATH_LAND = create(key("entity.baby_nautilus.death_land"));
/**
* {@code minecraft:entity.baby_nautilus.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_EAT = create(key("entity.baby_nautilus.eat"));
/**
* {@code minecraft:entity.baby_nautilus.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_HURT = create(key("entity.baby_nautilus.hurt"));
/**
* {@code minecraft:entity.baby_nautilus.hurt_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_HURT_LAND = create(key("entity.baby_nautilus.hurt_land"));
/**
* {@code minecraft:entity.baby_nautilus.swim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_BABY_NAUTILUS_SWIM = create(key("entity.baby_nautilus.swim"));
/**
* {@code minecraft:entity.bat.ambient}
*
@@ -6360,6 +6416,83 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_CAMEL_STEP_SAND = create(key("entity.camel.step_sand"));
/**
* {@code minecraft:entity.camel_husk.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_AMBIENT = create(key("entity.camel_husk.ambient"));
/**
* {@code minecraft:entity.camel_husk.dash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_DASH = create(key("entity.camel_husk.dash"));
/**
* {@code minecraft:entity.camel_husk.dash_ready}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_DASH_READY = create(key("entity.camel_husk.dash_ready"));
/**
* {@code minecraft:entity.camel_husk.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_DEATH = create(key("entity.camel_husk.death"));
/**
* {@code minecraft:entity.camel_husk.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_EAT = create(key("entity.camel_husk.eat"));
/**
* {@code minecraft:entity.camel_husk.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_HURT = create(key("entity.camel_husk.hurt"));
/**
* {@code minecraft:entity.camel_husk.saddle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_SADDLE = create(key("entity.camel_husk.saddle"));
/**
* {@code minecraft:entity.camel_husk.sit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_SIT = create(key("entity.camel_husk.sit"));
/**
* {@code minecraft:entity.camel_husk.stand}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_STAND = create(key("entity.camel_husk.stand"));
/**
* {@code minecraft:entity.camel_husk.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_STEP = create(key("entity.camel_husk.step"));
/**
* {@code minecraft:entity.camel_husk.step_sand}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_CAMEL_HUSK_STEP_SAND = create(key("entity.camel_husk.step_sand"));
/**
* {@code minecraft:entity.cat.ambient}
*
@@ -8481,6 +8614,97 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_MULE_JUMP = create(key("entity.mule.jump"));
/**
* {@code minecraft:entity.nautilus.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_AMBIENT = create(key("entity.nautilus.ambient"));
/**
* {@code minecraft:entity.nautilus.ambient_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_AMBIENT_LAND = create(key("entity.nautilus.ambient_land"));
/**
* {@code minecraft:entity.nautilus.dash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DASH = create(key("entity.nautilus.dash"));
/**
* {@code minecraft:entity.nautilus.dash_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DASH_LAND = create(key("entity.nautilus.dash_land"));
/**
* {@code minecraft:entity.nautilus.dash_ready}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DASH_READY = create(key("entity.nautilus.dash_ready"));
/**
* {@code minecraft:entity.nautilus.dash_ready_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DASH_READY_LAND = create(key("entity.nautilus.dash_ready_land"));
/**
* {@code minecraft:entity.nautilus.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DEATH = create(key("entity.nautilus.death"));
/**
* {@code minecraft:entity.nautilus.death_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_DEATH_LAND = create(key("entity.nautilus.death_land"));
/**
* {@code minecraft:entity.nautilus.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_EAT = create(key("entity.nautilus.eat"));
/**
* {@code minecraft:entity.nautilus.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_HURT = create(key("entity.nautilus.hurt"));
/**
* {@code minecraft:entity.nautilus.hurt_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_HURT_LAND = create(key("entity.nautilus.hurt_land"));
/**
* {@code minecraft:entity.nautilus.riding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_RIDING = create(key("entity.nautilus.riding"));
/**
* {@code minecraft:entity.nautilus.swim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_NAUTILUS_SWIM = create(key("entity.nautilus.swim"));
/**
* {@code minecraft:entity.ocelot.ambient}
*
@@ -8593,6 +8817,34 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PANDA_WORRIED_AMBIENT = create(key("entity.panda.worried_ambient"));
/**
* {@code minecraft:entity.parched.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARCHED_AMBIENT = create(key("entity.parched.ambient"));
/**
* {@code minecraft:entity.parched.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARCHED_DEATH = create(key("entity.parched.death"));
/**
* {@code minecraft:entity.parched.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARCHED_HURT = create(key("entity.parched.hurt"));
/**
* {@code minecraft:entity.parched.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARCHED_STEP = create(key("entity.parched.step"));
/**
* {@code minecraft:entity.parrot.ambient}
*
@@ -8649,6 +8901,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_BREEZE = create(key("entity.parrot.imitate.breeze"));
/**
* {@code minecraft:entity.parrot.imitate.camel_husk}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_CAMEL_HUSK = create(key("entity.parrot.imitate.camel_husk"));
/**
* {@code minecraft:entity.parrot.imitate.creaking}
*
@@ -8740,6 +8999,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_MAGMA_CUBE = create(key("entity.parrot.imitate.magma_cube"));
/**
* {@code minecraft:entity.parrot.imitate.parched}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_PARCHED = create(key("entity.parrot.imitate.parched"));
/**
* {@code minecraft:entity.parrot.imitate.phantom}
*
@@ -8873,6 +9139,20 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_ZOMBIE = create(key("entity.parrot.imitate.zombie"));
/**
* {@code minecraft:entity.parrot.imitate.zombie_horse}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_ZOMBIE_HORSE = create(key("entity.parrot.imitate.zombie_horse"));
/**
* {@code minecraft:entity.parrot.imitate.zombie_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_PARROT_IMITATE_ZOMBIE_NAUTILUS = create(key("entity.parrot.imitate.zombie_nautilus"));
/**
* {@code minecraft:entity.parrot.imitate.zombie_villager}
*
@@ -11141,6 +11421,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_AMBIENT = create(key("entity.zombie_horse.ambient"));
/**
* {@code minecraft:entity.zombie_horse.angry}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_ANGRY = create(key("entity.zombie_horse.angry"));
/**
* {@code minecraft:entity.zombie_horse.death}
*
@@ -11148,6 +11435,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_DEATH = create(key("entity.zombie_horse.death"));
/**
* {@code minecraft:entity.zombie_horse.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_EAT = create(key("entity.zombie_horse.eat"));
/**
* {@code minecraft:entity.zombie_horse.hurt}
*
@@ -11155,6 +11449,90 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_HORSE_HURT = create(key("entity.zombie_horse.hurt"));
/**
* {@code minecraft:entity.zombie_nautilus.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_AMBIENT = create(key("entity.zombie_nautilus.ambient"));
/**
* {@code minecraft:entity.zombie_nautilus.ambient_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_AMBIENT_LAND = create(key("entity.zombie_nautilus.ambient_land"));
/**
* {@code minecraft:entity.zombie_nautilus.dash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DASH = create(key("entity.zombie_nautilus.dash"));
/**
* {@code minecraft:entity.zombie_nautilus.dash_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DASH_LAND = create(key("entity.zombie_nautilus.dash_land"));
/**
* {@code minecraft:entity.zombie_nautilus.dash_ready}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DASH_READY = create(key("entity.zombie_nautilus.dash_ready"));
/**
* {@code minecraft:entity.zombie_nautilus.dash_ready_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DASH_READY_LAND = create(key("entity.zombie_nautilus.dash_ready_land"));
/**
* {@code minecraft:entity.zombie_nautilus.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DEATH = create(key("entity.zombie_nautilus.death"));
/**
* {@code minecraft:entity.zombie_nautilus.death_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_DEATH_LAND = create(key("entity.zombie_nautilus.death_land"));
/**
* {@code minecraft:entity.zombie_nautilus.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_EAT = create(key("entity.zombie_nautilus.eat"));
/**
* {@code minecraft:entity.zombie_nautilus.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_HURT = create(key("entity.zombie_nautilus.hurt"));
/**
* {@code minecraft:entity.zombie_nautilus.hurt_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_HURT_LAND = create(key("entity.zombie_nautilus.hurt_land"));
/**
* {@code minecraft:entity.zombie_nautilus.swim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_ZOMBIE_NAUTILUS_SWIM = create(key("entity.zombie_nautilus.swim"));
/**
* {@code minecraft:entity.zombie_villager.ambient}
*
@@ -11316,6 +11694,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_ARMOR_EQUIP_LEATHER = create(key("item.armor.equip_leather"));
/**
* {@code minecraft:item.armor.equip_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_ARMOR_EQUIP_NAUTILUS = create(key("item.armor.equip_nautilus"));
/**
* {@code minecraft:item.armor.equip_netherite}
*
@@ -11337,6 +11722,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_ARMOR_EQUIP_WOLF = create(key("item.armor.equip_wolf"));
/**
* {@code minecraft:item.armor.unequip_nautilus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_ARMOR_UNEQUIP_NAUTILUS = create(key("item.armor.unequip_nautilus"));
/**
* {@code minecraft:item.armor.unequip_wolf}
*
@@ -11806,6 +12198,20 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_MACE_SMASH_GROUND_HEAVY = create(key("item.mace.smash_ground_heavy"));
/**
* {@code minecraft:item.nautilus_saddle_equip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_NAUTILUS_SADDLE_EQUIP = create(key("item.nautilus_saddle_equip"));
/**
* {@code minecraft:item.nautilus_saddle_underwater_equip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_NAUTILUS_SADDLE_UNDERWATER_EQUIP = create(key("item.nautilus_saddle_underwater_equip"));
/**
* {@code minecraft:item.nether_wart.plant}
*
@@ -11855,6 +12261,69 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_SHOVEL_FLATTEN = create(key("item.shovel.flatten"));
/**
* {@code minecraft:item.spear.attack}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_ATTACK = create(key("item.spear.attack"));
/**
* {@code minecraft:item.spear.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_HIT = create(key("item.spear.hit"));
/**
* {@code minecraft:item.spear.lunge_1}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_LUNGE_1 = create(key("item.spear.lunge_1"));
/**
* {@code minecraft:item.spear.lunge_2}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_LUNGE_2 = create(key("item.spear.lunge_2"));
/**
* {@code minecraft:item.spear.lunge_3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_LUNGE_3 = create(key("item.spear.lunge_3"));
/**
* {@code minecraft:item.spear.use}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_USE = create(key("item.spear.use"));
/**
* {@code minecraft:item.spear_wood.attack}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_WOOD_ATTACK = create(key("item.spear_wood.attack"));
/**
* {@code minecraft:item.spear_wood.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_WOOD_HIT = create(key("item.spear_wood.hit"));
/**
* {@code minecraft:item.spear_wood.use}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_SPEAR_WOOD_USE = create(key("item.spear_wood.use"));
/**
* {@code minecraft:item.spyglass.stop_using}
*
@@ -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);
}
}
@@ -39,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}
*
@@ -284,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}
*
@@ -403,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}
*
@@ -438,13 +417,6 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> REQUIRED_OCEAN_MONUMENT_SURROUNDING = create(key("required_ocean_monument_surrounding"));
/**
* {@code #minecraft:snow_golem_melts}
*
* @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"));
/**
* {@code #minecraft:spawns_cold_variant_farm_animals}
*
@@ -459,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}
*
@@ -508,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}
*
@@ -242,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}
*
@@ -81,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}
*
@@ -102,6 +109,13 @@ public final class EntityTypeTagKeys {
*/
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}
*
@@ -116,6 +130,13 @@ public final class EntityTypeTagKeys {
*/
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}
*
@@ -228,6 +249,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}
*
@@ -172,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}
*
@@ -487,6 +494,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}
*
@@ -494,6 +508,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}
*
@@ -516,11 +537,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}
@@ -816,6 +837,27 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> MEAT = create(key("meat"));
/**
* {@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}
*
@@ -1131,6 +1173,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}
*
@@ -1355,6 +1404,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() {
}
@@ -202,7 +202,7 @@ public class MaterialTags {
*/
public static final MaterialSetTag HORSE_ARMORS = new MaterialSetTag(keyFor("horse_armors"))
.endsWith("_HORSE_ARMOR")
.ensureSize("HORSE_ARMORS", 5).lock();
.ensureSize("HORSE_ARMORS", 6).lock();
/**
* Covers the variants of infested blocks.
@@ -340,7 +340,7 @@ public class MaterialTags {
*/
public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs"))
.endsWith("_SPAWN_EGG")
.ensureSize("SPAWN_EGGS", 83).lock();
.ensureSize("SPAWN_EGGS", 87).lock();
/**
* Covers all colors of stained glass.
@@ -677,6 +677,7 @@ public class MaterialTags {
.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();
/**
@@ -738,49 +739,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)
.ensureSize("COPPER_TOOLS", 5).lock();
.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();
}
@@ -422,7 +422,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 +435,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 +478,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 +497,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
@@ -5,19 +5,22 @@ import io.papermc.paper.command.brigadier.CommandSourceStack;
import io.papermc.paper.datacomponent.item.ResolvableProfile;
import io.papermc.paper.world.damagesource.CombatEntry;
import io.papermc.paper.world.damagesource.FallLocationType;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Predicate;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.util.Services;
import org.bukkit.GameRule;
import org.bukkit.block.Biome;
import org.bukkit.damage.DamageEffect;
import org.bukkit.damage.DamageSource;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Pose;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import java.util.function.Predicate;
/**
* Static bridge to the server internals.
* <p>
@@ -97,5 +100,8 @@ public interface InternalAPIBridge {
SkinParts.Mutable allSkinParts();
Component defaultMannequinDescription();
}
<MODERN, LEGACY> GameRule<LEGACY> legacyGameRuleBridge(GameRule<MODERN> rule, Function<LEGACY, MODERN> fromLegacyToModern, Function<MODERN, LEGACY> toLegacyFromModern, Class<LEGACY> legacyClass);
Set<Pose> validMannequinPoses();
}
@@ -0,0 +1,56 @@
package io.papermc.paper.block.bed;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.Nullable;
/**
* An action type that represents the action that will happen after
* {@link org.bukkit.event.player.PlayerBedEnterEvent} and that is
* happening during {@link io.papermc.paper.event.player.PlayerBedFailEnterEvent}
*/
@ApiStatus.NonExtendable
@ApiStatus.Experimental
public interface BedEnterAction {
/**
* Gets if the player is allowed to sleep in the bed.
* This can be {@link BedRuleResult#ALLOWED} at the same time as {@link #canSetSpawn()}
* <p>
* It is advised to check for {@link BedEnterProblem}s first, as if it returns anything but {@code null}
* the bed interaction is prevented
*
* @return whether the player is allowed to sleep
*/
BedRuleResult canSleep();
/**
* Gets if the player is allowed to save its spawn point in the bed.
* This can be {@link BedRuleResult#ALLOWED} at the same time as {@link #canSleep()}
* <p>
* It is advised to check for {@link BedEnterProblem}s first, as if it returns anything but {@code null}
* the bed interaction is prevented
*
* @return whether the player is allowed to save its spawn point
*/
BedRuleResult canSetSpawn();
/**
* A problem is an issue that prevents the player from sleeping and from saving its spawn point.
* No problem being found doesn't mean the player successfully slept or set its spawn point,
* see {@link #canSleep()} and {@link #canSetSpawn()} for individual successes
*
* @return any of {@link BedEnterProblem}s if one is found, otherwise {@code null}
*/
@Nullable
BedEnterProblem problem();
/**
* Returns the default error message to be shown as an actionbar message to the player
*
* @return the error message
*/
@Nullable
Component errorMessage();
}
@@ -0,0 +1,27 @@
package io.papermc.paper.block.bed;
import java.util.Optional;
import java.util.ServiceLoader;
import org.jetbrains.annotations.ApiStatus;
@ApiStatus.Internal
interface BedEnterActionBridge {
static BedEnterActionBridge instance() {
final class Holder {
static final Optional<BedEnterActionBridge> INSTANCE = ServiceLoader.load(BedEnterActionBridge.class, BedEnterActionBridge.class.getClassLoader()).findFirst();
}
return Holder.INSTANCE.orElseThrow();
}
BedEnterProblem createTooFarAwayProblem();
BedEnterProblem createObstructedProblem();
BedEnterProblem createNotSafeProblem();
BedEnterProblem createExplosionProblem();
BedEnterProblem createOtherProblem();
}
@@ -0,0 +1,63 @@
package io.papermc.paper.block.bed;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.Nullable;
/**
* Represents a problem that prevents a player from continuing
* the sleeping process, preventing it from sleeping and from setting
* its spawn point
*/
@ApiStatus.NonExtendable
@ApiStatus.Experimental
public interface BedEnterProblem {
/**
* Happens when the bed is too far away from the player.
* Makes no explosion and has an error message
*
* @see #errorMessage()
*/
BedEnterProblem TOO_FAR_AWAY = BedEnterActionBridge.instance().createTooFarAwayProblem();
/**
* Happens when the bed has blocks one block above it.
* Makes no explosion and has an error message
*
* @see #errorMessage()
*/
BedEnterProblem OBSTRUCTED = BedEnterActionBridge.instance().createObstructedProblem();
/**
* Happens when there are monsters in a 16x10x16 box centered on the bed's head
* and the player is not in creative mode. Makes no explosion and has an error message
*
* @see #errorMessage()
*/
BedEnterProblem NOT_SAFE = BedEnterActionBridge.instance().createNotSafeProblem();
/**
* Happens when the bed is set to explode. This is defined in the environment attributes of the world.
* This doesn't have a fixed error message, see {@link BedEnterAction#errorMessage()}
*/
BedEnterProblem EXPLOSION = BedEnterActionBridge.instance().createExplosionProblem();
/**
* Happens when a player tries to sleep when an invalid state, for example when a player tries
* to sleep but is already sleeping or is dead.
* This doesn't have an error message at all, the interaction is simply discarded
*/
BedEnterProblem OTHER = BedEnterActionBridge.instance().createOtherProblem();
/**
* Returns the error message associated with this problem, if any.
* This component is sent to the client as an actionbar message
* when this problem occur
*
* @return the error message
*/
@Nullable
Component errorMessage();
}
@@ -0,0 +1,37 @@
package io.papermc.paper.block.bed;
import org.jetbrains.annotations.ApiStatus;
/**
* Represents the result of a bed rule during {@link org.bukkit.event.player.PlayerBedEnterEvent}
* and {@link io.papermc.paper.event.player.PlayerBedFailEnterEvent}. Bed rules are responsible
* for allowing players to sleep and to set their spawn point
*/
@ApiStatus.Experimental
public sealed interface BedRuleResult permits BedRuleResultImpl {
/**
* Used when the bed rule is allowed
*/
BedRuleResult ALLOWED = new BedRuleResultImpl(true);
/**
* Used when the bed rule is denied due to there
* being too much light. This is the case during
* daytime without thunderstorms
*/
BedRuleResult TOO_MUCH_LIGHT = new BedRuleResultImpl(false);
/**
* Used when the bed rule is set to always be denied
*/
BedRuleResult NEVER = new BedRuleResultImpl(false);
/**
* Returns {@code true} if this result is a success
*
* @return whether this result is a success
*/
boolean success();
}
@@ -0,0 +1,9 @@
package io.papermc.paper.block.bed;
import org.jetbrains.annotations.ApiStatus;
@ApiStatus.Internal
record BedRuleResultImpl(
boolean success
) implements BedRuleResult {
}
@@ -0,0 +1,4 @@
@NullMarked
package io.papermc.paper.block.bed;
import org.jspecify.annotations.NullMarked;
@@ -16,6 +16,11 @@ public interface PlayerConnection {
*/
void disconnect(Component component);
/**
* {@return whether this connection is currently open and active}
*/
boolean isConnected();
/**
* Gets if this connection originated from a transferred connection.
* <p>
@@ -1,5 +1,6 @@
package io.papermc.paper.datacomponent;
import io.papermc.paper.datacomponent.item.AttackRange;
import io.papermc.paper.datacomponent.item.BannerPatternLayers;
import io.papermc.paper.datacomponent.item.BlockItemDataProperties;
import io.papermc.paper.datacomponent.item.BlocksAttacks;
@@ -21,27 +22,31 @@ import io.papermc.paper.datacomponent.item.ItemContainerContents;
import io.papermc.paper.datacomponent.item.ItemEnchantments;
import io.papermc.paper.datacomponent.item.ItemLore;
import io.papermc.paper.datacomponent.item.JukeboxPlayable;
import io.papermc.paper.datacomponent.item.KineticWeapon;
import io.papermc.paper.datacomponent.item.LodestoneTracker;
import io.papermc.paper.datacomponent.item.MapDecorations;
import io.papermc.paper.datacomponent.item.MapId;
import io.papermc.paper.datacomponent.item.MapItemColor;
import io.papermc.paper.datacomponent.item.OminousBottleAmplifier;
import io.papermc.paper.datacomponent.item.PiercingWeapon;
import io.papermc.paper.datacomponent.item.PotDecorations;
import io.papermc.paper.datacomponent.item.PotionContents;
import io.papermc.paper.datacomponent.item.Repairable;
import io.papermc.paper.datacomponent.item.ResolvableProfile;
import io.papermc.paper.datacomponent.item.SeededContainerLoot;
import io.papermc.paper.datacomponent.item.SuspiciousStewEffects;
import io.papermc.paper.datacomponent.item.SwingAnimation;
import io.papermc.paper.datacomponent.item.Tool;
import io.papermc.paper.datacomponent.item.TooltipDisplay;
import io.papermc.paper.datacomponent.item.UseCooldown;
import io.papermc.paper.datacomponent.item.UseEffects;
import io.papermc.paper.datacomponent.item.UseRemainder;
import io.papermc.paper.datacomponent.item.Weapon;
import io.papermc.paper.datacomponent.item.WritableBookContent;
import io.papermc.paper.datacomponent.item.WrittenBookContent;
import io.papermc.paper.item.MapPostProcessing;
import java.util.List;
import io.papermc.paper.registry.tag.TagKey;
import java.util.List;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import org.bukkit.Art;
@@ -51,6 +56,7 @@ import org.bukkit.MusicInstrument;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
import org.bukkit.block.banner.PatternType;
import org.bukkit.damage.DamageType;
import org.bukkit.entity.Axolotl;
import org.bukkit.entity.Cat;
import org.bukkit.entity.Chicken;
@@ -67,6 +73,7 @@ import org.bukkit.entity.Salmon;
import org.bukkit.entity.TropicalFish;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.ZombieNautilus;
import org.bukkit.inventory.ItemRarity;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.checkerframework.checker.index.qual.NonNegative;
@@ -111,12 +118,16 @@ public final class DataComponentTypes {
* If set, the item will not lose any durability when used.
*/
public static final DataComponentType.NonValued UNBREAKABLE = unvalued("unbreakable");
public static final DataComponentType.Valued<UseEffects> USE_EFFECTS = valued("use_effects");
/**
* Custom name override for an item (as set by renaming with an Anvil).
*
* @see #ITEM_NAME
*/
public static final DataComponentType.Valued<Component> CUSTOM_NAME = valued("custom_name");
public static final DataComponentType.Valued<Float> MINIMUM_ATTACK_CHARGE = valued("minimum_attack_charge");
public static final DataComponentType.Valued<DamageType> DAMAGE_TYPE = valued("damage_type");
/**
* When present, replaces default item name with contained chat component.
* <p>
@@ -210,6 +221,10 @@ public final class DataComponentTypes {
public static final DataComponentType.Valued<Key> TOOLTIP_STYLE = valued("tooltip_style");
public static final DataComponentType.Valued<DeathProtection> DEATH_PROTECTION = valued("death_protection");
public static final DataComponentType.Valued<BlocksAttacks> BLOCKS_ATTACKS = valued("blocks_attacks");
public static final DataComponentType.Valued<PiercingWeapon> PIERCING_WEAPON = valued("piercing_weapon");
public static final DataComponentType.Valued<KineticWeapon> KINETIC_WEAPON = valued("kinetic_weapon");
public static final DataComponentType.Valued<AttackRange> ATTACK_RANGE = valued("attack_range");
public static final DataComponentType.Valued<SwingAnimation> SWING_ANIMATION = valued("swing_animation");
/**
* Stores list of enchantments and their levels for an Enchanted Book.
* Unlike {@link #ENCHANTMENTS}, the effects provided by enchantments
@@ -371,6 +386,7 @@ public final class DataComponentTypes {
public static final DataComponentType.Valued<Art> PAINTING_VARIANT = valued("painting/variant");
public static final DataComponentType.Valued<Llama.Color> LLAMA_VARIANT = valued("llama/variant");
public static final DataComponentType.Valued<Axolotl.Variant> AXOLOTL_VARIANT = valued("axolotl/variant");
public static final DataComponentType.Valued<ZombieNautilus.Variant> ZOMBIE_NAUTILUS_VARIANT = valued("zombie_nautilus/variant");
public static final DataComponentType.Valued<Cat.Type> CAT_VARIANT = valued("cat/variant");
public static final DataComponentType.Valued<DyeColor> CAT_COLLAR = valued("cat/collar");
public static final DataComponentType.Valued<DyeColor> SHEEP_COLOR = valued("sheep/color");
@@ -0,0 +1,67 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Range;
import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface AttackRange {
/**
* Returns a new builder for creating an Attack Range.
*
* @return a builder instance
*/
@Contract(value = "-> new", pure = true)
static Builder attackRange() {
return ItemComponentTypesBridge.bridge().attackRange();
}
@Contract(pure = true)
@Range(from = 0, to = 64) float minReach();
@Contract(pure = true)
@Range(from = 0, to = 64) float maxReach();
@Contract(pure = true)
@Range(from = 0, to = 64) float minCreativeReach();
@Contract(pure = true)
@Range(from = 0, to = 64) float maxCreativeReach();
@Contract(pure = true)
@Range(from = 0, to = 1) float hitboxMargin();
@Contract(pure = true)
@Range(from = 0, to = 2) float mobFactor();
/**
* Builder for {@link AttackRange}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<AttackRange> {
@Contract(value = "_ -> this", mutates = "this")
Builder minReach(@Range(from = 0, to = 64) float minReach);
@Contract(value = "_ -> this", mutates = "this")
Builder maxReach(@Range(from = 0, to = 64) float maxReach);
@Contract(value = "_ -> this", mutates = "this")
Builder minCreativeReach(@Range(from = 0, to = 64) float minCreativeReach);
@Contract(value = "_ -> this", mutates = "this")
Builder maxCreativeReach(@Range(from = 0, to = 64) float maxCreativeReach);
@Contract(value = "_ -> this", mutates = "this")
Builder hitboxMargin(@Range(from = 0, to = 1) float hitboxMargin);
@Contract(value = "_ -> this", mutates = "this")
Builder mobFactor(@Range(from = 0, to = 2) float mobFactor);
}
}
@@ -7,6 +7,7 @@ import io.papermc.paper.registry.tag.TagKey;
import java.util.List;
import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
@@ -32,7 +33,8 @@ public interface BlocksAttacks {
*
* @return the delay in seconds
*/
float blockDelaySeconds();
@Contract(pure = true)
@NonNegative float blockDelaySeconds();
/**
* Gets the multiplier applied to the cooldown time for the item when attacked by a disabling attack (the multiplier for {@link Weapon#disableBlockingForSeconds()}).
@@ -41,13 +43,15 @@ public interface BlocksAttacks {
*
* @return the multiplier for the cooldown time
*/
float disableCooldownScale();
@Contract(pure = true)
@NonNegative float disableCooldownScale();
/**
* Gets a list of {@link DamageReduction} of how much damage should be blocked in a given attack.
*
* @return a list of damage reductions
*/
@Contract(pure = true)
List<DamageReduction> damageReductions();
/**
@@ -55,6 +59,7 @@ public interface BlocksAttacks {
*
* @return the damage function
*/
@Contract(pure = true)
ItemDamageFunction itemDamage();
/**
@@ -62,6 +67,7 @@ public interface BlocksAttacks {
*
* @return a damage type tag key, or null if there is no such tag key
*/
@Contract(pure = true)
@Nullable TagKey<DamageType> bypassedBy();
/**
@@ -69,6 +75,7 @@ public interface BlocksAttacks {
*
* @return a key of the sound
*/
@Contract(pure = true)
@Nullable Key blockSound();
/**
@@ -76,6 +83,7 @@ public interface BlocksAttacks {
*
* @return a key of the sound
*/
@Contract(pure = true)
@Nullable Key disableSound();
/**
@@ -86,10 +94,10 @@ public interface BlocksAttacks {
interface Builder extends DataComponentBuilder<BlocksAttacks> {
@Contract(value = "_ -> this", mutates = "this")
Builder blockDelaySeconds(float delay);
Builder blockDelaySeconds(@NonNegative float delay);
@Contract(value = "_ -> this", mutates = "this")
Builder disableCooldownScale(float scale);
Builder disableCooldownScale(@NonNegative float scale);
@Contract(value = "_ -> this", mutates = "this")
Builder addDamageReduction(DamageReduction reduction);
@@ -15,7 +15,7 @@ import org.jspecify.annotations.NullMarked;
@ApiStatus.NonExtendable
public interface DyedItemColor {
@Contract(value = "_, _ -> new", pure = true)
@Contract(value = "_ -> new", pure = true)
static DyedItemColor dyedItemColor(final Color color) {
return dyedItemColor().color(color).build();
}
@@ -117,4 +117,16 @@ interface ItemComponentTypesBridge {
TooltipDisplay.Builder tooltipDisplay();
Weapon.Builder weapon();
KineticWeapon.Builder kineticWeapon();
UseEffects.Builder useEffects();
PiercingWeapon.Builder piercingWeapon();
AttackRange.Builder attackRange();
SwingAnimation.Builder swingAnimation();
KineticWeapon.Condition kineticWeaponCondition(int maxDurationTicks, float minSpeed, float minRelativeSpeed);
}
@@ -19,7 +19,7 @@ import org.jspecify.annotations.NullMarked;
@ApiStatus.NonExtendable
public interface ItemEnchantments {
@Contract(value = "_, _ -> new", pure = true)
@Contract(value = "_ -> new", pure = true)
static ItemEnchantments itemEnchantments(final Map<Enchantment, @IntRange(from = 1, to = 255) Integer> enchantments) {
return itemEnchantments().addAll(enchantments).build();
}
@@ -0,0 +1,106 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import net.kyori.adventure.key.Key;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Range;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface KineticWeapon {
/**
* Returns a new builder for creating a Kinetic Weapon.
*
* @return a builder instance
*/
@Contract(value = "-> new", pure = true)
static Builder kineticWeapon() {
return ItemComponentTypesBridge.bridge().kineticWeapon();
}
/**
* Creates a {@link Condition} object.
*/
@Contract(value = "_, _, _ -> new", pure = true)
static Condition condition(final @NonNegative int maxDurationTicks, final float minSpeed, final float minRelativeSpeed) {
return ItemComponentTypesBridge.bridge().kineticWeaponCondition(maxDurationTicks, minSpeed, minRelativeSpeed);
}
@Contract(pure = true)
@NonNegative int contactCooldownTicks();
@Contract(pure = true)
@NonNegative int delayTicks();
@Contract(pure = true)
@Nullable Condition dismountConditions();
@Contract(pure = true)
@Nullable Condition knockbackConditions();
@Contract(pure = true)
@Nullable Condition damageConditions();
float forwardMovement();
float damageMultiplier();
@Contract(pure = true)
@Nullable Key sound();
@Contract(pure = true)
@Nullable Key hitSound();
interface Condition {
@Contract(pure = true)
@NonNegative int maxDurationTicks();
@Contract(pure = true)
float minSpeed();
@Contract(pure = true)
float minRelativeSpeed();
}
/**
* Builder for {@link KineticWeapon}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<KineticWeapon> {
@Contract(value = "_ -> this", mutates = "this")
Builder contactCooldownTicks(@NonNegative int ticks);
@Contract(value = "_ -> this", mutates = "this")
Builder delayTicks(@NonNegative int ticks);
@Contract(value = "_ -> this", mutates = "this")
Builder dismountConditions(@Nullable Condition condition);
@Contract(value = "_ -> this", mutates = "this")
Builder knockbackConditions(@Nullable Condition condition);
@Contract(value = "_ -> this", mutates = "this")
Builder damageConditions(@Nullable Condition condition);
@Contract(value = "_ -> this", mutates = "this")
Builder forwardMovement(float forwardMovement);
@Contract(value = "_ -> this", mutates = "this")
Builder damageMultiplier(float damageMultiplier);
@Contract(value = "_ -> this", mutates = "this")
Builder sound(@Nullable Key sound);
@Contract(value = "_ -> this", mutates = "this")
Builder hitSound(@Nullable Key sound);
}
}
@@ -0,0 +1,52 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import net.kyori.adventure.key.Key;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Range;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface PiercingWeapon {
/**
* Returns a new builder for creating a Piercing Weapon.
*
* @return a builder instance
*/
static Builder piercingWeapon() {
return ItemComponentTypesBridge.bridge().piercingWeapon();
}
boolean dealsKnockback();
boolean dismounts();
@Nullable Key sound();
@Nullable Key hitSound();
/**
* Builder for {@link PiercingWeapon}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<PiercingWeapon> {
@Contract(value = "_ -> this", mutates = "this")
Builder dealsKnockback(boolean dealsKnockback);
@Contract(value = "_ -> this", mutates = "this")
Builder dismounts(boolean dismounts);
@Contract(value = "_ -> this", mutates = "this")
Builder sound(@Nullable Key sound);
@Contract(value = "_ -> this", mutates = "this")
Builder hitSound(@Nullable Key sound);
}
}
@@ -0,0 +1,60 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.checkerframework.checker.index.qual.Positive;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface SwingAnimation {
@Contract(value = "-> new", pure = true)
static Builder swingAnimation() {
return ItemComponentTypesBridge.bridge().swingAnimation();
}
@Contract(pure = true)
Animation type();
@Contract(pure = true)
@Positive int duration();
enum Animation {
// Start generate - SwingAnimationType
NONE,
WHACK,
STAB;
// End generate - SwingAnimationType
}
/**
* Builder for {@link SwingAnimation}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<SwingAnimation> {
/**
* Sets the swing animation type.
*
* @param type animation type
* @return the builder for chaining
* @see #type()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder type(Animation type);
/**
* Sets the swing animation duration in ticks.
*
* @param duration duration (>= 0)
* @return the builder for chaining
* @see #duration()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder duration(@Positive int duration);
}
}
@@ -2,12 +2,11 @@ package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import io.papermc.paper.datacomponent.DataComponentType;
import java.util.Set;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
import java.util.Set;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
@@ -0,0 +1,68 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface UseEffects {
/**
* Returns a new builder for creating a UseEffects component.
*
* @return a builder instance.
*/
static Builder useEffects() {
return ItemComponentTypesBridge.bridge().useEffects();
}
@Contract(pure = true)
boolean canSprint();
@Contract(pure = true)
boolean interactVibrations();
@Contract(pure = true)
float speedMultiplier();
/**
* Builder for {@link UseEffects}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<UseEffects> {
/**
* Sets whether the player can sprint while using the item.
*
* @param canSprint true to allow sprinting
* @return the builder for chaining
* @see #canSprint()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder canSprint(boolean canSprint);
/**
* Sets whether using the item generates interaction vibrations.
*
* @param interactVibrations true to generate vibrations
* @return the builder for chaining
* @see #interactVibrations()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder interactVibrations(boolean interactVibrations);
/**
* Sets the speed multiplier while using the item.
*
* @param speedMultiplier multiplier (1.0 >= value >= 0.0)
* @return the builder for chaining
* @see #speedMultiplier()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder speedMultiplier(float speedMultiplier);
}
}
@@ -19,12 +19,16 @@ public interface Weapon {
}
/**
* The damage that the weapon deals per attack.
* Amount of durability to remove each time the weapon is used to attack.
*
* @return durability
*/
int itemDamagePerAttack();
/**
* The number of seconds that blocking is disabled.
*
* @return seconds
*/
float disableBlockingForSeconds();
@@ -36,10 +40,11 @@ public interface Weapon {
interface Builder extends DataComponentBuilder<Weapon> {
/**
* Sets the damage per attack.
* Controls the amount of durability to remove each time the weapon is used to attack.
*
* @param damage the damage value.
* @return the builder for chaining.
* @param damage durability to remove
* @return the builder for chaining
* @see #itemDamagePerAttack()
*/
Builder itemDamagePerAttack(int damage);
@@ -13,11 +13,12 @@ public enum ItemUseAnimation {
DRINK,
BLOCK,
BOW,
SPEAR,
TRIDENT,
CROSSBOW,
SPYGLASS,
TOOT_HORN,
BRUSH,
BUNDLE;
BUNDLE,
SPEAR;
// End generate - ItemUseAnimation
}
@@ -1,25 +1,25 @@
package io.papermc.paper.entity;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent;
/**
* Represents a flag that can be set on teleportation that may
* slightly modify the behavior.
*
* @see EntityState
* @see Relative
*/
public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportFlag.Relative {
/**
* Note: These flags only work on {@link org.bukkit.entity.Player} entities.
* <p>
* Relative flags enable a player to not lose their velocity in the flag-specific axis/context when teleporting.
* Relative flags enable an entity to not lose their velocity in the flag-specific axis/context when teleporting.
*
* @apiNote The relative flags exposed in the API do *not* mirror all flags known to vanilla, as relative flags concerning
* the position are non-applicable given teleports always expect an absolute location.
* @see org.bukkit.entity.Player#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
* @see Player#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
* @see Entity#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
*/
enum Relative implements TeleportFlag {
/**
@@ -40,6 +40,7 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
VELOCITY_ROTATION;
/**
* Configures the player to not lose velocity in their x axis during the teleport.
*
* @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
* ones. As the API does not deal with position relative flags, this name is no longer applicable.
* Use {@link #VELOCITY_X} instead.
@@ -48,6 +49,7 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
public static final Relative X = VELOCITY_X;
/**
* Configures the player to not lose velocity in their y axis during the teleport.
*
* @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
* ones. As the API does not deal with position relative flags, this name is no longer applicable.
* Use {@link #VELOCITY_Y} instead.
@@ -56,6 +58,7 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
public static final Relative Y = VELOCITY_Y;
/**
* Configures the player to not lose velocity in their z axis during the teleport.
*
* @deprecated Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related
* ones. As the API does not deal with position relative flags, this name is no longer applicable.
* Use {@link #VELOCITY_Z} instead.
@@ -83,7 +86,11 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
/**
* Represents flags that effect the entity's state on
* teleportation.
*
* @deprecated As of 1.21.10, the default behavior for teleportation is now aligned with vanilla
* behavior. This means all of these flags are functionally done by default.
*/
@Deprecated(since = "1.21.10", forRemoval = true)
enum EntityState implements TeleportFlag {
/**
* If all passengers should not be required to be removed prior to teleportation.
@@ -91,7 +98,11 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
* Note:
* Teleporting to a different world with this flag present while the entity has entities riding it
* will cause this teleportation to return false and not occur.
*
* @deprecated This is now default behavior in teleportation. If you want to dismount all passengers,
* remove them with {@link Entity#removePassenger(Entity)}.
*/
@Deprecated(since = "1.21.10", forRemoval = true)
RETAIN_PASSENGERS,
/**
* If the entity should not be dismounted if they are riding another entity.
@@ -99,14 +110,21 @@ public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportF
* Note:
* Teleporting to a different world with this flag present while this entity is riding another entity will
* cause this teleportation to return false and not occur.
*
* @deprecated This behavior was highly technical and is not replicatable due to client limitations,
* and has not functioned for many updates.
*/
@Deprecated(since = "1.21.10", forRemoval = true)
RETAIN_VEHICLE,
/**
* Indicates that a player should not have their current open inventory closed when teleporting.
* <p>
* Note:
* This option will be ignored when teleported to a different world.
*
* @deprecated No longer done on teleportation, use {@link Player#closeInventory()} to do this yourself.
*/
@Deprecated(since = "1.21.10", forRemoval = true)
RETAIN_OPEN_INVENTORY;
}
@@ -1,5 +1,6 @@
package io.papermc.paper.event.player;
import io.papermc.paper.block.bed.BedEnterAction;
import net.kyori.adventure.text.Component;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
@@ -17,24 +18,41 @@ public class PlayerBedFailEnterEvent extends PlayerEvent implements Cancellable
private final FailReason failReason;
private final Block bed;
private final BedEnterAction enterAction;
private boolean willExplode;
private @Nullable Component message;
private boolean cancelled;
@ApiStatus.Internal
public PlayerBedFailEnterEvent(final Player player, final FailReason failReason, final Block bed, final boolean willExplode, final @Nullable Component message) {
public PlayerBedFailEnterEvent(final Player player, final FailReason failReason, final Block bed, final boolean willExplode, final @Nullable Component message, BedEnterAction enterAction) {
super(player);
this.failReason = failReason;
this.bed = bed;
this.enterAction = enterAction;
this.willExplode = willExplode;
this.message = message;
}
/**
* @deprecated This enum has been replaced with a system that better
* represents how beds work. See {@link #enterAction}
*/
@ApiStatus.Obsolete(since = "1.21.11")
public FailReason getFailReason() {
return this.failReason;
}
/**
* This describes the default outcome of this event.
*
* @return the action representing the default outcome of this event
*/
@ApiStatus.Experimental
public BedEnterAction enterAction() {
return this.enterAction;
}
public Block getBed() {
return this.bed;
}
@@ -80,10 +98,16 @@ public class PlayerBedFailEnterEvent extends PlayerEvent implements Cancellable
return HANDLER_LIST;
}
/**
* @deprecated Enums no longer represents reliably how beds work and fail. This has been
* replaced with {@link BedEnterAction} that better fits the new beds
*/
@ApiStatus.Obsolete(since = "1.21.11")
public enum FailReason {
/**
* The world doesn't allow sleeping (ex. Nether or The End). Entering
* the bed is prevented and the bed explodes.
* the bed is prevented but the bed doesn't explode. When the bed
* explodes, {@link #EXPLOSION} is used instead.
*/
NOT_POSSIBLE_HERE,
/**
@@ -110,6 +134,10 @@ public class PlayerBedFailEnterEvent extends PlayerEvent implements Cancellable
/**
* Entering the bed is prevented due to there being monsters nearby.
*/
NOT_SAFE
NOT_SAFE,
/**
* Entering the bed is prevented and the bed explodes.
*/
EXPLOSION
}
}
@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.Merchant;
import org.bukkit.inventory.MerchantRecipe;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@@ -17,6 +18,7 @@ public class PlayerPurchaseEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Merchant merchant;
private boolean rewardExp;
private boolean increaseTradeUses;
private MerchantRecipe trade;
@@ -24,13 +26,23 @@ public class PlayerPurchaseEvent extends PlayerEvent implements Cancellable {
private boolean cancelled;
@ApiStatus.Internal
public PlayerPurchaseEvent(final Player player, final MerchantRecipe trade, final boolean rewardExp, final boolean increaseTradeUses) {
public PlayerPurchaseEvent(final Player player, final Merchant merchant, final MerchantRecipe trade, final boolean rewardExp, final boolean increaseTradeUses) {
super(player);
this.merchant = merchant;
this.trade = trade;
this.rewardExp = rewardExp;
this.increaseTradeUses = increaseTradeUses;
}
/**
* Gets the merchant that the player is trading with
*
* @return the merchant
*/
public Merchant getMerchant() {
return merchant;
}
/**
* Gets the associated trade with this event
*
@@ -12,21 +12,25 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
public class PlayerTradeEvent extends PlayerPurchaseEvent {
private final AbstractVillager villager;
@ApiStatus.Internal
public PlayerTradeEvent(final Player player, final AbstractVillager villager, final MerchantRecipe trade, final boolean rewardExp, final boolean increaseTradeUses) {
super(player, trade, rewardExp, increaseTradeUses);
this.villager = villager;
super(player, villager, trade, rewardExp, increaseTradeUses);
}
@Override
public AbstractVillager getMerchant() {
return (AbstractVillager) super.getMerchant();
}
/**
* Gets the Villager or Wandering trader associated with this event
*
* @return the villager or wandering trader
* @see #getMerchant()
*/
@ApiStatus.Obsolete
public AbstractVillager getVillager() {
return this.villager;
return getMerchant();
}
}
@@ -19,7 +19,7 @@ public class WorldGameRuleChangeEvent extends WorldEvent implements Cancellable
private static final HandlerList HANDLER_LIST = new HandlerList();
private final @Nullable CommandSender commandSender;
private final GameRule<?> gameRule;
protected final GameRule<?> gameRule;
private String value;
private boolean cancelled;
@@ -1,10 +1,15 @@
package io.papermc.paper.event.world.border;
import com.google.common.base.Preconditions;
import io.papermc.paper.util.Tick;
import java.time.Duration;
import org.bukkit.World;
import org.bukkit.WorldBorder;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Range;
import org.jspecify.annotations.NullMarked;
/**
@@ -63,16 +68,41 @@ public class WorldBorderBoundsChangeEvent extends WorldBorderEvent implements Ca
* @param newSize the new size
*/
public void setNewSize(final double newSize) {
this.newSize = Math.min(this.worldBorder.getMaxSize(), Math.max(1.0D, newSize));
this.newSize = Math.clamp(newSize, 1.0D, this.worldBorder.getMaxSize());
}
/**
* Gets the time in ticks for the change. Will be 0 if instant.
*
* @return the time in ticks for the change
*/
public @Range(from = 0, to = Integer.MAX_VALUE) long getDurationTicks() {
return this.duration;
}
/**
* Sets the time in ticks for the change. Will change {@link #getType()} to return
* {@link Type#STARTED_MOVE}.
*
* @param duration the time in ticks for the change
*/
public void setDurationTicks(final @Range(from = 0, to = Integer.MAX_VALUE) long duration) {
Preconditions.checkArgument(duration >= 0 && duration <= Integer.MAX_VALUE, "duration must be between 0-%s", Integer.MAX_VALUE);
this.duration = duration;
if (this.type == Type.INSTANT_MOVE) {
this.type = Type.STARTED_MOVE;
}
}
/**
* Gets the time in milliseconds for the change. Will be 0 if instant.
*
* @return the time in milliseconds for the change
* @deprecated in favor of {@link #getDurationTicks()}
*/
public long getDuration() {
return this.duration;
@Deprecated(forRemoval = true, since = "1.21.11")
public @NonNegative long getDuration() {
return Tick.of(this.getDurationTicks()).toMillis();
}
/**
@@ -80,13 +110,11 @@ public class WorldBorderBoundsChangeEvent extends WorldBorderEvent implements Ca
* {@link Type#STARTED_MOVE}.
*
* @param duration the time in milliseconds for the change
* @deprecated in favor of {@link #setDurationTicks(long)}
*/
public void setDuration(final long duration) {
// PAIL: TODO: Magic Values
this.duration = Math.min(9223372036854775L, Math.max(0L, duration));
if (duration >= 0 && this.type == Type.INSTANT_MOVE) {
this.type = Type.STARTED_MOVE;
}
@Deprecated(forRemoval = true, since = "1.21.11")
public void setDuration(final @NonNegative long duration) {
this.setDurationTicks(Tick.tick().fromDuration(Duration.ofMillis(duration)));
}
@Override
@@ -157,4 +157,9 @@ public interface PersistentDataContainerView {
* @throws java.io.IOException if we fail to write this container to a byte array
*/
byte[] serializeToBytes() throws java.io.IOException;
/**
* {@return the size of the data container}
*/
int getSize();
}
@@ -0,0 +1,20 @@
package io.papermc.paper.raytracing;
/**
* Determines the collision behavior when blocks get hit during ray tracing.
*/
public enum BlockCollisionMode {
/**
* Use the collision shape.
*/
COLLIDER,
/**
* Use the outline shape.
*/
OUTLINE,
/**
* Use the visual shape.
*/
VISUAL
}
@@ -46,9 +46,6 @@ public interface PositionedRayTraceConfigurationBuilder {
/**
* Sets the FluidCollisionMode when looking for block collisions.
* <p>
* If collisions with passable blocks are ignored, fluid collisions are
* ignored as well regardless of the fluid collision mode.
*
* @param fluidCollisionMode the new FluidCollisionMode
* @return a reference to this object
@@ -56,16 +53,18 @@ public interface PositionedRayTraceConfigurationBuilder {
@Contract(value = "_ -> this", mutates = "this")
PositionedRayTraceConfigurationBuilder fluidCollisionMode(FluidCollisionMode fluidCollisionMode);
/**
* Sets the BlockCollisionMode when looking for block collisions.
*
* @param blockCollisionMode the new BlockCollisionMode
* @return a reference to this object
*/
@Contract(value = "_ -> this", mutates = "this")
PositionedRayTraceConfigurationBuilder blockCollisionMode(BlockCollisionMode blockCollisionMode);
/**
* Sets whether the raytrace should ignore passable blocks when looking for
* block collisions.
* <p>
* If collisions with passable blocks are ignored, fluid collisions are
* ignored as well regardless of the fluid collision mode.
* <p>
* Portal blocks are only considered passable if the ray starts within them.
* Apart from that collisions with portal blocks will be considered even if
* collisions with passable blocks are otherwise ignored.
*
* @param ignorePassableBlocks if the raytrace should ignore passable blocks
* @return a reference to this object
@@ -9,6 +9,7 @@ import net.kyori.adventure.key.Keyed;
import org.bukkit.Art;
import org.bukkit.Fluid;
import org.bukkit.GameEvent;
import org.bukkit.GameRule;
import org.bukkit.JukeboxSong;
import org.bukkit.MusicInstrument;
import org.bukkit.Particle;
@@ -27,6 +28,7 @@ import org.bukkit.entity.Frog;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.ZombieNautilus;
import org.bukkit.entity.memory.MemoryKey;
import org.bukkit.generator.structure.Structure;
import org.bukkit.generator.structure.StructureType;
@@ -125,8 +127,11 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.DataComponentTypeKeys
*/
RegistryKey<DataComponentType> DATA_COMPONENT_TYPE = create("data_component_type");
/**
* Built-in registry for game rules.
* @see io.papermc.paper.registry.keys.GameRuleKeys
*/
RegistryKey<GameRule<?>> GAME_RULE = create("game_rule");
/* ********************** *
* Data-driven Registries *
@@ -216,6 +221,11 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.PigVariantKeys
*/
RegistryKey<Pig.Variant> PIG_VARIANT = create("pig_variant");
/**
* Data-driven registry for zombie nautilus variants.
* @see io.papermc.paper.registry.keys.ZombieNautilusVariantKeys
*/
RegistryKey<ZombieNautilus.Variant> ZOMBIE_NAUTILUS_VARIANT = create("zombie_nautilus_variant");
/**
* Data-driven registry for dialogs.
* @see io.papermc.paper.registry.keys.DialogKeys
@@ -157,7 +157,7 @@ public interface EnchantmentRegistryEntry {
* a tag obtained via {@link RegistryComposeEvent#getOrCreateTag(TagKey)} with
* tag keys found in {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys} such as
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_ARMOR} and
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_SWORD}.
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_MELEE_WEAPON}.
*
* @param supportedItems the registry key set representing the supported items.
* @return this builder instance.
@@ -174,7 +174,7 @@ public interface EnchantmentRegistryEntry {
* {@link RegistryComposeEvent#getOrCreateTag(TagKey)} with
* tag keys found in {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys} such as
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_ARMOR} and
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_SWORD}.
* {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_MELEE_WEAPON}.
* <p>
* Defaults to {@code null} which means all {@link #supportedItems()} are considered primary items.
* Additionally, the tag {@link io.papermc.paper.registry.keys.tags.EnchantmentTagKeys#IN_ENCHANTING_TABLE} defines
@@ -0,0 +1,78 @@
package io.papermc.paper.registry.data;
import io.papermc.paper.registry.RegistryBuilder;
import io.papermc.paper.registry.data.client.ClientTextureAsset;
import org.bukkit.entity.ZombieNautilus;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
/**
* A data-centric version-specific registry entry for the {@link org.bukkit.entity.ZombieNautilus.Variant} type.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface ZombieNautilusVariantRegistryEntry {
/**
* The model of the variant to render the configured texture on.
*/
enum Model {
/**
* The normal model.
*/
NORMAL,
/**
* The warm model.
*/
WARM,
}
/**
* Provides the client texture asset of the variant, which represents the texture to use.
*
* @return the client texture asset.
*/
ClientTextureAsset clientTextureAsset();
/**
* Provides the model of the variant.
*
* @return the model.
*/
Model model();
/**
* A mutable builder for the {@link ZombieNautilusVariantRegistryEntry} plugins may change in applicable registry events.
* <p>
* The following values are required for each builder:
* <ul>
* <li>{@link #clientTextureAsset(ClientTextureAsset)}</li>
* <li>{@link #model(Model)}</li>
* </ul>
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ZombieNautilusVariantRegistryEntry, RegistryBuilder<ZombieNautilus.Variant> {
/**
* Sets the client texture asset of the variant, which is the location of the texture to use.
*
* @param clientTextureAsset the client texture asset.
* @return this builder instance.
* @see ZombieNautilusVariantRegistryEntry#clientTextureAsset()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder clientTextureAsset(ClientTextureAsset clientTextureAsset);
/**
* Sets the model to use for this variant.
*
* @param model the model.
* @return this builder instance.
* @see ZombieNautilusVariantRegistryEntry#model()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder model(Model model);
}
}
@@ -15,6 +15,7 @@ import io.papermc.paper.registry.data.JukeboxSongRegistryEntry;
import io.papermc.paper.registry.data.PaintingVariantRegistryEntry;
import io.papermc.paper.registry.data.PigVariantRegistryEntry;
import io.papermc.paper.registry.data.WolfVariantRegistryEntry;
import io.papermc.paper.registry.data.ZombieNautilusVariantRegistryEntry;
import io.papermc.paper.registry.data.dialog.DialogRegistryEntry;
import org.bukkit.Art;
import org.bukkit.GameEvent;
@@ -29,6 +30,7 @@ import org.bukkit.entity.Cow;
import org.bukkit.entity.Frog;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.ZombieNautilus;
import static io.papermc.paper.registry.event.RegistryEventProviderImpl.create;
@@ -52,6 +54,7 @@ public final class RegistryEvents {
public static final RegistryEventProvider<Chicken.Variant, ChickenVariantRegistryEntry.Builder> CHICKEN_VARIANT = create(RegistryKey.CHICKEN_VARIANT);
public static final RegistryEventProvider<Cow.Variant, CowVariantRegistryEntry.Builder> COW_VARIANT = create(RegistryKey.COW_VARIANT);
public static final RegistryEventProvider<Pig.Variant, PigVariantRegistryEntry.Builder> PIG_VARIANT = create(RegistryKey.PIG_VARIANT);
public static final RegistryEventProvider<ZombieNautilus.Variant, ZombieNautilusVariantRegistryEntry.Builder> ZOMBIE_NAUTILUS_VARIANT = create(RegistryKey.ZOMBIE_NAUTILUS_VARIANT);
public static final RegistryEventProvider<Dialog, DialogRegistryEntry.Builder> DIALOG = create(RegistryKey.DIALOG);
// End generate - RegistryEvents
+4 -13
View File
@@ -1,5 +1,6 @@
package org.bukkit;
import com.google.common.base.Enums;
import com.google.common.collect.Maps;
import java.util.Map;
import org.bukkit.block.BlockFace;
@@ -442,7 +443,6 @@ public enum Effect {
SOUND_WITH_CHARGE_SHOT(1051, Type.SOUND),
;
private static final org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger();
// Paper end
private final int id;
@@ -512,22 +512,13 @@ public enum Effect {
static {
for (Effect effect : values()) {
if (!isDeprecated(effect)) // Paper
if (Enums.getField(effect).isAnnotationPresent(Deprecated.class)) {
continue;
}
BY_ID.put(effect.id, effect);
}
}
// Paper start
private static boolean isDeprecated(Effect effect) {
try {
return Effect.class.getDeclaredField(effect.name()).isAnnotationPresent(Deprecated.class);
} catch (NoSuchFieldException e) {
LOGGER.error("Error getting effect enum field {}", effect.name(), e);
return false;
}
}
// Paper end
/**
* Represents the type of an effect.
* @deprecated not representative of what Effect does
@@ -60,6 +60,10 @@ public enum EntityEffect {
* delay, only the speed at which the entity in the spawner spins.
*/
RESET_SPAWNER_MINECART_DELAY(1, SpawnerMinecart.class),
/**
* When a kinetic weapon hits an entity.
*/
HIT(2, LivingEntity.class),
/**
* When mobs get hurt.
*
@@ -11,7 +11,7 @@ public enum ExplosionResult {
/**
* Represents an explosion where no change took place.
*
* This is the case when {@link org.bukkit.GameRule#MOB_GRIEFING} is
* This is the case when {@link org.bukkit.GameRules#MOB_GRIEFING} is
* disabled.
*/
KEEP,
@@ -19,8 +19,8 @@ public enum ExplosionResult {
* Represents an explosion where all destroyed blocks drop their items.
*
* This is the case when
* {@link org.bukkit.GameRule#TNT_EXPLOSION_DROP_DECAY} or
* {@link org.bukkit.GameRule#BLOCK_EXPLOSION_DROP_DECAY} is disabled.
* {@link org.bukkit.GameRules#TNT_EXPLOSION_DROP_DECAY} or
* {@link org.bukkit.GameRules#BLOCK_EXPLOSION_DROP_DECAY} is disabled.
*/
DESTROY,
/**
+290 -175
View File
@@ -1,9 +1,10 @@
package org.bukkit;
import com.google.common.base.Preconditions;
import io.papermc.paper.InternalAPIBridge;
import io.papermc.paper.world.flag.FeatureDependant;
import java.util.HashMap;
import java.util.Map;
import java.util.function.UnaryOperator;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -15,343 +16,469 @@ import org.jetbrains.annotations.Nullable;
* Wiki</a>
*
* @param <T> type of rule (Boolean or Integer)
* @see GameRules
*/
public final class GameRule<T> implements net.kyori.adventure.translation.Translatable, FeatureDependant {
@ApiStatus.NonExtendable
public abstract class GameRule<T> implements net.kyori.adventure.translation.Translatable, FeatureDependant, Keyed {
private static Map<String, GameRule<?>> gameRules = new HashMap<>();
// Boolean rules
/**
* Toggles the announcing of advancements.
*
* @deprecated renamed to {@link GameRules#SHOW_ADVANCEMENT_MESSAGES}
*/
public static final GameRule<Boolean> ANNOUNCE_ADVANCEMENTS = new GameRule<>("announceAdvancements", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> ANNOUNCE_ADVANCEMENTS = GameRules.SHOW_ADVANCEMENT_MESSAGES;
/**
* Whether command blocks should notify admins when they perform commands.
*
* @deprecated renamed to {@link GameRules#COMMAND_BLOCK_OUTPUT}
*/
public static final GameRule<Boolean> COMMAND_BLOCK_OUTPUT = new GameRule<>("commandBlockOutput", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> COMMAND_BLOCK_OUTPUT = GameRules.COMMAND_BLOCK_OUTPUT;
/**
* Whether the server should skip checking player speed.
*
* @deprecated renamed to {@link GameRules#PLAYER_MOVEMENT_CHECK} (inverted)
*/
public static final GameRule<Boolean> DISABLE_PLAYER_MOVEMENT_CHECK = new GameRule<>("disablePlayerMovementCheck", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DISABLE_PLAYER_MOVEMENT_CHECK = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.PLAYER_MOVEMENT_CHECK, inverseBool(), inverseBool(), Boolean.class);
/**
* Whether the server should skip checking player speed when the player is
* wearing elytra.
*
* @deprecated renamed to {@link GameRules#ELYTRA_MOVEMENT_CHECK} (inverted)
*/
public static final GameRule<Boolean> DISABLE_ELYTRA_MOVEMENT_CHECK = new GameRule<>("disableElytraMovementCheck", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DISABLE_ELYTRA_MOVEMENT_CHECK = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.ELYTRA_MOVEMENT_CHECK, inverseBool(), inverseBool(), Boolean.class);
/**
* Whether time progresses from the current moment.
*
* @deprecated renamed to {@link GameRules#ADVANCE_TIME}
*/
public static final GameRule<Boolean> DO_DAYLIGHT_CYCLE = new GameRule<>("doDaylightCycle", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_DAYLIGHT_CYCLE = GameRules.ADVANCE_TIME;
/**
* Whether entities that are not mobs should have drops.
*
* @deprecated renamed to {@link GameRules#ENTITY_DROPS}
*/
public static final GameRule<Boolean> DO_ENTITY_DROPS = new GameRule<>("doEntityDrops", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_ENTITY_DROPS = GameRules.ENTITY_DROPS;
/**
* Whether fire should spread and naturally extinguish.
*
* @deprecated use {@link GameRules#FIRE_SPREAD_RADIUS_AROUND_PLAYER}
*/
public static final GameRule<Boolean> DO_FIRE_TICK = new GameRule<>("doFireTick", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_FIRE_TICK = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.FIRE_SPREAD_RADIUS_AROUND_PLAYER, (value) -> value ? 128 : 0, (value) -> value != 0, Boolean.class);
/**
* Whether players should only be able to craft recipes they've unlocked
* first.
*
* @deprecated renamed to {@link GameRules#LIMITED_CRAFTING}
*/
public static final GameRule<Boolean> DO_LIMITED_CRAFTING = new GameRule<>("doLimitedCrafting", Boolean.class);
/**
* Whether mobs should drop items.
*/
public static final GameRule<Boolean> DO_MOB_LOOT = new GameRule<>("doMobLoot", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_LIMITED_CRAFTING = GameRules.LIMITED_CRAFTING;
/**
* Whether projectiles can break blocks.
*
* @deprecated renamed to {@link GameRules#PROJECTILES_CAN_BREAK_BLOCKS}
*/
public static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKS = new GameRule<>("projectilesCanBreakBlocks", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKS = GameRules.PROJECTILES_CAN_BREAK_BLOCKS;
/**
* Whether mobs should drop items.
*
* @deprecated renamed to {@link GameRules#MOB_DROPS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_MOB_LOOT = GameRules.MOB_DROPS;
/**
* Whether mobs should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_MOBS}
*/
public static final GameRule<Boolean> DO_MOB_SPAWNING = new GameRule<>("doMobSpawning", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_MOB_SPAWNING = GameRules.SPAWN_MOBS;
/**
* Whether blocks should have drops.
*
* @deprecated renamed to {@link GameRules#BLOCK_DROPS}
*/
public static final GameRule<Boolean> DO_TILE_DROPS = new GameRule<>("doTileDrops", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_TILE_DROPS = GameRules.BLOCK_DROPS;
/**
* Whether the weather will change from the current moment.
*
* @deprecated renamed to {@link GameRules#ADVANCE_WEATHER}
*/
public static final GameRule<Boolean> DO_WEATHER_CYCLE = new GameRule<>("doWeatherCycle", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_WEATHER_CYCLE = GameRules.ADVANCE_WEATHER;
/**
* Whether the player should keep items in their inventory after death.
*
* @deprecated renamed to {@link GameRules#KEEP_INVENTORY}
*/
public static final GameRule<Boolean> KEEP_INVENTORY = new GameRule<>("keepInventory", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> KEEP_INVENTORY = GameRules.KEEP_INVENTORY;
/**
* Whether to log admin commands to server log.
*
* @deprecated renamed to {@link GameRules#LOG_ADMIN_COMMANDS}
*/
public static final GameRule<Boolean> LOG_ADMIN_COMMANDS = new GameRule<>("logAdminCommands", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> LOG_ADMIN_COMMANDS = GameRules.LOG_ADMIN_COMMANDS;
/**
* Whether mobs can pick up items or change blocks.
*
* @deprecated renamed to {@link GameRules#MOB_GRIEFING}
*/
public static final GameRule<Boolean> MOB_GRIEFING = new GameRule<>("mobGriefing", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> MOB_GRIEFING = GameRules.MOB_GRIEFING;
/**
* Whether players can regenerate health naturally through their hunger bar.
*
* @deprecated renamed to {@link GameRules#NATURAL_HEALTH_REGENERATION}
*/
public static final GameRule<Boolean> NATURAL_REGENERATION = new GameRule<>("naturalRegeneration", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> NATURAL_REGENERATION = GameRules.NATURAL_HEALTH_REGENERATION;
/**
* Whether the debug screen shows all or reduced information.
*
* @deprecated renamed to {@link GameRules#REDUCED_DEBUG_INFO}
*/
public static final GameRule<Boolean> REDUCED_DEBUG_INFO = new GameRule<>("reducedDebugInfo", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> REDUCED_DEBUG_INFO = GameRules.REDUCED_DEBUG_INFO;
/**
* Whether the feedback from commands executed by a player should show up in
* chat. Also affects the default behavior of whether command blocks store
* their output text.
*
* @deprecated renamed to {@link GameRules#SEND_COMMAND_FEEDBACK}
*/
public static final GameRule<Boolean> SEND_COMMAND_FEEDBACK = new GameRule<>("sendCommandFeedback", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SEND_COMMAND_FEEDBACK = GameRules.SEND_COMMAND_FEEDBACK;
/**
* Whether a message appears in chat when a player dies.
*
* @deprecated renamed to {@link GameRules#SHOW_DEATH_MESSAGES}
*/
public static final GameRule<Boolean> SHOW_DEATH_MESSAGES = new GameRule<>("showDeathMessages", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SHOW_DEATH_MESSAGES = GameRules.SHOW_DEATH_MESSAGES;
/**
* Whether players in spectator mode can generate chunks.
*
* @deprecated renamed to {@link GameRules#SPECTATORS_GENERATE_CHUNKS}
*/
public static final GameRule<Boolean> SPECTATORS_GENERATE_CHUNKS = new GameRule<>("spectatorsGenerateChunks", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SPECTATORS_GENERATE_CHUNKS = GameRules.SPECTATORS_GENERATE_CHUNKS;
/**
* Whether pillager raids are enabled or not.
*
* @deprecated renamed to {@link GameRules#RAIDS} (inverted)
*/
public static final GameRule<Boolean> DISABLE_RAIDS = new GameRule<>("disableRaids", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DISABLE_RAIDS = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.RAIDS, inverseBool(), inverseBool(), Boolean.class);
/**
* Whether phantoms will appear without sleeping or not.
*
* @deprecated renamed to {@link GameRules#SPAWN_PHANTOMS}
*/
public static final GameRule<Boolean> DO_INSOMNIA = new GameRule<>("doInsomnia", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_INSOMNIA = GameRules.SPAWN_PHANTOMS;
/**
* Whether clients will respawn immediately after death or not.
*
* @deprecated renamed to {@link GameRules#IMMEDIATE_RESPAWN}
*/
public static final GameRule<Boolean> DO_IMMEDIATE_RESPAWN = new GameRule<>("doImmediateRespawn", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_IMMEDIATE_RESPAWN = GameRules.IMMEDIATE_RESPAWN;
/**
* Whether drowning damage is enabled or not.
*
* @deprecated renamed to {@link GameRules#DROWNING_DAMAGE}
*/
public static final GameRule<Boolean> DROWNING_DAMAGE = new GameRule<>("drowningDamage", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DROWNING_DAMAGE = GameRules.DROWNING_DAMAGE;
/**
* Whether fall damage is enabled or not.
*
* @deprecated renamed to {@link GameRules#FALL_DAMAGE}
*/
public static final GameRule<Boolean> FALL_DAMAGE = new GameRule<>("fallDamage", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> FALL_DAMAGE = GameRules.FALL_DAMAGE;
/**
* Whether fire damage is enabled or not.
*
* @deprecated renamed to {@link GameRules#FIRE_DAMAGE}
*/
public static final GameRule<Boolean> FIRE_DAMAGE = new GameRule<>("fireDamage", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> FIRE_DAMAGE = GameRules.FIRE_DAMAGE;
/**
* Whether freeze damage is enabled or not.
*
* @deprecated renamed to {@link GameRules#FREEZE_DAMAGE}
*/
public static final GameRule<Boolean> FREEZE_DAMAGE = new GameRule<>("freezeDamage", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> FREEZE_DAMAGE = GameRules.FREEZE_DAMAGE;
/**
* Whether patrols should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_PATROLS}
*/
public static final GameRule<Boolean> DO_PATROL_SPAWNING = new GameRule<>("doPatrolSpawning", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_PATROL_SPAWNING = GameRules.SPAWN_PATROLS;
/**
* Whether traders should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_WANDERING_TRADERS}
*/
public static final GameRule<Boolean> DO_TRADER_SPAWNING = new GameRule<>("doTraderSpawning", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_TRADER_SPAWNING = GameRules.SPAWN_WANDERING_TRADERS;
/**
* Whether wardens should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_WARDENS}
*/
public static final GameRule<Boolean> DO_WARDEN_SPAWNING = new GameRule<>("doWardenSpawning", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_WARDEN_SPAWNING = GameRules.SPAWN_WARDENS;
/**
* Whether mobs should cease being angry at a player once they die.
*
* @deprecated renamed to {@link GameRules#FORGIVE_DEAD_PLAYERS}
*/
public static final GameRule<Boolean> FORGIVE_DEAD_PLAYERS = new GameRule<>("forgiveDeadPlayers", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> FORGIVE_DEAD_PLAYERS = GameRules.FORGIVE_DEAD_PLAYERS;
/**
* Whether mobs will target all player entities once angered.
*
* @deprecated renamed to {@link GameRules#UNIVERSAL_ANGER}
*/
public static final GameRule<Boolean> UNIVERSAL_ANGER = new GameRule<>("universalAnger", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> UNIVERSAL_ANGER = GameRules.UNIVERSAL_ANGER;
/**
* Whether block explosions will destroy dropped items.
*
* @deprecated renamed to {@link GameRules#BLOCK_EXPLOSION_DROP_DECAY}
*/
public static final GameRule<Boolean> BLOCK_EXPLOSION_DROP_DECAY = new GameRule<>("blockExplosionDropDecay", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> BLOCK_EXPLOSION_DROP_DECAY = GameRules.BLOCK_EXPLOSION_DROP_DECAY;
/**
* * Whether mob explosions will destroy dropped items.
*
* @deprecated renamed to {@link GameRules#MOB_EXPLOSION_DROP_DECAY}
*/
public static final GameRule<Boolean> MOB_EXPLOSION_DROP_DECAY = new GameRule<>("mobExplosionDropDecay", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> MOB_EXPLOSION_DROP_DECAY = GameRules.MOB_EXPLOSION_DROP_DECAY;
/**
* Whether tnt explosions will destroy dropped items.
*
* @deprecated renamed to {@link GameRules#TNT_EXPLOSION_DROP_DECAY}
*/
public static final GameRule<Boolean> TNT_EXPLOSION_DROP_DECAY = new GameRule<>("tntExplosionDropDecay", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> TNT_EXPLOSION_DROP_DECAY = GameRules.TNT_EXPLOSION_DROP_DECAY;
/**
* Whether water blocks can convert into water source blocks.
*
* @deprecated renamed to {@link GameRules#WATER_SOURCE_CONVERSION}
*/
public static final GameRule<Boolean> WATER_SOURCE_CONVERSION = new GameRule<>("waterSourceConversion", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> WATER_SOURCE_CONVERSION = GameRules.WATER_SOURCE_CONVERSION;
/**
* Whether lava blocks can convert into lava source blocks.
*
* @deprecated renamed to {@link GameRules#LAVA_SOURCE_CONVERSION}
*/
public static final GameRule<Boolean> LAVA_SOURCE_CONVERSION = new GameRule<>("lavaSourceConversion", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> LAVA_SOURCE_CONVERSION = GameRules.LAVA_SOURCE_CONVERSION;
/**
* Whether global level events such as ender dragon, wither, and completed
* end portal effects will propagate across the entire server.
*
* @deprecated renamed to {@link GameRules#GLOBAL_SOUND_EVENTS}
*/
public static final GameRule<Boolean> GLOBAL_SOUND_EVENTS = new GameRule<>("globalSoundEvents", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> GLOBAL_SOUND_EVENTS = GameRules.GLOBAL_SOUND_EVENTS;
/**
* Whether vines will spread.
*
* @deprecated renamed to {@link GameRules#SPREAD_VINES}
*/
public static final GameRule<Boolean> DO_VINES_SPREAD = new GameRule<>("doVinesSpread", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> DO_VINES_SPREAD = GameRules.SPREAD_VINES;
/**
* Whether ender pearls will vanish on player death.
*
* @deprecated renamed to {@link GameRules#ENDER_PEARLS_VANISH_ON_DEATH}
*/
public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH = new GameRule<>("enderPearlsVanishOnDeath", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH = GameRules.ENDER_PEARLS_VANISH_ON_DEATH;
/**
* Whether fire will still propagate far away from players (8 chunks).
*
* @deprecated use {@link GameRules#FIRE_SPREAD_RADIUS_AROUND_PLAYER}
*/
public static final GameRule<Boolean> ALLOW_FIRE_TICKS_AWAY_FROM_PLAYER = new GameRule<>("allowFireTicksAwayFromPlayer", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> ALLOW_FIRE_TICKS_AWAY_FROM_PLAYER = InternalAPIBridge.get().legacyGameRuleBridge(GameRules.FIRE_SPREAD_RADIUS_AROUND_PLAYER, (value) -> value ? -1 : 128, (value) -> value == -1, Boolean.class);
/**
* Whether primed tnt explodes.
*
* @deprecated renamed to {@link GameRules#TNT_EXPLODES}
*/
public static final GameRule<Boolean> TNT_EXPLODES = new GameRule<>("tntExplodes", Boolean.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> TNT_EXPLODES = GameRules.TNT_EXPLODES;
/**
* Configures if the world uses the locator bar.
*
* @deprecated renamed to {@link GameRules#LOCATOR_BAR}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> LOCATOR_BAR = GameRules.LOCATOR_BAR;
/**
* Whether player versus player combat is allowed.
*
* @deprecated renamed to {@link GameRules#PVP}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> PVP = GameRules.PVP;
/**
* Whether monsters should naturally spawn.
*
* @deprecated renamed to {@link GameRules#SPAWN_MONSTERS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SPAWN_MONSTERS = GameRules.SPAWN_MONSTERS;
/**
* Whether players can enter the Nether using portals.
*
* @deprecated renamed to {@link GameRules#ALLOW_ENTERING_NETHER_USING_PORTALS}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> ALLOW_ENTERING_NETHER_USING_PORTALS = GameRules.ALLOW_ENTERING_NETHER_USING_PORTALS;
/**
* Whether command blocks are enabled.
*
* @deprecated renamed to {@link GameRules#COMMAND_BLOCKS_WORK}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> COMMAND_BLOCKS_ENABLED = GameRules.COMMAND_BLOCKS_WORK;
/**
* Whether spawner blocks are enabled.
*
* @deprecated renamed to {@link GameRules#SPAWNER_BLOCKS_WORK}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Boolean> SPAWNER_BLOCKS_ENABLED = GameRules.SPAWNER_BLOCKS_WORK;
// Numerical rules
/**
* How often a random block tick occurs (such as plant growth, leaf decay,
* etc.) per chunk section per game tick. 0 will disable random ticks,
* higher numbers will increase random ticks.
*
* @deprecated renamed to {@link GameRules#RANDOM_TICK_SPEED}
*/
public static final GameRule<Integer> RANDOM_TICK_SPEED = new GameRule<>("randomTickSpeed", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> RANDOM_TICK_SPEED = GameRules.RANDOM_TICK_SPEED;
/**
* The number of blocks outward from the world spawn coordinates that a
* player will spawn in when first joining a server or when dying without a
* spawnpoint.
*
* @deprecated renamed to {@link GameRules#RESPAWN_RADIUS}
*/
public static final GameRule<Integer> SPAWN_RADIUS = new GameRule<>("spawnRadius", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> SPAWN_RADIUS = GameRules.RESPAWN_RADIUS;
/**
* The maximum number of other pushable entities a mob or player can push,
* before taking suffocation damage.
* <br>
* Setting to 0 disables this rule.
*
* @deprecated renamed to {@link GameRules#MAX_ENTITY_CRAMMING}
*/
public static final GameRule<Integer> MAX_ENTITY_CRAMMING = new GameRule<>("maxEntityCramming", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> MAX_ENTITY_CRAMMING = GameRules.MAX_ENTITY_CRAMMING;
/**
* Determines the number at which the chain of command blocks act as a
* "chain."
* <br>
* This is the maximum amount of command blocks that can be activated in a
* single tick from a single chain.
*
* @deprecated renamed to {@link GameRules#MAX_COMMAND_SEQUENCE_LENGTH}
*/
public static final GameRule<Integer> MAX_COMMAND_CHAIN_LENGTH = new GameRule<>("maxCommandChainLength", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> MAX_COMMAND_CHAIN_LENGTH = GameRules.MAX_COMMAND_SEQUENCE_LENGTH;
/**
* Determines the number of different commands/functions which execute
* commands can fork into.
*
* @deprecated renamed to {@link GameRules#MAX_COMMAND_FORKS}
*/
public static final GameRule<Integer> MAX_COMMAND_FORK_COUNT = new GameRule<>("maxCommandForkCount", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> MAX_COMMAND_FORK_COUNT = GameRules.MAX_COMMAND_FORKS;
/**
* Determines the maximum number of blocks which a command can modify.
*
* @deprecated renamed to {@link GameRules#MAX_BLOCK_MODIFICATIONS}
*/
public static final GameRule<Integer> COMMAND_MODIFICATION_BLOCK_LIMIT = new GameRule<>("commandModificationBlockLimit", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> COMMAND_MODIFICATION_BLOCK_LIMIT = GameRules.MAX_BLOCK_MODIFICATIONS;
/**
* The percentage of online players which must be sleeping for the night to
* advance.
*
* @deprecated renamed to {@link GameRules#PLAYERS_SLEEPING_PERCENTAGE}
*/
public static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGE = new GameRule<>("playersSleepingPercentage", Integer.class);
public static final GameRule<Integer> SNOW_ACCUMULATION_HEIGHT = new GameRule<>("snowAccumulationHeight", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGE = GameRules.PLAYERS_SLEEPING_PERCENTAGE;
/**
* @deprecated renamed to {@link GameRules#MAX_SNOW_ACCUMULATION_HEIGHT}
*/
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> SNOW_ACCUMULATION_HEIGHT = GameRules.MAX_SNOW_ACCUMULATION_HEIGHT;
/**
* The amount of time a player must stand in a nether portal before the
* portal activates.
*
* @deprecated renamed to {@link GameRules#PLAYERS_NETHER_PORTAL_DEFAULT_DELAY}
*/
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = new GameRule<>("playersNetherPortalDefaultDelay", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = GameRules.PLAYERS_NETHER_PORTAL_DEFAULT_DELAY;
/**
* The amount of time a player in creative mode must stand in a nether
* portal before the portal activates.
*
* @deprecated renamed to {@link GameRules#PLAYERS_NETHER_PORTAL_CREATIVE_DELAY}
*/
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = new GameRule<>("playersNetherPortalCreativeDelay", Integer.class);
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = GameRules.PLAYERS_NETHER_PORTAL_CREATIVE_DELAY;
/**
* The maximum speed of minecarts (when the new movement algorithm is
* enabled).
*
* @deprecated renamed to {@link GameRules#MAX_MINECART_SPEED}
*/
@MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS) // Paper - add missing annotation
@org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
public static final GameRule<Integer> MINECART_MAX_SPEED = new GameRule<>("minecartMaxSpeed", Integer.class);
@MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS)
@ApiStatus.Experimental
@Deprecated(forRemoval = true, since = "1.21.11")
public static final GameRule<Integer> MINECART_MAX_SPEED = GameRules.MAX_MINECART_SPEED;
/**
* Configures if the world uses the locator bar.
*/
public static final GameRule<Boolean> LOCATOR_BAR = new GameRule<>("locatorBar", Boolean.class);
/**
* Whether player versus player combat is allowed.
*/
public static final GameRule<Boolean> PVP = new GameRule<>("pvp", Boolean.class);
/**
* Whether monsters should naturally spawn.
*/
public static final GameRule<Boolean> SPAWN_MONSTERS = new GameRule<>("spawnMonsters", Boolean.class);
/**
* Whether players can enter the Nether using portals.
*/
public static final GameRule<Boolean> ALLOW_ENTERING_NETHER_USING_PORTALS = new GameRule<>("allowEnteringNetherUsingPortals", Boolean.class);
/**
* Whether command blocks are enabled.
*/
public static final GameRule<Boolean> COMMAND_BLOCKS_ENABLED = new GameRule<>("commandBlocksEnabled", Boolean.class);
/**
* Whether spawner blocks are enabled.
*/
public static final GameRule<Boolean> SPAWNER_BLOCKS_ENABLED = new GameRule<>("spawnerBlocksEnabled", Boolean.class);
// All GameRules instantiated above this for organizational purposes
private final String name;
private final Class<T> type;
private GameRule(@NotNull String name, @NotNull Class<T> clazz) {
Preconditions.checkNotNull(name, "GameRule name cannot be null");
Preconditions.checkNotNull(clazz, "GameRule type cannot be null");
Preconditions.checkArgument(clazz == Boolean.class || clazz == Integer.class, "Must be of type Boolean or Integer. Found %s ", clazz.getName());
this.name = name;
this.type = clazz;
gameRules.put(name, this);
private static UnaryOperator<Boolean> inverseBool() {
return operand -> !operand;
}
/**
* Get the name of this GameRule.
*
* @return the name of this GameRule
* @deprecated Game rule is now a registry, use {@link #getKey()} instead
*/
@NotNull
public String getName() {
return name;
}
@Deprecated(since = "1.21.11", forRemoval = true)
public abstract String getName();
/**
* Get the type of this rule.
@@ -359,26 +486,7 @@ public final class GameRule<T> implements net.kyori.adventure.translation.Transl
* @return the rule type; Integer or Boolean
*/
@NotNull
public Class<T> getType() {
return type;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof GameRule)) {
return false;
}
GameRule<?> other = (GameRule<?>) obj;
return this.getName().equals(other.getName()) && this.getType() == other.getType();
}
@Override
public String toString() {
return "GameRule{" + "key=" + name + ", type=" + type + '}';
}
public abstract Class<T> getType();
/**
* Get a {@link GameRule} by its name.
@@ -386,26 +494,33 @@ public final class GameRule<T> implements net.kyori.adventure.translation.Transl
* @param rule the name of the GameRule
* @return the {@link GameRule} or null if no GameRule matches the given
* name
* @deprecated Game rule is now a registry, fetch element from it
*/
@Nullable
public static GameRule<?> getByName(@NotNull String rule) {
Preconditions.checkNotNull(rule, "Rule cannot be null");
return gameRules.get(rule);
@Deprecated(since = "1.21.11", forRemoval = true)
public static <T> GameRule<T> getByName(@NotNull String rule) {
Preconditions.checkArgument(rule != null, "Rule cannot be null");
NamespacedKey key = NamespacedKey.fromString(rule);
if (key == null) {
return null;
}
return (GameRule<T>) Registry.GAME_RULE.get(key);
}
/**
* Get an immutable collection of {@link GameRule}s.
*
* @return an immutable collection containing all registered GameRules.
* @deprecated Game rule is now a registry, fetch elements from it
*/
@NotNull
@Deprecated(since = "1.21.11", forRemoval = true)
public static GameRule<?>[] values() {
return gameRules.values().toArray(new GameRule<?>[gameRules.size()]);
return Registry.GAME_RULE.stream().toArray(GameRule[]::new);
}
@Override
public @NotNull String translationKey() {
return "gamerule." + this.name;
}
public abstract @NotNull String translationKey();
}
@@ -0,0 +1,141 @@
package org.bukkit;
import net.kyori.adventure.key.KeyPattern;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* All the vanilla gamerules
*/
@NullMarked
public final class GameRules {
// Start generate - GameRules
public static final GameRule<Boolean> ADVANCE_TIME = getRule("advance_time");
public static final GameRule<Boolean> ADVANCE_WEATHER = getRule("advance_weather");
public static final GameRule<Boolean> ALLOW_ENTERING_NETHER_USING_PORTALS = getRule("allow_entering_nether_using_portals");
public static final GameRule<Boolean> BLOCK_DROPS = getRule("block_drops");
public static final GameRule<Boolean> BLOCK_EXPLOSION_DROP_DECAY = getRule("block_explosion_drop_decay");
public static final GameRule<Boolean> COMMAND_BLOCK_OUTPUT = getRule("command_block_output");
public static final GameRule<Boolean> COMMAND_BLOCKS_WORK = getRule("command_blocks_work");
public static final GameRule<Boolean> DROWNING_DAMAGE = getRule("drowning_damage");
public static final GameRule<Boolean> ELYTRA_MOVEMENT_CHECK = getRule("elytra_movement_check");
public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH = getRule("ender_pearls_vanish_on_death");
public static final GameRule<Boolean> ENTITY_DROPS = getRule("entity_drops");
public static final GameRule<Boolean> FALL_DAMAGE = getRule("fall_damage");
public static final GameRule<Boolean> FIRE_DAMAGE = getRule("fire_damage");
public static final GameRule<Integer> FIRE_SPREAD_RADIUS_AROUND_PLAYER = getRule("fire_spread_radius_around_player");
public static final GameRule<Boolean> FORGIVE_DEAD_PLAYERS = getRule("forgive_dead_players");
public static final GameRule<Boolean> FREEZE_DAMAGE = getRule("freeze_damage");
public static final GameRule<Boolean> GLOBAL_SOUND_EVENTS = getRule("global_sound_events");
public static final GameRule<Boolean> IMMEDIATE_RESPAWN = getRule("immediate_respawn");
public static final GameRule<Boolean> KEEP_INVENTORY = getRule("keep_inventory");
public static final GameRule<Boolean> LAVA_SOURCE_CONVERSION = getRule("lava_source_conversion");
public static final GameRule<Boolean> LIMITED_CRAFTING = getRule("limited_crafting");
public static final GameRule<Boolean> LOCATOR_BAR = getRule("locator_bar");
public static final GameRule<Boolean> LOG_ADMIN_COMMANDS = getRule("log_admin_commands");
public static final GameRule<Integer> MAX_BLOCK_MODIFICATIONS = getRule("max_block_modifications");
public static final GameRule<Integer> MAX_COMMAND_FORKS = getRule("max_command_forks");
public static final GameRule<Integer> MAX_COMMAND_SEQUENCE_LENGTH = getRule("max_command_sequence_length");
public static final GameRule<Integer> MAX_ENTITY_CRAMMING = getRule("max_entity_cramming");
@MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS)
@ApiStatus.Experimental
public static final GameRule<Integer> MAX_MINECART_SPEED = getRule("max_minecart_speed");
public static final GameRule<Integer> MAX_SNOW_ACCUMULATION_HEIGHT = getRule("max_snow_accumulation_height");
public static final GameRule<Boolean> MOB_DROPS = getRule("mob_drops");
public static final GameRule<Boolean> MOB_EXPLOSION_DROP_DECAY = getRule("mob_explosion_drop_decay");
public static final GameRule<Boolean> MOB_GRIEFING = getRule("mob_griefing");
public static final GameRule<Boolean> NATURAL_HEALTH_REGENERATION = getRule("natural_health_regeneration");
public static final GameRule<Boolean> PLAYER_MOVEMENT_CHECK = getRule("player_movement_check");
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = getRule("players_nether_portal_creative_delay");
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = getRule("players_nether_portal_default_delay");
public static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGE = getRule("players_sleeping_percentage");
public static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKS = getRule("projectiles_can_break_blocks");
public static final GameRule<Boolean> PVP = getRule("pvp");
public static final GameRule<Boolean> RAIDS = getRule("raids");
public static final GameRule<Integer> RANDOM_TICK_SPEED = getRule("random_tick_speed");
public static final GameRule<Boolean> REDUCED_DEBUG_INFO = getRule("reduced_debug_info");
public static final GameRule<Integer> RESPAWN_RADIUS = getRule("respawn_radius");
public static final GameRule<Boolean> SEND_COMMAND_FEEDBACK = getRule("send_command_feedback");
public static final GameRule<Boolean> SHOW_ADVANCEMENT_MESSAGES = getRule("show_advancement_messages");
public static final GameRule<Boolean> SHOW_DEATH_MESSAGES = getRule("show_death_messages");
public static final GameRule<Boolean> SPAWN_MOBS = getRule("spawn_mobs");
public static final GameRule<Boolean> SPAWN_MONSTERS = getRule("spawn_monsters");
public static final GameRule<Boolean> SPAWN_PATROLS = getRule("spawn_patrols");
public static final GameRule<Boolean> SPAWN_PHANTOMS = getRule("spawn_phantoms");
public static final GameRule<Boolean> SPAWN_WANDERING_TRADERS = getRule("spawn_wandering_traders");
public static final GameRule<Boolean> SPAWN_WARDENS = getRule("spawn_wardens");
public static final GameRule<Boolean> SPAWNER_BLOCKS_WORK = getRule("spawner_blocks_work");
public static final GameRule<Boolean> SPECTATORS_GENERATE_CHUNKS = getRule("spectators_generate_chunks");
public static final GameRule<Boolean> SPREAD_VINES = getRule("spread_vines");
public static final GameRule<Boolean> TNT_EXPLODES = getRule("tnt_explodes");
public static final GameRule<Boolean> TNT_EXPLOSION_DROP_DECAY = getRule("tnt_explosion_drop_decay");
public static final GameRule<Boolean> UNIVERSAL_ANGER = getRule("universal_anger");
public static final GameRule<Boolean> WATER_SOURCE_CONVERSION = getRule("water_source_conversion");
// End generate - GameRules
private static <T> GameRule<T> getRule(@KeyPattern.Value String key) {
return (GameRule<T>) Registry.GAME_RULE.getOrThrow(NamespacedKey.minecraft(key));
}
private GameRules() {
}
}
@@ -2,6 +2,7 @@ package org.bukkit;
import io.papermc.paper.registry.RegistryAccess;
import io.papermc.paper.registry.RegistryKey;
import net.kyori.adventure.text.Component;
import org.jspecify.annotations.NullMarked;
/**
@@ -65,4 +66,32 @@ public interface JukeboxSong extends Keyed, Translatable {
@Override
@Deprecated(forRemoval = true)
String getTranslationKey();
/**
* Gets the sound for this song.
*
* @return the sound
*/
Sound getSound();
/**
* Gets the description for this song.
*
* @return the description
*/
Component getDescription();
/**
* Gets the length in seconds for this song.
*
* @return the length in seconds
*/
float getLengthInSeconds();
/**
* Gets the comparator output for this song.
*
* @return the comparator output
*/
int getComparatorOutput();
}
File diff suppressed because it is too large. Load diff
+33 -26
View File
@@ -3,13 +3,16 @@ package org.bukkit;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.bukkit.boss.BossBar;
import org.bukkit.entity.Raider;
import org.jetbrains.annotations.NotNull;
import org.bukkit.persistence.PersistentDataHolder;
import org.jspecify.annotations.NullMarked;
/**
* Represents a raid event.
*/
public interface Raid extends org.bukkit.persistence.PersistentDataHolder { // Paper
@NullMarked
public interface Raid extends PersistentDataHolder {
/**
* Get whether this raid started.
@@ -48,7 +51,6 @@ public interface Raid extends org.bukkit.persistence.PersistentDataHolder { // P
*
* @return location
*/
@NotNull
Location getLocation();
/**
@@ -59,7 +61,6 @@ public interface Raid extends org.bukkit.persistence.PersistentDataHolder { // P
*
* @return Raids status
*/
@NotNull
RaidStatus getStatus();
/**
@@ -86,6 +87,16 @@ public interface Raid extends org.bukkit.persistence.PersistentDataHolder { // P
*/
int getTotalWaves();
/**
* Sets the number of waves in this raid.
*
* @param totalWaves number of waves
* @throws IllegalArgumentException if totalWaves is negative or zero
* @throws IllegalArgumentException if totalWaves is larger than 7, which is the most waves a vanilla raid can have.
* @throws IllegalArgumentException if the totalWaves is less than {@link #getSpawnedGroups()}
*/
void setTotalWaves(int totalWaves);
/**
* Gets the sum of all raider's health.
*
@@ -98,7 +109,6 @@ public interface Raid extends org.bukkit.persistence.PersistentDataHolder { // P
*
* @return a set of unique ids
*/
@NotNull
Set<UUID> getHeroes();
/**
@@ -106,13 +116,29 @@ public interface Raid extends org.bukkit.persistence.PersistentDataHolder { // P
*
* @return a list of current raiders
*/
@NotNull
List<Raider> getRaiders();
/**
* Gets the id of this raid.
*
* @return the raid id
* @deprecated Raid identifiers are magic internal values and may or may not be present.
* -1 is returned for raids without an assigned id.
*/
@Deprecated(forRemoval = true, since = "1.21.5")
int getId();
/**
* Get the boss bar to be displayed for this raid.
*
* @return the boss bar
*/
BossBar getBossBar();
/**
* Represents the status of a {@link Raid}.
*/
public enum RaidStatus {
enum RaidStatus {
/**
* The raid is in progress.
@@ -131,23 +157,4 @@ public interface Raid extends org.bukkit.persistence.PersistentDataHolder { // P
*/
STOPPED;
}
// Paper start
/**
* Gets the id of this raid.
*
* @return the raid id
* @deprecated Raid identifiers are magic internal values and may or may not be present.
* -1 is returned for raids without an assigned id.
*/
@Deprecated(forRemoval = true, since = "1.21.5")
int getId();
/**
* Get the boss bar to be displayed for this raid.
*
* @return the boss bar
*/
org.bukkit.boss.@NotNull BossBar getBossBar();
// Paper end
}
@@ -348,7 +348,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see DataComponentType
*/
Registry<DataComponentType> DATA_COMPONENT_TYPE = registryFor(RegistryKey.DATA_COMPONENT_TYPE); // Paper
Registry<DataComponentType> DATA_COMPONENT_TYPE = registryFor(RegistryKey.DATA_COMPONENT_TYPE);
/**
* Game rules.
*
* @see GameRule
*/
Registry<GameRule<?>> GAME_RULE = registryFor(RegistryKey.GAME_RULE);
//<editor-fold desc="renames" defaultstate="collapsed">
/**
@@ -557,7 +563,6 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @deprecated this method's behavior is broken and not useful. If you want to get an object
* based on its vanilla name, or a key, wrap it in a {@link NamespacedKey} object and use {@link #get(NamespacedKey)}
*/
// Paper
@Deprecated(forRemoval = true)
default @Nullable T match(final String input) {
Preconditions.checkArgument(input != null, "input must not be null");
@@ -243,7 +243,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* Separate from the portal game rule.
*
* @return whether this server allows the Nether or not
* @see GameRule#ALLOW_ENTERING_NETHER_USING_PORTALS
* @see GameRules#ALLOW_ENTERING_NETHER_USING_PORTALS
*/
public boolean getAllowNether();
@@ -835,7 +835,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* Create a new virtual {@link WorldBorder}.
* <p>
* Note that world borders created by the server will not respect any world
* scaling effects (i.e. coordinates are not divided by 8 in the nether).
* scaling effects (i.e. coordinates are not divided by 8 in the nether)
* and will not deal damage to players outside their bounds.
*
* @return the created world border instance
*
@@ -1739,6 +1739,22 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_AXOLOTL_SWIM = getSound("entity.axolotl.swim");
Sound ENTITY_BABY_NAUTILUS_AMBIENT = getSound("entity.baby_nautilus.ambient");
Sound ENTITY_BABY_NAUTILUS_AMBIENT_LAND = getSound("entity.baby_nautilus.ambient_land");
Sound ENTITY_BABY_NAUTILUS_DEATH = getSound("entity.baby_nautilus.death");
Sound ENTITY_BABY_NAUTILUS_DEATH_LAND = getSound("entity.baby_nautilus.death_land");
Sound ENTITY_BABY_NAUTILUS_EAT = getSound("entity.baby_nautilus.eat");
Sound ENTITY_BABY_NAUTILUS_HURT = getSound("entity.baby_nautilus.hurt");
Sound ENTITY_BABY_NAUTILUS_HURT_LAND = getSound("entity.baby_nautilus.hurt_land");
Sound ENTITY_BABY_NAUTILUS_SWIM = getSound("entity.baby_nautilus.swim");
Sound ENTITY_BAT_AMBIENT = getSound("entity.bat.ambient");
Sound ENTITY_BAT_DEATH = getSound("entity.bat.death");
@@ -1833,6 +1849,28 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_CAMEL_STEP_SAND = getSound("entity.camel.step_sand");
Sound ENTITY_CAMEL_HUSK_AMBIENT = getSound("entity.camel_husk.ambient");
Sound ENTITY_CAMEL_HUSK_DASH = getSound("entity.camel_husk.dash");
Sound ENTITY_CAMEL_HUSK_DASH_READY = getSound("entity.camel_husk.dash_ready");
Sound ENTITY_CAMEL_HUSK_DEATH = getSound("entity.camel_husk.death");
Sound ENTITY_CAMEL_HUSK_EAT = getSound("entity.camel_husk.eat");
Sound ENTITY_CAMEL_HUSK_HURT = getSound("entity.camel_husk.hurt");
Sound ENTITY_CAMEL_HUSK_SADDLE = getSound("entity.camel_husk.saddle");
Sound ENTITY_CAMEL_HUSK_SIT = getSound("entity.camel_husk.sit");
Sound ENTITY_CAMEL_HUSK_STAND = getSound("entity.camel_husk.stand");
Sound ENTITY_CAMEL_HUSK_STEP = getSound("entity.camel_husk.step");
Sound ENTITY_CAMEL_HUSK_STEP_SAND = getSound("entity.camel_husk.step_sand");
Sound ENTITY_CAT_AMBIENT = getSound("entity.cat.ambient");
Sound ENTITY_CAT_BEG_FOR_FOOD = getSound("entity.cat.beg_for_food");
@@ -2439,6 +2477,32 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_MULE_JUMP = getSound("entity.mule.jump");
Sound ENTITY_NAUTILUS_AMBIENT = getSound("entity.nautilus.ambient");
Sound ENTITY_NAUTILUS_AMBIENT_LAND = getSound("entity.nautilus.ambient_land");
Sound ENTITY_NAUTILUS_DASH = getSound("entity.nautilus.dash");
Sound ENTITY_NAUTILUS_DASH_LAND = getSound("entity.nautilus.dash_land");
Sound ENTITY_NAUTILUS_DASH_READY = getSound("entity.nautilus.dash_ready");
Sound ENTITY_NAUTILUS_DASH_READY_LAND = getSound("entity.nautilus.dash_ready_land");
Sound ENTITY_NAUTILUS_DEATH = getSound("entity.nautilus.death");
Sound ENTITY_NAUTILUS_DEATH_LAND = getSound("entity.nautilus.death_land");
Sound ENTITY_NAUTILUS_EAT = getSound("entity.nautilus.eat");
Sound ENTITY_NAUTILUS_HURT = getSound("entity.nautilus.hurt");
Sound ENTITY_NAUTILUS_HURT_LAND = getSound("entity.nautilus.hurt_land");
Sound ENTITY_NAUTILUS_RIDING = getSound("entity.nautilus.riding");
Sound ENTITY_NAUTILUS_SWIM = getSound("entity.nautilus.swim");
Sound ENTITY_OCELOT_AMBIENT = getSound("entity.ocelot.ambient");
Sound ENTITY_OCELOT_DEATH = getSound("entity.ocelot.death");
@@ -2471,6 +2535,14 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PANDA_WORRIED_AMBIENT = getSound("entity.panda.worried_ambient");
Sound ENTITY_PARCHED_AMBIENT = getSound("entity.parched.ambient");
Sound ENTITY_PARCHED_DEATH = getSound("entity.parched.death");
Sound ENTITY_PARCHED_HURT = getSound("entity.parched.hurt");
Sound ENTITY_PARCHED_STEP = getSound("entity.parched.step");
Sound ENTITY_PARROT_AMBIENT = getSound("entity.parrot.ambient");
Sound ENTITY_PARROT_DEATH = getSound("entity.parrot.death");
@@ -2487,6 +2559,8 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PARROT_IMITATE_BREEZE = getSound("entity.parrot.imitate.breeze");
Sound ENTITY_PARROT_IMITATE_CAMEL_HUSK = getSound("entity.parrot.imitate.camel_husk");
Sound ENTITY_PARROT_IMITATE_CREAKING = getSound("entity.parrot.imitate.creaking");
Sound ENTITY_PARROT_IMITATE_CREEPER = getSound("entity.parrot.imitate.creeper");
@@ -2513,6 +2587,8 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PARROT_IMITATE_MAGMA_CUBE = getSound("entity.parrot.imitate.magma_cube");
Sound ENTITY_PARROT_IMITATE_PARCHED = getSound("entity.parrot.imitate.parched");
Sound ENTITY_PARROT_IMITATE_PHANTOM = getSound("entity.parrot.imitate.phantom");
Sound ENTITY_PARROT_IMITATE_PIGLIN = getSound("entity.parrot.imitate.piglin");
@@ -2551,6 +2627,10 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_PARROT_IMITATE_ZOMBIE = getSound("entity.parrot.imitate.zombie");
Sound ENTITY_PARROT_IMITATE_ZOMBIE_HORSE = getSound("entity.parrot.imitate.zombie_horse");
Sound ENTITY_PARROT_IMITATE_ZOMBIE_NAUTILUS = getSound("entity.parrot.imitate.zombie_nautilus");
Sound ENTITY_PARROT_IMITATE_ZOMBIE_VILLAGER = getSound("entity.parrot.imitate.zombie_villager");
Sound ENTITY_PARROT_STEP = getSound("entity.parrot.step");
@@ -3199,10 +3279,38 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ENTITY_ZOMBIE_HORSE_AMBIENT = getSound("entity.zombie_horse.ambient");
Sound ENTITY_ZOMBIE_HORSE_ANGRY = getSound("entity.zombie_horse.angry");
Sound ENTITY_ZOMBIE_HORSE_DEATH = getSound("entity.zombie_horse.death");
Sound ENTITY_ZOMBIE_HORSE_EAT = getSound("entity.zombie_horse.eat");
Sound ENTITY_ZOMBIE_HORSE_HURT = getSound("entity.zombie_horse.hurt");
Sound ENTITY_ZOMBIE_NAUTILUS_AMBIENT = getSound("entity.zombie_nautilus.ambient");
Sound ENTITY_ZOMBIE_NAUTILUS_AMBIENT_LAND = getSound("entity.zombie_nautilus.ambient_land");
Sound ENTITY_ZOMBIE_NAUTILUS_DASH = getSound("entity.zombie_nautilus.dash");
Sound ENTITY_ZOMBIE_NAUTILUS_DASH_LAND = getSound("entity.zombie_nautilus.dash_land");
Sound ENTITY_ZOMBIE_NAUTILUS_DASH_READY = getSound("entity.zombie_nautilus.dash_ready");
Sound ENTITY_ZOMBIE_NAUTILUS_DASH_READY_LAND = getSound("entity.zombie_nautilus.dash_ready_land");
Sound ENTITY_ZOMBIE_NAUTILUS_DEATH = getSound("entity.zombie_nautilus.death");
Sound ENTITY_ZOMBIE_NAUTILUS_DEATH_LAND = getSound("entity.zombie_nautilus.death_land");
Sound ENTITY_ZOMBIE_NAUTILUS_EAT = getSound("entity.zombie_nautilus.eat");
Sound ENTITY_ZOMBIE_NAUTILUS_HURT = getSound("entity.zombie_nautilus.hurt");
Sound ENTITY_ZOMBIE_NAUTILUS_HURT_LAND = getSound("entity.zombie_nautilus.hurt_land");
Sound ENTITY_ZOMBIE_NAUTILUS_SWIM = getSound("entity.zombie_nautilus.swim");
Sound ENTITY_ZOMBIE_VILLAGER_AMBIENT = getSound("entity.zombie_villager.ambient");
Sound ENTITY_ZOMBIE_VILLAGER_CONVERTED = getSound("entity.zombie_villager.converted");
@@ -3249,12 +3357,16 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ITEM_ARMOR_EQUIP_LEATHER = getSound("item.armor.equip_leather");
Sound ITEM_ARMOR_EQUIP_NAUTILUS = getSound("item.armor.equip_nautilus");
Sound ITEM_ARMOR_EQUIP_NETHERITE = getSound("item.armor.equip_netherite");
Sound ITEM_ARMOR_EQUIP_TURTLE = getSound("item.armor.equip_turtle");
Sound ITEM_ARMOR_EQUIP_WOLF = getSound("item.armor.equip_wolf");
Sound ITEM_ARMOR_UNEQUIP_NAUTILUS = getSound("item.armor.unequip_nautilus");
Sound ITEM_ARMOR_UNEQUIP_WOLF = getSound("item.armor.unequip_wolf");
Sound ITEM_AXE_SCRAPE = getSound("item.axe.scrape");
@@ -3389,6 +3501,10 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ITEM_MACE_SMASH_GROUND_HEAVY = getSound("item.mace.smash_ground_heavy");
Sound ITEM_NAUTILUS_SADDLE_EQUIP = getSound("item.nautilus_saddle_equip");
Sound ITEM_NAUTILUS_SADDLE_UNDERWATER_EQUIP = getSound("item.nautilus_saddle_underwater_equip");
Sound ITEM_NETHER_WART_PLANT = getSound("item.nether_wart.plant");
Sound ITEM_OMINOUS_BOTTLE_DISPOSE = getSound("item.ominous_bottle.dispose");
@@ -3403,6 +3519,24 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
Sound ITEM_SHOVEL_FLATTEN = getSound("item.shovel.flatten");
Sound ITEM_SPEAR_ATTACK = getSound("item.spear.attack");
Sound ITEM_SPEAR_HIT = getSound("item.spear.hit");
Sound ITEM_SPEAR_LUNGE_1 = getSound("item.spear.lunge_1");
Sound ITEM_SPEAR_LUNGE_2 = getSound("item.spear.lunge_2");
Sound ITEM_SPEAR_LUNGE_3 = getSound("item.spear.lunge_3");
Sound ITEM_SPEAR_USE = getSound("item.spear.use");
Sound ITEM_SPEAR_WOOD_ATTACK = getSound("item.spear_wood.attack");
Sound ITEM_SPEAR_WOOD_HIT = getSound("item.spear_wood.hit");
Sound ITEM_SPEAR_WOOD_USE = getSound("item.spear_wood.use");
Sound ITEM_SPYGLASS_STOP_USING = getSound("item.spyglass.stop_using");
Sound ITEM_SPYGLASS_USE = getSound("item.spyglass.use");
@@ -55,6 +55,7 @@ public enum Statistic implements Keyed {
LEAVE_GAME,
MINECART_ONE_CM,
MOB_KILLS,
NAUTILUS_ONE_CM,
OPEN_BARREL,
CHEST_OPENED,
ENDERCHEST_OPENED,
+27 -1
View File
@@ -84,6 +84,8 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> CAMPFIRES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("campfires"), Material.class);
Tag<Material> CAN_GLIDE_THROUGH = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("can_glide_through"), Material.class);
Tag<Material> CANDLE_CAKES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("candle_cakes"), Material.class);
Tag<Material> CANDLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("candles"), Material.class);
@@ -472,6 +474,8 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_CAMEL_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("camel_food"), Material.class);
Tag<Material> ITEMS_CAMEL_HUSK_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("camel_husk_food"), Material.class);
Tag<Material> ITEMS_CANDLES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("candles"), Material.class);
Tag<Material> ITEMS_CAT_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("cat_food"), Material.class);
@@ -562,15 +566,19 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_ENCHANTABLE_LEG_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/leg_armor"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_LUNGE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/lunge"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_MACE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/mace"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_MELEE_WEAPON = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/melee_weapon"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_MINING = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/mining"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_MINING_LOOT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/mining_loot"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_SHARP_WEAPON = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/sharp_weapon"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_SWORD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/sword"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_SWEEPING = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/sweeping"), Material.class);
Tag<Material> ITEMS_ENCHANTABLE_TRIDENT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/trident"), Material.class);
@@ -656,6 +664,12 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_MEAT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("meat"), Material.class);
Tag<Material> ITEMS_NAUTILUS_BUCKET_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("nautilus_bucket_food"), Material.class);
Tag<Material> ITEMS_NAUTILUS_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("nautilus_food"), Material.class);
Tag<Material> ITEMS_NAUTILUS_TAMING_ITEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("nautilus_taming_items"), Material.class);
Tag<Material> ITEMS_NETHERITE_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("netherite_tool_materials"), Material.class);
Tag<Material> ITEMS_NON_FLAMMABLE_WOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("non_flammable_wood"), Material.class);
@@ -746,6 +760,8 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_SOUL_FIRE_BASE_BLOCKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("soul_fire_base_blocks"), Material.class);
Tag<Material> ITEMS_SPEARS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("spears"), Material.class);
Tag<Material> ITEMS_SPRUCE_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("spruce_logs"), Material.class);
Tag<Material> ITEMS_STAIRS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("stairs"), Material.class);
@@ -810,6 +826,8 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<Material> ITEMS_WOOL_CARPETS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wool_carpets"), Material.class);
Tag<Material> ITEMS_ZOMBIE_HORSE_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("zombie_horse_food"), Material.class);
String REGISTRY_FLUIDS = "fluids";
Tag<Fluid> FLUIDS_LAVA = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("lava"), Fluid.class);
@@ -834,16 +852,22 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<EntityType> ENTITY_TYPES_BOAT = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("boat"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_BURN_IN_DAYLIGHT = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("burn_in_daylight"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_BREATHE_UNDER_WATER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_breathe_under_water"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_EQUIP_HARNESS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_equip_harness"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_EQUIP_SADDLE = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_equip_saddle"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_FLOAT_WHILE_RIDDEN = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_float_while_ridden"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_WEAR_HORSE_ARMOR = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_wear_horse_armor"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CAN_WEAR_NAUTILUS_ARMOR = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_wear_nautilus_armor"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CANDIDATE_FOR_IRON_GOLEM_GIFT = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("candidate_for_iron_golem_gift"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_CANNOT_BE_PUSHED_ONTO_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("cannot_be_pushed_onto_boats"), EntityType.class);
@@ -876,6 +900,8 @@ public interface Tag<T extends Keyed> extends Keyed {
Tag<EntityType> ENTITY_TYPES_INVERTED_HEALING_AND_HARM = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("inverted_healing_and_harm"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_NAUTILUS_HOSTILES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("nautilus_hostiles"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_NO_ANGER_FROM_WIND_CHARGE = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("no_anger_from_wind_charge"), EntityType.class);
Tag<EntityType> ENTITY_TYPES_NON_CONTROLLING_RIDER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("non_controlling_rider"), EntityType.class);
@@ -3,6 +3,7 @@ package org.bukkit;
import com.google.common.collect.Multimap;
import io.papermc.paper.entity.EntitySerializationFlag;
import io.papermc.paper.registry.RegistryKey;
import net.kyori.adventure.text.event.HoverEvent;
import org.bukkit.advancement.Advancement;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
@@ -384,4 +385,12 @@ public interface UnsafeValues {
@NotNull Map<String, Object> serializeStack(ItemStack itemStack);
@NotNull ItemStack deserializeStack(@NotNull Map<String, Object> args);
/**
* Deserializes a {@link HoverEvent.ShowItem} hover event value into an {@code ItemStack}.
*
* @param itemHover the hover to deserialize
* @return the deserialized {@code ItemStack}
*/
@NotNull ItemStack deserializeItemHover(HoverEvent.@NotNull ShowItem itemHover);
}
+24 -47
View File
@@ -43,6 +43,7 @@ import org.bukkit.util.BoundingBox;
import org.bukkit.util.RayTraceResult;
import org.bukkit.util.StructureSearchResult;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -1900,13 +1901,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* Performs a ray trace that checks for block collisions using the blocks'
* precise collision shapes.
* <p>
* If collisions with passable blocks are ignored, fluid collisions are
* ignored as well regardless of the fluid collision mode.
* <p>
* Portal blocks are only considered passable if the ray starts within
* them. Apart from that collisions with portal blocks will be considered
* even if collisions with passable blocks are otherwise ignored.
* <p>
* This may cause loading of chunks! Some implementations may impose
* artificial restrictions on the maximum distance.
*
@@ -1923,18 +1917,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
return this.rayTraceBlocks(start, direction, maxDistance, fluidCollisionMode, ignorePassableBlocks, null);
}
// Paper start
/**
* Performs a ray trace that checks for block collisions using the blocks'
* precise collision shapes.
* <p>
* If collisions with passable blocks are ignored, fluid collisions are
* ignored as well regardless of the fluid collision mode.
* <p>
* Portal blocks are only considered passable if the ray starts within
* them. Apart from that collisions with portal blocks will be considered
* even if collisions with passable blocks are otherwise ignored.
* <p>
* This may cause loading of chunks! Some implementations may impose
* artificial restrictions on the maximum distance.
*
@@ -1949,7 +1935,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return the ray trace hit result, or <code>null</code> if there is no hit
*/
@Nullable RayTraceResult rayTraceBlocks(io.papermc.paper.math.@NotNull Position start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, @Nullable Predicate<? super Block> canCollide);
// Paper end
/**
* Performs a ray trace that checks for both block and entity collisions.
@@ -1958,13 +1943,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* <code>raySize</code> parameter is only taken into account for entity
* collision checks.
* <p>
* If collisions with passable blocks are ignored, fluid collisions are
* ignored as well regardless of the fluid collision mode.
* <p>
* Portal blocks are only considered passable if the ray starts within them.
* Apart from that collisions with portal blocks will be considered even if
* collisions with passable blocks are otherwise ignored.
* <p>
* This may cause loading of chunks! Some implementations may impose
* artificial restrictions on the maximum distance.
*
@@ -1986,7 +1964,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
return this.rayTrace(start, direction, maxDistance, fluidCollisionMode, ignorePassableBlocks, raySize, filter, null);
}
// Paper start
/**
* Performs a ray trace that checks for both block and entity collisions.
* <p>
@@ -1994,13 +1971,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* <code>raySize</code> parameter is only taken into account for entity
* collision checks.
* <p>
* If collisions with passable blocks are ignored, fluid collisions are
* ignored as well regardless of the fluid collision mode.
* <p>
* Portal blocks are only considered passable if the ray starts within them.
* Apart from that collisions with portal blocks will be considered even if
* collisions with passable blocks are otherwise ignored.
* <p>
* This may cause loading of chunks! Some implementations may impose
* artificial restrictions on the maximum distance.
*
@@ -2020,7 +1990,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* entity, or <code>null</code> if there is no hit
*/
@Nullable RayTraceResult rayTrace(io.papermc.paper.math.@NotNull Position start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter, @Nullable Predicate<? super Block> canCollide);
// Paper end
/**
* Performs a ray trace that checks for collisions with the specified
@@ -2288,7 +2257,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* <p>
* Note that if a non-null {@code source} Entity is provided and {@code
* breakBlocks} is {@code true}, the value of {@code breakBlocks} will be
* ignored if {@link GameRule#MOB_GRIEFING} is {@code false} in the world
* ignored if {@link GameRules#MOB_GRIEFING} is {@code false} in the world
* in which the explosion occurs. In other words, the mob griefing gamerule
* will take priority over {@code breakBlocks} if explosions are not allowed.
*
@@ -2445,7 +2414,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* <p>
* Note that if a non-null {@code source} Entity is provided and {@code
* breakBlocks} is {@code true}, the value of {@code breakBlocks} will be
* ignored if {@link GameRule#MOB_GRIEFING} is {@code false} in the world
* ignored if {@link GameRules#MOB_GRIEFING} is {@code false} in the world
* in which the explosion occurs. In other words, the mob griefing gamerule
* will take priority over {@code breakBlocks} if explosions are not allowed.
*
@@ -2462,7 +2431,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* Gets the current PVP setting for this world.
*
* @return True if PVP is enabled
* @deprecated use {@link GameRule#PVP} instead
* @deprecated use {@link GameRules#PVP} instead
*/
@Deprecated(since = "1.21.9")
public boolean getPVP();
@@ -2471,7 +2440,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* Sets the PVP setting for this world.
*
* @param pvp True/False whether PVP should be Enabled.
* @deprecated use {@link GameRule#PVP} instead
* @deprecated use {@link GameRules#PVP} instead
*/
@Deprecated(since = "1.21.9")
public void setPVP(boolean pvp);
@@ -2675,11 +2644,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Sets the spawn flags for this.
* <p>Note that setting {@code false} for either only affects
* natural spawning. It doesn't affect spawn eggs, summon command, mobs
* spawned from structure generation, spawners, etc.</p>
*
* @param allowMonsters - if true, monsters are allowed to spawn in this
* world.
* world via natural spawning mechanisms.
* @param allowAnimals - if true, animals are allowed to spawn in this
* world.
* world via natural spawning mechanisms.
*/
public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals);
@@ -2793,23 +2765,26 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Gets if this world is natural.
*
* When false, compasses spin randomly, and using a bed to set the respawn
* point or sleep, is disabled. When true, nether portals can spawn
* zombified piglins.
* <p>
* When false, the moon is not visible and eyeblossoms do not open/close
*
* @return true if world is natural
* @deprecated replaced by the gameplay/eyeblossom_open and gameplay/creaking_active environment attributes
*/
@Deprecated(since = "1.21.11")
public boolean isNatural();
/**
* Gets if beds work in this world.
*
* A non-working bed will blow up when trying to sleep. {@link #isNatural()}
* defines if a bed can be used to set spawn point.
* <p>
* A non-working bed can blow up when trying to sleep, but that may
* not always be the case.
*
* @return true if beds work in this world
* @deprecated Due to 1.21.11 beds changes, a boolean no longer
* represents if they work. There is no replacement API yet
*/
@ApiStatus.Obsolete(since = "1.21.11")
public boolean isBedWorks();
/**
@@ -2859,7 +2834,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* </ul>
*
* @return true if this world has the above mechanics
* @deprecated as of 1.21.11, ultra warm is replaced by the WATER_EVAPORATES, FAST_LAVA, and DEFAULT_DRIPSTONE_PARTICLE environment attributes.
*/
@Deprecated(since = "1.21.11")
public boolean isUltraWarm();
/**
@@ -3786,7 +3763,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return String value of rule
* @deprecated use {@link #getGameRuleValue(GameRule)} instead
*/
@Deprecated(since = "1.13")
@Deprecated(since = "1.21.11", forRemoval = true)
@Contract("null -> null; !null -> !null")
@Nullable
public String getGameRuleValue(@Nullable String rule);
@@ -3804,7 +3781,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return True if rule was set
* @deprecated use {@link #setGameRule(GameRule, Object)} instead.
*/
@Deprecated(since = "1.13")
@Deprecated(since = "1.13", forRemoval = true)
public boolean setGameRuleValue(@NotNull String rule, @NotNull String value);
/**
@@ -1,8 +1,13 @@
package org.bukkit;
import com.google.common.base.Preconditions;
import io.papermc.paper.util.Tick;
import java.time.Duration;
import java.util.concurrent.TimeUnit;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Range;
public interface WorldBorder {
@@ -12,20 +17,19 @@ public interface WorldBorder {
* @return the associated world, or null if this world border is not associated
* with any specific world, such as those created via {@link Server#createWorldBorder()}
*/
@Nullable
public World getWorld();
@Nullable World getWorld();
/**
* Resets the border to default values.
*/
public void reset();
void reset();
/**
* Gets the current side length of the border.
*
* @return The current side length of the border.
*/
public double getSize();
double getSize();
/**
* Sets the border to a square region with the specified side length in blocks.
@@ -33,8 +37,21 @@ public interface WorldBorder {
* @param newSize The new size of the border.
*
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @see #changeSize(double, long)
*/
public void setSize(double newSize);
void setSize(double newSize);
/**
* Sets the border to a square region with the specified side length in blocks.
*
* @param newSize The new side length of the border.
* @param ticks The time in ticks in which the border grows or shrinks from the previous size to that being set.
*
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if ticks is out of range
* @see #setSize(double)
*/
void changeSize(double newSize, @Range(from = 0, to = Integer.MAX_VALUE) long ticks);
/**
* Sets the border to a square region with the specified side length in blocks.
@@ -42,9 +59,13 @@ public interface WorldBorder {
* @param newSize The new side length of the border.
* @param seconds The time in seconds in which the border grows or shrinks from the previous size to that being set.
*
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if seconds is out of range once converted in ticks
* @deprecated Use {@link #changeSize(double, long)} instead
*/
public void setSize(double newSize, long seconds);
@Deprecated(since = "1.21.11", forRemoval = true)
default void setSize(double newSize, long seconds) {
this.changeSize(Math.clamp(newSize, 1.0D, this.getMaxSize()), Tick.tick().fromDuration(Duration.ofSeconds(seconds)));
}
/**
* Sets the border to a square region with the specified side length in blocks.
@@ -53,17 +74,22 @@ public interface WorldBorder {
* @param unit The time unit.
* @param time The time in which the border grows or shrinks from the previous size to that being set.
*
* @throws IllegalArgumentException if unit is <code>null</code> or newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if newSize is less than 1.0D or greater than {@link #getMaxSize()}
* @throws IllegalArgumentException if time is out of range once converted in ticks
* @deprecated Use {@link #changeSize(double, long)} instead
*/
public void setSize(double newSize, @NotNull TimeUnit unit, long time);
@Deprecated(since = "1.21.11", forRemoval = true)
default void setSize(double newSize, @NotNull TimeUnit unit, @NonNegative long time) {
Preconditions.checkArgument(unit != null, "TimeUnit cannot be null.");
this.changeSize(newSize, Tick.tick().fromDuration(Duration.of(time, unit.toChronoUnit())));
}
/**
* Gets the current border center.
*
* @return The current border center.
*/
@NotNull
public Location getCenter();
@NotNull Location getCenter();
/**
* Sets the new border center.
@@ -73,7 +99,7 @@ public interface WorldBorder {
*
* @throws IllegalArgumentException if the absolute value of x or z is higher than {@link #getMaxCenterCoordinate()}
*/
public void setCenter(double x, double z);
void setCenter(double x, double z);
/**
* Sets the new border center.
@@ -82,63 +108,87 @@ public interface WorldBorder {
*
* @throws IllegalArgumentException if location is <code>null</code> or the absolute value of {@link Location#getX()} or {@link Location#getZ()} is higher than {@link #getMaxCenterCoordinate()}
*/
public void setCenter(@NotNull Location location);
void setCenter(@NotNull Location location);
/**
* Gets the current border damage buffer.
*
* @return The current border damage buffer.
*/
public double getDamageBuffer();
double getDamageBuffer();
/**
* Sets the amount of blocks a player may safely be outside the border before taking damage.
*
* @param blocks The amount of blocks. (The default is 5 blocks.)
*/
public void setDamageBuffer(double blocks);
void setDamageBuffer(double blocks);
/**
* Gets the current border damage amount.
*
* @return The current border damage amount.
*/
public double getDamageAmount();
double getDamageAmount();
/**
* Sets the amount of damage a player takes when outside the border plus the border buffer.
*
* @param damage The amount of damage. (The default is 0.2 damage per second per block.)
*/
public void setDamageAmount(double damage);
void setDamageAmount(double damage);
/**
* Gets the current border warning time in seconds.
*
* @return The current border warning time in seconds.
* @deprecated Use {@link #getWarningTimeTicks()} instead
*/
public int getWarningTime();
@Deprecated(since = "1.21.11", forRemoval = true)
default @NonNegative int getWarningTime() {
return (int) Tick.of(this.getWarningTimeTicks()).toSeconds();
}
/**
* Sets the warning time that causes the screen to be tinted red when a contracting border will reach the player within the specified time.
*
* @param seconds The amount of time in seconds. (The default is 15 seconds.)
* @param seconds The amount of time in seconds.
* @deprecated Use {@link #setWarningTimeTicks(int)} instead
*/
public void setWarningTime(int seconds);
@Deprecated(since = "1.21.11", forRemoval = true)
default void setWarningTime(@NonNegative int seconds) {
Preconditions.checkArgument(seconds >= 0, "seconds cannot be lower than 0");
this.setWarningTimeTicks(Tick.tick().fromDuration(Duration.ofSeconds(seconds)));
}
/**
* Gets the current border warning time in ticks.
*
* @return The current border warning time in ticks.
*/
@NonNegative int getWarningTimeTicks();
/**
* Sets the warning time that causes the screen to be tinted red when a contracting border will reach the player within the specified time.
*
* @param ticks The number of ticks.
*/
void setWarningTimeTicks(@NonNegative int ticks);
/**
* Gets the current border warning distance.
*
* @return The current border warning distance.
*/
public int getWarningDistance();
int getWarningDistance();
/**
* Sets the warning distance that causes the screen to be tinted red when the player is within the specified number of blocks from the border.
*
* @param distance The distance in blocks. (The default is 5 blocks.)
*/
public void setWarningDistance(int distance);
void setWarningDistance(int distance);
/**
* Check if the specified location is inside this border.
@@ -146,14 +196,14 @@ public interface WorldBorder {
* @param location the location to check
* @return if this location is inside the border or not
*/
public boolean isInside(@NotNull Location location);
boolean isInside(@NotNull Location location);
/**
* Gets the maximum possible size of a WorldBorder.
*
* @return The maximum size the WorldBorder
*/
public double getMaxSize();
double getMaxSize();
/**
* Gets the absolute value of the maximum x/z center coordinate of a
@@ -161,5 +211,5 @@ public interface WorldBorder {
*
* @return The absolute maximum center coordinate of the WorldBorder
*/
public double getMaxCenterCoordinate();
double getMaxCenterCoordinate();
}
@@ -483,9 +483,7 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
*/
boolean isBurnable();
/**
* Check if this block is replaceable
* <p>
* Determined by Minecraft, representing a block that is not AIR that you can still place a new block at, such as flowers.
* Checks if this block can be immediately replaced by another block, such as placing a new block in air or tall grass.
* @return true if block is replaceable
*/
boolean isReplaceable();
@@ -28,7 +28,7 @@ public interface Crafter extends Container, com.destroystokyo.paper.loottable.Lo
* have items placed in it.
*
* @param slot slot index
* @return disabled status
* @return whether the slot is disabled
*/
boolean isSlotDisabled(int slot);
@@ -37,7 +37,7 @@ public interface Crafter extends Container, com.destroystokyo.paper.loottable.Lo
* have items placed in it.
*
* @param slot slot index
* @param disabled disabled status
* @param disabled whether the slot should be disabled
*/
void setSlotDisabled(int slot, boolean disabled);
@@ -64,6 +64,14 @@ public interface DecoratedPot extends io.papermc.paper.block.TileStateInventoryH
@NotNull
public DecoratedPotInventory getSnapshotInventory();
/**
* Run the specified animation on the decorated pot.
*
* @param style the animation style
* @throws IllegalStateException if this block state is not placed
*/
public void startWobble(@NotNull WobbleStyle style);
/**
* A side on a decorated pot. Sides are relative to the facing state of a
* {@link org.bukkit.block.data.type.DecoratedPot}.
@@ -74,4 +82,12 @@ public interface DecoratedPot extends io.papermc.paper.block.TileStateInventoryH
RIGHT,
FRONT
}
/**
* Style a DecoratedPot can wobble in.
*/
public static enum WobbleStyle {
POSITIVE,
NEGATIVE
}
}
@@ -317,4 +317,10 @@ public interface BlockData extends Cloneable {
*/
boolean isRandomlyTicked();
// Paper end - Tick API
/**
* Checks if this block can be immediately replaced by another block, such as placing a new block in air or tall grass.
* @return true if block is replaceable
*/
boolean isReplaceable();
}
@@ -7,7 +7,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.GameRule;
import org.bukkit.GameRules;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.entity.Player;
@@ -477,14 +477,14 @@ public abstract class Command {
if (source instanceof BlockCommandSender) {
BlockCommandSender blockCommandSender = (BlockCommandSender) source;
if (!blockCommandSender.getBlock().getWorld().getGameRuleValue(GameRule.COMMAND_BLOCK_OUTPUT)) {
if (!blockCommandSender.getBlock().getWorld().getGameRuleValue(GameRules.COMMAND_BLOCK_OUTPUT)) {
Bukkit.getConsoleSender().sendMessage(result);
return;
}
} else if (source instanceof CommandMinecart) {
CommandMinecart commandMinecart = (CommandMinecart) source;
if (!commandMinecart.getWorld().getGameRuleValue(GameRule.COMMAND_BLOCK_OUTPUT)) {
if (!commandMinecart.getWorld().getGameRuleValue(GameRules.COMMAND_BLOCK_OUTPUT)) {
Bukkit.getConsoleSender().sendMessage(result);
return;
}
@@ -93,6 +93,8 @@ public interface DamageType extends Keyed, Translatable {
DamageType SONIC_BOOM = getDamageType("sonic_boom");
DamageType SPEAR = getDamageType("spear");
DamageType SPIT = getDamageType("spit");
DamageType STALAGMITE = getDamageType("stalagmite");
@@ -229,6 +229,11 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
*/
public static final Enchantment SWIFT_SNEAK = getEnchantment("swift_sneak");
/**
* Causes a jab attack from a spear to propel the user into the air
*/
public static final Enchantment LUNGE = getEnchantment("lunge");
@NotNull
private static Enchantment getEnchantment(@NotNull String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.ENCHANTMENT).getOrThrow(NamespacedKey.minecraft(key));
@@ -82,12 +82,12 @@ public enum EnchantmentTarget {
},
/**
* Allows the Enchantment to be placed on weapons (swords)
* Allows the Enchantment to be placed on weapons (swords, spears)
*/
WEAPON {
@Override
public boolean includes(@NotNull Material item) {
return Tag.ITEMS_ENCHANTABLE_SWORD.isTagged(item);
return Tag.ITEMS_ENCHANTABLE_MELEE_WEAPON.isTagged(item);
}
},
@@ -0,0 +1,12 @@
package org.bukkit.entity;
import org.bukkit.inventory.ArmoredSaddledMountInventory;
import org.bukkit.inventory.InventoryHolder;
import org.jspecify.annotations.NullMarked;
@NullMarked
public interface AbstractNautilus extends Tameable, InventoryHolder, Vehicle {
@Override
ArmoredSaddledMountInventory getInventory();
}
@@ -24,7 +24,12 @@ public interface AbstractVillager extends Breedable, NPC, InventoryHolder, Merch
// Paper start
/**
* Reset this villager's trade offers
* Reset this villager's trade offers.
* <br>
* For {@link org.bukkit.entity.Villager Villagers}, only two trades are
* created, rather than the number of trades expected for the villager's
* level. You should use {@link org.bukkit.entity.Villager#addTrades(int)}
* to add the remaining trades.
*/
public void resetOffers();
// Paper end
@@ -0,0 +1,8 @@
package org.bukkit.entity;
/**
* Represents a Camel Husk.
*/
public interface CamelHusk extends Camel {
}
@@ -138,6 +138,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
// Paper start - Teleport API
/**
* Teleports this entity to the given location.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
*
* @param location New location to teleport this entity to
* @param teleportFlags Flags to be used in this teleportation
@@ -149,6 +154,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
/**
* Teleports this entity to the given location.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
*
* @param location New location to teleport this entity to
* @param cause The cause of this teleportation
@@ -179,8 +189,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
// Paper end - Teleport API
/**
* Teleports this entity to the given location. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
* Teleports this entity to the given location.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
*
* @param location New location to teleport this entity to
* @return <code>true</code> if the teleport was successful
@@ -188,8 +202,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
public boolean teleport(@NotNull Location location);
/**
* Teleports this entity to the given location. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
* Teleports this entity to the given location.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
*
* @param location New location to teleport this entity to
* @param cause The cause of this teleportation
@@ -198,8 +216,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
public boolean teleport(@NotNull Location location, @NotNull TeleportCause cause);
/**
* Teleports this entity to the target Entity. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
* Teleports this entity to the target Entity.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
*
* @param destination Entity to teleport this entity to
* @return <code>true</code> if the teleport was successful
@@ -207,8 +229,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
public boolean teleport(@NotNull Entity destination);
/**
* Teleports this entity to the target Entity. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
* Teleports this entity to the target Entity.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause this to return false. This behavior may
* change in future versions.
*
* @param destination Entity to teleport this entity to
* @param cause The cause of this teleportation
@@ -219,6 +245,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
// Paper start
/**
* Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause the future to return false. This behavior may
* change in future versions.
*
* @param loc Location to teleport to
* @return A future that will be completed with the result of the teleport
*/
@@ -228,6 +260,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
/**
* Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause the future to return false. This behavior may
* change in future versions.
*
* @param loc Location to teleport to
* @param cause Reason for teleport
* @return A future that will be completed with the result of the teleport
@@ -241,9 +279,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
/**
* Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause the future to return false. This behavior may
* change in future versions.
*
* @param loc Location to teleport to
* @param teleportFlags Flags to be used in this teleportation
* @return A future that will be completed with the result of the teleport
*/
default java.util.concurrent.@NotNull CompletableFuture<Boolean> teleportAsync(@NotNull Location loc, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull... teleportFlags) {
return this.teleportAsync(loc, TeleportCause.PLUGIN, teleportFlags);
}
/**
* Loads/Generates(in 1.13+) the Chunk asynchronously, and then teleports the entity when the chunk is ready.
* <p>
* Note: This uses default in game behavior for teleportation, especially in regard to handling
* passengers and vehicles across dimensions. It should be noted at this moment, teleporting a {@link Player}
* with passengers across dimensions is not supported and will cause the future to return false. This behavior may
* change in future versions.
*
* @param loc Location to teleport to
* @param cause Reason for teleport
* @param teleportFlags Flags to be used in this teleportation
*
* @return A future that will be completed with the result of the teleport
*/
java.util.concurrent.@NotNull CompletableFuture<Boolean> teleportAsync(@NotNull Location loc, @NotNull TeleportCause cause, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull... teleportFlags);
@@ -66,6 +66,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
BREEZE("breeze", Breeze.class, -1),
BREEZE_WIND_CHARGE("breeze_wind_charge", BreezeWindCharge.class, -1),
CAMEL("camel", Camel.class, -1),
CAMEL_HUSK("camel_husk", CamelHusk.class, -1),
CAT("cat", Cat.class, -1),
CAVE_SPIDER("cave_spider", CaveSpider.class, 59),
CHERRY_BOAT("cherry_boat", CherryBoat.class, -1),
@@ -135,6 +136,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
MINECART("minecart", RideableMinecart.class, 42),
MOOSHROOM("mooshroom", MushroomCow.class, 96),
MULE("mule", Mule.class, 32),
NAUTILUS("nautilus", Nautilus.class, -1),
OAK_BOAT("oak_boat", OakBoat.class, -1),
OAK_CHEST_BOAT("oak_chest_boat", OakChestBoat.class, -1),
OCELOT("ocelot", Ocelot.class, 98),
@@ -143,6 +145,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
PALE_OAK_BOAT("pale_oak_boat", PaleOakBoat.class, -1),
PALE_OAK_CHEST_BOAT("pale_oak_chest_boat", PaleOakChestBoat.class, -1),
PANDA("panda", Panda.class, -1),
PARCHED("parched", Parched.class, -1),
PARROT("parrot", Parrot.class, 105),
PHANTOM("phantom", Phantom.class, -1),
PIG("pig", Pig.class, 90),
@@ -197,6 +200,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
ZOGLIN("zoglin", Zoglin.class, -1),
ZOMBIE("zombie", Zombie.class, 54),
ZOMBIE_HORSE("zombie_horse", ZombieHorse.class, 29),
ZOMBIE_NAUTILUS("zombie_nautilus", ZombieNautilus.class, -1),
ZOMBIE_VILLAGER("zombie_villager", ZombieVillager.class, 27),
ZOMBIFIED_PIGLIN("zombified_piglin", PigZombie.class, 57),
// End generate - EntityType
@@ -5,9 +5,13 @@ import java.util.List;
import java.util.Set;
import java.util.UUID;
import io.papermc.paper.world.damagesource.CombatTracker;
import io.papermc.paper.world.damagesource.FallLocationType;
import net.kyori.adventure.key.Key;
import org.bukkit.Color;
import org.bukkit.FluidCollisionMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.attribute.Attributable;
@@ -1494,4 +1498,44 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@ApiStatus.Experimental
@NotNull CombatTracker getCombatTracker();
/**
* Sets the visual style of the waypoint icon using the specified {@link Key}.
* <p>
* Minecraft has the keys "minecraft:bowtie" and "minecraft:default" built in.
*
* @param key the key representing the style, or {@code null} to use the default style
* @see <a href="https://minecraft.wiki/w/Waypoint_style">https://minecraft.wiki/w/Waypoint_style</a>
*/
void setWaypointStyle(@Nullable Key key);
/**
* Sets the color of the waypoint icon.
*
* @param color the new color to apply to the waypoint icon, or {@code null} to use the default color.
* While the color may contain alpha values, the client does not receive them.
* @see <a href="https://minecraft.wiki/w/Locator_Bar#Usage">https://minecraft.wiki/w/Locator_Bar#Usage</a>
*/
void setWaypointColor(@Nullable Color color);
/**
* Gets the current visual style of the waypoint icon.
*
* @return the {@link Key} representing the icon's style
* @see #setWaypointStyle(Key)
* @see <a href="https://minecraft.wiki/w/Waypoint_style">https://minecraft.wiki/w/Waypoint_style</a>
*/
@NotNull
Key getWaypointStyle();
/**
* Gets the current color of the waypoint icon, if any.
*
* @return the icon's color, or {@code null} if the default color is used.
* While the color may contain alpha values, the client does not receive them.
* @see #setWaypointColor(Color)
* @see <a href="https://minecraft.wiki/w/Locator_Bar#Usage">https://minecraft.wiki/w/Locator_Bar#Usage</a>
*/
@Nullable
Color getWaypointColor();
}
@@ -3,6 +3,7 @@ package org.bukkit.entity;
import com.destroystokyo.paper.SkinParts;
import io.papermc.paper.InternalAPIBridge;
import io.papermc.paper.datacomponent.item.ResolvableProfile;
import java.util.Set;
import net.kyori.adventure.text.Component;
import org.bukkit.inventory.EntityEquipment;
import org.bukkit.inventory.MainHand;
@@ -12,6 +13,15 @@ import org.jspecify.annotations.Nullable;
@NullMarked
public interface Mannequin extends LivingEntity {
/**
* Returns the valid poses for a mannequin.
*
* @return the valid poses
*/
static Set<Pose> validPoses() {
return InternalAPIBridge.get().validMannequinPoses();
}
/**
* Returns the default mannequin profile.
*
@@ -1,6 +1,6 @@
package org.bukkit.entity;
import org.bukkit.GameRule;
import org.bukkit.GameRules;
import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
import org.bukkit.material.MaterialData;
@@ -37,7 +37,7 @@ public interface Minecart extends Vehicle, io.papermc.paper.entity.Frictional {
/**
* Sets the maximum speed of a minecart. Must be nonnegative. Default is
* 0.4D or {@link GameRule#MINECART_MAX_SPEED}.
* 0.4D or {@link GameRules#MAX_MINECART_SPEED}.
*
* @param speed The max speed
*/
@@ -0,0 +1,7 @@
package org.bukkit.entity;
import org.jspecify.annotations.NullMarked;
@NullMarked
public interface Nautilus extends AbstractNautilus {
}
@@ -0,0 +1,8 @@
package org.bukkit.entity;
/**
* Represents a parched Skeleton.
*/
public interface Parched extends AbstractSkeleton {
}
@@ -3490,11 +3490,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void updateCommands();
/**
* Open a {@link Material#WRITTEN_BOOK} for a Player
* Open an ItemStack with {@link io.papermc.paper.datacomponent.DataComponentTypes#WRITTEN_BOOK_CONTENT} for a Player
*
* @param book The book to open for this player
* @param book the item with written book content to open for this player
* @throws IllegalArgumentException if the ItemStack is null, empty or doesn't have a {@link io.papermc.paper.datacomponent.DataComponentTypes#WRITTEN_BOOK_CONTENT}
*/
public void openBook(ItemStack book);
void openBook(ItemStack book);
/**
* Open a Sign for editing by the Player.
@@ -74,6 +74,10 @@ public interface Skeleton extends AbstractSkeleton {
/**
* Bogged skeleton.
*/
BOGGED;
BOGGED,
/**
* Parched skeleton.
*/
PARCHED;
}
}
@@ -0,0 +1,41 @@
package org.bukkit.entity;
import io.papermc.paper.registry.RegistryAccess;
import io.papermc.paper.registry.RegistryKey;
import org.bukkit.Keyed;
import org.bukkit.NamespacedKey;
import org.jspecify.annotations.NullMarked;
@NullMarked
public interface ZombieNautilus extends AbstractNautilus {
/**
* Gets the variant of this zombie nautilus.
*
* @return the variant
*/
Variant getVariant();
/**
* Sets the variant of this zombie nautilus.
*
* @param variant the variant
*/
void setVariant(Variant variant);
/**
* Represents the variant of a Zombie Nautilus.
*/
interface Variant extends Keyed {
// Start generate - ZombieNautilusVariant
Variant TEMPERATE = getVariant("temperate");
Variant WARM = getVariant("warm");
// End generate - ZombieNautilusVariant
private static Variant getVariant(String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.ZOMBIE_NAUTILUS_VARIANT).getOrThrow(NamespacedKey.minecraft(key));
}
}
}
@@ -57,8 +57,12 @@ public final class MemoryKey<T> implements Keyed {
public static final MemoryKey<Boolean> ATTACK_COOLING_DOWN = new MemoryKey<>(NamespacedKey.minecraft("attack_cooling_down"), Boolean.class);
public static final MemoryKey<Integer> ATTACK_TARGET_COOLDOWN = new MemoryKey<>(NamespacedKey.minecraft("attack_target_cooldown"), Integer.class);
public static final MemoryKey<Long> CANT_REACH_WALK_TARGET_SINCE = new MemoryKey<>(NamespacedKey.minecraft("cant_reach_walk_target_since"), Long.class);
public static final MemoryKey<Integer> CHARGE_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("charge_cooldown_ticks"), Integer.class);
public static final MemoryKey<Boolean> DANCING = new MemoryKey<>(NamespacedKey.minecraft("dancing"), Boolean.class);
public static final MemoryKey<Boolean> DANGER_DETECTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("danger_detected_recently"), Boolean.class);
@@ -117,6 +121,10 @@ public final class MemoryKey<T> implements Keyed {
public static final MemoryKey<Boolean> SNIFFER_HAPPY = new MemoryKey<>(NamespacedKey.minecraft("sniffer_happy"), Boolean.class);
public static final MemoryKey<Integer> SPEAR_ENGAGE_TIME = new MemoryKey<>(NamespacedKey.minecraft("spear_engage_time"), Integer.class);
public static final MemoryKey<Integer> SPEAR_FLEEING_TIME = new MemoryKey<>(NamespacedKey.minecraft("spear_fleeing_time"), Integer.class);
public static final MemoryKey<Integer> TEMPTATION_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("temptation_cooldown_ticks"), Integer.class);
public static final MemoryKey<Integer> TIME_TRYING_TO_REACH_ADMIRE_ITEM = new MemoryKey<>(NamespacedKey.minecraft("time_trying_to_reach_admire_item"), Integer.class);
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.NotNull;
* an air block. {@link #getExplodedBlockState()} should be used to get
* information about the block state that exploded.
* <p>
* The event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
* The event isn't called if the {@link org.bukkit.GameRules#MOB_GRIEFING}
* is disabled as no block interaction will occur.
*/
public class BlockExplodeEvent extends BlockEvent implements Cancellable {
@@ -12,7 +12,7 @@ import java.util.Collections;
import java.util.List;
/**
* Event fired when a dispenser shears a nearby sheep.
* Event fired when a dispenser shears a nearby entity.
*/
public class BlockShearEntityEvent extends BlockEvent implements Cancellable {
@@ -43,9 +43,9 @@ public class BlockShearEntityEvent extends BlockEvent implements Cancellable {
}
/**
* Gets the item used to shear this sheep.
* Gets the item used to shear this entity.
*
* @return the item used to shear this sheep.
* @return the item used to shear this entity.
*/
@NotNull
public ItemStack getTool() {
@@ -226,6 +226,12 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
* {@link org.bukkit.potion.PotionType#OOZING}, {@link org.bukkit.potion.PotionType#INFESTED}
*/
POTION_EFFECT,
/**
* When a Copper Golem Statue turns back into a Copper Golem
*
* @apiNote Canceling a {@link CreatureSpawnEvent} with this reason does not prevent the statue block from being removed, use {@link EntityChangeBlockEvent} to account for all side effects
*/
REANIMATE,
/**
* When a creature is spawned by being rehydrated
*/
@@ -476,7 +476,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
CAMPFIRE,
/**
* Damage caused when an entity is colliding with too many entities due
* to the {@link org.bukkit.GameRule#MAX_ENTITY_CRAMMING}.
* to the {@link org.bukkit.GameRules#MAX_ENTITY_CRAMMING}.
* <p>
* Damage: 6
*/
Loaded 100 of 1199 files, more files were not shown because too many files have changed in this diff. Show more