Compare commits

...
2884 Commits
Author SHA1 Message Date
Nassim Jahnke d5bfc2fa22 Warn about this branch being deleted soon 2024-12-22 23:49:54 +01:00
Bjarne Koll bb76819589 Pass correct damage to EntityDamageItemEvent (#11744) 2024-12-15 10:36:10 +01:00
brickmonster b746d9df0b Add missing UPDATE_HAT and UPDATE_LIST_ORDER to some paper-added functions in ClientboundPlayerInfoUpdatePacket (#11731) 2024-12-11 22:17:33 +01:00
96DarkCode96 4803421326 Fix Player.setPlayerListOrder to send update to clients (#11729) 2024-12-11 19:29:51 +01:00
Nassim Jahnke 8dc76e7152 [ci skip] Move back more 2024-12-11 12:13:51 +01:00
Vaan1310 c17ef64339 Fix/scoreboard delegate (#11453) 2024-12-08 17:37:39 -05:00
Kobe ⑧ 15b2aa1d30 Readd shear methods from bukkit Shearable (#11715)
* Re-add shear methods from bukkit Shearable

* Add back
2024-12-08 17:05:17 -05:00
Rick 07ef2bbab9 Fix incorrect command serialization by creating new Command (#11671)
Fixes #11649 - As noted in the issue, when CommandNodes are serialized
they are used as the key in a Map. Their equals()/hashcode() should only    match if they are equal nodes (name & command), but due to the erasure of the command field pre-serialization, nodes with different commands can be mapped onto the same value. This causes the client to interpret both nodes as the same, causing suggestions where they should not.

This is fixed by creating a different no-op command for the
erasure, instead of them holding the same lambda.
2024-12-08 16:43:09 -05:00
Newwind fabd859878 Add command block material tags (#11720) 2024-12-08 22:40:02 +01:00
Marc Baloup bdfa1f6864 Brigadier: fix simpleUnwrap not keeping redirect modifier and forks properties from original node (#11654) 2024-12-08 16:23:55 -05:00
Jake PotrebicandBjarne Koll dae475b636 Switch Impl types to Holderable (#11662)
* Switch Impl types to Holderable

* Fix compile issues

* more improvements

* compile fixes

* remove unneeded unwrapAndConvertHolder call

---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-12-08 12:50:55 -08:00
Jake Potrebic 71a367ec84 Update getKey impls for inlineable types 2024-12-07 22:08:31 -08:00
Nassim Jahnke 5403894bd4 Add ItemMeta customName methods (#11685) 2024-12-07 20:05:14 +01:00
Jason Penilla d4630f1223 Fix broken joml metadata resulting in kotlin being included on compile/runtime classpath (#11712) 2024-12-05 15:10:10 -07:00
Nassim Jahnke 346b9b8d2d Fixup PlayerPickItemEvent docs more 2024-12-05 18:50:00 +01:00
Lulu13022002 77afb9aa78 Add new bundle animation (#11708) 2024-12-05 18:29:24 +01:00
Nassim Jahnke 4c39ea20c4 More moving around of hunks 2024-12-05 14:44:50 +01:00
Nassim Jahnke e4e24f3335 Move around patches again 2024-12-05 12:20:56 +01:00
Jake Potrebic c54c062e6f Port exact choice improvements (#11705) 2024-12-05 10:51:01 +01:00
Nassim Jahnke ae060b31f0 Finish PlayerPickItemEvent 2024-12-05 10:27:55 +01:00
Lulu13022002 bb4fb5334e call EntityInsideBlockEvent for eyeblossom 2024-12-04 21:49:46 +01:00
Lulu13022002 4806ce5cd5 properly override push/knockback methods
This prevent the creaking from being pushed with knockback
enchant when it can't move
2024-12-04 21:05:57 +01:00
Lulu13022002 2a4ba00d9f add missing effect cause, for bee being poisoned 2024-12-04 20:24:11 +01:00
Lulu13022002 e73d39671d fix asset id 2024-12-04 20:01:17 +01:00
Lulu13022002 2206b9a5f2 fix components 2024-12-04 19:39:35 +01:00
Lulu13022002 b0d7153f50 fix item meta 2024-12-04 18:47:33 +01:00
Jason Penilla 1cc86be2b8 Update setup-gradle action
setup-gradle v4 validates the wrapper
2024-12-04 10:33:50 -07:00
Spottedleaf 416a733048 Apply coordinate offset only to VoxelShape
VoxelShape coordiantes generally are an integer + a sum of powers of
two between [-1, -3]. Most offsets are generally an integer. As
a result, applying an offset to the coordinates generally results
in an error of 0. However, coordinate inputs do not follow such
trends. Thus, when applying an offset to the coordinate input,
there may be some floating point error.

By applying the offset to the VoxelShape coordinates, we can
eliminate additional floating point error.

This change also fixes the inconsistency when using
the single AABB, as input coordinates were not offset
when using the single AABB as the single AABB is already
offset.

Fixes https://github.com/Tuinity/Moonrise/issues/81
This specific issue is caused by floating point error resulting
in the falling anvil's y position becoming around -8E-17 when it
should be 0.
While this is still very comfortably in the collision
epsilon (1.0E-7), this results in the falling anvil's y block
position to become -1 (as the block position is simply
the floor of the coordinate).
2024-12-04 02:52:58 -08:00
Nassim Jahnke 747cac4f91 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
c294e05d7 SPIGOT-7975: Fix issue with Pale Sapling growing
c9f5a8fdf SPIGOT-7974: Fix Crash for Creaking Heart Block particle
2024-12-04 11:11:12 +01:00
Nassim Jahnke d0645d92b0 Update readme, set updatingMinecraft to false 2024-12-04 11:05:07 +01:00
Owen1212055 3b35456b3f Implement assetid 2024-12-04 00:33:47 -05:00
Owen1212055 7e601ad916 Implement new CustomModelData 2024-12-04 00:26:31 -05:00
Jason Penilla cbd578c7b5 Fix api build script deprecation 2024-12-03 20:50:18 -07:00
Jason Penilla e5bf173f6a Always fork jvm for compile, even when using the Gradle runtime jvm
Fixes spurious build failures from OOM
2024-12-03 20:42:36 -07:00
Jason Penilla ef0670c2b7 Update paperweight and Gradle wrapper 2024-12-03 20:28:39 -07:00
Jason Penilla 5a362b8759 Use ConcurrentUtil from Paper repo 2024-12-03 20:04:41 -07:00
Jason Penilla 65633e373c Update Moonrise 2024-12-03 15:26:43 -07:00
Jason Penilla 7045b2ad2d Update DataConverter 2024-12-03 15:21:36 -07:00
Nassim Jahnke e2dd1d514c Add back post_teleport chunk ticket 2024-12-03 22:56:26 +01:00
Nassim Jahnke b0603dab45 Fix jd gson version, move back mc util diff 2024-12-03 22:37:48 +01:00
Nassim Jahnke 6c35392880 Tests succeed (by removing one) 2024-12-03 22:20:30 +01:00
Nassim Jahnke b8aeecb520 Compilation fixes 2024-12-03 22:06:05 +01:00
Jason Penilla 71a4ef8d06 Set java launcher for api generate task 2024-12-03 13:34:44 -07:00
Nassim Jahnke f863bb71b0 Update generated classes 2024-12-03 21:32:40 +01:00
Nassim Jahnke d7d2f88893 Apply remaining patches, fix API 2024-12-03 21:24:17 +01:00
Nassim Jahnke dc74c6f19e moonrise 2024-12-03 21:11:09 +01:00
Nassim Jahnke 2331dad0a0 Even more work 2024-12-03 21:03:25 +01:00
Nassim Jahnke 4601dc901b Some fixes, start updating CustomModelData API 2024-12-03 20:58:25 +01:00
Nassim Jahnke 5265287323 More more more more work 2024-12-03 20:46:25 +01:00
Nassim Jahnke bd55e322d8 More more more work 2024-12-03 20:00:08 +01:00
Nassim Jahnke c60e47fa58 More more work 2024-12-03 19:28:24 +01:00
Nassim Jahnke ab9a3db5ba More work 2024-12-03 19:05:31 +01:00
Nassim Jahnke 172c7dc7e7 Work 2024-12-03 18:32:16 +01:00
Nassim Jahnke c0a3d51ab3 Start update, apply API patches 2024-12-03 17:58:41 +01:00
Bjarne Koll da7138233f Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11702)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
ed0ec489 SPIGOT-7965: Unknown TransformReason for Hoglins
9db03457 SPIGOT-7964: Fix typo in Deprecation annotation
d14119af PR-1082: Add "since" to Deprecation annotations
e8a318d4 PR-1067: Add method to get Advancement requirements

CraftBukkit Changes:
40dd796db SPIGOT-7971: NotSerializableException on serialize CraftUseCooldownComponent
fa85c5e0a SPIGOT-7968: ProjectileHitEvent not trigerred when arrow hits entity
b75b792ec SPIGOT-7970: World#getMaxHeight() returning incorrect value
2b9a094bb SPIGOT-7965: Unknown TransformReason for Hoglins
fd3f5a380 SPIGOT-7966: Some trees do not generate with #generateTree
f2822317c PR-1515: Add a Class reader and Class node argument provider
07abf6852 PR-1514: Add a test case for ClassTraverser
a7577cb24 Fix Inventory#addItem not respecting max stack size
066a74e74 PR-1490: Add method to get Advancement requirements
4a1df30e4 PR-1512: Test Art class based on specific values instead of the implementation, to better catch implementation changes
53254c56f PR-1503: Simplify CAS loop to getAndSet
e9447dc5e Make BlockDataMeta#setBlockData hide unspecified states
dd08a7120 SPIGOT-7960: Fix inconsistency between natural item drop coordinates
e9e8ed753 SPIGOT-7960: Improve natural item drop methods

Spigot Changes:
60c9969b Rebuild patches
2024-12-03 15:47:48 +01:00
Spottedleaf c2294d7067 Fix several off-by-one errors in view distance calculations
1. For NearbyPlayers, we need to be using the view distance, and
   not the load distance (which is +1 of the view distance).
2. Correctly clamp tick distance to view distance. Since
   load distance is +1 of view distance, we need to subtract
   one from the load distance when clamping.

Additionally, add checks inside ViewDistances to ensure that
the inputs are in range to catch future errors.

Also, clamp simulation distance, as values < 0 or above
MAX_VIEW_DISTANCE do not make sense to configure.
2024-12-01 15:43:56 -08:00
Spottedleaf ae80a251fc Properly handle large values of spawnChunkRadius
The chunk system does not allow ticket levels below 0, so we need
to add tickets for each individual chunk instead.
2024-12-01 14:07:46 -08:00
Spottedleaf 4bc80b8a44 Do not break when PlayerNaturallySpawnCreaturesEvent is cancelled
If there is a player nearby which had its event not cancelled,
then that should take precedence.
2024-12-01 13:53:04 -08:00
Spottedleaf 0f90942b1a Fix non-null initialisation of context collision shape
Force LazyEntityCollisionContext#getEntity() to delegate

- By delegating when the entity is retrieved, we can correctly catch
  cases where the collision method is inspecting some entity state.

Adjust constant collision shape determination

- Our previous hack did not actually catch every case. For now,
  it will only assume a constant collision shape of EMPTY for
  air blocks.

Fixes https://github.com/PaperMC/Paper/issues/11697
2024-12-01 13:43:37 -08:00
MrPowerGamerBR 1e035f374b Only attempt to find spawn position if there isn't a fixed spawn position set (#11682) 2024-12-01 16:44:03 +01:00
Nassim Jahnke 27e4ddcd06 Fix item_model adapter, rename internal classes
Fixes #11688
2024-11-30 10:56:37 +01:00
Nassim Jahnke 9039c3923c Add back discard policy 2024-11-30 10:44:57 +01:00
Lulu13022002 47f2071350 Deprecate ChatVisibility#UNKNOWN (#11683) 2024-11-29 17:12:17 +01:00
Nassim Jahnke 5ab678947f Copy dispatcher root children before passing it into async tree building 2024-11-29 17:07:54 +01:00
Nassim Jahnke 64828f3a60 Clean up thread pool usage (#11681)
Using an unbound LinkedBlockingQueue means you *have* to set core and max core thread pool size the same, as they will never go above the minimum pool size by just passing them through. So this fixes the async command executor pool to actually use 2 threads, and also cleans up other usage to be explicitly "fixed" thread pool sizes, and splits off one more in Minecraft's Util class
2024-11-29 17:07:35 +01:00
Nassim Jahnke 9953384d89 [ci skip] leaf 2024-11-29 09:44:19 +01:00
Spottedleaf da9d110d5b Remove chunk save reattempt patch
This patch does not appear to be doing anything useful, and may
hide errors.

Currently, the save logic does not run through this path either
so it did not do anything.

Additionally, properly implement support for handling
RegionFileSizeException in Moonrise.
2024-11-28 18:27:59 -08:00
Spottedleaf 0cc7bd4857 Use Player view distance for PlayerNaturallySpawnCreaturesEvent
The spigot view distance may not be correct, as the player may
have a specific view distance configured.
2024-11-28 14:23:38 -08:00
Spottedleaf 78fd8f931b Copy items when constructing ClientboundSetCursorItemPacket
Unlike ClientboundContainerSetSlotPacket, the constructor
itself does not copy the item. Thus, we need to pass a copy of
the item to the constructor.
2024-11-28 14:02:35 -08:00
Jake Potrebic 5f6a79668c deprecate adventure key() methods where applicable 2024-11-28 13:51:48 -08:00
Noah cb2ab7d225 Remove string dupe exploit setting (#11670) 2024-11-28 18:17:57 +01:00
Spottedleaf d38624bdd8 Do not call modifyEntityTrackingRange on own range
The range is already modified, so this call will not do anything.
2024-11-27 12:19:39 -08:00
Spottedleaf afb5b13056 Replace SimpleRandom with (Simple)ThreadUnsafeRandom
ThreadUnsafeRandom is a random implementation that is
identical to LegacyRandomSource behaviourally, but
without the thread checks.

SimpleThreadUnsafeRandom is ThreadUnsafeRandom except with
its nextInt(int) function replaced with a faster
but more biased implementation when bound is very large.

Additionally, replace Level/Entity randoms with ThreadUnsafeRandom.
This avoids the expensive CAS logic at the expense of losing the
thread check.
2024-11-27 06:16:27 -08:00
Lulu13022002 7e789e8376 Prevent duplicate/superfluous BlockPhysicsEvent (#11609) 2024-11-26 20:05:52 +01:00
Lulu13022002 f4741f22e8 Expose particle status client option (#11573) 2024-11-26 18:46:12 +01:00
Nassim Jahnke 5f0932b6c8 [ci skip] leaf 2024-11-25 20:19:50 +01:00
Spottedleaf 4190ee7439 Add Server#isGlobalTickThread
This method should be present in Paper, not just in Folia, given
that the GlobalRegionScheduler is present.

Additonally, add Server#isOwnedByCurrentRegion(World, int, int, int, int)
for checking of a rectangle of chunks is owned by the current region.
2024-11-25 10:43:28 -08:00
Spottedleaf 280b497783 Change MinecraftServer#pluginsBlockingSleep to be Set
A plugin should not be allowed to be added twice or more, as this
would require two or more remove calls to unset the pause block.
2024-11-25 10:13:34 -08:00
dependabot[bot] cd9e697b52 Bump dawidd6/action-download-artifact from 3 to 6 in /.github/workflows (#11666)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 3 to 6.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v3...v6)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-25 16:03:18 +00:00
Glicz a63013cf48 [ci skip] fix compile issues caused by 5b53cb4 (#11664) 2024-11-25 11:18:05 +01:00
Jake Potrebic 5b53cb404d [ci skip] use more jspecify in server 2024-11-24 19:26:32 -08:00
Jake Potrebic cf956ac8d2 Add all missing TagKey constants files (#11661) 2024-11-24 22:32:52 +01:00
Lulu13022002 9bc147178d Fix painting variant builder (#11660) 2024-11-24 20:12:08 +01:00
Jake Potrebic bf8405fcdd [ci skip] Rebuild patches 2024-11-23 22:48:48 -08:00
Bjarne Koll bb32b05498 Call ProjectileHitEvent for entity hits (#11652)
A simple bugfix replacing a new vanilla call to
Projectile#hitTargetOrDeflectSelf with the bukkit replacement to call
the event.
2024-11-23 23:13:10 +01:00
kokiriglade 6051dac82b Painting variant registry modification API (#11648) 2024-11-23 23:10:54 +01:00
Bjarne Koll edabff8a35 Correctly damage tick wolf after armor block (#11653)
Spigot incorrectly returns false in Wolf#actuallyHurt if the armor
absorbed the damage causing the entity to not get damage invuln ticks.
Resolve this by correctly reverting to the "always true" return value as
the event is not cancelled.
2024-11-23 23:05:54 +01:00
Jake PotrebicandKevin Raneri eef40b78c2 Configurable Entity Despawn Time (#11454)
* Configurable Entity Despawn Time

Co-authored-by: Kevin Raneri <kevin.raneri@gmail.com>

* Rebase

* Rebase

* rebase

* throw exceptions for this map

---------

Co-authored-by: Kevin Raneri <kevin.raneri@gmail.com>
2024-11-23 13:27:37 -08:00
Bjarne Koll aee6f7abe1 Correctly mirror vanilla non-exact ingredients (#11651) 2024-11-23 20:37:38 +01:00
Jake Potrebic 860d948731 Support tags for more SimpleRegistry (#11607) 2024-11-23 20:26:51 +01:00
Nassim Jahnke f2412609a1 Make TypedKey an actual Key (#11641) 2024-11-23 20:21:24 +01:00
Lulu13022002 751e9bd125 Fix jukebox component (#11642) 2024-11-23 20:09:34 +01:00
Jake Potrebic 915637df5c Run 'freeze' listeners before tag events (#11606) 2024-11-23 10:52:00 -08:00
Abel 817550c520 Add API to allow/disallow tick sleeping (#11611) 2024-11-22 12:53:01 +01:00
Abel 8dc42fadfa Add API to check if the server is sleeping (#11605) 2024-11-22 12:22:20 +01:00
Lulu13022002 f8e2a671eb Check for AbstractBoat instead of Boat in EAR ignore list 2024-11-21 18:37:49 +01:00
Nassim Jahnke 55475f05d5 [ci skip] Fix typos 2024-11-21 17:57:18 +01:00
Nassim Jahnke c28d89d625 Update spark 2024-11-21 10:43:07 +01:00
Lulu13022002 85bfdc09bc Fix NPE when EntityResurrectEvent is uncancelled (#11636) 2024-11-19 12:21:31 +01:00
Bjarne Koll d0dcd7d251 Fix incorrect invulnerability damage reduction (#11599)
Fixes incorrect spigot handling of the invulnerability damage
reduction applied when an already invulnerable entity is damaged with a
larger damage amount than the initial damage.
Vanilla still damages entities even if invulnerable if the damage to be
applied is larger than the previous damage taken. In that case, vanilla
applies the difference between the previous damage taken and the
proposed damage.

Spigot's damage modifier API takes over the computation of damage
reducing effects, however spigot invokes this handling with the initial
damage before computing the difference to the previous damage amount.
This leads to the reduction values to generally be larger than expected,
as they are computed on the not-yet-reduced value.
Spigot applies these reductions after calling the EntityDamageEvent and
*then* subtracts the previous damage point, leading to the final damage
amount being smaller than expected.

This patch cannot simply call the EntityDamageEvent with the reduced
damage, as that would lead to EntityDamageEvent#getDamage() returning
the already reduced damage, which breaks its method contract.
Instead, this patch makes use of the DamageModifier API, implementing
the last-damage-reduction as a DamageModifier.
2024-11-19 11:54:58 +01:00
Nassim Jahnke 57eab3e312 Add PlayerItemGroupCooldownEvent (#11625) 2024-11-19 11:33:06 +01:00
Lulu13022002 21cc763352 Fix drops for shearing mushroom cow (#11632) 2024-11-19 11:14:19 +01:00
Lulu13022002 f9f964d4d2 Fix drops for shearing bogged (#11628) 2024-11-19 11:05:54 +01:00
Bjarne Koll 01dd50fb3a [ci skip] Rebuild patches 2024-11-19 09:59:20 +01:00
Spottedleaf fdef6d392b Add missing NotNull annotation for getChunksAtAsync cb param 2024-11-18 23:02:17 -08:00
Spottedleaf 878da16a6b Fix non block ticking chunks not sending block/light updates
Needed to redirect the getTickingChunk call in
broadcastChangedChunks to use the chunk to send method.
2024-11-18 23:02:17 -08:00
Spottedleaf 37b9630f6a Do not create unneccessary callback in ChunkTaskScheduler#scheduleChunkLoad
If the parameter has addTicket = false and onComplete = null,
then the loadCallback would do no work and as a result does
not need to be created.
2024-11-18 23:02:17 -08:00
Spottedleaf 8c5b837e05 Rework async chunk api implementation
Firstly, the old methods all routed to the CompletableFuture method.
However, the CF method could not guarantee that if the caller
was off-main that the future would be "completed" on-main. Since
the callback methods used the CF one, this meant that the callback
methods did not guarantee that the callbacks were to be called on
the main thread.

Now, all methods route to getChunkAtAsync(x, z, gen, urgent, cb)
so that the methods with the callback are guaranteed to invoke
the callback on the main thread. The CF behavior remains unchanged;
it may still appear to complete on main if invoked off-main.

Secondly, remove the scheduleOnMain invocation in the async
chunk completion. This unnecessarily delays the callback
by 1 tick.

Thirdly, add getChunksAtAsync(minX, minZ, maxX, maxZ, ...) which
will load chunks within an area. This method is provided as a helper
as keeping all chunks loaded within an area can be complicated to
implement for plugins (due to the lacking ticket API), and is
already implemented internally anyways.

Fourthly, remove the ticket addition that occured with getChunkAt
and getChunkAtAsync. The ticket addition may delay the unloading
of the chunk unnecessarily. It also fixes a very rare timing bug
where the future/callback would be completed after the chunk
unloads.
2024-11-18 23:00:59 -08:00
de6173b061 Item DataComponent API (#10845)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-11-18 15:09:44 -05:00
Lulu13022002 6735c60738 Fix enderchest opening animation (#11635) 2024-11-18 20:47:52 +01:00
MiniDigger | Martin d8b66dd93d fix: move to jline-terminal-ffm on java 22+ and fall back to jni on 21, fixes #10405
ffm requires 1) native access allowed (the jdk cracks down on undocumented native access in 22) and 2) reverting the default console back to java.base, so the internal jline doesnt take over
2024-11-18 17:01:08 +01:00
Nassim Jahnke 4e01ede950 Fix inverted global skip check 2024-11-18 13:46:13 +01:00
Nassim Jahnke daf31133b5 Make logs less annoying 2024-11-18 13:06:15 +01:00
Nassim Jahnke 11d708d831 [ci skip] Add missing feature patch identifiers 2024-11-18 12:31:36 +01:00
Nassim Jahnke 575c1c4f89 Update disableGameRuleLimits casing 2024-11-18 12:24:37 +01:00
Space Walker 34804890e8 Update Alternate Current patch to 1.21.3 (#11602) 2024-11-18 10:29:51 +01:00
Josh Roy bc4a705ce4 [ci skip] chore: change paste.gg links to mclo.gs (#11629) 2024-11-17 10:46:43 -08:00
Riley Park 4e2291e206 chore: refactor issue templates 2024-11-17 10:27:17 -08:00
Bjarne Koll 7b13d936de Updated Upstream (Bukkit/CraftBukkit) (#11626)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
36b11391 Fix copy pasting in UseCooldownComponent

CraftBukkit Changes:
a71a7e1f5 SPIGOT-7957: Fix setTarget method for Breeze
5bc0a094b SPIGOT-7955: Failure teleporting players between worlds using Player#teleport() when player has attribute modifiers
2e09c7a36 SPIGOT-7953: Item cooldown must be greater than 0
8ef9079fa Increase outdated build delay
2024-11-17 16:52:44 +01:00
Vivian Horvath be886cf4e7 Fix Naming issue inside Add PlayerArmorChangeEvent (#11614) 2024-11-15 10:00:33 +01:00
Bjarne Koll 13f48d8320 [ci skip] Rebuild patches 2024-11-15 09:41:04 +01:00
Spottedleaf c60af44a94 Fix experimental minecart collisions on sloped rails
We are supposed to ignore some collisions on the sloped
rail.
2024-11-14 21:01:04 -08:00
Jason Penilla 661839e033 Fix and optimize getChunkCount (#11610)
It was returning ticking chunk count instead of the intended full chunk count.
We can also directly use the size of the fullChunks collection instead of iterating all chunks.
2024-11-11 12:17:36 -07:00
Barnaby 52fb26524e Optimize custom map rendering (#11000) 2024-11-11 18:04:22 +01:00
Jake Potrebic 1ef4c0e7ff Improve performance of RecipeMap#removeRecipe (#11547) 2024-11-10 01:26:05 +01:00
Space Walker 6da7b9e888 Update Eigencraft patch to 1.21.3 (#11553) 2024-11-10 00:52:51 +01:00
Lulu13022002 59b79c8bbb Fix NPE with enchantable (#11557) 2024-11-09 23:26:01 +01:00
Noah 9d1c91d083 [ci skip] Fix UseCooldownComponent jd (#11565) 2024-11-09 23:24:56 +01:00
Abel 2e6eafb7e8 Improve Minecart#getMinecartMaterial (#11544)
Removes the hardcoded lookup in favour of calling the
AbstractVehicle getItemDrop method.
2024-11-09 23:22:01 +01:00
Jake Potrebic 94ea770212 Re-add exact choice shapeless support (#11546)
* Re-add exact choice shapeless support

* don't re-create maps every shapeless match

* add missing paper comment with last patch
2024-11-09 13:53:53 -08:00
Yannick Lamprecht e47f79acd9 Configure mockito agent (#11560) 2024-11-09 22:49:07 +01:00
Gero bcbd10804f Call CraftPlayer#onEntityRemove for all online players (#11598) 2024-11-09 22:35:58 +01:00
Nassim Jahnke 0af4e84eff [ci skip] Add identifying line to some larger/optimization patches 2024-11-09 21:44:55 +01:00
Nassim Jahnke 17dbf74ccf Improve CraftEntity and CraftPlayer equals 2024-11-09 21:17:42 +01:00
Nassim Jahnke 6483ecb8a2 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
a6aba46f PR-1078: Improve Javadocs of Player#loadData() and Player#saveData()
1e2e6a18 SPIGOT-7946: API for server pause when empty seconds
54a36938 SPIGOT-7944, PR-1077: Allow nullable fields in DamageTypeTags

CraftBukkit Changes:
2702c5c8e SPIGOT-7946: API for server pause when empty seconds
485f910fc SPIGOT-7947: addPassenger doesn't work if the vehicle is a player
ecf3dff0e SPIGOT-7949: Registering a new scoreboard objective with an empty display name throws a NPE
9b048cc84 SPIGOT-7948: `Bukkit#dispatchCommand` uses the wrong `CommandListenerWrapper` for Players
7b44d4640 SPIGOT-7931: Fix sync in Anvil View when result item is taken
2024-11-09 17:01:35 +01:00
Jason Penilla 00ef8bdcb0 Fix Entity#isTicking and update Paper entity command (#11590)
fixes #10299
2024-11-09 15:41:26 +01:00
Noah van der Aa 99f4bb29ba Fix infinite fireworks (#11592) (#11594) 2024-11-08 11:29:40 +00:00
Bjarne Koll fcb6c72bc9 Correctly pass velocity native compressor (#11509) 2024-11-06 11:00:10 +01:00
Bjarne Koll 42a1901d3b Correctly adopt upstream item EAR fix (#11582)
EAR 2 evaluates the entities activity on the already incremented entity
tick. This diverges from spigots behaviour and hence needed adoption for
their item ear fix.
2024-11-05 09:52:18 +00:00
Jake Potrebic 93b435dbab [ci skip] better instructions for patch apply conflict (#11568) 2024-11-04 18:43:26 +01:00
Jake Potrebic c6aa61ee18 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11561)
Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b9df8e9f SPIGOT-7933: Improve custom Minecart max speed
fc496179 Fix InstrumentTest
7c0ec598 PR-1075: Make Art an interface
c389f5a4 PR-1074: Make Sound an interface

CraftBukkit Changes:
df1efc0bb SPIGOT-7945: `Bukkit#dispatchCommand` throws `UnsupportedOperationException`
285df6e85 SPIGOT-7933: Improve custom Minecart max speed
a0f3d4e50 SPIGOT-7940: Recipe book errors after reload
9e0618ec2 SPIGOT-7937: Cannot spawn minecart during world generation with minecart_improvements enabled
1eb4d28da SPIGOT-7941: Fix resistance over 4 amplify causing issues in damage
52b99158a PR-1504: Make Art an interface
e18ae35f1 PR-1502: Make Sound an interface

Spigot Changes:
e65d67a7 SPIGOT-7934: Item entities start "bouncing" under certain conditions
2024-11-04 18:42:38 +01:00
Bjarne Koll ce0a041947 [ci skip] Rebuild patches 2024-11-03 00:37:14 +01:00
Spottedleaf a6df4c8cdc Handle corrupt light data gracefully
First, if the light data is not marked as correct, we should not be
parsing it in the first place. This will eliminate errors from
parsing possibly different versioned light data.

Secondly, if parsing the light data throws an exception (from
the SWMRNibbleArray constructor), then we can simply mark
the returned chunk as having incorrect light data - rather than
propagating the exception and causing the chunk to be re-generated.
2024-11-02 16:33:08 -07:00
Bjarne Koll 92131adaf2 Decrease dead entity teleport warning (#11559)
Decreases the warning back to its 1.21.1 level where only teleports of
dead/invalid entities across dimensions were logged.
2024-11-01 22:25:31 +01:00
Lulu13022002 d19be64b15 Fix NPE with spark when CraftServer is not init yet (#11558) 2024-11-01 21:37:45 +01:00
Bjarne Koll 85c870e9c7 Correct update cursor (#11554)
Spigot uses a no longer valid ClientboundContainerSetSlotPacket with the
slot -1, which would update the carried stack in versions <=1.21.1 but
now leads to an IOOB.
1.21.2 instead introduced the ClientboundSetCursorItemPacket, which this
patch uses instead.
2024-11-01 15:57:23 +01:00
Bjarne Koll a5d742637a Correctly support RecipeChoice.empty (#11550)
The previous implementation was based off of spigots logic in
CraftRecipe#toIngredient, which is completely incorrect as
nms.Ingredient.of() is a throwing call.

Correctly insert handling for the empty() choice in the toNMSOptional
logic.
2024-11-01 11:30:40 +01:00
Jake Potrebic 16d7d73bd5 bunch more general fixes 2024-10-31 20:35:06 -07:00
Jake Potrebic 1de01302d4 re-add a dispense fix patch 2024-10-31 19:51:36 -07:00
Jake Potrebic 5c0930dfad Fix fix recipe iterator patch 2024-10-31 19:34:10 -07:00
Nassim Jahnke 52a05907c7 Updated Upstream (Bukkit/CraftBukkit) (#11543)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
97c59261 PR-1073: Make Biome an interface
a38581aa Fix further javadoc errors
8271c490 Fix javadoc error
8a9ecf29 PR-1072: Fix bad naming for Vault State methods
6dd58108 PR-1071: Make Fluid an interface and add missing entry
ed2cdfc3 PR-1070: Make Attribute an interface and align names with the new minecraft ones
63472efb PR-1069: Add missing winter drop experimental annotation to pale boats

CraftBukkit Changes:
7235ad7b0 PR-1501: Make Biome an interface
602904003 PR-1500: Rename implementation for Vault State methods
75f26f79f PR-1499: Make Fluid an interface and add missing entry
4cfd87adc PR-1498: Make Attribute an interface and align names with the new minecraft ones
6bb0db5cb SPIGOT-7928: ExactChoice acts as MaterialChoice
3eaf3a13c SPIGOT-7929: Error when setting EquippableComponent
abbf57bac SPIGOT-7930: Fix spawning entities with SummonEntityEffect
92d6ab6cf PR-1497: Move boat field rename entries to below key renaming, so that keys are also renamed
abfe292aa PR-1496: Use correct Fluid class on Tags type check
c7aab7fa7 SPIGOT-7923: Fix Dispenser logic to avoid firing empty projectiles
2024-10-31 23:44:34 +01:00
Noah van der Aa 7ee4835074 Correctly clear explosion density cache(#11541) 2024-10-31 22:30:18 +01:00
Bjarne Koll c5c125079c [ci skip] Remove leftover todo file (#11540) 2024-10-31 21:59:35 +01:00
Nassim Jahnke f273e6e6c1 Set updatingMinecraft to false 2024-10-31 18:07:14 +01:00
Bjarne Koll ad9c58e103 Only expose velocity relative tp flags to API (#11532)
Since 1.21.2, vanilla split relative teleportation flags into position
and delta/velocity flags into separate enum entries.
This highlighted a design flaw in the paper api addition for teleport
flags, which just simply mirrored internals while also only being able
to apply the delta/velocity part of a flag, given the teleport target is
always absolute in the API.

This patch proposes to simply no longer expose the non-velocity related
flags to the API, instead marking the entire Relative enum as being
purely velocity related, as non-velocity related flags are not useful to
callers. This was done over simply exposing all internal flags, as
another vanilla change to the internal enum would result in the same
breakage.

The newly proposed API *only* promises that the passed flags prevent the
loss of velocity in the specific axis/context, which should be
independent enough of vanillas specific implementation of this feature.
2024-10-31 17:25:52 +01:00
Lulu13022002 147b7961fe get previous redstone level from the right state for experimental wires 2024-10-31 16:48:37 +01:00
Bjarne Koll dfedf79a2f Correctly cancel consumption of consumable
See: #11534
2024-10-31 12:44:02 +01:00
Bjarne Koll 40a960db45 Rebuild patches 2024-10-30 18:36:22 +01:00
Jason Penilla 580a610550 Allow using old ender pearl behavior & apply ender pearl exploit patch (#11524)
When enabled, ender pearls will not load chunks and will save to the world instead of the player.

Also changes the exploit config to be default false, as it only makes sense when legacy behavior is enabled.
2024-10-30 18:09:05 +01:00
Noah van der Aa 13308806ac Add Friction API to minecarts 2024-10-30 17:31:33 +01:00
Lulu13022002 1523212d4e don't resend effects when PlayerItemConsumeEvent is cancelled 2024-10-30 17:07:49 +01:00
Lulu13022002 8ba3073343 fix "is_freezing" damage type tag 2024-10-30 14:55:46 +01:00
Nassim Jahnke 1a1d0cf01a Use target pitch in teleport (generally the same thing) 2024-10-30 14:36:09 +01:00
Nassim Jahnke 9f1fa0b4f8 Fix item gravity on inactive items, remove dumb active skipping 2024-10-30 14:06:43 +01:00
Nassim Jahnke fe2f3d4693 Fix portal exit resulting in bad teleport transition 2024-10-29 22:35:10 +01:00
Jason Penilla 1196ab5505 Avoid issues with certain tasks not processing during sleep (#11526) 2024-10-29 20:46:33 +01:00
Lulu13022002 d576cfc234 cleanup bugfix patch 2024-10-29 16:54:40 +01:00
Lulu13022002 49eae0d5fb remove some leftovers 2024-10-29 15:33:42 +01:00
Jason Penilla 40211a0ba0 Update Gradle wrapper to 8.10.2 2024-10-28 10:17:48 -07:00
Owen1212055 99b1bf9b0f Use new ClientboundPlayerRotationPacket for setting player rotation 2024-10-28 12:14:00 -04:00
granny 6288adb001 Remove leftover missed timings calls (#11527)
* remove leftover timings calls

* remove unused imports
2024-10-28 00:03:55 -07:00
Jason Penilla e35f199344 Use declaration order for state holder property iteration
Mostly an aesthetic change for serialization, should not have any impact on performance or correctness.
2024-10-27 18:29:34 -07:00
Jason Penilla 9e35192360 Execute spark tasks during tick sleep (#11525) 2024-10-27 22:00:06 +01:00
Jason Penilla 29bf7beba9 Fix unused parameter in PlayerList#remove 2024-10-27 12:09:27 -07:00
Jason Penilla f8f230a0d0 Remove unnecessary AT 2024-10-27 11:26:21 -07:00
Lulu13022002 4d87302672 Fix NPE and StackOverflowError for dispensers 2024-10-27 18:47:50 +01:00
Nassim Jahnke 02bca1e655 Remove timings impl 2024-10-27 18:39:30 +01:00
Bjarne Koll 12ed021051 Update material tags and entity effect 2024-10-27 12:20:30 +01:00
Nassim Jahnke fe7b741545 Another one 2024-10-27 12:02:26 +01:00
Nassim Jahnke 3cb16c9d91 Add back per player mob spawning
Also removes the `info.mobCategoryCounts.mergeInt` call that - at least from what I can tell - has been wrongly counting spawned mobs twice. The runner passed via `info::afterSpawn` already counts up that exact number in the same exact places (where `j`, the return value used here, is incremented)
2024-10-27 11:56:51 +01:00
Nassim Jahnke b6305644f9 More patches 2024-10-27 10:40:53 +01:00
Nassim Jahnke 348c855096 Readd last API patch (with TODO) 2024-10-27 10:03:59 +01:00
Nassim Jahnke bcf52fe5fd Delete some old patches 2024-10-27 09:24:59 +01:00
Jake Potrebic 09718757bf re-add improve perf of mass crafts 2024-10-26 12:50:32 -07:00
Lulu13022002 7d67d3f4f4 fix DamageTypeTags init 2024-10-26 19:41:56 +02:00
Lulu13022002 7162ff0404 fix item meta 2024-10-26 19:11:37 +02:00
Nassim Jahnke 20507b45cf Apply more patches 2024-10-26 18:16:39 +02:00
Lulu13022002 98af0e0d3b update generator 2024-10-26 18:03:25 +02:00
Shane Freeder 2946dbb832 Update WorldServer#serverlevelData mapping 2024-10-26 15:11:09 +01:00
Jason Penilla b14d336442 Apply watchdoge patches 2024-10-25 18:13:48 -07:00
Spottedleaf be2edeac2b Fix boats/minecarts not dropping when destroyed
Diff to clone the item was lost, which meant that the spawned
item was air.
2024-10-25 15:04:29 -07:00
Spottedleaf cf03bed519 Add startup flag to disable gamerule limits
-DPaper.DisableGameRuleLimits=true will disable gamerule limits
2024-10-25 14:22:01 -07:00
Spottedleaf ba1ee87e70 Revert "Add max minecarft speed gamerule config"
This reverts commit 61136fe43b.
2024-10-25 14:10:40 -07:00
Spottedleaf 61136fe43b Add max minecarft speed gamerule config 2024-10-25 14:07:01 -07:00
Bjarne Koll dcd81a8867 Fix crafting (and server icon) 2024-10-25 22:33:37 +02:00
Spottedleaf e92607cd21 Fix MSPT command
Used wrong variable for tick length
2024-10-25 13:19:27 -07:00
Spottedleaf 683ce2062e Fix Anti-Xray using wrong data in chunk deserialize 2024-10-25 13:05:26 -07:00
Spottedleaf e4efb590e4 fix compile issues 2024-10-25 13:05:26 -07:00
Jason Penilla 2e76d3f1e2 Specify mainCapabilityAttribute for paper-api 2024-10-25 12:47:24 -07:00
Spottedleaf b711764991 Rebase fixups 2024-10-25 12:24:15 -07:00
Spottedleaf 62e3bcdc3b Review patch-to-patch diff
Looks OK
2024-10-25 12:11:20 -07:00
Spottedleaf 9ecf77e884 Fix compile issues 2024-10-25 11:46:53 -07:00
Spottedleaf 35ef2932be Finish rebase 2024-10-25 11:40:25 -07:00
Spottedleaf a911f4a167 Prepare rebase 2024-10-25 11:25:10 -07:00
Spottedleaf f1a11a6e3f Finish mixin diff review
The mixin diff review looks OK, but need to check the
patch diff now.
2024-10-25 11:25:10 -07:00
Spottedleaf 75e3409cec Complete rebase, start review 2024-10-25 11:25:10 -07:00
Spottedleaf 6daedd74c9 Prepare rebase 2024-10-25 11:25:09 -07:00
Spottedleaf 1d341dfda3 Fix some compile errors from patches 2024-10-25 11:25:09 -07:00
Spottedleaf 3d7b5708ef Implement chunk system 2024-10-25 11:25:09 -07:00
Spottedleaf 16d2c9defe Implement Starlight 2024-10-25 11:25:09 -07:00
Spottedleaf 2a95ad1df3 Implement explosion optimisations 2024-10-25 11:25:09 -07:00
Spottedleaf e9c58f5451 Implement chunk tick iteration optimisations 2024-10-25 11:25:09 -07:00
Spottedleaf 3b316215d7 Implement config hooks in PaperHooks 2024-10-25 11:25:09 -07:00
Spottedleaf 8e569ba62a Merge patches 2024-10-25 11:25:09 -07:00
Spottedleaf ecf4d9715e Begin fixing issues
See diff in the update text file
2024-10-25 11:25:09 -07:00
Spottedleaf 47258a7118 Move common diffs to MCUtils 2024-10-25 11:25:09 -07:00
Spottedleaf 6df21e61af Start Moonrise update
This is based on Moonrise's 1.21.2 branch, but this on
1.21.1 so some diffs cannot be applied (and this doesn't
compile).

See moonrise_update_1_21_2.txt for progress
2024-10-25 11:25:09 -07:00
Lulu13022002 3518974270 fix some issues 2024-10-25 20:09:45 +02:00
Bjarne Koll e19f48475d Test compile fixes 2024-10-25 19:15:40 +02:00
Bjarne Koll 0a8fd78e37 Compiler issue v5 2024-10-25 18:08:28 +02:00
Bjarne Koll bb124f4021 Compiler issues v4 2024-10-25 17:20:41 +02:00
Bjarne Koll 918ca965d9 Compiler issues v3 2024-10-25 15:15:12 +02:00
Bjarne Koll 6fb86bb20a Compiler issues v2 2024-10-25 14:25:28 +02:00
Bjarne Koll 0f011a31b1 Some more compile issues 2024-10-25 13:34:01 +02:00
Bjarne Koll 9c83387157 Compile issues 1 2024-10-25 13:19:23 +02:00
Bjarne Koll b06e0b0317 Work on compile errors 2024-10-25 13:13:43 +02:00
Bjarne Koll afbb0d88dd 1037 2024-10-25 12:28:34 +02:00
Bjarne Koll 227caac7f0 Wrong attempt at Tag lifecycle 2024-10-25 12:06:49 +02:00
Bjarne Koll 6a315742d9 1020 2024-10-25 00:08:35 +02:00
Bjarne Koll 7616ebccd8 1000 2024-10-24 23:03:27 +02:00
Bjarne Koll 35e01d7a80 Update work 989 2024-10-24 22:29:29 +02:00
Shane Freeder fe142cdcd5 Anti Xray 2024-10-24 20:10:38 +01:00
Shane Freeder d67e55d367 Checkpoint 2024-10-24 19:40:24 +01:00
Bjarne Koll 9047541397 Upstream update 2024-10-24 19:29:35 +02:00
Bjarne Koll fc05430719 963 2024-10-24 17:20:12 +02:00
Bjarne Koll b2375286c9 Readd wrongly removed diff 2024-10-24 16:31:09 +02:00
Owen1212055 7d4cce94ae Patch 2024-10-24 10:02:45 -04:00
Owen1212055 89bf08158b Patch 2024-10-24 09:53:28 -04:00
Owen1212055 26f7b4c72e Patch 2024-10-24 09:25:36 -04:00
Bjarne Koll 80de05ff33 Patch me this, patch me that 2024-10-24 12:22:30 +02:00
Bjarne Koll 457d03534d Patches, patches, patches 2024-10-24 10:42:29 +02:00
Noah van der Aa 5d19e2b332 good luck americans 2024-10-24 00:42:38 +02:00
Noah van der Aa 5a6011c08c MOOOOOOOOOOOOOORE 2024-10-24 00:32:21 +02:00
Noah van der Aa dd87f9fe83 fix gruesome copyright violation 2024-10-24 00:11:28 +02:00
Noah van der Aa 4baf9ab44d MOOOOOOOOOOORE 2024-10-24 00:08:29 +02:00
Noah van der Aa d52e2d241d MOOOOOOOORE 2024-10-23 23:35:21 +02:00
Noah van der Aa 1dc142534d MOOOOORE 2024-10-23 23:12:09 +02:00
Noah van der Aa cb79de80c4 moooore 2024-10-23 22:52:43 +02:00
Shane Freeder 6456b5dea8 A bunch more 637 2024-10-23 21:10:14 +01:00
Shane Freeder cbf64163ba A bunch of patches 2024-10-23 20:43:06 +01:00
Bjarne Koll 4db250389e Work work work work 2024-10-23 20:50:46 +02:00
Bjarne Koll 0bb4d1d660 553 2024-10-23 20:15:25 +02:00
Bjarne Koll 2810f50ca2 503 2024-10-23 19:46:06 +02:00
Bjarne Koll f5177aa121 Some more work 2024-10-23 17:58:11 +02:00
Bjarne Koll 1f8b53733f 440 2024-10-23 17:13:43 +02:00
Bjarne Koll 09b625eccf 400 2024-10-23 16:57:39 +02:00
Owen1212055 6bfc6db99e Patch 2024-10-23 10:08:40 -04:00
Owen1212055 af125d26a9 Patch 2024-10-23 10:04:01 -04:00
Owen1212055 aa37f7250d Patches 2024-10-23 09:54:09 -04:00
Bjarne Koll 5e262c1691 298 2024-10-23 15:02:51 +02:00
Bjarne Koll f677393a88 Skip Improve-exact-choice-recipe-ingredients for now 2024-10-23 14:12:17 +02:00
Bjarne Koll 8851d25a4d Fluid Flowing ifLoaded patch 2024-10-23 13:13:00 +02:00
Bjarne Koll a400929816 242 2024-10-23 12:32:08 +02:00
Bjarne Koll 7c04a31c9f Update projectile launch to 1.21.2 2024-10-23 12:02:36 +02:00
Bjarne Koll dc5af4848a Breakpoint before projectile mess 2024-10-23 11:04:00 +02:00
Bjarne Koll 9d63c814c2 Work work work 2024-10-23 00:02:50 +02:00
Bjarne Koll f1649d702b Work it 2024-10-22 23:30:51 +02:00
Bjarne Koll 9e92fed7a2 More work? 2024-10-22 22:38:26 +02:00
Bjarne Koll 152e82ceec Some work 2024-10-22 22:00:33 +02:00
Noah van der Aa 6b27267fb7 oops 2024-10-22 20:09:28 +02:00
Noah van der Aa 3585434382 first 100! 2024-10-22 20:04:31 +02:00
Noah van der Aa d280061a1a First batch of server patches 2024-10-22 19:28:57 +02:00
Noah van der Aa e080b20c45 Bundles are no longer experimental (thanks lynx) 2024-10-22 18:43:46 +02:00
Noah van der Aa d0028b77c7 you saw nothing 2024-10-22 18:32:41 +02:00
Noah van der Aa 2ef589c820 okaaay let's go 2024-10-22 18:23:19 +02:00
Lulu13022002 d348cb88a9 Restrict BlockProjectileSource#launchProjectile
Spigot recently revamped their CraftBlockProjectileSource impl to make use of
the the ProjectileItem logic. During this move however, a couple of types were
added which do not provide a sensible ProjectileItem implementation.

The commit restricts the API once again to types that represent useful
ProjectileItems, removing support for the trident, enderpearl and breeze variant
of the windcharge.
2024-10-21 18:17:45 +02:00
Shane Freeder 14a48cda40 Some small touchups to the GUI (#11505)
As noted on the issue, the method here can blow up in
certain cases, the GUI logic already handles "the mouse is missing",
and so, we'll just catch this and move on.

Misc fix - There is probably an issue report for this somewhere,
but, the details section utilised the bukkit singleton to try to get
the TPS from the server. We already have the MinecraftServer instance
passed into us, and so we'll just get the information directly from there instead.

Fixes: #11494
2024-10-21 01:10:10 +02:00
Shane Freeder 260c3bbec0 Always send Banner patterns to the client (#11506)
The mojang client will not remove patterns from a Banner when none
are sent inside of an update packet, given that this is not an expected
flow for them, this is not all too surprising. So, we shall resort to always
sending the patterns over the network for update packets.

Fixes: #11487
2024-10-21 01:02:00 +02:00
caramel c13f9fd06a Fix potential annotation testing interruption (#11460) 2024-10-21 00:46:50 +02:00
Bjarne Koll 3b9db2b194 Updated Upstream (Bukkit/CraftBukkit) (#11501)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
bb4e97c6 Add support for Java 23
bc6874dd Bump asm to 9.7.1
50e8a00b PR-1064: Add specific getTopInventory methods for InventoryView derivatives
758b0a0f SPIGOT-7911: Fix Location#isWorldLoaded() for re-loaded worlds
133a64a7 Improve Registry#getOrThrow messages
be0f5957 PR-1058: Add tests for Minecraft registry <-> Bukkit fields
d1b31df2 PR-1062: Clarify BeaconView documentation
3fab4384 PR-1060: Cache Material to BlockType and ItemType conversion
967a7301 SPIGOT-7906: Increase YAML nesting limit to 100
6ecf033d SPIGOT-7899: Smithing recipes don't require inputs

CraftBukkit Changes:
0a7bd6c81 PR-1493: Improve reroute performance and add some tests
54941524c Add support for Java 23
f4d957fff SPIGOT-7915: Fix World#getKeepSpawnInMemory() using Spawn Radius rather than Spawn Chunk Radius
ded183674 Fix HIDE_ENCHANTS flag in items without enchantments
308785a0a Bump asm to 9.7.1 and re-add ClassReader to ClassWriter
72ce823cd PR-1487: Add specific getTopInventory methods for InventoryView derivatives
11a5e840c SPIGOT-7907, PR-1484: Improve merchant recipe item matching behavior to more closely align with older versions
45b66f7e4 SPIGOT-7909: Always set HIDE_ENCHANTS flag to item if flag is set
963459791 Increase outdated build delay
fc5b2d75f SPIGOT-7910: Fix launching breeze wind charge from API and improve dispenser launch API
c7d6428f2 SPIGOT-7856, PR-1483: End platform not dropping items after replacing blocks
2a5572b52 SPIGOT-7780, PR-1482: Cannot edit chunks during unload event
527041ab5 SPIGOT-7902, PR-1477: Fix CraftMetaPotion#hasCustomEffects() does not check if customEffects (List) is empty
5529a1769 Implement base methods for tags
30fbdbaaf Improve Registry#getOrThrow messages
6b71a7322 PR-1475: Add tests for Minecraft registry <-> Bukkit fields
5f24c255c SPIGOT-7908: Mark junit-platform-suite-engine as test scope
e4c92ef65 PR-1473: Change tests to use suites, to run tests in different environments and feature flags
d25e1e722 PR-1481: Fix BeaconView#set[X]Effect(null)
d69a05362 PR-1480: Fix PerMaterialTest#isEdible test running for legacy materials
bb3284a89 PR-1479: Use custom #isBlock method in legacy init instead of the one in Material, since it relies on legacy being init
98c57cbbe SPIGOT-7904: Fix NPE for PlayerItemBreakEvent
f35bae9ec Fix missing hasJukeboxPlayable
8a6f8b6d8 SPIGOT-7881: CTRL+Pick Block saves position data into item
7913b3be7 SPIGOT-7899: Smithing recipes don't require inputs
2024-10-21 00:06:54 +02:00
Shane Freeder 755a7753af [ci skip] rebuild patches 2024-10-17 21:24:12 +01:00
Spottedleaf aebbdc9e9a Add proper async player disconnections
Blocking can cause performance problems
2024-10-16 07:00:40 -07:00
Pedro 4430e96e1b Add AnvilView#bypassEnchantmentLevelRestriction (#11475) 2024-10-12 23:10:05 +02:00
Lulu13022002 b16c0ae023 Add offline PDC API (#8117) 2024-10-12 21:38:18 +02:00
TonytheMacaroni 57c75a4b67 Fix CraftMagicNumbers#getTag (#11484) 2024-10-09 21:58:13 +01:00
Nassim Jahnke 7cd4f2c15f Check if leash tag has a uuid 2024-10-03 17:10:27 +02:00
Nassim Jahnke fb768404aa [ci skip] Add section on nullability annotations (#11461) 2024-10-02 14:32:20 +02:00
Jake Potrebic 709f0f2919 Use components properly in ProfileWhitelistVerifyEvent (#11456) 2024-10-02 14:32:05 +02:00
Nassim Jahnke 69ffbec34a Fix hex color check 2024-10-02 13:49:39 +02:00
Jake Potrebic e7e1ab56ca Finish converting most of the undeprecated api to jspecify 2024-09-30 16:02:52 -07:00
Jake Potrebic ba3c29b92e Finish converting all events to jspecify annotations 2024-09-29 19:13:41 -07:00
Bjarne Koll ea00be3aaa Do not NPE on uuid resolution in player profile (#11449)
Band-aid fix for the player profile api resolution for a profile with
name but without uuid. The real solution is a proper refactoring of the
completeFromCache and complete method internally, however this needs
further consideration regarding existing faulty behaviour around name
lookups from uuid-only profiles.
2024-09-30 00:26:44 +02:00
Axionize b410fe8697 Configurable per-world void damage offset/damage(#11436) 2024-09-30 00:06:13 +02:00
e3c8a8eef1 Add PlayerInsertLecternBookEvent [1.20 port] (#7305)
* Add PlayerInsertLecternBookEvent

* Rebase

Additionally, moves the event call higher up and removes the lectern
block state clone from the event.

* jSpecify

* Shrink correctly

* style fixups

* move methods

* rename param to cancel

* fix javadocs

* more javadoc fixes

* fix co-author on patch from yesterday

* last fix

---------

Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-09-29 14:28:48 -07:00
Jake Potrebic f9c7f2a5c1 Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations

* more

* fixes
2024-09-29 12:52:13 -07:00
Jake Potrebic 6d7a438fad Call bucket events for cauldrons (#7486) 2024-09-29 00:04:11 +02:00
Esoteric EndermanandBjarne Koll 355b1cbaf6 Add API for explosions to damage the explosion cause (#11180)
This intends to give plugin developers more control over explosions created using the World#createExplosion method, specifically by adding the option for explosions to damage the explosion cause (not the default behavior, and previously impossible to do, as far as I know). This is done by overloading existing methods with an extra `excludeSourceFromDamage` parameter.

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-09-28 21:32:56 +02:00
TamionandJake Potrebic 7b03141498 Add startingBrewTime (#11406)
* add startingBrewTime

* casting

* requests

* comments and fix setBrewTime

* a

* b

* move to own class

* rename

* missing Paper comment

* missing experimentals

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-09-28 12:14:20 -07:00
Jake Potrebic e17eb6be0c Improve entity effect API (#11444) 2024-09-28 20:05:45 +02:00
Jason Penilla 41bc31b79b Update paperweight to 1.7.3 (#11445) 2024-09-28 17:03:58 +02:00
Jake Potrebic b7ab22dee1 Fix console completions on invalid commands (#7603) 2024-09-27 11:05:15 -07:00
masmc05andBjarne Koll 8f56db871b Add enchantWithLevels with tag specification (#11438)
* Add enchantWithLevels with tag specification

* Finalise

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-09-27 11:04:57 -07:00
Jake Potrebic f33611cbc3 fix ItemStack#removeEnchantments creating non-stackable items (#11442) 2024-09-27 10:58:11 -07:00
Jake Potrebic dd6d1842bb Remove redundant fillUsableCommands call (#11425) 2024-09-27 18:49:18 +02:00
Jake Potrebic 9c76642f99 Deprecate for removal Block#isValidTool (#11439)
The method's implementation uses Block#getDrops
which re-computes the drops from the loot table each
call leading to isValidTool returning different values
with subsequent calls.
2024-09-27 18:28:04 +02:00
Brokkonaut 01c4820450 Call EntityDropItemEvent when a container item drops its contents (#11441) 2024-09-27 18:27:14 +02:00
Stefano 627cc64eea Adjust HAProxy's existance to log for console masters (#11433) 2024-09-27 18:19:29 +02:00
Jake Potrebic 20ec62255d use correct types for preloading CraftRegistry
also add a check in CraftRegistryEntry constructor to
make sure preload class isn't in net.minecraft package
2024-09-26 14:20:09 -07:00
Jake Potrebic 1bc02e6b23 Fix tag lifecycle event handlers not disabling /reload 2024-09-24 19:33:30 -07:00
Jake Potrebic 9b1ee0d87d Add missing key files and cleanup registry definition order 2024-09-23 17:36:32 -07:00
Jake Potrebic acdd6d35ad make MenuType implement FeatureDependant 2024-09-23 15:03:52 -07:00
Jake Potrebic 4514c71a7f Only call EntityPortalExitEvent if entity is actually in a portal 2024-09-22 14:36:17 -07:00
Jake Potrebic e8297c4cca Expand out datapack API (#10828)
* Expand out datapack API

* add getTitle

* better enable check
2024-09-22 14:28:45 -07:00
TreemanKingandJake Potrebic 540deb7ef7 Fix Color Particle API (#10895)
* fix: check datatype of particles rather than particle-type

* feature: add ARGB channels

It keeps the functionality of the original color(int).

* fix: order

* fixes

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-09-22 14:06:40 -07:00
Nassim Jahnke 2f50b87277 Fixup command precprocess cancellation (#11424) 2024-09-22 21:25:37 +02:00
Nassim Jahnke 81d94483a2 Add ItemStack array serialization methods (#10387) 2024-09-22 21:02:06 +02:00
Oliver Janka 1cb2bf466f Add velocity forwarding secret env override (#10127)
Previously, the velocity forwarding secret could only be configured via
the configuration option in the global paper configuration.
This makes configuring/passing such a value rather difficult for
containerized/orchestrated servers as these configuration files are
usually part of the server data volume itself and hence cannot be
sourced from a secret.

This commit enables administrators to define the PAPER_VELOCITY_SECRET
environment variable, which will override any potentially configured
velocity secret.
2024-09-22 20:25:27 +02:00
Bjarne Koll 78feecb12f Deprecate BlockType#isInteractable (#11427)
While BlockType is still marked as internal, it mirrors the already
paper-deprecated method #isInteractable.

The commit marks said method as deprecated if/when BlockType becomes
experimental/non-internal.
2024-09-22 20:09:41 +02:00
Lulu13022002 1ed64f8270 Update launchProjectile API (#11300) 2024-09-21 21:19:02 +02:00
Jake Potrebic 593faf4fc3 Create TileStateInventoryHolder (#11420)
Adds a missing interface to centralize getSnapshotInventory methods.
2024-09-21 20:09:29 +02:00
Bjarne Koll 5bcb2ff9e4 Correctly launch WindCharges (#11418)
The launch API on LivingEntity only respected the WindCharge type, not
its near-clone BreezeWindCharge.

This commit correctly accounts for BreezeWindCharge in
CraftLivingEntity.
2024-09-21 20:08:31 +02:00
Newwind d61175421d Disable pretty printing for advancement saving (#11419) 2024-09-21 20:01:22 +02:00
Bjarne Koll 9c450388e1 Return null in getRegistry(Class) for unknown type (#11422)
The Bukkit#getRegistry(Class) method contract specifies that it returns
null for unknown registry types. The current implementation however
requires the passed class to be mappable to a known registry key.

For types like Material, which have a SimpleRegistry in bukkit's
Registry interface, no server side registry exists and such the type
cannot be mapped to a registry key.

The commit correctly returns null for types that are not mappable to a
registry key instead of throwing a NullPointerException.
2024-09-21 19:57:08 +02:00
Bjarne Koll c5a10665b8 Remove wall-time / unused skip tick protection (#11412)
Spigot still maintains some partial implementation of "tick skipping", a
practice in which the MinecraftServer.currentTick field is updated not
by an increment of one per actual tick, but instead set to
System.currentTimeMillis() / 50. This behaviour means that the tracked
tick may "skip" a tick value in case a previous tick took more than the
expected 50ms.

To compensate for this in important paths, spigot/craftbukkit
implements "wall-time". Instead of incrementing/decrementing ticks on
block entities/entities by one for each call to their tick() method,
they instead increment/decrement important values, like
an ItemEntity's age or pickupDelay, by the difference of
`currentTick - lastTick`, where `lastTick` is the value of
`currentTick` during the last tick() call.

These "fixes" however do not play nicely with minecraft's simulation
distance as entities/block entities implementing the above behaviour
would "catch up" their values when moving from a non-ticking chunk to a
ticking one as their `lastTick` value remains stuck on the last tick in
a ticking chunk and hence lead to a large "catch up" once ticked again.

Paper completely removes the "tick skipping" behaviour (See patch
"Further-improve-server-tick-loop"), making the above precautions
completely unnecessary, which also rids paper of the previous described
incompatibility with non-ticking chunks.
2024-09-19 16:36:07 +02:00
Shane FreederandBjarne Koll 5c82955733 Only mark decorations dirty if a removal actually occurs (#11413)
* Only mark decorations dirty if a removal actually occurs

Vanilla calls this method blindly inside of a loop which erroniously marks
map data files as being dirty even if nothing has actually changed.

* Merge into existing patch

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-09-19 16:27:33 +02:00
4real 2aaf4369b6 Validate slot in PlayerInventory#setSlot (#11399) 2024-09-17 16:57:32 +02:00
Bjarne Koll 1348e44173 Prevent NPE when serializing unresolved profile (#11407)
In the recent upstream update, the paper player profile was updated to
correctly return null for both name and id if constructed as such. This
change however broke the serialisation logic, as it depended on the name
never being null.

The commit moves the checks over to the newly introduced emptyName/UUID
fields that track if the profile was constructed with a null name or
uuid to differentiate it against an empty string or the NIL_UUID.
2024-09-16 20:53:00 +02:00
Tamion 13a23951d7 Fix enable-player-collisions playing sounds when set to false (#11390) 2024-09-15 22:26:23 +02:00
Tamion 951e7ddc44 Fix TrialSpawner forgetting assigned mob when placed by player (#11381) 2024-09-15 22:20:38 +02:00
Jake Potrebic 0a53f1d10d Set default drop behavior for player deaths (#11380) 2024-09-15 21:51:35 +02:00
Bjarne KollandJake Potrebic d1a72eac31 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11405)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
1fc1020a PR-1049: Add MenuType API
8ae2e3be PR-1055: Expand riptiding API
cac68bfb SPIGOT-7890: AttributeModifier#getUniqueId() doesn't match the UUID passed to its constructor
7004fcf2 SPIGOT-7886: Fix mistake in AttributeModifier UUID shim
1ac7f950 PR-1054: Add FireworkMeta#hasPower
4cfb565f SPIGOT-7873: Add powered state for skulls

CraftBukkit Changes:
bbb30e7a8 SPIGOT-7894: NPE when sending tile entity update
ba21e9472 SPIGOT-7895: PlayerItemBreakEvent not firing
0fb24bbe0 SPIGOT-7875: Fix PlayerItemConsumeEvent cancellation causing client-side desync
815066449 SPIGOT-7891: Can't remove second ingredient of MerchantRecipe
45c206f2c PR-1458: Add MenuType API
19c8ef9ae SPIGOT-7867: Merchant instanceof AbstractVillager always returns false
4e006d28f PR-1468: Expand riptiding API
bd8aded7d Ignore checks in CraftPlayerProfile for ResolvableProfile used in profile components
8679620b5 SPIGOT-7889: Fix tool component deserialisation without speed and/or correct-for-drops
8d5222691 SPIGOT-7882, PR-1467: Fix conversion of name in Profile Component to empty if it is missing
63f91669a SPIGOT-7887: Remove duplicate ProjectileHitEvent for fireballs
7070de8c8 SPIGOT-7878: Server#getLootTable does not return null on invalid loot table
060ee6cae SPIGOT-7876: Can't kick player or disconnect player in PlayerLoginEvent when checking for cookies
7ccb86cc0 PR-1465: Add FireworkMeta#hasPower
804ad6491 SPIGOT-7873: Add powered state for skulls
f9610cdcb Improve minecart movement

Spigot Changes:
a759b629 Rebuild patches

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-09-15 21:39:53 +02:00
Nassim Jahnke 4ff58c4c48 Update spark 2024-09-12 19:54:34 +02:00
Jason Penilla e945cfe1c5 Fix PaperServerListPingEvent#getPlayerSample not being populated or used (#11387) 2024-09-10 19:52:30 +02:00
Jake Potrebic 61fe23cd08 deprecate isEnabledByFeature in Item/BlockType 2024-09-09 19:19:46 -07:00
Fabrizio La Rosa 971a7a5511 Add Decorated Pot Cracked API (#11365) 2024-09-08 22:12:36 +02:00
masmc05andBjarne Koll b09eaf2e8d Add Item serialization as json api (#11235)
* Item serialization as json

* Add ItemStackAdapter for Gson

* A javadoc note at #serialize() and #deserialize()

* Rebase

* Move serialize closer to deserialize

* Add explaining comment about SERIALIZE_CUSTOM_AS_SNBT usage

* Apply lynxplay requests

* Forgot `@NotNull`

* Very important diff was removed

* Rebase

* Javadocs

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-09-08 12:58:30 -07:00
Jake Potrebic 7632de5134 Tag Lifecycle Events (#10993)
* wip tags

* use generics in tag registrars

* comment out varargs methods for now

* split up patch

* cache loaded service provider

* finish renames

* use builderWithExpectedSize

* finalize
2024-09-08 11:56:09 -07:00
Nassim Jahnke 1ba1be7d26 Update Velocity natives again
If you segfault, update your jre/jdk™️
2024-09-08 20:39:00 +02:00
Jake Potrebic 426f9924a5 Enchantment is data-driven, so not FeatureDependant (#11377) 2024-09-08 10:42:44 -07:00
Jake Potrebic 925c3b9d2b Add FeatureFlag API (#8952)
* Add FeatureFlag API

* switch to index & move method

* fix test
2024-09-07 13:35:11 -07:00
Jake Potrebic a8e6a93aec Deprecate for removal all OldEnum-related methods (#11371) 2024-09-07 13:02:45 -07:00
Jake Potrebic 5d91bef46f Fix shulkerbox loot table replenish (#11366)
* Fix shulkerbox loot table replenish

* re-add loot table if cleared

* add config
2024-09-07 12:49:28 -07:00
Pedro 0e825274e5 Fix NPE while trying to respawn an already disconnected player (#11353) 2024-09-07 21:34:03 +02:00
Bjarne Koll 21f125f3c2 Revert velocity natives to 3.1.2 (#11368)
The updated velocity native compilation pipeline seems to emit binaries
that are not compatible with alpine.
The commit temporarily reverts the natives included until a proper
solution is found.
2024-09-07 11:00:57 +02:00
Newwind 3db475838f Check dead flag in isAlive() (#11330)
* Create 1055-Check-dead-flag-in-isAlive().patch

* Rebase
2024-09-06 15:06:32 -07:00
Lulu13022002 e0021b15b6 Fix allowSpiderWorldBorderClimbing world config (#11321) 2024-09-06 23:15:29 +02:00
Jake Potrebic 805a97444a Improve console completion with brig suggestions (#9251)
* Improve console completion with brig suggestions

* silence warning

* small fixes

* squashed
2024-09-06 13:37:09 -07:00
VelVeV 10f5879992 Change condition check order of entity tracking Y (#11348) 2024-09-06 22:14:20 +02:00
nathannm23 953e6e9918 Fire BlockExpEvent on grindstone use (#11346) 2024-09-06 22:14:10 +02:00
VelVeV 012c527671 Update Velocity natives (#11347) 2024-09-06 21:44:24 +02:00
lucko 691d452643 Fix bundled spark permission check (#11355) 2024-09-06 21:41:54 +02:00
Nassim Jahnke ff251e42b6 Use reference hash set in reference Holder (#11363) 2024-09-06 21:03:17 +02:00
Space Walker b483da4e02 Update Alternate Current to v1.9 (#11333) 2024-09-01 10:59:20 -07:00
TamionandJake Potrebic 227c94ae21 Fix inventory desync when placing blocks with spawn protection (#11090)
* fix

* mention mojira issue

* move to vanilla bug fixes patch

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-31 12:01:29 -07:00
TamionandJake Potrebic 2f0891ed81 Fix InventoryOpenEvent cancellation (#11304)
* fix

* other blocks

* add missing diff in ContainerEntity

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-31 11:50:24 -07:00
Newwind 509ea2fd17 Fix horse armor desync (#11341) 2024-08-31 20:29:50 +02:00
Jason Penilla e01ddf4627 Fixup porting issue in vanillaBiomeProvider impl (#11185) 2024-08-31 19:59:17 +02:00
Nassim Jahnke 25621248d3 [ci skip] Create SECURITY.md (#11331) 2024-08-27 18:12:32 +02:00
Gegy e08e6679fc Fix: synchronise sending chat to client with updating message signature cache (#11332)
In the case where multiple messages from different players are being processed in parallel, there was a potential race condition where the messages would be sent to the client in a different order than the message signature cache was updated. However, the cache relies on the fact that the client and server get the exact same updates in the same order. This race condition would cause the caches to become corrupted, and any future message received by the client would fail to validate.

This also applies to the last seen state of the server, which becomes inconsistent in the same way as the message signature cache and would cause any messages sent to be rejected by the server too.
2024-08-26 19:53:28 +02:00
Lulu13022002andJake Potrebic 789a267e93 Re-implement maxLeashDistance world conf and call missing event (#11301)
* Re-implement maxLeashDistance world config and call missing event

* migrate config setting to double or default

* fixes

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-25 14:32:32 -07:00
okx-code a7b8d9574e Add enchantment seed update API (#11282) 2024-08-25 22:39:06 +02:00
Isaac - The456 dd8c70a851 Ensure TabCompleteEvent always has a mutable backing list. (#11302) 2024-08-25 22:28:32 +02:00
DerEchtePilz 374d9c85ba Add a method to reset Lodestone compasses back to normal ones (#11308) 2024-08-25 22:25:13 +02:00
DerEchtePilz ad4c524c2f Properly destroy placed blocks on the end platform (#11292) 2024-08-25 21:19:40 +02:00
Jake Potrebic e2da65c689 Deprecate API relating to menu title changes (#11309) 2024-08-25 20:56:17 +02:00
Jake Potrebic 5167856bb8 Fix despawn ranges by defaulting to an ellipsoid shape (#11312) 2024-08-25 20:26:33 +02:00
Newwind 5b2c43edaf Remove set damage lootable item function from compasses (#11317) 2024-08-25 19:52:12 +02:00
Newwind 94444cebc3 Fix incorrect timestamp in region file header recalculation (#11318) 2024-08-25 19:42:15 +02:00
Lulu13022002 5625051564 Prevent duplicate pickup event for piglins (#11322) 2024-08-25 19:27:31 +02:00
Janet Blackquill 956b3d1c4e Ensure MaterialChoice materials are items (#11325) 2024-08-25 19:20:10 +02:00
Nassim Jahnke fcedb49fea Update spark-paper 2024-08-24 10:52:38 +02:00
roro1506HD 2fdb2e9dcd Fix structure check API (#11307)
* Fix structure check API

* Use CraftStructure#bukkitToMinecraft

* Fixed spelling mistake on CraftStructure class name
2024-08-20 18:27:33 -07:00
Jake Potrebic 32711191cd Fix SculkBloomEvent firing for block entity loading (#11306) 2024-08-19 14:28:03 -07:00
Nassim Jahnke e4b38b4f8c Fixup config parsing 2024-08-19 12:47:50 +02:00
DerEchtePilz a8cb8e6745 [ci skip] Fix JavaDocs for HeightMap#MOTION_BLOCKING_NO_LEAVES (#11291) 2024-08-19 11:48:20 +02:00
Anthony J. Halliday ba1b0162fa Allow server administrators to disable book size checks (#10457) 2024-08-19 11:46:39 +02:00
kokiriglade dae906ba45 Add getWorld method that uses adventure Key (#11199) 2024-08-19 11:41:55 +02:00
Nassim Jahnke 8fd3a67138 [ci skip] Clean up book limits patch (#11297) 2024-08-19 11:33:17 +02:00
Spottedleaf be1078f5f2 Use player file, not directory, when checking for offline player data
When trying to fall back to offline player data in onlide mode,
we need to use the player file. This fixes a mistake during
update where 'file' was used, but the new code uses 'file1'
for the player file.
2024-08-18 15:32:25 -07:00
Spottedleaf b4bc512cac Fix entity limit patch deleting unnecessary entities
We need to continue the save loop, not break from it
when a limit is reached.
2024-08-18 11:14:39 -07:00
SoSeDiKandJake Potrebic 64c9ee6584 Allow getting/setting the sign's editor uuid (#10637)
* Allow getting/setting the sign's editor uuid

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-17 14:36:27 -07:00
Tamion 44017487a8 Fix CraftBukkit drag system (#10703) 2024-08-17 23:31:38 +02:00
Isaac - The456 8c3018a4b1 Fix Selector Arguments not working with permission (#11286) 2024-08-17 23:20:21 +02:00
Lulu13022002 57dd822393 Leashable API (#10961) 2024-08-17 23:17:18 +02:00
Jake Potrebic 2e82fd2d2c Add even more Enchantment API (#11115) 2024-08-17 22:58:36 +02:00
Lulu13022002 66a97cc929 Update item data sanitization (#11227) 2024-08-17 22:30:21 +02:00
Jake Potrebic 0e7361704a Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11284)
Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
4068c6aa PR-1053: Change docs for max power in FireworkMeta
6b3c241b SPIGOT-7783, SPIGOT-7784, PR-1051: Add Trial Vault & Spawner event API
5fe300ec PR-1052: Fix broken links and minor improvement for checkstyle.xml

CraftBukkit Changes:
7548afcf2 SPIGOT-7872: Fix crash with event-modified teleports
93480d5d6 SPIGOT-7868, PR-1463: Fix default and max power in FireworkMeta
5060d1a84 SPIGOT-7783, SPIGOT-7784, PR-1460: Add Trial Vault & Spawner event API
11dfcae71 PR-1462: Fix broken links and minor improvement for checkstyle.xml

Spigot Changes:
ca581228 Rebuild patches
2024-08-17 12:39:11 -07:00
Tamion 75655ec1d3 Add Configuration for vertical Despawn Ranges (#11279) 2024-08-17 21:13:10 +02:00
Shane Freeder 52ae4ad466 Migrate ArmorStand meta to using entity tag (#11107) 2024-08-17 00:30:11 +02:00
Lulu13022002 d5ffc573dc Implement more methods for horse inventories (#11147) 2024-08-17 00:27:47 +02:00
Lulu13022002andJake Potrebic 4829fbf6bd Handle custom registry elements properly (#11230)
* Handle custom registry elements properly

* update error message

Datapack made painting variant support is added in https://github.com/PaperMC/Paper/pull/11244

* change msg for art conversion

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-16 14:21:35 -07:00
Lulu13022002 78216fef26 Re-implement portalCreateRadius world config (#11267) 2024-08-16 13:59:46 -07:00
Mart e619744fbd Allow skipping of world symlink validation (#11250) 2024-08-16 22:36:30 +02:00
Bjarne Koll 534ab86010 [ci-skip] Revert "Add Configuration for vertical Despawn Ranges (#10440)" (#11278)
This reverts commit 1b8ab116ed.
2024-08-16 22:33:52 +02:00
Tamion 1b8ab116ed Add Configuration for vertical Despawn Ranges (#10440) 2024-08-16 22:29:53 +02:00
AbelandBjarne Koll ec55c11fc0 Fix indestructable light blocks (#11275)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-08-16 22:13:00 +02:00
Lulu13022002 95719832bf Fix scanForLegacyEnderDragon world config (#11262) 2024-08-16 21:45:07 +02:00
81bfda8710 [ci skip] Specify rebase location in CONTRIBUTING (#11255)
* [ci skip] Specify rebase location in CONTRIBUTING

* Improve

* remove Paper-MojangAPI mention

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2024-08-16 12:41:58 -07:00
Spottedleaf fb530743e5 Apply optimise collision checking in move packet handling patch 2024-08-16 06:56:13 -07:00
Lulu13022002 bf5852a615 Fix NPE for PlayerPostRespawnEvent#getRespawnedLocation (#11268) 2024-08-16 09:20:57 +02:00
Lulu13022002 11b4ac7c65 Fix disableEndCredits world config (#11261) 2024-08-14 21:26:38 +02:00
hyperdefinedandJake Potrebic 9ab644ed29 Fix TooltipContext.create being wrong(#11254)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-14 14:39:45 +02:00
Nassim Jahnke 7c9240f4a6 Improve standard messenger logging 2024-08-12 18:42:08 +02:00
Jake Potrebic 1798e949e5 Fix BasicCommand suggestion arg count (#11241) 2024-08-12 09:40:39 +02:00
hyperdefined 4a97ba3ea8 Fix setSendViewDistance's return (#11247) 2024-08-12 09:27:27 +02:00
Jake Potrebic f97aff74b6 [ci skip] Fix Effect javadocs (#11182) 2024-08-12 00:35:45 +02:00
Lulu13022002 098bd39092 Remove arbitrary book page limit (#11228) 2024-08-12 00:30:23 +02:00
Newwind ab0d24aa6f Configuration for horizontal-only item merging (#11219) 2024-08-12 00:16:20 +02:00
Jake PotrebicandBjarne Koll dd941cc40a Re-add patches for can-place/can-destroy API (#11238)
* Re-add patches for can-place/can-destroy API

This API is all deprecated for removal and has to be replaced
as the structure of it has too radically changed

* update patches

* add link to MaterialRerouting

* Deprecation

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-08-11 13:51:37 -07:00
Jake Potrebic 1187544fb0 Fix teleport event getTo returning null (#11239) 2024-08-11 22:42:39 +02:00
Jake Potrebic 1c3c47ab0b Correctly check enchants for ItemStack#damage (#11240) 2024-08-11 13:27:24 -07:00
Lulu13022002 7d7f123e98 Fix wrong spawn reason for trial spawners (#11229) 2024-08-10 15:19:54 -07:00
Lulu13022002andJake Potrebic 1cecc24cad Fix tag key generator output inconsistencies (#11218)
* Fix tag key generator output inconsistencies

* use NonNull instead of NotNull for generated api

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-10 15:11:57 -07:00
Lulu13022002 70dfa467e7 Fix CraftMetaShield equality (#11232) 2024-08-10 15:08:00 +02:00
Nassim Jahnke 306d0dfdf0 Update generated code 2024-08-10 12:43:24 +02:00
Nassim Jahnke 83b6b26d39 Update to 1.21.1 2024-08-10 12:24:38 +02:00
Nassim Jahnke b1b5d4c1e4 Check shooter in configurable projectile relative velocity patch 2024-08-10 11:55:08 +02:00
Joo200 4d7cef3418 Fix source of knockback for spigot events (#11176) 2024-08-09 22:57:55 +02:00
Bjarne Koll 77a5779e24 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11197)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2ec53f49 PR-1050: Fix empty result check for Complex Recipes
10671012 PR-1044: Add CrafterCraftEvent
4d87ffe0 Use correct method in JavaDoc
ae5e5817 SPIGOT-7850: Add API for Bogged shear state
46b6d445 SPIGOT-7837: Support data pack banner patterns
d5d0cefc Fix JavaDoc error
b3c2b83d PR-1036: Add API for InventoryView derivatives
1fe2c75a SPIGOT-7809: Add ShieldMeta

CraftBukkit Changes:
8ee6fd1b8 SPIGOT-7857: Improve ItemMeta block data deserialization
8f26c30c6 SPIGOT-7857: Fix spurious internal NBT tag when deserializing BlockStateMeta
759061b93 SPIGOT-7855: Fire does not spread or burn blocks
00fc9fb64 SPIGOT-7853: AnvilInventory#getRepairCost() always returns 0
7501e2e04 PR-1450: Add CrafterCraftEvent
8c51673e7 SPIGOT-5731: PortalCreateEvent#getEntity returns null for nether portals ignited by flint and steel
d53d0d0b1 PR-1456: Fix inverted logic in CraftCrafterView#setSlotDisabled
682a678c8 SPIGOT-7850: Add API for Bogged shear state
fccf5243a SPIGOT-7837: Support data pack banner patterns
9c3bd4390 PR-1431: Add API for InventoryView derivatives
0cc6acbc4 SPIGOT-7849: Fix FoodComponent serialize with "using-converts-to" using null
2c5474952 Don't rely on tags for CraftItemMetas
20d107e46 SPIGOT-7846: Fix ItemMeta for hanging signs
76f59e315 Remove redundant clone in Dropper InventoryMoveItemEvent
e61a53d25 SPIGOT-7817: Call InventoryMoveItemEvent for Crafters
894682e2d SPIGOT-7839: Remove redundant Java version checks
2c12b2187 SPIGOT-7809: Add ShieldMeta and fix setting shield base colours

Spigot Changes:
fb8fb722 Rebuild patches
34bd42b7 SPIGOT-7835: Fix issue with custom hopper settings
2024-08-09 22:05:50 +02:00
Nassim Jahnke 4e6a2a13a3 Check for block type in SculkSensorBlock#canActivate 2024-08-07 14:34:12 +02:00
granny 042f15ffbd [ci skip] chore: fix incorrect commit hash in PR builds (#11198)
* fix incorrect hash in PR builds

* only apply ref on pull_request triggers
2024-08-06 10:37:26 -07:00
metabrix 7e44684a1f Fix wrong assumption about locale being null in the login phase (#11204)
Fixes #11203
2024-08-05 21:02:19 +02:00
Nassim Jahnke 5a5c3a4a24 Remove chunk unload trace debug
The issue the patch was initially added for has already been fixed and filling stacktraces can be expensive
2024-08-05 19:57:34 +02:00
Spottedleaf df3b6544f7 ConcurrentUtil: Fix concurrent long map resize chain pull function
The function assumed that the current resize chain pointed to
the previous table, when in fact it pointed to the current table.

The function is supposed to restore the resize chain to the previous
table, previous increment, and previous index + new increment.
2024-08-01 16:55:33 -07:00
Spottedleaf 0a1be9ae87 Make loadChunksForMoveAsync use new chunk system load calls
This is to allow the call to work properly when on Folia,
as Folia does not have a main thread.
2024-07-30 19:50:14 -07:00
Jason Penilla 58c7ea3193 Preserve command node when re-registering modern commands through old API (#11184)
* Preserve command node when re-registering modern commands through old API

* make fix more targeted

mainly because it didn't work for vanilla commands :)
2024-07-30 11:42:55 -07:00
Jason Penilla 67d414a927 Allow plugin aliases to override vanilla commands (#11186)
fixes #11035
2024-07-30 11:28:05 -07:00
Spottedleaf 227544cfc7 Move TickThread changes from Moonrise patch to MCUtils
The common changes from Moonrise should be entirely in MCUtils
2024-07-30 05:32:20 -07:00
Shane Freeder 100d75a11c Don't entirely die just because a plugin jar was bad 2024-07-29 16:54:46 +01:00
Shane Freeder 438863c4c5 Shutdown L4J cordially if the server stops before it's even started (#11172)
primarily, this allows us to ensure that appenders are flushed, console, log files
before the JVM exits to avoid issues such as error messages disappearing
2024-07-29 16:10:53 +01:00
Spottedleaf 0246a9da86 Add mob bucket items to item id to entity map in DataConverter
Mojang missed these in their mapping. Since the entity data
is used when spawning the bucketed mob, we need to have these
inside the id map to ensure that the entity data is converted
correctly if the entity id is missing.
2024-07-28 17:40:59 -07:00
Spottedleaf 3234b20ee4 Do not allow chunk unloading outside of the regular tick loop
Allowing chunk loading to occur at any point via purgeUnload()
introduces possible undesirable behavior to occur recursively
inside the chunk system.
2024-07-28 16:18:25 -07:00
Spottedleaf 50bdfc3e2c Null check tracker in Entity#resendPossiblyDesyncedEntityData
Accidentally dropped this check last commit. It is possible
that this is called while the entity is not tracked.
2024-07-28 15:49:38 -07:00
Spottedleaf f774787a39 Copy missed changes to chunk system from Folia 2024-07-28 15:34:07 -07:00
Spottedleaf 694b120d0b Remove Entity tracker field
Now the only tracker field is from the entity tracker
optimisations.
2024-07-28 15:28:52 -07:00
Jake Potrebic f82bea6940 Add argument for FinePosition to brig API (#11094) 2024-07-28 11:23:18 -07:00
powercas_gamer dcbd99de4a Fix Owen's typos (#11179) 2024-07-28 10:58:57 -07:00
Tamion 66165f712a Fix PickupStatus getting reset (#11154) 2024-07-27 16:37:51 +02:00
Newwind 645a677122 Make max interaction range configurable (#11164)
The server validates incoming interaction packets by ensuring the player
sending them is inside their interaction range. For this, the server adds
a magic value, by default 1.0, to the original interaction range to
account for latency issues.

This value however may be too low in high latency environments.
The patch exposes a new configuration option to configure said value.
2024-07-27 14:18:16 +02:00
Shane Freeder e1462a9253 Bump MCUtils#asyncExecutor core size
Long ago we discovered that the default thread pools would not increase
the number of threads running the pool until queue addition failed.
Bumping the core size mitigates an issue with spark-paper, and in general,
keeping async threads around generally beats having to spin new ones
everytime we want to execute a periodic async task.
2024-07-26 13:43:48 +01:00
Lulu13022002 5a5035be96 Fix a couple of ItemMeta related NPEs (#11149) 2024-07-23 10:11:00 +02:00
powercas_gamer 5512af798f [ci skip] remove timings from issue templates (#11127) 2024-07-22 23:30:57 +02:00
Lulu13022002 73a863b337 Fix horse inventories indices (#11139) 2024-07-22 15:17:25 +02:00
Tamion aa36ae6576 Fix EntityUnleashEvent cancellation on distance cause (#11131) 2024-07-21 12:33:37 +02:00
Riley Park 3a47518b4b Deprecate more Timings things for removal (#11126) 2024-07-20 19:40:41 -07:00
Riley Park 7e91a2c3ab Update the bundled spark version 2024-07-20 13:56:37 -07:00
Riley Park 9aea24002a Properly lookup plugin classes when looked up by spark
fixes #11124
2024-07-20 13:00:29 -07:00
Riley ParkandJason Penilla aa3b356834 Improve server startup logging (#11110)
* Improve server startup logging

* Add plugin info at startup

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2024-07-20 10:36:52 -07:00
Riley Park 5fee9c62da Move configuration option to a system property 2024-07-20 10:14:55 -07:00
Riley Park 681c01336b Bundle spark (#11093) 2024-07-20 09:35:39 -07:00
Jason Penilla f1f01a1622 Adjust done message again (#11118)
what paper now shows as level loading time is the time displayed by vanilla or spigot in the 'done' message

the time in the done message is now the actual time since the servers Main class was initialized
2024-07-19 12:36:09 -07:00
Bjarne Koll 968bdeb46f Make CraftComplexRecipe extend CraftingRecipe (#11114) 2024-07-19 19:29:31 +02:00
Nassim Jahnke e71c1df54c Call PlayerChunkUnloadEvent 2024-07-19 13:50:38 +02:00
Nassim Jahnke 7ea403902b Fixup startup time log message 2024-07-19 13:38:43 +02:00
Nassim Jahnke 75af62b298 Split rewriting flag into paper.disableOldApiSupport and paper.disablePluginRemapping (#11108) 2024-07-19 13:08:08 +02:00
Bjarne Koll 2a39276794 Add CrafterCraftEvent (#11082)
Ports the proposed CrafterCraftEvent proposed in an
open upstream PR.

See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/1044
2024-07-19 11:21:26 +02:00
Jason Penilla d08e8d1afa Add total time to done message (#11109)
* Add total time to done message

Previously it would only show the world load time which is misleading

* Add comments
2024-07-18 15:33:14 -07:00
Nassim Jahnke a8db527449 Even more cleanup of mcutil patch 2024-07-18 18:15:13 +02:00
granny 3c8a7fe1a4 Re-add missing chunk event calls (#11104) 2024-07-18 13:34:34 +02:00
Nassim Jahnke dd11ef8441 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11102)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
3a3bea52 SPIGOT-7829: Increase maximum outgoing plugin message size to match Vanilla intention
5cd1c8cb SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT
a8e278f0 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals
53729d12 Remove spurious ApiStatus.Internal annotation
b9f57486 SPIGOT-7799, PR-1039: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent
7983b966 PR-1029: Trial changing a small number of inner enums to classes/interfaces to better support custom values

CraftBukkit Changes:
403accd56 SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT
812761660 Increase outdated build delay
bed1e3ff6 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals
2444c8b23 SPIGOT-7823: Suspicious sand and gravel material are not marked as having gravity correctly
aceddcd0b SPIGOT-7820: Enum changes - duplicate method name
a0d2d6a84 SPIGOT-7813: Material#isInteractable() always returns false
8fd64b091 SPIGOT-7806: Handle both loot and inventory item drop behaviour in PlayerDeathEvent
a4ee40b74 SPIGOT-7799, PR-1436: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent
082aa51c5 PR-1424: Trial changing a small number of inner enums to classes/interfaces to better support custom values
66e78a96b SPIGOT-7815: Consider EntityDamageEvent status for Wolf armor damage

Spigot Changes:
5bbef5ad SPIGOT-7834: Modify max value for generic.max_absorption
2024-07-18 10:13:20 +02:00
Jake Potrebic 44c3dd0d4c fix exact choice shapeless recipes (#10973) 2024-07-17 12:48:31 -07:00
Spottedleaf 2df5bba16a Log throwable when failing to save chunk/poi/entity data 2024-07-17 11:48:24 -07:00
Spottedleaf b653276565 Finish chunk tick iteration optimisation port from Moonrise 2024-07-17 11:34:26 -07:00
Spottedleaf 4efd24b336 Remove unused chunk system hooks in MCUtils 2024-07-17 11:08:28 -07:00
Spottedleaf 00b949f1bb Remove Moonrise utils to MCUtils, remove duplicated/unused utils 2024-07-17 10:28:32 -07:00
Spottedleaf 967f98aa81 Optimise chunk tick checking during chunk tick
We don't need to check for this with the chunk system, as
ticking chunks are actually guaranteed to ticking. Additionally,
ticking chunks may only become non-ticking during the chunk holder
manager tick - which will not happen during chunk ticking.
2024-07-17 07:43:49 -07:00
Spottedleaf 05ed6a6ff5 Fix priority scheduling logic
This resolves sync loads not being properly prioritised.
2024-07-17 07:39:30 -07:00
Riley Park ceeb8c14ee Disable timings by default (#11095) 2024-07-16 17:33:40 -07:00
Jake Potrebic 506f1651e5 Don't store removed components in multiple places (#11091) 2024-07-16 16:39:57 -07:00
Jake Potrebic a6ceda12c5 distinguish between null and empty map in API (#10829) 2024-07-16 11:36:07 -07:00
Tamion ef96a69e84 Fire EntityChangeBlockEvent for weaving potion effect (#11087) 2024-07-16 10:15:18 +02:00
Jakub Zacek 2cd8c461af Add OMINOUS_ITEM_SPAWNER SpawnReason (#10897) 2024-07-15 17:35:51 -04:00
Spottedleaf b57b24d549 Do not try to stop main thread during watchdog shutdown
In Java 21, Thread#stop is no longer implemented and wiill throw
an exception when called. As a result, we simply cannot halt
the main thread during shutdown anymore.
2024-07-15 12:46:23 -07:00
Spottedleaf 9fd77108e3 Apply automatic regionfile header recalculation patch 2024-07-15 12:20:47 -07:00
Spottedleaf 77fcb29607 Apply incremental player/level saving patch 2024-07-15 11:57:56 -07:00
Spottedleaf 3b45454190 Port random ticking optimisation from Moonrise 2024-07-15 11:13:08 -07:00
Spottedleaf 8b23018575 Avoid collision shapes outside world border in findFreePosition
This is to correctly adhere to Vanilla behavior.
2024-07-15 09:56:17 -07:00
Lulu13022002 aa929d6666 Call PlayerLaunchProjectileEvent for wind charge (#10911) 2024-07-15 17:07:07 +02:00
Jake Potrebic 05e5865da3 Add ItemType#getItemRarity (#11049) 2024-07-15 16:38:20 +02:00
powercas_gamer b4f04ff4b3 Add Plugin#getDataPath (#11080) 2024-07-15 14:07:17 +02:00
Tamion 8b35adca88 Fix HelpCommand searching (#11066)
Prevent a IOB exception when querying topic
suggestions on query string `/`.

Additionally hide help topics indices if no topics
are visible to the player requesting them.
2024-07-15 12:42:10 +02:00
Malfrador 9fd5b3cfbd Add AttributeModifier constructor without EquipmentSlotGroup (#11079) 2024-07-15 12:31:41 +02:00
Lulu13022002 99ae7bbc97 Don't require author and title to be set on signed book meta (#11068) 2024-07-14 15:33:52 +02:00
Nassim Jahnke 34a2917dcc Add default canUse and permission methods to BasicCommand (#11047) 2024-07-14 14:04:38 +02:00
Nassim Jahnke 1595e4afc0 Make watchdog thread extend TickThread again 2024-07-14 13:59:18 +02:00
Spottedleaf 2288e13816 Update last chunk position in findSupportingBlock
Fixes fetching chunks needlessly multiple times.

Thanks Lulu13022002 for pointing this out
2024-07-13 11:44:52 -07:00
Bjarne Koll 5a503d7db4 Bulk bugfixes for itemstack damage API (#11063)
A general set of bugfixes for itemstack damage related logic.

1. Prevent NPE when calling deprecated ItemStack#getMaxItemUseDuration()
2. Do not apply enchantments when damaging items via API
3. Do not error when passing a null equipment slot to hurtAndBreak
4. Correctly call PlayerItemBreakEvent
2024-07-12 20:47:08 +02:00
Nassim Jahnke ffe31a1cd0 Readd async saveddata io 2024-07-12 17:58:54 +02:00
Bjarne Koll 70ff1ec079 Only skip damage tick if damage is unmodified zero (#11058)
Only skip the damage tick logic on player entities if the original
damage was zero and was not modified by plugins down the line.

This way all the following three scenarios trigger the damage tick

  a) vanilla damage was 0, plugin set it to non zero
  b) vanilla damage was non zero, plugin did not modify it
  c) vanilla damage was non zero, plugin set it to zero.

Regarding case c, the argument here is that EntityDamageEvent#setDamage
should not modify the damage tick logic.
2024-07-12 09:47:50 +02:00
Nassim Jahnke 2773dc4847 Add light block to indestructible block list 2024-07-12 09:24:50 +02:00
Shane FreederandNassim Jahnke c6e9579688 Fix explosions calculation getting stuck (#11061)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2024-07-12 09:16:03 +02:00
Spottedleaf 0e02aa5b8e Port watchdog detail patch 2024-07-11 12:28:27 -07:00
Spottedleaf 1d0fcb5aaf Port lag compensation patch 2024-07-11 12:22:59 -07:00
Spottedleaf 821081d646 Drop unapplied patches
1012-Use-distance-map-to-optimise-entity-tracker.patch:
1025-Collision-optimisations.patch:
1034-Actually-optimise-explosions.patch:
1039-Send-full-pos-packets-for-hard-colliding-entities.patch:
Implemented in Moonrise patch

1037-Distance-manager-tick-timings.patch:
Not needed

0668-Implement-regenerateChunk.patch:
API does not appear to be used, and it is a real pain to
implement this properly. The old patch did not handle
populators correctly, for example.
2024-07-11 12:13:41 -07:00
Spottedleaf 90ae1dc573 Port collision optimisation patch from Moonrise
Drop random ticking optimisation for now
2024-07-11 12:09:15 -07:00
Spottedleaf 7bd22b1835 Optimise entity tracker
Patch is ported from Folia
2024-07-11 09:23:56 -07:00
Spottedleaf f250ec0a2e Increment ChunkHolderManager current tick
This is an oversight from copying from Folia. The current tick
should be incremented so that incremental autosave can properly
occur.
2024-07-11 08:57:31 -07:00
Spottedleaf a594d182e4 Fix entities not being visible to clients when teleporting
When teleporting, the spawn position packet will contain the
old position. Then the following tracking update will send a
teleport packet, but the client will lerp the position change
over 3 ticks. However, the client does not tick entities in
unloaded chunks - resulting in the lerp never occuring.

We fix this by sending the current position in the spawn packet.
2024-07-11 08:34:10 -07:00
Spottedleaf 8b558d9e0b Apply entity tracker desync patch 2024-07-11 08:15:36 -07:00
Spottedleaf f7124df56b Fix recursive chunk loading in chunk unload event
Since the chunk may not even be at a loaded ticket level, the
getChunk call may invoke a sync load. To prevent this, we can
retrieve the full loaded chunk first which is guaranteed to be
non-null when unloading.
2024-07-11 07:16:42 -07:00
Nassim Jahnke 20889d04d8 Fix method reflection remapping with null parameter types passed
Fixes #11052
2024-07-10 18:22:02 +02:00
Bjarne Koll b0ef3ca25a Only call EntityDamageEvents before actuallyHurt (#11045)
The recent upstream update moved around the event logic for
EntiyDamageEvent and its derivatives.
However, the event was called on every call to #hurt as it was moved out
of actuallyHurt.

This patch moves the invocation directly before the #actuallyHurt calls,
respective invulnerable timings.
2024-07-09 17:13:51 +02:00
Bjarne Koll 70b0e84476 Properly apply damage tick after absorption (#11043)
The logic in place to prevent players from processing a damage
tick/knockback/etc when hit with 0 damage incorrectly used the damage
events final damage value, which is reduced by absorption.

Instead, use the event's "raw damage", e.g. the amount passed to hurt,
in order to determine if the damage tick should be skipped.
This still allows plugins to change the damage to a non-zero value and
properly damage ticks the player in such a case, but correctly processes
the damage tick in cases where the original damage is non zero but the
actual damage is.
2024-07-08 21:20:18 +02:00
Nassim Jahnke 62ed302bf4 Fix entity distance check when applying knockback
Fixes #11036
2024-07-07 19:27:45 +02:00
Jake Potrebic 2fa5e0e0df Fix horse inventories (#11028) 2024-07-06 14:25:23 -07:00
Bjarne Koll 4d20922b79 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11024)
* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
e86f4dc4 PR-1041: Improve getPlayer(String) docs to clarify it matches the name
9738f005 Fix spawner API documentation
69ebd9fd PR-1034: Add TrialSpawnerSpawnEvent
23cffd9c PR-973: Improve spawner API and add API for Trial Spawners
8bf19163 PR-1038: Clarify HumanEntity#openInventory(InventoryView) JavaDoc
1ff76351 SPIGOT-7732, SPIGOT-7786: Add freezing damage modifier
02161cb4 PR-1034: Add CreatureSpawnEvent.SpawnReason#TRIAL_SPAWNER
f9cb6f34 SPIGOT-7777: All entity potion effects are removed on death
25d548eb PR-1031: Expose Creeper igniter
ccbf0915 SPIGOT-7770: Reserve spaces in shaped recipes for blank ingredients
17f7097c Clarify ambiguity around what is API
71714f0c Remove note from InventoryView JavaDoc
aaf49731 PR-1030: Deprecate more unused methods in UnsafeValues
3a9dc689 SPIGOT-7771: Material.getDefaultAttributes always returns an empty map

CraftBukkit Changes:
c3ceeb6f7 SPIGOT-7814: Call PlayerShearEntityEvent for Bogged
97b1e4f58 Fix wolf armor not dropping from use of shears
fd2ef563a SPIGOT-7812: Revert "SPIGOT-7809: Restore shield/banner conversion for base colours"
f672c351b SPIGOT-7811: Enchantments are applied on sweeping attack even if damage event is cancelled
cfe29350b SPIGOT-7808: Fix implementation of Enchantment#getName() for bad name return
19335f69e SPIGOT-7809: Restore shield/banner conversion for base colours
ae4f5a0be SPIGOT-7805: Fix jukebox deserialization
62e3b73a4 SPIGOT-7804: Fix written book serialization
aac911d26 SPIGOT-7800, SPIGOT-7801: Keep vanilla behaviour for items dropped on player death
13ece474f PR-1429: Implement TrialSpawnerSpawnEvent
bf13e9113 PR-1354: Improve spawner API and add API for Trial Spawners
515fe49e1 Increase outdated build delay
9cd5a19a0 SPIGOT-7794: Cancelling InventoryItemMoveEvent destroys items
ce40c7b14 SPIGOT-7796: Kickplayer newlines not working
5167256ff SPIGOT-7795: Fix damage/stats ignore the invulnerable damage time
f993563ee Improve cross-world teleportation handling
ab29122cf PR-1433: HumanEntity#openInventory(InventoryView) should only support views belonging to the player
764a541c5 SPIGOT-7732: Issue with the "hurt()" method of EntityLiving and invulnerable time
820084b5f SPIGOT-7791: Skull BlockState with null profile causes NullPointerException
5e46f1c82 SPIGOT-7785: Teleporting a player at the right moment can mess up vanilla teleportation
cbd95a6b3 SPIGOT-7772: Include hidden / non-sampled players in player count
3153debc5 SPIGOT-7790: Server crashes after bee nest is forced to update
e77bb26bb SPIGOT-7788: The healing power of friendship advancement is never granted
ee3d7258a SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem
2889b3a11 PR-1429: Add CreatureSpawnEvent.SpawnReason#TRIAL_SPAWNER
cdd05bc7f SPIGOT-7777: Speed attribute stays after death; missing EntityPotionEffectEvent call
d0e6af2d4 PR-1428: Expose Creeper igniter
d01c70e93 PR-1425: Fix bytecode transformation taking care of class-to-interface compatibility.
b2b08f68c SPIGOT-7770: Fix certain shaped recipes not registering
3f8e4161f PR-1426: Deprecate more unused methods in UnsafeValues
2c9dd879e SPIGOT-7771: Material.getDefaultAttributes always returns an empty map

Spigot Changes:
491f3675 Rebuild patches
0a642bd7 Rebuild patches
8897571b Rebuild patches
cb8cf80c Fix newlines in custom restart message
1aabe506 Rebuild patches
2024-07-06 21:19:14 +02:00
Jason Penilla 8d91b859cb Prioritize vanilla commands in function parsing (#11011)
* Prioritize vanilla commands in function parsing

* Handle command blocks as well
2024-07-04 11:49:00 -07:00
Nassim Jahnke be8ac7acc3 Fix respawn error due to null location
Closes #11017
2024-07-04 16:20:03 +02:00
Nassim Jahnke b89e6a0195 Readd more patches 2024-07-04 12:46:15 +02:00
Spottedleaf 8c8b227547 Execute chunk tasks mid-tick
If the server tick length is high, then the amount of time
available to process chunk tasks inbetween ticks is low. As a
result, chunk loading and generation may appear to slow down.

To ensure that chunk tasks are always processed, we add logic to
execute chunk tasks during tile entity tick, entity tick, chunk
random ticking, and scheduled block/fluid ticking. The mid-tick task
execution is timed so that it is not prioritised over the server
tick.
2024-07-03 19:22:43 -07:00
powercas_gamer 7eec21e80d [ci skip] add adventure-key javadoc (#11014) 2024-07-02 21:52:04 +01:00
granny b45d9b6c97 Fix summon_entity effect attempting to add incorrect entity (#11004) 2024-07-01 10:16:07 +02:00
Nassim Jahnke aa8d38d3db Add forRemoval to material data deprecations (#10996)
2018 is calling
2024-06-29 10:58:37 +02:00
Nassim Jahnke 1f5db50424 Change item/xp merge and entity tracking range defaults (#10986) 2024-06-27 22:08:34 +02:00
Spottedleaf dd49fba8c5 Fix NPE when retrieving an entity with a null UUID
While the null UUID is almost certainly an error, the old
implementation did not NPE as it used a plain HashMap for lookup
by UUID, whereas we use a ConcurrentHashMap which will NPE on
null keys.
2024-06-23 18:59:56 -07:00
Jake Potrebic dd31654684 bump reflection-rewriter to 0.0.3 (#10969) 2024-06-23 16:39:45 -07:00
Lulu13022002 b99d071a36 Swap some nullable annotations (#10960) 2024-06-24 00:42:44 +02:00
Jake Potrebic 1d3fc0ee68 Bump reflection-rewriter to 0.0.2 (#10927) 2024-06-24 00:29:50 +02:00
Jake Potrebic 897ece48d5 Call EntityPortalEnterEvent on endgateways and make cancellable (#10892) 2024-06-23 15:01:12 -07:00
Lulu13022002 5ae4758c8b Fix speed for launched trident using api (#10936) 2024-06-23 14:37:20 -07:00
Lulu13022002 97afc9a00c Fix StackOverflowError for new dispenser interaction (#10949) 2024-06-23 22:24:17 +02:00
SoSeDiK b2e5587a2e Expose LivingEntity#canUseSlot (#10930) 2024-06-23 22:11:39 +02:00
Lulu13022002 95aa440473 Add missing effect cause and deprecate PATROL_CAPTAIN cause (#10958) 2024-06-23 22:08:13 +02:00
scarfaceredandNassim Jahnke 19eefe9321 Fix SoundEffects only to players diff (#10966)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2024-06-23 22:03:32 +02:00
Shane Freeder 812701d901 Do not crash when an exp orb attempts to mend an unrepairable item 2024-06-23 14:04:58 +01:00
Lulu13022002 76c2f16f57 Fix wrong diff applying delta twice (#10959) 2024-06-22 20:11:34 +02:00
Pedro 77c763b5ef Fix PlayerShearBlockEvent drops ignored for Pumpkin (#10956) 2024-06-22 14:50:47 +01:00
Spottedleaf 19105a9019 Fix unload queue storing chunks in wrong sections
The unload queue stored the chunks in the same section as
the chunk coordinate, when it needed to apply the unload shift.

Additionally, change the default region shift to the ticket
propagator shift as there is no benefit to using a low region
shift since no regionizing is occuring. This makes the unload
queue shift 6, which should reduce the number of sections to deal
with while processing unloads.
2024-06-21 11:57:03 -07:00
Lulu13022002 9cd0201535 Preserve velocity for fireball (#10934) 2024-06-21 11:06:31 -07:00
Lulu13022002 0409a68f50 deprecate and update some entity tags (#10932) 2024-06-21 18:51:00 +02:00
Lulu13022002 081146c56e Validate using_converts_to for food component (#10931) 2024-06-21 18:48:48 +02:00
Lulu13022002 d64be7e10a Fix NPE of AbstractArrow#getWeapon (#10933) 2024-06-21 18:48:29 +02:00
Lulu13022002 a0fad76fb6 Fix base damage for trident (#10948) 2024-06-21 18:48:18 +02:00
Shane Freeder 0a1b133c28 Revert "Fixes exception log messages getting dropped during bootstrap (#10935)" (Closes #10945)
This reverts commit 2118196dd5.
2024-06-21 10:06:03 +01:00
Shane Freeder 8b1d26df0b Fix diff in sprint interruption option (Closes #10939) 2024-06-21 01:21:23 +01:00
Jake Potrebic 2118196dd5 Fixes exception log messages getting dropped during bootstrap (#10935) 2024-06-20 11:26:07 -07:00
Lulu13022002 bab07e0ff9 Validate speed for tool component rule (#10923) 2024-06-20 09:32:32 -07:00
Lulu13022002 666bc4dbb2 Experimental annotation changes (#10914)
* Experimental annotation changes

* wind charge damage type is not experimental anymore
2024-06-20 09:03:09 -07:00
Lulu13022002 cf60574a2f Fix jukebox playable component not being applied on item meta (#10922) 2024-06-20 08:57:56 -07:00
Spottedleaf 2df432f6af Re-add chunk system debug commands
Re-adds the 'chunkinfo', 'holderinfo' and 'debug chunks' commands.

Additionally, this re-adds chunk debug dumping during watchdog
long timeouts.
2024-06-19 12:11:21 -07:00
Spottedleaf e0d9d6028c Add debug for chunk system unload crash
Somehow, a chunkholder is present in the unload queue after
it has been unloaded. It is likely that this is a result of
adding the chunk holder to the unload queue while it is
unloading. However, that should not be possible.

To find out where it is being added to the unload queue, track
the last stacktrace which adds to the unload queue and check
on chunk holder remove if the holder is present in the unload queue
and log the stacktrace.
2024-06-19 10:55:04 -07:00
Spottedleaf f4ddd4ac24 Fix ChunkHolder#getFullChunkNow returning non-null when it should not
In the new chunk system, the chunk is only at FULL when either
the FULL callbacks have been invoked or during the FULL callbacks.
2024-06-19 10:42:48 -07:00
Spottedleaf 38428c0d6c Cleanup MCUtils patch for chunk system
Remove utilities that are unused, as well as replacing
the full chunk map with a concurrentutil implementation.

Additionally, fix the addition/removal of chunks to/from the
full chunk map so that getChunkIfLoaded correctly returns a
non-null chunk when calling the load or unload events.
2024-06-19 10:29:03 -07:00
Spottedleaf c0268ca86e Copy missing diff from old chunk system patch
Fixes:
- EntitiesLoadEvent/EntitiesUnloadEvent not firing
- Chunks not saving properly in a lot of cases
2024-06-19 09:27:15 -07:00
Spottedleaf 250e78c42a Re-add fixlight command 2024-06-19 08:41:24 -07:00
Jason Penilla 4ea696ffe4 Add ticket for chunk load in isChunkGenerated 2024-06-18 21:15:20 -07:00
Jason Penilla 3b1c85b3a2 Execute chunk tasks while waiting for chunk load in isChunkGenerated
this shouldn't be needed as we are requesting EMPTY status, however there is a deeper issue that we will just work around for now

fixes #10916
2024-06-18 21:04:35 -07:00
Jason Penilla d23825aa56 Add missing null check to getFullChunkIfLoaded
fixes #10915
2024-06-18 18:27:50 -07:00
Jason Penilla 126f6d7dc1 Remove getUnloadingChunkHolder check
It always returns null now. So it could NPE and is not useful.
2024-06-18 12:51:40 -07:00
Jason Penilla 7bbe6820c2 Fix CraftWorld#isChunkGenerated
The upstream implementation is returning true for non-full chunks.

This fix is not ideal since the new chunk system doesn't have a region file/chunk status patch. May want to be revisited before a non-experimental release.
2024-06-18 12:44:07 -07:00
Nassim Jahnke 090775eff4 Use ItemStack.empty() when air is passed into constructor 2024-06-18 15:31:30 +02:00
Bjarne Koll 4514f41ffa Correct duplicate attribute check (#10901)
Brackets got lost during the update, leading to an incorrect
precondition call.
2024-06-18 11:11:14 +02:00
Jake Potrebic b4b820851f Fix NPE for Jukebox#setRecord
Fallback to the global registry if no level exists
Fixes #10899
2024-06-17 17:44:04 -07:00
Emilia Kond b9f7098723 [ci skip] Fix javadoc mistake in EnchantmentRegistryEntry.Builder (#10898)
The javadoc for EnchantmentRegistryEntry.Builder accidentally refers to
GameEventRegistryEntry, which is a different buildable registry entry.
2024-06-17 22:54:49 +01:00
Nassim Jahnke 21c9a7c79d Rebuild patches 2024-06-17 21:21:06 +02:00
willkroboth b3e072a625 Fix hasFiredAsync parameter when AsyncPlayerSendCommandsEvent is called (#10896) 2024-06-17 21:17:51 +02:00
Jake Potrebic bf8552f0f0 Delegate ItemStack (#10852) 2024-06-17 21:12:42 +02:00
Nassim Jahnke 13992b17c7 Make chunk system loggers calm down a bit 2024-06-17 13:43:21 +02:00
Nassim Jahnke 152f4feff3 Add back improved watchdog support patch 2024-06-17 13:36:43 +02:00
Jake Potrebic a7f6633362 make EntityPortalReadyEvent#setTargetWorld work again 2024-06-16 15:48:38 -07:00
Jake Potrebic fb762cf368 remove remaining reference to 'pgive' 2024-06-16 15:38:59 -07:00
Jake PotrebicandBjarne Koll 8dfb85c173 Enchantment and GameEvent Registry builders (#10889)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-06-17 00:00:12 +02:00
Jason Penilla de8220c3bc Update ChunkMap#distanceManager mapping patch 2024-06-16 14:50:57 -07:00
Nassim Jahnke 61b85e4cbf Fix legacy cb version in remapper 2024-06-16 23:23:50 +02:00
Spottedleaf f8ee0a06c5 Fix implementations of ChunkHolder#getChunkIfPresent
Implementations for ChunkStatuses below FULL are supposed to always
return ProtoChunk instances. However, since we used the last completed
status, it could return LevelChunk.

To resolve this, follow Vanilla behavior of tracking chunk
completions by status and replace old ProtoChunk statuses with
ImposterProtoChunk when the chunk generates to FULL.

Additionally, implement an optimisation for retrieving full chunks
by storing a map of pos -> LevelChunk. This requires only a simple
map lookup to occur for full chunks which are loaded.
2024-06-16 14:09:44 -07:00
Jake Potrebic d9111ccec2 Registry Modification API (#10893)
* Registry Modification API

* some fixes

* even more fixes
2024-06-16 12:39:59 -07:00
Nassim Jahnke 106dbae220 Fix getAddress connection check 2024-06-16 21:31:39 +02:00
Jake Potrebic 167961e744 call EntityDamageItemEvent for thorns 2024-06-16 09:47:53 -07:00
Bjarne Koll fbc2a55cde Update Wither#canTravelThroughPortals 2024-06-16 18:04:11 +02:00
Bjarne Koll e1c0033552 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2b4b6d14 PR-1023: Convert InventoryView to interface

CraftBukkit Changes:
68603b1c1 Use expanded interaction ranges for traced interact events
eae9f760c PR-1414: Convert InventoryView to interface
ee9eafe67 Fix Implementation for DamageSource#isIndirect for internal custom causing entity
2024-06-16 17:23:42 +02:00
Jake Potrebic ec4c712efa update 'improve mass craft perf' patch 2024-06-16 08:08:06 -07:00
Jakub Zacek d8c298007f Add Adventure API to ServerLinks (#10891) 2024-06-16 13:54:38 +02:00
Nassim Jahnke c84a3b541c Remove fully dropped patches 2024-06-16 13:14:53 +02:00
Nassim Jahnke dc684c60d1 Remove bad server.scheduleOnMain disconnect calls from old patches
The new behavior of disconnect to block the current thread until the disconnect succeeded is better than throwing it off to happen at some point
2024-06-16 12:56:00 +02:00
Nassim Jahnke 752f957e12 Add back more patches 2024-06-16 12:47:57 +02:00
Bjarne Koll 60f3bd8d0c De-deprecate BlockData#getDestroySpeed 2024-06-16 12:44:22 +02:00
Yannick Lamprecht 1f8e7a7b09 address compile and test issue (#10890) 2024-06-16 11:47:44 +02:00
Spottedleaf f873bcee24 Fix NPE in V3808
The armor items may not exist, so we need to null check it.
2024-06-15 22:59:15 -07:00
Owen1212055 7240d9d81c Restore functionality to sand dupe setting 2024-06-15 22:04:02 -04:00
Owen1212055 5a5412ca70 Owen fixing stuff!!! 2024-06-15 21:43:06 -04:00
Jake Potrebic 5e7cd0784b add some generated typed/tag keys 2024-06-15 15:52:14 -07:00
Spottedleaf b090c65fe0 Remove unnecessary changes from chunk status fix 2024-06-15 15:31:04 -07:00
Bjarne Koll e339ec27b4 Deprecate BlockData#getDestroySpeed for removal
The method sadly is not usable in 1.21 without a player as all of an
enchantments attribtue modifiers rely on a base value supplied by a
player. The method could only offer a rough estimate based on some
default values, however a better method for this should be added down
the line rather than trying to force such logic into the existing one.
2024-06-16 00:19:10 +02:00
Bjarne Koll 3555a7776e Properly forward DispenseEvent #getItem to saddle
Correctly use the DispenseEvent's #getItem ItemStack when placing the
saddle on entities during a dispense behaviour instead of the original
stack.
2024-06-16 00:01:55 +02:00
Bjarne Koll 7df472527f Configurable damage tick when blocking with shield (#10877)
A long standing bug in spigot and its derivatives was the fact that
players taking damage while blocking with a shield would not receive
invulnerability, while they do in vanilla.

This enabled the pvp technique of disabling a shield and immediately
attacking again to knock a player into the air.
While upstream fixed this and properly aligned itself with vanilla
damage logic (in this specific case) changing such long standing
behaviour has some downsides.

To allow players used to this specific bug to still use it, this patch
introduces a configuration option to re-introduce said bug.
As there is no easy way to *only* re-add this bug, the option is found
in the unsupported section as it may introduce other damage related
disparity from vanilla.
2024-06-15 23:17:51 +02:00
Aya d41636f445 Add back RecipeIterator fixes patch (#10887) 2024-06-15 21:53:46 +02:00
Jake Potrebic c1aefeecc6 correctly change enchantment registry to a 'delayed' version 2024-06-15 12:04:06 -07:00
Nassim Jahnke 56b5b7d452 Fix max chunk status checks 2024-06-15 19:57:59 +02:00
Nassim Jahnke 0008fa17e9 Add back more optimization patches 2024-06-15 19:24:11 +02:00
Bjarne Koll 04dad71064 Improve enchantWithLevels logic
Previously would stream and optionally filter out all entries in the
enchantment registry.
Moves it to using the empty optional if treasure is allowed, leaving the
logic to EnchantmentHelper.
2024-06-15 19:08:11 +02:00
Nassim Jahnke a835ad1076 Merge remote-tracking branch 'origin/dev/1.21' into dev/1.21 2024-06-15 18:52:19 +02:00
Ghast b420038799 Fix ItemMeta#removeEnchantments (#10886) 2024-06-15 18:52:01 +02:00
Jake Potrebic fb511c698e Fix Player#sendBlockState (#10855) 2024-06-15 18:52:00 +02:00
Jake Potrebic 5bd7f4e8ae Update AbstractArrow item method implementations for 1.20.6 (#10885) 2024-06-15 18:48:27 +02:00
Bjarne Koll 0b6701da5a Revert DamageSource#getCausingEntity to vanilla 2024-06-15 18:39:55 +02:00
Nassim Jahnke 4bc15f13aa Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
e2160a18 Make MapCursor#type not depends on deprecated values

CraftBukkit Changes:
6ce172642 SPIGOT-7761: Ender pearl does not damage or spawn endermites
f5a63f734 SPIGOT-7759: Chunk not there when requested in ChunkUnloadEvent
28287259c Remove unused import
eb9a7dde0 SPIGOT-7757: Cannot set item in Stonecutter Inventory
f8be9d752 Move deserialized removed unhandled tags to dedicated removedTags
a7e576186 Fix potential mutability issue with CraftMetaItem copy constructor
995885452 SPIGOT-7741: Vanilla ItemComponent in commands can't remove components
9ef69aa0b PR-1284: Move ItemType <-> ItemMeta linking to a centralized place
3e82eafbe PR-1420: Fix DirectEntity and CausingEntity Damager for Creepers ignited by Player
c23daa71f SPIGOT-7751: Fix crash caused by arrows from trial spawners
Make MapCursor#type not depends on deprecated values
SPIGOT-7761: Ender pearl does not damage or spawn endermites
2024-06-15 18:31:58 +02:00
Jake Potrebic 5d834b1b71 rebuild patches 2024-06-15 06:22:06 -07:00
Nassim Jahnke ee9b820fbe Update more optimization patches 2024-06-15 14:12:22 +02:00
Jason Penilla 097284d06b Bump tiny-remapper to 0.10.3
Fixes warnings when using some java 21 features
2024-06-14 21:44:18 -07:00
Jason Penilla 512fd08eca Update Gradle Wrapper to v8.8 2024-06-14 17:53:11 -07:00
Spottedleaf 730882fca9 Chunk System and Starlight WIP
Chunk system patch was refactored to take advantage of
newer ConcurrentUtil's concurrent long hash table (which
fixes hash collisions caused by chaining fastutil's long hash
and CHM's hash) plus some other minor improvements.

The chunk system was also merged with Starlight, which mostly
provides a small improvement to ThreadedLevelLightEngine#checkBlock
as the scheduling was rewritten.
2024-06-14 17:39:15 -07:00
Jake Potrebic ffe310a8e1 remove api that was scheduled for removal 2024-06-14 14:07:44 -07:00
Jake Potrebic 188cff20c7 remove old vanilla goals 2024-06-14 13:38:42 -07:00
Jake Potrebic 5fca3ae47b update generated API 2024-06-14 13:11:23 -07:00
Spottedleaf f5693896c5 Update ConcurrentUtil
Mostly for the primitive long to reference hashtable impl
2024-06-14 10:47:33 -07:00
Spottedleaf df633e5ffa DataConverter 1.21 2024-06-14 10:34:45 -07:00
Spottedleaf 38b3182a90 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
befcf86d SPIGOT-7740: Fix using new map cursor types
09229095 Add EntityDamageEvent.DamageCause#CAMPFIRE

CraftBukkit Changes:
a1d2cd152 SPIGOT-7747: Mob head is not dropped when mob was blown up by a charged creeper
8078294bc SPIGOT-7746: Server Crashing when Players Getting into End Portals
8d842e250 SPIGOT-7744: Fix exception for shooting projectiles with flame enchantment
64e0ad129 SPIGOT-7744: Fix crash when shooting arrows in creative mode
819f7a10a Fix player items not dropping on death
0a0229bb5 Implement DamageCause#CAMPFIRE and minor improvement in exception for Unhandled block damage
2024-06-14 10:15:52 -07:00
Nassim Jahnke 66f7b672ed Fix body equipmentslot and effect enum 2024-06-14 18:53:32 +02:00
Nassim Jahnke 038f8d915e Fixup and deprecate player profiles in ping event
The player sample uses game profile internally, but discards everything but the name and uuid and does not follow player profile restrictions, so it doesn't make sense to use that in the event.
2024-06-14 18:17:26 +02:00
Nassim Jahnke 5442bffab5 Make it compile 2024-06-14 18:02:15 +02:00
Bjarne Koll 184a943ad4 Adopt previous commit changes in API 2024-06-14 16:04:56 +02:00
Bjarne Koll 547f09dfa0 Some work on the ItemMend events 2024-06-14 16:01:00 +02:00
Bjarne Koll 69d1d0a4f4 Pretend to fix compile errors 2024-06-14 15:16:29 +02:00
Nassim Jahnke a308c7c8d7 Fix more compile issues 2024-06-14 14:28:06 +02:00
Nassim Jahnke 0d3ce2d704 Fix more compile issues 2024-06-14 14:11:52 +02:00
Nassim Jahnke 3c04f9f668 Fix a few compile errors 2024-06-14 13:07:50 +02:00
Bjarne Koll 6a34750160 Move unapplied patches to the back 2024-06-14 12:05:15 +02:00
Bjarne Koll 6d4e235784 988 2024-06-14 11:59:44 +02:00
Bjarne Koll 4140de28eb 960 2024-06-14 11:07:50 +02:00
Bjarne Koll a399f23903 956 2024-06-14 10:56:28 +02:00
Bjarne Koll 14c03366ed 922 2024-06-14 10:17:11 +02:00
Jason Penilla 33b36cde31 update some patches 2024-06-13 20:41:44 -07:00
Jake Potrebic 52b49fbcc8 788/1053 2024-06-13 18:30:23 -07:00
Jake Potrebic 8731266275 650/1053 2024-06-13 17:08:12 -07:00
Jake Potrebic ba163e10bb 585/1053 2024-06-13 16:32:45 -07:00
Bjarne Koll ed2ea4538e 538 2024-06-14 00:44:26 +02:00
Jake Potrebic 083bd9e75c 531/1053 2024-06-13 14:42:02 -07:00
Jake Potrebic 27e29ccaf2 487/1053 2024-06-13 13:57:13 -07:00
Jake Potrebic 0bc9aeef26 385 2024-06-13 13:14:13 -07:00
Jake Potrebic ec05cb8b38 279 2024-06-13 12:04:27 -07:00
Jake Potrebic 0b7552272a 194 2024-06-13 11:09:28 -07:00
Jake Potrebic 2055809b1e 117 2024-06-13 10:30:39 -07:00
Jake Potrebic 8a37f93925 62 2024-06-13 10:12:48 -07:00
Jake Potrebic 7fbb8278e7 Finish API patches 2024-06-13 08:45:43 -07:00
Bjarne Koll 79e2cb620e Update upstream (Bukkit/CraftBukkit/Spigot) (#10875)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
376e37db SPIGOT-7677: Update which entities are marked as spawnable
06c4add3 SPIGOT-7737: Add separate TreeType.MEGA_PINE
19b7caaa SPIGOT-7731: Spawn eggs cannot have damage
e585297e PR-1022: Add force option to Player#spawnParticle
d26e0094 PR-1018: Add methods to get players seeing specific chunks
8df1ed18 PR-978: Add Material#isCompostable and Material#getCompostChance
4b9b59c7 SPIGOT-7676: Enforce locale parameter in toLowerCase and toUpperCase method calls and always use root locale
8d1e700a PR-1020: Cast instead of using #typed when getting BlockType and ItemType to better work with testing / mocks
fa28607a PR-1016: Fix incorrect assumption of Fireball having constant speed
4c6c8586 PR-1015: Add a tool component to ItemMeta
6f6b2123 PR-1014: Add PotionEffectTypeCategory to distinguish between beneficial and harmful effects
f511cfe1 PR-1013, SPIGOT-4288, SPIGOT-6202: Add material rerouting in preparation for the switch to ItemType and BlockType
def44cbf SPIGOT-7669: Fix typo in ProjectileHitEvent#getHitBlockFace documentation
53fa4f72 PR-1011: Throw an exception if a RecipeChoice is ever supplied air

CraftBukkit Changes:
ee95e171a SPIGOT-7737: Add separate TreeType.MEGA_PINE
0dae4c62c Fix spawn egg equality check and copy constructor
ab59e847c Fix spawn eggs with no entity creating invalid stacks and disconnect creative clients
3b6093b28 SPIGOT-7736: Creative spawn egg use loses components
c6b4d5a87 SPIGOT-7731: Spawn eggs cannot have damage
340ccd57f SPIGOT-7735: Fix serialization of player heads with note block sound
fd2f41834 SPIGOT-7734: Can't register a custom advancement using unsafe()
02456e2a5 PR-1413: Add force option to Player#spawnParticle
6a61f38b2 SPIGOT-7680: Per-world weather command
58c41cebb PR-1409: Add methods to get players seeing specific chunks
16c976797 PR-1412: Fix shipwreck loot tables not being set for BlockTransformers
7189ba636 PR-1360: Add Material#isCompostable and Material#getCompostChance
900384556 SPIGOT-7676: Enforce locale parameter in toLowerCase and toUpperCase method calls and always use root locale
bdb40c5f1 Increase outdated build delay
d6607c7dd SPIGOT-7675: Fix FoodComponent config deserialization
b148ed332 PR-1406: Fix incorrect assumption of Fireball having constant speed
3ec31ca75 PR-1405: Add a tool component to ItemMeta
5d7d675b9 PR-1404: Add PotionEffectTypeCategory to distinguish between beneficial and harmful effects
960827981 PR-1403, SPIGOT-4288, SPIGOT-6202: Add material rerouting in preparation for the switch to ItemType and BlockType
94e44ec93 PR-1401: Add a config option to accept old keys in registry get calls
a43701920 PR-1402: Fix ChunkSnapshot#isSectionEmpty() is always false
87d0a3368 SPIGOT-7668: Move NONE Registry updater to FieldRename to avoid some class loader issues
2ea1e7ac2 PR-1399: Fix regression preventing positive .setDamage value from causing knockback for 0 damage events
ba2d49d21 Increase outdated build delay

Spigot Changes:
fcd94e21 Rebuild patches
342f4939 SPIGOT-7661: Add experimental unload-frozen-chunks option
2024-06-13 16:45:27 +02:00
Bjarne Koll 906df69f05 Prevent internal NPE on ItemStack#damage (#10836)
ItemStack#damage internally uses ItemStack#hurtAndBreak, which
previously would call a Consumer in case the item broke.
Since 1.20.5 the break game event logic however resides in said method
and was using the equipment slot passed, which is null in the case of
the API ItemStack#damage method.

This commit prevents the NPE by first null checking the slot.
Addittionally, hurtAndBreak also now checks if the player has infinite
materials, e.g. is in creative mode, to prevent damaging the item.

As such as filter is undesirable for API calls, this commit also skips
this logic in case of an API invocation.
2024-06-10 08:24:52 +02:00
Lulu13022002 bd5867a96f Handle alpha channel from potion_contents component (#10808) 2024-06-04 16:55:29 -04:00
Jake Potrebic 88d76d9fe5 Make Bogged implement Shearable (#10844) 2024-06-04 16:26:40 -04:00
Jake Potrebic 79c1ce1844 Add since to deprecated for removals (#10848) 2024-06-04 15:40:18 -04:00
Spottedleaf 4f13be937e Do not perform chunk existance check for I/O scheduling
In order to check if a chunk exists, the RegionFile lock
(if the RegionFile is opened) will be acquired. However,
the RegionFile may be performing I/O operations, in which
case will stall the acquire operation.

To ensure that threads scheduling loads do not incur a stall,
we can avoid this check entirely - the RegionFile I/O
thread(s) will eventually perform the exist check itself.
2024-06-03 13:31:41 -07:00
Bjarne Koll b8f2101c36 Only assign blockstate data if super ctor did not (#10841)
The CraftBlockStateMeta constructor CraftBlockStateMeta(Map) invokes its
parent constructor, which itself invokes deserializeInternal, which is
implemented on CraftBlockStateMeta to read the components and block
entity tag from the passed map.

Field initialization happens after the call to the super constructor,
meaning the current code overwrites the parsed internal data with the
EMPTY defaults.

This is prevented by moving the initialization into its own code block
that can null check the fields prior to defaulting their value to EMPTY.
2024-06-03 10:39:20 -07:00
Jake Potrebic 54fbd0cf0c clarify what getEntityId actually returns (#10839) 2024-06-03 10:20:43 -07:00
Jake Potrebic ac647513b2 Use RegistryOps in the correct places (#10843) 2024-06-02 15:19:17 -07:00
Bjarne Koll 5d8e53d78d Fix CommandSourceStack#bypassSelectorPermissions (#10837)
The previous implementation would throw a command exception if the
CommandSourceStack had its bypassSelectorPermissions flag set to true,
which is the incorrect behaviour.

Instead, it should only throw an exception if the flag is set to false
and all its other checks "fail" too.
2024-06-01 16:26:11 +02:00
Jake Potrebic 0513374b1f Fire TabCompleteEvent for legacy commands (#10834) 2024-05-31 17:46:42 +02:00
TotalledZebra 3181470ad7 Add entity heal API (#10267) 2024-05-30 22:31:45 +02:00
Jake Potrebic a47e11d464 fix knockback events (#10831)
* fix knockback events

* squash

* handle cancelled event for explosions
2024-05-30 13:17:16 -07:00
Jason Penilla 06e69c8991 Use CommandSourceStack in AsyncPlayerSendCommandsEvent (#10826) 2024-05-30 11:32:43 -07:00
Shane Freeder 8e6554a80a Fix sending disconnect packet in phases where it doesn't exist 2024-05-30 19:05:39 +01:00
Jake Potrebic 0fcf3e347f Deprecate InvAction#HOTBAR_MOVE_AND_READD (#10784) 2024-05-29 14:56:14 -07:00
SoSeDiK 27d2ed84f4 Extend fishing API (#10634)
Adds a missing fishing state when the fish is lured and fires an event for it.
Also adds a way to control the fish swimming time towards the bobber.
2024-05-29 23:45:01 +02:00
Jake Potrebic efd91e52a6 Add registry-related argument types (#10770)
* Add registry-related argument types

* fix tests
2024-05-29 14:11:52 -07:00
Jake Potrebic a31dc90741 Several fixes and new api for experience merging/stacking (#9242) 2024-05-29 22:58:57 +02:00
Bjarne Koll ed85aac53c Flatten namespaced vanilla command alias redirects (#10821)
The brigadier command dispatcher is not capable of executing commands
that redirect more than one.
The exemplary alias 'minecraft:tp' may hence not redirect to 'tp' it
instead has to redirect to 'teleport' as 'tp' itself is merely a
redirect.
2024-05-29 21:47:07 +02:00
Jake Potrebic 7e2b682e54 Fix skipping custom block entity tag (#10812) 2024-05-29 21:22:51 +02:00
Jake Potrebic d9e659a618 Allow firework effects with no colors (#10814) 2024-05-29 20:50:44 +02:00
Jake Potrebic 716b868b08 Use RegistryOps for loadAdvancement (#10799) 2024-05-29 20:27:29 +02:00
Jake Potrebic 672c07728f handle BODY slot for non-mobs (#10822) 2024-05-29 11:23:51 -07:00
Lulu13022002 84f6e6e0b1 Fix max temper API for llama (#10823) 2024-05-29 11:17:56 -07:00
Bjarne Koll 9d6f2cced7 [ci skip] Rebuild patches (#10803) 2024-05-28 14:19:41 +02:00
Bjarne Koll 9c917fef08 [ci skip] Clean up paperclip build-pr workflow (#10802) 2024-05-28 14:19:31 +02:00
Bjarne Koll b0c9b9c4d8 Only remove worldgen block entity on changed block (#10794) 2024-05-28 11:45:03 +02:00
Shane Freeder 23fe1166d4 Fix missing debug trace 2024-05-27 18:33:34 +01:00
Tamion 347bbe3897 Fix Cancelling BlockPlaceEvent calling onRemove (#10773) 2024-05-27 00:03:48 +02:00
Jake Potrebic b0e3ca43b8 Prevent NPE if hooked entity was cleared (#10712) 2024-05-26 23:41:30 +02:00
Lulu13022002 841ab4134d Fix more item desync when an event is cancelled (#10654) 2024-05-26 23:30:45 +02:00
Cross 1b8cdc6d82 Extend Player Interact cancellation to cover Jigsaw blocks (#10719) 2024-05-26 22:54:55 +02:00
Jake Potrebic 6649a171dc Fix BlockStateMeta equals (#10795) 2024-05-26 22:49:00 +02:00
Lulu13022002 ac4ee06c01 Fix integer overflow for lag compensating eating check (#10797) 2024-05-26 22:35:58 +02:00
Jake Potrebic 9774a52d11 fix and cleanup loot table patches (#10100)
* fix and cleanup loot table patches

* fixes
2024-05-26 12:51:15 -07:00
Lulu13022002 ca50b87947 Clear firework item properly (#10793) 2024-05-26 19:57:38 +02:00
Jake Potrebic a7ae966530 readd itemstack data sanitization (#10454)
* readd itemstack data sanitization

* use autocloseable
2024-05-26 10:56:33 -07:00
Jake Potrebic 4e10fadfdc reset meta block state on BlockStateMeta#setBlockState 2024-05-25 22:36:55 -07:00
Jake Potrebic 41bee55b53 Fix NPE for color-related metas
Fixes #10789
2024-05-25 19:55:51 -07:00
Janet Blackquill f0bd0cca8f Expose anvil cost in the API (#10682) 2024-05-26 01:47:14 +02:00
Jake Potrebic 26e90b9ffb Fix CraftMetaBlockState for data components (#10731)
This will go on forever...
2024-05-25 16:37:35 -07:00
Lulu13022002 535dca56c2 Fix a few issues with ItemMeta (#10740) 2024-05-26 00:58:56 +02:00
jake-brennan714 4fd3ac00b4 [ci skip] Update Player#getListeningPluginChannels Jdoc (#10778) 2024-05-25 23:59:01 +02:00
Lulu13022002 dff591d292 Allow to define new map cursor types (#10782) 2024-05-25 23:56:44 +02:00
TonytheMacaroni 377733d44c Use getter/setter on Mob for equipment drop chances (#10780) 2024-05-24 19:52:54 +02:00
Shane Freeder 3004717b0e Do not re-wrap vanilla goals (#10751)
There is no need to rewrap vanilla goals when they're being reregistered,
this breaks some expectations around behavior outside of general
wasting of resources.

Resolves: #10743
2024-05-24 16:22:41 +02:00
Jason Penilla 5e7b65a9a9 Allow using PluginLoader classpath API from Bukkit plugins (#10758)
Allows using the PluginLoader API without any of the other changes imposed by switching to a paper-plugin.yml.

Used by setting paper-plugin-loader in plugin.yml to the class name of your PluginLoader.

Also allows skipping the libraries field by setting paper-skip-libraries to true (by default both libraries and jars provided by the PluginLoader are added to the classpath).
2024-05-23 13:13:02 -07:00
Jake Potrebic 2a90732677 Remove incorrect logic for Fireball#setVelocity (#10764) 2024-05-23 12:48:11 -07:00
Jake Potrebic 6de7a1f052 Improve default item attributes API (#10765) 2024-05-23 11:44:07 -07:00
Jason Penilla d408381c77 Print CommandRegisteredEvent deprecation warnings again (#10756) 2024-05-23 10:44:45 -07:00
Jake Potrebic 3de408ee3e Fix equipment slot and group API (#10767) 2024-05-23 10:39:44 -07:00
Jake Potrebic a9201d4a7d [ci skip] Move logic in our patches to ItemType/BlockType (#10772) 2024-05-23 10:32:02 -07:00
Jake Potrebic b14958485d Always show command exception stack traces in logs (#10766) 2024-05-22 10:24:09 -07:00
Jake Potrebic d3ffa62b7f fix default item attributes 2024-05-22 07:16:50 -07:00
Spottedleaf 980cff9f29 Fix compile 2024-05-21 08:41:36 -07:00
Spottedleaf 66cb880754 Remove ThreadedWorldUpgrader patch
The patch does not implement Vanilla forceUpgrade behavior.
Specifically, poi/entity conversion and regionfile recreation.

The Vanilla force upgrader is also no longer broken by CB, so the
bug fixes from this patch are not relevant anymore.
2024-05-21 08:21:28 -07:00
Jason Penilla 9bf4855524 Add a better warning message than "Server performance will be affected" for CommandRegisteredEvent use (#10754) 2024-05-20 11:15:21 -07:00
Jake Potrebic 7d2e5c33ea Add an 'empty' RecipeChoice for certain ingredient slots (#10710) 2024-05-20 07:20:47 -07:00
Jake Potrebic 591521e697 Check for more correct profile validation (#10730) 2024-05-19 17:45:43 -07:00
Jake Potrebic b3b340617e fix CompassMeta not being correct (#10737) 2024-05-19 17:15:44 -07:00
Shane Freeder 0ad09de75b Make PaperSimplePluginClassLoader show class which is not found 2024-05-18 21:17:54 +01:00
Jake Potrebic 5a9afbee65 Fixes issues in the suppress dismount cancellation patch (#10735) 2024-05-17 14:37:16 -07:00
Jake Potrebic d8d59e0cde Fix NPE sending resource pack without prompt
Fixes KyoriPowered/adventure#1075
2024-05-17 14:22:45 -07:00
f17519338b Expose server build information (#10729)
* Expose server build information

* squash patches

* final tweaks

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
2024-05-15 17:06:59 -07:00
Jason Penilla 3fc93581bb Show stacktrace when modifyItemStack fails 2024-05-13 22:58:50 -07:00
Jason Penilla 2faa3b2f44 Correctly copy alias requirements in command upgrader
Fixes NPE when converting namespaced commands.

Since the brigadier command api, more aliased commands
(namespaced variants) are registered in the vanilla dispatcher,
which made this issue more apparent.
2024-05-13 15:55:15 -07:00
Spottedleaf bebcc9cc93 Make exception during command conversion non-fatal
Instead of allowing chunks to fail to convert completely,
simply log the exception and the offending command. Command
conversion failure should never result in chunk data deletion,
as commands are not critical chunk data.
2024-05-13 14:40:02 -07:00
scarfacered fa8a407072 Remove Adventure snapshot repo from dev bundle (#10716)
* Remove Adventure snapshot repo

* do not remove trailing comma
2024-05-13 10:38:28 -07:00
Jake Potrebic 218d33ccb1 fix creating complex recipes that have air results
Fixes #10715
2024-05-13 06:16:52 -07:00
Jake Potrebic 0688f212f5 Better way to keep paper datapack enabled 2024-05-12 21:48:07 -07:00
Jake Potrebic 11c39637de Improve Recipe validation (#10707) 2024-05-12 13:46:46 -07:00
Bjarne Koll f041f48458 Prevent infinite recursion on cyclic brig redirect (#10705)
Prevent infinite recursion when declaring a cyclic relation between
command nodes via child nodes redirecting to an nth parent by marking a
command node as unwrapped before unwrapping its children.
2024-05-12 17:41:21 +02:00
Owen 7e48f66c05 Properly pass requirement on namespaced redirects (#10701) 2024-05-11 23:46:42 -07:00
Jason Penilla 711f82e01e Fix signed book page serialization (#10696) 2024-05-12 00:13:18 +02:00
Jake Potrebic ac554ad46d Updated Upstream (Bukkit/CraftBukkit) (#10691)
Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fa99e752 PR-1007: Add ItemMeta#getAsComponentString()
94a91782 Fix copy-pasted BlockType.Typed documentation
9b34ac8c Largely restore deprecated PotionData API
51a6449b PR-1008: Deprecate ITEMS_TOOLS, removed in 1.20.5
702d15fe Fix Javadoc reference
42f6cdf4 PR-919: Add internal ItemType and BlockType, delegate Material methods to them
237bb37b SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent
035ea146 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
8c7880fb PR-1004: Improve field rename handling and centralize conversion between bukkit and string more
87c90e93 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent

CraftBukkit Changes:
4af0f22e8 SPIGOT-7664: Item meta should prevail over block states
c2ccc46ec SPIGOT-7666: Fix access to llama and horse special slot
124ac66d7 SPIGOT-7665: Fix ThrownPotion#getEffects() implementation only bringing custom effects
66f1f439a Restore null page behaviour of signed books even though not strictly allowed by API
6118e5398 Fix regression listening to minecraft:brand custom payloads
c1a26b366 Fix unnecessary and potential not thread-safe chat visibility check
12360a7ec Remove unused imports
147b098b4 PR-1397: Add ItemMeta#getAsComponentString()
428aefe0e Largely restore deprecated PotionData API
afe5b5ee9 PR-1275: Add internal ItemType and BlockType, delegate Material methods to them
8afeafa7d SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent
4e7d749d4 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
441880757 Support both entity_data and bucket_entity_data on axolotl/fish buckets
0e22fdd1e Fix custom direct BlockState being not correctly set in DamageSource
f2182ed47 SPIGOT-7659: TropicalFishBucketMeta should use BUCKET_ENTITY_DATA
2a6207fe1 PR-1393: Improve field rename handling and centralize conversion between bukkit and string more
c024a5039 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent
741b84480 PR-1390: Improve internal handling of damage sources
0364df4e1 SPIGOT-7657: Error when loading angry entities
2024-05-11 23:48:37 +02:00
b98d20a8ac Brigadier Command Support (#8235)
Adds the ability for plugins to register their own brigadier commands 

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-05-11 16:30:30 -04:00
Jason Penilla 447f9a1e16 [ci skip] Fix paperclip PR label 2024-05-11 11:13:19 -07:00
Jake Potrebic 6c02dbcfa1 handle recent ItemMeta changes in serialization logic 2024-05-11 09:14:23 -07:00
Jake Potrebic a61d58d467 adjust ItemMeta to distinguish null and empty modifiers
Fixes #10686 (again)
2024-05-11 07:16:23 -07:00
Jake Potrebic cdb6ba8ef1 Fix keepalive time interval (#10690) 2024-05-10 17:23:58 -07:00
Jake Potrebic 39532a1f8c Fix stacks losing empty attr modifiers
Fixes #10686
2024-05-10 12:05:07 -07:00
Jason Penilla 4fd58a1b8f Add conversion for summon command 2024-05-10 12:57:07 +02:00
Nassim Jahnke 7f1a154d15 Add validation to player profile and properties (#10680) 2024-05-10 12:52:03 +02:00
Spottedleaf 8748ae16ac Use MCDataConverter instead of raw convert call for cmd converter
MCDataConverter uses the breakpoint system, which for future
updates may be neccesary (probably not).

Also, add the 1.20.6 version field.
2024-05-10 00:34:37 -07:00
Joseph Burton 2df1dace32 Fix DataConverter ConverterParticleToNBT.parseProperties
- The old code was using `StringReader.peek()` in a place where it meant to be `StringReader.skip()`.
- The vanilla code allows a trailing comma, but only if there is no whitespace between it and the closing bracket, which is a bit weird. I think that's a bug and it shouldn't allow trailing commas, but if you disagree then only the first issue needs to be fixed.
2024-05-10 00:32:31 -07:00
Spottedleaf b56e92f3d4 Fix chunk data version check not running in chunk system
The old read() method should just redirect to the new
chunk system method, however due to an error in moving
the chunk system patch around the data version check was
left in the old (UNUSED) read() method.
2024-05-09 23:47:13 -07:00
Spottedleaf cc29d2b7d5 Invalidate PathTypeCache when pathfinding updates are disabled
The configuration should not allow the cache to break. Additionally,
invalidating the cache is cheap and as such there is no gain to avoid
invalidating it.
2024-05-09 23:07:32 -07:00
Spottedleaf 1b67e02385 Fix entity tracker desync when new players are added to the tracker
The delta position packet instructs the client to update
the entity position by a position difference. However, this position
difference is relative to the last position in the entity tracker
state, not the last position which has been sent to the player. As
a result, if the last position the player has recorded is different
than the one stored in the entity tracker (which occurs when a new
player is added to an existing entity tracker state) then the sent
position difference will cause a position desync for the client.

We can resolve this problem by either tracking the last position
sent per-player, or by simply resetting the last sent position
in the entity tracker state every time a new player is added.
Resetting the last sent position every time a new player is
added to the tracker is just easier to do, so that is what
this patch does.
2024-05-09 17:08:59 -07:00
Nassim Jahnke f2512b1238 Print data component type on encoding error 2024-05-09 15:12:12 +02:00
Nassim Jahnke ab2a85a35f [ci skip] Clarify var entry in contributing file 2024-05-09 15:10:27 +02:00
Shane Freeder 5729b294ee Update Adventure to 4.17.0 Release 2024-05-08 15:48:45 +01:00
Bjarne Koll eee55d019f Correctly compare holders in BeaconMenu (#10673) 2024-05-07 18:18:57 -07:00
Lulu13022002 89ad61fd00 Fix hopper pull event being skipped after the first call (#10667) 2024-05-07 14:28:45 +02:00
Jason Penilla 9e51f94941 Fix ping event always receiving protocol version 0 (#10671) 2024-05-07 14:24:45 +02:00
Jake PotrebicandBjarne Koll ac3a5471c8 Fix BlockStateMeta (#10647)
* Fixes CraftMetaBlockState block entity data components

* rebase and merge into general item meta fix

* Add javadoc notice

* Update message

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-05-05 12:56:46 -07:00
SoSeDiK 2a6a5fef59 Add a way to check whether the chest is blocked (#10635)
* More Chest Block API

* rebased and slight logic fixes
2024-05-05 10:57:28 -07:00
Bridge 21d91ce634 Prevent profile lookups when unnecessary (#10651) 2024-05-05 19:07:30 +02:00
Tamion 716dfd8698 Fix EntityLoadCrossbowEvent (#10645)
* fix

* hehe
2024-05-05 09:54:04 -07:00
Lulu13022002 816ea9ecd5 [ci skip] Update old particle reference in javadoc (#10652) 2024-05-05 18:44:06 +02:00
NonSwag 54c5ecb4e4 Add missing SpigotConfig logCommands check (#10659) 2024-05-05 18:41:02 +02:00
Nostal Yuu 0e43d3c103 Added API to get player's proxy address (#10400) 2024-05-05 18:39:32 +02:00
Jake Potrebic 9d8d38d137 Updated Upstream (CraftBukkit) (#10646)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
66fd94322 SPIGOT-7652: Remove remap for SPELL_MOB_AMBIENT which no longer exists
ecfa4f973 SPIGOT-7654: ItemStack#isSimilar does not work with empty BlockStateMeta
4460ecc49 SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set
5d84f48a4 SPIGOT-7653: Update ApiVersion.CURRENT with latest version and include tests
2024-05-05 18:08:55 +02:00
Lulu13022002 b13c7dbe36 Add missing experimental field and annotations (#10653) 2024-05-05 09:00:54 -07:00
Bjarne Koll 7ae2c671c6 Keep components using single items in creative (#10664)
The craftbukkit implementation stores the old and new data patch of an
item during ItemStack#useOn(UseOnContext) to properly cancel events via
comparison and change detection of the component patch.

However, it uses #getComponentsPatch to fetch the new stack component
patch, which always yields an empty patch set if an itemstack is
considered empty by the game.
As the restoration of an itemstack's count to its previous state is
handled after the entire ItemStack#useOn method, items used in creative
mode temporarily have a count of zero, which causes craftbukkit to
consider their new component patch as EMPTY even tho said item may have
data.
The new patch is applied and, after useOn completes, the count is reset
if the player is in creative mode, leading to lost data.

This commit fixes said inconsistency by directly accessing the
components of the item via components#asPatch, storing the proper
component patch even for an item that temporarily has a count of zero.
2024-05-05 11:40:36 +02:00
Jake Potrebic 7401313e16 fix shear drops for wolf and bogged
Fixes #10661
2024-05-04 22:48:10 -07:00
Nassim Jahnke 6fcca46674 Add missing step in V3818 2024-05-04 22:50:20 +02:00
Jake Potrebic 5632210f10 add RegistryAccess for managing registries (#10154)
* add RegistryAccess for managing registries

* add missing types to key data generator

* fix some stuff

* Add RegistryKeys for all other non-server-backed registries

* fix tests

* remove Experimental annotations
2024-05-04 11:22:35 -07:00
Joseph Burton 156675c773 Fix lodestone compass target conversion 2024-05-04 12:58:06 +02:00
Joseph Burton 0db72ac19e Fix can_place_on conversion and size check for item containers 2024-05-02 20:23:15 +02:00
Shane Freeder 59fe7ccc3b default save-empty-scoreboard-teams to vanilla
The primary environmental factor which caused this feature to be implemented
is no longer much of a factor within the community
2024-05-02 09:53:43 +01:00
SoSeDiK 544ce20e01 Expose #hasColor to leather armor (#10638) 2024-05-01 19:14:42 +02:00
SoSeDiK 18c201b838 Add EquipmentSlot#getOppositeHand (#10632) 2024-05-01 19:14:27 +02:00
SoSeDiK faa7aa266a Add GameMode#isInvulnerable (#10633) 2024-05-01 19:14:17 +02:00
Nassim Jahnke 310b47bb96 Update Java version references, add note on var usages 2024-05-01 18:44:39 +02:00
Andrew Teeter b8c454c2ba Add damage check for mending (#10631) 2024-05-01 12:01:48 +02:00
SoSeDiK 4cfd9e25fa Expose canReach to mob pathfinding API (#10636) 2024-05-01 12:00:11 +02:00
Noah van der Aa 3e0eb4a1ba Updated Upstream (CraftBukkit) (#10624)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
666f091c6 SPIGOT-7649: Allow /setworldspawn command in all worlds again
2024-04-30 16:53:54 -07:00
Jake Potrebic fa6013d83b Fixes beds not exploding in the nether
Also correctly marks the captured BlockState as "unplaced"
Fixes #10629
2024-04-30 16:42:43 -07:00
Jason Penilla 8c058f88a6 Update paperweight to 1.6.3 (#10626) 2024-04-30 10:30:14 -07:00
Nassim Jahnke 4ea67abd46 [ci skip] Remove trailing comma in projects action 2024-04-30 15:56:43 +02:00
Nassim Jahnke 937a67a651 Add initial size cap to component map 2024-04-30 11:14:35 +02:00
Jason Penilla 3fdd0948b7 Fix sealed package check in BytecodeModifyingURLClassLoader (#10627) 2024-04-30 01:21:16 -07:00
Jake Potrebic 25e44bc63b fix dumpitem command nbt format
use the snbt visitor instead of plain string
2024-04-29 18:49:19 -07:00
Jake Potrebic 812ccb96a4 fix spawnChunkRadius gamerule resetting
Fixes #10622
2024-04-29 15:22:29 -07:00
Noah van der Aa 44ee092878 1.20.6 (#10623) 2024-04-30 00:16:07 +02:00
Riley Park fbe3c00675 [ci skip] update projects workflow configuration 2024-04-29 13:29:50 -07:00
Bjarne Koll 8f7ac62905 Validate manifest provided mapping namespace (#10612)
With plugins adopting paperweights mapping namespaces in their manifest
file in and after paper 1.20.5, incorrectly spelled namespaces
previously were simply implied as the spigot namespace.

This commit properly ensures plugin authors are using a known mapping
namespace in their manifest, avoiding down the line confusion on
incorrect remapping behaviour.

The commit also fixes two incorrect log parameters.
2024-04-28 20:43:50 -07:00
Jake Potrebic f9397e108e Fix incorrect Commodore mapping of sweeping enchant 2024-04-28 17:25:21 -07:00
Jake Potrebic 69a971a35c Reset component prototype on itemtype change 2024-04-28 17:13:30 -07:00
Jason Penilla 05308fc299 Remap plugin libraries with namespace set to spigot (#10610)
* Remap plugin libraries with namespace set to spigot

* Remap plugin libraries with namespace set to spigot
2024-04-28 14:55:10 -07:00
Jason Penilla 7f2d5315fd Rewrite reflection in library loader jars (#10608)
* Rewrite reflection in library loader jars

* Address todos
2024-04-28 13:14:10 -07:00
Jake Potrebic 61c9c07e95 Fix CraftMetaBlockState adding extra tags 2024-04-28 12:34:16 -07:00
Riley Park 82a801201e [ci skip] adjust projects workflow for label changes 2024-04-28 12:12:57 -07:00
Noah van der Aa 0f3e324152 [ci skip] Fix discussion template file name (#10607) 2024-04-28 11:16:07 -07:00
Riley ParkandNoah van der Aa ba673a3b78 [ci skip] Feature requests are now in GitHub Discussions (#10606)
* [ci skip] feature requests are now discussions, not issues

* Re-add discussion template

* [ci skip] remove old feature label

---------

Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
2024-04-28 11:12:37 -07:00
Shane FreederandJake Potrebic 52ff3b7382 Add itemName components (Resolves #10467) (#10471)
* Add itemName components (Resolves ##10467)

* improve javadocs and formatting

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-04-28 10:08:59 -07:00
Jake Potrebic 0f4d328fc1 final missing validation for data components 2024-04-28 09:46:33 -07:00
Nassim Jahnke aed7dcab98 Fix overly strong name validation in player heads
Closes #10477
2024-04-28 18:25:32 +02:00
Jake Potrebic 4491ac05d1 respect hard list size limits in ItemMeta 2024-04-28 09:06:14 -07:00
Nassim Jahnke 9d6e7e3df0 Don't hard fail on plugin remap error
Closes #10474
2024-04-28 17:25:44 +02:00
Jake Potrebic c4a1cd137a Fix issue with empty lists in adventure predicates
Fixes #10473
2024-04-28 08:22:16 -07:00
Shane Freeder 37b3891032 Fix another missing book meta tag 2024-04-28 13:48:20 +01:00
Shane Freeder 6e31f385e3 Fix book meta lacking resolved tag from older versions (Fixes #10470) 2024-04-28 13:22:54 +01:00
Nassim Jahnke 1a03cc9b60 Fix test compilation 2024-04-28 14:20:52 +02:00
Jake Potrebic 306b203c2d more fixes for ItemMeta relating to components 2024-04-27 22:27:51 -07:00
Jake Potrebic e16263c39f Fix firework meta NPE
Fixes #10466
2024-04-27 20:57:42 -07:00
caramel a3c4dc95e3 Fix the incorrect codec usage in the Style convert (#10465) 2024-04-27 20:32:11 -07:00
Jason Penilla f187fd696a Only scan org.bukkit.craftbukkit.inventory in MetaHandledTagsTest
fixes tests OOMing
2024-04-27 18:25:15 -07:00
Jake Potrebic d93c6f91f7 remove calls to DoNotUse methods 2024-04-27 18:18:20 -07:00
Jake Potrebic 3e90a19183 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
304e83eb PR-1002: Improve documentation and implementation of getMaxStackSize
e8215ea2 SPIGOT-7638: Library loader does not seem to resolve every dependency
79c595c0 SPIGOT-7637: Bad logic in checking nullability of AttributeModifier slots

CraftBukkit Changes:
91b1fc3f1 SPIGOT-7644: Fix ItemMeta#getAsString
4e77a81e1 SPIGOT-7615: PlayerLeashEntityEvent cancelled eats lead
996f660f3 Do not remove leash knot if leasing to an existing leash knot gets cancelled
f70367d42 SPIGOT-7643: Fix inverted leash event cancelled usage and remove leash knot if no entity gets leashed
7ddb48294 SPIGOT-7640: Abnormal jumping height of wind charge
080c8711e SPIGOT-7639: Incoming plugin channels not working
ad549847e Open a direct connection instead of pinging mojang server to check if it is reachable
38e2926c5 SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime
2024-04-27 18:00:01 -07:00
Jake Potrebic d964c15e15 fix last test issue 2024-04-27 17:45:37 -07:00
Jason Penilla 7e3d5b569d bump paperweight to 1.6.2 to fix spurious build failure from scanJar OOM 2024-04-27 17:38:20 -07:00
Jake Potrebic 8ce62b3492 Fix issue with hopppers
Fixes #10464
2024-04-27 17:33:25 -07:00
Jake Potrebic 4ad6022ee3 improve checking handled tags in itemmeta (#9470) 2024-04-27 17:33:17 -07:00
Jason Penilla 83767f9544 Use JetBrains runtime for run tasks
allows for better runtime class redefinition

closes #10459
2024-04-27 17:28:40 -07:00
Nassim Jahnke d99d84a8aa Temporarily comment out adventure jd links 2024-04-28 02:05:52 +02:00
Jason Penilla 8454786c8d Bump tiny-remapper (real) 2024-04-27 16:26:28 -07:00
Jason Penilla 75c22d545f Bump tiny-remapper 2024-04-27 16:26:03 -07:00
Jason Penilla aeb3f376a2 update paperweight to 1.6.1 2024-04-27 16:07:55 -07:00
Jake Potrebic d02bb811de proper migration to gamerules for keep spawn loaded distance 2024-04-27 15:50:38 -07:00
Nassim Jahnke dd571d89f2 Fix bad diff in build gradle file 2024-04-28 00:43:17 +02:00
Nassim Jahnke 06cae13223 Update jdk version and distribution in actions 2024-04-28 00:26:43 +02:00
Jake Potrebic a771940776 Revert to vanilla handling of LivingEntity#actuallyHurt (#10463) 2024-04-27 14:35:53 -07:00
Jake Potrebic 53d8edd756 properly check for experimental stuff in generator 2024-04-27 14:32:35 -07:00
Jake Potrebic b3ea907b77 more ItemFlag fixes 2024-04-27 14:32:34 -07:00
Jason Penilla 20af7a753c remove funny diff 2024-04-27 14:11:35 -07:00
Jason Penilla a390119b04 Move cb version definition to gradle patch 2024-04-27 14:02:33 -07:00
Jason Penilla b7e148a107 Move obfhelper/stack deobf diff into original patch 2024-04-27 13:54:09 -07:00
Lulu13022002 af97400701 update generator 2024-04-27 22:32:16 +02:00
Jason Penilla 711dbd74ea Bump adventure ansi serializer 2024-04-27 13:31:37 -07:00
Jason Penilla e2552eea24 Start cleaning up plugin remapping patches 2024-04-27 13:27:01 -07:00
Lulu13022002 0b1b1fe067 fix helmet damage reduction inconsistencies
See: https://github.com/PaperMC/Paper/issues/9555#issuecomment-1681120506
2024-04-27 21:56:29 +02:00
Lulu13022002 55b1a8740d fix PotionEffectType#getEffectAttributes 2024-04-27 21:48:14 +02:00
Spottedleaf f933c35700 Update DataConverter to 1.20.6-rc1
Fixes trader llama inventory incorrectly converting
2024-04-27 12:41:47 -07:00
Jake Potrebic c82766d436 fix item flags 2024-04-27 12:18:01 -07:00
Jason Penilla f037f08035 Unify plugin remapping debug flags 2024-04-27 11:41:56 -07:00
Shane Freeder 5731f346e2 Restore Handle Large Packets Disconnecting Client Patch 2024-04-27 15:06:52 +01:00
Jake Potrebic f85d423535 improve dumpitem and pgive commands 2024-04-26 23:57:49 -07:00
Jake Potrebic 91b5de66bf bunch of fixes and improvements 2024-04-26 23:17:58 -07:00
Jake Potrebic 81f4405e26 add back hunk to async SavedData IO 2024-04-26 19:33:30 -07:00
Jake Potrebic 9bac3894e1 more fixes 2024-04-26 19:09:42 -07:00
Jake Potrebic 68e23db25d add back missing call to profile fill events 2024-04-26 18:41:54 -07:00
Jake Potrebic 80bd01527f fix adventure converters not using RegistryOps 2024-04-26 18:16:31 -07:00
Jake Potrebic 2f19f0fb7b fix enchantment order issue 2024-04-26 18:06:41 -07:00
Jason Penilla 548504381f Don't tell people to build the reobf jar 2024-04-26 18:05:17 -07:00
Jake Potrebic f1fc1b30be readd old UUID format patch 2024-04-26 17:41:36 -07:00
Jake Potrebic ba8512a0d8 fix javadocs for SpawnerEntry$Equipment API 2024-04-26 17:00:40 -07:00
Jake Potrebic c38f96b0e5 deprecate our ItemRarity API 2024-04-26 17:00:40 -07:00
Jason Penilla 6a4974b1b9 Remove shadow from build classpath
it isn't used
2024-04-26 16:48:34 -07:00
Jason Penilla ff77f82539 paperweight 1.6.0 2024-04-26 16:19:59 -07:00
Jake Potrebic 464cc81633 fix custom potion mixes 2024-04-26 16:17:14 -07:00
Jake Potrebic 4c53acedce fix exact choice recipes 2024-04-26 15:25:20 -07:00
Jake Potrebic 882ea0a430 fix adventure translations 2024-04-26 15:08:39 -07:00
Jason Penilla e856d17ec5 Update paper plugin check in PluginRemapper 2024-04-26 14:31:53 -07:00
Jake Potrebic 19ac9d43ce remove no longer needed patches and fix tests 2024-04-26 14:29:21 -07:00
Jason Penilla 1bc278b125 Update patched spigot decompiler to fix inconsistency based on processing order 2024-04-26 11:45:56 -07:00
Jake Potrebic 44e68c301a fix some more issues 2024-04-26 11:39:20 -07:00
Jake Potrebic cc81668863 fix some issues on the todo list 2024-04-26 09:22:55 -07:00
Jake Potrebic f6fae41cdf fix chat_type issue 2024-04-26 08:33:00 -07:00
Owen1212055 00dac83d67 Drop old decompile fix 2024-04-26 08:39:10 -04:00
Nassim Jahnke 8b28f9f564 Fix accumulated total ticking chunks not being updated 2024-04-26 11:55:56 +02:00
Nassim Jahnke 478a971a7b Fix light setting in protochunk 2024-04-26 11:18:15 +02:00
Nassim Jahnke 813cfbf2b0 Fix compile issues 2024-04-26 10:45:00 +02:00
Jake Potrebic 7e9da43b33 support patch versions in api-version 2024-04-25 23:29:16 -07:00
Jason Penilla 2997fd6459 plugin manager updates 2024-04-25 23:18:04 -07:00
Jake Potrebic 43d110e9a9 fix issue with item default attribute API 2024-04-25 23:10:38 -07:00
Jake Potrebic bcdf1f96b8 fixup loom pattern select event patch 2024-04-25 22:44:49 -07:00
Jason Penilla c5c2a5fe13 hunk system fixes 2024-04-25 22:25:02 -07:00
Jason Penilla 62b96c520f compile fixes 2024-04-25 21:58:13 -07:00
Jason Penilla 867eb9054b compile fixes 2024-04-25 20:15:07 -07:00
Jason Penilla 7c6411b930 compile fixes 2024-04-25 19:54:07 -07:00
Jason Penilla d2ef0622c9 generator fix 2024-04-25 19:09:21 -07:00
Jake Potrebic 31ad90b018 some more compile fixes 2024-04-25 18:51:31 -07:00
Jason Penilla a244281287 Replace VanillaGradle use and update generated API 2024-04-25 18:40:50 -07:00
Jake Potrebic 10e6143499 fixup adventure's book meta handling 2024-04-25 17:46:17 -07:00
Jake Potrebic e85e1ec4a6 fixup sus effect entry patches 2024-04-25 17:10:12 -07:00
Jake Potrebic 3062eb208d address my own comments 2024-04-25 16:24:08 -07:00
Nassim Jahnke 68aea43526 Fixup damage source change 2024-04-25 23:28:56 +02:00
Nassim Jahnke 2641c02193 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
69fa4695 Add some missing deprecation annotations
f850da2e Update Maven plugins/versions
8d8400db Use regular compiler seeing as ECJ doesn't support Java 21 JRE
c29e1688 Revert "BUILDTOOLS-676: Downgrade Maven compiler version"
07bce714 SPIGOT-7355: More field renames and fixes
6a8ea764 Fix bad merge in penultimate commit
50a7920c Fix imports in previous commit
83640dd1 PR-995: Add required feature to MinecraftExperimental for easy lookups
fc1f96cf BUILDTOOLS-676: Downgrade Maven compiler version

CraftBukkit Changes:
90f1059ba Fix item placement
661afb43c SPIGOT-7633: Clearer error message for missing particle data
807b465b3 SPIGOT-7634: Armadillo updates infrequently
590cf09a8 Fix unit tests always seeing Mojang server as unavailable
7c7ac5eb2 SPIGOT-7636: Fix clearing ItemMeta
4a72905cf SPIGOT-7635: Fix Player#transfer and cookie methods
ebb50e136 Fix incorrect Vault implementation
b33fed8b7 Update Maven plugins/versions
6f00f0608 SPIGOT-7632: Control middle clicking chest does not copy contents
db821f405 Use regular compiler seeing as ECJ doesn't support Java 21 JRE
8a2976737 Revert "BUILDTOOLS-676: Downgrade Maven compiler version"
0297f87bb SPIGOT-7355: More field renames and fixes
2d03bdf6a SPIGOT-7629: Fix loading banner patterns
e77951fac Fix equality of deserialized display names
c66f3e4fd SPIGOT-7631: Fix deserialisation of BlockStateMeta
9c2c7be8d SPIGOT-7630: Fix crash saving unticked leashed entities
8c1e7c841 PR-1384: Disable certain PlayerProfile tests, if Mojang's services or internet are not available
ced93d572 SPIGOT-7626: sendSignChange() has no effect
c77362cae SPIGOT-7625: ItemStack with lore cannot be serialized in 1.20.5
ff2004387 SPIGOT-7620: Fix server crash when hoppers transfer items to double chests
8b4abeb03 BUILDTOOLS-676: Downgrade Maven compiler version
2024-04-25 23:23:57 +02:00
Nassim Jahnke ed790385ed More compile fixes 2024-04-25 22:47:32 +02:00
Nassim Jahnke 8d3759d4a5 More more compile fixes 2024-04-25 22:34:46 +02:00
Nassim Jahnke d01f6b2fd2 Fix more compile issues 2024-04-25 21:57:59 +02:00
Jason Penilla ca9001a936 compile fixes 2024-04-25 12:16:00 -07:00
Jason Penilla 820f999ba4 Fixes for cb pkg ver 2024-04-25 11:16:53 -07:00
Noah van der Aa 04a25c2813 Fix WorldCreator#keepSpawnLoaded 2024-04-25 19:57:27 +02:00
Jason Penilla 768befec89 Remove patch renaming scripts
These are pretty specific to tasks that kenny and I were doing when they were written, no need to keep them around when they aren't useful for others.
2024-04-25 10:53:29 -07:00
Bjarne Koll b984f66d13 Missing FQN in CraftPotionBrewer getter 2024-04-25 19:45:17 +02:00
Bjarne Koll 9c580566b9 Some more compilation fixes 2024-04-25 19:42:24 +02:00
Noah van der Aa f4c7639986 Un-jankify root user detection 2024-04-25 19:13:12 +02:00
Bjarne Koll bab31b6f55 Update Enchantment damage increase API
The Enchantment damage increase API added previously used the
EntityCategory enum as a parameter. These values are now however
determined by tags instead of the categories themselves.

Deprecated the outdated api method, create a new overload that takes
EntityType instead and implement deprecated method by guessing an entity
type from the builtin registry based on the category passed.
This method allows
a) the tags to still be modified and the legacy
   method still respecting such.
b) potential cursed implementations of enchantments of plugins to not
   break that override the getDamageBonus method on Enchantment.
2024-04-25 18:42:50 +02:00
Jake Potrebic 653f0432b5 readd fix bee aging patch 2024-04-25 09:06:13 -07:00
Jake Potrebic ccf158a817 update smithing recipe copy data components API 2024-04-25 08:13:36 -07:00
Owen1212055 b8da9ac51a item meta patch work 2024-04-25 09:22:52 -04:00
Owen1212055 457e2c8a5a pass more stuff 2024-04-25 09:01:54 -04:00
Owen1212055 45900385cd Fix properly resend patches 2024-04-25 08:42:47 -04:00
Owen1212055 345b5c1c4c Patches!!!!!!! (we are done) 2024-04-25 08:36:48 -04:00
Nassim Jahnke 6da0d8cc91 (Almost) all patches applied 2024-04-25 14:23:55 +02:00
Nassim Jahnke 2debcaff9d More more patches, including hopper optimization patch 2024-04-25 14:07:39 +02:00
Nassim Jahnke c9907c650f More patches 2024-04-25 13:02:27 +02:00
Nassim Jahnke ec4ada852e Apply and move up non-optimization patches 2024-04-25 12:27:57 +02:00
Nassim Jahnke f6ea3736a7 Patches 2024-04-25 11:42:10 +02:00
Spottedleaf e9eec78fc7 chunk system 2024-04-25 01:52:52 -07:00
Spottedleaf ec9f7e3850 starlight 2024-04-25 00:14:22 -07:00
Spottedleaf 6a87d141f3 dataconverter 2024-04-24 23:49:13 -07:00
Jason Penilla b673721d77 compile fixes 2024-04-24 22:29:18 -07:00
Jason Penilla 690b1cd321 compile fixes 2024-04-24 22:16:04 -07:00
Jason Penilla 25f7c68e6b compile fixes 2024-04-24 21:38:28 -07:00
Jason Penilla ce0e78c103 compile fixes
compile fixes

compile fixes
2024-04-24 21:18:42 -07:00
Jake Potrebic 1444b3632e work on adventure 2024-04-24 20:14:51 -07:00
Jason Penilla bb1351cb8d some work on adventure 2024-04-24 18:10:18 -07:00
Jason Penilla c95db4fcaa adventure 4.17.0-SNAPSHOT 2024-04-24 17:46:57 -07:00
Jason Penilla b7338094a5 Drop conduit api patch (upstream implemented same api with same method signatures) 2024-04-24 17:40:30 -07:00
Jason Penilla 1df7e21459 Apply more API-implementing patches 2024-04-24 17:36:24 -07:00
Jake Potrebic 11044315fd 955 2024-04-24 16:25:57 -07:00
Owen1212055 e0a245d2ea Patches!!!!!!! 2024-04-24 18:36:55 -04:00
Jason Penilla 051855997e Update reflection rewriter to 0.0.1 release 2024-04-24 15:02:37 -07:00
Noah van der Aa 961782982b Restore original formatting for MC-252817 patch 2024-04-24 23:26:18 +02:00
Noah van der Aa 4d9e824a44 more more work (806) 2024-04-24 23:23:56 +02:00
Noah van der Aa 22227ccf26 more more work (757) 2024-04-24 22:32:38 +02:00
Noah van der Aa 71ae391eb3 more work (721) 2024-04-24 22:05:42 +02:00
Jason Penilla 90095cd7c4 694 2024-04-24 11:03:59 -07:00
Jason Penilla fc5c0dae7f 683 2024-04-24 10:59:51 -07:00
Jason Penilla e832328b7e Check for existing am session before running continueServerUpdate 2024-04-24 10:48:00 -07:00
Nassim Jahnke 4e654f2a3a More patch work 2024-04-24 19:27:48 +02:00
Nassim Jahnke 1de0dc8828 666 plus 1 2024-04-24 17:35:46 +02:00
Owen1212055 21afc0a2e2 Patches!!!!!!! 2024-04-24 10:30:32 -04:00
Owen1212055 a403a8d085 Patches!!!!!!! 2024-04-24 10:29:12 -04:00
Owen1212055 2d9d0d8b1d Patches! 2024-04-24 09:46:45 -04:00
Owen1212055 5be858e9b7 Patches! 2024-04-24 08:11:27 -04:00
Jake Potrebic cc4614854a 405 2024-04-23 23:44:48 -07:00
Jake Potrebic 9079c90d22 354 2024-04-23 23:05:14 -07:00
Jake Potrebic 1d7d7e92f2 301 2024-04-23 22:43:09 -07:00
Jake Potrebic 309ebc13fc 253 2024-04-23 19:46:06 -07:00
Jake Potrebic 8244815161 221 2024-04-23 19:21:40 -07:00
Owen1212055 906f906089 Patches! 2024-04-23 18:25:14 -07:00
Owen1212055 0225537fd1 Update upstream 2024-04-23 21:13:33 -04:00
Owen1212055 487555b627 update 2024-04-23 21:13:33 -04:00
Jake Potrebic d6a3c0c239 fix 2 of our javadoc errors 2024-04-23 16:30:24 -07:00
Jake Potrebic 862d00478e work on some API stuff 2024-04-23 16:26:24 -07:00
Jason Penilla 5cfd92b240 Fix api compile 2024-04-23 14:47:29 -07:00
Jason Penilla f2350fe0d1 Set mercury sourceCompat 2024-04-23 14:43:32 -07:00
Jason Penilla d07c487d4d Don't use defaultToolchain method for run tasks 2024-04-23 14:39:36 -07:00
Jason Penilla 2eeed9e6fa 41 2024-04-23 14:31:37 -07:00
Jason Penilla 9cac5b6f4f Fix continueServerUpdate with 2-line subjects 2024-04-23 14:26:28 -07:00
Jason Penilla eb41348d39 33 2024-04-23 14:12:24 -07:00
Jason Penilla ffccfd5488 Apply timings 2024-04-23 14:04:59 -07:00
Jason Penilla 598a1cb947 Apply shadow removal patch 2024-04-23 13:41:25 -07:00
Jason Penilla dd6ce09922 Fix reflection diff and order wrt commodore diff 2024-04-23 13:36:31 -07:00
Nassim Jahnke 7cdf804392 Work 2024-04-23 22:13:16 +02:00
Jason Penilla 380c4d2313 Add plugin remapping patches 2024-04-23 11:44:42 -07:00
Jake Potrebic ef057bba7d work on Adventure patch 2024-04-23 11:32:19 -07:00
Jason Penilla 00c14f2e7b Move logging patches after adventure 2024-04-23 11:31:38 -07:00
Jake Potrebic f2c45ed1d3 do some work 2024-04-23 11:03:16 -07:00
Jake Potrebic abc49bf069 Begin update to 1.20.5 2024-04-23 10:02:08 -07:00
leguan f4c7d373e4 [ci skip] Fix javadoc typo (#10445) 2024-04-22 19:08:37 +01:00
Jake Potrebic a6b6ecdd22 More Raid API (#7537) 2024-04-20 15:57:51 -04:00
Tamion fc53ff5a71 Add Configuration for finding Structures outside World Border (#10437) 2024-04-20 15:29:32 -04:00
Janet Blackquill c5f68ff9be Add CartographyItemEvent and get/setResult for CartographyInventory (#10396) 2024-04-20 14:10:35 -04:00
Florian Beck a033033b7a Added chunk view API (#10398) 2024-04-20 13:56:59 -04:00
Nassim Jahnke 3af1346520 Allow setting player list name early 2024-04-20 15:24:42 +02:00
Tamion 908b8141c9 Fix inventory desync with PlayerLeashEntityEvent (#10436) 2024-04-19 20:23:32 -07:00
Jake Potrebic 3b078f822a Add API for ticking fluids (#10435)
* Add API for ticking fluids

* update javadocs
2024-04-19 13:03:32 -07:00
brickmonsterandJake Potrebic 9e886c4310 Remove dead code (LegacyResult) (#10411)
* Stop firing AsyncPlayerChatPreviewEvent as chat preview was removed in 1.19.3. This is in parity with upstream

* formatting and small tweaks

* correctly set MESSAGE_CHANGED flag for modern modifications

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-04-19 12:47:24 -07:00
Jason Penilla 862299b6a6 "Downgrade" Vineflower to 1.10.1 release (#10423)
* "Downgrade" Vineflower to 1.10.1 release

The main thing we lose from the 1.11 snapshots is a recent fix for redundant casts.

* Thanks intellij

* a
2024-04-16 12:44:59 -07:00
Owen 4445d23544 Deprecate ItemStack#setType & add ItemStack#withType (#10290) 2024-04-12 17:16:22 -04:00
ButterDebugger 3263470312 Add color transition and clone functions to ParticleBuilder (#10342) 2024-04-12 16:07:28 -04:00
CrossandBjarne Koll f061e76e1f Fix hit criteria advancement triggered before changing state (#10409)
* Fix hit criteria advancement being triggered before changing block state.

* Rebase

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-04-12 12:42:00 -07:00
Shane Freeder 46d462b83e Fix StackOverflowException thrown on shutdown (Fixes #10404) (#10408)
paper previously migrated away from using executeIfPossible as this throws a
RejectedExecutionException when the server is shutting down, which is then picked
up by the Connection handler object and causes the player to be kicked without
the intended disconnection message that comes from commands such as /stop, /restart

This was fine, because previously changes made in spigot would just prevent these
packets from being executed anyways. Instead, we'll just use a marker exception
to try to detect this specific state.
2024-04-12 12:37:00 -07:00
Hy3z 8fe90dede7 [ci skip] Referenced InventoryDragEvent in documentation of InventoryClickEvent (#10395) 2024-04-12 15:19:55 -04:00
Jake PotrebicandJason Penilla 526795bacd Update patches to handle vineflower decompiler (#10406)
* Update patches to handle vineflower decompiler

* update patches again to handle inlined simple lambdas

* update vf again and re-apply/rebuild patches

* update patches after removal of verify-merges flag

* fix compile issue

* remove maven local

* fix some issues

* address more issues

* fix collision patch

* use paperweight release

* more fixes

* update fineflower and fix patches again

* add missing comment descriptor

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2024-04-12 12:14:06 -07:00
Lulu13022002 37db2d7e4c [ci skip] Update book page/char limit for book meta doc (#10415) 2024-04-12 11:58:44 -07:00
gecko10000 a7f1dc6a07 Change online mode default for Velocity configuration (#10413) 2024-04-12 18:21:31 +01:00
Jake Potrebic 5436d44bf2 Deprecate several Keyed#getKey methods (#10357)
- Structure (can already be defined inline in datapacks
- PatternType (can be defined inline in 1.20.5 data components)
- MusicInstrument (same as above)
2024-04-07 22:20:51 -07:00
Shane Freeder 1207162055 Allow player-list API to self un/list (#10358) 2024-04-06 20:45:43 -04:00
Joseph Burton 241d8e26fb Ignore minecart in activation range (#10359) 2024-04-06 19:50:43 -04:00
Noah van der Aa 8e75001cb8 Disable vertical air friction when item entities have friction disabled (#10369) 2024-04-06 19:36:59 -04:00
Evan 3d31e45e7e Add BlockBreakProgressUpdateEvent (#10300) 2024-04-06 18:28:17 -04:00
Lulu13022002 acf838f535 Backport some stuff from the generators branch (#10365) 2024-04-06 14:51:47 -07:00
Tamion 182e79bce1 Add more item use API (#10304) 2024-04-06 17:44:27 -04:00
Lulu13022002 d8456ee65b Don't throw NPE for unplaced blockstate on #getDrops (#10366) 2024-04-06 17:26:56 -04:00
powercas_gamerandJake Potrebic bbee11fb0e Deprecate Bukkit#getLogger (#10388)
* Deprecate Bukkit#getLogger

* fix typo in MaterialSetTags

* change to Internal and squash into other patch

* improve api note message

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-04-06 14:20:29 -07:00
Pierpaolo Coletta 06361fa662 Fix invalid block entities created during world gen (#10375) 2024-04-06 17:16:54 -04:00
BridgeandJake Potrebic a774fbaca8 feat: Entity#teleportAsync method with TeleportFlags (#10371)
* feat: Entity#teleportAsync method with TeleportFlags

* use method-local class

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-04-06 13:38:37 -07:00
Jake Potrebic bd38e0318a Updated Upstream (Bukkit/CraftBukkit) (#10379)
Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f02baa38 PR-988: Add World#getIntersectingChunks(BoundingBox)
9321d665 Move getItemInUse up to LivingEntity
819eef73 PR-959: Add access to current item's remaining ticks
c4fdadb0 SPIGOT-7601: Add AbstractArrow#getItem
be8261ca Add support for Java 22
26119676 PR-979: Add more translation keys
66753362 PR-985: Correct book maximum pages and characters per page documentation
c8be92fa PR-980: Improve getArmorContents() documentation
f1120ee2 PR-983: Expose riptide velocity to PlayerRiptideEvent

CraftBukkit Changes:
dfaa89bbe PR-1369: Add World#getIntersectingChunks(BoundingBox)
51bbab2b9 Move getItemInUse up to LivingEntity
668e09602 PR-1331: Add access to current item's remaining ticks
a639406d1 SPIGOT-7601: Add AbstractArrow#getItem
0398930fc SPIGOT-7602: Allow opening in-world horse and related inventories
ffd15611c SPIGOT-7608: Allow empty lists to morph to any PDT list
2188dcfa9 Add support for Java 22
45d6a609f SPIGOT-7604: Revert "SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime"
06d915943 SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime
ca3bc3707 PR-1361: Add more translation keys
366c3ca80 SPIGOT-7600: EntityChangeBlockEvent is not fired for frog eggs
06d0f9ba8 SPIGOT-7593: Fix sapling growth physics / client-side updates
45c2608e4 PR-1366: Expose riptide velocity to PlayerRiptideEvent
29b6bb79b SPIGOT-7587: Remove fixes for now-resolved MC-142590 and MC-109346
2024-04-06 12:53:39 -07:00
Jason Penilla a2035440cf build: Compile against and shade the filtered jar (#9747)
* Compile against & shade the filtered jar

* Move check for if the paper asset root needs to be pushed

* Don't disable incremental compilation

* Remove mavenLocal

* use paperweight release
2024-04-04 17:12:05 -07:00
DungeonDevandTamion e709245b55 Add config option for tripwire disarming fix
Fixes #10382

Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
2024-04-02 12:18:22 +02:00
Jason Penilla 45d1486fec build: Update paperweight to 1.5.12 and Gradle Wrapper to 8.7 (#10361) 2024-03-29 10:43:36 -07:00
Jake Potrebic 710dced8b7 [ci skip] move custom brig exception to paper package 2024-03-26 08:38:26 -07:00
Nassim Jahnke 00fd87a10f Return dummy string instead of empty optional 2024-03-25 13:26:01 +01:00
maxcom1 b6001403e9 Add methods to change entity physics (#10334) 2024-03-23 17:26:17 -04:00
FireInstall 9ec7dfcbc4 Move invisible setting up to entities (#10346) 2024-03-23 20:27:30 +01:00
Shane Freeder 88419b2075 Do not copy profile data if profiles are the same (#10259) 2024-03-20 22:47:50 +01:00
TonytheMacaroni 41ffa0cf8c Expose power on fireballs (#10302) 2024-03-20 22:33:34 +01:00
Jake Potrebic de620b8480 Clone mutable types in events when changes are discarded (#10333) 2024-03-20 21:42:29 +01:00
maxcom1 05fe15e0fc Fire EntityChangeBlockEvent on beehive nectar deposit (#10306)
* Add BeehiveNectarDepositEvent

* Fire EntityChangeBlockEvent instead of a separate event
2024-03-20 12:35:10 -07:00
Nassim Jahnke 55ffcb1111 Fix tripwire disarming not working as intended 2024-03-19 20:09:02 +01:00
Kichura 09d6dfb0df [ci skip] Upstream dependencies in workflow scripts. (#10338) 2024-03-19 13:30:03 +00:00
viciscat 99a641690a Expand Hopper BlockState API (#10328) 2024-03-16 20:28:50 +01:00
Jake Potrebic d361a7f609 Fix DamageSource API (#10307)
Uses the correct entity in the EntityDamageByEntity event
Returns the correct entity for API's DamageSource#getCausingEntity
2024-03-16 11:51:22 -07:00
leguan e6034867ba Add onboarding message for initial server start (#10312) 2024-03-16 19:10:26 +01:00
Ikko Eltociear Ashimine cd110a8995 [ci skip] Update CONTRIBUTING.md (#10318)
tempermental -> temperamental
2024-03-16 18:56:04 +01:00
Suppergerrie2 ab1afb0ed8 Fix missing profiler.pop() in PathFinder::findPath (#10320) 2024-03-15 11:09:47 +00:00
Bjarne Koll 62b220a87f Allow passenger retaining teleport via end gateway (#10283)
Previously paper disabled the abilities for entities to teleport via end
gateways if they were being used as a vehicle.

While the behaviour generally worked fine for entities riding other
entities, players would quickly end up in an invalid state, not seeing
their passenger anymore.

This commit removes the paper introduced limitation by now properly
updating the passengers location of a player when they are teleporting
through an end gateway.
2024-03-10 01:08:44 +01:00
Jake Potrebic 80e1a45959 Add param to overrides to the correct method is called (#10308) 2024-03-09 18:16:27 -05:00
Jake Potrebic a0931f4864 Updated Upstream (Bukkit/CraftBukkit) (#10301)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
7ca2b46c SPIGOT-7594: Fix typo and include missing MinecraftExperimental annotation in Loot Table enum

CraftBukkit Changes:
176c0ad39 Fix copying BlockStates with fields (eg, Banner)
ee685bd2a Fix Camel not standing up when hurt
619936d4b Increase outdated build delay
2024-03-08 15:52:00 -08:00
Jason Penilla 0052e2db39 build: Update tiny-remapper to 0.10.1 & remove unused repo from dev bundle config (#10303) 2024-03-07 10:11:47 -08:00
Jake Potrebic 6ad63fba30 Per world ticks per spawn settings (#6891) 2024-03-03 17:53:58 -05:00
Owen 89d51d5f29 Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable.

It should be noted that this decision does not promise all future exploits will be configurable.
2024-03-03 17:05:34 -05:00
Yannick LamprechtandBjarne Koll b21eb4d9a4 add overloads to use suspicious effect entry to mushroom cow and suspicious stew meta (#10245)
The existing method with PotionEffect suggests that all attributes are used. In fact, only the PotionEffectType and the duration are used.



---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-03-03 16:40:18 -05:00
Shane Freeder 60218cd207 Don't tick empty worlds (#9025) 2024-03-03 16:10:45 -05:00
Jake Potrebic 880fef77ab Deprecate extra ban methods with raw BanEntry (#9580) 2024-03-03 12:54:52 -08:00
Gero ce5c8dd379 Configurable max block/fluid ticks (#10266) 2024-03-03 15:43:00 -05:00
Yannick Lamprecht bbc03d8116 improve BanList types (#10239) 2024-03-03 12:36:17 -08:00
Rodney 8870d22bc7 Fire EntityDamageByEntityEvent for unowned wither skulls patch (#10244) 2024-03-03 14:35:50 -05:00
Yannick Lamprecht 9c4bb0df0e add rich message component support to configuration (#10225) 2024-03-03 10:59:22 -08:00
granny 54a23403da check if itemstack is stackable first (#10285) 2024-03-03 10:37:00 -08:00
Bjarne Koll 850b736e14 Close PRs opened from orgs or bot accounts (#10281)
Expands the existing close_invalid_prs workflow to also close prs that
were opened from repositories not owned by user accounts.
This is required as such PRs cannot be edited by maintainers.

The implementation re-uses the existing job instead of creating a new
job to limit the amount of checks to the bare minimum.
2024-02-28 15:18:58 +01:00
Nassim Jahnke 681bbff110 Fix spawnreason saving 2024-02-23 23:15:11 +01:00
Bjarne KollandAleksander Jagiello d0ebfbbd15 Fix corrupted plugin.yml breaking plugin loading (#10279)
Fix corrupted plugin.yml file in one plugin not loading any plugins by
the server.

Co-authored-by: Aleksander Jagiello <themolkapl@gmail.com>
2024-02-23 18:54:44 +01:00
Shane Freeder e3bc4c4107 Make debug mode print current configuration phase 2024-02-23 13:54:52 +00:00
Nassim Jahnke 71c84c8132 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent
258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor
ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD

CraftBukkit Changes:
98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire
a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent
5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class
76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor

Spigot Changes:
e9ec5485 Rebuild patches
f1b62e0c Rebuild patches
2024-02-23 14:37:33 +01:00
Shane Freeder 3ea95efdeb Do not access world state to see if we can see a Player
Thrown into the adventure patch because I don't see the justification of a patch existing
for something like this.
2024-02-22 16:23:15 +00:00
Nassim Jahnke 4939f87118 Add more ResourceLocation checks, some cleanup 2024-02-18 13:52:12 +01:00
Jason Penilla 351923d17e Run round-trip adventure codec tests with JSON, NBT, and Java ops. Use JavaOps for conversions. (#10031) 2024-02-17 16:58:56 -05:00
d95341e44a FluidState API (#9951)
* Add new FluidState API functionality
---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2024-02-17 15:44:03 -05:00
David MayrandJake Potrebic 1964b22439 Scoreboard objective number format api (#10036)
* feat: number format api

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: make each individual score customizable

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: fix incorrect descriptions

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use access transformers

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use adventure codecs

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* test: test for matching styles

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: convert number formats to interfaces

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: add style conversion to adventure patch

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use paper adventure method in PaperScoreboardFormat

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: rename methods to avoid a method in records

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* fix: check if objective is still registered

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: improve style conversion

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: modify how the getter behaves in score

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use fluent naming

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: add spaces before the paper comments

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: styling changes

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: make constant final

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: add methods for styled format instead of constants

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* fix: remove incorrect getTrackedPlayers check

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: add . at the end of sentences

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: explain null behaviour

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: mention score creation

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* rebase and fix javadoc comments

* remove server implementation defaults

* fix format for PaperScoreboardFormat

---------

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-02-17 12:22:00 -08:00
Emilia Kond 9a66f2b2e1 [ci skip] Fix javadoc mistake in PluginMeta (#10258)
"Schematic versioning" is not a real thing. The intended versioning
scheme is "semantic versioning". Introduced in #8108.
2024-02-17 11:37:55 -08:00
leguan a07d526698 [ci skip] Fix JavaDoc mistake in BlockPistonRetractEvent (#10250) 2024-02-17 11:15:15 -08:00
Jake Potrebic 7ccefdcd6c Fire entity knockback event for ownerless tnt (#7171) 2024-02-16 15:44:43 -08:00
Shane Freeder 7f85940143 Updated Upstream (Bukkit) (#10255)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
58ce1b0f Improve compatibility of new DamageSource API
2024-02-16 23:44:38 +01:00
Pedro 37df12143c Fix BlockState being set to null for damage events (#10252) 2024-02-15 10:05:50 +01:00
Nassim Jahnke 31699ae9a8 Updated Upstream (Bukkit/CraftBukkit) (#10242)
* Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
a6a9d2a4 Remove some old ApiStatus.Experimental annotations
be72314c SPIGOT-7300, PR-829: Add new DamageSource API providing enhanced information about entity damage
b252cf05 SPIGOT-7576, PR-970: Add methods in MushroomCow to change stew effects
b1c689bd PR-902: Add Server#isLoggingIPs to get log-ips configuration
08f86d1c PR-971: Add Player methods for client-side potion effects
2e3024a9 PR-963: Add API for in-world structures
a23292a7 SPIGOT-7530, PR-948: Improve Resource Pack API with new 1.20.3 functionality
1851857b SPIGOT-3071, PR-969: Add entity spawn method with spawn reason
cde4c52a SPIGOT-5553, PR-964: Add EntityKnockbackEvent

CraftBukkit Changes:
38fd4bd50 Fix accidentally renamed internal damage method
80f0ce4be SPIGOT-7300, PR-1180: Add new DamageSource API providing enhanced information about entity damage
7e43f3b16 SPIGOT-7581: Fix typo in BlockMushroom
ea14b7d90 SPIGOT-7576, PR-1347: Add methods in MushroomCow to change stew effects
4c687f243 PR-1259: Add Server#isLoggingIPs to get log-ips configuration
22a541a29 Improve support for per-world game rules
cb7dccce2 PR-1348: Add Player methods for client-side potion effects
b8d6109f0 PR-1335: Add API for in-world structures
4398a1b5b SPIGOT-7577: Make CraftWindCharge#explode discard the entity
e74107678 Fix Crafter maximum stack size
0bb0f4f6a SPIGOT-7530, PR-1314: Improve Resource Pack API with new 1.20.3 functionality
4949f556d SPIGOT-3071, PR-1345: Add entity spawn method with spawn reason
20ac73ca2 PR-1353: Fix Structure#place not working as documented with 0 palette
3c1b77871 SPIGOT-6911, PR-1349: Change max book length in CraftMetaBook
333701839 SPIGOT-7572: Bee nests generated without bees
f48f4174c SPIGOT-5553, PR-1336: Add EntityKnockbackEvent
2024-02-11 22:28:00 +01:00
Warrior cde5587e58 Add getChunkSnapshot includeLightData parameter (#10234) 2024-02-10 22:28:56 +01:00
Emilia Kond 4b58a85158 Fire BlockPreDispenseEvent for droppers (#10226) 2024-02-10 22:19:22 +01:00
Jake Potrebic e6a521514e Properly track the changed item from dispense events (#8658) 2024-02-10 22:17:24 +01:00
Jake Potrebic 2fa2d32ceb Fix possible StackOverflowError for some dispenser iteractions (#8524) 2024-02-10 21:17:40 +01:00
Lulu13022002 bf6e803c6c Fix WaterBottleSplashEvent not forwarding hit result (#10203) 2024-02-10 20:27:29 +01:00
Warrior 99bae594c8 Propagate failed to bind to port error (#10235) 2024-02-10 20:23:50 +01:00
Yannick LamprechtandJake Potrebic 581fb30a4c itemstack expose tooltip lines (#10185)
* Itemstack Tooltip API

* re-order methods so advanced is first

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-02-09 17:12:50 -08:00
Lulu13022002 97c01206bc Fix fox drops on death (#8862) 2024-02-09 16:07:10 -08:00
Tamion cbe62d91fb Add Conduit API (#10195) 2024-02-09 23:03:27 +01:00
Micah Rao 69b52b4d8e Check for server JARs in plugin directory (#10228) 2024-02-09 22:05:13 +01:00
Tamion 9c04729de1 Add Arrow/Stinger Removal Time API (#10193) 2024-02-09 21:56:13 +01:00
Moulberry 534659e97e Fix NotNull locales (#10216)
Two methods returning locales are annotated @NotNull, despite being able
to return null
2024-02-09 20:30:50 +00:00
Jake Potrebic 934cd77da8 Lifecycle Event System (#9629)
* registering stuff event system

* simply by removing a ton of unneeded generics

* separate RegistryEvent and RegistrarEvent

* add logic for removing hooks when a plugin is disabled

* cleanup more

* swap around the way things are registered

* block further hook registrations for JavaPlugin

* Slightly more extensible to support registry mod API

* rename some types

* more moving/renaming

* remove 'hook' name

* Rename to 'lifecycle'

* move more impls for the server

* add priorities

* added lock for bootstrap event registration

* slight refactor to allow 'register anywhere' event types

* Move event type list to server impl

* use builder pattern to create event handler configurations

* add some more javadocs

* fix some issues, slight refactors

* call predicate and method renames

* add owner aware events

* rebased and refactored owner aware events

* add single helper method for registering simple handler

* compile fixes

* check owner and fix generics on register helper

* javadoc fixes and a few type renames

* more javadoc fixes

* move service loader file to correct location

* rename to Monitorable and Prioritizable

* add invalidation system for events after running them

* block reloading plugins in certain situations

* update test plugin

* remove dummy events

* rebase
2024-02-09 12:12:01 -08:00
Nassim Jahnke 9e171ef8ff Improve tag parser handling, move hunks out of chunk system patch 2024-02-05 12:31:51 +01:00
Nassim Jahnke c5d168cef9 More provider source fixup 2024-02-02 12:44:09 +01:00
Nassim Jahnke 8bc5be8ba7 Add missing catch 2024-02-01 11:41:29 +01:00
Nassim Jahnke 7f856a1d1f Fix sleeping pos desync 2024-02-01 10:53:15 +01:00
Nassim Jahnke 87ce7c7209 Small refactor of Paper plugin context preparation 2024-02-01 10:51:29 +01:00
Lulu13022002 294347bee2 [ci skip] Cleanup events (#10202) 2024-02-01 10:15:57 +01:00
RowanandBjarne Koll b3c81089ae [ci skip] Fix incorrect documentation for BlockDropItemEvent (#10175)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-01-27 20:42:46 +01:00
Jake Potrebic 3841722fe1 Properly check if a loot table exists (#10190) 2024-01-27 20:21:18 +01:00
Warrior 0cc3a7ec6b Disable memory reserve allocating (#10180) 2024-01-27 20:06:03 +01:00
LuisandYannick Lamprecht b333831b70 Make spawn egg colours visible (#10158)
Co-authored-by: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com>
2024-01-27 19:32:05 +01:00
Chase Henderson 4643b0d959 Shulker duplicate event (#10135) 2024-01-27 19:13:12 +01:00
Jake Potrebic ed130f1170 [ci skip] clarify javadocs for Block#getDrops (#10153) 2024-01-27 18:35:09 +01:00
Tamion 7f7d05a21c [ci skip] Remove IRC link from the README (#10194) 2024-01-27 13:11:43 +01:00
Nassim Jahnke 1ed50dade8 Fix javadoc errors, remove unused classes 2024-01-26 21:34:40 +01:00
Nassim Jahnke fe53b0e76f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
1d522878 PR-966: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
cc01b745 PR-965: Add DragonBattle#setPreviouslyKilled
28e3702f SPIGOT-6921, PR-957: Add methods to remove all enchantments on an ItemStack
8872404e PR-961: Add BlockData#copyTo
4054cc7b PR-956: Add method to get an offline player's location

CraftBukkit Changes:
292ec79e0 SPIGOT-7568: Call EntityChangeBlockEvent for DecoratedPot
b44bf5aa8 SPIGOT-7575: SuspiciousStewMeta creates invalid PotionEffect data
161784713 PR-1340: Centralize the conversion from and to Minecraft / Bukkit registry items even more and add a test case for them
b93c5a30d PR-1338: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
fb973486c SPIGOT-7570: PrepareItemCraftEvent#isRepair() always returns false
c9c24535e PR-1337: Add DragonBattle#setPreviouslyKilled
c8b4da803 SPIGOT-6921, PR-1330: Add methods to remove all enchantments on an ItemStack
95bc1c4f5 PR-1333: Add BlockData#copyTo
36e2f9ce1 PR-1329: Add method to get an offline player's location

Spigot Changes:
c198da22 SPIGOT-7563: Update to latest release of bungeecord-chat
2024-01-26 20:19:17 +01:00
Nassim Jahnke bd2fd615ce [ci skip] Fixup a few bad comments 2024-01-26 19:41:41 +01:00
Nassim Jahnke b03f255532 Finish moving patches back and improving compilable state 2024-01-25 12:10:23 +01:00
Nassim Jahnke 1831240d1c [ci skip] Move chunk system patch back 2024-01-25 00:41:51 +01:00
Shane Freeder b700460999 Convert average tick value in the GUI to the correct granularity 2024-01-24 16:27:32 +00:00
Nassim Jahnke a4a08b7342 [ci skip] Move chunk system patch a bit back 2024-01-24 17:14:57 +01:00
Nassim Jahnke d405ff1255 [ci skip] Fixup last commit 2024-01-24 14:05:59 +01:00
Nassim Jahnke ad2cf68a7f [ci skip] Move chunk system patch back a bit 2024-01-24 13:42:24 +01:00
Nassim Jahnke 51bef80755 [ci skip] Remove removed patches 2024-01-24 11:55:36 +01:00
Nassim Jahnke 11645e3268 [ci skip] (Mostly) finish adding identifying patch comments 2024-01-24 11:45:17 +01:00
FireInstall 76da4bc683 Expose LootTable of DecoratedPot (#10023) 2024-01-23 15:57:17 -05:00
Jake Potrebic 24dc2bfc50 Add BlockStateMeta#clearBlockState (#10160) 2024-01-23 15:41:47 -05:00
1stGlitch 581b101180 Add world to Entity AddTo/RemoveFrom Events (#10183)
When a plugin listens to the EntityAddToWorld and EntityRemoveFromWorld events, I don't believe there is currently any method of directly obtaining which world the entity was actually added to/removed from. Using event.getEntity().getWorld() works in many cases, but not all. Specifically, when an entity is teleported from one world to another, the location of the entity is updated prior to the removal event being called. This means that when an entity goes through a nether/end portal or is teleported between worlds with a command, a plugin listening to the EntityRemoveFromWorldEvent has no way of determining which world the entity was actually removed from (without relying on other events).

To resolve this, I've added the world as a field in the events along with a getter to retrieve it. I also removed an unused import and made the documentation more clear on the event behaviour when chunks load/unload.
2024-01-23 15:17:14 -05:00
Nassim Jahnke c57d1aa245 Move diffs around to compile without later ones applied 2024-01-23 18:06:51 +01:00
Nassim Jahnke e66037960b [ci skip] Move some disruptive patches back 2024-01-23 15:57:42 +01:00
Nassim Jahnke 52619e7a21 [ci skip] Add more patch identifying comments 2024-01-23 14:39:23 +01:00
Nassim Jahnke 484d6bfb4e [ci skip] Move some disruptive patches back 2024-01-23 12:47:01 +01:00
Nassim Jahnke 25013d9970 [ci skip] Move some disruptive patches back 2024-01-22 21:13:10 +01:00
Nassim Jahnke 9eb0b38157 [ci skip] Add more patch identifying comments 2024-01-22 19:01:10 +01:00
Nassim Jahnke 684319f9c6 [ci skip] Add more patch identifying comments 2024-01-22 18:04:55 +01:00
Nassim Jahnke 27cabc19a0 [ci skip] Add more patch identifying comments 2024-01-21 19:59:34 +01:00
Nassim Jahnke d9df6bc5e6 [ci skip] Add more patch identifying comments, cleanup 2024-01-21 17:55:04 +01:00
Nassim Jahnke e9e0bc168d [ci skip] Add more identifying patch comments 2024-01-21 16:01:04 +01:00
Nassim Jahnke 98e6d20ebd [ci skip] Add more identifying patch comments 2024-01-21 13:38:50 +01:00
Nassim Jahnke f7dd304b1f [ci skip] Add more identifying patch comments 2024-01-21 12:11:43 +01:00
Nassim Jahnke 8d94596e30 [ci skip] Add more identifying patch comments 2024-01-20 23:41:26 +01:00
Shane FreederandCryptite b48d737759 Async world data IO saving (#10171)
Co-authored-by: Cryptite <cryptite@gmail.com>
2024-01-20 22:51:15 +01:00
Pantera (Mad_Daniel) 4a98986e28 Add back Reduce allocation of Vec3D by entity tracker patch (#10179) 2024-01-20 12:26:51 -05:00
Nassim Jahnke 68c3297947 [ci skip] Add more identifying patch comments 2024-01-20 14:25:44 +01:00
Lulu13022002 8e41ef4cc5 Add visual blockdata api for primed tnt (#10146) 2024-01-19 18:01:12 -05:00
Nassim Jahnke 42e88a8b7b [ci skip] Add more identifying patch comments 2024-01-19 22:13:42 +01:00
Nassim Jahnke 1c956abfbc [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 17:54:05 +01:00
Nassim Jahnke eeb6afc435 [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 15:30:44 +01:00
Nassim Jahnke cc693ce82b [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 12:55:49 +01:00
Nassim Jahnke 106c67a811 [ci skip] Add more identifying patch comments 2024-01-18 22:00:40 +01:00
Shane Freeder f61ebdce91 Fix issue with kick event causes being passed improperly 2024-01-18 19:36:08 +00:00
Nassim Jahnke 3e20d3a275 [ci skip] Add more identifying patch comments 2024-01-18 18:57:15 +01:00
Nassim Jahnke 5e73c555bc [ci skip] Add more identifying patch comments 2024-01-18 15:56:25 +01:00
Nassim Jahnke 94807a1d2e [ci skip] Minor cleanup and patch merges 2024-01-16 19:27:39 +01:00
Nassim Jahnke ebf97bdfdd [ci skip] Add more patch identifying comments 2024-01-16 13:32:52 +01:00
Owen 848a3960f6 Add mob goal generator (#9980) 2024-01-15 14:36:10 -05:00
Nassim Jahnke 0ef59845bf [ci skip] Add more patch identifying comments, merge related patches 2024-01-15 12:50:31 +01:00
Nassim Jahnke f9fdedf2d7 [ci skip] Add more patch identifying comments, merge related patches 2024-01-14 17:04:39 +01:00
Nassim Jahnke 93a848c4b9 Readd missed line 2024-01-14 13:51:41 +01:00
Nassim Jahnke c151c956e0 Fixup AsyncPreLoginEvent patches
Fixes #10165
2024-01-14 13:47:09 +01:00
Jake Potrebic 8657cd91d7 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
63c208dd Remove no longer used import
70be76c7 PR-958: Further clarify deprecation of TAG_CONTAINER_ARRAY
ae21f4ac PR-955: Add methods to place structures with block/entity transformers
e3d960f2 SPIGOT-7547: Remark that Damageable#setAbsorptionAmount() is capped to a specific value
b125516c Fix typo in RecipeChoice.ExactChoice docs
309497c1 Add EntityMountEvent and EntityDismount Event
2fd45ae3 Improve ItemFactory#enchantItem consistency
2b198268 PR-933: Define native persistent data types for lists

CraftBukkit Changes:
771182f70 PR-1327: Add methods to place structures with block/entity transformers
e41ad4c82 SPIGOT-7567: SpawnReason for SNOWMAN is reported as BUILD_IRONGOLEM
76931e8bd Add EntityMountEvent and EntityDismount Event
9b29b21c7 PR-1183: Better handle lambda expression and renaming of classes in Commodore
1462ebe85 Reformat Commodore.java
9fde4c037 PR-1324: Improve ItemFactory#enchantItem consistency
4e419c774 PR-1295: Define native persistent data types for lists
dd8cca388 SPIGOT-7562: Fix Score#getScore and Score#isScoreSet
690278200 Only fetch an online UUID in online mode
1da8d9a53 Fire PreLogin events even in offline mode
2e88514ad PR-1325: Use CraftBlockType and CraftItemType instead of CraftMagicNumbers to convert between minecraft and bukkit block / item representation

Spigot Changes:
864e4acc Restore accidentally removed package-info.java
f91a10d5 Remove obsolete EntityMountEvent and EntityDismountEvent
828f0593 SPIGOT-7558: Deprecate silenceable lightning API as sound is now client-side and cannot be removed
cdc4e035 Remove obsolete patch fetching correct mode UUIDs
49e36b8e Merge related BungeeCord patches
6e87b9ab Remove obsolete firing of PreLogin events in offline mode
5c76b183 Remove redundant patch dealing with exceptions in the crash reporter
3a2219d1 Remove redundant patch logging cause of unexpected exception
2024-01-14 10:46:04 +01:00
Nassim Jahnke 78fcb8e766 [ci skip] Update contributing guidelines to include identifying commit titles in comments (#10162) 2024-01-14 00:42:59 +01:00
Jake Potrebic 17275ffd68 [ci skip] add more comments & move 1 hunk to correct patch 2024-01-13 12:31:02 -08:00
Nassim Jahnke c0e4697dbd [ci skip] Add more patch identifying comments 2024-01-13 18:34:33 +01:00
Nassim Jahnke e84621a9d8 [ci skip] Add more patch identifying comments 2024-01-13 16:35:59 +01:00
Nassim Jahnke 8c8862f3a8 Also check for the actual character length in ResourceLocation validation 2024-01-12 23:33:43 +01:00
Nassim Jahnke a0ffb57745 [ci skip] Small cleanup to mc utils patch 2024-01-12 21:58:54 +01:00
Nassim Jahnke f28caff927 Limit ResourceLocation length to nbt string tag length 2024-01-12 19:33:17 +01:00
Jake Potrebic ec196207c2 Use a ConcurrentHashMap for enum mappings for BlockData (#10161)
This API should be thread-safe as there is no world state
2024-01-12 16:25:12 +00:00
Jake Potrebic a80d31b1bd Log command execution exceptions if debug=true (#10130) 2024-01-11 08:15:17 -08:00
Nassim Jahnke 07b956e3a3 Fix tests by disabling them 2024-01-06 19:13:45 +01:00
Nassim Jahnke f1c5f0198c [ci skip] Fix typo 2024-01-06 15:11:45 +01:00
Nassim Jahnke e46276eb71 Fixup NamespacedKey parsing 2024-01-06 15:07:59 +01:00
Nassim Jahnke 570cfb44d6 Validate missed resource location parsing 2024-01-06 09:51:49 +01:00
Jake Potrebic a58e29db99 Fix a borked update of 'Properly handle BlockBreakEvent#isDropItems' (#10134) 2024-01-05 10:07:43 +01:00
Warrior 25a99b12e8 Fix BlockDestroyEvents effectBlock not being set (#10131) 2024-01-05 01:09:04 +01:00
Jake Potrebic a93acc4275 Fix EntityChangePoseEvent being called during worldgen (#10120) 2024-01-04 12:55:01 -08:00
Jake Potrebic 8379027ee0 Fix cmd permission levels for command blocks (#7404) 2024-01-04 12:37:59 -08:00
Owen 19a620213f Fix experience & improvements to block events (#8067)
This is a lot but basically adds a method to disable the dropping of experience and drops experience by default.
This way things that require XP to be dropped manually (via modification), they can drop XP themselves when needed but without touching anywhere else that may drop xp.

It should be noted this causes breakNaturally() to now drop experience.
2024-01-04 15:18:59 -05:00
Nassim Jahnke 7eaff48d7c [ci skip] Replace some magic values with constant references 2024-01-04 14:38:26 +01:00
Nassim Jahnke b2a6d575dd Validate ResourceLocation in NBT reading 2024-01-04 13:55:17 +01:00
Bjarne Koll 259bc76026 Pass system properties to maven repo session (#10117)
The maven repository sessions used by the maven library loader requires
the java.version property to later evaluate the active profiles of
dependencies when downloading them during the plugin loader logic.

This commit fixes this by passing all system properties as a hopefully
future-proof way to provide the required data to said session.
2024-01-04 11:13:12 +00:00
Jake Potrebic ae001ae6ee Fix untrack event not being called for all 'untracks' (#10110) 2024-01-03 20:57:49 -08:00
Jake Potrebic 1fa48d140c include relative flags in PlayerTeleportEvent (#8190) 2024-01-02 20:42:26 +01:00
OwenandBjarne Koll 509876d26f Keep fully frozen entities fully activated (#10103)
* Keep fully frozen entities fully activated

* Rebase and switch to isFreezing

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-01-02 11:08:34 -08:00
Jake Potrebic 692db0c81d fix CustomModelData being removed (#10113) 2024-01-02 19:51:09 +01:00
Jake Potrebic 816bacc2c3 Call EntityChangeBlockEvent for cake eating (#10105) 2024-01-02 19:45:36 +01:00
Jake Potrebic 58e120b77c [ci skip] Remove extraneous diff added in 1.20.3 update (#10101) 2024-01-02 10:29:53 -08:00
Jake Potrebic 983377b55a Correctly check if bucket dispenses will succeed for event (#10109) 2024-01-02 09:14:42 -08:00
Spottedleaf 1281f4f552 Make region/lock shift accessors per world
This has been done to ensure that the shifts are not used
until the world object is being constructed, which is before
the global configuration is initialised. There also isn't any
reason for these shifts to be global anyways.
2023-12-30 15:45:24 -08:00
Jake Potrebic 0ae58c09a1 cleanup player death event adventure logic (#10095)
There was a TODO left there regarding the translated death
message being used by plugins to identify the cause of death. This
should be mitigated now because the LegacyComponentSerializer default
implemenation uses our custom flattener which renders vanilla
translatable components to their English representation.
2023-12-29 12:28:58 -08:00
Jake Potrebic 3484ae987a Call entity_die game event after event cancel check (#10096) 2023-12-29 11:57:32 -08:00
caramel e56e53f83a Fix some component bugs in login disconnect packet (#10090) 2023-12-29 20:51:52 +01:00
caramel 5e978d3a3d Fix Folia scheduler tasks not canceling when plugin disable (#10091) 2023-12-29 01:59:19 +01:00
Jake Potrebic e4ab50de34 Properly disallow async Player#chat (#8123)
Clarify asynchronous status of AsyncChatEvent
2023-12-28 16:50:06 -08:00
Tamion 2951732742 Add HiddenPotionEffect API (#9910) 2023-12-28 19:38:44 -05:00
Cryptite b2ffb1b02d Add PlayerShieldDisableEvent (#9177) 2023-12-29 01:27:34 +01:00
Jake Potrebic 2c3ccb80f0 Add drops to shear events (#5678) 2023-12-28 14:41:07 -08:00
Jake Potrebic 3c0d6aaed9 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10085)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
0c7aedbc SPIGOT-7554, PR-954: Add DecoratedPotInventory

CraftBukkit Changes:
53ebb05e3 SPIGOT-7554, PR-1323: Add DecoratedPotInventory
33a2d8773 Ensure that PlayerMoveEvent is always fired where applicable
7df18510f SPIGOT-7555: Don't cast ItemFlags to byte
19aec59ea Use provided case for non-existent OfflinePlayers

Spigot Changes:
e7ce55a3 Remove obsolete PlayerMoveEvent improvements
3e5e22c0 Remove obsolete lowercasing of non existent OfflinePlayer names
2023-12-28 12:47:57 -08:00
Jake Potrebic 8221b085f9 Fix global sound event gamerule not being respected (#8727) 2023-12-27 16:33:05 -08:00
Md5Lukas c081104395 Add experience points api (#9688) 2023-12-28 00:49:45 +01:00
Alex 88d28d6bdd Fix long loading screen when refreshing skins (#10026)
Send `ClientboundGameEventPacket.LEVEL_CHUNKS_LOAD_START` when refreshing players after
player profile changes.
2023-12-28 00:22:44 +01:00
Jake Potrebic a401585cfa Fix campfire recipes not always outputting full result (#8754) 2023-12-27 15:02:49 -08:00
Jake Potrebic d1f507fc0e Don't fire 2 game events for certain cauldron interactions (#8904) 2023-12-27 14:32:39 -08:00
Jake Potrebic 0d6a0c3b28 Fix command block async message (again) (#10082) 2023-12-27 10:30:15 +01:00
Owen dc621507f5 Catch async usage of playsound (#10021) 2023-12-26 15:00:21 -05:00
Jake Potrebic f483b38596 fix NPE on EntityTeleportEvent getTo (#10016) 2023-12-26 11:22:41 -08:00
Warrior 4fdda9e583 Keep newlines in outdated client/server message (#10042) 2023-12-26 14:02:22 -05:00
Jake Potrebic c215ce1858 [ci skip] cleanup patch diff from last commit 2023-12-25 16:47:06 -08:00
Nassim Jahnke e035fd7034 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
cc9aa21a SPIGOT-6399, SPIGOT-7344: Clarify collidable behavior for player entities
f23325b6 Add API for per-world simulation distances
26e1774e Add API for per-world view distances
0b541e60 Add PlayerLoginEvent#getRealAddress
5f027d2d PR-949: Add Vector#fromJOML() overloads for read-only vector types

CraftBukkit Changes:
bcf56171a PR-1321: Clean up some stuff which got missed during previous PRs
7f833a2d1 SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst
752aac669 Implement APIs for per world view and simulation distances
57d7ef433 Preserve empty enchantment tags for glow effect
465ec3fb4 Remove connected check on setScoreboard
f90ce621e Use one PermissibleBase for all command blocks
5876cca44 SPIGOT-7550: Fix creation of Arrow instances
f03fc3aa3 SPIGOT-7549: ServerTickManager#setTickRate incorrect Precondition
9d7f49b01 SPIGOT-7548: Fix wrong spawn location for experience orb and dropped item

Spigot Changes:
ed9ba9a4 Drop no longer required patch ignoring -o option
86b5dd6a SPIGOT-7546: Fix hardcoded check for outdated client message
aa7cde7a Remove obsolete APIs for per world view and simulation distances
6dff577e Remove obsolete patch preserving empty `ench` tags
a3bf95b8 Remove obsolete PlayerLoginEvent#getRealAddress
1b02f5d6 Remove obsolete connected check on setScoreboard patch
acf717eb Remove obsolete command block PermissibleBase patch
053fa2a9 Remove redundant patch dealing with null tile entities
2023-12-26 00:18:13 +01:00
Nassim Jahnke 61768e08e7 [ci skip] Remove no longer needed mappings change 2023-12-25 19:15:48 +01:00
Nassim Jahnke 1cda66e395 Hotfix Entity isInRain reobf issue
Caused by upstream making the method public, which then causes an accidental override from an unrelated method
Fixes #10078
2023-12-25 18:37:20 +01:00
EpicPlayerA10 ff7b9b0380 Increase default custom payload channel size limit (#10006) 2023-12-25 12:01:18 +01:00
Jake Potrebic 4adca3d7a3 Update to adventure 4.15 (#10045) 2023-12-25 11:51:44 +01:00
Jake Potrebic 49f9f6f2cd Add Registry#getKey (#10066)
Some types that have registries support existing without
being in a registry and therefore have no key. This is part
one of supporting that, adding a Registry#getKey(Object) method
to be able to get the key for an object so we can remove Keyed
from such objects.

This also deprecates Keyed#getKey on TrimMaterial and TrimPattern
as these are the 2 offending types currently in the api.
2023-12-23 13:16:27 -08:00
Jake Potrebic e7e1c8a832 Fix and add new scoreboard API (#10037) 2023-12-23 11:53:07 -08:00
Jake Potrebic 1e7dd72f15 Remove 'fix Vanilla Minecart speed' patch (#10068)
The game uses 0.95d now
2023-12-22 17:44:36 -08:00
Jake Potrebic b4c9e7e5d4 add missing Experimental annotations (#10012) 2023-12-21 13:13:05 -08:00
Jake Potrebic d11a58802a Remove duplicate code in chunk tick iteration (#10056) 2023-12-21 09:15:00 -08:00
Jake Potrebic 45e01a2a78 Use correct max stack size in crafter (#10057) 2023-12-21 09:10:28 -08:00
Lulu13022002 086ca616d8 Fix world border edge collision (#10053)
The collision shape of the border is determined by flooring the min values and ceiling the max values, so the isCollidingWithBorder() function should mirror such behavior.
2023-12-19 21:31:07 -08:00
Jason Penilla 5385b21fd3 [ci skip] Make test results viewable in-browser and downloadable (#10055)
* Post test results

* empty commit

* Make a test fail

* Add missing check

* Disable commenting

* Revert "Make a test fail"

This reverts commit d919653c2b38a3afb74d28e5462685f7ec54b16a.

* remove commenting permission
2023-12-19 19:33:46 -08:00
Jake Potrebic 8c007d90a5 properly read and store sus effect duration (#10050) 2023-12-19 13:31:49 -08:00
Jake Potrebic 47b2c186d7 Don't fire the drop event on player deaths (#10046) 2023-12-18 20:57:49 -08:00
Spottedleaf 0b952981e6 Make worldborder collisions consistent with Vanilla
Vanilla now requires the use of WorldBorder#isInsideCloseToBorder
to consider a border collision
2023-12-18 17:12:55 -08:00
Jake Potrebic e3140fb70e hotfix spawning item/xp in wrong spot 2023-12-17 20:23:39 -08:00
Jake Potrebic ff26d54ee0 send sound and particle packets immediately even if off main (#10033) 2023-12-17 11:39:40 -08:00
Jake Potrebic de04cbced5 Updated Upstream (Bukkit/CraftBukkit) (#10034)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f29cb801 Separate checkstyle-suppressions file is not required
86f99bbe SPIGOT-7540, PR-946: Add ServerTickManager API
d4119585 SPIGOT-6903, PR-945: Add BlockData#getMapColor
b7a2ed41 SPIGOT-7530, PR-947: Add Player#removeResourcePack
9dd56255 SPIGOT-7527, PR-944: Add WindCharge#explode()
994a6163 Attempt upgrade of resolver libraries

CraftBukkit Changes:
b3b43a6ad Add Checkstyle check for unused imports
13fb3358e SPIGOT-7544: Scoreboard#getEntries() doesn't get entries but class names
3dda99c06 SPIGOT-7540, PR-1312: Add ServerTickManager API
2ab4508c0 SPIGOT-6903, PR-1311: Add BlockData#getMapColor
1dbdbbed4 PR-1238: Remove unnecessary sign ticking
659728d2a MC-264285, SPIGOT-7439, PR-1237: Fix unbreakable flint and steel is completely consumed while igniting creeper
e37e29ce0 Increase outdated build delay
c00438b39 SPIGOT-7530, PR-1313: Add Player#removeResourcePack
492dd80ce SPIGOT-7527, PR-1310: Add WindCharge#explode()
e11fbb9d7 Upgrade MySQL driver
9f3a0bd2a Attempt upgrade of resolver libraries
60d16d7ca PR-1306: Centralize Bukkit and Minecraft entity conversion

Spigot Changes:
06d602e7 Rebuild patches
2023-12-16 18:09:28 -08:00
Spottedleaf f1820dc80a Fix incorrect border collision detection
The epsilon used was in the opposite direction, which would cause
the getCollisions method to incorrectly return it for when players
were exactly on the border but not colliding. To bring it in-line
with the rest of the collision code, the collision must be into
the border by +EPSILON.

Fixes https://github.com/PaperMC/Paper/issues/9859
2023-12-14 18:57:17 -08:00
Jason Penilla 7e15d977ec Remove no longer needed diff from adventure patch 2023-12-12 13:44:09 -08:00
booky10 dc3ef2ae0f Fix vanilla components not being translated (#9893)
* Fix vanilla components not being translated

* Add nullability check, simplify adventure component encoding

Changes suggested by @jpenilla
2023-12-12 13:40:33 -08:00
Jason Penilla 0fadaed078 [ci skip] move decomp fixes to correct patch 2023-12-11 22:08:51 -08:00
Jake PotrebicandJason Penilla 7c2dc4b342 Use Codecs for adventure Component conversions & network serialization (#10014)
* finish implementing all adventure components in codecs

* add some initial tests

* Add round trip tests for text and translatable components

* Add more round trip test data (score component is failing)

* Add more round trip test data

* Fix SCORE_COMPONENT_MAP_CODEC

* Improve test failure messages

* Add failure cases

* Add a couple more test data

* Make use of AdventureCodecs

* Update patches after rebase

* Squash changes into adventure patch

* Fix AT formatting

* update comment

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2023-12-11 22:02:06 -08:00
Jason Penilla 82f9280ae4 Fix deprecated bungee APIs still serializing to JSON in packets (#10028) 2023-12-11 20:24:48 -08:00
Owen 28abbaa7bd Catch setEnabled to ensure classloader is properly unloaded (#10020) 2023-12-10 20:02:26 -05:00
Jake Potrebic dd16335e40 fix NPE when iterating over default drops (#10017) 2023-12-10 10:33:36 -08:00
Jake Potrebic 3434a6fc66 Update key gen for 1.20.4 (#10015) 2023-12-10 10:25:01 -08:00
Jake Potrebic 166761f29f Update and clean up api dependencies (#10018) 2023-12-10 10:04:19 -08:00
caramel bcbe5dcd78 Fix PlayerInteractEvent#getClickedBlock() returning wrong block in adventure mode (#10019) 2023-12-10 11:02:24 +01:00
Nassim Jahnke b42a1da873 Use uuid param in setResourcePack 2023-12-09 13:53:08 +01:00
Jake Potrebic abfb6b219b more work on adventure codecs 2023-12-08 21:48:02 -08:00
Jake Potrebic 9051fc347c remove redundant patch 2023-12-08 15:14:42 -08:00
Jake Potrebic f17622cc3d more cleanup and resource pack api fixes 2023-12-08 15:13:02 -08:00
Jake Potrebic 7606e6da39 fixup tests and add missing API detected by those tests 2023-12-08 12:07:56 -08:00
Lulu13022002 8d8eb3bdf6 optimise explosion damage further
and use the right entity for the dragon part damage
2023-12-08 20:47:27 +01:00
Jake Potrebic 2f92d4e00e Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
01bb6ba7 PR-936: Add new PersistentDataContainer methods and clean up docs
bc145b90 PR-940: Create registry for banner pattern and cat type

CraftBukkit Changes:
cb2ea54de SPIGOT-7440, PR-1292: Fire EntityTeleportEvent for end gateways
4fea66e44 PR-1299: Add new PersistentDataContainer methods and clean up docs
b483a20db PR-1303: Create registry for banner pattern and cat type
4642dd526 SPIGOT-7535: Fix maps not having an ID and also call MapInitializeEvent in more places
2023-12-08 11:00:39 -08:00
Jason Penilla f9edc4b1cd Update paperweight to 1.5.11 2023-12-08 11:12:59 -07:00
Jason Penilla 930a24f965 1.20.4 2023-12-07 13:27:28 -07:00
Owen1212055 ff72782888 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
cdfe62e4 Update to Minecraft 1.20.4

CraftBukkit Changes:
51eea725f Update to Minecraft 1.20.4

Spigot Changes:
ce0f71e4 Update to Minecraft 1.20.4
2023-12-07 15:15:25 -05:00
Jake Potrebic d0476837a5 more adventure codec stuff
and fix tests
2023-12-07 11:14:29 -08:00
Noah van der Aa 9223f05a40 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
c9cb08551 SPIGOT-7536: Using Crafter crashes server
2023-12-07 13:03:14 +01:00
Jake Potrebic 6577db6dd6 cleanup Optimize MappedRegistry patch 2023-12-06 22:41:13 -08:00
Jason Penilla 6c4c13df44 Update adventure 2023-12-06 21:24:16 -07:00
Owen1212055 9227a9648c Clean up username validation logic 2023-12-06 20:26:58 -05:00
Owen1212055 b277feb448 Hotfix DefaultDispenseItemBehavior#spawnItem 2023-12-06 19:45:28 -05:00
Jason Penilla 3b94cc3546 Clean up settings script 2023-12-06 15:57:51 -07:00
Jason Penilla ada77b3a3b Wait on stream redirect futures (update helper task) 2023-12-06 15:32:08 -07:00
Nassim Jahnke 6bafacfb14 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9a294519 SPIGOT-7533, 943: Add missing Poses for 1.20.3
be2884c4 Add unique ID to PlayerResourcePackStatusEvent
d9c1eb83 Add additional @MinecraftExperimental annotations
68f5bb6a SPIGOT-7526: Add missing PlayerResourcePackStatusEvent statuses

CraftBukkit Changes:
368c48be1 Fix formatting issue in previous commit
da8f91f31 SPIGOT-7534: Error when chunk with decorated pot trying to save
d20c9291a SPIGOT-7532: Entity#isValid() returns false after server restart
ec1fa2ead PR-1309: Add tests for Bukkit Pose
5a7080b58 Add unique ID to PlayerResourcePackStatusEvent
0fd734950 SPIGOT-7528: Fix certain custom shaped recipes
2023-12-06 23:01:51 +01:00
Nassim Jahnke b1f94a84e8 Update cb package version 2023-12-06 22:51:50 +01:00
Nassim Jahnke 772d430cd1 Fix timings check with tick freezes 2023-12-06 22:40:08 +01:00
Nassim Jahnke 896e29bba7 Inline imports in loottable patch 2023-12-06 22:22:22 +01:00
Nassim Jahnke d1dbe0020d Fix lootable patch, cb crash due to unimplemented methods 2023-12-06 22:17:56 +01:00
Jason Penilla 0addaa1cf2 Temp adventure update 2023-12-06 13:53:16 -07:00
Nassim Jahnke c833571526 Make it compile again 2023-12-06 21:28:59 +01:00
Owen1212055 a2b6275487 Add missing removed patches 2023-12-06 13:26:04 -07:00
Jason Penilla f10b36d7fc wait for second pass apply 2023-12-06 13:26:04 -07:00
Nassim Jahnke 9bc67abccf Fixup 2023-12-06 21:19:37 +01:00
Owen1212055 ff2946e04b Fix some missing diffs 2023-12-06 15:11:00 -05:00
Owen1212055 d3f1bc04b4 Remove some patches 2023-12-06 15:09:14 -05:00
Nassim Jahnke b32a34c71d Add missing timings stop 2023-12-06 21:04:01 +01:00
Nassim Jahnke 03541446b2 Drop old packs in setResourcePack 2023-12-06 20:46:49 +01:00
Nassim Jahnke c2b70338fc It compiles 2023-12-06 20:40:37 +01:00
Nassim Jahnke 1d028f3853 More compile fixes 2023-12-06 20:10:59 +01:00
Jason Penilla 05148728de build script updates 2023-12-06 11:48:37 -07:00
Jake Potrebic deb02722b2 more compile fixes 2023-12-06 10:36:49 -08:00
Lulu13022002 6b272a65e7 remove old diff 2023-12-06 19:29:36 +01:00
Noah van der Aa 5999d669ac More compile fixes 2023-12-06 19:21:41 +01:00
Nassim Jahnke 67f1688c30 Toggle updatingMinecraft property 2023-12-06 19:21:09 +01:00
Nassim Jahnke b8f9558745 Apply all patches 2023-12-06 19:19:19 +01:00
Jake Potrebic a364b7e88b fix more compile issues 2023-12-06 10:07:47 -08:00
Jake Potrebic 0dee538a62 Upstream blocked Player#remove so our patch needed to be refactored 2023-12-06 09:54:52 -08:00
Jake Potrebic 6c4efc92be fix mismatched bracket in game packet listener 2023-12-06 09:47:45 -08:00
Bjarne Koll 13b92ad487 Make things explodes via patches 2023-12-06 18:33:52 +01:00
Bjarne Koll 855a8196cf Fix custom potion mixes patch 2023-12-06 17:40:36 +01:00
Owen1212055 9546b9c587 Patches!!! MORE MORE MORE MOOOOORE 2023-12-06 11:34:54 -05:00
Owen1212055 cd61b5d98e Patches!!! MORE 2023-12-06 11:21:56 -05:00
Owen1212055 6bf2ebf200 Patches!!! (2) 2023-12-06 11:00:26 -05:00
Owen1212055 25dc4afafa Patches!!! 2023-12-06 10:17:00 -05:00
Jason Penilla 46be245976 add description to helper 2023-12-05 21:59:52 -07:00
Jake Potrebic cc78c7f5f5 fix serializing TextColor with name 2023-12-05 20:56:02 -08:00
Jason Penilla 29e137669e p a t c h e s 2023-12-05 21:49:31 -07:00
Jason Penilla 2053d6ace7 Improve update helper task 2023-12-05 21:46:41 -07:00
Jason Penilla fc12258f24 more patch 2023-12-05 20:57:46 -07:00
Jason Penilla c7a463a736 Add update helper task 2023-12-05 20:35:33 -07:00
Jason Penilla 723c05e7fe some patches :D 2023-12-05 20:34:04 -07:00
Jason Penilla 5513f8a795 patches ... 2023-12-05 20:00:14 -07:00
Jason Penilla bdbdca8a56 Bump Gradle wrapper to 8.5 2023-12-05 17:58:17 -07:00
Jake Potrebic ad99d4568b initial work on native Adventure codecs 2023-12-05 16:49:11 -08:00
Jason Penilla 6e9a238a8c some more patch 2023-12-05 15:55:31 -07:00
Jason Penilla 7a59fd38d4 patches up to anti x ray 2023-12-05 15:32:41 -07:00
Jason Penilla 9d9fcf7e62 fix timings patch field use 2023-12-05 15:25:25 -07:00
Jason Penilla 1a33343012 some more patches 2023-12-05 15:21:44 -07:00
Jason Penilla a30aad98f7 some patches 2023-12-05 15:12:48 -07:00
Jake Potrebic c3f3edea07 port UnknownCommandEvent patch 2023-12-05 13:51:34 -08:00
Jason Penilla b89fff0490 Update generated API 2023-12-05 14:36:33 -07:00
Jason Penilla dfac4f9df2 patches 2023-12-05 14:34:01 -07:00
Jason Penilla fad3fa9bde Update loot table and other patches 2023-12-05 14:20:44 -07:00
Nassim Jahnke 2a9a9c4cf0 Remove unnecessary import 2023-12-05 20:56:22 +01:00
Nassim Jahnke 2efd9bb99f More more more work 2023-12-05 20:54:55 +01:00
Nassim Jahnke d7fc0c5ab2 More more work 2023-12-05 20:39:26 +01:00
Nassim Jahnke 603b32976b More work 2023-12-05 20:14:54 +01:00
Nassim Jahnke 9b56221762 Adventure (kind of) 2023-12-05 19:38:29 +01:00
Nassim Jahnke 8e8d6aeeb0 Finish API 2023-12-05 18:33:18 +01:00
Nassim Jahnke 2a1ace0cf2 Prepare for 1.20.3 dev 2023-12-05 18:20:55 +01:00
Jake Potrebic 931781c220 [ci skip] rebuild patches 2023-12-03 10:09:54 -08:00
Owen 9271ee7643 Dont resend blocks on interactions (#9413)
In general, the client now has an acknowledgment system that will cause block changes made by the client to be reverted correctly.

Essentially:

The client enters a "prediction" stage, where any block changes made will have its old blockstate captured (this is referred to as "server state").
If you update blocks during this stage, the client will update this captured server state as long as they're still currently predicting.
After prediction is done (via an ack packet) all captured blockstates are reverted to their captured server state.
This means that if the server actually updated a block and send a block update packet, it's correctly set, while if a block wasn't updated on the server but WAS updated on the client (server state wasn't updated), that change will be reverted.

It should be noted that this system does not yet support block entities, so those still need to be resynced when needed.

I discovered this when noticing that blocks broken outside of the player's valid interaction distance are still properly reverted, even though the server doesn't send any block updates, only an ack packet.
2023-12-02 22:41:35 -05:00
Jake Potrebic 8e061ce9c8 Add Structure check API (#9062) 2023-12-02 18:11:57 -08:00
Owen 5cbd5352b4 Fix Mushroom cow stew api (#9934) 2023-12-02 17:54:58 -08:00
Jake Potrebic 37bee09e3d Restore vanilla entity drops behavior (#7650) 2023-12-02 17:35:10 -08:00
MrPowerGamerBR ffa4115239 Configurable Dry and Wet Farmland Tick Rates (#9968)
* Configurable Dry and Wet Farm Land Nearby Water Tick Rates

* Rebase and squash

---------
2023-12-02 17:00:17 -08:00
hyper1423 40872ece07 Fix CraftMetaItem#addAttributeModifier duplication check (#9995) 2023-12-03 01:59:13 +01:00
Jake Potrebic 3766afadd5 [ci skip] Add mention of FQ imports (#9994) 2023-12-02 22:52:14 +01:00
Tamion 977a729eb0 [ci skip] Correct Windows requiring path to gradlew (#9976)
* [ci skip] Correct Windows requiring path to gradlew

* Update CONTRIBUTING.md
2023-12-02 13:32:46 -08:00
MrPowerGamerBR 8bda1f72a5 Remove unnecessary durability check in ItemStack#isSimilar (#9979)
* Optimize "ItemStack#isSimilar(...)" by removing the unnecessary durability check

* Change patch name and add a better commit message
2023-12-02 13:31:25 -08:00
Jake Potrebic 2184fbca00 Log correct recipes and advancement count on server start (#9978) 2023-12-02 13:17:35 -08:00
waterlily1andschwaa96 9993eb9d16 Updates documentation in EntityEquipment.java (#9992)
* Updates documentation in EntityEquopment.java to reflect behavior mentioned in issue #9867

* rebase and squash patches

---------

Co-authored-by: schwaa96 <schwaa96@mi.fu-berlin.de>
2023-12-02 12:29:47 -08:00
Jason Penilla 2182d47792 Update mapping-io (#9975) 2023-11-28 15:18:21 -07:00
Jake Potrebic 4d111a32bb Un-experimentalize Entity TP APIs (#9964) 2023-11-28 11:40:25 -08:00
Jake Potrebic b37bbcfd98 Use ? super in Consumer/Predicate API (#9939) 2023-11-25 15:03:02 -08:00
Gijs de Jong f9938d3949 Fix plugin bootstrap dependency tree population (#9963)
This patch fixes a bug where the dependency tree used for classpath joining,
wasn't built using the bootstrap dependencies, for plugin bootstrappers.
2023-11-25 17:57:12 -05:00
Jake Potrebic 0b20f94297 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9953)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
96340858 PR-938: Various Sound API improvements
cbfe0ff0 PR-937: Minor improvements to World#rayTrace documentation
e979ee95 PR-935: Change Consumer and Predicates to super
27ae46dc SPIGOT-3641, SPIGOT-7479, PR-931: Add missing values to EntityEffect
0616ec8b Add eclipse .factorypath file to .gitignore

CraftBukkit Changes:
8e162d008 PR-1301: Various Sound API improvements
eeb7dfc2d SPIGOT-7520: Attribute LootTableSeed missing for generated containers with attached LootTable
d433f086d PR-1297: Change Consumer and Predicates to super
864f616da SPIGOT-7518: Fix NullPointerException when calling Block#applyBoneMeal()
5a2d905af Add eclipse .factorypath file to .gitignore
7c6bf15d4 Fix SkullMeta configuration serialization / deserialization with note block sound

Spigot Changes:
7de1049b Rebuild patches
2023-11-25 14:34:42 -08:00
Jake Potrebic 8eac3e1b93 Don't fire EntityPotionEffectEvent during worldgen (#9965) 2023-11-25 14:18:37 -08:00
Warrior 8280211e52 Fix yaw being ignored for first spawn pos (#9959) 2023-11-25 14:09:26 -08:00
MrPowerGamerBR faa2f475b0 Lazily create LootContext for criterions (#9969)
For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate

To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance
2023-11-25 17:01:26 -05:00
TonytheMacaroni 334b2f20db Fix max nearby entities class check (#9967) 2023-11-25 16:48:32 -05:00
Shane Freeder ed753d34d2 Re-add missing vanilla safeMode arg 2023-11-25 09:49:48 +00:00
Jake Potrebic 96d5e6ca48 Code Generation for TypedKeys (#9233)
Currently includes generated key holder classes for types
used in the Registry Modification API
2023-11-22 20:56:28 -08:00
Jason Penilla e1cd9e59e5 Update paperweight to 1.5.10 and Gradle to 8.4 (#9957) 2023-11-22 06:27:50 +01:00
Tamion eda3d537d6 [ci skip] Improve PlayerChatEvent Deprecation Message (#9956) 2023-11-22 05:46:51 +01:00
Isaac - The456 250388defe add getAdvancementProgress() to PlayerAdvancementCriterionGrantEvent (#9865)
this allows for simpler checks for if an advancement would be given to a player,
and denying it (as the advancement grant event is non-cancelable)
2023-11-18 20:18:48 -05:00
booky10 86117967db Fix missing event call for entity teleport API (#9937)
* Fix missing event call for entity teleport API

Previously a plugin couldn't cancel or modify an entity-teleport from another plugin.

* rebase
2023-11-18 20:05:34 -05:00
TonytheMacaroni 581c7434be Add API to retrieve an attribute modifier from a UUID (#9924)
* Add attribute modifier from UUID API

* Add method to remove by UUID

* Add overload for UnmodifiableAttributeInstance, better precondition messages

* rebase
2023-11-18 19:55:57 -05:00
Jake Potrebic 39dee1ab52 More paper config cleanup (#9938)
Also adds a warning and error message if a newer config version
was found signaling a downgrade.
2023-11-18 16:29:14 -08:00
Jake PotrebicandOwen1212055 e5274eeac9 Fix spawners checking max nearby entities with correct type (#8945)
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-11-18 15:59:12 -08:00
Bjarne Koll 0a8c873722 Call LivingEntity#onItemPickup before mutation (#9948)
The existing EntityPickupItemEvent fixes patch moves the call to LivingEntity#onItemPickup for piglins after the respective EntityPickupItemEvent calls, which is correct.
However the patch moved the call so far down the line that the existing logic already mutated the picked up item entity, leading to faulty state being passed to the onItemPickup method.

To prevent logic in LivingEntity#onItemPickup to read from an ItemEntity that was already mutated, this commit moves the calls prior to the two respective mutations (either gold_nugget or rest).

This was chosen above taking a copy of the original item and restoring state later on to avoid a full item stack clone.
2023-11-17 07:43:25 +01:00
SoSeDiK ce7f068095 Correct typo in javadoc (#9944) 2023-11-13 19:25:46 +01:00
Jake Potrebic f186318a91 Run the chat callback on the main thread as expected (#9935) 2023-11-11 15:33:19 -08:00
Jake Potrebic a506b48daa Fix several issues with EntityBreedEvent (#8677)
Upstream did not account for different hands when storing
the breed item for later use in the event. Also they only
stored a reference to the stack, not a copy so if the stack
changed after love mode was started, the breed item in the event
also changed. Also in several places, the breed item was stored after
it was decreased by one to consume the item.
2023-11-11 15:23:02 -08:00
Jake Potrebic aee3830763 Deprecate Material#isInteractable (#9216) 2023-11-11 17:21:22 -05:00
booky10 9548629853 Add hand to fish event for all player interactions (#9929) 2023-11-11 23:00:45 +01:00
Jake Potrebic 531ef27e89 Use ApiStatus.Internal instead of Deprecated (#9042)
Mainly correctly marks a lot of still used "magic values"
as Internal instead of "Deprecated".
2023-11-11 13:52:32 -08:00
booky10 9ee60eca7d Add aggressive mob API (#9838) 2023-11-11 16:17:36 -05:00
Owen dd47ec6fe2 Add Entity Movement Direction API (#7085)
This allows you to get player movement when riding vehicles, etc.
2023-11-11 16:04:34 -05:00
Jake Potrebic d8847bc1f3 Updated Upstream (Bukkit/CraftBukkit) (#9922)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fde5602a PR-927: Add PlayerRecipeBookSettingsChangeEvent
949ff217 PR-930: Add methods to get/set evoker fang attack delay
f6f7c79d SPIGOT-7514, PR-929: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
d40e22da PR-712: Add API to get full result of crafting items

CraftBukkit Changes:
c8feb0629 PR-1291: Improve precondition message in Entity#playEffect
482c56a00 PR-1285: Add PlayerRecipeBookSettingsChangeEvent
cdf798800 PR-1290: Add methods to get/set evoker fang attack delay
2c1b5f78f SPIGOT-7514, PR-1289: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
6aa644ae9 PR-992: Add API to get full result of crafting items
ffb1319bc PR-1287: Fix scoreboards not updating in Player#setStatistic
2023-11-11 12:25:45 -08:00
Luis 63e77b531d Add Enchantment cost API (#9856)
Cost is a property of individual enchantments, and is used by vanilla in combination with environmental aspects like tool enchantability and bookshelf count to determine the final cost of an enchantment as shown in an enchanting table.

Having access to the base cost of an enchantment using these vanilla methods can allow plugin developers to determine the "value" of an enchantment, and use it in custom logic where needed. I came across this recently when trying to assign an economic value to enchantments during tool repairing, and noticed these values don't seem to be obtainable under the current API.
2023-11-11 15:09:48 -05:00
Tamion 6675d13b31 Fix strikeLightningEffect powers lightning rods & clears copper (#9780)
* Fix strikeLightningEffect powers lightning rods and clears copper

* Fixed vanilla behavior break

* rebase

* revert spigot cleanup and remove setter

* better fix for behaviour break

* rebase and clean

* fix
2023-11-11 12:09:14 -08:00
Jake Potrebic c95bc5f86d Don't unpack loot table for TEs not in world (#9918)
Fixed by 23w44a/1.20.3
2023-11-11 11:23:12 -08:00
Shane Freeder 4675152f49 Don't leave the NearbyPlayers tracker in an entirely busted state on double-add detection 2023-11-05 22:15:38 +00:00
Jason Penilla 274e54ba58 Bump tiny-remapper for Java 21 support (#9902) 2023-11-04 20:33:04 -07:00
Layla Silbernberg / LadySilver47 8cafc07297 Added missing enchantables to material tags (#9888) 2023-11-05 00:37:51 +01:00
Tamion e289accb03 Add more API to LingeringPotionSplashEvent (#9901)
* Add createAreaEffectCloud API

* Add missing NotNull

* Add missing Paper comments

* Better solution

* Better naming

* New patch and rename

* rename patch
2023-11-04 16:24:06 -07:00
NonSwag 2553f30153 fix secure profile with proxy online mode (#9700) 2023-11-05 00:12:47 +01:00
booky10 75d04e9b04 Broadcast take item packets with collector as source (#9884)
This fixes players (which can't view the collector) seeing item pickups with themselves as the target.
2023-11-04 15:16:55 -07:00
TonytheMacaroni 23860da6c2 Add predicate for block when raytracing (#9691)
* Add predicate for block data when raytracing blocks

* Match based on block, instead of block data

* Use instanceof instead of casting

* Use Position instead of Location, add overload for rayTraceEntities

* Implement requested changes

* Invert predicate

* Cleanup
2023-11-04 15:00:51 -07:00
TrollyLoki 8a3980c60b Add API to get the collision shape of a block before it's placed (#9821)
* Add API to get the collision shape of a block before it's placed

* Tweak API documentation

* Clarify behavior

* Rebase

* Rebase
2023-11-04 16:32:10 -05:00
Jake Potrebic 0cdce89d59 Fix a bunch of stuff with player spawn locations (#9887)
If a playerdata doesn't contain a valid, loaded world, reset
to the main world spawn point
2023-11-04 14:11:55 -07:00
powercas_gamer 15a0de2eef Make Team extend ForwardingAudience (#9852) 2023-11-04 21:50:56 +01:00
booky10 43c343228e Add entity API for getting the combined gene of a Panda (#9891) 2023-11-04 21:28:23 +01:00
Tamion bffb08c2f9 Deprecate Player#boostElytra (#9899)
The Paper method was chosen for deprecation because it was more
restrictive in that it has an isGliding check.
2023-11-04 13:20:13 -07:00
Jake Potrebic 6592fed511 Use a server impl for hopper event to track get/setItem calls (#9905)
* Use a server impl for hopper event to track getItem/setItem calls

* Rebase

* Comments
2023-11-04 12:58:40 -07:00
Warrior aa6c4c11e5 Include packet class name in packet encoding error messages (#9907) 2023-11-04 12:34:34 -07:00
booky10 f78d7ce8ff Remove "fix-curing-zombie-villager-discount" exploit option (#9895) 2023-11-04 20:20:01 +01:00
Lulu13022002 44057da467 Remove duplicate water-sensitivity damage for unaware mobs (#9908) 2023-11-04 12:10:27 -07:00
Warrior 230682d51b Add raw iron & raw copper blocks to anti xray defaults (#7622) 2023-11-04 15:07:48 +00:00
TomTom 487109fddc Readd 0414 use distance map to optimise entity tracker (#9868) 2023-11-03 14:05:57 +00:00
Nassim Jahnke 8493340be4 Add another slot sanity check 2023-11-03 14:49:55 +10:00
Md5Lukas 0b218903a8 Fix villager infection chance not being handled properly (#9897) 2023-11-01 14:59:00 -07:00
Jake Potrebic 1865625d95 Fix NPE when no valid world is found on legacy Players (#9885) 2023-10-29 15:33:32 +00:00
booky10 5bb30ce95b Fix entity camera not being reset when cancelling spectating start/stop events (#9883) 2023-10-29 01:45:07 +01:00
Shane Freeder 3e4eaf2188 [ci skip] Fix module derp 2023-10-29 01:32:13 +01:00
Shane Freeder 415d7081d2 [ci skip] Fix author in last patch 2023-10-29 00:58:15 +01:00
GeroandOwen1212055 a81a384303 Implement Velocity VarInt optimizations (#8418)
---------

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-10-28 19:56:47 -04:00
booky10 5bdfb29ba1 Add player idle duration API (#9833)
* Add player idle duration API

Implements API for getting, setting and resetting a player's idle duration.

* Remove idle duration setter

* Rebase
2023-10-28 19:25:46 -04:00
caramel c6fac381ed fix UnsafeValues#loadAdvancement doesn't recalculate position (#9846) 2023-10-28 16:13:33 -07:00
Kenox 8b1ac39e89 Fix warden spawn reason from DEFAULT to NATURAL (#8744) 2023-10-28 19:10:31 -04:00
caramel 52849f6da6 Cleanup disable explosion knockback patch (#9858) 2023-10-28 15:50:26 -07:00
Tamion b1faa5d5f4 Fix PotionAPI ignores icon flag (#9864)
* fix PotionAPI ignores icon flag

* also fix CraftPotionUtil#toBukkit

* also CraftPotionUtil#fromBukkit

* use CraftPotionUtil
2023-10-28 15:39:47 -07:00
Warrior b3cac042c1 Fix crash when version_history.json is empty (#9871) 2023-10-28 15:24:54 -07:00
SplotyCode 29350674b3 Fix null item in sendEquipmentChange (#9869) 2023-10-28 15:15:20 -07:00
Jake Potrebic 8cf2503804 Updated Upstream (Bukkit/CraftBukkit) (#9876)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
19830133 PR-925: Add hit entity/block to events extending ProjectileHitEvent

CraftBukkit Changes:
5a72c3c04 SPIGOT-7510: Try to fix broken reflection usage of plugins
6fa69f235 PR-1281: Add hit entity/block to events extending ProjectileHitEvent
224f733ac Fix NPE introduced in #f4d977e
2023-10-28 15:02:13 -07:00
Lulu13022002 996d529fb3 Resend entity using the bundle packet (#9853) 2023-10-27 15:48:13 +02:00
Jason Penilla b974a6b6f3 Update paperweight to 1.5.9 (#9872) 2023-10-26 16:34:58 -07:00
Jake Potrebic acc6d012b0 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9861) 2023-10-26 14:56:40 -07:00
Jason c1ac98328c Fix log level of advancement debug message (#9860) 2023-10-23 19:07:44 +02:00
Jake Potrebic 90fe0d58a5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9825)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry
255b2aa1 SPIGOT-7080: Add World#locateNearestBiome
ff984826 Remove javadoc.io doc links

CraftBukkit Changes:
71b0135cc SPIGOT-5753: Back PotionType by a minecraft registry
a6bcb8489 SPIGOT-7080: Add World#locateNearestBiome
ad0e57434 SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag
b3efca57a SPIGOT-6400: Use Mockito instead of InvocationHandler
38c599f9d PR-1272: Only allow one entity in CraftItem instead of two
f065271ac SPIGOT-7498: ChunkSnapshot.getBlockEmittedLight() gets 64 blocks upper in Overworld

Spigot Changes:
e0e223fe Remove javadoc.io doc links
2023-10-22 20:12:00 +01:00
Shane Freeder 489bff9bbd Temp fix for serialisable blockdata 2023-10-22 19:56:25 +01:00
MiniDigger | Martin 71a1787f6c [ci skip] cleanup some ATs (#9840) 2023-10-21 17:17:55 -07:00
Lulu13022002 3a5c6f8cee Fix NPE in SculkBloomEvent world access (#9857) 2023-10-21 13:20:24 -07:00
Brokkonaut a3e4d1aa36 Don't check if we can see non-visible entities 2023-10-21 20:53:33 +01:00
Spottedleaf 4b0bc74c90 Initialise default nibble arrays in ChunkAccess directly
When ChunkAccess was converted to an abstract class some versions
ago, the code to initialise nibble arrays should have been moved.
However, the code was not moved and so now mods constructing their
own implementations of ChunkAccess would not have the nibble arrays
initialised.

This is ported to Paper from Starlight to keep the code base in sync,
not because it fixes anything known.
2023-10-16 18:57:45 -07:00
Spottedleaf 00331d943e Fix mushrooms not generating in swamps
During feature generation, light data is not initialised and
will always return 15 in Starlight. Vanilla can possibly return
0 if partially initialised, which allows some mushroom blocks to
generate.

In general, the brightness value from the light engine should not
be used until the chunk is ready. To emulate Vanilla behavior better,
we return 0 as the brightness during world gen unless the target
chunk is finished lighting.

The regular light retrieval outside of WorldGenRegion remains
the same, as behaviorally chunks not lit should be at max
skylight and zero block light.
2023-10-16 18:52:28 -07:00
Spottedleaf 2f4281e2b4 Remove unused skyLightSources
There is no point in initialising the sources in Starlight,
as we do not use them. Additionally, they are not saved to
disk so we do not need them.

Maintaining and initialising them is not a negligible cost,
which is why they are being removed.
2023-10-16 18:49:41 -07:00
caramel e57af7d01e sync netty version with vanilla (#9842) 2023-10-15 15:41:17 +01:00
caramel 44ee1cd05e fix recipe packet limiter (#9841) 2023-10-15 15:11:15 +01:00
Md5Lukas 852c1c236d Add additional tags to ItemMeta obfuscation filtering (#9665) 2023-10-14 23:41:15 +02:00
Md5Lukas 3e1c5e3eb0 Add BlockData setter for FallingBlock (#9829) 2023-10-14 22:46:31 +02:00
Jakub Zacek e4d184f39d Replace bukkit Consumers with java consumers (#9836) 2023-10-14 22:43:32 +02:00
froobynooby 3e9d2ac5f2 Don't call options events on login (#9834)
* Don't call options events on login

* Merge changes into client options API patch
2023-10-14 11:32:00 -07:00
SplotyCode f613437019 Fix CraftPlayerProfile#setId regression (#9822) 2023-10-12 01:20:25 +00:00
Jake Potrebic 2f5bb7e306 add predicate recipe choice only for potion mixes (#9486) 2023-10-10 16:07:21 -07:00
Tamion 1a4778d260 Fix PlayerSwapHandItemsEvent NPE when a hand set to null (#9763)
* Fix PlayerSwapHandItemsEvent throwing exception when mainhand or offhand set to null

* use fully qualified import

* Use ItemStack#empty() instead of new ItemStack

* Add NotNull annotation to getters

* Add missing Paper comments
2023-10-10 15:38:25 -07:00
caramel 5509610db5 Fix UnsafeValues#loadAdvancement (#9753) 2023-10-10 15:19:00 -07:00
Jake Potrebic 7e5dd92f9f fix flat bedrock world config (#9728) 2023-10-10 14:43:10 -07:00
TrollyLoki 69ce9276e4 Make setVelocity method of Fireballs change the travel direction to an arbitrary vector (#9815) 2023-10-10 23:09:45 +02:00
Xander de Keijzer 72f7945e77 Fix painting loosing art on face change (#9798) 2023-10-10 22:24:35 +02:00
Jake Potrebic e87240b674 Fixes for loot tables (#9818) 2023-10-10 10:35:49 -07:00
Jason a2ba45239c Update paperweight to 1.5.8 (#9814) 2023-10-09 18:04:26 -07:00
Spottedleaf 99b735c1ac Make EntityLookup#get use read lock for entity maps
On Folia, this map is modified by multiple threads and iterating
it may throw errors, for example using the /kill command or any
other command that uses an entity selector.
2023-10-09 10:02:37 -07:00
Warrior a702a083cd Move clientBrandName over to ServerPlayer (#9809) 2023-10-08 12:07:48 +02:00
powercas_gamer adb4fb4bd3 [ci skip] update mappings link (#9801) 2023-10-07 11:54:43 +02:00
Bjarne Koll 29a0209575 Properly check water block when random ticking ice (#9804)
Readds a lost update to the shared mutable state in the random block
ticking optimisation.
2023-10-06 21:34:00 +01:00
Jason 08c0b488b9 [ci skip] update paperweight to 1.5.7 & re-enable filterpatches (#9799) 2023-10-06 08:58:09 -07:00
Nassim Jahnke cfe311d7a5 Fix item effects conversion if no tag is present
Fixes #9796
2023-10-05 16:03:26 +10:00
Nassim Jahnke 431e6418ab Fixup player profile getters and constructor to expected nullability (#9770) 2023-10-05 05:31:24 +00:00
Warrior 02cfaa8ff8 Fix mobs not spawning when using an older config (#9793) 2023-10-04 10:08:47 -07:00
Shane Freeder 5eec4ec3bf Quick tweaks to logical flow of getMapData 2023-10-04 16:25:26 +01:00
booky10 f36bb59739 Fix entity data not updated for firework attached to entity (#9783) 2023-10-03 18:29:44 -07:00
Jake Potrebic 6573d9555d update configurate (#9230) 2023-10-03 18:06:23 -07:00
Nassim Jahnke 9d21a88218 Fix tests 2023-10-04 07:58:30 +10:00
Nassim Jahnke bb1c0dd6fa Implement tracking range y setting 2023-10-03 22:19:39 +10:00
Nassim Jahnke f6969b6374 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
09b1c123 PR-916: Add more lightning API
c085f3de PR-859: Add Entity#getTrackedBy

CraftBukkit Changes:
1bf30a4e9 SPIGOT-7495: Spawning bee entity in asynchronous BlockPopulator causes IllegalStateException - Accessing LegacyRandomSource from multiple threads
476c5bccd PR-1267: Add more lightning API
40d5e6c02 PR-1190: Add Entity#getTrackedBy
40d41acc1 SPIGOT-7491: Downgrade bundled SQLite to be updated next release
44b31da38 PR-1264: Load Bukkit class before creating Registry item
dc45a6738 SPIGOT-7496: Failure to load datapacks with multiple identical predicates
f508657d6 Fix decompile error affecting javac
ef7a4743d PR-1265: Ensure UTF-8 used in new test resource

Spigot Changes:
224dad51 Rebuild patches
2023-10-03 22:00:24 +10:00
Lulu13022002 38376f43a0 Some jd fixes (#9781) 2023-10-01 00:20:51 +00:00
Nassim Jahnke c4ba28a21a Don't throw when removing unplaced player in NearbyPlayers 2023-09-30 15:37:00 +10:00
Nassim Jahnke 0f69290f07 [ci skip] Fix typo (important) 2023-09-29 13:20:32 +10:00
Nassim Jahnke 4cdbb0c86c Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
044d4ee9 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning
57b73d57 PR-913: Deprecate Projectile#doesBounce() and #setBounce()
43373c44 PR-904: Update FeatureFlag for 1.20.2
a7bbbf0c PR-911: Expand DataPack API with 1.20.2 pack version methods
0341e3a0 SPIGOT-7489: Add TeleportDuration to Display Entity
bcd8d2aa PR-912: Update Minecraft Wiki URLs

CraftBukkit Changes:
99aafc222 Increase outdated build delay
dab849f08 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning
041b29ae3 Upgrade specialsource-maven-plugin
851a32cff PR-1263: Remove unused implementation of AbstractProjectile#doesBounce() and #setBounce()
251af0da3 PR-1261: Expand DataPack API with 1.20.2 pack version methods
46e4ba627 Upgrade specialsource-maven-plugin
df3738a24 SPIGOT-7489: Add TeleportDuration to Display Entity
8d0fea457 PR-1262: Update Minecraft Wiki URLs
e62905aab SPIGOT-7490: Fix entity equipment updates

Spigot Changes:
a0f3d486 Rebuild patches
2023-09-29 13:05:28 +10:00
Jake Potrebic 1765917a6f Fix creating the reverse map for loot table keys (#9766) 2023-09-28 16:29:34 -07:00
Spottedleaf fe54a13b13 Properly call overloaded super onDisconnect
Since the method is overloaded, the call to super (which is changed
to call the overloaded method) without the additional parameters
will result in recursion.
2023-09-26 13:16:24 -07:00
Spottedleaf b3b961f9d5 Fire PlayerConnectionCloseEvent for configuration packet listener
If the player moves to the configuration stage, we also need
to fire the event.
2023-09-26 09:20:17 -07:00
Spottedleaf c207429b21 Fix VoxelShape#isFullBlock() for non-single AABB types
The correct logic to implement NOT_SAME with Shapes#block()
is to test whether any shape data exists outside of [0.0, 1.0]
and to test whether the shape is completely filled from 0.0 to 1.0
on all axis. This can be implemented by checking whether the
bounds represent the full block and whether everything within
the bounds is filled.
2023-09-26 09:16:11 -07:00
Jake PotrebicandJason Penilla 298c47857b Fix tests that broke during the junit 5 update (#9757)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2023-09-25 09:05:05 +10:00
Shane Freeder 3cf03fc31a Fix/update wiki (#9758) 2023-09-25 09:02:46 +10:00
Shane Freeder 5cbce366b2 Handle new brand payload type 2023-09-24 19:48:29 +01:00
Warrior 5923b7d085 Fix missing map initialize event call & missing map id assignment (#9756) 2023-09-24 19:17:29 +01:00
Nassim Jahnke e284bb1215 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fb23cbb3 Define surefire plugin version
d022084a Define ordering for MetadataStoreTest
99a7f6f0 PR-910: Match generic max absorption attribute name style with the rest
c7390d71 PR-909: Update tests to JUnit 5

CraftBukkit Changes:
f0661c351 PR-1230: Move unstructured PDC NBT serialisation to SNBT
452fcb599 PR-1256: Update tests to JUnit 5
2023-09-24 18:25:25 +10:00
Spottedleaf 7a00758b1b Rebuild patches 2023-09-23 23:41:38 -07:00
Spottedleaf 11138a770e Re-add remove streams for Brain AI patch 2023-09-23 23:40:49 -07:00
Spottedleaf 8b9e3dcd9e Optimise nearby player retrieval
Instead of searching/testing every player online on the server,
we can instead use the nearby player tracking system to reduce
the number of tests per search.
2023-09-23 23:40:49 -07:00
Nassim Jahnke 866d2d9f4a Use correct ClientboundLevelChunkWithLightPacket constructor in later patch 2023-09-24 16:29:07 +10:00
Jake Potrebic 025c5d7a28 rebuild patches 2023-09-23 22:35:37 -07:00
Jake Potrebic ea56138b30 Fix some issues 2023-09-23 22:33:49 -07:00
Spottedleaf 5dca26ce54 Fix race condition on UpgradeData.BlockFixers class init
The CHUNKY_FIXERS field is modified during the constructors
of the BlockFixers, but the code that uses CHUNKY_FIXERS does
not properly ensure that BlockFixers has been initialised before
using it, leading to a possible race condition where instances of
BlockFixers are accessed before they have initialised correctly.

We can force the class to initialise fully before accessing the
field by calling any method on the class, and for convenience
we use values().
2023-09-23 22:31:43 -07:00
Spottedleaf 84556f3cda Add lag compensation for breaking blocks 2023-09-23 22:31:42 -07:00
Spottedleaf 38dc3b25d8 Optimise chunk tick iteration
When per-player mob spawning is enabled we do not need to randomly
shuffle the chunk list. Additionally, we can use the NearbyPlayers
class to quickly retrieve nearby players instead of possible
searching all players on the server.
2023-09-23 22:31:00 -07:00
Nassim Jahnke 8d922746d9 Drop no longer needed patch 2023-09-24 13:09:52 +10:00
Nassim Jahnke 2ec643a53c Readd anti xray and oversized block entity patches 2023-09-24 12:35:16 +10:00
Noah van der Aa 6be43952eb Migrate paper log ips option to new server.properties option 2023-09-23 23:21:21 +02:00
Jason Penilla 9624451ffd Add missing kick event cause 2023-09-23 08:50:32 -07:00
Lulu13022002 b561a12078 Fix SuspiciousStewMeta 2023-09-23 16:41:51 +02:00
Lulu13022002 9c126fd2a9 fix test 2023-09-23 13:38:46 +02:00
Owen1212055 38b7565d9e Remove Spigot Bug Fix for MC-109346 2023-09-23 01:51:40 -04:00
Owen1212055 8b512e3466 Support Paper ip address config + add missing logs 2023-09-23 01:50:13 -04:00
Nassim Jahnke 9df2066642 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
dfe1fb48 PR-906: Add missing MinecraftExperimental annotation to Bundles
825ab30d PR-905: Add missing MapCursor.Type and update documentation
e03d10e6 PR-903: Make BARRIER Waterlogged
1961ead6 PR-898: Use Java Consumer instead of Bukkit Consumer

CraftBukkit Changes:
f71a799f0 Make BARRIER Waterlogged
172f76a45 Upgrade specialsource-maven-plugin
f0702775c SPIGOT-7486: Alternate approach to null profile names
069495671 SPIGOT-7485: Allow air entity items since required for Vanilla logic
5dfd33dc2 SPIGOT-7484: Cancelling PlayerEditBookEvent does not update client's book contents
02d490788 PR-1250: Standardize and centralize Bukkit / Minecraft registry conversion
9024a09b9 PR-1251: Use Java Consumer instead of Bukkit Consumer
6d4b25bf1 Increase diff stability
2023-09-23 12:21:59 +10:00
Nassim Jahnke 4c17176c77 Update foojay resolver convention plugin 2023-09-23 11:46:31 +10:00
Nassim Jahnke a353f4d207 Readd network optimization patch 2023-09-23 11:45:34 +10:00
Spottedleaf a50d7c340b Make sure to maintain the players sent to set for ChunkHolder
Required for proper block/light updates to clients
2023-09-22 17:07:02 -07:00
Nassim Jahnke 02807238c4 Fix chat processing 2023-09-23 09:58:19 +10:00
Nassim Jahnke d23c4a50e6 Fix local attribute setting 2023-09-23 09:42:59 +10:00
Nassim Jahnke b3ec8bd8ae Revert "re-add distance map patch"
This reverts commit 81c5901c67.
2023-09-23 09:38:10 +10:00
Jake Potrebic 81c5901c67 re-add distance map patch 2023-09-22 16:26:10 -07:00
Jake Potrebic 47aeab84ad fixup display slots patch (#9746) 2023-09-22 16:07:33 -07:00
Jake Potrebic 915bb9220e Fixup advancement patch (#9745) 2023-09-22 16:03:34 -07:00
Spottedleaf 6af97e11b6 Port patches from folia dev/optimisations 2023-09-22 15:56:00 -07:00
Spottedleaf d259503c92 Fix recursion with pathfind entity event
With the function overload, need to pass the entity
through to the super call
2023-09-22 15:39:00 -07:00
Spottedleaf ea01aa335a Add some patches, fix compile 2023-09-22 15:33:14 -07:00
Spottedleaf e88856dd75 Chunk system patch 2023-09-22 13:13:57 -07:00
Jason Penilla 896aa8b54a Rebuild patches 2023-09-22 10:59:56 -07:00
Jason Penilla ead3ddba32 Move unapplied patches so ATs import 2023-09-22 10:57:45 -07:00
MiniDigger | Martin 603c33df06 some more compile fixes 2023-09-22 19:43:52 +02:00
MiniDigger | Martin 1ebaffacf5 some compile fixes 2023-09-22 19:31:02 +02:00
Noah van der Aa f4d8a64094 more more more more more more more more more more more work: passing the torch 2023-09-22 19:26:54 +02:00
Lulu13022002 63a1b0c137 some compile issues 2023-09-22 19:25:18 +02:00
Lulu13022002 a91e19f1df more work
all server patches done (almost)
2023-09-22 18:59:52 +02:00
Lulu13022002 8baf510f92 some work 2023-09-22 18:11:35 +02:00
Noah van der Aa ac7e4ad35e more more more more more more more more more more more work: passing the torch 2023-09-22 17:51:48 +02:00
Noah van der Aa 3aa8e7ef3f more more more more more more more more more more work 2023-09-22 17:35:51 +02:00
Noah van der Aa 4875ee4814 more more more more more more more more more work 2023-09-22 17:24:59 +02:00
Noah van der Aa 32d9c6684b more more more more more more more more work 2023-09-22 17:08:04 +02:00
Noah van der Aa 772fb3e385 more more more more more more more work
can't let lynx inflate his commit count too much
2023-09-22 16:59:18 +02:00
Bjarne Koll 2617c927a0 More work work work work work work work work work 2023-09-22 16:42:56 +02:00
Bjarne Koll e5bd562d28 Work here, work there, work for everyone 2023-09-22 16:35:40 +02:00
Bjarne Koll 452009bbde Working hard on messing with leafs patches 2023-09-22 16:20:09 +02:00
Bjarne Koll 574bc968d3 More work 2023-09-22 15:47:26 +02:00
Bjarne Koll 95a31de306 More work work work 2023-09-22 15:33:37 +02:00
Bjarne Koll af1090259a Fix PaperAdvancementDisplay 2023-09-22 15:19:33 +02:00
Bjarne Koll 74094edf08 More more more (more ??) more work 2023-09-22 15:15:57 +02:00
Bjarne Koll 662b6c5ca8 Port sidebar slots patch 2023-09-22 14:33:54 +02:00
Bjarne Koll 79fef73926 More work work work 2023-09-22 14:22:24 +02:00
Bjarne Koll 00d82983bd Missing paper comment 2023-09-22 13:42:04 +02:00
Bjarne Koll 2cb3a1a3dc Fix leave message in common packet listener 2023-09-22 13:39:00 +02:00
Noah van der Aa fc84aee124 more more more more more more work 2023-09-22 09:24:44 +02:00
Jake Potrebic 2cee84193c and some more 2023-09-21 22:41:27 -07:00
Jake Potrebic a62835bbb1 almost halfway done with server patches 2023-09-21 21:40:51 -07:00
Jake Potrebic 24fd5aea0c and some more patches 2023-09-21 21:05:18 -07:00
Jake Potrebic 2bc818efd4 some more patches 2023-09-21 20:29:51 -07:00
Jake Potrebic 78a003ee89 work and compile errors 2023-09-21 20:17:35 -07:00
Jake Potrebic 7b29d1f4c5 even more work 2023-09-21 19:17:21 -07:00
Jake Potrebic ef6a41195d some more work 2023-09-21 15:26:51 -07:00
Jake Potrebic a27262375c some work 2023-09-21 15:01:00 -07:00
Noah van der Aa c60dd35989 more more more more more work 2023-09-21 23:09:04 +02:00
Noah van der Aa 7ebfdd5e6d more more more more work 2023-09-21 22:35:39 +02:00
Noah van der Aa 91671751e7 more more more work 2023-09-21 22:14:58 +02:00
Noah van der Aa 20253f478f more more work 2023-09-21 21:54:46 +02:00
Noah van der Aa 2b72b74a36 more work 2023-09-21 21:00:11 +02:00
Noah van der Aa b6e46e90cd rebuild old indexes, first work 2023-09-21 19:39:51 +02:00
Noah van der Aa 6267e26420 So it begins... 2023-09-21 19:18:04 +02:00
Jake Potrebic 773dd72446 Updated Upstream (Bukkit/CraftBukkit) (#9739)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
69c7ce23 PR-990: Use Mockito instead of InvocationHandler for test mocking
997de31d PR-893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
6a8ce581 Fix malformed javadoc in previous commit
26c74f6d PR-890: Add more Sculk API (bloom, shriek, bloom event)
aa067abf PR-895: Load GameEvent and MusicInstrument from registry

CraftBukkit Changes:
78796c9de Add support for Java 21
ddc9a2dad SPIGOT-7475: Don't fire SculkBloomEvent during world generation
caee2311a PR-1245: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
de421cf56 PR-1242: Add more Sculk API (bloom, shriek, bloom event)
00f5a80fb PR-1252: Fix error when generating a tree in water
10219df3a PR-1248: Load GameEvent and MusicInstrument from registry
2023-09-21 18:48:55 +02:00
Lulu13022002 3fd1502717 Add missing deprecation (#8886) 2023-09-21 10:35:38 +02:00
Jake Potrebic 1b1c23010a Add missing InventoryHolders to inventories (#7400) 2023-09-17 19:16:48 -07:00
The456 581b683931 Fix spigot's Forced-Stats (#9663) 2023-09-17 03:27:56 +02:00
Warrior a856073368 Fix two beacon bugs (#9675) 2023-09-16 17:36:10 -07:00
Jake Potrebic ba0e1f54b9 Fix sapling observer detection and grow event (#9654) 2023-09-16 16:53:21 -07:00
Jake Potrebic 3cec9c985f [ci skip] Add missing javadoc links (#9497) 2023-09-17 01:35:39 +02:00
Lulu13022002andJake Potrebic d8af99a82c Fix silent equipment change for mobs (#9677)
* Fix silent equipment change for mobs

* rebased and added test to make sure all overrides are added

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-16 16:27:11 -07:00
SoSeDiK 064fb50cc1 Cleanup old async commands patch (#8895) 2023-09-17 00:54:33 +02:00
Warrior 06a741d713 Fix leashed pets teleporting to owner when loaded (#9686) 2023-09-16 15:16:44 -07:00
Warrior e312ebb1bd Add DISPLAY tracking range type (#9668) 2023-09-17 00:02:58 +02:00
WarriorandJake Potrebic ede9c06814 Fix Projectile#setOwner(null) not clearing owner (#9715)
* Fix Projectile#setOwner(null) not clearing owner

* rebased and merged into mentioned patch

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-16 14:37:38 -07:00
thelooter 0c8e84c20d Enforce sign line nullability when setting line with Adventure Method (#9689) 2023-09-16 23:18:51 +02:00
AeltumnandJake Potrebic deb92c2129 Add ItemStack#isEmpty and related methods (#9664)
* Add new patches

* Change from an EMPTY static var to a static method since ItemStack is mutable

* Properly set nullability of return value

* Move annotation changes to different patch

* Send the Kotlin code back to where it came from

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-16 14:18:09 -07:00
MiniDigger | Martin 83cfeb1b37 Improve java version check (#9692) 2023-09-16 23:06:36 +02:00
Jake Potrebic 99b311de54 [ci skip] Clarify where furnace-related events are called (#8753) 2023-09-16 13:55:40 -07:00
Jake Potrebic eb60bffa98 Create raw chat type as resource file instead of in source (#9226)
Sets up the ability to load new or modified resource files into Paper.

Updates paperweight to 1.5.6

This should work with all run configs, like runDev, runShadow, runReobf as well as correctly build jars for production.
2023-09-15 11:03:42 -07:00
Warrior 29d1c7b602 Call BlockRedstoneEvents for lecterns (#9721) 2023-09-14 23:17:53 +02:00
leguan 7145f41b6e compression level change with config option (#9711) 2023-09-14 13:11:19 +02:00
TreemanKing 6378792a99 Add Barrel to LootableBlockInventory (#9687) 2023-09-14 13:04:36 +02:00
Duckulus e68fd7162a Add missing Piglin Dancing API (#8894) 2023-09-14 12:54:43 +02:00
Lulu13022002 eea0c649ca Swap some nullable annotations (#9696) 2023-09-14 12:44:12 +02:00
Warrior 1c15111f08 Add missing particle javadocs (#9716) 2023-09-14 12:09:09 +10:00
Nassim Jahnke 517f8fbbac Fix line of sight distance check 2023-09-12 09:56:24 +10:00
Spottedleaf fb06829845 Optimise multiple block updates occurring in the same chunk
We can avoid multiple ticket additions for the same ChunkTasks
instance. This will help in situations where significant number of
block updates occur for the same chunk in the same tick, such as
water draining.
2023-09-11 07:15:18 -07:00
violetc c9cd94f3c6 Fix fixItemsMergingThroughWalls check (#9707) 2023-09-11 14:46:02 +10:00
Nassim Jahnke e2b197132d Add missing slot sanity checks for container clicks 2023-09-11 12:03:35 +10:00
Nassim JahnkeandPaul Sauve 72e87abc2d Strip raytracing for EntityLiving#hasLineOfSight
Co-authored-by: Paul Sauve <paul@technove.co>
2023-09-10 12:28:03 +10:00
Joe 33bec7f20a Copy NBT in legacy dragon fight converter 2023-09-06 18:33:31 -07:00
Joe 471f4de9c4 Copy NBT in upgrade data neighbor ticks 2023-09-06 18:30:02 -07:00
Lulu13022002 39953cf08d Take in account waterlogged blocks for scaffolding (#9676) 2023-09-04 17:52:27 +02:00
Md5Lukas b4e3b3d1dd Allow non-op players to execute the click event callback (#9652) 2023-08-28 13:21:13 +02:00
Noah van der Aa b8edb0e130 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9648)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
6b34da8f SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender

CraftBukkit Changes:
db4ba2897 SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender
4f7ff4dec PR-1246: Add missing AbstractTestingBase to tests which need them
f70a7b68d SPIGOT-7465, MC-264979: Fresh installations print NoSuchFileException for server.properties
8ef7afef6 PR-1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block

Spigot Changes:
d2eba2c8 Rebuild patches
2023-08-28 13:05:48 +02:00
Martijn 0c0a480d82 Do crystal-portal proximity check before entity lookup (#9611) 2023-08-26 13:23:31 -07:00
Lulu13022002 0e622c79fa Add sniffer egg api (#9288) 2023-08-26 22:12:46 +02:00
Jake Potrebic 7d13b7066c Add titleOverride to InventoryOpenEvent (#7540) 2023-08-26 12:28:42 -07:00
Jake Potrebic 6813244fb0 Fix/improve destroy speed API (#9645)
further improvements could be a method that takes in an entity
to account for effects
2023-08-25 10:57:11 -07:00
Nassim Jahnke 6f30f08b20 Readd old BlockDamageEvent constructor 2023-08-25 10:19:55 +10:00
Jake Potrebic e552bebca1 Fix inventory desync (#9640) 2023-08-24 16:53:02 -07:00
Aeltumn 0c8882f7f9 Add OfflinePlayer#isConnected (#9642) 2023-08-24 21:44:31 +10:00
Jake Potrebic b45ecc93c1 [ci skip] clear out test plugin 2023-08-23 10:05:08 -07:00
Jake Potrebic b8a0049207 Fix exact choice recipe book clicks (#7822) 2023-08-23 08:20:32 -07:00
Warrior 7a1863ed78 Limit setBurnTime to valid short values (#9623) 2023-08-23 20:54:34 +10:00
Jake Potrebic a751001ed1 [ci skip] Refactor context records for easier expansion (#9589) 2023-08-23 13:34:57 +10:00
Martijn fcc5f232f9 Optimize nearest structure border iteration (#9638) 2023-08-23 11:53:42 +10:00
The456 9cbad8ebbf Expose Hand during BlockCanBuildEvent (#9636) 2023-08-23 10:41:30 +10:00
Bjarne Koll 3716832282 Prevent overfilled bundles from duplicating items (#9633)
Bundles compute the amount to remove from an item based on the formula
(64 - currentWeight) / itemWeight. An overfilled bundle however, with a
currentWeight of > 64 ends up with a negative removal amount for the
item.

This can cause duplication issues on craftbukkit inventory
implementations as they do currently not gracefully handle negative
removal amounts in their remove methods.
2023-08-22 11:57:44 +02:00
Lulu13022002 a712766995 Allow custom damage for trident (#8132) 2023-08-22 16:20:38 +10:00
Lulu13022002 7386a13642 Fix endgateway teleportation offset (#9517) 2023-08-22 16:03:15 +10:00
Jake Potrebic 9395aa6079 Improve performance of mass crafts (#9603) 2023-08-22 15:54:28 +10:00
Rodney 0c7385b569 Add PlayerPickItemEvent (#5590) 2023-08-22 15:22:05 +10:00
SoSeDiK 27d39cac4f Properly clone custom nbt tags inside ItemMeta (#7849) 2023-08-22 14:59:31 +10:00
Jake Potrebic fed9042390 More DragonBattle API (#5655) 2023-08-22 14:08:43 +10:00
Joo200 e3f29f4345 MerchantRecipe: add copy constructor (#8703) 2023-08-22 13:48:25 +10:00
aerulion b29ecd4c22 Expose clicked BlockFace during BlockDamageEvent (#9632) 2023-08-22 13:07:18 +10:00
SoSeDiK 2be57c6943 Expand Pose API (#8781) 2023-08-22 13:05:47 +10:00
caramel 97b9c4a2a4 Fix NPE on Boat#getStatus (#9115) 2023-08-22 12:57:54 +10:00
Jake Potrebic 35ef0537be [ci skip] update editorconfig and gitattributes (#9608) 2023-08-22 12:16:03 +10:00
Bjarne Koll 281855c877 Remove unused lag-compensate-block-breaking option (#9635)
Removes the unused lag-compensate-block-breaking option from the paper
configuration file as the patch using it has been dropped in 1.19.
2023-08-21 22:08:25 +10:00
Nassim Jahnke af6142eab3 [ci skip] Update Gradle wrapper 2023-08-21 19:16:46 +10:00
Corey Shupe 00a68b1efe Player listing API (#8782) 2023-08-21 18:51:31 +10:00
ruViolence 7232506c22 Add entity tracker min Y distance config option (#9406) 2023-08-21 18:05:49 +10:00
Jake Potrebic 1b96c64620 Improve cancelling PreCreatureSpawnEvent with per player mob spawns (#9400) 2023-08-21 17:44:47 +10:00
Yannick Lamprecht 5bf82aa136 Add cancellability to PlayerTrackEntityEvent (#8605) 2023-08-21 17:38:55 +10:00
TonytheMacaroni 88891c37b1 Add Entity Coordinate and Rotation API (#9461) 2023-08-21 17:35:05 +10:00
Will FPandNassim Jahnke 1259b93ba6 Fixed CraftItemStack/CraftItemMeta enchantment level inconsistency (#8792)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2023-08-21 17:31:52 +10:00
Trevor Bedson 990765bd08 Fire entity death event for ender dragon (#9495) 2023-08-21 17:06:21 +10:00
Nassim Jahnke 45ba65283f [ci skip] Rebuild patches 2023-08-21 14:51:19 +10:00
Gero f43a19c275 Fix CME in CraftPersistentDataTypeRegistry (#6701) 2023-08-21 14:50:21 +10:00
EpicPlayerA10 d928dda91d Don't tab-complete namespaced commands if send-namespaced is false (#9366) 2023-08-21 14:50:11 +10:00
galacticwarrior9 bd67b83fd0 Determine lava and water fluid explosion resistance by their block explosion resistance (#9482) 2023-08-21 14:50:02 +10:00
Gameoholic ed8401c748 Fix rotation for spawning display entities (#9552) 2023-08-21 14:49:53 +10:00
EpicPlayerA10 5b34a09ed0 Add option to disable chorus plant and mushroom block updates (#9442) 2023-08-21 14:49:38 +10:00
Md5Lukas 67a1a8caf8 Fix Inventory#getLocation not working for the composter (#9596) 2023-08-21 14:49:29 +10:00
Jake Potrebic d12916255a Properly handle BlockBreakEvent#isDropItems (#8936)
Setting whether a block break dropped items controlled
far more than just whether blocks dropped, like stat increases
food consumption, turtle egg count decreases, ice to water
conversions and beehive releases
2023-08-20 20:49:20 -07:00
Jake Potrebic 666a2147a7 [ci skip] rebuild patches 2023-08-20 14:28:49 -07:00
Jake Potrebic 2bd6ba2c63 Deprecate and replace methods using deprecated StructureType (#8643) 2023-08-20 10:30:45 -07:00
Jake Potrebic fd4f0c7741 API for an entity's scoreboard name (#9462)
Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with.
2023-08-20 09:06:09 -07:00
Nassim Jahnke eb8f2bb2a1 Fix unknown entity interaction clicked position getter if null 2023-08-19 12:01:06 +10:00
Martijn 307d05bba8 Count down radius-aware dependency tree node parents (#9600) 2023-08-18 12:02:20 +10:00
Jamie ea1f33cf9a Delete patch to fix PaperMC/Paper#9612 (#9621) 2023-08-17 15:51:34 -05:00
Nassim Jahnke 73af2d4cea Add clicked position to PlayerUseUnknownEntityEvent (#9604) 2023-08-16 17:58:07 +10:00
Bjarne Koll 47b805fdf1 Don't let player loot if reloot time is disabled (#9615)
If the reloot time is disabled while reloot is restricted, the player
should not be able to reloot. The previous logic was incorrect and
allowed players to reloot explicitly when the reloot time was disabled.
2023-08-15 21:08:00 -07:00
Warrior 6520ca1c47 Fix main thread priority being lowered (#9488) 2023-08-15 19:37:17 +02:00
Jake Potrebic a73ed9572e Updated Upstream (CraftBukkit/Spigot) (#9598)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
b76ceb4f5 PR-1235: Move EntityType return to base Entity class
e795d7490 SPIGOT-7458: Exception when Entity CommandSender executes Vanilla command
46c7fc3b1 SPIGOT-7452: Player#openSign cannot edit
d91e5aa0b SPIGOT-7447: Rewrite --forceUpgrade to minimise diff and properly handle CraftBukkit world layout
921ae06d6 Revert "SPIGOT-7447: Fix --forceUpgrade"

Spigot Changes:
94e187b5 Rebuild patches
3bce7935 SPIGOT-7091: Update bungeecord-chat
2023-08-13 16:32:51 -07:00
Jake Potrebic 93829bba5a Account for dimension type in portal void damage check (#9602) 2023-08-13 13:30:48 -07:00
Nassim Jahnke 23c44c2b8d [ci skip] Update README 2023-08-13 10:36:26 +10:00
Warrior 02338e5069 Fix DEFAULT getEntitySpawnReason for /summon (#9480) 2023-08-13 01:57:13 +02:00
Nacioszeczek 1dfdbef42b SculkCatalyst bloom API (#9466) 2023-08-13 01:31:32 +02:00
Jake Potrebic 2df309bd49 Bandaid fix for Effect (#9548)
Effect or LevelEvent needs to be replaced
but ideally after the enum PR has been merged
upstream. Until then, this test and these fixes
should address all the known issues with them
2023-08-12 15:19:34 -07:00
Noah van der Aa 29aaf7bc24 Fix custom statistic criteria creation (#9595) 2023-08-12 23:50:21 +02:00
Jake Potrebic 20a71c58d3 Add restrict-player-reloot-time config (#7652) 2023-08-12 14:26:47 -07:00
3b4839ee32 Fix players are invisible after using setPlayerProfile (#9143)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2023-08-12 16:10:09 +02:00
Warrior 3c41f8f0b3 Cache map ids on item frames (#9584) 2023-08-12 23:33:24 +10:00
Warrior 9bc70e6888 Make the cursor limit option apply to banners (#9554) 2023-08-10 15:22:40 +02:00
Spottedleaf 4179b8f3fa Remove UpgradeData neighbour ticks outside of range
The lists are only supposed to contain ticks for the 1 radius
neighbours of the chunk.
2023-08-09 14:05:57 -07:00
Florian Schmidt 98c567fe6f Use correct seed on api world load (#9541) 2023-08-08 16:35:15 -07:00
Warrior a2002a76b8 Fix wild wolves not considering bones interesting (#9579) 2023-08-08 16:15:01 -07:00
Jake Potrebic 93cf3eb832 Respect randomizeData on more entities when spawning (#9483) 2023-08-08 16:07:59 -07:00
Warrior 9ffccd6430 Use correct source for mushroom block spread event (#9587) 2023-08-08 15:51:58 -07:00
Nassim Jahnke 408a9050ba Don't put entities removed during the portal exit event into an invalid state 2023-08-08 17:48:55 +10:00
Nassim Jahnke ef2b574c6a Clone location in PlayerFailMoveEvent getters 2023-08-08 13:00:17 +10:00
Moulberry 5274ad672b Add and implement PlayerFailMoveEvent (#9535) 2023-08-08 12:51:09 +10:00
Jake Potrebic d6d2b6f4e5 Only capture actual tree growth (#6464) 2023-08-05 19:33:18 -07:00
Phillipp GlanzandYannick Lamprecht 8fe8ca6658 Add clickable version on version command (#9347)
Co-authored-by: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com>
2023-08-06 03:26:13 +02:00
Jake Potrebic 31358d5e48 API for updating recipes on clients (#6463) 2023-08-05 18:11:22 -07:00
Bjarne KollandJake Potrebic 508a295b44 Only erase allay memory on non-item targets (#9570)
* Only erase allay memory on non-item targets

Spigot incorrectly instanceOf checks the EntityTargetEvent#getTarget
against the internal ItemEntity type and removes the nearest wanted item
memory if said instanceOf check fails, (which is always the case)
causing allays to behave differently as they constantly loose their
target item.

This commit fixes the faulty behaviour by instance performing a check
against the CraftItem type.

* Reduce diff

* fix typo

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-08-05 17:31:10 -07:00
Jake Potrebic 2fa8efce9b Updated Upstream (Bukkit/CraftBukkit) (#9485)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
82af5dc6 SPIGOT-7396: Add PlayerSignOpenEvent
3f0281ca SPIGOT-7063, PR-763: Add DragonBattle#initiateRespawn with custom EnderCrystals
f83c8df4 PR-873: Add PlayerRecipeBookClickEvent
14560d39 SPIGOT-7435: Add TeleportCause#EXIT_BED
2cc6db92 SPIGOT-7422, PR-887: Add API to set sherds on decorated pots
36022f02 PR-883: Add ItemFactory#getSpawnEgg
12eb5c46 PR-881: Update Scoreboard Javadocs, remove explicit exception throwing
f6d8d44a PR-882: Add modern time API methods to ban API
21a7b710 Upgrade some Maven plugins to reduce warnings
11fd1225 PR-886: Deprecate the SmithingRecipe constructor as it now does nothing
dbd1761d SPIGOT-7406: Improve documentation for getDragonBattle

CraftBukkit Changes:
d548daac2 SPIGOT-7446: BlockState#update not updating a spawner's type to null
70e0bc050 SPIGOT-7447: Fix --forceUpgrade
6752f1d63 SPIGOT-7396: Add PlayerSignOpenEvent
847b4cad5 SPIGOT-7063, PR-1071: Add DragonBattle#initiateRespawn with custom EnderCrystals
c335a555f PR-1212: Add PlayerRecipeBookClickEvent
4be756ecb SPIGOT-7445: Fix opening smithing inventory
db70bd6ed SPIGOT-7441: Fix issue placing certain items in creative/op
f7fa6d993 SPIGOT-7435: Add TeleportCause#EXIT_BED
b435e8e8d SPIGOT-7349: Player#setDisplayName not working when message/format unmodified
a2fafdd1d PR-1232: Re-add fix for player rotation
7cf863de1 PR-1233: Remove some old MC bug fixes now fixed in vanilla
08ec344ad Fix ChunkGenerator#generateCaves never being called
5daeb502a SPIGOT-7422, PR-1228: Add API to set sherds on decorated pots
52faa6b32 PR-1224: Add ItemFactory#getSpawnEgg
01cae71b7 SPIGOT-7429: Fix LEFT_CLICK_AIR not working for passable entities and spectators
a94277a18 PR-1223: Remove non-existent scoreboard display name/prefix/suffix limits
36b107660 PR-1225: Add modern time API methods to ban API
59ead25bc Upgrade some Maven plugins to reduce warnings
202fc5c4e Increase outdated build delay
ce545de57 SPIGOT-7398: TextDisplay#setInterpolationDuration incorrectly updates the line width

Spigot Changes:
b41c46db Rebuild patches
3374045a SPIGOT-7431: Fix EntityMountEvent returning opposite entities
0ca4eb66 Rebuild patches
2023-08-05 17:21:59 -07:00
GameoholicandJake Potrebic 69a801305d [ci skip] Fix inventorycloseevent javadocs (#9533)
* Add InventoryCloseEvent safety doc comment, similar to InventoryClickEvent

* Fix inventorycloseevent javadocs

* Fix InventoryCloseEvent and InventoryClickEvent javadocs

* remove extra +

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-08-05 12:58:38 -07:00
Jake Potrebic 2c55dd86ff Expand use of strict advancement dim check (#9545) 2023-08-05 12:26:28 -07:00
Emily 13c9d3c423 Bump net.kyori:ansi to 1.0.3 (#9575) 2023-08-04 14:54:25 -07:00
Jake Potrebic 81619a652e Fix treasure map config default (#9572) 2023-08-04 08:52:22 -07:00
Emilia Kond f402f89a67 Bump net.kyori.ansi to 1.0.2 (#9546) 2023-07-29 12:59:46 +10:00
Jake Potrebic 6c7e3c5193 [ci skip] Clarify viewers set mutability in chat events (#9525) 2023-07-28 15:14:19 -07:00
Jake Potrebic 7d1cc6d409 Add Translatable interface to MusicInstrument (#9538) 2023-07-28 15:06:27 -07:00
Jake Potrebic a40e48f3fd Add cause to PlayerOpenSignEvent (#9441)
Also fire the event for plugin-opened signs
2023-07-26 17:25:14 +01:00
Spottedleaf 1837f6c677 Prevent entity removals if the entity slices is receiving status updates
If an entity is removed while updating an entity slice, then the
iteration over the entity slice's entities could throw a cryptic
exception. Instead, it is better to prevent the entity removal
with a useful log message.

Fixes https://github.com/PaperMC/Paper/issues/9464
2023-07-25 07:21:45 -07:00
Owen b14979e352 Remove isRemoved skip on .discard() (#9520) 2023-07-24 19:04:40 +10:00
powercas_gamer aa93dcfdce feat: add minimessage tag resolvers overload to CommandSender#sendMessage (#9505) 2023-07-23 01:46:40 -04:00
Sage 42830546f3 Add player whitelist events (#9209) 2023-07-23 00:38:53 -04:00
JLitewski e19177a2c3 Rewrote Amethyst logic to throw both BlockGrowEvent and BlockSpreadEvent (#9217)
With this patch, it is now possible to further control what plugins can do with Amethyst Blocks.
You can prevent Budding Amethyst blocks from creating shards with the BlockSreadEvent, and
when shards grow, it can be prevented with BlockGrowEvent
2023-07-22 23:54:02 -04:00
Jake Potrebic 2c54b3949f Don't support hex in book title and author (#9493) 2023-07-22 23:40:52 -04:00
Astralchroma d8b8f61961 Configurable Region Compression Format (#8505) 2023-07-22 20:13:48 -04:00
Owen 383f0ed924 Remove sign ticking (#9478)
Minecraft now ticks signs in order to validate the playerWhoMayEdit field. This is a horrible idea, as this means that even waxed signs are ticked for essentially no reason. This moves the logic lazily onto the getter.
2023-07-22 17:00:50 -04:00
Jake Potrebic 24d690fe7e Fix hopper not marking source inv as changed (#9070) 2023-07-22 13:48:23 -07:00
Golfing7 46a36d3b28 Make ExperienceOrb entities call EntitySpawnEvent (#9197) 2023-07-22 16:19:50 -04:00
Roman Alexander 2f8d9db58c Pathfinder hasPath should check if path is done. (#9231) 2023-07-22 16:04:19 -04:00
Infynyty b1334b5105 Mark Player.sendSignChange as deprecated (#9382) 2023-07-22 21:38:40 +02:00
Jake Potrebic c016e039a5 Fix unbreakable flint and steel consumed when igniting creepers (#9509) 2023-07-19 09:16:39 -07:00
Bjarne Koll 40adc2345b [ci skip] Fix incorrect javadoc in JarLibrary (#9513) 2023-07-19 12:51:58 +01:00
Moulberry c793bd93be Allow LEFT_CLICK_AIR in 3.0->4.5 range of entity (#9211) 2023-07-16 17:58:25 +02:00
Jake PotrebicandBillyGalbreath b533905cc3 fix 2 vanilla issues (#8940)
Fix sheeps eating grass outside ticking chunks
Fix itemframe drops dropping in correct location

Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
2023-07-15 16:28:28 -04:00
Jason fe780d041e Add back accidentally dropped Wandering Trader patch (#9492) 2023-07-14 16:23:33 -07:00
Jake Potrebic de3f149185 Fix possible NPE on painting creation (#9391) 2023-07-13 17:22:15 -07:00
Jake Potrebic 22ed60c101 Fix BanList API (#9450) 2023-07-13 14:43:45 -07:00
Jake Potrebic aefb73c234 Add Owner UUID api for AreaEffectCloud (#9364) 2023-07-13 17:26:42 -04:00
Owen ece4fd3597 Suppress Item Meta Validation Checks (#9331)
Stops item meta from aggressively throwing exceptions.
2023-07-13 16:59:49 -04:00
Jake Potrebic 836586d59b Fix missing item types in SlotType for armor change event (#9379)
Also added 2 parameterized tests to make sure this doesn't happen
again.
2023-07-13 13:09:26 -07:00
Owen 92bc19b049 Fix missing item interaction cancelling case (#9427)
Properly cancels brushes now
2023-07-13 15:48:46 -04:00
Lulu13022002 1f8ca77bb6 Prevent desync for poi and pistons (#9270) 2023-07-13 15:22:05 -04:00
Jake Potrebic a60eeb85f5 Fix mob breaking doors not spawning particles (#9443)
This is a vanilla issue reported as MC-263999
2023-07-13 12:11:27 -07:00
Pedro a3c760e6af Handle block state in EntityDamageByBlockEvent (#9396) 2023-07-12 12:12:12 -07:00
Nassim Jahnke f9473d9928 [ci skip] Add gradle wrapper validation action 2023-07-11 23:25:02 +02:00
Jake Potrebic b3dc7a3b4b fix item meta for tadpole buckets (#9473) 2023-07-11 11:52:11 -07:00
chickeneer 805fdd83b3 Add deprecations to SignSide string methods (#9467) 2023-07-11 09:58:08 -07:00
Warrior 6b325cd6a9 Array backed synched entity data (#9460) 2023-07-10 15:27:50 +02:00
Jake Potrebic 5de0f8ac48 Add Sign#getInteractableSideFor (#9388) 2023-07-08 11:04:19 +02:00
Jake Potrebic e105354330 Fix incorrect new blockdata in EntityChangeBlockEvent (#9445)
Also fixes EntityBreakDoorEvent not having the correct 'to' block data

Also standardizes how to handle EntityChangeBlockEvent before a removeBlock or destroyBlock
call. Always use 'state.getFluidState().createLegacyBlock()' to get the new state instead of
just using the 'air' state.
2023-07-07 10:25:36 -07:00
Jake Potrebic d7d3f6371e [ci skip] Use Nullable annotation for Entity source (#9435) 2023-07-06 20:38:46 -07:00
Spottedleaf 48ea66e97f Optimize player lookups for beacons
For larger ranges, it's better to iterate over the player list
than the entity slices.
2023-07-06 20:18:33 -07:00
Shane Freeder dadd8b5a7c Don't allow for supporting block checks to load chunks
I cannot test this due to lack of hardware (took 30 minutes getting paper
updated and loaded into IJ on this machine...), however, this is the easiest
patch for now. Ideally, some form of distance check would probably be added to
improve invalidation of this cache.
2023-07-06 02:55:19 +01:00
Lulu13022002 12c970097d Fix ThrownEggHatchEvent#setHatching (#9448) 2023-07-05 09:46:12 +02:00
Nassim Jahnke c0936a71bd Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9440)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
01aa02eb PR-858: Add LivingEntity#playHurtAnimation()
9421320f PR-884: Refinements to new ban API for improved compatibility and correctness
37a60b45 SPIGOT-6455, SPIGOT-7030, PR-750: Improve ban API
4eeb174b All smithing inventories are now the new smithing inventory
f2bb168e PR-880: Add methods to get/set FallingBlock CancelDrop
e7a807fa PR-879: Add Player#sendHealthUpdate()
692b8e96 SPIGOT-7370: Remove float value conversion in plugin.yml
2d033390 SPIGOT-7403: Add direct API for waxed signs
16a08373 PR-876: Add missing Raider API and 'no action ticks'

CraftBukkit Changes:
b60a95c8c PR-1189: Add LivingEntity#playHurtAnimation()
95c335c63 PR-1226: Fix VehicleEnterEvent not being called for certain entities
0a0fc3bee PR-1227: Refinements to new ban API for improved compatibility and correctness
0d0b1e5dc Revert bad change to PathfinderGoalSit causing all cats to sit
648196070 SPIGOT-6455, SPIGOT-7030, PR-1054: Improve ban API
31fe848d6 All smithing inventories are now the new smithing inventory
9a919a143 SPIGOT-7416: SmithItemEvent not firing in Smithing Table
9f64f0d22 PR-1221: Add methods to get/set FallingBlock CancelDrop
3be9ac171 PR-1220: Add Player#sendHealthUpdate()
c1279f775 PR-1209: Clean up various patches
c432e4397 Fix Raider#setCelebrating() implementation
504d96665 SPIGOT-7403: Add direct API for waxed signs
c68c1f1b3 PR-1216: Add missing Raider API and 'no action ticks'
85b89c3dd Increase outdated build delay

Spigot Changes:
9ebce8af Rebuild patches
64b565e6 Rebuild patches
2023-07-04 10:22:56 +02:00
Lulu13022002andJake Potrebic 4356758b64 Call missing BlockDispenseEvents (#8518)
* Call missing BlockDispenseEvent

* Avoid duplicate event

* Show a single item for event

* Move glowstone refill event

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-07-02 16:12:07 -07:00
Jason 171ba7ccf3 Move Log4j plugins to own source set (#9428) 2023-07-01 22:00:46 -07:00
Jake Potrebic e16fefb443 [ci skip] add 'accepted' to Done project category (#9429) 2023-07-01 10:24:58 +02:00
Jake Potrebic f2c1e1366a Fix default permission for xp command (#9419) 2023-06-30 15:02:25 -07:00
Boy0000 fead63e2ea Add option to disable NoteBlock and Tripwire updates (#9368) 2023-06-30 16:11:52 +02:00
Nassim Jahnke 225c95025b Hotfix double entity removal making entity scheduler retire call
The assumption that the setRemoved method will never be called more than once is flawed, considering even vanilla code seems to indicate it might happen. Especially with plugins, throwing an exception is not something reasonably maintainable across all the places it *could* happen.
If it is called a second time after already having been removed due to changing dimensions, that's definitely bad, so no extra check for that
Fixes #9420
2023-06-29 17:41:32 +02:00
Jake Potrebic 437e8da700 Improve command function perm level checks (#9411) 2023-06-28 23:18:28 -07:00
Jake Potrebic 2c9c5e4662 Fix replenishable container entities save/load existing contents (#9417) 2023-06-28 11:06:47 -07:00
Pedro 82cd69fcf4 [ci skip] Update Repo style and change project url in README (#9407) 2023-06-28 10:23:05 +02:00
Jake Potrebic e4b40ddc22 Fix entity selectors while spectating (#9402) 2023-06-27 14:46:27 -07:00
Jake Potrebic 8582999344 Deprecate duplicate chat completion methods (#9401) 2023-06-27 10:18:59 +02:00
Lulu13022002 cf0f013f53 Avoid duplicate death event call for armorstands (#9223)
* Avoid duplicate death event call for armorstands

* restore vanilla behavior (emit the game event etc...)
2023-06-26 21:22:49 -07:00
Redned 7103f813bc Only tick item frames if players can see it (#9377)
In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up.
2023-06-27 00:26:29 +01:00
Bit 3f6c4b07ac Add event for player editing sign (#9300)
Addresses https://github.com/PaperMC/Paper/issues/9293
2023-06-26 23:35:32 +01:00
Nassim Jahnke 990be1691b Iterate over entity array copy for entity scheduler 2023-06-26 18:41:08 +02:00
powercas_gamer e8bec64217 Fix ugly java logger format for paper plugin dependency loader (#9395) 2023-06-25 09:57:45 +02:00
Owen b34d4ecd2e Fix cycle on paper plugin toString (#9392) 2023-06-24 22:37:38 +01:00
Owen aea9cdd37d Fix interact event call override (#9387) 2023-06-23 11:03:43 -05:00
Molean 206dd3af05 Fix incorrect phantom spawning entity (#9385) 2023-06-23 12:50:29 +02:00
Samir b1696788d6 ratelimited packet is logged to console on kick (#9292) 2023-06-21 14:36:14 +01:00
Redned c613877e54 Fix incorrect crafting result amount for fireworks (#9322)
Although vanilla does not specifically call this method anywhere, this fixes a bug where the result using the Bukkit API returns the wrong amount.
2023-06-21 14:11:50 +01:00
Owen 3756f5bbf5 Properly Cancel Usable Items (#9225)
This fixes the bug causing canceling PlayerInteractEvent to cause items to continue to be used despite being canceled on the server.

For example, items being consumed but never finishing, shields being put up, etc.
The underlying issue of this is that the client modifies their synced data values, and so we have to (forcibly) resend
them in order for the client to reset their using item state.
2023-06-18 18:33:15 -04:00
Nassim Jahnke 1f5bec71f3 Pull Folia API take two 2023-06-18 22:46:52 +02:00
Nassim Jahnke b1fe756b73 Revert "Move some Folia API to Paper for easy compat (#9360)"
This reverts commit d6d4c78e7d.
2023-06-18 21:47:17 +02:00
Nassim Jahnke d6d4c78e7d Move some Folia API to Paper for easy compat (#9360) 2023-06-18 20:02:59 +02:00
Shane Freeder 976b95c74c Temp: Pre-init PlayerChunkLoaderData in order to prepopulate the BFS lookup cache because potatos (Closes #9338) 2023-06-18 13:49:22 +01:00
Nassim Jahnke 275173e538 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends
255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot

CraftBukkit Changes:
b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends
fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd
44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot
676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
2023-06-18 13:18:11 +02:00
Jake Potrebic 873533b129 Add method to remove all active potion effects (#9361)
* Add method to remove all active potion effects

* use clear instead of removeAll
2023-06-17 21:10:13 -07:00
Riley Park faf9a65b62 Disable BukkitMirrorTest 2023-06-17 14:20:46 -07:00
Jake Potrebic 072b78a713 Add trail ruins structure set seed in spigot config (#9327)
Also adds a server test to ensure the defaults match and that a seed
exists for each structure set
2023-06-17 12:12:23 -07:00
Jake Potrebic 3a0373901e Add method to get ungenerated chunk from long key (#9254)
Also added a missing deprecation for a location block key method
2023-06-17 11:43:08 -07:00
Jake Potrebic c1ea5502d4 Remove more outdated config settings (#9358) 2023-06-17 11:25:22 -07:00
Jake Potrebic 38856661c0 Remove stacktrace on exception from reading server.properties (#9296) 2023-06-16 19:27:45 -07:00
Spottedleaf a226f44b45 Copy itemstack when sanitizing for datawatcher items
Since the packet is broadcasted for players, it means that
the packet will be sent to multiple players. In this case,
modifying the data results in a possible race condition
where a CME may occur as the packet will be serialized on
many different netty IO threads.
2023-06-16 10:27:59 -07:00
Spottedleaf f5551380b3 Make sure to post process chunks before they are sent to players
Some TEs need to be post processed after generation to be sent
properly (chests)
2023-06-16 10:25:26 -07:00
Spottedleaf 3f237e869a Fix IntegerUtil#getDivisorNumbers
Use unsigned mod operation for initialization of anc

Also includes
- https://github.com/PaperMC/DataConverter/commit/5a0cefb45e246ef36901fb62448571edd82e7296
- https://github.com/PaperMC/Starlight/commit/acc8ed9634bbe27ec68e8842e420948bfa9707e7
2023-06-16 09:05:36 -07:00
powercas_gamer 02e3b5a91a chore(api): add missing javadoc urls (#9355) 2023-06-16 16:34:49 +01:00
OllieandBjarne Koll 17966ddb8e Update the server logo (#9264)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2023-06-16 16:20:31 +01:00
Lulu13022002 f6139de06c Fix sniffer removeExploredLocation and javadoc (#9311) 2023-06-16 14:33:25 +01:00
Nassim Jahnke 81834ac54a Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
be1f3344 SPIGOT-7326: Add ClickType#isMouseClick()

CraftBukkit Changes:
3b557627c Fix Player#setScoreboard() checking incorrect state
9a21b0b89 SPIGOT-7393: Fix new tile entities not loading Bukkit's PersistentDataContainer

Spigot Changes:
c62f4bd9 Rebuild patches
2023-06-16 13:32:29 +02:00
Phillipp Glanz fa674f3d35 Don't enforce icanhasbukkit default if alias block exists (#9334) 2023-06-16 12:02:43 +01:00
Jake Potrebic b134eb406a Fix incorrect annotation on BrushableBlock#getItem (#9345) 2023-06-16 11:58:09 +01:00
Jake Potrebic 41e6f20420 Updated Upstream (Bukkit/CraftBukkit) (#9342)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fdff0cd4 PR-869: Add Enderman#teleport and Enderman#teleportTowards
dfd86ee7 Improve sendSignChange and related documentation
beced2b2 PR-867: Add Player#sendBlockUpdate to send tile entity updates

CraftBukkit Changes:
ad6d0cffb SPIGOT-7394: Fix another issue with sendSignChange
66c5ce4c7 SPIGOT-7391: Preserve vanilla sign json where not modified by event
ae3824f94 PR-1204: Add Enderman#teleport and Enderman#teleportTowards
5863a2eae Fix sendSignChange not working
4a7eadc97 PR-1201: Add Player#sendBlockUpdate to send tile entity updates
789324e30 Work around issue placing decorated pots
2023-06-16 11:28:31 +01:00
Jason f7b386ddc7 Use ANSI serializer for console completion descriptions (#9351) 2023-06-15 10:11:09 -07:00
Jake Potrebic 8bc0574fb8 Bump kyori's ansi to fix color bleed (#9346) 2023-06-15 09:24:01 -07:00
Jake Potrebic bae6096aa2 Re-add dropped patch during 1.20 update (#9344) 2023-06-14 17:52:28 -07:00
Bjarne Koll 837cc25c51 Call BlockEntity#load in new child types (#9340)
BlockEntity#load is responsible for loading the pdc data for block
entities. Some of the new block entities added by mojang do not call
their super method, preventing paper from loading the PDC, which
leads to a loss of data.

This commit adds the super calls to prevent this.
2023-06-14 13:06:50 +02:00
powercas_gamer 62262d73d2 [ci skip] mention adventure in chatcolor deprecation message (#9336)
* mention adventure in chatcolor deprecation message

* expand text

* americans
2023-06-13 20:48:41 -07:00
Jason 2e363c73ba 1.20.1 (#9333) 2023-06-13 09:10:07 +02:00
Jake Potrebic c287e921a9 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301) 2023-06-12 16:51:45 -07:00
Jason Penilla b48e2e352e Fix dev bundle generation 2023-06-12 16:44:07 -07:00
Emilia Kond 2d09115b3a Use net.kyori.ansi for console logging (#9313)
Uses the new ANSIComponentSerializer introduced in Adventure 4.14.0 to
serialize components when logging them via the ComponentLogger, or when
sending messages to the console.

This replaces the old solution which uses legacy jank and custom color
conversions, with a new library that handles the conversion and config
2023-06-12 15:00:12 -07:00
Bjarne Koll 87dfff4cfa Implement BossBarViewer on Player (#9332)
* Implement BossBarViewer on Player

Author: Riley Park <rileysebastianpark@gmail.com>

* Implement BossBar#viewers
2023-06-12 14:43:39 -07:00
Jake Potrebic de19eb8c4a fix incorrectly updated move vector checking patch (#9328) 2023-06-12 11:26:43 -07:00
Jake Potrebic f8cfdd4ba9 Fix SmithingInventory helper slot methods for 1.20 (#9325) 2023-06-12 19:04:53 +02:00
Lulu13022002 eb0693fff7 Fix EntityDeathEvent cancellation (#9323) 2023-06-12 19:03:51 +02:00
Bjarne Koll f4dfdcbb5b Fix sendSignChange0's usage of SignText (#9310) 2023-06-11 22:53:28 +02:00
Jake Potrebic 3722877c3c correctly hide players from entity argument suggestions (#9245) 2023-06-10 18:15:43 -07:00
Lulu13022002 e2e874f549 Add back the source uuid on exp orb for animals breeding (#9289) 2023-06-10 18:01:10 -07:00
Spottedleaf bc3496ea58 Fix incorrect collision shape for hopper item suck
It shouldn't cost too much more to check the correct shape,
provided that it is cached and we use the overall AABB
to collect possible entities to check against.

The issues with the old check code is that it will use two
getEntitiesOfClass calls plus the addition of streams
_and_ the toAabbs() logic on VoxelShape. The new code
caches toAabbs, uses one getEntitiesOfClass call, and
does not use streams. Then compared to 1.12, we are
only performing two additional AABB checks per item.
2023-06-10 13:42:03 -07:00
Spottedleaf 3d06377b24 Allow double removal from player chunk loader
Unlike Folia, players may be incorrectly be double-removed

Fixes https://github.com/PaperMC/Paper/issues/9299
2023-06-10 08:27:23 -07:00
Owen 2ffb704efa Don't use event to get block position (#9295) 2023-06-10 02:13:42 -04:00
Jake Potrebic dc30ee591d Properly remove the experimental smithing inventory type (#9290) 2023-06-09 20:50:00 +02:00
Jake Potrebic 0284b272d3 Add API for waxed signs (#9291) 2023-06-09 20:32:20 +02:00
Lulu13022002 648c000fb2 Add pitcher plant api (#9286) 2023-06-09 14:23:38 +02:00
Bjarne Koll 4b5f84712b Minimise EntityFertilizeEggEvent and add sniffer (#9280) 2023-06-09 09:01:08 +02:00
Jake Potrebic 4e3febbfe0 fix missing trigger entity for xp orb from breeding 2023-06-08 23:52:18 -07:00
Jake Potrebic f9fc44ff9f add side to PlayerSignCommandPreprocessEvent 2023-06-08 22:57:24 -07:00
Jake Potrebic 9ebf75d894 fix some more 1.20 tracking issues 2023-06-08 22:45:45 -07:00
Jake Potrebic c9e125f62a Fix setListenerRange for calibrated sculk sensors 2023-06-08 22:35:56 -07:00
Jason Penilla 9ada4bd7af Prevent the rcon thread from attempting connections after shutdown 2023-06-08 22:25:23 -07:00
Jake Potrebic ea9fdc393c Ignore inline definitions of trim material & pattern 2023-06-08 21:53:37 -07:00
Jake Potrebic 0d969f0a1b comment out update logic from build.gradle.kts 2023-06-08 21:31:56 -07:00
Jake Potrebic 82c64790f4 Add back Anti-Xray patch (#9283) 2023-06-08 21:29:58 -07:00
Owen1212055 e829a9d8f3 Fix javadoc 2023-06-08 22:53:42 -04:00
Owen1212055 6d74ad155f Finish tests & bad calls 2023-06-08 22:51:31 -04:00
Jake Potrebic 03c3587e2e fix not editable sign after openSign 2023-06-08 19:45:58 -07:00
Owen ccb194bbbb Move block farther away for Player#setRotation (#8514) 2023-06-08 22:37:59 -04:00
Lulu13022002 3621d76d8f Fix collision between AABB and a dot (#8733) 2023-06-08 22:17:32 -04:00
Lulu13022002 21f2d158c4 Avoid duplicate poi entries from the first section (#9235) 2023-06-08 22:14:30 -04:00
Jake Potrebic c9eb393d18 Updated Upstream (Bukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
657df461 PR-686: Add missing trim patterns added in 1.20
2023-06-08 19:10:05 -07:00
Spottedleaf 04509f0234 Fix crash relating to "Already sent chunk"
Forgot to update the distandce field in the single user area map
on update, and additionally used the wrong radius (introduced
last commit) for the broadcast map
2023-06-08 18:00:46 -07:00
Spottedleaf 8ce5219e07 Fix inconsistent chunk sending with vanilla
Vanilla now loads the proper number of chunks for sending
to players. So, we can finally match their behavior after
all these years.
2023-06-08 17:45:54 -07:00
Jake Potrebic e325e37268 add missing call to EntityInsideBlockEvent 2023-06-08 17:34:35 -07:00
Jake Potrebic 59060aaec3 fix some failing tests 2023-06-08 17:26:05 -07:00
Owen1212055 9d428792c4 Fix breaking pots throwing exception 2023-06-08 20:24:12 -04:00
Jason Penilla aed9ef0788 Update adventure 2023-06-08 17:22:51 -07:00
Jake Potrebic 318a08c1db add missing block entity type to CraftBlockStates 2023-06-08 17:04:46 -07:00
Jake Potrebic a0a2e7287c fix sculk npe 2023-06-08 16:56:02 -07:00
Spottedleaf c1def9d852 Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
fd92f1e65 SPIGOT-7378: Add BlockDropItemEvent for Suspicious Sand & Gravel drops
cb1b69d13 SPIGOT-7377: Server sends player list twice

Spigot Changes:
16cfc987 Rebuild patches
2023-06-08 16:47:58 -07:00
Spottedleaf 57a592466d Fix boot errors
Thanks kennytv
2023-06-08 16:44:34 -07:00
Spottedleaf efb4197a1b Fix final compilation issues 2023-06-08 16:35:02 -07:00
Spottedleaf 902691b636 Apply last patch 2023-06-08 16:21:20 -07:00
Spottedleaf 619d7c93d8 Add in some patches 2023-06-08 16:12:34 -07:00
Spottedleaf cc491a396e Finish updating chunk system patch
Add in locking changes from folia, plus fix some diffs.
I'm sure it'll be error-free.
2023-06-08 16:04:53 -07:00
Jake Potrebic 3fe0e32495 more compile fixes 2023-06-08 14:13:43 -07:00
Jake Potrebic f0aea8123e more compile fixes 2023-06-08 13:56:13 -07:00
Jake Potrebic 0a9e232f48 fix some more compile issues 2023-06-08 12:35:20 -07:00
Jake Potrebic 7002799587 fix FullChunkAccess enum move (#9281) 2023-06-08 12:22:12 -07:00
Jake Potrebic 37e689f367 fix more compile errors 2023-06-08 12:00:58 -07:00
Owen1212055 034edecc37 cleanup some descriptions + optimize hoppers patch 2023-06-08 14:10:23 -04:00
Jake Potrebic b4ae928db9 add some more patches back 2023-06-08 10:48:28 -07:00
Jake Potrebic 870dafe358 add 1 more networking patch and add comments to dropped patches 2023-06-08 10:25:32 -07:00
Jake Potrebic 1a0280ccc0 apply a couple network patches 2023-06-08 09:09:43 -07:00
Jake Potrebic f80338725e fix defaulting join-classpath to true for plugin deps 2023-06-08 06:50:41 -07:00
Nassim Jahnke a6628220d3 Update test plugin 2023-06-08 15:42:13 +02:00
Nassim Jahnke ad4eb2ec7d Fix bad fixup 2023-06-08 15:27:41 +02:00
Nassim Jahnke 4af62f6d1d Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2d009e64 Update SnakeYAML javadoc link
b4fd213c Switch Player#updateInventory deprecation for internal API annotation

CraftBukkit Changes:
f3b2b2210 SPIGOT-7376: Exception with getBlockData when hasBlockData is false
725545630 SPIGOT-7375: Fix crash breeding certain entities
b9873b0d4 Update Brigadier version with fix
68b320562 SPIGOT-7266: Found typo in CraftBukkit package
98b4d2ff8 SPIGOT-7372, SPIGOT-7373: Signs can't be edited, issues with SignChangeEvent
5f7bd4d78 SPIGOT-7371: Sign does not open edit text on placement
b4cf99d24 SPIGOT-7371: Fix editing signs with API
a2b6c2744 PR-1200: Implement open sign by side
a345bb940 SPIGOT-7368: Downgrade SpecialSource version

Spigot Changes:
723951c3 Rebuild patches
b655c57d Drop old collision API deprecated since 1.9.4
55b0fed4 Rebuild patches
2023-06-08 15:25:35 +02:00
Noah van der Aa 0cc83ea9b6 1.20: Remove Experimental API status where upstream forgot (#9271) 2023-06-08 15:04:43 +02:00
Bjarne Koll 2873869bb1 Drop manual isEditable copy in CraftSign
Signs no longer have a specific isEdiable state, the entire API in this
regard needs updating/deprecation. The boolean field is completely gone,
replaced by a uuid (which will need a new setEditingPlayer(UUID) method
on the Sign interface), and the current upstream implementation of
setEdiable simply flips the is_waxed state.

This patch is hence not needed as it neither allows editing (which will
be redone in a later patch) nor is required to copy the is_waxed boolean
flag as it lives in the signs compound tag and is covered by applyTo.
2023-06-08 11:35:39 +02:00
Bjarne Koll 1c12701691 Update fluid chunk loading patch 2023-06-08 11:18:51 +02:00
Bjarne Koll d5682d77c3 Minimize strict-advancement-dimension-checks.patch 2023-06-08 10:53:00 +02:00
Owen1212055 aa1c25c88d vine boom sound 2023-06-08 04:47:19 -04:00
Owen1212055 bab0b3a7c3 YOU get patches 2023-06-08 04:08:08 -04:00
Owen1212055 b05cd80334 Fix scuffed patches 2023-06-08 03:57:42 -04:00
Owen1212055 605e66c5de re-patched 2023-06-08 03:40:45 -04:00
Owen1212055 91b45c49ce Patched 2023-06-08 03:20:03 -04:00
Owen1212055 6d118492b6 Some chunk patches 2023-06-08 02:31:22 -04:00
Spottedleaf 74ad522fc5 Rebase chunk patches 2023-06-07 22:26:06 -07:00
Spottedleaf 819facd7c4 rewrite chunk system checkpoint 2023-06-07 22:26:06 -07:00
Spottedleaf 0c4a1c4496 Clean rebuild
Add to gradle build so that this is automatically done
throughout the update
2023-06-07 22:26:06 -07:00
Jake Potrebic de18bb96e8 actually update to 1.20 2023-06-07 20:33:11 -07:00
Jake Potrebic 20aaebbd47 update reobf-mappings-patch.tiny 2023-06-07 20:30:34 -07:00
Jake Potrebic 13ab8b77d3 signing off for now 2023-06-07 19:12:38 -07:00
Jake Potrebic 47c5d82017 some more stuffs 2023-06-07 19:04:01 -07:00
Jake Potrebic 1eba407610 finished some more patches 2023-06-07 18:13:54 -07:00
Jake Potrebic 236eabd751 some more patches 2023-06-07 17:54:54 -07:00
Jake Potrebic c13b259ff2 fix compile errors 2023-06-07 17:30:05 -07:00
Jake Potrebic ac1a626493 45 more patches 2023-06-07 16:56:33 -07:00
Jake Potrebic 0ca9f14d58 finish some more patches 2023-06-07 16:44:11 -07:00
Noah van der Aa b1a2378144 1.20: Fix a bunch of compile issues (#9273) 2023-06-07 16:21:20 -07:00
Jake Potrebic f0889559f3 even moaaar patches 2023-06-07 16:20:26 -07:00
Jake Potrebic c31a22c563 even moar patches 2023-06-07 15:58:10 -07:00
Jake Potrebic 44e22b45a5 more patches 2023-06-07 15:41:25 -07:00
Jake Potrebic 0b8147f68e fix a bunch of compile errors 2023-06-07 15:28:06 -07:00
Jake Potrebic 8f7a7ec440 more work and compile fixes 2023-06-07 15:12:41 -07:00
Jake Potrebic e09a44e169 fix some compile issues 2023-06-07 14:46:56 -07:00
Nassim Jahnke 3c8e176265 Some compile fixes 2023-06-07 23:37:08 +02:00
Nassim Jahnke 838d8afd76 More more more more more more more more work 2023-06-07 23:18:26 +02:00
Nassim Jahnke c1f313b273 More more more more more more more work 2023-06-07 22:41:26 +02:00
Nassim Jahnke 7f384988cd More more more more more more work 2023-06-07 22:19:14 +02:00
Nassim Jahnke 3fed7289ed More more more more more work 2023-06-07 21:54:11 +02:00
Noah van der Aa 94aa4b518a Fix API compile issues (#9269) 2023-06-07 21:47:39 +02:00
Nassim Jahnke 0ed49782c5 More more more more work 2023-06-07 21:37:42 +02:00
Nassim Jahnke 474a02835d More more more work 2023-06-07 21:21:43 +02:00
Nassim Jahnke 01f5831171 More more work 2023-06-07 20:49:17 +02:00
Nassim Jahnke 197786ead0 More more work 2023-06-07 20:31:32 +02:00
Nassim Jahnke c1bbde4bc6 Let's hope this is fine 2023-06-07 20:08:03 +02:00
Nassim Jahnke 3fbb00319f More work 2023-06-07 19:18:05 +02:00
Nassim Jahnke 965cf53cd5 Start working on 1.20 2023-06-07 19:06:55 +02:00
Owen bc4a6647c9 Paper Plugins Dependency Format Update (#9160)
* Rework dependency management (WIP)

* Revert "Rework dependency management (WIP)"

This reverts commit e046cd59c68743dc00303b1ab42317bf474abd6a.

* Correctly add soft dependencies to the dependency tree for classloading resolution

* Add support for new dependency config format

* Rebase

* swap load order meaning

* Dependencies should be required by default
2023-06-07 08:41:25 -07:00
Jake Potrebic 175a774247 [ci skip] Use a separate interface for bootstrapping (#9267) 2023-06-07 08:29:28 -07:00
Jake Potrebic 14cfd64d2d Schedule several things for removal in 1.21 (#9041) 2023-06-07 15:47:32 +02:00
Nassim Jahnke d8e07590e3 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
5dbedae1 PR-864: Fix Registry#match() failing namespaced inputs
49256865 PR-863: Fix boolean PersistentDataType
9f15450b SPIGOT-7195, SPIGOT-7197: Add DataPack API
ebef5b6a Disable InterfaceIsType Checkstyle check
01d577f5 Slight tweak to boolean PersistentDataType javadoc
d2b99e56 PR-857: Add boolean PersistentDataType

CraftBukkit Changes:
2270366cd PR-1196: Test Registry instances more thoroughly
863dacb7a PR-1191: Do not start on pre-release Java 17
1f2dd8e12 SPIGOT-7362: Properly handle null in CraftBlock#blockFaceToNotch()
dbc70bed5 SPIGOT-7195, SPIGOT-7197: Add DataPack API
2023-06-06 11:09:19 +02:00
Malfrador 956062a5d5 Add transient modifiers (#9244)
This allows adding modifiers as transient. Transient modifiers don't get saved with the NBT data.
Vanilla itself uses transient modifiers for speed modifications like sprinting or powder snow. This just exposes it in the API.
2023-06-05 13:15:18 -04:00
Jake Potrebic d8d3bd70b0 [ci skip] Add missing deprecations for legacy MaterialData api (#9253) 2023-06-03 11:09:43 -07:00
Jake Potrebic 8a18fc55ab [ci skip] add 'needs triage' label to invalid on issue close (#9252) 2023-06-03 10:43:38 -07:00
Jake Potrebic bacbf86ed2 Fixes and additions to projectile API (#9237) 2023-05-31 19:43:51 -07:00
Jake Potrebic 2eda177116 Expand PlayerItemMendEvent (#7382) 2023-05-31 16:58:25 -07:00
Jake Potrebic ea0b63992c Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9228)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
4727d326 Don't let Sign extend SignSide, mark API as experimental
9b29bdcc PR-845: Add preliminary support for multi sided signs

CraftBukkit Changes:
b346a5f6d PR-1170: Add preliminary support for multi sided signs
86c816189 Update SQLite version
d9324b4bc Fix addition of custom smithing trim / transform recipes

Spigot Changes:
7d7b241e Rebuild patches
2023-05-31 16:36:57 -07:00
Jake Potrebic fa8fa1ce08 Fix playing adventure sounds on World/Server (#8077) 2023-05-30 18:36:16 -07:00
Lulu13022002 0f91091ccc Re-implement the compost events (#9192) 2023-05-30 18:07:04 -07:00
Spottedleaf f9f90791e4 Pull a few Folia patches 2023-05-27 20:34:33 +02:00
Nassim Jahnke 90a0835f43 Fix incremental player saving patch 2023-05-27 20:14:04 +02:00
Lulu13022002 bcd8dc2c11 Use the spigot config for mangrove propagule / torchflower growth (#8597) 2023-05-15 14:25:38 -04:00
Lulu13022002 b6817605ce Fix note block sound property on player heads (#9158) 2023-05-15 13:32:26 -04:00
Warrior a61b4845f2 Fix MC-224454 (#9195) 2023-05-15 11:33:15 -04:00
Warrior 4ba5aacc37 More accurate isInOpenWater impl (#9194) 2023-05-15 11:21:57 -04:00
Lulu13022002 5b66d33a77 Call EntityChangeBlockEvent for frogs egg (#9213) 2023-05-15 12:56:12 +02:00
Owen f8603a46a8 Avoid Lazy Initialization for Enum Fields (#9210) 2023-05-14 20:46:17 -04:00
Noah van der Aa 57fdc668fa Undeprecate Server#getMap (#9185)
The only way to get a map is via its id, which is not a magic value. This implementation isn't going to be changing anytime soon, so it should be undeprecated.
2023-05-14 20:23:57 -04:00
Jake Potrebic ab7bc3fb34 Remove javadoc that doesn't apply to Paper (#9206) 2023-05-14 19:20:43 -04:00
booky10 9daa019d6c Added wither vanilla invulnerability API (#9124) 2023-05-12 15:24:50 -05:00
Redned 1edfefdef8 Add option to flush region files on save (#9149) 2023-05-12 15:07:24 -05:00
Nassim Jahnke efd47e3a68 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9188)
* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2fcba9b2 SPIGOT-7347: Add missing documentation and details to ShapedRecipe
c278419d PR-854: Move getHighestBlockYAt methods from World to RegionAccessor
201399fb PR-853: Add API for directly setting Display transformation matrices
ecfa559a PR-849: Add InventoryView#setTitle
653d7edb SPIGOT-519: Add TNTPrimeEvent
22fccc09 PR-846: Add method to get chunk load level
a070a52c PR-844: Add methods to convert Vector to and from JOML vectors
cc7111fe PR-276: Add accessors to Wither's invulnerability ticks
777d24e9 SPIGOT-7209: Accessors and events for player's exp cooldown
ccb2d01b SPIGOT-6308: Deprecate the location name property of map items
cd04a31b PR-780: Add PlayerSpawnChangeEvent
7d1f5b64 SPIGOT-6780: Improve documentation for World#spawnFallingBlock
5696668a SPIGOT-6885: Add test and easier to debug code for reference in yaml configuration comments
2e13cff7 PR-589: Expand the FishHook API
2c7d3da5 PR-279: Minor edits to various Javadocs

CraftBukkit Changes:
01b2e1af4 SPIGOT-7346: Disallow players from executing commands after disconnecting
7fe5ee022 PR-1186: Move getHighestBlockYAt methods from World to RegionAccessor
bcc85ef67 PR-1185: Add API for directly setting Display transformation matrices
a7cfc778f PR-1176: Add InventoryView#setTitle
563d42226 SPIGOT-519: Add TNTPrimeEvent
ccbc6abca Add test for Chunk.LoadLevel mirroring
2926e0513 PR-1171: Add method to get chunk load level
63cad7f84 PR-375: Add accessors to Wither's invulnerability ticks
bfd8b1ac8 SPIGOT-7209: Accessors and events for player's exp cooldown
f92a41c39 PR-1181: Consolidate Location conversion code
10f866759 SPIGOT-6308: Deprecate the location name property of map items
82f7b658a PR-1095: Add PlayerSpawnChangeEvent
b421af7e4 PR-808: Expand the FishHook API
598ad7b3f Increase outdated build delay

Spigot Changes:
d1bd3bd2 Rebuild patches
e4265cc8 SPIGOT-7297: Entity Tracking Range option for Display entities

* Work around javac bug

* Call PlayerSpawnChangeEvent

* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2fcba9b2 SPIGOT-7347: Add missing documentation and details to ShapedRecipe
c278419d PR-854: Move getHighestBlockYAt methods from World to RegionAccessor
201399fb PR-853: Add API for directly setting Display transformation matrices

CraftBukkit Changes:
01b2e1af4 SPIGOT-7346: Disallow players from executing commands after disconnecting
7fe5ee022 PR-1186: Move getHighestBlockYAt methods from World to RegionAccessor
bcc85ef67 PR-1185: Add API for directly setting Display transformation matrices

Spigot Changes:
7da74dae Rebuild patches
2023-05-12 13:10:08 +02:00
Warrior 688409279f Fix lightning being able to hit spectators (#9193) 2023-05-08 16:17:00 +02:00
Bjarne Koll 1d4c7806ff Fix BlockPosition#offset(double,double,double) (#9190) 2023-05-07 14:14:34 +02:00
Nassim Jahnke 813d0399f9 Make sure the player didn't disconnect when processing commands 2023-05-06 17:10:22 +02:00
Lulu13022002 9846d0d89e Fix some NPE for EntityCompostItemEvent (#9169) 2023-05-03 12:07:51 +01:00
Pedro 83da4b6101 Fix DamageSource for Falling Blocks (#9175) 2023-05-03 11:50:59 +01:00
Spottedleaf 4f9575eed8 Break redstone on top of trap doors early
This logic hooks into the neighbour update which should be invoked
as a result of redstone powering the trap door.
2023-05-01 18:32:30 -07:00
Lukas AltandShane Freeder bcec5b11e6 Fixed large packet handling (#9147)
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2023-04-27 19:50:14 +01:00
GodOfPro f4ce997a42 Add Mob Experience reward API (#9122) 2023-04-27 19:49:19 +01:00
Jason 2cccbbe1f4 [ci skip] Update Gradle plugins and wrapper (#9140) 2023-04-26 10:07:13 -07:00
Owen 936205beae Disable allowListing before received from client (#9167) 2023-04-23 21:24:12 -04:00
Owen 5c4671a9bf Fix LegacyPluginLoader dependency registration (#9165) 2023-04-23 02:55:10 +01:00
Owen 8e3009e0db Resolve Plugin Dependency Issues, Improve PluginLoading Compat, Small Loading Issues (#9129) 2023-04-22 12:44:40 -05:00
Jakub Zacek f7717c3712 Fix server ignoring fallback for translatable components (#9134) 2023-04-20 08:05:41 +01:00
Emily beed22d336 Undo making JavaPlugin#logger field public (#9125) 2023-04-19 16:46:09 +01:00
Luke Chambers dd216c1f09 Fix Inconsistencies with Paper Plugin Names (#9098) 2023-04-16 11:49:13 -05:00
Jake Potrebic 6d2121efde Removes some references to deprecated methods/types (#9043) 2023-04-15 18:13:59 -07:00
Warrior 23a443eeaa Fix demo flag not enabling demo mode (#9103) 2023-04-15 18:30:23 -05:00
Shane Freeder 8d040fad9b Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
465c4964 PR-843: Add damage methods to FallingBlock
46ba7c9f SPIGOT-7335: Fix typo in TextDisplay#TextAlignment enum name

CraftBukkit Changes:
818582f40 PR-1169: Add damage methods to FallingBlock
15a3eac66 SPIGOT-7335: Fix typo in TextDisplay#TextAlignment enum name
f01fb4979 SPIGOT-7336: Fix typo in internal method name
2023-04-14 00:52:42 +01:00
Matt Artist bd35d605e8 [ci-skip] Fix missing closing quote (#9126) 2023-04-11 17:57:56 -07:00
DungeonDev e338793603 Optimize hoppers by not trying to merge full items. (#9110)
This can skip many very expensive call to ItemStack.tagMatches.
Makes canMergeItems return false for merging into ItemStacks that are already full.
2023-04-11 15:35:54 +02:00
Jake Potrebic 5ffdff8822 Fix a couple of bed bugs (#9112) 2023-04-10 15:12:22 -07:00
Shane Freeder e811927394 Revert "Resolve Plugin Dependency Issues, Improve PluginLoading Compat, Small Loading Issues (#9068)"
This reverts commit f8d2f823db.
2023-04-10 11:25:04 +01:00
Redned 8be7a60b76 Fix getBrightness and getRawBrightness throwing exception in BlockStateListPopulator (#9111) 2023-04-10 10:06:49 +02:00
caramel ab72b123ec Update Adventure to 4.13.1 (#9113) 2023-04-10 10:06:38 +02:00
Nassim Jahnke 058d7c1aa3 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
13eb4146 SPIGOT-5217, SPIGOT-6183: Add RespawnReason to PlayerRespawnEvent

CraftBukkit Changes:
5ee3419b7 SPIGOT-5217, SPIGOT-6183: Add RespawnReason to PlayerRespawnEvent

Spigot Changes:
514cf03a Rebuild patches and add RespawnReason.PLUGIN to Player#respawn
2023-04-10 10:03:36 +02:00
Shane Freeder b626528da0 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
de5ba402 PR-848: Mark get/setCatType methods deprecated in addition to the enum

CraftBukkit Changes:
50ee87fbc SPIGOT-7333: Correctly handle null in ColorableArmorMeta#setColor()
790be710b SPIGOT-7332: Persistent Data Container of Chunk not saving on stop or restart.
2023-04-09 23:38:03 +01:00
Owen f8d2f823db Resolve Plugin Dependency Issues, Improve PluginLoading Compat, Small Loading Issues (#9068) 2023-04-09 23:28:30 +01:00
Jake Potrebic 6a7fef0e4a Allow entity effect changes off the main thread for worldgen (#8942)
* Allow entity effect modification off the main thread for worldgen

* squash all async catcher patches
2023-04-09 11:38:32 -07:00
Jake Potrebic f8c01122e6 [ci skip] add missing labels to project status map (#9106) 2023-04-09 09:00:43 +02:00
Shane Freeder 9cda28480e Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
aeb62aa3 Remove obsolete documentation from ArmorMeta#setTrim

CraftBukkit Changes:
cb6f3c028 PR-1173: Change CraftMinecartTNT to public for consistency
2023-04-09 01:13:38 +01:00
Jake Potrebic b5ce6e3dc5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9104)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
eb4b416d PR-822: Add experimental armor trim API
33498e1d PR-831: Add a standard of annotations for Minecraft experimental things and API

CraftBukkit Changes:
19de3550d SPIGOT-7315: Bed placement duplicates crops if cancelled
1eb88374e PR-1147: Add experimental armor trim API
c4c0bb0e9 Show clean error for invalidly configured server.properties options
3ae90697f Fix UUID not being updated when changing world of MapView
e43000601 PR-1164, MC-227255, MC-253819: Fix rotation of beehives and bells

Spigot Changes:
d2fdfe39 Rebuild patches
2023-04-09 01:00:50 +01:00
Jake Potrebic 29b17a892d Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9088)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
5efeb7bd Also update compiler version
c13b867a Update some Maven plugin versions
deb28d9f PR-837: Add more bell API
e938d62a PR-819: Allow Player#sendBlockDamage() to specify a source entity
0e75532c PR-818: Add more Guardian API, particularly for its laser
a10155aa PR-839: Add BlockData#rotate and BlockData#mirror
77e690b4 PR-836: Add missing API for explosive minecarts
60722059 PR-832: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks
0a2c4b4b PR-834: Add Player#sendHurtAnimation()

CraftBukkit Changes:
be8682aa8 Also update compiler version
08e305f5b Update some Maven plugin versions
187bdd463 PR-1160: Add more bell API
2f8e5bc7c PR-1145: Allow Player#sendBlockDamage() to specify a source entity
bcbb61b36 PR-1144: Add more Guardian API, particularly for its laser
722ddff6d PR-1162: Add BlockData#rotate and BlockData#mirror
80998277c PR-1159: Add missing API for explosive minecarts
1fddefce1 PR-1155: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks
20e8a486f PR-1157: Add Player#sendHurtAnimation()

Spigot Changes:
b31949f2 Rebuild patches
2023-04-07 19:39:13 +01:00
Jake Potrebic ad6c14c62e Fix unknown cmd msg for mc namespaced cmds (#9059) 2023-04-06 19:27:41 -05:00
Alex e9f6e7ae8a Properly resync player on Player#setPlayerProfile (#9080)
Currently breaking are potion effects and the XP bar, both are now being resent to make the client know about them again.
2023-04-06 18:21:33 -05:00
Shane FreederandOwen1212055 f5677aa472 Fix TPS command output (#9091)
* Fix TPS command output

* Cleanup + rebase

---------

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-04-06 18:08:44 -05:00
Lulu13022002 3c8c22323f Fix some broken block place logic (#9094)
- The dispensed shulker will not play the place sound (due to its logic been removed)
- The hanging sign text editor cannot be cancelled using the BlockPlaceEvent (not consistent with the other regular signs)
- The jukebox logic hasn't been synced with the RecordItem
2023-04-06 17:39:32 -05:00
Jake Potrebic dab4864a11 [ci skip] add workflow for auto-managing issue board (#8958)
* add workflow for auto-managing issue board

* make concurrency depend on the issue number

* generate token in the action
2023-04-06 14:19:06 -07:00
Warrior 9b77660f07 Port airplane's use array for gamerule storage patch (#9087) 2023-04-06 14:18:45 +02:00
Shane Freeder 9367e6e6b3 Prevent GameEvents being fired from unloaded chunks 2023-04-06 12:42:10 +01:00
BlockyTheDev e6ef1bae88 [ci skip] Update download urls (#9100) 2023-04-04 17:06:59 -07:00
Harry Devane 497b91939c Fix ignoreCancelled having no effect on events registered by direct EventExecutor (#9099) 2023-04-04 22:40:31 +01:00
Lulu13022002 641dafd0a8 Cleanup some patches (#9093) 2023-04-04 11:47:16 +02:00
Shane Freeder 08491449ae Do not send expired keys to players on login (#9090)
This patch will prevent sending expired keys to players when logging into a server, while the client does have some grace period to prevent issues, if a key has expired beyond the grace period, connecting clients will be disconnected from the server upon join. The client should update keys before this key even expires, and a new key will be broadcasted out if we somehow actually get one.
2023-04-03 10:45:02 +01:00
Jake Potrebic 9893e2b734 Deprecate ChatColor (#9069)
All API that uses it is deprecated
2023-04-02 11:53:29 -07:00
elmital 1d2fe64da8 fix: null SpawnReason for new player (#9015) 2023-04-02 13:37:53 -05:00
Cody 50e683de14 Added a config option for ticking markers (#9034) 2023-04-02 13:21:13 -05:00
Jake Potrebic dc08c74cb3 Remove duplicate animate packet for records (#8600) 2023-04-02 13:05:30 -05:00
Owen 5fb3ab0109 Allow non player entities in scoreboards by default (#9082)
This in general caused much more confusion than needed, and in general, made rather negligible performance gains on collision.
2023-04-02 12:53:11 -05:00
Fejby 1704bf782e [ci skip] Edit Paper download link in README (#9077) 2023-03-31 18:25:50 +02:00
powercas_gamer 7a96bf2095 Make debug dump file names consistent (#9075) 2023-03-31 13:17:57 +02:00
Shane Freeder 11ab383e4f Don't use plugin-profiling to enable timings
The paper config has taken precidence over this for a long time
with 0 complaints, and now it's tripping the deprecation warning,
even if timings is disabled in the paper config.
2023-03-31 05:47:59 +01:00
Lulu13022002 06fdc02537 [ci skip] Correct upstream/paper javadoc (#8286) 2023-03-30 21:09:13 -07:00
Nassim Jahnke bf92f3e4db Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9153f77e PR-841: Remove incorrect ClickType.CONTROL_DROP from ClickType#isShiftClick
bceda6ab PR-840: Adjust annotations in Display entity interface
a6b85ac3 PR-835: Add Jukebox#hasRecord() and #startPlaying(), clarify #setRecord()

CraftBukkit Changes:
e142fb9fd SPIGOT-7188: ChunkSnapshot biome y coordinate doesn't match chunk biome y coord
eff1743b9 SPIGOT-7313: More accurately edit data on Jukeboxes
2023-03-30 15:40:15 +02:00
Riley Park cbcdfd03e7 Make other link in deprecation message clickable too 2023-03-29 19:35:26 -07:00
Jake Potrebic ef5fa90932 Fix crash relating to bad recipes in furnace-like tile entities (#9011) 2023-03-30 03:29:38 +01:00
Riley Park a13759afcc Turn deprecation message into a Component to be used in the command at a later date 2023-03-29 19:15:21 -07:00
Riley Park 32875b429a 8948: Nag when timings is enabled or a plugin creates a new Timing 2023-03-29 12:30:37 -07:00
Jake Potrebic 5c78e77da5 Fix api checking banned ips (#9026) 2023-03-27 20:23:34 -07:00
Nassim Jahnke 9940019ff8 Deprecate public Timings classes for removal (#8949) 2023-03-27 19:58:46 -07:00
Ryan ce2a36dbd6 Fix PluginMeta#getDisplayName (#9038)
* fix plugin versioning

* fix properly

* fix version command

* ngl idk where my logic was behind this
2023-03-27 19:56:09 -07:00
Jason bd62f2c2dd Fix chat messages being logged without formatting to console (#9058) 2023-03-27 10:19:23 -07:00
Jake Potrebic fbf74ba0ac Updated Upstream (CraftBukkit) (#9053)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
f92c94517 SPIGOT-7310: PlayerToggleSneakEvent is not called when a player sneaks while riding an entity
b5714184d SPIGOT-7316: Cancelling EntityUnmountEvent does not stop the all effects of the unmounting
e237f8c88 SPIGOT-7312: Entity#setVisibleByDefault on player causes skin reset on this player client
2023-03-26 13:29:41 -07:00
Jake Potrebic a622ebacd4 Fix beehives generating from using bonemeal (#9052) 2023-03-26 12:07:32 -07:00
Emily d5abb94e69 Expose Path to jar file in PluginProviderContext (#9030)
* Expose Path to jar file in PluginProviderContext

* rename accessor, reword jd
2023-03-24 23:30:48 -07:00
Jake Potrebic 38be4f873b Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9018)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2c64d8c4 SPIGOT-7309: Add API for jukebox inventories
a6d7e4ca PR-826: Add Sniffer API

CraftBukkit Changes:
93813509b SPIGOT-7309: Add API for jukebox inventories
2d5209e8d PR-1153: Handle teleport reason in spreadplayers command
f5b61387e SPIGOT-7308: Fix NullPointerException when calling Jukebox#setRecord()
388d458a6 SPIGOT-7306: Fix reset of coords in default teleportTo in EntityPlayer
40b87e1af PR-1150: Add Sniffer API and handle EntityItemDropEvent

Spigot Changes:
6ad4b93c SPIGOT-7298: Fix debug stick always permission left click toggle
2023-03-24 13:38:40 -07:00
Jake Potrebic a0f548f5ec Don't warn for deprecated PrepareGrindstoneEvent (#9036) 2023-03-24 13:19:17 -07:00
Jake Potrebic 23b0ef524a [ci skip] rebuild patches 2023-03-23 14:57:03 -07:00
Riley Park 9087a644a3 chore: cleanup annotations in api adventure patch 2023-03-23 10:51:08 -07:00
Nassim Jahnke 92f872c146 Fix bad diff in wandering trader spawn rate patch from .4 update 2023-03-23 14:35:17 +01:00
Jake Potrebic e8b82590d0 [ci skip] Properly document firing of Entity/BlockExplodeEvent (#9014) 2023-03-20 02:11:23 -07:00
Jake Potrebic 7af4cd3647 Updated Upstream (Bukkit/CraftBukkit) (#9013)
* Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
150a2861 PR-827: Add BlockData#getPlacementMaterial
58c9c8ce SPIGOT-7301: Prevent creating non-openable inventories
3741079b PR-824: Expand upon PotionEffect API to better accommodate infinite durations

CraftBukkit Changes:
e5a7921f0 PR-1149: Add BlockData#getPlacementMaterial
58504fa61 SPIGOT-7302: Fix more issues with EntityDamageByEntity - Fix Projectile damage by dispenser - Fix cases where only exists a direct entity damager
48394703d Increase outdated build delay

* Improve docs for BlockData#getPlacementMaterial
2023-03-20 01:47:10 -07:00
Jake Potrebic c7520ec49d Use class loggers without the fqn for non-debug logging (#9012) 2023-03-20 09:23:52 +01:00
JOO200 ff603cb76d adventure: make calls with generic component lists more usable (#9008)
This should allow the usage of ItemStack#lore and other methods with a List<TextComponent>
2023-03-20 09:18:06 +01:00
Jake Potrebic 7929540ba3 update paperclip to 3.0.3 2023-03-19 22:18:33 -07:00
Jake Potrebic 83948f6f59 Fire reload event after everything has been reloaded (#9003)
This event is going to be more important very shortly (hopefully)
2023-03-19 12:28:28 -07:00
Jake Potrebic eb0950290d Fix entity damage event triggers (#8995) 2023-03-19 11:58:34 -07:00
Jason 662b85e00e Use random UUIDs instead of incrementing long for click callback ids (#9007) 2023-03-19 11:25:45 -07:00
Emily 510082222b Re-enable multi-release plugin JARs (#9001) 2023-03-19 15:50:13 +01:00
Jake Potrebic 055f7228f0 Add back optimize hoppers (#8999) 2023-03-18 12:03:42 -07:00
Nassim Jahnke 2a024870de Fix setItem with air on chiseled bookshelves 2023-03-18 18:52:24 +01:00
Jake Potrebic 11f5158eaa Fix SpawnEggMeta#get/setSpawnedType (#8907) 2023-03-18 10:32:03 -07:00
Jake Potrebic 5730a94208 Updated Upstream (Bukkit/CraftBukkit) (#8991)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2b4582fb SPIGOT-5916: getLastColors does not work with the rgb colors

CraftBukkit Changes:
f7707086d SPIGOT-7299: Fix indirect/anvil damage events and minor improvements
2023-03-18 10:05:04 -07:00
Owen 79db3a2a4b Add Shearable API (#6796) 2023-03-17 16:11:08 -05:00
Jake Potrebic 02bc2eca34 Fix reobf creating unintentional overrides (#8992) 2023-03-17 19:23:15 +01:00
Jake Potrebic 85a67dadf2 Fix certain inventories returning null Locations (#8985) 2023-03-16 11:47:05 -07:00
XanderDeKeijzer 646f590779 Fix changeGameModeForPlayer to use gameModeForPlayer MC-259571 (#8987) 2023-03-16 17:06:40 +01:00
Nassim Jahnke 5a1e1584aa Fix text display error on spawn
Fixes #8984
2023-03-16 16:28:48 +01:00
Nassim Jahnke fe881073af Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2651717c SPIGOT-7292: Support for alpha channel in Color and a few improvements

CraftBukkit Changes:
dbc32ffa0 SPIGOT-7292: Support alpha channel in Display entities
cef8bd993 SPIGOT-7294: Call EntityDamageEvent for Interaction entity
2023-03-16 10:07:12 +01:00
Jake Potrebic 4f933b2405 Fix structure loading 2023-03-15 18:57:33 -07:00
Jake Potrebic a2918a5fea Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
3a54fb16 SPIGOT-7296: Add ItemFlag#HIDE_ARMOR_TRIM

CraftBukkit Changes:
55056ad80 SPIGOT-7295: Fix Sniffer data defined in incorrect position
2023-03-15 12:59:34 -07:00
Nassim Jahnke 9b0e97b75b Update DataConverter 2023-03-15 20:19:36 +01:00
Owen eb0232ef09 Camel EntityToggleSitEvent (#8970) 2023-03-15 15:37:41 +01:00
Nassim Jahnke 73cf1257ca Update adventure to 4.13.0 2023-03-15 13:21:52 +01:00
Jake Potrebic 647cf31e61 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fdef9473 Correct Material#isFuel for new experimental materials
42811598 SPIGOT-7293: Add Biome#CHERRY_GROVE

CraftBukkit Changes:
968d28df0 Fix availability of experimental datapack features in unit tests
2023-03-15 04:54:45 -07:00
Nassim Jahnke 3bc992d8f2 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
e1fc95c50 Fix crash with 1.20 smithing table
04dfb921d Fix crash with juke boxes
1264a6fb5 Fix crash with composters
2023-03-15 10:33:43 +01:00
Jake Potrebic 72a9f8a9b8 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
02ff2f89 SPIGOT-7292: Deprecate display color APIs while specifics are worked out

CraftBukkit Changes:
703575fc7 SPIGOT-7291: Fix spurious invert in ender pearl disconnect check
2023-03-14 22:27:45 -07:00
Jake Potrebic 92a019385d HIDE_UPGRADES and fixes for sniffer and new smithing table 2023-03-14 20:04:41 -07:00
Jake Potrebic 28d49a1b58 Fix jukeboxes 2023-03-14 19:17:28 -07:00
Jake Potrebic 2c485d1485 Fix composter throwing UOE with new game event 2023-03-14 18:27:20 -07:00
Jake Potrebic ffab9f2bc1 Add back item entity global player list check 2023-03-14 17:36:12 -07:00
Jake Potrebic 482dfc2db0 make tests work again 2023-03-14 17:21:35 -07:00
Jake Potrebic b93379bd7f Add missing annotation 2023-03-14 17:08:41 -07:00
Jake Potrebic 3e54639d9c readd exploded block state patch 2023-03-14 17:06:28 -07:00
Jake Potrebic c225146bc9 Add component methods to TextDisplay entity 2023-03-14 16:52:28 -07:00
Jake Potrebic 94604b6474 Fix icon in timings 2023-03-14 16:44:53 -07:00
Jake Potrebic dbeef458b2 make tests pass 2023-03-14 16:29:38 -07:00
Jake Potrebic 0f17027652 fix more compile errors 2023-03-14 16:10:18 -07:00
Jake Potrebic 72923817d6 fix some compile errors 2023-03-14 15:13:41 -07:00
Nassim Jahnke 7954d96905 One fix 2023-03-14 22:35:03 +01:00
Nassim Jahnke 7d24f2ef06 Applied all patches 2023-03-14 22:29:14 +01:00
Nassim Jahnke 18d51375b8 More more more more more more more more patches 2023-03-14 22:10:53 +01:00
Nassim Jahnke 1295869b43 More more more more more more more patches 2023-03-14 21:58:00 +01:00
Jake Potrebic bacf389fc3 Use adventure serializer when serializing an adventure component in a codec (#8967) 2023-03-14 21:27:18 +01:00
Nassim Jahnke 9dccea73fb More more more more more more patches 2023-03-14 21:25:13 +01:00
Nassim Jahnke 0f5c422d24 More more more more more patches 2023-03-14 20:54:57 +01:00
Jake Potrebic f4c92b410c Add more experimental annotations 2023-03-14 12:53:01 -07:00
Nassim Jahnke 0e2d6d6550 More more more more patches 2023-03-14 20:24:52 +01:00
Nassim Jahnke bdeb519d1b More more more patches 2023-03-14 19:59:51 +01:00
Jake Potrebic 562e74263b update adventure docs link in bungeecord-chat javadocs 2023-03-14 11:59:28 -07:00
Jake Potrebic 8149f115ef update reobf-mappings-patch.tiny 2023-03-14 11:47:04 -07:00
Nassim Jahnke 9a731dc325 More more patches 2023-03-14 19:38:47 +01:00
Jake Potrebic cf4eac0a17 mark experimental api correctly and add missing isFuel 2023-03-14 11:08:41 -07:00
Nassim Jahnke 2b6be6f1b3 More patches 2023-03-14 19:05:23 +01:00
Nassim Jahnke 2cd29ddbb5 API 'done' 2023-03-14 18:21:11 +01:00
Nassim Jahnke 2ed604cf72 Start working on 1.19.4 2023-03-14 18:11:24 +01:00
Jake Potrebic 155aa36d89 Properly handle load before plugins in legacy loading (#8962) 2023-03-12 11:00:02 -07:00
Moulberry 18470db17f Fix getTargetEntity not targeting creative players (#8960) 2023-03-12 12:50:02 +00:00
Jake Potrebic 4e994669d3 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8874)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
6b3c598b PR-814: Add a method to send multiple equipment changes
181a984b Update Maven shade version to align with CraftBukkit
a5a36e32 Revert "Update Maven shade version to align with CraftBukkit"
7a8f4a42 Update Maven shade version to align with CraftBukkit
58327201 Add support for Java 20

CraftBukkit Changes:
b56426c7a PR-1142: Calculate explosion damage separately for each affected EntityComplexPart
fbe3410af PR-1140: Add a method to send multiple equipment changes
8434e3633 Add support for Java 20
c998a1d23 Increase outdated build delay
4a929b5d6 SPIGOT-7267: Fix EntityType#getTranslationKey() and add unit test
086d8dc8a SPIGOT-7268: CraftMetaPotion reads ShowParticles and ShowIcon properties incorrectly
8ba5e399e SPIGOT-7262: Improve visibility API

Spigot Changes:
a2190e30 Rebuild patches
2023-03-10 12:18:50 -08:00
Owen 4d7269e07c Correctly Remove Classloaders, Avoid Loading Providers in /paper dumpplugins, Fix library lookup (#8938) 2023-03-06 18:20:11 -06:00
Owen bf2053a156 Fix Player#setPlayerProfile (#8939) 2023-03-06 17:15:25 -06:00
Jake Potrebic 27c05030e5 Correctly handle ArmorStand invisibility (#8944) 2023-03-06 10:17:03 -08:00
Jake Potrebic 5cc78f2b6f Use configured log prefix for spigot library loading (#7934) 2023-03-05 11:02:52 -08:00
Noah van der Aa 6f57163e4a Add CompostItemEvent and EntityCompostItemEvent (#6356) 2023-03-05 11:59:48 -06:00
Noah van der Aa 75280ef51c Fix cancelling EntityDeathEvent for Armor Stands killed by players (#6478) 2023-03-05 11:48:34 -06:00
Jake Potrebic 541753be25 Fix HumanEntity#drop not updating the client inventory (#6761) 2023-03-04 14:57:02 -08:00
Lulu13022002 e5e75dd008 Include previous spawn angle in SpawnChangeEvent (#8606) 2023-03-04 16:42:10 -06:00
Lulu13022002 f2075c4d3c Take in account waterlogged block for the event (#8623)
There's some inconsistencies between the EntityChangeBlockEvent and the BlockDestroyEvent. The destroy event has always the right final type but the change block event has always air even for waterlogged blocks. This fix this behavior only for possible case to avoid a bigger patch.
2023-03-04 16:35:26 -06:00
Lulu13022002 3dcf4e4198 Add EntityFertilizeEggEvent (#8041) 2023-03-04 16:23:32 -06:00
Owen d30cda1273 Add TeleportFlags (#8855)
Abstracts relative teleport flags and instead makes a generic TeleportFlag option. This has the benefit of being able to easily add new flags in the future.
This adds a new flag, which allows you to keep inventories open when teleporting players (vanilla behavior).

These are breaking changes to the teleport api, however, it's still marked as experimental so I find this a fair change.
2023-03-04 16:07:23 -06:00
Moros 8a815a0eae Fix rendering for translatable death messages (#8534) 2023-03-04 15:56:38 -06:00
Glare 4151f752f1 /paper entity list QOL improvements (#8876)
This PR implements a QOL feature to /paper entity list <entity> where it will allow a user to teleport to chunk.
2023-03-04 15:35:07 -06:00
Jason Penilla a172880e7d Update ForgeFlower to 2.0.627.2, fixes dev bundle not applying with Java 19 runtime 2023-03-04 12:01:07 -07:00
Jake Potrebic e57441254d Replace ConfiguredStructure api with Structure (#8642) 2023-02-28 08:36:01 -08:00
Viktor Hrekh f408c253ec Log message if plugin bootstrap provided external plugin instead of throwing an exception (#8914) 2023-02-28 13:17:49 +01:00
Warrior dead691e8c Fix MC-157464 Prevent sleeping villagers moving towards food (#8923) 2023-02-28 13:14:17 +01:00
Lulu13022002 5170d6f159 Update the flag when a captured block state is outdated (#8860) 2023-02-28 13:13:59 +01:00
Emily b670798876 Close plugin jar file on classloader close and after retrieving name for updating (#8902) 2023-02-28 12:34:33 +01:00
Nassim Jahnke 4ae202eb82 Fix getBlockStateIfLoaded world bounds check
Closes #8922
2023-02-28 12:27:38 +01:00
Jake Potrebic 08e6622b81 fix runServer tasks 2023-02-27 16:30:33 -08:00
Jason 83a1304b37 [ci skip] Update Gradle wrapper to 8.0.1 (#8924) 2023-02-27 15:30:04 -07:00
Nassim Jahnke ad3e1bc121 Don't log or die on cyclic dependencies of Spigot plugins 2023-02-27 12:09:10 +01:00
Chris 9256248567 [ci skip] Update README and CONTRIBUTING (#8917)
Grammar fixes and other updates
2023-02-26 12:37:41 -07:00
Jason 16fc1a175e Make PluginProviderContext#getLogger return ComponentLogger, remove PluginProviderContext#getSLF4JLogger (#8921) 2023-02-26 12:13:15 -07:00
Jake Potrebic fc072c0954 Fix forced respawn with respawn anchor (#8845) 2023-02-26 09:38:42 -08:00
SoSeDiK 2f953a8843 Additional ExplosiveMinecart API (#8896) 2023-02-26 08:01:43 -08:00
Noah van der Aa e2b8e6b548 chore: update adventure documentation url in javadocs (#8912) 2023-02-26 08:00:55 -08:00
Jake Potrebic ed44f69c9b Fix NamespacedKey#equals not accepting other Key types (#8919) 2023-02-26 06:59:52 -08:00
Owen 81d7ff6e31 Properly re-add providers when reloading (#8881) 2023-02-23 12:58:50 -05:00
Nassim Jahnke 88367398d9 Update adventure doc links 2023-02-23 17:55:36 +01:00
Nassim Jahnke c7a82c1a50 Clean up hopper optimization patch 2023-02-23 17:37:56 +01:00
Lulu13022002 50eacd3c04 Avoid duplicate game event on initial fill (#8887) 2023-02-23 10:37:28 +01:00
Jake Potrebic 6b7764327c Fix chat messages logged in console (#8872) 2023-02-23 10:37:18 +01:00
Jake Potrebic ce2b6b2bcb Properly log any Throwable on plugin class creation (#8897) 2023-02-23 10:36:45 +01:00
Jakubk15 062028941f Do not send plugin headers when it is not required (#8889) 2023-02-22 17:59:42 -06:00
Bjarne Koll 87bb3e6f4c Close library classloader and improve PluginDescriptionFile (#8901) 2023-02-22 21:54:27 +01:00
Jake Potrebic a9ab68427c Fix update folder logging error when no folder exists (#8891) 2023-02-22 21:17:58 +01:00
Owen 60b83fee1e Validate providers when populating load order tree (#8890) 2023-02-22 10:59:12 -05:00
Jake Potrebic bb63a6156d Fix JavaPlugin static getPlugin methods (#8888) 2023-02-21 21:27:49 -06:00
Jake Potrebic ddc0a99f52 Further clarify functionality of damageItemStack methods (#8878) 2023-02-21 09:35:25 -08:00
Space Walker 8b37e9e2aa update alternate current to v1.5.0 (#8882) 2023-02-21 17:58:18 +01:00
Bjarne Koll d9699b5935 Configure mokitor Server mock as stubOnly (#8861)
A recent patch moved the internal unit tests to mokito, allowing
deep mocking to easily setup a mocked server instance.
While this change is useful, the server's Server#getItemFactory methods
is one of the hottest paths during unit testing, being called numerous
times by material tests.
As mokito mocks keep track of each invocation to allow for verifications
of invocations down the line, the server mock allocates a huge amount of
memory to keep track of all invocations, ultimately leading to an OOM
exception.

The previous solution solved this by increasing the tests memory to 2 GB,
however as of right now simply configuring the server mock as "stubOnly",
properly prevents the overflow of invocation records as none of the unit
test code relies on invocation verification.
2023-02-21 17:18:49 +01:00
Owen 8427c88987 Redefine Cyclic Dependencies (#8873) 2023-02-20 19:09:38 -06:00
0e4f2cc527 Small paper plugin fixes (#8866)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-02-20 13:02:53 -05:00
Nassim Jahnke 8c4e81184b Update circular dependencies warning, properly crash
Also fixes logging errors
2023-02-20 15:20:49 +01:00
Owen 7baf427e90 Fix plugin updater logic, allow null update directory (#8864) 2023-02-19 12:17:51 -06:00
Owen 841da90501 Paper Plugins (#8108) 2023-02-19 08:57:10 -06:00
Jake Potrebic f9dc371fd8 Fix calling UnknownCommandEvent (#8232) 2023-02-16 18:07:30 -08:00
Jason 8fced9d5ab [ci skip] Update paperweight to 1.5.1 (#8856) 2023-02-16 09:03:25 -07:00
Shane Freeder 27516ee39e Temp fix for EntityType.translationKey
Upstream improperly used the enum name for looking up the vanilla entity
type to get the translation key; temp patch this until upstream fixes this,
also add some quick validation
2023-02-16 03:22:57 +00:00
Jake Potrebic 5c87711301 Make sure Registry is loaded after Bukkit.setServer() (#8853) 2023-02-15 15:00:22 -08:00
Jake Potrebic 03a4e7ac75 Updated Upstream (Bukkit/CraftBukkit) (#8832)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
37262de8 PR-812: Add Registry#match(String)
d6b40162 SPIGOT-4569: Add more BlockData API
f9691891 PR-809: Throw a more clear error for BlockIterators with zero direction, add Vector#isZero()
91e79e19 PR-804: Added methods to get translation keys for materials, itemstacks and more
426b00d3 PR-795: Add new BiomeParameterPoint passed to BiomeProvider#getBiome
0e91ea52 SPIGOT-7224: Add events for brewing stands and campfires starting their actions

CraftBukkit Changes:
a50301aa5 Fix issues with fluid tag conversion and fluid #isTagged
6aeb5e4c3 SPIGOT-4569: Implement more BlockData API
7dbf862c2 PR-1131: Added methods to get translation keys for materials, itemstacks and more
7167588b1 PR-1117: Add new BiomeParameterPoint passed to BiomeProvider#getBiome
7c44152eb SPIGOT-7224: Add events for brewing stands and campfires starting their actions
2023-02-15 14:10:14 -08:00
Jake Potrebic afe633df08 convert API/server tests to mockito (#8848)
* convert API tests to mockito

* convert server tests to mockito

* add co-author
2023-02-15 13:27:40 -08:00
brickmonster f2f9e8cc4d Remove patch that was made obsolete by vanilla (#8847) 2023-02-13 18:52:27 +01:00
TM (Holly) 8d1acf68ed Call PlayerReadyArrowEvent for when items in the offhand are used (#8842) 2023-02-13 10:36:25 +01:00
Jake Potrebic bb05fcf4ca Add missing isFuel Material entries (#8843) 2023-02-12 13:02:01 -08:00
Lulu13022002 bd77b78e4f Fix desync of honeycomb when the event is canceled (#8713) 2023-02-11 12:14:03 -05:00
Andreas Prues 7e7e6b4bab More Win Screen API (#8805)
Adds methods to get and set whether a player has seen the win screen before.
2023-02-11 09:55:45 -06:00
SamB440 de38a45c34 Add projectile hit simulation API (#8816)
This adds API to force a projectile to hit a provided entity. Example usage could be if you have a player disguised as another entity, you could simulate an arrow colliding with the (fake) entity hitbox.
2023-02-11 09:41:06 -06:00
Matt Artist afa16e6b64 Modify offline mode warning to include Velocity line (#8812)
This adds a check to the offline-mode warning to see if Velocity is enabled. If it is enabled then it warns the user to make sure to secure their server and links to the Velocity documentation on that.
2023-02-10 17:10:11 -06:00
Nassim Jahnke 5eca9642e1 [ci skip] Rebuild patches 2023-02-09 18:45:15 +01:00
Drex 0c9ace8f78 Add AntiXray layered obfuscation mode (#8799) 2023-02-09 18:38:00 +01:00
Piotr Pasztor 0c3311c3b2 Add Entity Body Yaw API (#8822) 2023-02-09 18:31:51 +01:00
Emily 39aef524ee Fix Tick::addTo/::between causing SOE (#8824) 2023-02-09 18:30:30 +01:00
Martijn 96fd31b762 Fix chunk sending when the computed time overflows (#8833) 2023-02-09 18:27:24 +01:00
Nassim Jahnke 7569191fed Send disguised chat for vanished players 2023-02-09 18:15:21 +01:00
Jake Potrebic 57f1157871 Updated Upstream (Bukkit/CraftBukkit) (#8823) 2023-02-07 07:55:53 -08:00
Jake Potrebic b9b4c9a314 Deprecate duplicate API for arrow stuck count (#8829) 2023-02-07 07:43:20 -08:00
Jake Potrebic 4da844f1e3 Fix force-opening enchantment tables (#8820) 2023-01-27 13:01:36 -08:00
Jake Potrebic 9147456fc9 Updated Upstream (CraftBukkit/Spigot) (#8815)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
ab8ace685 SPIGOT-7236: Bone meal doesn't increase use statistic
7dcb59b8e Avoid switch on material in previous commit

Spigot Changes:
19641c75 SPIGOT-7235: World.Spigot#strikeLightningEffect doesn't do anything
2023-01-27 12:52:04 -08:00
Josh Roy 18fabc08d5 Remove CraftItemStack#setAmount null assignment (#8807)
This creates a problem with Paper's item serialization
api where deserialized items, which are internally
created as a CraftItemStack, will be completely lost if
#setAmount(0) is invoked (since the underlying handle
is set to null), while a regular Bukkit ItemStack
simply sets the amount field to zero, retaining the
item's data.

Vanilla treats items with zero amounts the same as items
with less than zero amounts, so this code doesn't create
a problem with operations on the vanilla ItemStack.
2023-01-24 15:30:51 +01:00
Aya b1b19b67f2 [ci skip] Fix PiglinBarterEvent JavaDoc (#8795) 2023-01-22 19:33:21 +01:00
Andreas Prues b082d8970b Win Screen API (#8802) 2023-01-22 14:21:45 +01:00
Aya 2eca2a27b0 Add Player#sendEquipmentChange(Map) API (#8800) 2023-01-22 14:00:37 +01:00
Bjarne Koll 42fecd0a5f Correctly shrink items during EntityResurrectEvent (#8780)
The EntityResurrectEvent logic is supposed to locate a totem of undying
in any of the interaction slots of the player inventory and then, if the
called EntityResurrectEvent is not cancelled, shrink that item by 1,
usually reducing it to zero.

For this, the logic iterates over the items in the interaction slots and
breaks out the loop if a totem of undying was found.
However, even if no totem of undying was found, the iteration item stack
variable remains as a refernce to the last interaction slot probed.

Plugins uncancelling a EntityResurrectEvent, which is published
pre-cancelled to listeners if no totem of undying could be found,
would hence cause the server logic to shrink completely unrelated items
found in, at the writing of this patch, the players off hand slot.

This patch corrects this behaviour by only shrinking the item if a totem
of undying was found and the event was called uncancelled.
2023-01-19 23:09:08 +01:00
Nassim Jahnke 0ed4b9148b Revert executor in authentication thread pool back to original patch 2023-01-18 17:20:24 +01:00
alex6777 567ff90111 Don't clone location in PreCreatureSpawnEvent (#8790) 2023-01-16 16:03:58 +01:00
Nassim Jahnke ec9dba85db Update netty to 4.1.87 2023-01-14 19:53:32 +01:00
froobynooby 5aee09dd28 Fix entity types not appearing in timings (#8786) 2023-01-14 01:03:13 +00:00
Jake Potrebic 171934562b Fix some explosion damage not scaling with difficulty (#8767)
Fixes https://github.com/PaperMC/Paper/issues/8735
2023-01-11 17:10:45 -08:00
Corey ShupeandNassim Jahnke 7a64b85f92 Fix player chat messages from vanished players resulting in kicks (#8777)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2023-01-10 14:01:42 +01:00
Jake Potrebic 8e08d9b023 Fix treasure map config for loot tables (#8739) 2023-01-10 13:09:19 +01:00
byquanton 92c1a3e392 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
79e39671 SPIGOT-7034: Add methods for set/get instrument in Goat Horn

CraftBukkit Changes:
4768df736 SPIGOT-7034: Add methods for set/get instrument in Goat Horn
941d7e954 SPIGOT-7225: FireworkMeta#getPower() can throw a NullPointerException for items with no power set
2023-01-09 21:46:23 +00:00
Jason fb90721a94 [ci skip] Automatically close PRs from master branches on opening (#8779) 2023-01-09 14:43:54 -07:00
Jake Potrebic 214a8c54a4 Use single player info update packet on join (#8773) 2023-01-08 18:46:54 -08:00
Hannes Greule 035f9d7157 Fix items never falling after being on ground (#8768) 2023-01-07 13:05:13 +01:00
Nassim Jahnke a0b59cad77 [ci skip] Update paperweight to 1.4.1 2023-01-06 09:43:31 +01:00
Nassim Jahnke b29e07bebd [ci skip] Fix instrument reference in item specific hide flag docs 2023-01-05 20:28:43 +01:00
Bjarne Koll f88384efb3 Persist paper lootable on entities (#8762) 2023-01-05 11:59:10 +01:00
Nassim Jahnke 940c9a3493 Replace ItemFlag.HIDE_POTION_EFFECTS (#8765) 2023-01-05 11:54:21 +01:00
Hannes Greule de5b1da681 Fix operator precedence bug (#8756) 2023-01-03 14:42:58 +01:00
Jake Potrebic 51cfcc88da Updated Upstream (Bukkit/CraftBukkit) (#8740)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
d352d965 SPIGOT-7221: Add Enemy (Entity) interface

CraftBukkit Changes:
397c5557c SPIGOT-7221: Add Enemy (Entity) interface
a0d3dfaf2 PR-1129: Fix state corruption while handling explosion damage on EntityComplexPart
d67777f8b SPIGOT-7218: Player's outer layer of skin disappears after respawn
2023-01-01 12:17:40 -08:00
Lulu13022002 ddd8745d14 [ci skip] Fix hoglin conversionTime javadoc (#8734) 2022-12-30 15:08:02 -05:00
Owen 8d7d92709d Return 0 if null for FireworkMeta (#8738) 2022-12-30 11:33:41 -06:00
Jake Potrebic 90750a6591 Rework filtering spawn egg and tile entity nbt config (#6613) 2022-12-27 18:59:15 -08:00
SoSeDiK fa42c68b73 Expose pre-collision moving velocity to VehicleBlockCollisionEvent (#8457) 2022-12-27 16:56:19 -06:00
TreyRuffy 2040c1ec71 Player Flying Fall Damage API (#5357) 2022-12-27 14:41:59 -06:00
Jake Potrebic 52718dba10 Updated Upstream (Bukkit/CraftBukkit) (#8714)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
aef9b6d2 PR-800: Add support for NoteBlock sounds in Skulls

CraftBukkit Changes:
ae8f5fc02 PR-1125: Add support for NoteBlock sounds in Skulls
0a1c89e4b SPIGOT-7212: Allow negative firework power
909a246af SPIGOT-7211: generateTree() with Consumer or Predicate is broken
c810c3ed8 Increase outdated build delay
2022-12-26 09:53:35 -08:00
Jake Potrebic 78a91dfb48 Fix (again) Player#getPlayerProfile no such method error (#8722) 2022-12-26 13:34:23 +01:00
Owen 1975fbe368 Respect SpigotConfig logCommands & fix stopDancing() NPE (#8715) 2022-12-25 22:22:08 -06:00
Jake Potrebic 3331501f8e Use team display name for quit message (#7127) 2022-12-25 08:57:54 -08:00
Owen f26e9ccdd0 Tadpole lock API (#8297) 2022-12-23 14:50:32 -06:00
aerulion 47abd1c50c Add EntityPushedByEntityEvent (#7704) 2022-12-23 13:59:11 -06:00
TehBrian e6f61f715d fix ArmorStandMeta not applying false flags (#8632) 2022-12-23 11:30:42 -06:00
Noah van der AaandBillyGalbreath 5717b84708 Add config option for spider worldborder climbing (#6448)
Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
2022-12-23 10:51:24 -06:00
Noah van der Aa c59922d94e Expose signed message in chat events (#8694) 2022-12-23 09:54:04 -06:00
Jake Potrebic 8e83c3c7b4 Deprecate ProjectileCollideEvent (#8678)
replaced by ProjectileHitEvent
propagated the cancellation of the legacy event
to the modern one
2022-12-22 21:20:44 -08:00
Lulu13022002 e05ba9866d Avoid to spam the transform event for hoglin->zoglin conversion (#8712) 2022-12-22 14:39:07 -08:00
Jake Potrebic 048ee5872d Fix OfflinePlayer getPlayerProfile return type (#8710) 2022-12-21 20:30:21 -08:00
Nassim Jahnke 7b52db5f61 Fix buffer-joins-to-world patch 2022-12-21 22:55:42 +01:00
Jake Potrebic 94373f0143 Fix OfflinePlayer#getPlayerProfile returning deprecated type (#8543) 2022-12-20 10:56:33 -08:00
Jake Potrebic c1bca9ad34 Add exploded block state to BlockExplodeEvent (#6818) 2022-12-19 21:09:51 -08:00
Nassim Jahnke d5f1ffc2e6 Remove somewhat broken patch
With the new chunk system it doesn't hurt too much to (temporarily) remove this until implemented in a safer manner
2022-12-19 11:46:55 +01:00
Lulu13022002 e498ddaa61 Add missing EntityChangeBlockEvent (#8696)
* Add missing EntityChangeBlockEvent

* Fix duplicate empty bottle when canceled for creative player

* Use native update impl instead of craftbukkit -> nms
2022-12-17 10:20:14 -08:00
Jake Potrebic f7a13449e2 Improve PortalEvents (#8679) 2022-12-17 09:36:02 -08:00
Thomas Meaney cf3115158c [ci skip] Fix readme badge (#8693) 2022-12-17 08:53:49 +00:00
Jason Penilla f3eb2c70e0 Fix reobf issue in previous commit 2022-12-17 00:46:46 -07:00
Jason 86ed0d596a ChatProcessor fixes (#8690)
Fixes handling for `ForwardingAudience.Single` and passes the signed message to non-native `Audience` types
2022-12-16 23:05:48 -07:00
Jake Potrebic 44dc5a4c26 Don't call lock check event if the block entity doesn't exist (#8687) 2022-12-16 13:31:51 -08:00
Jake PotrebicandBillyGalbreath aa9c200ea1 Fix metrics reporting unknown paper version (#8683)
Co-authored-by: BillyGalbreath <Blake.Galbreath@GMail.com>
2022-12-16 09:37:06 -08:00
Jake Potrebic 39d3a03bff Fix Player#chat for 1.19.3 (#8684) 2022-12-16 09:15:21 -08:00
Jake Potrebic 262c08f64f Updated Upstream (CraftBukkit) (#8680)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
2ed3e3e6e SPIGOT-7210: Fix structures in custom worlds
585ab5ba1 SPIGOT-7207: WorldCreator creates world as super flat even when normal is specified
2022-12-15 17:16:34 -08:00
Jakub Žáček 28c7d40326 Add Sneaking API for Entities (#8485) 2022-12-15 11:43:14 -08:00
Jake Potrebic 0262de0ddb Deprecate TargetBlock/EntityInfo and assocated methods (#7381) 2022-12-15 09:10:03 -08:00
Jake Potrebic 3aec8630bb Add BlockLockCheckEvent (#7840) 2022-12-15 08:49:49 -08:00
Nassim Jahnke 20503beee5 Remove guardian beam render issue workaround
Messing with game time sent to the client isn't worth the trouble whenever it may be used by the client now and in the future for such a small issue. Mojang, plz fix
2022-12-15 14:19:09 +01:00
Jake Potrebic eec64a4e05 Fix explosion yield with new gamerules (#8674) 2022-12-14 20:01:31 -08:00
Jake Potrebic 7789bc5afa Improve some logging and errors (#8673) 2022-12-14 19:54:43 -08:00
Jake Potrebic 66437d059f Add more breakNaturally functionality (#7379) 2022-12-14 19:37:16 -08:00
Jake Potrebic 1c535f96ac Remove deprecated event warning for inventory result event (#8672) 2022-12-14 15:09:11 -08:00
Jake Potrebic c97581978a Fix inconsistencies in dispense events regarding stack size (#8653)
* Fix inconsistencies in dispense events regarding stack size

The javadocs for BlockDispenseEvent suggest the ItemStack is a single
item which is being dispensed. Before this fix, sometimes it was the whole
stack before a single item had been taken. This fixes that so the stack size
is always 1.

* Ensure stack size is correct in minecart and armor dispense behaviors
2022-12-14 13:05:11 -08:00
Jake Potrebic c919e944ff Updated Upstream (Bukkit/CraftBukkit) (#8663)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f50ad1f8 PR-798: Add PrepareGrindstoneEvent and refactor related events to use PrepareInventoryResultEvent
0cac7963 SPIGOT-7204: Add TeleportCause#DISMOUNT
b4dd47b0 SPIGOT-7202: Deprecate removed door effects

CraftBukkit Changes:
ab1586c2f PR-1123: Add PrepareGrindstoneEvent
b402824ea SPIGOT-7204: Add TeleportCause#DISMOUNT
06a6a1012 PR-1121: Add unit test for spawn egg meta
c18668be3 SPIGOT-7192: Call PlayerInteractEvent with Action.LEFT_CLICK_AIR if the entity interacted is hidden to the player
47124f639 Increase outdated build delay
645993470 SPIGOT-7201: Spawner ItemMeta not working as expected
2022-12-13 21:03:57 -08:00
Jake Potrebic adb8e499db Fix fire charge not being consumed igniting a creeper (#8652) 2022-12-13 09:23:05 -08:00
Jason Penilla 3822cc891d Update paperweight to 1.4.0 2022-12-13 10:09:15 -07:00
SoSeDiK 0148283131 Fix locateNearestBiome nullability check (#8662) 2022-12-13 16:01:54 +01:00
Jake Potrebic 326a65e427 [ci skip] add missing final newline (#8659) 2022-12-13 14:16:45 +01:00
EpicPlayerA10 1845cec507 Fix death message containing empty string (#8656)
Resolves: #8654
2022-12-13 13:24:59 +01:00
Jake Potrebic d2cb347f71 Fix items equipped on AbstractHorse losing NBT (#8647)
* Fix items equipped on AbstractHorse losing NBT

* squash later mc fix into vanilla patch
2022-12-11 15:22:56 -08:00
Jake Potrebic eeeb8d5adc Add the non-flammable wood item tag (#8648) 2022-12-11 13:01:18 -08:00
Noah van der Aa a5ecfd6c30 [ci skip] Correct chat preview removal version in javadoc (#8646) 2022-12-11 18:34:31 +00:00
Jake Potrebic d8cf30dfd1 Deprecate isPreview method in decorate events (#8645) 2022-12-11 09:55:39 -08:00
Jason Penilla 0bdbcd9d56 [ci skip] Remove non-functioning patch 2022-12-10 21:40:18 -07:00
Jake Potrebic 1143b63663 Add Position (#7639)
* Add Position

* move Position patch to start
2022-12-10 16:50:32 -08:00
Jake Potrebic ecfb76a73a Fix empty effect clouds from lingering potions (#8641) 2022-12-10 14:52:37 -08:00
Lulu13022002 7d18c6b4ac Don't show particles when splash events are canceled (#8637) 2022-12-10 13:27:36 -08:00
Jake Potrebic 5bd8e1c191 Fix MapLike Codec missing key 'selector' (#8634)
* Fix MapLike Codec missing key 'selector'

* Make sure a new instance is created each time
2022-12-10 09:04:27 -08:00
Nassim Jahnke 7ba81b14dd [ci skip] Fix leaf'd patch names 2022-12-10 17:49:00 +01:00
Nassim Jahnke be50d5bcc3 Readd BlockBehavior inlining patch 2022-12-10 17:24:01 +01:00
Lulu13022002 812efd3826 Fix chunksnapshot biome getter (#8639) 2022-12-10 14:11:39 +01:00
Lulu13022002 075fb67c78 Add eating regain reason for Camels (#8638) 2022-12-10 14:07:35 +01:00
Nassim Jahnke 7e5f85ea31 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
4fa7e1c31 SPIGOT-7200: CreatureSpawnEvent is called with incorrect SpawnReason when using spawn eggs
2022-12-10 14:04:02 +01:00
Owen ec772bb8b8 Rabbit API (#8627) 2022-12-09 18:56:13 -06:00
Jake Potrebic 5e6ac3c46e Properly identify golem spawn reason (#8635) 2022-12-09 16:37:03 -08:00
Amaury Rousseau 0baf2ff1b9 [ci skip] Allow .git to be a regular file (#8631) 2022-12-09 16:33:00 +00:00
Jake Potrebic f6ffbc2720 Readd improve/fix EntityTargetLivingEntityEvent (#8630) 2022-12-09 12:30:55 +01:00
Jake Potrebic 20549ff2d7 Add new 1.19.3 fires of EntityInsideBlockEvent (#8629) 2022-12-09 02:46:47 -08:00
Nassim Jahnke 4d270892ec [ci skip] Thank you gradle, very cool 2022-12-09 11:12:15 +01:00
Nassim Jahnke d32f569f07 [ci skip] Update gradle wrapper 2022-12-09 11:07:41 +01:00
Jake Potrebic b4a8f14a67 last instrument fix, I promise 2022-12-09 02:03:06 -08:00
Jake Potrebic 2ad5f6f66b couple more instrument/note fixes 2022-12-09 01:49:15 -08:00
Jake Potrebic 9495a33cc9 fix Instruments 2022-12-09 01:34:39 -08:00
Jake Potrebic c7c3cf1dd7 Mark experimental api as such (#8628) 2022-12-09 10:13:22 +01:00
Owen df1f4ac26d Update adventure (#8625) 2022-12-09 10:11:28 +01:00
Jake Potrebic 53eb820c6b update reobf-mappings-patch.tiny 2022-12-08 18:21:29 -08:00
Jake Potrebic f29ab144be fix method rename issue in Camel 2022-12-08 18:17:06 -08:00
JasonandJake Potrebic f97bb11e4b Account for splash water bottles now extinguishing entities (#8622)
* Account for splash water bottles now extinguishing entities

* improvements and javadocs

* reorder patches

* rename event to WaterBottleSplashEvent

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-12-08 16:33:22 -08:00
Owen b2043f1c3a Deprecate PluginLoader and impls (#8619) 2022-12-08 22:27:37 +01:00
Jake Potrebic b8d33f406e fix a few structure seed configs 2022-12-08 12:15:18 -08:00
Jake Potrebic 244a523df3 readd missing structure set seeds patch 2022-12-08 11:06:54 -08:00
Jake Potrebic 6120bc9206 properly handle xray bypass perm 2022-12-08 10:35:33 -08:00
Jake Potrebic 9bace84b44 check now succeeds 2022-12-08 10:23:12 -08:00
Jake Potrebic 49f57cc170 fix some tests and DoNotUse violations 2022-12-08 09:47:29 -08:00
Nassim Jahnke 93ee9e63c9 Readd fixes for SpawnReason API patch 2022-12-08 17:51:06 +01:00
Jake Potrebic 5256716ffb fix ChatProcessor 2022-12-08 08:32:29 -08:00
Nassim Jahnke 12fee1cf81 Update Velocity modern forwarding reading 2022-12-08 12:16:44 +01:00
Nassim Jahnke 4074d4ee99 Fix bad AT 2022-12-08 12:00:10 +01:00
Nassim Jahnke dcc290167f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
dea9ce0a SPIGOT-7198: Add Sittable interface to Camel

CraftBukkit Changes:
eecb4c0dc SPIGOT-7196: Exception loading alternate worlds
0ff61e8fa SPIGOT-7198: Add Sittable interface to Camel
676441aac PR-1121: Handle additional missing SpawnEggs in MetaSpawnEgg
e85280e02 Handle missing SpawnEggs in MetaSpawnEgg

Spigot Changes:
d90018e0 SPIGOT-7199: NPE loading or creating world with custom chunk generator
2022-12-08 11:53:14 +01:00
Jake Potrebic 66a288b4f4 fix some startup issues 2022-12-08 00:52:08 -08:00
Jake Potrebic 04801b7982 fix more compile issues 2022-12-07 22:11:20 -08:00
Jason Penilla 4a3753dbb1 more compile fixes 2022-12-07 21:24:59 -07:00
Jason Penilla 0b291cccce compile fixes 2022-12-07 20:24:00 -07:00
Noah van der Aa 7aa90a8535 More 1.19.3 registry fun (#8618) 2022-12-07 23:49:41 +00:00
Shane Freeder 7414739946 Disable ATs from unapplied folder 2022-12-07 23:25:00 +00:00
Owen e21c1b41a7 Properly resend entities (#8617) 2022-12-07 23:11:44 +00:00
Nassim Jahnke 0f275cc228 Fix MCVersions 2022-12-07 23:29:30 +01:00
Noah van der Aa be9a0677b1 Add missing spawn eggs: Electric Boogaloo (#8616) 2022-12-07 23:10:51 +01:00
Nassim Jahnke 93507a8e41 Almost all patches 2022-12-07 23:05:32 +01:00
Nassim Jahnke f8430d1de7 More patchidy patched patch patches 2022-12-07 22:57:15 +01:00
Noah van der Aa f207880ec8 Fix a handful of 1.19.3 compile issues (#8615) 2022-12-07 22:36:56 +01:00
Nassim Jahnke 4710881e40 More patchidy patched patches 2022-12-07 22:35:34 +01:00
Nassim Jahnke 5b6d903302 More patchy patched patches 2022-12-07 22:05:01 +01:00
Nassim Jahnke d0620624d7 Patching patched patched patches 2022-12-07 21:16:54 +01:00
Nassim Jahnke 7f3d2ff503 Patching patched patches 2022-12-07 20:22:28 +01:00
Nassim Jahnke dfab659e53 Moar, fix API 2022-12-07 19:52:24 +01:00
Nassim Jahnke 0edb5458e5 Patching patches 2022-12-07 19:32:25 +01:00
Nassim Jahnke 4d6f28bab3 Patches 2022-12-07 18:53:34 +01:00
Nassim Jahnke 4fbe8d0b9b First server patches 2022-12-07 18:08:55 +01:00
Nassim Jahnke fd58a696cb API patches 2022-12-07 17:46:46 +01:00
Jake Potrebic 476ef25d05 Add missing Fluid type (#8608) 2022-12-06 10:41:04 -08:00
Noah van der Aa b07d5e0aca Limit pet look distance (#8612) 2022-12-06 19:10:58 +01:00
Shane Freeder 407a445aac Fix dumplisteners missing folder creation 2022-12-06 04:02:44 +00:00
Yannick Lamprecht 96fdafd935 Player Entity Tracking Events (#4722) 2022-12-03 16:46:38 -06:00
Jake Potrebic ec6a9a3e47 Updated Upstream (Bukkit/CraftBukkit) (#8604)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
38866413 SPIGOT-6765: Pass WorldInfo, Random and coordinates to ChunkGenerator should methods

CraftBukkit Changes:
f3dab3a48 SPIGOT-7191: TNT minecart explosions crash the server
b5aa0bed9 SPIGOT-7184: ExplosionPrimeEvent not called for ExplosiveMinecart
e7aab5493 SPIGOT-6765: Pass WorldInfo, Random and coordinates to ChunkGenerator should methods
2022-12-03 10:19:09 -08:00
Bjarne Koll 425baed78f Fully deserialise persistent anger post async load (#8560)
The modified patch prevents entity loading off the main thread when
entities are initially loaded.

However, the initial loading of an entity is not the only time the
Entity#readAdditionalSaveData method is called. Commands like /data also
invoke the method (through Entity#load) to update an entities data
without completely re-creating it.

This however breaks with the current patch, as the patch moves parts of
the entity lookup for persistent anger deserialisation into the first
tick of an entity (which obviously is only called once and hence not
re-run when an already ticking entity is modified as laid out above).

This change actively runs the now split logic for deserialisation again
if the entity has already ticked its first tick. This way, initial
deserialisation is still split into one off thread and the first tick
parts, but following main thread deserialisations can happen completely
inside Entity#readAdditionalSaveData is called.
2022-12-02 18:09:41 +01:00
Jake Potrebic c40f8d59a9 Sync offhand slot in menus (#7341) 2022-12-01 13:01:49 -08:00
Jake Potrebic 41ab602f47 [ci skip] couple more fixes for build pr jar label (#8599) 2022-11-30 12:45:27 -08:00
Jason Penilla 54daefa0ca Fix whitespace error in recent patch 2022-11-28 11:10:26 -07:00
Lulu13022002 8796175d79 Handle legacy quirk in the console formatter (#8434) 2022-11-28 14:41:29 +01:00
Denery 309133e2e1 Fix preemptive connection dropping during shutdown process (#8546) 2022-11-27 11:20:31 -06:00
sandtechnology 28b4027d45 Fix packet duplicating at some points (#8566)
Due to the weakly consistent of ConcurrentLinkedQueue iterator, at some points, packet will be resent twice times or more, causing some weird behaviors (e.g. kicked for illegal movement since the same ClientboundPlayerPositionPacket was sent two times). This changes for the patch add a flag for marking if the packet was consumed to prevent such issue and ensure consistently of the packet queue.
2022-11-27 10:36:35 -06:00
Jason f1583fcd74 Add /paper dumplisteners tofile and increase detail of command output (#8592) 2022-11-26 10:36:11 -07:00
Ján Villim 21b964af4e Added ability to control player's insomnia and phantoms spawning (#6500) 2022-11-26 10:59:04 -06:00
Owen f59c802697 Schoolable Fish API (#7089) 2022-11-25 20:21:40 -06:00
SoSeDiK 4048d3ec68 Allow using degrees for ArmorStand rotations (#7847) 2022-11-25 19:42:30 -06:00
Noah van der Aa 9f7eef81fd Friction API (#6611) 2022-11-25 18:23:12 -06:00
Kezz 44bb5992ce Add Tick TemporalUnit (#5445) 2022-11-25 15:05:42 -06:00
Jake Potrebic d98c370fb5 Add displayName methods for advancements (#8584) 2022-11-24 23:05:48 -08:00
Jake Potrebic 414ea80d74 ItemStack damage API (#7801) 2022-11-24 22:52:00 -08:00
Jake Potrebic f637b1a0a7 Fix async entity add due to fungus trees (#7626) 2022-11-24 22:32:29 -08:00
Jake Potrebic b4beac0c9d Fixes potential issues arising from optimizing getPlayerByUUID (#8585) 2022-11-24 22:22:19 -08:00
Amy 185fa48ac4 Fix chest relooting mechanics (#8580) 2022-11-25 00:21:40 +01:00
Jake Potrebic b8919a7cc1 pr command action fixes (#8591) 2022-11-23 19:14:41 -08:00
8aff07afb0 Add /paper dumplisteners command (#8507)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: TwoLeggedCat <80929284+TwoLeggedCat@users.noreply.github.com>
2022-11-23 16:28:38 -06:00
Lulu13022002 da230d521c More vanilla friendly methods to update trades (#8478) 2022-11-23 15:38:49 -06:00
Jake Potrebic 716843890a [ci skip] Rework workflows to support optional paperclip build (#8583) 2022-11-23 11:19:31 -08:00
Jake Potrebic e6e37ba5d7 Add api to resolve components (#7648) 2022-11-22 20:53:50 -08:00
Shane Freeder 55a16d8581 Fix Varint21FrameDecoder cached length buf usage 2022-11-22 17:50:31 +00:00
Lulu13022002 3ab194e185 Avoid a cubed max search distance for POIs (#8576)
The max search distance used to get the closest Poi data on X/Z axis is cubed
instead of squared (one time in the parameter and another time in the function)
for almost all search.
Generally this has been hidden by another check that already does a pre
distance check between the poi pos and the source pos for individual
component but the issue still happens for diagonal distance search.
Discovered by Samsuik
2022-11-21 16:02:21 +01:00
Jakub Žáček a7df847aad Add Player Warden Warning API (#8470) 2022-11-20 12:53:58 -06:00
Jason 4a3ae59535 [ci skip] Add check for git repo (#8578) 2022-11-20 11:26:20 -07:00
Jake Potrebic b95d4b28b8 Moving ATs from the at file to individual patches (#8573) 2022-11-19 15:53:20 -08:00
Noah van der Aa 76503f8887 Strip coordinates from lodestone compasses (#8561) 2022-11-19 15:41:09 -06:00
Owen 0a6f100a2a Add more collision code skipping logic (#7581) 2022-11-19 15:14:19 -06:00
Fruxz 32998864c7 [ci skip] Add TheFruxz to the license MIT list (#8575) 2022-11-19 21:20:21 +01:00
Lulu13022002 8f498dc19a Sync chunk load command improvements (#8554) 2022-11-19 14:10:13 -05:00
William Blake Galbreath 669fed4b57 Fix MC-179072 (#8421) 2022-11-19 12:23:31 -06:00
Fruxz 825cb4390c [ci skip] Add .fleet/ folder to .gitignore (#8574) 2022-11-19 14:33:03 +01:00
Melncat b4c1ae645f Fix MC-121048 (#8429)
This moves the setHealth call to below the recordDamage call to prevent
recordDamage from clearing the CombatTracker, since recordDamage will
clear the CombatTracker if the entity is dead. This fixes death messages
such as the "doomed to fall" messages.
2022-11-18 22:04:52 -06:00
Lulu13022002 84b5d4a352 Reorder bukkit damage source entity for explosion (#8553) 2022-11-18 20:14:52 -06:00
Jake Potrebic 215111213b Fix/improve Affects Spawning API (#7329) 2022-11-15 11:15:01 -08:00
Jake Potrebic e22dacf4d2 update yarn param mappings (#8563) 2022-11-12 12:57:41 -08:00
braindead 7955bcc87b fix MC-252817 (green map markers do not dissappear) (#8545) 2022-11-12 13:16:25 -06:00
Jake Potrebic 564356d1e0 ensure reset EnderDragon boss event name (#8562) 2022-11-12 10:34:14 -08:00
Owen 5f4952fbce Cleanup reputation API + back with an EnumMap instead of array (#8258)
Resolves: #7142
2022-11-12 18:41:22 +01:00
Noah van der Aa 112fa18bac Show exception when headless JRE detection is triggered (#8559) 2022-11-12 13:09:54 +01:00
Owen 117579c6bb Add PrePlayerAttackEntityEvent (#8369)
Allows you to cancel player event attacking, preventing things like attack sounds from being played.
2022-11-09 22:05:58 -05:00
Jake Potrebic e6ee4cdffe Updated Upstream (CraftBukkit) (#8548) 2022-11-09 16:05:46 -08:00
Shane Freeder 3ac1a8d708 Cleanup misc import from last commit 2022-11-06 22:46:23 +00:00
Shane Freeder 3e9f39faa2 Prevent compass from loading chunks 2022-11-06 22:37:34 +00:00
Owen df5fb9475b Properly resend entities (#7041) 2022-11-05 13:50:16 -05:00
Jason 2b47227e38 Update Commodore modifications (#8542)
* Handle ldc insn for getOriginalOrRewrite in Commodore

* Remove fastutil rewrite

It's no longer relocated upstream
2022-11-04 22:16:57 -07:00
Jake Potrebic 3d15120f7e Fix Advancement#getDisplay() api break (#8541) 2022-11-04 15:59:15 -07:00
Astro Angelfish 8ee344f18e [ci-skip] Rename Paper stop tp Paper end. (#8539) 2022-11-04 16:08:01 +00:00
Jake Potrebic ab1c072320 Remove old redundant fix (#8530) 2022-11-03 14:03:31 -07:00
Lulu13022002 ebc0f6bfb5 Call PlayerLaunchProjectileEvent for trident (#8027) 2022-11-03 19:43:50 +01:00
Shane Freeder e30b082262 Fix setting difficulity inside of API (Fixes #8533)
Vanilla moved some logic around setting the world difficulty which
was not adopted for inside of upstream properly, this addresses another
such case
2022-11-01 18:29:52 +00:00
Jason Penilla 4a9c9b3fb0 Build updates 2022-10-31 15:25:30 -07:00
Denery 93b2246851 Fix EntityCombustEvent cancellation issues (#8529) 2022-10-31 17:31:40 +01:00
Jake Potrebic b3b04f2ca1 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8515)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9a4de097 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of

CraftBukkit Changes:
f43634ae4 SPIGOT-7170: Cannot set slots in custom smithing inventory
48f3a2258 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of
30e31b4d1 SPIGOT-7177: Certain blocks don't call BlockCanBuildEvent
982364797 SPIGOT-7174: Avoid adding air to CraftMetaBundle

Spigot Changes:
6198b5ae PR-122: Add missing parentheses to pumpkin and melon growth modifier
1aec3fc1 Rebuild patches
2022-10-30 19:44:25 -07:00
Noah van der Aa 13cf5461d4 Fix pumpkin growth modifier (#8517) 2022-10-30 13:27:37 +01:00
Owen aaf5e3997f Deprecate unused VehicleEntityCollisionEvent methods (#8498) 2022-10-29 12:18:17 -05:00
William Blake Galbreath b743144a12 Fix MC-147659 (#8423) 2022-10-27 19:53:16 -05:00
Hannes Greule 8a4b752fe2 Fix wrong descriptor in ASMEventExecutorGenerator (#8506) 2022-10-27 19:27:33 -05:00
Nassim Jahnke 304ab35e82 [ci skip] Remove old todo file 2022-10-27 22:25:19 +02:00
Owen c26401863e [ci skip] Undo modification to removed patches in latest commit (#8512) 2022-10-27 15:03:11 -05:00
Jason 8acb05d567 Make CommandSyntaxException implement ComponentMessageThrowable (#8513) 2022-10-27 10:10:28 -07:00
Jason 0249750b8f Fix EntityArgument suggestion permissions to align with EntitySelector#checkPermissions (#8511) 2022-10-26 18:31:55 -07:00
Jake Potrebic 32d95e9bab Track projectile source for fireworks from dispensers (#8044) 2022-10-26 17:44:28 -07:00
Jake Potrebic 954e6f00f3 Fix a bunch more forceDrops for dropping items (#8095) 2022-10-26 17:32:03 -07:00
Noah van der Aa 2432233d24 Add allow server listing & text filtering client options (#7595) 2022-10-26 18:09:03 -05:00
Lulu13022002 36869ccd90 Fix new block data in EntityChangeBlockEvent for silverfish when mobGriefing isn't enabled (#8099) 2022-10-26 17:05:15 -05:00
Pedro 7b3b5938fd [ci skip] Update checkout action in workflow (#8510) 2022-10-26 16:44:55 +01:00
Spottedleaf 25cd3eee99 Add dirty flag to chunk tick lists
For whatever reason, vanilla does not mark the chunk as
dirty when changing its tick lists.

We also have it return dirty if the time since the last
save has changed, since it would affect the tick offsets
in the ticklist.
2022-10-24 20:51:48 -07:00
Spottedleaf fc5ae5be82 Fix incorrect handling of mustNotSave
CB used the dirty flag to construct the chunk unload event,
but then sets mustNotSave to the inverted value of the event
after calling the event without considering that the chunk may
actually be brought up to loaded status again later. Then, CB
overrides the isUnsaved method of LevelChunk to additionally
use mustNotSave.

Thus, if the chunk is not marked dirty when unloading, the
mustNotSave value will be set to true. Then, once the chunk
is reloaded and edited the dirty flag will be set. However,
when unloading the chunk finally, the isUnsaved method
will return false due to mustNotSave being true. Thus, the
chunk will never be saved.

To fix these issues, no longer make mustNotSave override
isUnsaved and always set the save flag for the chunk unload
event.

This issue started popping up recently due to the recent
change to mark chunks as not dirty after saving them, which
increased the chance of the save issue occurring in the first
place.
2022-10-24 19:34:03 -07:00
Jason 519cb4b214 Move classes added to net.minecraft.server to paper packages (#8500) 2022-10-24 12:43:46 -07:00
evan 1c1aeb20e2 Only limit global sounds to same world if limiting radius (#8499) 2022-10-23 20:52:40 +02:00
Jake Potrebic 44ce9b3e9c Updated Upstream (Bukkit/Spigot) (#8445) 2022-10-23 10:41:34 -07:00
Spottedleaf b8131a09b2 Mark chunks as saved after saving them
Prevents re-saving them again later.
2022-10-23 09:09:18 -07:00
Owenanddannyball710 05bd9d67b7 Ignore impossible spawn tick (#8493)
Co-authored-by: dannyball710 <dannyball710@gmail.com>
2022-10-22 23:45:07 -05:00
Owen 0b8f40cf6a Don't fire EntityToggleSitEvent on deserialization & reorder some api patches (#8495) 2022-10-22 21:55:28 -05:00
Owen 6665076342 Add Moving Piston API (#7019) 2022-10-22 19:37:37 -05:00
SoSeDiK d713b47b14 Add EquipmentSlot convenience methods (#8477) 2022-10-22 18:50:12 -05:00
uku 4e67c73b03 Add config setting for grindstone overstacking (#8156) 2022-10-22 18:25:17 -05:00
vytskalt 58483c1e18 Add fire-tick-delay option (#8037) 2022-10-22 17:57:09 -05:00
IEatBeans 6ea5aa37bd Added EntityToggleSitEvent (#7579)
* Added EntityToggleSitEvent Patches

* Updated event phrasing, fixed Boolean not being primitive, pandas now fire event, and event is defined and called in 1 line

* Updated event phrasing, fixed Boolean not being primitive, pandas now fire event, and event is defined and called in 1 line

* Added EntityToggleSitEvent Patches

* Added EntityToggleSitEvent Patches

* Added EntityToggleSitEvent Patches
2022-10-22 17:20:52 -05:00
thelooter 3d50709776 Add MaterialTags for the different Types of Tools (#8049)
* Add MaterialTags for the different Types of Tools

* Add Netherite Tools Tag
2022-10-22 16:51:34 -05:00
Lukas AltandOwen1212055 5cdb5f9585 Optimized dirt and snow spreading (#5124)
* Optimized dirt and snow spreading

* Add optimization to bukkit event call

* Clarify var names

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2022-10-22 13:13:59 -05:00
Lukas Alt 60da35e359 fixed entity vehicle collision event not called (#5053) 2022-10-22 12:09:45 -05:00
Noah van der Aa 7187cab3b6 Detect headless JREs (#8491)
Crashes caused by the missing AWT dependency come up in the support channels fairly often.
This patch detects the missing dependency and stops the server with a clear error message,
containing a link to instructions on how to install a non-headless JRE.
2022-10-22 11:57:21 -05:00
Noah van der Aa a163a96a8d Load Allay duplication cooldown as a long (#8410)
It is saved as a long, and the API exposes a long, so loading it as an int may cause issues like overflows.
2022-10-22 16:16:24 +02:00
Pedro eb494184a8 [ci skip] Update workflow dependencies (#8489) 2022-10-22 14:13:05 +02:00
Jason 3dcfec4499 Add stacktrace deobfuscation in more places (#8484) 2022-10-18 19:21:07 -07:00
Spottedleaf f7da209586 Fix inconsistent isChunkLoaded calls
When we update the chunk state to border, it should be
the case that isChunkLoaded returns true and that
getChunkIfLoadedImmediately returns a non-null value.
Now add the chunk to the loaded map before making any
callbacks after updating to border state.
2022-10-18 08:11:23 -07:00
Nassim Jahnke e1d4b26a62 Fix another case of missing chat headers 2022-10-18 10:20:35 +02:00
Melncat ed2c88ba89 Add LivingEntity knockback API (#8479) 2022-10-18 09:33:58 +02:00
Jakub Žáček 7d64d7ce77 Add converted Slot number to PlayerInventorySlotChangeEvent (#8482) 2022-10-18 09:32:22 +02:00
SoSeDiK 236a29623c Add LivingEntity#swingHand(EquipmentSlot) convenience method (#8456) 2022-10-16 13:49:56 +02:00
Jakub ŽáčekandJakub Zacek ec00f991a4 Fix package for PlayerInventorySlotChangeEvent (#8475)
Co-authored-by: Jakub Zacek <dawon@dawon.eu>
2022-10-16 08:49:47 +01:00
19MisterX98 603df98897 FIx bedrock patterns (#8474) 2022-10-16 00:34:10 +02:00
Lexi b560034488 Avoid usages of RecipeChoice#getItemStack() (#8453)
Replaces some internal usages of this method with RecipeChoice#test(ItemStack) and deprecates every other method still utilizing this legacy method.
2022-10-15 21:20:12 +02:00
SoSeDiK eb68bd49a2 Allow changing bed's 'occupied' property (#8458) 2022-10-14 10:37:01 +02:00
Lulu13022002 0bdf9973cd Avoid cycle deprecation (#8466) 2022-10-13 13:52:04 +02:00
Lulu13022002 2094011485 Update settings directory path in exceptions (#7968) 2022-10-13 13:38:06 +02:00
SoSeDiK 514a60647d Elder Guardian appearance API (#8455) 2022-10-13 12:26:51 +02:00
Shane Freeder 7fe34e9508 Make CraftMinecartTNT public
adding the getHandle method causes some issues with things like ProtocolLib
due to the expectation that all classes which provide a getHandle method
are public.
2022-10-12 16:10:52 +01:00
Jake Potrebic b9cf1ac580 Fix a classloading issue in tests (#8459) 2022-10-11 20:05:28 -07:00
Jason Penilla f7c8d79667 Fix stacktrace in server tests 2022-10-11 16:52:49 -07:00
Jakub Žáček de2d2d4d94 Add PlayerInventorySlotChangeEvent (#7321) 2022-10-11 22:49:10 +01:00
Owen 6b26cfcd31 Add missing Entity + Projectile API (#7632) 2022-10-11 22:04:26 +01:00
SoSeDiK b097a241c0 Expose isUnderWater to Entity (#8454) 2022-10-11 14:43:10 +02:00
Jake Potrebic 57555b8c6a Add missing structure set seed configs (#8030) 2022-10-09 22:19:35 +02:00
Jake Potrebic c389b1c408 Fix configs that relied on outdated min/max y levels (#6986) 2022-10-09 08:52:09 +02:00
Jake Potrebic 77a50b95da Add Unmodifiable annotations to getDrops methods (#8440) 2022-10-07 20:51:54 +02:00
Warrior 60c973e461 Exempt players in creative/spectator from nether ceiling damage (#8427) 2022-10-07 20:43:26 +02:00
Jake Potrebic bcb4220b5f Correctly handle interactions with items on cooldown (#8008) 2022-10-07 17:22:45 +02:00
Jake Potrebic ff67f1fa18 EntityPickupItemEvent fixes (#8096) 2022-10-04 21:38:39 -07:00
Jake Potrebic 9d63b070a1 Fix custom piglin interest items (#8097) 2022-10-04 20:28:46 -07:00
Nassim Jahnke ad3d35751a Remove unnecessary onTrackingStart during nav warning
Closes #8396
2022-10-03 20:50:53 +02:00
Gero 15e1748fd5 Avoid resizing of ArrayList in ChunkMap#getPlayers (#8416) 2022-10-03 19:22:01 +02:00
Nassim Jahnke 011caa4d8e [ci skip] Minor patch cleanup 2022-10-03 19:07:03 +02:00
Friwi 616db7118d Fix nothing mlg (#8432) 2022-10-03 18:44:19 +02:00
Nassim Jahnke 928bcc8d3a Updated Upstream (Bukkit/CraftBukkit) (#8430)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
09943450 Update SnakeYAML version
5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc
6f82b381 PR-788: Add getHand() to all relevant events

CraftBukkit Changes:
aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe
5329dd6fd PR-1107: Add getHand() to all relevant events
93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
2022-10-02 09:56:36 +02:00
TetraTheta ec3cfa9b7f Only create paper.yml-README.txt on config conversion (#8334) 2022-10-02 09:29:09 +02:00
Jake Potrebic ec76e36a4e Fix a handful of vanilla bugs (#8187) 2022-10-01 19:39:42 +02:00
Melncat 6d1409316e Add getDrops to BlockState and isPreferredTool to BlockData (#8284) 2022-10-01 12:30:00 +02:00
Nassim Jahnke e9618f8780 Add system property to dump stack on bad plugin class access (#8417) 2022-10-01 11:49:27 +02:00
Remynfv 2534e5cbbf Fix other jigsaw related disconnect bug (#8414) 2022-10-01 10:08:07 +02:00
Nassim Jahnke f5fa69173c Don't print full packages in new chunk system classes
Closes #8391, #8412
2022-09-30 23:19:51 +02:00
Pasqual Koschmieder 14c32bc43d Fix wrong yaw and pitch of CommandSourceStack#getBukkitLocation (#8411) 2022-09-30 21:03:42 +02:00
RemynfvandLegitimoose c6d737528d use BlockFormEvent for mud converting into clay (#8398)
Co-authored-by: Legitimoose <legitimoose@gmail.com>
2022-09-30 20:33:31 +10:00
Ilari Suhonen 8d69cfc6ce Reduce allocation rate for checkBlock
Use ObjectOpenHashSet instead of HashSet
Remove unnecessary chunkToSave modification
2022-09-29 09:04:52 -07:00
Spottedleaf 7d3a882670 Do not log throwable for duplicate entity adds 2022-09-29 08:55:47 -07:00
Bjarne Koll 8a7dd61348 Mark parsed PoiChunks with data as not loaded (#8405)
Previously, PoiChunk#empty would create a new empty poi chunk with
loaded already set to true, as no data was contained in the chunk.
This allowed the poi chunk to skip expensive trips to the main thread.

However, PoiChunk#parse used #empty to create the initial PoiChunk
instance that is then filled with data.
This leads to PoiChunks returned from #parse to already be marked as
loaded, preventing the then needed trip to the tick thread to update
things like the village distance tracker.

To fix this, this commit now marks the PoiChunks loaded state as false
if the parse logic actually read and parsed any data.
This allows the PoiChunk#load method to properly run its callbacks when
called for the first time.
2022-09-29 08:54:47 -07:00
F1rsi 017af785ff [ci skip] Added the missing "d" character (#8267) 2022-09-29 15:36:01 +01:00
Remynfv 21661a7557 Fix jigsaw block kicking user (#8404) 2022-09-29 12:37:56 +01:00
Jason 79f2aa3eed Update Velocity natives (#8387) 2022-09-29 12:18:20 +01:00
Shane Freeder bd496d0e0d [ci skip] shuffle patches and rebuild 2022-09-28 04:27:26 +01:00
Nassim Jahnke 1bbd273bbd Fix user auth thread pool queue 2022-09-27 18:00:46 +02:00
Jake Potrebic f7d16f656a Fixes a couple issues with entity spawn reasons (#8390) 2022-09-27 01:24:56 +01:00
Nassim Jahnke b58c0cf14a Update snekyaml 2022-09-26 19:47:22 +02:00
Spottedleaf 01a13871de Rewrite chunk system (#8177)
Patch documentation to come

Issues with the old system that are fixed now:
- World generation does not scale with cpu cores effectively.
- Relies on the main thread for scheduling and maintaining chunk state, dropping chunk load/generate rates at lower tps.
- Unreliable prioritisation of chunk gen/load calls that block the main thread.
- Shutdown logic is utterly unreliable, as it has to wait for all chunks to unload - is it guaranteed that the chunk system is in a state on shutdown that it can reliably do this? Watchdog shutdown also typically failed due to thread checks, which is now resolved.
- Saving of data is not unified (i.e can save chunk data without saving entity data, poses problems for desync if shutdown is really abnormal.
- Entities are not loaded with chunks. This caused quite a bit of headache for Chunk#getEntities API, but now the new chunk system loads entities with chunks so that they are ready whenever the chunk loads in. Effectively brings the behavior back to 1.16 era, but still storing entities in their own separate regionfiles.

The above list is not complete. The patch documentation will complete it.

New chunk system hard relies on starlight and dataconverter, and most importantly the new concurrent utilities in ConcurrentUtil.

Some of the old async chunk i/o interface (i.e the old file io thread reroutes _some_ calls to the new file io thread) is kept for plugin compat reasons. It will be removed in the next major version of minecraft.

The old legacy chunk system patches have been moved to the removed folder in case we need them again.
2022-09-26 01:02:51 -07:00
Bjarne Koll abe53a7eb4 Fix typos in isTickingWorlds API javadocs (#8382) 2022-09-25 01:01:17 +01:00
Lulu13022002 6d630052fd Fix setEggCount method from TurtleLayEggEvent (#8385) 2022-09-24 18:34:20 +02:00
Owen b4c025b92c Fix player desync on dimension change (#8253) 2022-09-24 06:45:13 +01:00
Lulu13022002 62680d5f83 Avoid item meta usage for itemstack enchantment getter (#8373) 2022-09-24 06:19:51 +01:00
willkrobothandShane Freeder 4d52f1d247 Add method isTickingWorlds to Bukkit (#8316)
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>

Also, restores un/loading worlds mid tick. This will not be officially supported API contract that such a routine is safe, and these restrictions may be restored in the future.
2022-09-24 06:19:05 +01:00
Shane Freeder 6736f390a2 Fix mangled patch 2022-09-24 05:48:46 +01:00
willkroboth d3326235f0 Avoid potential place where the world map could be modified after its iterator is created (#8315) 2022-09-24 05:33:20 +01:00
Shane Freeder 3996e6ef29 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c7c11188 SPIGOT-2620: Add Player#sendBlockChanges()
f63d2b44 Improve annotation test on parameters
3372e7b4 SPIGOT-1244, SPIGOT-6860, SPIGOT-6874: Various Javadoc and formatting fixes
a1e8a9ab PR-793: Ignore .checkstyle file generated by Eclipse IDE

CraftBukkit Changes:
c2c39089e SPIGOT-2620: Add Player#sendBlockChanges()
8209158db PR-1113: Ignore .checkstyle file generated by Eclipse IDE

Spigot Changes:
4aa5ead2 Rebuild patches
2022-09-24 02:38:12 +01:00
Jake Potrebic f528f53e81 Correct javadocs on PlayerArmorStandManipulateEvent (#7719) 2022-09-23 06:55:02 +01:00
Lulu13022002 ec0c550482 Call BlockPhysicsEvent more often (#8264) 2022-09-23 06:35:15 +01:00
Lulu13022002 8681503d10 Call EntityChangeBlockEvent for frogs egg (#8136) 2022-09-23 06:32:32 +01:00
Shane Freeder 980c1d1f90 Updated Upstream (Bukkit/CraftBukkit) (#8378) 2022-09-23 06:08:43 +01:00
Jake Potrebic 339e85d491 Updated Upstream (CraftBukkit) (#8376) 2022-09-22 01:20:59 +01:00
Jake Potrebic 9e614e6f9a Fix ground pathfinding (#7683) 2022-09-20 14:06:11 -07:00
ChristopheG 8db45c4312 Copper clear on lightning strike calls EntityChangeBlockEvent (#8126) 2022-09-20 03:35:38 +01:00
Owen ad3dffe715 Respect preventMovingIntoUnloadedChunks for optimized collision checking (#8259) 2022-09-20 03:02:52 +01:00
tahmid-23 f7e68091a0 Fix Pathfinding After World Has Changed (#8068) 2022-09-20 02:39:46 +01:00
Nick Hensel f8742e26cc Also load resources from LibraryLoader (#8335) 2022-09-20 02:07:03 +01:00
Shane Freeder dbc2d60ce0 Make WorldCreator#keepSpawnLoaded return the WorldCreator (Fixes #8321) (#8371)
* Make WorldCreator#keepSpawnLoaded return the WorldCreator (Fixes #8321)

Thought that I fixed this before push/merge, apparently not, hence, fix
the return type and add mitigation for this.

* Fix patch/build

* Rebuild patches
2022-09-20 01:28:22 +01:00
Shane Freeder 470c6388d2 Configurable chat thread limit (#7878) 2022-09-20 01:16:23 +01:00
MelncatandMelnCat ea777c345b Add a consumer parameter to ProjectileSource#launchProjectile (#8374)
Co-authored-by: MelnCat <melncatuwu@gmail.com>
2022-09-20 01:03:59 +01:00
Nex 63cb7472ac Added byte array serialization/deserialization for PersistentDataContainers (#7505) 2022-09-18 05:06:53 +01:00
Lulu13022002 dbda887457 Missing some effect cause (#8307) 2022-09-18 04:46:20 +01:00
Lulu13022002 34777cdcbe Missing eating regain reason (#8244) 2022-09-18 04:24:28 +01:00
Jake PotrebicandShane Freeder b826065a4b fire EntityChangeBlockEvent in more places (#6371)
* fire EntityChangeBlockEvent in more places

* Rebuild patches

Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2022-09-18 04:03:54 +01:00
elmital ef670ebafb EndDragonFight killed statuses should be false for newly created worlds (#8354) 2022-09-18 02:44:06 +01:00
Peter Crawley 05f6a5c005 Limit size of Authenticator Cache Thread Pool (#8360) 2022-09-17 22:58:51 +01:00
Fruxz f5f84ff476 Add custom destroyerIdentity parameter to the sendBlockBreak function (#5840) 2022-09-17 22:27:46 +01:00
Bjarne Koll 751d092af3 Properly close section storage managed files (#8364) 2022-09-17 19:50:01 +01:00
Shane Freeder 36f0c1b3cc Rebuild patches 2022-09-17 04:35:39 +01:00
Jaren 267dd180b6 Stop large look changes from crashing the server (#8326) 2022-09-17 04:30:00 +01:00
karthanistyr 178f035aa7 Restore no-crash behaviour when read-only config file(s) (#8318) 2022-09-17 04:22:17 +01:00
Nassim Jahnke ef0e5a642d Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9ae3f10f SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API
48c0c547 PR-786: Add methods to get sounds from entities

CraftBukkit Changes:
5cc9c022a SPIGOT-7152: Handle hand item changing during air interact event
4ffa1acf6 SPIGOT-7154: Players get kicked when interacting with a conversation
4daa21123 SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API
e5d6a9bbf PR-1100: Add methods to get sounds from entities
b7e9f1c8b SPIGOT-7146: Reduce use of Material switch in ItemMeta

Spigot Changes:
4c157bb4 Rebuild patches
2022-09-12 13:31:45 +02:00
Jake Potrebic 51183af967 Fix console completer/highlighter having invalid source stack (#8346) 2022-09-09 14:25:54 -07:00
Jake Potrebic e51401e764 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8347) 2022-09-09 11:54:00 -07:00
okx-code 36a5f150c5 Allow preventing BlockDestroyEvent from dropping items (#8349) 2022-09-08 17:13:50 +02:00
Spottedleaf 09904fd780 Re-add legacy getChunkAtAsynchronously to ChunkProviderServer
Apparently some plugins use it
2022-09-02 04:42:05 -07:00
Spottedleaf e8c2c3bfda Fix World#refreshChunk not working for chunks in no-tick range
The chunk would not be marked as ticking in this case, so
retrieving the ticking chunk would not work.
2022-09-01 15:39:24 -07:00
SpottedleafandSpottedleaf 046466f3ba Re-arrange most chunk system patches to front (#8338)
* Re-arrange most chunk system patches to front

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2022-09-01 09:51:59 -07:00
Spottedleaf eff22eb054 Ensure players are removed from pendingLogin
Looks like they would not have been removed if they disconnected
during the chunk load, preventing the world from being unloaded.
2022-08-29 06:21:45 -07:00
Spottedleaf aabf676721 Prevent unloading worlds with pending player logins
Logging into an unloaded world isn't going to end well.
This may fix the cases of people seeing errors about regionfiles
being closed, as loading chunks in an unloaded world will cause this
as the regionfile cache is closed but not cleared.
2022-08-26 22:20:27 -07:00
Nassim Jahnke 0bf8790c9c Fix client lag spikes due to client light recalc 2022-08-25 12:59:08 +02:00
José Miguel Moreno a76998d235 Fix plugin loggers on shutdown (#5592)
Potentially this should be merged back into the original logging changes patches
2022-08-21 03:57:17 +01:00
Nassim Jahnke 2da891fcfa Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
0b32cbaa PR-782: ThrownPotion now extends ThrowableProjectile
474238ca SPIGOT-7138: Can't retrieve pixel color from map

CraftBukkit Changes:
cdef8fc72 PR-1097: CraftThrownPotion now extends CraftThrowableProjectile
419010b13 SPIGOT-7112: Mobs added 1.17 and after do not create an EntityTargetEvent properly
e71426201 SPIGOT-7079: Allays don't call EntityTargetEvent on ground items
f80adb8b9 SPIGOT-7138: Can't retrieve pixel color from map
2022-08-17 13:02:35 +02:00
petersv5 4ba43fe02a Grant temporary immunity to hopper minecarts while actively pulling (fixes #8281) (#8282)
Reduce the impact from EAR on hopper minecart based unloaders by making them immune to
EAR while pulling objects. The EAR is still active outside misc activation range when
the hopper minecart is idle, keeping lag low.
2022-08-14 19:41:15 +02:00
Nassim Jahnke 4516aedb43 More ThrownPotion API 2022-08-14 19:12:02 +02:00
Josh RoyandThonk 5bf259115c Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
2022-08-14 13:09:10 -04:00
Pedro db17048325 [ci skip] Show @org.bukkit.UndefinedNullability in javadocs (#8291) 2022-08-14 17:18:39 +01:00
Nassim Jahnke 9592da1f84 Add method to get highest anger level of warden 2022-08-14 10:25:28 +02:00
Nassim Jahnke 0ddd20c6f7 Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
ead719a65 SPIGOT-7136: Cancelling PlayerInteractEntityEvent with the Allay desyncs
8468e167e SPIGOT-7137: StructureGrowEvent isFromBonemeal and getPlayer have incorrect values
d45057c59 SPIGOT-7089: Crash when command blocks attempt to load worlds

Spigot Changes:
450dcaa8 Rebuild patches
2022-08-14 10:03:13 +02:00
Shane Freeder 3f0415b453 Use thread safe Random inside of ServerLoginPacketListenerImpl
Vanilla uses a Random instance which is not thread safe inside of the
constructor for ServerLoginPacketListenerImpl, this is an issue because
instances of that class are created on the network worker threads, which
means that there is a potential (which we have reports confirming) that
multiple users logging on could trip this
2022-08-11 14:38:45 +01:00
TheTuso 7e11afa426 Fix mad cursor addition via API (#8276) 2022-08-11 10:40:19 +02:00
Spottedleaf 2a74071bcb Simple patch changes for chunk system
Major ones soon
2022-08-10 08:07:49 -07:00
Shane Freeder 2cab6963a7 Don't manually send ClientboundPlayerPositionPacket for refreshPlayer
in 1.19, mojang made it so that teleporations validate that an awaiting pos was
set in the server when teleporting, thus we need to ensure that this is set when
sending the player pos, otherwise the player will be kicked when the client sends
back the aknowledgement
2022-08-10 15:01:55 +01:00
Nassim Jahnke 954b3fb7d5 Send signature headers when chat event viewers are modified
Fixes #8275
2022-08-10 09:59:28 +02:00
Owen 22ad9eedec Fix command pool submitting on shutdown (#8272) 2022-08-09 20:51:17 -07:00
Nassim Jahnke e6f8284125 Updated Upstream (Bukkit/CraftBukkit) (#8270)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
d43a1e72 SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots
9d6e4847 SPIGOT-7122: New Allay Methods from 1.19.1

CraftBukkit Changes:
c379a6b4e SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots
051fcced1 SPIGOT-7122: New Allay Methods from 1.19.1
2022-08-09 09:18:08 +02:00
FivePB (Xer) c7e118b394 Update modern forwarding to v3 (#8219) 2022-08-08 16:25:41 +01:00
Owen 78b19f89a4 Separate Command Sending to Separate Thread Pool (#8170) 2022-08-08 12:32:17 +01:00
Josh Roy a47301e40f Fix Player#chat kicking all clients (#8262) 2022-08-08 09:31:10 +02:00
Jake Potrebic 3624637a19 Improve documentation of Inventory#removeItem (#8263) 2022-08-07 23:17:51 -07:00
Jason 0118c0bd79 Improve MojangAPI docs and replace @Deprecated with @ApiStatus.Experimental on draft APIs (#8261) 2022-08-07 13:47:43 -07:00
Jason a15152e96a Allow old behavior for CommandRegisteredEvent (#8249) 2022-08-06 16:22:51 -07:00
Jake Potrebic bef2c9d005 1.19.2 (#8250) 2022-08-05 15:58:34 -07:00
Jake Potrebic 02831e3369 Updated Upstream (Bukkit/CraftBukkit) (#8240)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
caa7c486 SPIGOT-7109: Add WorldBorder#setSize using TimeUnit

CraftBukkit Changes:
1e3bf58cd SPIGOT-7109: Add WorldBorder#setSize using TimeUnit
2022-08-05 16:10:44 +02:00
ChristopheG a311dcecb3 Remove RAW_COPPER and add COPPER_BLOCK in MaterialTags.UNWAXED_COPPER_BLOCKS and MaterialTags.COPPER_BLOCKS (#8237) 2022-08-05 11:57:21 +02:00
Owen 69950d5a6a Block Ticking API (#7202) 2022-08-03 23:14:04 +02:00
ocelotpotpie 18a0337d6e [ci skip] Fix grammatical error in README. (#8189) 2022-08-03 22:51:37 +02:00
Nassim Jahnke 3af906befd Updated Upstream (Bukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
0260da7a PR-776: Fixed javadocs for ItemFlag#HIDE_POTION_EFFECTS
2022-08-03 22:47:15 +02:00
Jake Potrebic ef42d2a575 Fix null profile key breaking nullability contracts for PlayerProfile API (#8233) 2022-08-03 22:46:33 +02:00
Spottedleaf a817697e8a Add async catcher to PlayerConnection internalTeleport 2022-08-03 12:59:54 -07:00
Nassim Jahnke 4a00cee9cc Readd patch to remove invalid signature on login error 2022-08-03 15:25:11 +02:00
Jake Potrebic 7044a9c538 Leave a paper.yml.txt stub pointing to new location (#8090) 2022-08-02 13:24:57 -07:00
Nassim Jahnke c032050ad8 Fix command preprocess cancelling and command changing
When a command with signed arguments is cancelled, message headers need to be sent out. Same thing for when the executed command is changed.
2022-08-02 19:19:16 +02:00
chickeneer e0486ae2cd Fix suggest command message for brigadier syntax exceptions (#8221) 2022-08-02 09:51:21 +02:00
Nassim Jahnke ceef4b9c09 Don't call AsyncTabCompleteEvent from netty IO thread (#8218) 2022-08-01 21:56:28 +02:00
Jake Potrebic dd3e4e7bd6 Initial support for signed messages (#8198) 2022-08-01 12:34:55 -07:00
Nassim Jahnke d60497ebf2 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
ff64962b SPIGOT-7124: MapPalette.getColor(0) returns the wrong color

CraftBukkit Changes:
8f3647242 SPIGOT-7127: /say doesn't work from console
2022-08-01 16:01:20 +02:00
Maddy Miller babffb5a46 Undeprecate and fix Boat#getBoatMaterial (#8217) 2022-08-01 23:02:23 +10:00
Jake Potrebic fd557b7d51 Undeprecate Bed's tile entity interface (#7330) 2022-07-31 11:25:24 -07:00
Jake Potrebic 1f0d70743e Fix issues with CreeperIgniteEvent (#7507) 2022-07-31 10:14:54 -07:00
Riley Park fcb7b73847 [ci skip] remove stale 2022-07-31 09:50:24 -07:00
Owen 307778fc70 Collision API (#6736) 2022-07-31 17:30:34 +02:00
Owen 532dc51d5f Add missing BlockFadeEvents (#8171) 2022-07-30 18:58:37 +02:00
Owen 6ecdbc09c2 Use Worldheight for Activation Ranges (#8061) 2022-07-30 18:47:35 +02:00
Owen 8a08b86f4b Custom Chat Completions API (#8212) 2022-07-30 18:28:24 +02:00
Owen 65f0b2e2e4 Add more needed BlockStateListPopulator Methods (#8021) 2022-07-30 00:28:46 +01:00
Owen b74c4d4587 Warn on plugins accessing faraway chunks (#8208) 2022-07-30 00:16:26 +01:00
Owen b72eafc04d Send block entities after destroy prediction (#8053) 2022-07-29 23:26:41 +01:00
Jake Potrebic e5bbb56ac6 Added 1.19 kick event causes (#8204) 2022-07-29 09:31:02 -07:00
Nassim Jahnke 3b895f36fd Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
401f1ad58 Re-enable outdated build delay
40eaff8a5 SPIGOT-7125: Command execution exceptions are not logged
639814683 SPIGOT-7123: NullPointerException thrown by Player#chat method
2022-07-29 09:11:11 +02:00
stonar96 2acb479b41 [ci skip] Fix xray patch code style (#8196) 2022-07-28 10:30:32 +02:00
Jake Potrebic 4a4ee79cd6 Separate out chat and commands sent via API (#8131) 2022-07-27 19:07:26 -07:00
Nassim Jahnke 71544ab01f Readd deobfuscation of chat executor stacktraces 2022-07-28 02:02:40 +02:00
Nassim Jahnke c488d15359 Don't fire preview event for non-player senders
Fixes #8195
2022-07-28 01:59:19 +02:00
Nassim Jahnke 2184cd2252 Fix chat message api using overlay 2022-07-28 00:38:37 +02:00
Nassim Jahnke d41ecbe5c3 Make it compie 2022-07-28 00:20:14 +02:00
Nassim Jahnke cb6f029de9 More compile fixed 2022-07-28 00:10:27 +02:00
Nassim Jahnke 063e6b288c Compile fixes 2022-07-28 00:04:27 +02:00
Jake Potrebic 64cb313386 some compile fixes 2022-07-27 15:00:14 -07:00
Nassim Jahnke c8f3d9ee8c More more more more more more more work 2022-07-27 23:50:05 +02:00
Nassim Jahnke 6b80b342d9 More more more more more more work 2022-07-27 23:32:15 +02:00
Nassim Jahnke c7304035b6 More more more more work 2022-07-27 23:19:52 +02:00
Nassim Jahnke aab40382a5 More more more more work 2022-07-27 22:55:55 +02:00
Nassim Jahnke 7a133678da More more more work 2022-07-27 22:46:05 +02:00
Nassim Jahnke 50710fa684 More more work 2022-07-27 22:17:18 +02:00
Nassim Jahnke 08828fde02 More work 2022-07-27 21:49:24 +02:00
Nassim Jahnke afb9e818fc Fix timings diff 2022-07-27 21:22:02 +02:00
Nassim Jahnke faafca851c New work 2022-07-27 21:18:51 +02:00
Nassim Jahnke 734a43657a Move patches over, start with first few 2022-07-27 20:52:03 +02:00
Nassim Jahnke 86f87ba400 Fix custom merchant trade event world reference 2022-07-25 19:21:31 +02:00
Nassim Jahnke 345a6a6205 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
ef0946409 PR-1091: Fix exit position in entity travel with portals
d12768f75 PR-1090: Remove no longer needed world reference from CraftMerchantCustom
7550f6854 SPIGOT-7115: Support hex color codes in custom merchant inventory titles
2022-07-25 18:44:24 +02:00
Nassim Jahnke 22ac7d6817 Add internal netty pipeline events 2022-07-25 16:13:09 +02:00
Nassim Jahnke b327e17634 Fix regenerate chunk method 2022-07-24 22:11:35 +02:00
Shane Freeder 44b6869fd2 Fix plugin update IO logic when replacing jars 2022-07-23 05:52:57 +01:00
Shane Freeder 46a9d2a4ac Cache Component MOTDs 2022-07-23 02:56:50 +01:00
Jake Potrebic 1a8bea734a Fix wrong world being passed into portal event (#8174) 2022-07-22 17:42:34 -07:00
Jake Potrebic 4952c04610 Don't use level random in entity constructors (#8122) 2022-07-22 16:42:13 -07:00
Jake Potrebic 0193a9db5d Add EntityPortalReadyEvent (#5619) 2022-07-22 16:23:12 -07:00
Owen 5deafd1969 Teleportation API (#6562) 2022-07-22 20:36:43 +01:00
Jake Potrebic 52a60ad946 Updated Upstream (Bukkit/CraftBukkit) (#8172)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
23f557a0 SPIGOT-5380, SPIGOT-6958, PR-772: Add some missing entity API

CraftBukkit Changes:
fc3071161 SPIGOT-5380, SPIGOT-6958, PR-1085: Add some missing entity API
2022-07-22 11:18:00 -07:00
Jake Potrebic d0e7fa4dc9 Updated Upstream (Bukkit) (#8158) 2022-07-21 20:53:04 +01:00
Pedro c6313e659c [ci skip] Update WSL docs in CONTRIBUTING (#7836) 2022-07-21 20:52:11 +01:00
ChristopheG 73dca00ba5 Add yaw and pitch to CommandSourceStack#getBukkitLocation() (#8167) 2022-07-21 09:26:36 +02:00
Noah van der Aa a76a1ab862 Make Biome implement Translatable (#8161) 2022-07-20 18:23:26 +02:00
Pedro 16ee379389 Add SpawnReason to Tadpoles spawned by Frogspawn (#8165) 2022-07-20 18:18:28 +02:00
Lulu13022002 bebfc79708 Call jump event for the beast (#8100) 2022-07-20 18:17:42 +02:00
Emily 10f09b938a [ci skip] Readd "Use" Javadoc tab (#8162) 2022-07-20 18:16:13 +02:00
Jake Potrebic b7faa655cb Fix update future return type (#8120) 2022-07-18 23:06:59 -07:00
Space Walker 384d63918c Fix missing redstone event call with Eigencraft redstone (#8148) 2022-07-18 13:46:52 +02:00
stonar96 90836d0da6 1.19 Anti-Xray cleanup (#8104) 2022-07-18 12:30:31 +02:00
Pedro fdd910e0cf Log IOException in plugin update (#7960) 2022-07-18 11:31:33 +02:00
Pedro 036a09c300 Fix spigot config not using commands.spam-exclusions (#8151) 2022-07-17 18:37:39 +02:00
Space Walker cd215af6eb Fix #8138 (#8139) 2022-07-13 23:20:26 +02:00
Noah van der Aa e4f21e3178 Move old user conversion down slightly (fixes #8050) (#8052) 2022-07-12 22:13:27 +01:00
Jake Potrebic b58063a949 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8124)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
607ce370 SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
f14cea82 SPIGOT-7070: Material.SCULK_VEIN has Waterlogged data class, should also be MultipleFacing
8e43b278 PR-767: Add support checking/survivability methods for BlockData
b3dee151 SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies

CraftBukkit Changes:
9a8e08010 SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
26bd88ccd SPIGOT-7070: Material.SCULK_VEIN has Waterlogged data class, should also be MultipleFacing
7ba06e15b SPIGOT-7095: StructureGrowEvent doesn't fire for mangrove propagules growing to a tree
163e35c91 PR-1079: Add support checking/survivability methods for BlockData
4230f8f0e SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies

Spigot Changes:
14a2382f Rebuild patches
2022-07-12 10:16:05 -07:00
Jason e294802977 Refactor paper command (#8112)
* Refactor paper command

* Improve paper dumpitem output

* Register paper command permissions

Would be nice to add descriptions for these too, but that's an enhancement for another time

* Update MobcapsCommandTest fail message

* Notify on bad radius for fix light

* fixup rebase
2022-07-08 16:01:42 -07:00
Jason Penilla 5ffeb70186 Use getChunkForLighting instead of getChunkAtImmediately in fixlight to properly ignore imposter chunks
We need chunks to actually have their light status future done to relight them, an imposter with for example only the empty future complete but with a light status cannot be relit.

getChunkForLighting gives the desired behavior and is the method used by the light engine, so updating fixlight to use it as well fixes #8115
2022-07-08 15:27:37 -07:00
Robert Olaru 41238a4e24 [ci skip] Fixed typo in README (#8031) 2022-07-08 00:41:35 +01:00
Bjarne Koll 95ac8745f0 Add ZombieVillager conversion without entity event (#8111)
The ZombieVillager#setConversionTime API method internally calls
startConversion which always broadcasts the entity event responsible for
playing the respective sound at the beginning of a conversion.

This is not always wanted by developers when modifying already
converting zombies in particular.

This commit expands the ZombieVillager interface with another overload
of the setConversionTime method that also takes a simple toggle flag
indicating whether or not the entity event should be published to the
world.
2022-07-07 22:43:28 +01:00
Lulu13022002 c4782f50a3 Add xp orb spawn reason for frogs (#8045) 2022-07-07 22:38:12 +01:00
Jake Potrebic 6ea73e7d63 Fix Bee setFlower NPE (#8107) 2022-07-06 15:21:56 -07:00
Shane Freeder a05e69b9fc Add a bit of extra debugging to chat order/time errors
I do wanna add some leeway to the kick, if message was sent within 30-60
seconds of the last message, assume clock drift and just ignore the kick
(send a message? just silently ignore?), but, I'm not 100% on this one
2022-07-06 06:00:16 +01:00
Bjarne Koll c879064bfe Call EntityDropItemEvent for goats dropping horns (#8094) 2022-07-04 21:26:43 +02:00
Jake Potrebic fbb11db9a5 Add missing EntityDropItemEvent calls (#5674) 2022-07-04 12:01:17 -07:00
Nassim Jahnke 385f313a8b Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8092)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
d41796de SPIGOT-7071: Add Player#stopSound(SoundCategory category)
61dae5b2 SPIGOT-7011, SPIGOT-7065: Overhaul of structures

CraftBukkit Changes:
991aeda12 SPIGOT-1729, SPIGOT-7090: Keep precision in teleportation between worlds
5c9a5f628 SPIGOT-7071: Add Player#stopSound(SoundCategory category)
68f888ded SPIGOT-7011, SPIGOT-7065: Overhaul of structures
0231a3746 Remove outdated build delay.

Spigot Changes:
475f6008 Rebuild patches
8ce1761f Rebuild patches
2022-07-04 16:38:06 +02:00
Noah van der Aa 1e5d1db2b7 Call StructureGrowEvent for mangrove propagule (#8023) 2022-07-04 15:20:43 +01:00
Spottedleaf d86fde5523 Do not sync load chunk for dynamic game event listener registration
These can be called while an entity is being added to the world,
and if the entity is being added from a chunk load context the
sync load will block indefinitely (because the chunk load context
is for completing the chunk to FULL).

This does raise questions about the current system for these
dynamic registrations, as it looks like there is _zero_ logic
to account for the case where the chunk is _not_ currently loaded
and then later loaded.
2022-07-03 22:42:58 -07:00
Spottedleaf 41647af74c Do not use worldgen executor for api profile completions
We cannot put blocking network I/O onto the worldgen threads,
this will crash the server if it stalls
2022-07-03 14:55:56 -07:00
u9g ed79fc947a Add Player#getFishHook (#7988) 2022-07-03 12:24:29 -07:00
pop4959 9d0650ed60 Don't print component in resource pack rejection message (#8084) 2022-07-02 11:19:53 +02:00
Noah van der Aa c029645443 Don't allow world unloading while ticking worlds (fixes #8080) (#8081) 2022-07-01 18:14:50 +02:00
Space Walker a22eb678af update eigencraft patch (#8076) 2022-06-30 09:20:40 +02:00
Riley Park 281834752c [ci skip] fix team name in codeowners 2022-06-29 20:10:55 -07:00
Jason 1bd678c494 [ci skip] Scan built jars for bad method usages (#8051) 2022-06-27 15:41:59 -07:00
Jason Penilla 0d79b867e5 Update paperweight to 1.3.8 2022-06-27 15:27:36 -07:00
Jake Potrebic 37afe987d9 Fix CCE for SplashPotion and LingeringPotion spawning (#7758) 2022-06-25 14:21:47 -07:00
Owen 11bd74bc56 Use safe method for handling Files#createDirectories (#7997) 2022-06-25 22:40:28 +02:00
Jake Potrebic e7036bb2d7 Updated Upstream (Bukkit/CraftBukkit) (#8042)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
d5a777e7 SPIGOT-7078: Add EntityPotionEffectEvent.Cause#WARDEN

CraftBukkit Changes:
82f757467 SPIGOT-7078: Add EntityPotionEffectEvent.Cause#WARDEN
c924fa531 SPIGOT-7072: Call events for stepping on sculk sensors and sculk shriekers
2022-06-25 13:26:00 -07:00
Noah van der Aa 04d080ed82 [ci skip] Fix tiny mistake in adventure javadocs (#8046) 2022-06-24 17:39:44 +01:00
Owen 5593f4edd3 Cleanup LivingEntity Hand Raised/Item Use API (#7995) 2022-06-24 10:04:02 +02:00
Space Walker bdb6816960 Update Alternate Current to v1.4.0 (#8028) 2022-06-24 09:58:59 +02:00
Jake Potrebic e52499e41d Fix Player#loadData and Player#saveData javadocs (#8039) 2022-06-22 20:46:13 -07:00
Shane Freeder 147a2b7f54 Parse MOTD as legacy sectioned string (Fixes #8036)
This is not ideal but this is how MOTDs have been parsed for years,
ensure that this is performed for all things getting the MOTD from
the server
2022-06-22 09:15:20 +01:00
Jake Potrebic 4c9317c9fb Use non-deprecated super ctor in PaperServerListPingEventImpl (#8029) 2022-06-21 17:54:52 +02:00
Nassim Jahnke fb2c24b36d Updated Upstream (Bukkit/CraftBukkit) (#8015)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
05ae036c PR-746: Add option to use cached map color palette
57849c1b PR-759: Add preview chat option in ServerListPingEvent
0169e65d PR-758: Add missing server properties methods from 1.19

CraftBukkit Changes:
622dbe6c2 SPIGOT-7068: SKULK and SKULK_VEIN BlockSpreadEvents Still do not reference the correct source (SKULK_CATALYST)
6c61b73f3 PR-1052: Add option to use cached map color palette
c882f38ea SPIGOT-7066: Fix custom END worlds not generating DragonBattle
6866aab59 SPIGOT-2420: Can't set exp drops for EnderDragon death
9dcd46530 PR-1067: Add preview chat option in ServerListPingEvent
36c2681af PR-1066: Add missing server properties methods from 1.19
031eaadd0 Increase outdated build delay
8fda4b12f SPIGOT-7060: SCULK and SCULK_VEIN BlockSpreadEvents do not reference the correct source
2022-06-20 19:12:05 +02:00
Shane Freeder ed9cf5ca08 Fix missing null check in ChunkGenerator#findNearestMapStructure 2022-06-20 15:01:29 +01:00
Spottedleaf 9797f081c2 Sync Starlight SaveUtil with 1.1.1
Code isn't used, but still should be synced
2022-06-18 14:48:08 -07:00
Jake Potrebic b0eb4e0c74 Fix number parsing (#8013) 2022-06-17 11:28:18 -07:00
Shane Freeder 7688112546 [ci skip] restore jd.io 2022-06-17 18:28:43 +01:00
Shane Freeder b77fe3a42b Temp: Disable javadoc.io for now 2022-06-17 08:26:11 +01:00
Jake Potrebic e269a0a00b Fix incorrect random nextLong to nextInt (#8009) 2022-06-17 09:00:17 +02:00
Shane Freeder 81f2eece54 [ci skip] rebuild patches 2022-06-17 06:10:23 +01:00
Jake Potrebic d1b1c6ffd9 Add missing deprecation to AdvancementDisplayType (#7876) 2022-06-16 15:19:47 -07:00
Jake Potrebic dd613194ed Couple fixes for command blocks (#8004) 2022-06-16 15:03:02 -07:00
Owen f428887cc1 Prevent empty items from being added to world (#7998)
The previous solution caused a bunch of bandaid fixes inorder to resolve edge cases where minecraft/the api might spawn items that are air.
Just simply prevent them from being added to the world instead.
2022-06-16 22:31:23 +01:00
Jake Potrebic 0ae78d381a Fix advancement saving before reloads (#8003) 2022-06-16 21:59:53 +01:00
Noah van der Aa 0c1643c02c Fix MC-252439 (#7994) 2022-06-16 20:23:36 +02:00
Owen 2dcfb2b11f Nameable Banner API (#7711) 2022-06-16 04:54:54 +01:00
OwenandBillyGalbreath 94ef34cd0f Fix incorrect ansi code being used for bold (#8000)
Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
2022-06-16 04:40:14 +01:00
Owen 17c1c6c3e7 Add missing important BlockStateListPopulator methods (#7952) 2022-06-15 18:30:58 +02:00
Jake Potrebic 4a48ed306d Add option for strict advancement dimension checks (#7954) 2022-06-14 16:31:20 -07:00
u9g 805423c90e Add ARMOR tag to MaterialTags (1.19) (#7987) 2022-06-15 00:04:19 +01:00
chickeneer e3042d2506 Fix the growth modifier for glowberries (#7986) 2022-06-14 23:37:14 +01:00
Dustin 48f7a1a9ef Add WardenAngerChangeEvent (#7943) 2022-06-14 12:34:41 +02:00
Jake Potrebic cb410bb612 [ci skip] Update CONTRIBUTING.md for config changes (#7977) 2022-06-14 10:53:02 +02:00
Jake Potrebic b844286f48 Fix command signs patch update (#7976) 2022-06-14 10:51:53 +02:00
Noah van der Aa 16541757f7 [ci skip] Update performance problem issue template to account for new config formats (#7967) 2022-06-14 10:50:38 +02:00
Jake Potrebic 3d37b42a89 Couple config fixes (#7975) 2022-06-13 15:29:44 -07:00
froobynooby 8bae82db21 Use deserialised row keys in config tables (#7962) 2022-06-13 13:50:43 -07:00
Nassim Jahnke bd097b4323 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
4d37bf30 PR-762: Add SpawnReason and TransformReason for Tadpole metamorphosis into Frog
788174ae PR-761: Add Hangable interface to MangrovePropagule

CraftBukkit Changes:
3571ca8d1 PR-1070: Add SpawnReason and TransformReason for Tadpole metamorphosis into Frog
8f097b92f PR-1068: Add Hangable interface to MangrovePropagule

Spigot Changes:
56be6a84 Rebuild patches
c6c8886d PR-118: Add config option to disable hopper-chunk-loading
2022-06-13 18:06:25 +02:00
Shane Freeder e4f5e1c9ab Bump netty 2022-06-12 23:53:18 +01:00
Josh Roy 90050ffd54 Update Adventure to 4.11.0 and implement ComponentLogger (#7937) 2022-06-12 23:07:40 +02:00
Jason Penilla 3690440aaa Update paperweight to 1.3.7 2022-06-12 13:43:58 -07:00
Jake Potrebic 4797e3a945 Dont reassign the hiddenConfigs field in TimingsManager (#7951) 2022-06-12 10:29:27 -07:00
Nassim Jahnke 8b6f4dd482 Add paper-settings-directory cl argument (#7949) 2022-06-12 10:07:43 +02:00
Jake Potrebic ee4916df7d Fire kick event for out-of-order chat on main thread (#7942) 2022-06-11 18:11:18 -07:00
Shane Freeder 6c52b5e2c8 Ensure that Log4J is shutdown when stopping the server (Fixes #7932) 2022-06-12 01:59:24 +01:00
Shane Freeder c044b14efd Add support for Velocity forwarding v2
This is strictly not needed, however, I wanted to write this in part
to test the new forwarding logic, parsing and advertising the latest
featureset is also not exactly a bad thing
2022-06-12 01:49:04 +01:00
Jake Potrebic 9ad94dcbc4 Adjust config headers 2022-06-11 13:43:59 -07:00
Spottedleaf dfc10448bb Fix keep spawn loaded patch
Needs to be in blocks
2022-06-11 08:03:56 -07:00
Spottedleaf 46954ee75b Don't explode on light data in the nether
It shouldn't be there but whatever
2022-06-11 08:03:56 -07:00
Jake Potrebic 55201f00e8 Updated Upstream (Bukkit/CraftBukkit) (#7936)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c1d911a2 Add compat constructor to PlayerAnimationEvent

CraftBukkit Changes:
effea36a2 PR-1065: Add missing calls for BlockSpreadEvent when Sculk spreads
2022-06-11 11:02:57 +02:00
Nassim Jahnke d7165b0d56 Fix some references to obfuscated code 2022-06-11 11:02:09 +02:00
Owen1212055 1ccff4f5d1 Readd mc-4 fix 2022-06-11 10:41:59 +02:00
Owen c80df849c2 Readd remove vec allocations diff (#7930) 2022-06-11 10:30:20 +02:00
Evan f8beab5e5e correct argument check in PlayerHandshakeEvent#setFailMessage(String) (#7940) 2022-06-11 00:37:00 -07:00
Spottedleaf ee7d16111d Make starlight light read non-fatal if it throws
Brings behavior in line with the mod, we shouldn't kill the chunk
if the light data is corrupt, we can regenerate the light data
2022-06-10 21:08:37 -07:00
Spottedleaf 5a2973fd80 Correct dataconverter diff
Missed renames + game event listener walker stuff
2022-06-10 20:54:05 -07:00
Jake Potrebic 76f81aec25 Keep default keys in some maps
Fixes https://github.com/PaperMC/Paper/issues/7913#issuecomment-1152780671
2022-06-10 17:11:12 -07:00
Jake Potrebic 99aa5f2fa5 Fixes parsing tags in selectors in command functions
Fixes #7928
2022-06-10 10:02:09 -07:00
Jake Potrebic 698b3152cf Improve migration file errors (#7929) 2022-06-10 10:01:09 -07:00
Owen1212055 8bca9190a4 Remove unneeded patch 2022-06-10 16:15:38 +02:00
Owen a8a01bbb52 port Significantly improve performance of the end generation (#7919) 2022-06-10 16:11:41 +02:00
Nassim Jahnke cf384f5269 Don't print stacktrace when client with invalid signature logs in 2022-06-10 16:03:48 +02:00
Nassim Jahnke 9b6fb2fe71 Remove bad warning 2022-06-10 14:58:25 +02:00
Nassim Jahnke 07548192b1 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
cc7edd6bc SPIGOT-7051: Worldgen API does not run vanilla noise generation when shouldGenerateNoise is true
2022-06-10 14:45:58 +02:00
Nassim Jahnke 9a75a79edd Readd PlayerAnimationEvent constructor removed by upstream 2022-06-10 14:44:40 +02:00
Jake Potrebic 8141349df1 improve packet config serializer (#7920) 2022-06-10 10:45:41 +02:00
Jake Potrebic dd6a8e9394 couple more migration issues 2022-06-09 22:03:37 -07:00
Jake Potrebic 02b5ec4c78 fix 2 more migration issues 2022-06-09 18:40:07 -07:00
Jake Potrebic cfe3ad1b0f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
45d9c73c SPIGOT-7043: EnderChest does not implement Lidded
86b95f34 SPIGOT-7047: Add Player#getLastDeathLocation

CraftBukkit Changes:
b2557f6ac SPIGOT-7041: Custom BiomeProvider not used when world set to type FLAT
732c50cab SPIGOT-7043: EnderChest does not implement Lidded
6209029ea SPIGOT-7048: addPassenger() not working when vehicle is player
3aa7836df SPIGOT-7047: Add Player#getLastDeathLocation
7d522cd26 SPIGOT-7050: Enchantment data of items will not be saved correctly when saved in YAML configuration file

Spigot Changes:
1dffefb4 Rebuild patches
2022-06-09 18:20:55 -07:00
Owen 83e2a3582b Fix light (#7917) 2022-06-10 02:09:55 +01:00
Jason Penilla 4a51a54896 Don't use deprecated permission message method 2022-06-09 17:03:05 -07:00
Nassim Jahnke 5ac29fcb93 Fix migration of packet limiter 2022-06-10 01:55:53 +02:00
Owen d833c0c39a Update starlight + read null light data (#7912) 2022-06-10 01:49:23 +02:00
Jason Penilla 7c55e62abc Fix tests 2022-06-09 16:19:38 -07:00
Jason Penilla ade44f39ce Remove todo 2022-06-09 16:08:23 -07:00
Jason Penilla 0a21166a8b Update player chunk loader patch, re-add ticket level propagator patch 2022-06-09 16:01:48 -07:00
Noah van der Aa 181a8479b5 Make slime spawn checks use tag again and rename config option (#7910) 2022-06-10 00:48:46 +02:00
Jake Potrebic 6249dd5ecb remove more unused config options 2022-06-09 15:15:01 -07:00
Jake Potrebic 77de07a15d fix more config migration issues 2022-06-09 15:03:02 -07:00
Jake Potrebic e5ed99a29a fix compile issue 2022-06-09 14:50:05 -07:00
Jake Potrebic 3f1c6a45da move commands out of configuration 2022-06-09 14:44:20 -07:00
Shane Freeder ad51c406d5 Fix don't lookup profiles for blank names patch 2022-06-09 22:37:33 +01:00
Nassim Jahnke 09c9215b85 Add sendRichMessage and sendPlainMessage methods 2022-06-09 23:34:06 +02:00
Nassim Jahnke 5052a4515e Minor patch changes 2022-06-09 23:27:06 +02:00
Jake Potrebic c946526ab1 minimessage conversion 2022-06-09 14:25:16 -07:00
Owen c34a306393 Remove old config options (#7908) 2022-06-09 22:48:35 +02:00
Owen acd50c5287 Keyed cat Type (#7901) 2022-06-09 22:38:59 +02:00
Jake Potrebic f27aa33aba catch IAE from empty transformation builder 2022-06-09 13:06:08 -07:00
Owen d9fcf39f65 Remove locname (#7909) 2022-06-09 12:56:21 -07:00
Jake Potrebic 2e68ecc289 more configuration fixes/changes 2022-06-09 12:51:29 -07:00
Owen e47848f112 Correctly handle ElderGuardianAppearanceEvent canceling (#7902) 2022-06-09 21:04:10 +02:00
Noah van der Aa 84434e6ae9 Don't validate chunk before it's been run through DataConverter (#7907) 2022-06-09 17:39:02 +01:00
Nassim Jahnke a3a0390e3b Fix config migration error preventing server startup
There's at least two more, but those are less pressing
2022-06-09 14:27:48 +02:00
Nassim Jahnke d385af0e01 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
0a4b84d6 SPIGOT-7003: Add missing PlayerAnimationType
830db7d5 SPIGOT-5984: Add non deprecated / magic value way to set pixel in MapCanvas
20caf8ff PR-754: Add DamageCause.SONIC_BOOM

CraftBukkit Changes:
576a03704 SPIGOT-7003: Add missing PlayerAnimationType
0dcc5fdd0 SPIGOT-5984: Add non deprecated / magic value way to set pixel in MapCanvas
d75aacb43 Update Netty version
3b34c6bea SPIGOT-7044: Modified RandomSourceWrapper to ensure random is not null before setting seed
4b60bfd18 PR-1059: Add DamageCause.SONIC_BOOM
2022-06-09 13:55:33 +02:00
Nassim Jahnke e1c2939c11 Update configurable feature seed patch 2022-06-09 13:16:00 +02:00
Nassim Jahnke b26d590d0c Fixes
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2022-06-09 11:57:19 +02:00
Nassim Jahnke 7be0194157 Readd dummy PaperConfig and PaperWorldConfig classes 2022-06-09 11:46:41 +02:00
Nassim Jahnke ffddec55d0 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
50ef122ef SPIGOT-7042: Subtitle is always equal to title
2022-06-09 11:40:30 +02:00
Jason d7cc306336 Update Optimise general POI access (#7903) 2022-06-09 11:37:28 +02:00
Jake Potrebic 172d260d67 Move to configurate for paper.yml (#7609) 2022-06-09 10:51:45 +02:00
Owen da8027352c Deprecate origin for vibrations (#7898) 2022-06-08 13:44:59 -07:00
Jake Potrebic 467a16642a fallback to default locate logic if no API found 2022-06-08 13:42:54 -07:00
Noah van der Aa 9107753202 (1.19) Make timings link clickable (#7897) 2022-06-08 13:27:24 -07:00
Owen cbb47cacdb Add missing spawn eggs (#7896) 2022-06-08 13:25:47 -07:00
Nassim Jahnke 11c2705ac2 Slightly untrash Spigot chat handling
Vanilla technically allows chat messages with starting slashes now,
Spigot still accepts them as commands, most likely due to being too
lazy to properly differentiate between chat and command intent in
their implementation. This disallows modified clients to send chat
messages with slashes and makes sure chat validation always happens
on the netty event loop, rather than there and possibly being moved
to the main thread, thus having the delayed handling cause a bad
process order of message ids.
2022-06-08 21:42:49 +02:00
Owen 86c16504d6 Dont resent entity on art update (#7887) 2022-06-08 21:25:15 +02:00
Jake Potrebic 29e918948a Fix structures issues/api (#7895) 2022-06-08 21:00:19 +02:00
Owen a93aa05bf8 Wrap NBTOps in RegistryOps (#7892) 2022-06-08 20:25:39 +02:00
Jake Potrebic e24a25097a correct patch description 2022-06-08 11:06:52 -07:00
Nassim Jahnke 897cc27c8b Remove no longer needed patch 2022-06-08 20:06:04 +02:00
Nassim Jahnke d1e1217a01 Only send empty chunk when player is dead
Currently not needed at all with chunk rewrites not yet updated, but considering it's only actually needed for dead players, no need to fuck up a chunk without the future applied patch
2022-06-08 19:50:57 +02:00
Noah van der Aa 44ccc15a30 Port Fix missing chunks due to integer overflow to 1.19 (#7891) 2022-06-08 19:39:07 +02:00
Nassim Jahnke 4c1b338e0f Remove level propagator patch for now 2022-06-08 19:33:07 +02:00
Space Walker bd134f856b Update Alternate Current patch (#7890) 2022-06-08 19:29:34 +02:00
Owen 222391f809 Check if is light status or above / isLightOn / starlight version fits (#7888) 2022-06-08 18:32:49 +02:00
Nassim Jahnke b3b63d3a02 Fix tests (again?) 2022-06-08 18:18:49 +02:00
Nassim Jahnke 57dfcdf4eb Reorder some patches 2022-06-08 18:13:02 +02:00
Owen a02874e014 Remove painting desync (#7886) 2022-06-08 17:45:54 +02:00
MiniDigger | Martin 8399e10c43 fix reobf issues around randomsource impls
prolly should be fixed in a mapping patch instead but I don't wanna
2022-06-08 17:43:25 +02:00
Nassim Jahnke 02804a49a2 Fix tests 2022-06-08 17:31:27 +02:00
Jake Potrebic 7a165c9c5d Add back fix swamp hut deadlock patch 2022-06-08 07:58:57 -07:00
Nassim Jahnke a6bc17b8bb IT COMPILES BOIS 2022-06-08 16:51:37 +02:00
Nassim Jahnke 913d2ae0b8 Fix 2022-06-08 16:46:39 +02:00
Jake Potrebic 9ab6893183 Add back Fix locateNearestStructure patch 2022-06-08 07:46:01 -07:00
Jake Potrebic d5216d8588 Add back Fix NotePlayEvent patch 2022-06-08 07:36:43 -07:00
Jake Potrebic af4b5ee4f0 add back removed kelp modifier patch 2022-06-08 07:29:32 -07:00
Nassim Jahnke 1d5b298c19 More compilation error fixes 2022-06-08 16:24:55 +02:00
Nassim Jahnke b561fd8b25 Compilation error fixes 2022-06-08 15:59:48 +02:00
Owen 7ece9454f7 Use biome source method to prevent loading chunks (#7885) 2022-06-08 15:57:04 +02:00
Noah van der Aa b1f5e70075 Moar 1.19 fixes (#7884) 2022-06-08 15:38:56 +02:00
Nassim Jahnke 55d7f562b8 More more more more more more more more more more more patches 2022-06-08 15:36:56 +02:00
Nassim Jahnke beab8a32c1 More more more more more more more more more more patches 2022-06-08 15:12:28 +02:00
Owen 2259098789 Misc fixes (#7883) 2022-06-08 15:03:33 +02:00
Nassim Jahnke 301cf577c2 More more more more more more more more more patches 2022-06-08 14:33:46 +02:00
MiniDigger | Martin 391e65f1af more misc compile fixes 2022-06-08 14:19:54 +02:00
MiniDigger | Martin 2f0b2b93df Add missing DataConverter and fix some imports
not fully sure those imports (or well, those classes being outside of the mc package) are right, but who cares 🤷
2022-06-08 14:01:30 +02:00
Nassim Jahnke d28b20944b Things, and Starlight (maybe) 2022-06-08 13:44:30 +02:00
Nassim Jahnke 8d5407b16f Things, and DataConverter (maybe) 2022-06-08 13:12:14 +02:00
Nassim Jahnke 82f712c096 More more more more more more more more patches 2022-06-08 12:40:44 +02:00
Nassim Jahnke f0e575f445 More more more more more more more patches 2022-06-08 12:20:57 +02:00
Nassim Jahnke 0e06c77264 More more more more more more patches 2022-06-08 11:31:06 +02:00
Noah van der Aa b464e02ba4 Misc. 1.19 fixes (#7881) 2022-06-08 10:45:59 +02:00
Jake Potrebic cc7979a6e0 bale o' patches 2022-06-08 01:00:56 -07:00
Jake Potrebic aabbfcdf8d Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
4b08dbc5 PR-752: Make Leaves Waterlogged
de323fc9 Downgrade dependency version

CraftBukkit Changes:
c3f219edb Fix missing abstract in CraftLeaves
886e6d8c8 SPIGOT-7038: Setting title or subtitle to empty string causes the player to disconnect
6c302a5e3 Make Leaves Waterlogged
53b681be5 Downgrade dependency version

Spigot Changes:
ee737122 Fixed system messages shown in action bar
f343df82 SPIGOT-7036: Don't use CHAT message type
63a06049 SPIGOT-7035: Actionbar Sending in Main Chat
2022-06-08 00:49:02 -07:00
Jake Potrebic a1d0432c2c batch o' patches 2022-06-08 00:40:34 -07:00
Jake Potrebic 89c3c31af9 bag o' patches 2022-06-08 00:30:41 -07:00
Jake Potrebic feca8d248c bouquet o' patches 2022-06-07 23:25:32 -07:00
Jake Potrebic 2304bb3d6f bundle o' patches 2022-06-07 23:06:17 -07:00
Jake Potrebic 0745f97bb5 bunch o' patches 2022-06-07 22:46:52 -07:00
Jake Potrebic dc12a6e9fe a bunch more patches done 2022-06-07 22:02:19 -07:00
Jake Potrebic c3fc3de622 even moar patches 2022-06-07 21:39:43 -07:00
Jake Potrebic f04e64dfc6 moar patches 2022-06-07 21:22:42 -07:00
Spottedleaf f371b4e374 <3 jmp 2022-06-07 21:07:14 -07:00
Jake Potrebic c5db5371bf Fix more issues 2022-06-07 20:59:40 -07:00
Spottedleaf 7bbeef26ba i really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really hate jmp 2022-06-07 20:42:55 -07:00
Jake Potrebic d41a026555 few more server decompile fixes 2022-06-07 20:12:24 -07:00
Jake Potrebic 515da2fb1b update reobf-mappings-patch.tiny 2022-06-07 19:56:15 -07:00
Spottedleaf 26ea0402d8 i really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really love jmp 2022-06-07 19:25:49 -07:00
Spottedleaf a27b508dea i really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really love jmp 2022-06-07 18:34:11 -07:00
Jake Potrebic 68b585fba7 Fix cook speed patch 2022-06-07 18:19:35 -07:00
Jake Potrebic a16970ac1b Fix CanPlaceOn/CanDestroy API issues 2022-06-07 18:13:05 -07:00
Spottedleaf c515eb9a08 rebuild after rebase 2022-06-07 17:43:52 -07:00
Spottedleaf 32c195bd4f i love jmp 2022-06-07 17:43:03 -07:00
Spottedleaf 87ca0fa790 hate jmp and his gradle 2022-06-07 17:43:03 -07:00
Jake Potrebic 3a0b9487d4 temporary fixes for adventure chat 2022-06-07 16:49:14 -07:00
Owen1212055 58133bdfdf Update PreCreatureSpawnEvent patch 2022-06-07 23:54:21 +02:00
Jake Potrebic 4e13355af1 some server compile fixes 2022-06-07 14:48:14 -07:00
Nassim Jahnke addf9c9155 More more more more more patches 2022-06-07 23:45:11 +02:00
Jake Potrebic 7d7779a667 Fix even more errors 2022-06-07 14:15:14 -07:00
Jake Potrebic 3773770230 Fix more errors 2022-06-07 14:01:17 -07:00
Nassim Jahnke aac58bb772 More more more more patches 2022-06-07 22:45:38 +02:00
Jake Potrebic c321ca57db fix unmerged diff 2022-06-07 13:43:05 -07:00
Jake Potrebic 13fe88643e API now compiles successfully 2022-06-07 13:31:10 -07:00
Jake Potrebic 88f74d1bac Fix some api compilation errors 2022-06-07 13:23:21 -07:00
Nassim Jahnke cac4deb882 More more more patches 2022-06-07 22:12:48 +02:00
Nassim Jahnke 1669c6b097 More more patches 2022-06-07 21:55:39 +02:00
Nassim Jahnke 2710efc693 More patches 2022-06-07 21:15:06 +02:00
Nassim Jahnke a9c507310b First server patches 2022-06-07 20:43:28 +02:00
Nassim Jahnke 028e2d9f00 API patches 2022-06-07 19:20:30 +02:00
Nassim Jahnke 56e64243ed Patch cleanup 2022-06-07 19:03:07 +02:00
Nassim Jahnke cb05aa6b8b Prepare for 1.19 dev 2022-06-07 18:52:56 +02:00
Joseph Burton 276d830d22 Fix campfire walker in V1920 2022-06-06 17:51:12 -07:00
Jake Potrebic 4b27254e6a Fix treasure maps discovered settings (#7627) 2022-06-05 17:17:27 -07:00
Joseph Burton d8ef841114 [DataConverter] Fix generator options parsing 2022-06-05 22:49:42 +01:00
Jake Potrebic b3deb2589e Move some methods to RegionAccessor (#7635) 2022-06-05 13:51:44 -07:00
Nassim Jahnke 5befb5586e Updated Upstream (Bukkit/CraftBukkit) (#7875)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
6a039faf PR-745: Expose more information about advancements
52148c47 PR-749: Various javadoc improvements
23c2d841 PR-748: Remove permissible recalculation from Permission constructor

CraftBukkit Changes:
a59dc59e SPIGOT-7025: Use existing item in hand for ranged Drowned attack
e4cca0ca PR-1050: Expose more information about advancements
2022-06-05 10:43:06 +02:00
froobynooby 5b6397af2c Make leave messages for kicks the same as for quitting (#7874) 2022-06-05 08:43:35 +01:00
Jake Potrebic 071a4a2444 throw exception if worlds are created while being ticked (#7653) 2022-06-04 14:48:24 -07:00
Matt Artist 4d83ed0ae1 [ci skip] Changing the order of the rebase with autosquash command in the contributing.md (#6974) 2022-06-03 16:34:54 +01:00
Nassim Jahnke bed5cb2b81 Limit resolved selectors when enabled 2022-06-03 16:06:05 +02:00
Jake Potrebic fd069dd5af Remove incorrect throws javadoc in Team (#7869) 2022-06-02 22:05:42 -07:00
Jake Potrebic 8fc0999b09 Fix some nullability things (#7275) 2022-06-02 21:42:00 -07:00
Jake Potrebic a3ad720749 Remove ChatColor usages (#7543) 2022-06-02 21:26:56 -07:00
Shane Freeder 2033dba4fa Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
9d46b56e2 SPIGOT-7009: Stuck on "Loading terrain..." after disconnecting on respawn screen
2022-06-03 04:31:18 +01:00
Nassim Jahnke 80d5e71908 Updated Upstream (Bukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
d565a710 SPIGOT-7027: Documentation for ItemMeta#getCustomModelData is incorrect
2022-06-02 20:47:09 +02:00
Nassim Jahnke 1d08ce8583 Disable book selector resolving by default 2022-06-02 20:40:24 +02:00
Owenandstonar96 b1ac25fdb8 Respect x-ray permission in World#refreshChunk (#7214)
Co-authored-by: stonar96 <minecraft.stonar96@gmail.com>
2022-06-02 03:08:51 +01:00
Emily 71fe3c64f0 Add numeric string completion suggestions as int suggestions (#6360) 2022-06-02 02:56:24 +01:00
Owen c5caee307e Prevent entity loading causing async lookups (#7553) 2022-06-02 02:35:57 +01:00
Jake Potrebic 2d17a50b8b Add translation keys to GameMode enum (#7081) 2022-06-01 18:30:29 -07:00
Owen 7602dd2014 Sanitize Sent BlockEntity NBT (#7010) 2022-06-02 02:27:36 +01:00
Jake Potrebic 00c6ae8419 Implement Translatable on CreativeCategory (#7587) 2022-06-01 17:07:10 -07:00
PureGero 04e1b070ef Check HAProxyMessage type is PROXY (#7864) 2022-06-01 22:58:22 +01:00
Jake Potrebic 78e6431008 Add default kick msg component (#6886) 2022-05-31 23:20:12 -07:00
Jake Potrebic 3f7111d4e1 Fix EntityEquipment and related javadocs (#7380) 2022-05-31 13:40:21 -07:00
Jake Potrebic f210f67c4a Update the rewriteForIde for new cb package version (#7242) 2022-05-30 22:18:45 -07:00
Jake Potrebic 6b035fd9a1 Update default vanilla command perms (#7386) 2022-05-30 21:57:32 -07:00
Jake Potrebic f7382f5f4b Remove unneeded UOE when copying biome sources (#7629) 2022-05-30 19:35:46 -07:00
Jake Potrebic c123915afc Fix FurnaceInventory for smokers and blast furnaces (#7249) 2022-05-30 19:03:18 -07:00
Jake Potrebic 9667181d1d Fix OfflinePlayer#getBedSpawnLocation (#7861) 2022-05-30 18:42:51 -07:00
Jason af3b3778f6 Update ForgeFlower (#7857) 2022-05-29 12:54:25 -07:00
Jake Potrebic 3f7fbe316d Fix cb's janky level name in WorldCreator (#7851) 2022-05-27 16:42:36 +01:00
Jake Potrebic b6a6544ad1 Provide ComponentSerializer services (#7527) 2022-05-26 12:12:14 -07:00
Jake Potrebic 182a609b85 Fix duplicate world keys via createWorld (#7614) 2022-05-26 10:59:53 -07:00
Jake Potrebic 79e07f34ac Fix addPassenger for Marker (#7762) 2022-05-25 18:00:47 -07:00
Jake Potrebic a90092e758 Updated Upstream (CraftBukkit/Spigot) (#7848)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
95d233dc SPIGOT-1807: PlayerTeleportEvent is called twice

Spigot Changes:
b0819150 PR-116: Slightly reduce item merge radius in Y-direction
ef2aa765 PR-119: Fix off-by-one and allow disabling max-tnt-per-tick option
2022-05-25 21:21:51 +02:00
PanSzelescik 31ccc579b5 Add support for Proxy Protocol (#7710) 2022-05-24 05:56:58 +01:00
rgnter d8108b5416 team color parameter may be null, causing NPE 2022-05-24 05:27:24 +01:00
Jake Potrebic 123cad5d3e Remove incorrect parent perm from debugstick.always (#7846) 2022-05-24 05:09:20 +01:00
Jake Potrebic fc1752ff15 Fix more upstream javadocs (#7837) 2022-05-20 09:57:07 -07:00
Noah van der Aa ed4e9163ef [ci-skip] Update repository and API urls (#7835) 2022-05-20 08:12:30 -07:00
Owen 9b492cff36 Deprecate set/doesBounce from Projectile (#7800) 2022-05-19 01:46:01 +01:00
Noah van der Aaandstonar96 ca623865b0 Hide ores with deepslate at Y=4 and below (#7792)
Fixes #7771

Co-authored-by: stonar96 <minecraft.stonar96@gmail.com>
2022-05-18 22:16:12 +02:00
HexedHero 7045f18469 Change link to screamingsandals 2022-05-18 09:25:43 +02:00
Nassim Jahnke 73bd35d076 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
218294b1 PR-743: Support setting individual Wither head targets

CraftBukkit Changes:
d48f2d1a PR-1047: Support setting individual Wither head targets
518f1bee SPIGOT-6948: Motion from Explosion after Respawn
f3c7a6ac SPIGOT-7019: Add yaw in World#getSpawnLocation
2022-05-17 11:51:46 +02:00
Peter Crawley 0116751101 List world on tile entity placement exception (#7709) 2022-05-16 11:38:14 +01:00
Jake Potrebic 8d1de8de8d deprecate old MaterialData api (#7585) 2022-05-15 19:33:03 -07:00
Jake Potrebic 9fd870db0b Fix cancelling PlayerItemFrameChangeEvent (#7761) 2022-05-09 17:22:57 -07:00
Jake Potrebic 5928327f90 Remove unneeded patch (#7806) 2022-05-09 20:22:43 +02:00
Nassim Jahnke 18f0f8d1ca Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
312281ea PR-742: Make World implement Keyed

CraftBukkit Changes:
2ac7fa7a SPIGOT-7014: getLootTable API should not persistently update loot table
7fdd7941 PR-1046: Make World implement Keyed
7bc728a6 PR-1045: Revert changes to persistence required checks

Spigot Changes:
b6d12d17 Rebuild patches
2022-05-09 11:03:07 +02:00
Jason Penilla 268476bba3 Fix whitespace error in Alternate Current patch 2022-05-08 09:25:34 -07:00
Spottedleaf e399754320 Do not accept invalid client settings 2022-05-07 14:59:20 -07:00
Jake Potrebic 87d2eb2d3b Fix door breaking difficulty defaults for vindicator (#7795) 2022-05-07 11:38:15 -07:00
Nassim Jahnke 1a17a83f8a Move redstone config changes to Eigencraft patch 2022-05-07 19:52:32 +02:00
Space Walker 7a6163b41d Add Alternate Current's redstone implementation as an alternative to Vanilla and Eigencraft's. (#7701) 2022-05-07 18:47:28 +02:00
Spottedleaf b831784aed Only log for passenger / vehicle world mismatch
Exception thrown may corrupt passenger/vehicle state
2022-05-07 08:48:29 -07:00
Pedro 8c9d98e100 Clean unused field for Configurable door breaking difficulty (#7793) 2022-05-07 06:57:41 +01:00
Pedro 2515bc4751 Improve configurable door difficulty (#6985) 2022-05-06 17:52:14 +02:00
Noah van der Aa 421938915c Don't tick markers (#7299) 2022-05-06 17:33:07 +02:00
Owen f3a8a0b953 FallingBlock auto expire setting (#7037) 2022-05-06 17:21:24 +02:00
u9g a117da6b26 Add PlayerStopUsingItemEvent (#7787) 2022-05-06 17:14:06 +02:00
HexedHero f6a69dedb9 Undeprecate getOfflinePlayer (#7773) 2022-05-06 14:21:58 +02:00
Noah van der Aa 2ab0258b5a Use mojang item ids for alternative item despawn rate (#6997) 2022-05-04 23:29:15 +01:00
Jake Potrebic e5da93a608 Deprecate duplicate SoundGroup API (#7509) 2022-04-30 13:44:22 -07:00
Jake Potrebic e564110f9e Couple fixes/improvements to PlayerSetSpawnEvent (#6754) 2022-04-30 13:24:47 -07:00
Shane Freeder 4166632333 Updated Upstream (Bukkit/CraftBukkit) (#7776) 2022-04-30 17:27:41 +01:00
Shane Freeder 608482d512 cleanup filtered sign text (#7777) 2022-04-30 16:49:57 +01:00
Jason Penilla 6f5e6c60d3 Use setMessage instead of arraycopy
setMessage affects messages, filteredMessage, and renderMessages, we were only doing an arraycopy for messages

fixes #7774
2022-04-28 20:08:08 -07:00
Joseph Burton ce059b4f99 Fix V1451 dataconverter stat types 2022-04-25 18:06:04 +02:00
Jake Potrebic d70ac039e8 fix powder snow cauldrons not turning to water (#7229) 2022-04-24 11:35:24 -07:00
Jake Potrebic 0bf7c95c8d Fix opening inv in PlayerRecipeBookClickEvent handler (#7552) 2022-04-23 18:48:00 -07:00
Jake Potrebic 4dc78ae8b9 Fix some team color docs and added hasColor (#7602) 2022-04-23 18:37:10 -07:00
Jake Potrebic 5b85ee37e2 Fire CauldronLevelChange on initial fill (#7678) 2022-04-23 13:40:34 -07:00
Jake Potrebic fbbc03a740 Add EntityDyeEvent and CollarColorable interface (#7625) 2022-04-23 12:38:42 -07:00
Jake Potrebic 47f43da438 Add missing javadoc deprecation msgs for PlayerProfile (#7688) 2022-04-23 07:40:37 -07:00
Nassim Jahnke caf4a6f0d6 Remove or replace a few dumb deprecations (#7760) 2022-04-23 11:25:30 +02:00
Jake Potrebic 16f224a79a Trigger bee_nest_destroyed trigger in the correct place (#7436) 2022-04-22 18:17:14 -07:00
Jake Potrebic 0f8aa4e6fd Fix NPE for BlockDataMeta#getBlockData (#7670) 2022-04-22 17:21:38 -07:00
Bjarne Koll ef6a1a5f99 Revert to old createProfile(UUID, String) logic (#7723) 2022-04-22 19:54:08 +01:00
Jason Penilla c449f6a1f7 Build updates
- update paperweight to 1.3.6
- update tiny-remapper to 0.8.2
2022-04-21 19:27:56 -07:00
Jason 567fce6c76 Don't apply previous potion when item is potion (fixes #7756) (#7757) 2022-04-21 17:07:56 -07:00
petersv5andPeter Svensson 76ed156764 Grant temporary immunity from EAR to moving entities (Fixes #7637) (#7644)
Co-authored-by: Peter Svensson <petersv@psv.nu>
2022-04-20 10:34:00 +01:00
Owen 873bfa6000 Remove World#refreshChunk deprecation (#7684) 2022-04-20 10:28:53 +01:00
Shane Freeder 4ecc338e09 WorldCreator#keepSpawnLoaded (#7673) 2022-04-20 10:26:09 +01:00
Shane Freeder c7d4c0188e Ignore invalid jars inside of the updates folder (Fixes #7751)
This really needs a deeper look here, the way updates are handled is
fairly immature, but, this wasn't ever intended to be a large scale thing

Ideally, imho, we'd collect the list of update files into some form of Map,
that way we just have a reference of Name > File refs, and can filter out
cases where there are two versions of a plugin in there and warn expectidely,
but, that creates some complications, you would need to fall back to a dir
scan in the case of a plugin calling loadPlugin, but, it would at least
give us more defined behavior, as well as improve performance here vs
repeatidely trying to deserialise the plugin.yml defs for every file
in there on every load
2022-04-20 10:11:35 +01:00
Xemor c642d25f63 Improve update folder behavior (#7687)
Closes #6570
2022-04-18 18:12:39 +02:00
Noah van der Aa 86fb3d201d Don't send itemmeta for books with the hide option enabled (#7734) 2022-04-18 12:23:37 +02:00
HexedHero c66b0f99f2 Add pre-unbreaking amount to PlayerItemDamageEvent (#7724) 2022-04-18 11:51:45 +02:00
Owen 8bfb1d22f8 Pass ServerLevel for gamerule callbacks (#7668) 2022-04-18 11:46:21 +02:00
Nassim Jahnke 6b9f7a073e Don't fire worldborder events for virtual borders (#7749)
Fixes #7748
2022-04-18 11:26:18 +02:00
Jake Potrebic af943641e2 Fix slime spawners not spawning outside slime chunks (#7741) 2022-04-16 11:32:20 -07:00
Nassim Jahnke 1cfd363d32 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fc460d1b PR-735: Add Villager#zombify
c8c8331e PR-690: Add method to read ItemStack input
62845f2f SPIGOT-6829: Add per-player world border API

CraftBukkit Changes:
a459f4d4 PR-1033: Add Villager#zombify
d65d1430 PR-975: Add method to read ItemStack input
b5559f8c SPIGOT-6990: Fix setRepairCost(0) in Anvil
6c308e1b SPIGOT-6829: Add per-player world border API

Spigot Changes:
42b61526 SPIGOT-7000: Generation and /locate issues when using custom structure seeds
2022-04-16 10:29:50 +02:00
Pedro c6e631aacb Use username instead of display name in PlayerList#getPlayerStats (#7740) 2022-04-15 15:23:10 -07:00
Jason Penilla b8fa41ecdf [ci skip] Remove Mojang repo from test-plugin 2022-04-13 20:16:14 -07:00
Jason a9f252e56a Replace third party repos with Paper repo (#7733)
we now mirror Fabric, Forge, and Mojang
2022-04-13 19:58:48 -07:00
Shane Freeder d4a712d957 [CI-SKIP] Remove unused import from last patch 2022-04-13 09:15:28 +01:00
Shane Freeder a9ee1046a5 Prevent tile entity copies loading chunks 2022-04-13 08:27:16 +01:00
Jason Penilla e42d683d75 Fix StructureGrowEvent species for RED_MUSHROOM 2022-04-12 16:40:30 -07:00
Owen f8e8d6c3cd Strip enderpearl owners when they are no longer ticked (#7559) 2022-04-08 01:52:25 +01:00
Jason 4322c05f02 Use patched spigot decompiler (#7706) 2022-04-07 09:36:19 -07:00
Nassim Jahnke 2f16393ad9 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
2542945e Remove broken quickMoveStack implementation
5631e8bf SPIGOT-6973: Setting biome calls String#intern for every biome placed
2022-04-07 10:56:36 +02:00
Etil 11e0dcdf86 Fix NBT pieces overriding a block entity during worldgen deadlock (#7692) 2022-04-07 10:42:20 +02:00
Pedro 29144573e6 Allow seting custom podium location for ender dragon (#7695) 2022-04-07 10:31:30 +02:00
Jason Penilla 62dcff3e8d Update actions 2022-04-05 10:44:21 -07:00
Jason Penilla 92426e39be Update Gradle wrapper 2022-04-05 10:37:45 -07:00
Jason Penilla 820e9ca70b Update decompiler & param mappings 2022-04-05 10:37:36 -07:00
Jake Potrebic 87e11bf7fd Cache resource keys instead of trying to create them (#7643) 2022-04-02 18:10:13 -07:00
Nassim Jahnke ea2c81e4b9 Fix lectern quick move 2022-04-02 09:15:39 +02:00
Peter Crawley 443c5062c1 Fix Nullability Annotations for PrepareItemEnchantEvent (#7681) 2022-04-01 20:14:56 -07:00
Jake Potrebic 04c7b16bde Undeprecate Material#isLegacy (#7679) 2022-03-31 09:13:19 -07:00
Spottedleaf 7bf9446d9e Add per player chunk loading limits
Configurable under "settings.chunk-loading.player-max-chunk-load-rate",
defaults to -1. This commit also changes the chunk loading to be
distributed equally for all players, rather than distance based. This is
to ensure players flying around do not take priority over everyone else.
The exception to this new rule is the min-load-radius, which still has
priority over everything else.
2022-03-31 06:33:13 -07:00
Jake Potrebic 7f47b9b7f8 Remove KeyedObject interface (#7680) 2022-03-30 13:28:38 -07:00
Jake Potrebic d3c102373f fix player loottables running when mob loot gamerule is false (#7651) 2022-03-29 13:15:26 -07:00
Owen fa68bb1e81 Fix entity position desync for hanging entities (#7659) 2022-03-29 10:42:46 +02:00
Jake Potrebic 7fa8870043 Updated Upstream (Bukkit/CraftBukkit) (#7672)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
7902647a PR-737: Update WorldCreator#generatorSettings docs
67556a50 PR-736: Update README

CraftBukkit Changes:
10922194 Java 18 support
d53c4fb6 PR-1039: Use correct ops in GeneratorSettings
a567e4ae PR-1038: Removed the no longer needed getChunkUnchecked method from ChunkProviderServer.
4ac8fcce SPIGOT-6980: Since 1.18.2, World#isChunkLoaded returned false for chunks that have just been loaded (e.g. inside ChunkLoadEvent).
e6cc7c70 PR-1035: Update README
3ec79a27 SPIGOT-5140: Call EntityChangeBlockEvent when a ChorusFlower is destroyed by a projectile
2022-03-29 10:32:18 +02:00
Jason e2f743d914 Fix PalettedContainer synchronization (#7663) 2022-03-27 10:51:39 -07:00
SoSeDiK e7d928a8e1 Fix EntityChangeBlockEvent#getBlockData for when sheep eats grass block (#7646) 2022-03-21 11:43:52 -07:00
Jake Potrebic ab666a48ee Deprecating remaining blockkey methods (#7638) 2022-03-21 11:06:42 -07:00
Jake Potrebic a939d6e08e Fix generator settings string for flat-type worlds (#7568) 2022-03-21 11:06:26 -07:00
Owen 993f8288fa Add TameableDeathMessageEvent (#5392) 2022-03-20 00:50:33 +00:00
Owen a686ff5670 Add more missing entity API (#7592) 2022-03-19 15:30:16 +01:00
Bjarne Koll 7b46444bea Properly create profiles with custom name/uuid (#7558) 2022-03-19 14:39:38 +01:00
Shane Freeder 5eb61dd432 Buffer OOB setBlock calls
lets debug mode throw a trace in order to potentially see where
such calls are cascading from easier, but, generally, if you see one setBlock
call, you're gonna see more, and this just potentially causes a flood of logs
which can cause issues for slower terminals, etc.

We can limit the flood by just allowing one for a single gen region,
we'll also only gen a trace for the first one, I see no real pressing need
to generate more, given that that would *massively* negate this patch otherwise
2022-03-19 12:35:56 +00:00
Jake Potrebic 855637f967 Updated Upstream (CraftBukkit) (#7624)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
e9f972d6 Improve CreativeCategory conversion
c2698249 PR-1034: Fix exception on init of CraftCreativeCategory
f48739ca Add tests for material creative categories
2022-03-19 10:33:49 +01:00
Jason Penilla bc68ee09be Remove redundant GameProfileCache diff 2022-03-17 21:21:01 -07:00
Jason Penilla 319d5fa29f Fix state locking for getTopMRUProfiles & getProfileIfCached
Also add missing last access update in getProfileIfCached
2022-03-17 21:21:01 -07:00
Philip Kelley 2eeca6f108 Fix world saving in unloadWorld 2022-03-17 13:24:02 +01:00
Jason 8897cea0b0 Add enchantWithLevels API (#7615) 2022-03-17 09:51:43 +01:00
Jake Potrebic b8c90d2428 Added method to check snapshot state of TileStates (#7325) 2022-03-16 18:28:06 -07:00
Jake Potrebic 8788bf7441 fix datapacks not being able to modify nether/end (#7588) 2022-03-16 17:54:52 -07:00
Jason f0d0078deb Add debug for invalid GameProfiles on skull blocks/items (#7512) 2022-03-16 13:34:09 -07:00
Jake Potrebic 1c5f8b0fce Updated Upstream (Bukkit/CraftBukkit) (#7604)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
33a2b476 PR-734: Make PlayerInventory#getItem Nullable

CraftBukkit Changes:
953d3ddc SPIGOT-3034: PlayerKickEvent.setLeaveMessage(String) doesn't actually do anything
2c47af0c SPIGOT-6963: CraftMetaBlockState#getBlockState applied TileEntity ids without the minecraft namespace prefix.
2022-03-16 16:57:51 +01:00
Nassim Jahnke f35a0ceb93 Remove Java version check once and for all (#7612)
Closes #7611
2022-03-16 14:10:32 +01:00
Bjarne Koll 2d3e8f7729 Properly lookup random-ticked precipitation blocks (#7606) 2022-03-15 19:44:25 +01:00
Jason 0ca80c7ee8 Add getComputedBiome API (#5668) 2022-03-15 11:38:36 -07:00
Spottedleaf a5be178ac3 Use correct toX/Y/Z in player move packet handling 2022-03-14 12:44:36 -07:00
Owen c8e49cc53e Add get/set wait time for fish hooks. (#5595) 2022-03-13 22:33:01 +00:00
Noah van der Aa 1ce3555ada [ci-skip] Fix typo in feature request issue template (#7593) 2022-03-13 21:41:05 +00:00
Jason Penilla b65b48fd31 [ci skip] Update gradle wrapper 2022-03-13 14:25:04 -07:00
Nassim Jahnke 1358d1e914 Updated Upstream (CraftBukkit/Spigot) (#7580)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
881e06e5 PR-725: Add Item Unlimited Lifetime APIs

CraftBukkit Changes:
74c08312 SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall
64db5126 SPIGOT-6959: Make /loot command ignore empty items for spawn
2d760831 Increase outdated build delay
9ed7e4fb SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel
fc4ad813 SPIGOT-6895: Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent
59733a2e SPIGOT-6961: Actually return a copy of the ItemMeta

Spigot Changes:
ffceeae3 SPIGOT-6956: Drop unload queue patch as attempt at fixing stop issue
e19ddabd PR-1011: Add Item Unlimited Lifetime APIs
34d40b0e SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
2022-03-13 08:47:54 +01:00
Jason Penilla ab03538fa1 Fix colors in some console messages 2022-03-12 18:47:04 -07:00
Jake Potrebic 87927e176c Fix CreativeCategory API (#7586) 2022-03-12 15:32:42 -08:00
Jason bfa33d955c Various improvements to console color formatting (#7560) 2022-03-12 14:31:21 -07:00
Owen dc96bba6de Ensure the item sent isn't air (#7584) 2022-03-12 21:34:03 +01:00
Spottedleaf aab1f8a74e Fix swamp hut cat generation deadlock
The worldgen thread will attempt to get structure references
via the world's getChunkAt method, which is fine if the gen is
not cancelled - but if the chunk was unloaded, the call will block
indefinitely. Instead of using the world state, we use the already
supplied generatoraccess which will always have the chunk available.

Missed patch from tuinity merge
2022-03-12 06:32:31 -08:00
Owen ea1efef116 Remove Patches (#7541) 2022-03-11 21:13:46 +01:00
Owen 1790528a61 More projectile API (#5731) 2022-03-11 17:37:08 +01:00
Nassim Jahnke d714682f8f Add more entity api (#7564) 2022-03-11 15:24:45 +01:00
Owen 657d163740 Prevent despawned navigators being readded (#7574) 2022-03-11 02:39:11 +00:00
sulu5890 b55ba19ad3 Update README for new docs (#7561) 2022-03-09 10:10:59 +01:00
Noah van der Aa 4423e1221a Update docs link in paper.yml (#7562) 2022-03-09 10:10:53 +01:00
froobynooby 7a21333019 Fix setting the view distance to 32 (#7503) 2022-03-09 10:09:20 +01:00
Max Lee 718fab1f6b Add CPU name and JVM vendor info in timings (#7490) 2022-03-09 10:06:58 +01:00
Riley Park e0b3f3f8cb Adventure 4.10.1 2022-03-07 14:39:52 -08:00
Nassim Jahnke c34fb0942a Add ghast api (#7554) 2022-03-06 22:20:38 +01:00
Jake Potrebic d9bf5e740b Add method to set noclip on arrows (#7263) 2022-03-06 22:19:08 +01:00
Nassim Jahnke 7b9c30fb82 Fix scoreboard objective name length limit 2022-03-06 16:32:33 +01:00
Nassim Jahnke a36d7f6427 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
808cb7ca PR-1023: Improve consistency of tag API
2022-03-06 09:08:26 +01:00
Spottedleaf 1e12cf8db6 Add more to the save fixes
- Set forceTicks to true, so that player packets are always
  processed so that the main process queue can be drained
2022-03-05 17:36:57 -08:00
Spottedleaf 196271de4e Fix save problems on shutdown
- Save level.dat first, in case the shutdown is killed later
- Force run minecraftserver tasks and the chunk source tasks
  while waiting for the chunk system to empty, as there's simply
  too much trash that could prevent them from executing during
  the chunk source tick (i.e "time left in tick" logic).
2022-03-05 17:29:47 -08:00
Jake Potrebic 6564f70f4c Fix cancelling ProjectileHitEvent for piercing arrows (#7492) 2022-03-05 21:45:57 +01:00
Owen 935151388a Fix handling message in PlayerHandshakeEvent (#7542) 2022-03-05 20:20:52 +00:00
Pheotis f9b05cc3f1 Expose furnace minecart push property. (#7548) 2022-03-05 21:15:24 +01:00
Spottedleaf 1d7a6a0732 Add missing glow_item_frame walkers
Needs one for ItemStack and Entity. It looks like I missed
the entity one because Mojang defined it as being simple,
which it certainly isn't (they "missed" it too).
2022-03-04 20:57:59 -08:00
Riley Park 42a9c3789d Move Adventure patch up 2022-03-04 13:45:31 -08:00
Jason 6d4784392d replace bungeecord-chat dependency with deprecated version (#7539) 2022-03-04 13:53:36 -07:00
Nassim Jahnke b6616c8a18 Fix falling block spawn methods
For some reason Spigot broke both behavior and the method as a whole
2022-03-04 20:47:30 +01:00
JOO200 0ee6ddaf33 Add javadoc linking for adventure-text-minimessage (#7538) 2022-03-04 11:27:26 -07:00
Noah van der Aa 63aa4d3319 Clarify exception messages for invalid view distances (#7510) 2022-03-04 11:23:28 +01:00
Shane Freeder b9f26bb1e9 Add printPaperVersion task 2022-03-04 09:41:03 +00:00
Nassim Jahnke 719daa8bbf Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
4ed5af5e SPIGOT-6956: Reduce differences caused by setKeepSpawnInMemory(false)
21fe78aa SPIGOT-6957: Bad default value for WorldCreator#generatorSettings
ce373be6 PR-1022: Fix get HighestBlockAt in chunk snapshot
2022-03-04 09:33:13 +01:00
Jason c09365aeac Fix deadlock on watchdog crash (#7535) 2022-03-04 09:26:22 +01:00
Jake Potrebic 15b6b3db2c Add StructuresLocateEvent as replacement for StructureLocateEvent (#7524) 2022-03-04 09:09:43 +01:00
Jason Penilla 753bf2c103 Update paperweight to 1.3.5 2022-03-03 19:06:19 -07:00
Jake Potrebic d33cdcf2e6 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
e25c6a75 PR-638: Add CreativeCategory API for Materials

CraftBukkit Changes:
86292d3e0 PR-876: Add CreativeCategory API for Materials
2022-03-03 10:21:48 -08:00
Jason Penilla 90788a556c clean up prepareTickingChunk diff 2022-03-02 11:24:32 -07:00
Shane Freeder 12d89fe5ae Revert chunk postprocessing back to 1.18.1 logic 2022-03-02 18:08:10 +00:00
Shane Freeder c6ea84c7fa Drop unneeded desync patch
spigot no longer even fires the event for this case, so, this may
actually be a regression, not too sure here, but, as-is this patch
is dead
2022-03-02 09:44:22 +00:00
Nassim Jahnke d3caeeb6c2 Fix early registry access in xray patch 2022-03-02 10:28:32 +01:00
Nassim Jahnke b1afebbd52 Force close world loading screen on join (#7529)
Fixes infinite loading screens for dead players due to async chunk loading and player chunk loading patches and prevents players from missing messages and similar if chunk loading is slow
2022-03-02 10:21:30 +01:00
Jake Potrebic 178802ab94 Fix various 1.18.2 update issues (#7523) 2022-03-01 14:40:34 -08:00
Jake Potrebic 14add2b049 Updated Upstream (CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
6e755020a SPIGOT-6952: Tag#isTagged throws NullPointerException in 1.18.2
2022-03-01 14:05:10 -08:00
Jason Penilla 0859f59469 1_18_R2 2022-03-01 00:10:23 -07:00
Jason PenillaandJake Potrebic ab8a139612 Configure javadoc overview and doc-files copying
closes #7462

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-02-28 22:52:40 -07:00
Jason Penilla 126ca7376e Add TODO for leaf 2022-02-28 22:52:40 -07:00
Jason Penilla b9037a5c7d fix issue resulting from kenny's apatch addiction 2022-02-28 22:52:40 -07:00
Jake Potrebic 146ac7bcd6 address failing mob goals test 2022-02-28 22:52:40 -07:00
Jake Potrebic cc45a355a4 move decompile fixes to start of git history 2022-02-28 22:52:39 -07:00
Jake Potrebic 5071d50207 clean up view distance api diff 2022-02-28 22:52:39 -07:00
Jason Penilla fd7432601d update reobf-mappings-patch.tiny 2022-02-28 22:52:39 -07:00
Jake Potrebic 3526f22211 move patch relying on TraceUtil to after its creation 2022-02-28 22:52:39 -07:00
Jake Potrebic fbe43d6a1d clean up patch changes 2022-02-28 22:52:39 -07:00
Spottedleaf c6fc144ba0 Fix unload stall
Also added required tickets that should not be removed during
shutdown
2022-02-28 22:52:39 -07:00
Jason Penilla 37436ac61a Move comment up 2022-02-28 22:52:38 -07:00
Riley Park 9a73213f88 Adventure 4.10.0 2022-02-28 22:52:38 -07:00
Jake Potrebic 9da236fe6a re-add config for stronghold seed patch 2022-02-28 22:52:38 -07:00
Jake Potrebic 490517d31e fixed flat bedrock patch 2022-02-28 22:52:38 -07:00
Nassim Jahnke c98499113f Fix mc dev fix by removing it 2022-02-28 22:52:38 -07:00
Nassim Jahnke 02e2402161 Update README 2022-02-28 22:52:37 -07:00
Nassim Jahnke 706c98a603 Update Datafixer 2022-02-28 22:52:37 -07:00
Jake Potrebic f4eb08a477 Readd 'Fix entity type tags suggestions in selectors' 2022-02-28 22:52:37 -07:00
Jake Potrebic 19f9520b3a 1.18.2 compiles successfuly now 2022-02-28 22:52:37 -07:00
Jake Potrebic 60af9b0cb3 moar fixes 2022-02-28 22:52:37 -07:00
Nassim Jahnke 12efc3fcf5 Fixes 2022-02-28 22:52:36 -07:00
Nassim Jahnke c2e2281f29 Initial 1.18 update 2022-02-28 22:52:35 -07:00
Shane Freeder 30cb7d0407 ignore excessive vel for Minecarts (Fixes #7515) 2022-02-28 15:31:41 +00:00
Spottedleaf 7f65b0b589 Add DataConverter to StructureCheck, for structure lookups
Mojang added a partial conversion here to quickly check for
structures, which bypasses the chunk system. So we need a
hook here.
2022-02-25 08:46:35 -08:00
Jake Potrebic bfa50ad5b3 Custom Potion Mixes (#6744) 2022-02-22 19:09:15 -08:00
Jake Potrebic 2a55e35124 Option to have default CustomSpawners in custom worlds (#7493) 2022-02-23 02:44:06 +00:00
Owen b6dad9c903 Fix desync on teleporting entity on first tick (#7183) 2022-02-23 02:20:29 +00:00
Noah van der Aa 04a337af59 Add some missing deprecations to the adventure patch (#7500) 2022-02-23 02:11:52 +00:00
Jake Potrebic 501834e57a Fix custom inventory holders (#6199) 2022-02-22 15:00:45 -08:00
Spottedleaf db811631ae Execute mid tick tasks during tile entity ticking
It was never done here in the past since the old TE management
system was barely functional, and could not handle chunk loading
remotely well
2022-02-22 14:42:00 -08:00
Spottedleaf 854f3d35c1 Put world into worldlist before initing the world
Some parts of legacy conversion will need the overworld
to get the legacy structure data storage
2022-02-22 14:28:34 -08:00
Spottedleaf cdb893bb9e Add mid-tick task execution to block ticking
Dropped from the ticking block list rewrite
2022-02-22 14:24:28 -08:00
Jason Penilla 9cab01ed1d [ci skip] Update Gradle wrapper to 7.4 2022-02-21 13:44:17 -07:00
Jake Potrebic b757019dc5 Add missing block data mins and maxes (#6790) 2022-02-20 13:58:31 -08:00
Jake Potrebic 392acfdaa4 Configurable sculk sensor listener range (#6443) 2022-02-20 13:44:14 -08:00
Jake Potrebic 36a1650dbf Furnace RecipesUsed API (#7399) 2022-02-19 14:00:33 -08:00
Nassim Jahnke 7b8e0c3acf Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
6fac07eb SPIGOT-6935: Make Arrow color nullable
abbc5c55 PR-730: Added a checkstyle rule to check for missing package declarations.
97157b12 PR-730: Added missing declaration of the org.bukkit.profile package.
9dcee1dc PR-727: Fix typo in StriderTemperatureChangeEvent javadocs

CraftBukkit Changes:
1e87776a SPIGOT-6935: Make Arrow color nullable
2022-02-19 13:50:20 +01:00
Jake Potrebic 5bb4549f48 Fix entity armor not showing on death animation (#7355) 2022-02-18 10:16:41 -08:00
Spottedleaf 286bd1bfb5 1.18 misc performance dev branch (#7368)
- Port player chunk loader patch
Makes the chunk system act as it did in 1.17, no additional tickets (and thus logic) to make a chunk ticking.
Adds simulation distance API, deprecates old no-tick method.
- More collision optimisations
Ancient patch from tuinity that never could be pushed to master.
- Fix Optimise ArraySetSorted#removeIf patch
- Execute chunk tasks fairly for worlds while waiting for next tick
- Port Replace ticket level propagator
2022-02-18 09:44:46 -08:00
Bjarne Koll b173c3ee2c Use access transformers for player profile API (#7468) 2022-02-18 09:30:37 -08:00
Jake Potrebic f5b9e07a2a Add GameEvent tags (#6439) 2022-02-17 18:42:22 -08:00
Shane Freeder 2a4aef3d97 Mark ChatRender#render as ApiStatus.Override 2022-02-18 01:32:48 +00:00
Nassim Jahnke c50fc3a026 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7480)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
8d818032 PR-723: Add Furnace#getRecipesUsed
d7b5a313 PR-726: Add Particle dataTypes to javadocs
72fe8b71 PR-724: Add PDC to World

CraftBukkit Changes:
c0326c28 PR-1009: Add Furnace#getRecipesUsed
cc5ddd79 PR-1010: Add PDC to World
6a54e5d3 PR-1012: Always save as skull owner and not as internal data

Spigot Changes:
699290cd Rebuild patches
2022-02-15 11:30:58 +01:00
Jason Penilla a8f2d67491 - properly fix IllegalArgumentException in /paper mobcaps command
- fix IllegalArgumentException in `/paper playermobcaps` command
- add missing Validate calls to CraftServer#getSpawnLimit(SpawnCategory)
2022-02-12 12:50:27 -07:00
Noah van der Aa e6898ff61e Fix IllegalArgumentException for /paper mobcaps command (#7472) 2022-02-12 19:02:14 +00:00
Nassim Jahnke 92c777d393 Fix PlayerProfile BukkitObject serialization, deprecate setName and setId for removal (#7471)
Having a modifiable hash here is a bit flawed and most developers should never need these methods
2022-02-12 19:29:41 +01:00
Noah van der Aa 9567753460 Don't load plugins prefixed with a dot (#7392) 2022-02-12 15:03:51 +01:00
Jake Potrebic 3d91ecac51 Fix cancelled snow bucket placement (#6751) 2022-02-12 14:56:27 +01:00
Jake Potrebic 2c4a5892ec Fix issues with LimitedRegion (#7343)
These issues stemmed from Paper integrating new upstream API
that was duplicated by a lot of existing Paper API
2022-02-12 14:51:13 +01:00
Jake Potrebic 2c8d48c555 Make Panda implement Sittable (#7414) 2022-02-12 14:36:41 +01:00
IzzelAliz 4a745f9163 Optimize Util#sequence (#7115)
Basically the same diff is already in Vanilla 22w06a, so might as well merge this now/have a conflict to know to remove the stream they added
2022-02-12 14:28:41 +01:00
Nassim Jahnke 26734e83b0 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7454)
* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
8085edde SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
04c7e13c PR-719: Add Player Profile API
71564210 SPIGOT-6910: Add BlockDamageAbortEvent

CraftBukkit Changes:
febaa1c6 SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
9dafd109 Don't send updates over large distances
bdac46b0 SPIGOT-6782: EntityPortalEvent should not destroy entity when setTo() uses same world as getFrom()
8f361ece PR-1002: Add Player Profile API
911875d4 Increase outdated build delay
e5f8a767 SPIGOT-6917: Use main scoreboard for /trigger
a672a531 Clean up callBlockDamageEvent
8e1bdeef SPIGOT-6910: Add BlockDamageAbortEvent

Spigot Changes:
6edb62f3 Rebuild patches
7fbc6a1e Rebuild patches

* Updated Upstream (CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
de951355 SPIGOT-6927: Fix default value of spawn-limits in Worlds
2022-02-12 14:20:33 +01:00
Bjarne Koll 00da0989f3 Log exceptions thrown during chat processing (#7467) 2022-02-11 19:42:12 -07:00
Nassim JahnkeandJason Penilla 0cc2503b88 Implement World#regenerateChunk (#7425)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2022-02-05 20:47:11 +01:00
PureGero 6df46412cf Use destination world when preloading spawn chunk (#7441) 2022-02-04 09:30:13 +01:00
Jason 46ed080d3b fix portal linking in upgraded chunks (fixes #7419) (#7438) 2022-02-03 12:28:39 -07:00
Jason 9940bcabcc API for creating command sender which forwards feedback (#7432) 2022-02-02 19:44:57 -07:00
Nassim Jahnke f23c03955b Fix infinite recursion in spawnCategoryForChunk/Position 2022-02-02 21:57:11 +01:00
Spottedleaf 2ec04e0938 Use correct headerLocation for regionfile initialisation
If the regionfile cannot be recalculated (i.e entity/poi type),
then attempts to remove the invalid entry would blow up
2022-02-02 06:02:16 -08:00
Shane Freeder 2121aed33d Rebuild patches
Cos, you know, pushing the correct changes the first time woulda been
overrated
2022-02-01 13:06:41 +00:00
Shane Freeder f79c0daece Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
5c21a63f PR-717: Add PlayerHideEntityEvent and PlayerShowEntityEvent

CraftBukkit Changes:
c26a7b54d PR-1000: Add PlayerHideEntityEvent and PlayerShowEntityEvent
2022-02-01 11:35:36 +00:00
Shane Freeder 17eb8845f3 Use a CHM for StructureTemplate.Pallete cache
fixes a CME due to this collection being shared across threads

This patch was in 1.16.5 for a good while and noticed somebody
getting impacted by the same thing
2022-02-01 09:47:46 +00:00
Jake Potrebic 3109dd87ee Updated Upstream (Bukkit/CraftBukkit) (#7428) 2022-01-31 15:56:54 -08:00
Jason Penilla 41263d9231 [ci skip] Update paperweight to 1.3.4 2022-01-27 13:19:45 -07:00
Noah van der Aa 2e99e5e677 Updated Upstream (Bukkit/CraftBukkit) (#7411)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
af88996a SPIGOT-6890: Add repair cost amount in AnvilInventory
bc7bd363 PR-716: Fix scheduler javadocs (previously, the <b> tag broke the rendering)
6db1ab70 Improve item cooldown JavaDocs

CraftBukkit Changes:
13670b44 SPIGOT-6890: Add repair cost amount in AnvilInventory
0d109e86 PR-999: Prevent non-item cooldowns
2022-01-27 15:35:36 +01:00
Jason Penilla ca523abbdd [ci skip] Fix param mismatch from last commit 2022-01-25 20:53:18 -07:00
Jason Penilla f7dbd062e7 [ci skip] Update parameter mappings 2022-01-25 20:44:24 -07:00
Jason Penilla b164899084 Update tiny-remapper 2022-01-25 20:22:49 -07:00
Jake Potrebic 9490475b02 Add STRUCTURE_TYPE registry entry (#6400) 2022-01-23 11:12:42 -08:00
Jake Potrebic 7978121c7c More PotionEffectType API (#5737) 2022-01-23 10:42:38 -08:00
Jake Potrebic f6c7d536a8 Add configurable stronghold seed (#7334) 2022-01-23 15:26:22 +01:00
Owen a058ac05d8 Dolphin API (#7102) 2022-01-23 14:55:11 +01:00
Owen 9a1930867b Lock Frozen Ticks API (#7207) 2022-01-23 14:35:07 +01:00
MrPowerGamerBRandJake Potrebic 0a9602c412 [ci skip] Fix multiple ItemStack array nullability mistakes (#7055)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-01-22 17:40:57 -08:00
Jake Potrebic 512995c2a5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7359) 2022-01-22 16:59:56 -08:00
Kezz 60e46abb00 Fix NotePlayEvent (#5180) 2022-01-21 23:42:10 -08:00
Jake Potrebic dcca6cb1be Make tag presets unmodifiable (#7378) 2022-01-21 15:07:35 -08:00
JanandJan Boerman feb72b8ae1 Update ASM EventExecutor generator patch to respect event handler return types. Fixes #7311 (#7317)
Co-authored-by: Jan Boerman <janboerman95@gmail.com>
2022-01-20 12:54:57 -07:00
Brody Beckwith 2a306f513c Add Multi Block Change API (#7333) 2022-01-20 18:50:50 +01:00
Riley Park 128691a963 Deprecate log4j logger method in Plugin 2022-01-19 18:39:27 -08:00
Noah van der Aa c904da6eab Offset spigot item optimizations instead of Mojang's (#6290) 2022-01-19 11:18:24 -08:00
Jake Potrebic 45338214b0 Fix setSpawnedItem from 1.18 update (#7328) 2022-01-18 19:09:04 -08:00
Jake Potrebic 6b526f9645 Fix setting unplaced furnace cook speed multiplier (#7327) 2022-01-18 11:33:37 -08:00
Jason 7c3893c0c4 Warn on strange @EventHandler return types (#7372) 2022-01-18 11:47:54 -07:00
Noah van der Aa f1db23e47f [ci skip] Fix incorrect javadoc for Mob pathfinding API (#6842) 2022-01-17 23:26:11 -08:00
Nassim Jahnke 919e59494c Push illegal char kick to main thread (#7363) 2022-01-17 23:16:36 -08:00
Jake Potrebic 048e030914 Change default for hoppers ignoring occluded blocks (#7342) 2022-01-17 23:11:11 -08:00
HexedHero 17e1f65669 Fix Lure infinite loop (#6850) 2022-01-17 22:54:31 -08:00
Camotoy 60b7d5ee0c Add unsupported field to disable username validation (#7350)
* Add unsupported field to disable username validation

* Add unsupported field to disable username validation
2022-01-17 19:52:47 -08:00
Owen 6d67504ab5 Expand Panda API (#7061) 2022-01-17 15:23:44 -08:00
Jake Potrebic 99cf01f993 Fix and deprecate ItemStack#getI18NDisplayName (#7358) 2022-01-16 16:53:26 -08:00
Jake Potrebic 5c74af2efa Fix NPE for bucket empty result stack being null (#7354) 2022-01-16 12:08:24 -08:00
Jake Potrebic 36ce000793 Fix xp reward for baby zombies (#7353) 2022-01-16 20:15:16 +01:00
PureGero 78999b5778 Remove redundant getRemoteAddress that can cause an NPE (#7331) 2022-01-13 19:56:45 -08:00
Jake Potrebic 6663747b89 Some block state hunks were in the wrong patch (#7308) 2022-01-13 11:31:48 -08:00
Jake Potrebic 0c64d401aa Updated Upstream (Bukkit/CraftBukkit) (#7323) 2022-01-12 13:39:20 -08:00
John ebaca20edd Added getHostname to AsyncPlayerPreLoginEvent (#6656) 2022-01-12 09:21:29 -08:00
Nassim Jahnke cb198ff936 Fix chunk range int overflow 2022-01-11 19:34:25 +01:00
Shane Freeder 6f0762c012 Fix defaults for slime-spawn-height in paper config
do note that if you happened to grab the previous build in the few minutes it
was alive, you'll want to reset your settings here

also, i
2022-01-11 02:55:05 +00:00
Pedro 31f01379ce Add configurable height for slime spawn per world (#6310) 2022-01-10 18:27:16 -08:00
Nassim Jahnke 3ea224d128 Reset placed blocks on exceptions 2022-01-10 14:03:18 +01:00
Tom Miller 87d8ef9f24 Add/Remove multiple entries with Scoreboard Team (#6640) 2022-01-09 21:08:55 -08:00
Jacob Andersen 2be9beb5dc Add material tags for deepslate ores (#7174) 2022-01-09 20:25:22 -08:00
a736c1a3c7 Add new overload to PersistentDataContainer#has (#7278)
Co-authored-by: u9g <winworkswow@gmail.com>
Co-authored-by: Josh Roy <joshroy126@gmail.com>
2022-01-09 11:35:45 -05:00
Jake Potrebic 7d7ae7b881 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7246) 2022-01-08 21:12:05 -08:00
Jason d9fb602057 Expose vanilla BiomeProvider from WorldInfo (#7295) 2022-01-07 15:35:32 -08:00
Spottedleaf eb48ada00b Merge chunk task urgent executor thread into the worker queue
By keeping them separate, urgent tasks could not be executed
by the worker queue.
2022-01-07 15:15:35 -08:00
Spottedleaf 5ccd3050ed Fix incorrect old oversized chunk data merging
All legacy oversized chunks were created before the new
chunk format, so don't try to merge into the new format.
2022-01-07 13:49:39 -08:00
Brokkonaut c3d812d341 Make water animal spawn height configurable (#7135) 2022-01-07 11:38:51 +01:00
Nassim Jahnke 9a47cf1834 Don't print utterly useless brig exception 2022-01-06 13:11:08 +01:00
Nassim Jahnke e64ac41fe2 Catch more json parse errors 2022-01-06 12:40:51 +01:00
Jake Potrebic 55a1756ade Fix saving configs with more long comments (#7248) 2022-01-05 11:54:42 -08:00
Nassim Jahnke 20c131b96b [ci skip] Add forums to readme (#7286) 2022-01-05 13:58:11 +01:00
Nassim Jahnke 5e30e19e20 Fix compile 2022-01-03 10:23:56 +01:00
Nassim Jahnke 00d6cca4df Fix filtered text not being applied on sign update
Fixes #7266
2022-01-03 10:17:27 +01:00
Jake Potrebic eb98398158 Fixed FishingHook param mappings being swapped (#7243) 2022-01-02 22:24:33 -08:00
Nassim Jahnke d0b8b1e972 Fix disarmed tripwire block updates
Fixes #7259
Closes #7261
2022-01-02 21:33:53 +01:00
Jason 79dd62ae62 Use AreaMap for per-player mob spawning (#7235) 2022-01-02 11:06:08 -08:00
Pierre Maurice Schwang 19bc612483 Make BlockData creation thread safe again (#6876) 2022-01-02 18:29:21 +01:00
sean d3f3429d03 Use simulation distance for per-player mob spawns (#7247) 2022-01-02 15:05:08 +01:00
Shane Freeder 503ac8f1cb Provide option to disable username validation (Closes #7250) (#7254) 2022-01-02 12:51:22 +00:00
Noah van der Aa cee7e0df01 Fix soul speed particles with hide-itemmeta enabled (#7239) 2022-01-01 15:26:53 -08:00
thamid-gamer fb4ff200f4 Use isSensitiveToWater in nerfed check for water-sensitive mobs (#7236) 2022-01-01 13:56:41 -08:00
Spottedleaf 3c5284dae9 Allow . in usernames 2022-01-01 11:50:44 -08:00
Spottedleaf 4bf2aef745 Validate usernames 2022-01-01 05:48:17 -08:00
Jake Potrebic 3a43821c38 Updated Upstream (Bukkit/CraftBukkit/Spigot) 2021-12-31 19:05:42 -08:00
Jason 8b1734123e Fix vanilla LocalMobCapCalculator being used when per-player mob spawning is enabled (#7230) 2021-12-31 18:07:21 -08:00
Jason Penilla fa438331e0 [ci skip] Update shadow and remove semicolons from kotlin code 2021-12-31 14:28:13 -08:00
Simon Gardling 58c41d0f60 [ci skip] Update log4j-api in Paper-API to 2.17.1 (#7227) 2021-12-31 14:26:20 -08:00
Jason Penilla c40e04e9e7 Remove wrong update call in distance map add method 2021-12-31 13:59:34 -08:00
Noah van der Aa 64f9225c94 Fix riding distance statistics (#7021/SPIGOT-6475) (#7033) 2021-12-30 23:17:08 -08:00
LemonCaramel 686bbd33d4 Fix EntityLoadCrossbowEvent Sync Issue (#5739) 2021-12-30 22:54:23 -08:00
LexiandJake Potrebic 2d458ee14f Check player world in endPortalSoundRadius (#6226)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-12-30 19:50:44 -08:00
Owen1212055 721f14842f [ci skip] Change test logging settings to log by default (#7203) 2021-12-30 13:52:30 -08:00
Owen1212055 a99a33cdd9 Bucketable API (#7204) 2021-12-30 11:58:38 -08:00
Jake Potrebic 7b833ca18f Fix bees aging inside hives (#6466) 2021-12-30 11:44:39 -08:00
2954 changed files with 328209 additions and 175677 deletions

No files matched your search

+30
View File
@@ -4,9 +4,39 @@ end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=4
ij_any_block_comment_add_space = false
ij_any_block_comment_at_first_column = false
ij_any_line_comment_at_first_column = false
ij_any_line_comment_add_space = true
[*.tiny]
indent_style=tab
[*.bat]
end_of_line=crlf
[*.yml]
indent_size=2
[*.patch]
trim_trailing_whitespace=false
[*.java]
ij_continuation_indent_size = 4
ij_java_class_count_to_use_import_on_demand = 999999
ij_java_insert_inner_class_imports = false
ij_java_names_count_to_use_import_on_demand = 999999
ij_java_imports_layout = *,|,$*
ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true
ij_java_method_parameters_new_line_after_left_paren = true
ij_java_method_parameters_right_paren_on_new_line = true
[test-plugin/**/*.java]
ij_java_use_fq_class_names = false
[Paper-Server/src/main/resources/data/**/*.json]
indent_size = 2
[paper-api-generator/generated/**/*.java]
ij_java_imports_layout = $*,|,*
+1 -1
View File
@@ -1,4 +1,4 @@
* text=auto
* text=auto eol=lf
*.sh text eol=lf
gradlew text eol=lf
+1 -1
View File
@@ -1,2 +1,2 @@
* @PaperMC/maintainers
* @PaperMC/paper-maintainers
/.github/CODEOWNERS @PaperMC/core-team
+42
View File
@@ -0,0 +1,42 @@
labels: ["status: needs triage"]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a feature request for Paper! Please be as detailed as possible so that we may consider and review the request easier.
We ask that you search all the issues to avoid a duplicate feature request. If one exists, please reply if you have anything to add.
Before requesting a new feature, please make sure you are using the latest version and that the feature you are requesting is not already in Paper.
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: Please give some context for this request. Why do you want it added?
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: A clear and concise description of what you want.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered.
description: List any alternatives you might have tried to get the feature you want.
validations:
required: true
- type: textarea
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting this feature request, please search our issue tracker to ensure your feature has not
already been requested.
@@ -1,77 +0,0 @@
name: Behavior Bug or Plugin Incompatibility
description: Report issues with plugin incompatbility or other behavior related issues.
labels: [ "status: needs triage", "type: bug" ]
body:
- type: textarea
attributes:
label: Expected behavior
description: What you expected to see.
validations:
required: true
- type: textarea
attributes:
label: Observed/Actual behavior
description: What you actually saw.
validations:
required: true
- type: textarea
attributes:
label: Steps/models to reproduce
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue.
validations:
required: true
- type: textarea
attributes:
label: Plugin and Datapack List
description: |
All plugins and datapacks running on your server.
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
validations:
required: true
- type: textarea
attributes:
label: Paper version
description: |
Run `/version` on your server and **paste** the full, unmodified output here.
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
<details>
<summary>Example</summary>
```
> version
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[20:34:42 INFO]: Checking version, please wait...
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
[20:34:42 INFO]: You are running the latest version
```
</details>
validations:
required: true
- type: textarea
attributes:
label: Other
description: |
Please include other helpful information below.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting this issue, please ensure the following:
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads).
2. You searched for and ensured there isn't already an open issue regarding this.
3. Your version of Minecraft is supported by Paper.
If you think you have a bug but are not sure, feel free to ask the `#paper-help` channel of our
[Discord](https://discord.gg/papermc).
@@ -0,0 +1,79 @@
name: "🐛 Bug or Incompatibility"
description: Report issues related to unexpected behavior or vanilla/plugin incompatibility.
type: "Bug"
labels:
- "status: needs triage"
body:
- type: markdown
attributes:
value: |
Before submitting this issue, please ensure the following:
1. You are using the latest version of Paper, available on our [our downloads page](https://papermc.io/downloads/paper).
2. You have searched to confirm there isn’t [an existing open issue](https://github.com/PaperMC/Paper/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug) on this topic.
3. Your version of Minecraft is supported by Paper.
If you're unsure whether you've encountered a bug, feel free to ask in the `#paper-help` channel on our
[Discord](https://discord.gg/papermc).
- type: textarea
attributes:
label: Expected behavior
description: What you expected to see.
validations:
required: true
- type: textarea
attributes:
label: Observed/Actual behavior
description: What you actually saw.
validations:
required: true
- type: textarea
attributes:
label: Steps/models to reproduce
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue.
validations:
required: true
- type: textarea
attributes:
label: Plugin and Datapack List
description: |
All plugins and datapacks running on your server.
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
validations:
required: true
- type: textarea
attributes:
label: Paper version
description: |
Run `/version` on your server and **paste** the full, unmodified output here.
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
<details>
<summary>Example</summary>
```
> version
[20:34:42 INFO]: Checking version, please wait...
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
[20:34:42 INFO]: You are running the latest version
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
```
</details>
validations:
required: true
- type: textarea
attributes:
label: Other
description: |
Please include other helpful information below.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
+6 -6
View File
@@ -1,10 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: PaperMC Discord
url: https://discord.gg/papermc
about: If you are having issues with timings or have other minor issues, come ask us on our Discord server!
- name: Exploit Report
- name: "❗Exploits"
url: https://discord.gg/papermc
about: |
Due to GitHub not currently allowing private issues, exploit reports are currently handled via our Discord.
To report an exploit, see the #paper-exploit-report channel.
Since GitHub doesn’t currently support private issues, exploit reports are managed through our Discord.
To report an exploit, please visit the #paper-exploit-report channel.
- name: "🗨 Questions"
url: https://discord.gg/papermc
about: If you have questions or need help with any minor issues, feel free to ask us on our Discord server!
@@ -0,0 +1,78 @@
name: "💥 Crash or Stacktrace"
description: Report any server crashes or alarming stack traces.
type: "Bug"
labels:
- "status: needs triage"
body:
- type: markdown
attributes:
value: |
Before submitting this issue, please ensure the following:
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
2. Your version of Minecraft is supported by Paper.
If your server crash log contains `DO NOT REPORT THIS TO PAPER`, please ask in our
[Discord](https://discord.gg/papermc) before opening this issue. These messages are informing you of server
lag and providing debug information.
- type: textarea
attributes:
label: Stack trace
description: |
We need all of the stack trace! Do not cut off parts of it. Please do not use attachments.
If you prefer, you can use a paste site like https://mclo.gs.
value: |
```
paste your stack trace or a mclo.gs link here!
```
placeholder: Please don't remove the backticks; it makes your issue a lot harder to read!
validations:
required: true
- type: textarea
attributes:
label: Plugin and Datapack List
description: |
All plugins and datapacks running on your server.
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
validations:
required: true
- type: textarea
attributes:
label: Actions to reproduce (if known)
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue. Anything helps!
validations:
required: false
- type: textarea
attributes:
label: Paper version
description: |
Run `/version` on your server and **paste** the full, unmodified output here.
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
<details>
<summary>Example</summary>
```
> version
[20:34:42 INFO]: Checking version, please wait...
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
[20:34:42 INFO]: You are running the latest version
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
```
</details>
validations:
required: true
- type: textarea
attributes:
label: Other
description: |
Please include other helpful information below, if any.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
@@ -1,44 +0,0 @@
name: Feature Request
description: Suggest an idea for Paper
labels: [ "status: needs triage", "type: feature" ]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a feature request for Paper! Please be as detailed as possible so that we may consider and review the request easier.
We ask that you search all the issues to avoid a duplicate feature request. If one exists, please reply if you have anything to add.
Before requesting a new feature, please make sure you are using the latest version and that the feature you are requesting is not already in Paper.
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: Please give some context for this request. Why do you want it added?
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: A clear and concise description of what you want.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered.
description: List any alternatives you might have tried to get the feature you want.
validations:
required: true
- type: textarea
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting this feature request, please search our issue tracker to ensure your feature has not
alerady been requested.
+53
View File
@@ -0,0 +1,53 @@
name: "💡 New Feature"
description: Propose a new idea for Paper.
type: "Feature"
labels:
- "status: needs triage"
body:
- type: markdown
attributes:
value: |
Thank you for submitting a feature request for Paper! Please be as detailed as possible to help us review and consider your request effectively.
Before submitting, please ensure the following:
1. You are using a supported version of Paper.
2. The feature you’re requesting isn’t already included in the version you’re using.
3. You’ve searched for and confirmed there isn’t already [an open request](https://github.com/PaperMC/Paper/issues?q=is%3Aissue%20is%3Aopen%20type%3AFeature) for this feature.
- If a similar request exists, feel free to add any additional details you think are helpful.
If you have any questions, feel free to ask in the `#paper-help` or `#paper-dev` channels on our [Discord](https://discord.gg/papermc).
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: Please provide some context for this request. Why do you want it added?
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: A clear and concise description of what you want.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered.
description: List any alternatives you might have tried to get the feature you want.
validations:
required: true
- type: textarea
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting this feature request, please search our issue tracker to ensure your feature has not
already been requested.
+25 -18
View File
@@ -1,7 +1,19 @@
name: Performance Problem
description: Report performance related problems or other areas of concern
labels: [ "status: needs triage", "type: performance" ]
name: "🐌 Performance Problem"
description: Report any performance issues.
type: "Bug"
labels:
- "scope: performance"
- "status: needs triage"
body:
- type: markdown
attributes:
value: |
Before submitting this issue, please ensure the following:
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
2. You searched for and ensured there isn't already [an open issue](https://github.com/PaperMC/Paper/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug) regarding this.
3. Your version of Minecraft is supported by Paper.
- type: markdown
attributes:
value: |
@@ -10,9 +22,12 @@ body:
- type: input
attributes:
label: Timings or Profile link
description: We ask that all timings/profiles are a link, not a screenshot. Screenshots inhibit our ability to figure out the real cause of the issue.
placeholder: "Example: https://timings.aikar.co/?id=6b48586fbbdd48e585ca0ebb07c59dd0"
label: Spark Profile
description: |
Please provide all profiles as links rather than screenshots. Screenshots limit our ability to investigate the root cause of the issue.
For more information, see our [profiling documentation](https://docs.papermc.io/paper/profiling).
placeholder: "Example: https://spark.lucko.me/XsN0hxGfsi"
validations:
required: true
@@ -35,10 +50,10 @@ body:
- type: textarea
attributes:
label: Server config files
description: We need bukkit.yml, spigot.yml, paper.yml, and server.properties. You can paste it below or use a paste site like https://paste.gg.
description: We need bukkit.yml, spigot.yml, paper-global.yml, paper-world-defaults.yml and server.properties. If you use per-world Paper configs, make sure to include them. You can paste it below or use a paste site like https://mclo.gs.
value: |
```
Paste configs or paste.gg link here!
Paste configs or mclo.gs link here!
```
placeholder: Please don't remove the backticks; it makes your issue a lot harder to read!
validations:
@@ -56,10 +71,10 @@ body:
```
> version
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[20:34:42 INFO]: Checking version, please wait...
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
[20:34:42 INFO]: You are running the latest version
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
```
</details>
@@ -74,11 +89,3 @@ body:
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting this issue, please ensure the following:
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads).
2. You searched for and ensured there isn't already an open issue regarding this.
3. Your version of Minecraft is supported by Paper.
@@ -1,76 +0,0 @@
name: Server crash or Stacktrace
description: Report server crashes or scary stacktraces
labels: [ "status: needs triage" ]
body:
- type: textarea
attributes:
label: Stack trace
description: |
We need all of the stack trace! Do not cut off parts of it. Please do not use attachments.
If you prefer, you can use a paste site like https://paste.gg.
value: |
```
paste your stack trace or a paste.gg link here!
```
placeholder: Please don't remove the backticks; it makes your issue a lot harder to read!
validations:
required: true
- type: textarea
attributes:
label: Plugin and Datapack List
description: |
All plugins and datapacks running on your server.
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
validations:
required: true
- type: textarea
attributes:
label: Actions to reproduce (if known)
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue. Anything helps!
validations:
required: false
- type: textarea
attributes:
label: Paper version
description: |
Run `/version` on your server and **paste** the full, unmodified output here.
"latest" is *not* a version; we require the output of `/version` so we can adequately track down the issue.
Additionally, do NOT provide a screenshot, you MUST paste the entire output.
<details>
<summary>Example</summary>
```
> version
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[20:34:42 INFO]: Checking version, please wait...
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
[20:34:42 INFO]: You are running the latest version
```
</details>
validations:
required: true
- type: textarea
attributes:
label: Other
description: |
Please include other helpful information below, if any.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting this issue, please ensure the following:
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads).
2. Your version of Minecraft is supported by Paper.
If your server crash log contains `DO NOT REPORT THIS TO PAPER`, please ask in our
[Discord](https://discord.gg/papermc) before opening this issue. These messages are informing you of server
lag and providing debug information.
-18
View File
@@ -1,18 +0,0 @@
daysUntilStale: 60
daysUntilClose: 7
exemptLabels:
- "for: future"
- "type: bug"
- "status: accepted"
- "status: blocked"
- "status: in progress"
- "status: rebase required"
staleLabel: "resolution: stale"
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
closeComment: >
This issue has been automatically closed because it has not had activity in
a long time. If the issue still applies to the most recent supported
version, please open a new issue referencing this original issue.
+110 -27
View File
@@ -1,33 +1,116 @@
# Here lie dragons!
#
# Note that there is no artifact step in this script. We do not want Paperclip
# jars to be built for every push & PR; our CI handles pushes to branches, while
# PRs can themselves link to Paperclip jars if it is necessary. Official such
# PRs will take use of testing builds.
# This action either builds the server or
# builds a paperclip jar to be updated in the body
# of the PR relating to this action.
name: Build Paper
on: [push, pull_request]
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
- labeled
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [17]
fail-fast: true
steps:
- uses: actions/checkout@v2.3.5
- name: JDK ${{ matrix.java }}
uses: actions/setup-java@v2.3.1
with:
java-version: ${{ matrix.java }}
cache: 'gradle'
distribution: 'temurin'
- name: Patch and build
run: |
git config --global user.email "no-reply@github.com"
git config --global user.name "Github Actions"
./gradlew applyPatches --stacktrace
./gradlew build --stacktrace
build:
# Run on all label events (won't be duplicated) or all push events or on PR syncs not from the same repo
if: (github.event_name == 'pull_request' && github.event.action == 'labeled') || github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
strategy:
matrix:
java: [21]
fail-fast: true
steps:
- if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v4
- if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Configure Build
uses: actions/github-script@v7
id: determine
env:
REF_NAME: "${{ github.ref_name }}"
REF_TYPE: "${{ github.ref_type }}"
EVENT: "${{ toJSON(github.event) }}"
EVENT_TYPE: "${{ github.event_name }}"
with:
script: |
const {owner, repo} = context.repo;
const event_name = `${process.env.EVENT_TYPE}`;
const event = JSON.parse(`${process.env.EVENT}`);
const ref_type = `${process.env.REF_TYPE}`;
const ref_name = `${process.env.REF_NAME}`;
const result = {
action: "build"
};
if (event_name === "push" && ref_type === "branch") {
const {data: pulls} = await github.rest.pulls.list({ owner, repo, head: `${owner}:${ref_name}`, state: "open" });
const pull = pulls.find((pr) => !!pr.labels.find((l) => l.name === "build-pr-jar"));
if (pull) {
result["pr"] = pull.number;
result["action"] = "paperclip";
core.notice(`This is a push action but to a branch with an open PR with the build paperclip label (${JSON.stringify(result)})`);
return result;
}
} else if (event_name === "pull_request" && event.pull_request.labels.find((l) => l.name === "build-pr-jar")) {
result["pr"] = event.pull_request.number;
result["action"] = "paperclip";
core.notice(`This is a pull request action with a build paperclip label (${JSON.stringify(result)})`);
return result;
}
core.notice("This will not build a paperclip jar");
return result;
- name: Apply Patches
run: |
git config --global user.email "no-reply@github.com"
git config --global user.name "GitHub Actions"
./gradlew applyPatches --stacktrace
- name: Build
run: ./gradlew build --stacktrace
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Results (${{ matrix.java }})
path: |
**/build/test-results/test/TEST-*.xml
- name: Create Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
run: ./gradlew createMojmapPaperclipJar --stacktrace
- name: Upload Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
uses: actions/upload-artifact@v4
with:
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
path: build/libs/paper-paperclip-*-mojmap.jar
event_file:
name: "Event File"
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
+27
View File
@@ -0,0 +1,27 @@
name: Close invalid PRs
on:
pull_request_target:
types: [ opened ]
jobs:
run:
if: |
github.repository != github.event.pull_request.head.repo.full_name &&
(
github.head_ref == 'master' ||
github.event.pull_request.head.repo.owner.type != 'User'
)
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
id: "master_branch"
if: github.head_ref == 'master'
with:
comment: "Please do not open pull requests from the `master` branch, create a new branch instead."
- uses: superbrothers/close-pull-request@v3
id: "org_account"
if: github.event.pull_request.head.repo.owner.type != 'User' && steps.master_branch.outcome == 'skipped'
with:
comment: "Please do not open pull requests from non-user accounts like organizations. Create a fork on a user account instead."
+84
View File
@@ -0,0 +1,84 @@
# This workflow run on the completion of the
# build workflow but only does anything if the
# triggering workflow uploaded an artifact.
#
# Do note that it is then the trigger workflow that
# determines if this will update the PR text body. All
# this workflow does is check if an uploaded artifact
# exists and there is a PR tied to the previous workflow.
name: Comment on pull request
on:
workflow_run:
workflows: ['Build Paper']
types: [completed]
jobs:
pr_comment:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
env:
BRANCH_NAME: "${{ github.event.workflow_run.head_branch }}"
PR_OWNER: "${{ github.event.workflow_run.head_repository.owner.login }}"
PR_SHA: "${{ github.event.workflow_run.head_sha }}"
RUN_ID: "${{ github.event.workflow_run.id }}"
REPO_ID: "${{ github.event.repository.id }}"
EVENT_TYPE: "${{ github.event.workflow_run.event}}"
PULL_REQUESTS: "${{ toJSON(github.event.workflow_run.pull_requests) }}"
with:
# This snippet is public-domain, taken from
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
# Modified extensively by Machine_Maker
script: |
async function updatePR(owner, repo, issue_number, purpose, body) {
const { data } = await github.rest.issues.get({ owner, repo, issue_number });
core.debug(JSON.stringify(data, null, 2));
const marker = `<!-- bot: ${purpose} -->`;
let new_body = data.body ? data.body.trim().split(marker)[0].trim() : "";
new_body += `\n${marker}\n---\n${body}`;
core.info(`Updating the text body of PR #${issue_number} in ${owner}/${repo}`);
await github.rest.issues.update({ owner, repo, issue_number, body: new_body });
}
const { owner, repo } = context.repo;
const run_id = `${process.env.RUN_ID}`;
const repo_id = `${process.env.REPO_ID}`;
let pulls = [];
const event_type = `${process.env.EVENT_TYPE}`;
if (event_type === "push") { // if push, it's from the same repo which means `pull_requests` is populated
pulls = JSON.parse(`${process.env.PULL_REQUESTS}`);
} else {
const pr_branch = `${process.env.BRANCH_NAME}`;
const pr_sha = `${process.env.PR_SHA}`;
const pr_owner = `${process.env.PR_OWNER}`;
const { data } = await github.rest.pulls.list({ owner, repo, head: `${pr_owner}:${pr_branch}`, state: "open" });
core.debug(JSON.stringify(data, null, 2));
pulls = data.filter((pr) => pr.head.sha === pr_sha && pr.labels.find((l) => l.name === "build-pr-jar"));
}
if (!pulls.length) {
return core.notice("This workflow doesn't have any pull requests!");
} else if (pulls.length > 1) {
core.info(JSON.stringify(pulls, null, 2));
return core.error("Found multiple matching PRs");
}
const pull_request = pulls[0];
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, { owner, repo, run_id });
if (!artifacts.length) {
return core.info("Skipping comment due to no artifact found");
}
const artifact = artifacts.find((art) => art.name === `paper-${pull_request.number}`);
if (!artifact) {
return core.info("Skipping comment to no matching artifact found");
}
const link = `https://nightly.link/${owner}/${repo}/actions/artifacts/${artifact.id}.zip`;
const body = `Download the paperclip jar for this pull request: [${artifact.name}.zip](${link})`;
core.info(`Adding a link to ${link}`);
await updatePR(owner, repo, pull_request.number, "paperclip-pr-build", body);
+76
View File
@@ -0,0 +1,76 @@
name: Update Projects
on:
issues:
types:
- labeled
- unlabeled
- closed
- reopened
jobs:
bugs:
if: "github.event_name == 'issues' && contains(github.event.*.labels.*.name, 'type: bug')"
concurrency:
group: update-bugs-project-${{ github.event.issue.number }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: "authenticate"
id: "authenticate"
uses: "tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92" # v1
with:
app_id: "${{ secrets.PROJECTS_APP_ID }}"
installation_id: "36153445"
private_key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
- uses: PaperMC/update-projects-action@v0.2.0
name: Update open issue
if: github.event.issue.state == 'open'
with:
github-token: "${{ steps.authenticate.outputs.token }}"
project-url: https://github.com/orgs/PaperMC/projects/5/views/2
column-field: Status
label-to-column-map: |
{
"resolution: awaiting response": "⌛ Awaiting Response",
"resolution: cannot reproduce": "Invalid",
"resolution: duplicate": "Invalid",
"resolution: incomplete": "Invalid",
"resolution: invalid": "Invalid",
"resolution: superseded": "Invalid",
"resolution: unsupported": "Invalid",
"resolution: won't fix": "Invalid",
"resolution: works as intended": "Invalid",
"status: accepted": "✅ Accepted",
"status: blocked": "Needs Work",
"status: defer upstream": "Needs Work",
"status: in progress": "Needs Work",
"status: input wanted": "Needs Work",
"status: needs triage": "🕑 Needs Triage",
"status: rebase required": "Needs Work",
"status: unlikely": "✅ Accepted"
}
- uses: PaperMC/update-projects-action@v0.2.0
name: Update closed issue
if: github.event.issue.state == 'closed'
with:
github-token: "${{ steps.authenticate.outputs.token }}"
project-url: https://github.com/orgs/PaperMC/projects/5/views/2
column-field: Status
clear-on-no-match: false
# include "status: needs triage" below to catch any closed issues without setting a resolution
label-to-column-map: |
{
"resolution: cannot reproduce": "Invalid",
"resolution: duplicate": "Invalid",
"resolution: incomplete": "Invalid",
"resolution: invalid": "Invalid",
"resolution: superseded": "Invalid",
"resolution: unsupported": "Invalid",
"resolution: won't fix": "Invalid",
"resolution: works as intended": "Invalid",
"status: accepted": "Done",
"status: needs triage": "Invalid"
}
+32
View File
@@ -0,0 +1,32 @@
name: Test Results
on:
workflow_run:
workflows: [ "Build Paper" ]
types:
- completed
permissions: { }
jobs:
test-results:
name: Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'
permissions:
checks: write
# for downloading test result artifacts
actions: read
steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@v6
with:
run_id: ${{ github.event.workflow_run.id }}
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
comment_mode: off
+5
View File
@@ -53,11 +53,15 @@ work/ForgeFlower
.idea/
out/
# JetBrains Fleet
.fleet/
# Linux temp files
*~
# other stuff
run/
logs/
Paper-Server
Paper-API
@@ -69,3 +73,4 @@ paperclip.properties
!gradle/wrapper/gradle-wrapper.jar
test-plugin.settings.gradle.kts
paper-api-generator.settings.gradle.kts
+140 -75
View File
@@ -4,11 +4,11 @@ PaperMC is happy you're willing to contribute to our projects. We are usually
very lenient with all submitted PRs, but there are still some guidelines you
can follow to make the approval process go more smoothly.
## Use a Personal Fork and not Organization
## Use a Personal Fork and not an Organization
Paper will routinely modify your PR, whether it's a quick rebase or to take care
of any minor nitpicks we might have. Often, it's better for us to solve these
problems for you than make you go back and forth trying to fix it yourself.
problems for you than make you go back and forth trying to fix them yourself.
Unfortunately, if you use an organization for your PR, it prevents Paper from
modifying it. This requires us to manually merge your PR, resulting in us
@@ -27,12 +27,12 @@ which can be obtained in (most) package managers such as `apt` (Debian / Ubuntu;
you will most likely use this for WSL), `homebrew` (macOS / Linux), and more:
- `git` (package `git` everywhere);
- A Java 17 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
- A Java 21 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
- [Adoptium](https://adoptium.net/) has builds for most operating systems.
- Paper requires JDK 17 to build, however makes use of Gradle's
- 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 8 or later installed. (Gradle will
automatically provision JDK 17 for compilation if it cannot find an existing
feature to allow building with only JRE 11 or later installed. (Gradle will
automatically provision JDK 21 for compilation if it cannot find an existing
install).
If you're on Windows, check
@@ -42,11 +42,11 @@ If you're compiling with Docker, you can use Adoptium's
[`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin/) images like so:
```console
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:17.0.1_12-jdk bash
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:21.0.3_9-jdk bash
Pulling image...
root@abcdefg1234:/# javac -version
javac 17.0.1
javac 21.0.3
```
## Understanding Patches
@@ -56,7 +56,6 @@ split into different directories which target certain parts of the code. These
directories are:
- `Paper-API` - Modifications to `Spigot-API`/`Bukkit`;
- `Paper-MojangAPI` - An API for [Mojang's Brigadier](https://github.com/Mojang/brigadier);
- `Paper-Server` - Modifications to `Spigot`/`CraftBukkit`.
Because the entire structure is based on patches and git, a basic understanding
@@ -67,7 +66,7 @@ Assuming you have already forked the repository:
1. Clone your fork to your local machine;
2. Type `./gradlew applyPatches` in a terminal to apply the changes from upstream.
On Windows, leave out the `./` at the beginning for all `gradlew` commands;
On Windows, replace the `./` with `.\` at the beginning for all `gradlew` commands;
3. cd into `Paper-Server` for server changes, and `Paper-API` for API changes.
<!--You can also run `./paper server` or `./paper api` for these same directories
respectively.
@@ -97,7 +96,9 @@ Your commit will be converted into a patch that you can then PR into Paper.
## Modifying Patches
Modifying previous patches is a bit more complex:
Modifying previous patches is a bit more complex.
Similar to adding patches, the methods to modify a patch are applied inside
the `Paper-Server` and/or `Paper-API` folders.
### Method 1
@@ -168,7 +169,7 @@ move it under the line of the patch you wish to modify;
assist you too.
- Alternatively, if you only know the name of the patch, you can do
`git commit -a --fixup "Subject of Patch name"`.
1. Rebase with autosquash: `git rebase --autosquash -i base`.
1. Rebase with autosquash: `git rebase -i --autosquash base`.
This will automatically move your fixup commit to the right place, and you just
need to "save" the changes.
1. Type `./gradlew rebuildPatches` in the root directory;
@@ -184,7 +185,9 @@ These steps assume the `origin` remote is your fork of this repository and `upst
1. Checkout feature/fix branch and rebase on master: `git checkout patch-branch && git rebase master`.
1. Apply updated patches: `./gradlew applyPatches`.
1. If there are conflicts, fix them.
1. If your PR creates new patches instead of modifying exist ones, in both the `Paper-Server` and `Paper-API` directories, ensure your newly-created patch is the last commit by either:
* If there are conflicts within `Paper-API`, after fixing them run `./gradlew rebuildApiPatches` before re-running `./gradlew applyPatches`.
* The API patches are applied first, so if there are conflicts in the API patches, the server patches will not be applied.
1. If your PR creates new patches instead of modifying existing ones, in both the `Paper-Server` and `Paper-API` directories, ensure your newly-created patch is the last commit by either:
* Renaming the patch file with a large 4-digit number in front (e.g. 9999-Patch-to-add-some-new-stuff.patch), and re-applying patches.
* Running `git rebase --interactive base` and moving the commits to the end.
1. Rebuild patches: `./gradlew rebuildPatches`.
@@ -204,37 +207,100 @@ when making and submitting changes.
## Formatting
All modifications to non-Paper files should be marked.
All modifications to non-Paper files should be marked. The one exception to this is
when modifying javadoc comments, which should not have these markers.
- Multi-line changes start with `// Paper start` and end with `// Paper end`;
- You can put a comment with an explanation if it isn't obvious, like this:
`// Paper start - reason`.
- The comments should generally be about the reason the change was made, what
it was before, or what the change is.
- Multi-line messages should start with `// Paper start` and use `/* Multi
line message here */` for the message itself.
- One-line changes should have `// Paper` or `// Paper - reason`.
- You need to add a comment with a short and identifiable description of the patch:
`// Paper start - <COMMIT DESCRIPTION>`
- The comments should generally be about the reason the change was made, what
it was before, or what the change is.
- After the general commit description, you can add additional information either
after a `;` or in the next line.
- Multi-line changes start with `// Paper start - <COMMIT DESCRIPTION>` and end
with `// Paper end - <COMMIT DESCRIPTION>`.
- One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line.
Here's an example of how to mark changes by Paper:
```java
entity.getWorld().dontbeStupid(); // Paper - was beStupid() which is bad
entity.getWorld().dontBeStupid(); // Paper - Was beStupid(), which is bad
entity.getFriends().forEach(Entity::explode);
entity.a();
entity.b();
// Paper start - use plugin-set spawn
entity.updateFriends();
// Paper start - Use plugin-set spawn
// entity.getWorld().explode(entity.getWorld().getSpawn());
Location spawnLocation = ((CraftWorld)entity.getWorld()).getSpawnLocation();
entity.getWorld().explode(new BlockPosition(spawnLocation.getX(), spawnLocation.getY(), spawnLocation.getZ()));
// Paper end
// Paper end - Use plugin-set spawn
```
We generally follow usual Java style (aka. Oracle style), or what is programmed
We generally follow the usual Java style (aka. Oracle style), or what is programmed
into most IDEs and formatters by default. There are a few notes, however:
- It is fine to go over 80 lines as long as it doesn't hurt readability.
There are exceptions, especially in Spigot-related files
- When in doubt or the code around your change is in a clearly different style,
use the same style as the surrounding code.
- Usage of the `var` keyword is heavily discouraged, as it makes reading patch files
a lot harder and can lead to confusion during updates due to changed return types.
The only exception to this is if a line would otherwise be way too long/filled with
hard to parse generics in a case where the base type itself is already obvious
### Imports
When adding new imports to a class in a file not created by the current patch, use the fully qualified class name
instead of adding a new import to the top of the file. If you are using a type a significant number of times, you
can add an import with a comment. However, if its only used a couple of times, the FQN is preferred to prevent future
patch conflicts in the import section of the file.
### Nullability annotations
We are in the process of switching nullability annotation libraries, so you might need to use one or the other:
**For classes we add**: Fields, method parameters and return types that are nullable should be marked via the
`@Nullable` annotation from `org.jspecify.annotations`. Whenever you create a new class, add `@NullMarked`, meaning types
are assumed to be non-null by default. For less obvious placing such as on generics or arrays, see the [JSpecify docs](https://jspecify.dev/docs/user-guide/).
**For classes added by upstream**: Keep using both `@Nullable` and `@NotNull` from `org.jetbrains.annotations`. These
will be replaced later.
```java
import org.bukkit.event.Event;
// don't add import here, use FQN like below
public class SomeEvent extends Event {
public final org.bukkit.Location newLocation; // Paper - add location
}
```
## Access Transformers
Sometimes, vanilla or CraftBukkit code already contains a field, method, or type you want to access
but the visibility is too low (e.g. a private field in an entity class). Paper can use access transformers
to change the visibility or remove the final modifier from fields, methods, and classes. Inside the `build-data/paper.at`
file, you can add ATs that are applied when you `./gradlew applyPatches`. You can read about the format of ATs
[here](https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers).
### Important
ATs should be included in the patch file which requires them within the commit message. Do not commit any changes to the
`build-data/paper.at` file, just use it to initially change the visibility of members until you have finalized what you
need. Then, in the commit message for the patch which requires the ATs, add a header at the bottom of the commit message
before any co-authors. It should look like the following after you `./gradlew rebuildPatches`.
```
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Wed, 8 Jun 2022 22:20:16 -0700
Subject: [PATCH] Paper config files
This patch adds Paper configuration files.
Access transformers for this patch are below, but before the co-authors.
== AT ==
public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
diff --git a/build.gradle.kts b/build.gradle.kts
...
```
## Patch Notes
@@ -271,7 +337,7 @@ Subject: [PATCH] revert serverside behavior of keepalives
This patch intends to bump up the time that a client has to reply to the
server back to 30 seconds as per pre 1.12.2, which allowed clients
more than enough time to reply potentially allowing them to be less
tempermental due to lag spikes on the network thread, e.g. that caused
temperamental due to lag spikes on the network thread, e.g. that caused
by plugins that are interacting with netty.
We also add a system property to allow people to tweak how long the server
@@ -309,56 +375,55 @@ what fits best in your situation.
## Configuration files
To use a configurable value in your patch, add a new entry in either the
`PaperConfig` or `PaperWorldConfig` classes. Use `PaperConfig` if a value
To use a configurable value in your patch, add a new field in either the
`GlobalConfiguration` or `WorldConfiguration` classes (inside the
`io.papermc.paper.configuration` package). Use `GlobalConfiguration` if a value
must remain the same throughout all worlds, or the latter if it can change
between worlds. World-specific configuration options are preferred whenever
possible.
### PaperConfig example
### Example
This is adding a new miscellaneous setting that doesn't seem to fit in other categories.
Try to check and see if an existing category (inner class) exists that matches
whatever configuration option you are adding.
```java
public static boolean saveEmptyScoreboardTeams = false;
private static void saveEmptyScoreboardTeams() {
// This is called automatically!
// The name also doesn't matter.
saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false);
public class GlobalConfiguration {
// other sections
public class Misc extends ConfigurationPart {
// other settings
public boolean lagCompensateBlockBreaking = true;
public boolean useDimensionTypeForCustomSpawners = false;
public int maxNumOfPlayers = 20; // This is the new setting
}
}
```
You set the type of the setting as the field type, and the default value is the
initial field value. The name of the setting defaults to the snake-case of the
field name, so in this case it would be `misc.max-num-of-players`. You can use
the `@Setting` annotation to override that, but generally just try to set the
field name to what you want the setting to be called.
Notice that the field is always public, but the setter is always private. This
is important to the way the configuration generation system works. To access
this value, reference it as you would any other static value:
#### Accessing the value
If you added a new global config value, you can access it in the code just by
doing
```java
if (!PaperConfig.saveEmptyScoreboardTeams) {
int maxPlayers = GlobalConfiguration.get().misc.maxNumOfPlayers;
```
Generally for global config values you will use the fully qualified class name,
`io.papermc.paper.configuration.GlobalConfiguration` since it's not imported in
most places.
---
If you are adding a new world config value, you must have access to an instance
of the `net.minecraft.world.level.Level` which you can then access the config by doing
```java
int maxPlayers = level.paperConfig().misc.maxNumOfPlayers;
```
It is often preferred that you use the fully qualified name for the
configuration class when accessing it, like so:
`com.destroystokyo.paper.PaperConfig.valueHere`.
If this is not done, a developer for Paper might fix that for you before
merging, but it's always nice if you make it a habit where you only need 1-2
lines changed.
### PaperWorldConfig example
```java
public boolean useInhabitedTime = true;
private void useInhabitedTime() {
// This is called automatically!
// The name also doesn't matter.
useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true);
}
```
Again, notice that the field is always public, but the setter is always private.
To access this value, you'll need an instance of the `net.minecraft.world.level.Level`
object:
```java
return this.level.paperConfig.useInhabitedTime ? this.inhabitedTime : 0;
```
#### Committing changes
All changes to the `GlobalConfiguration` and `WorldConfiguration` files
should be done in the commit that created them. So do an interactive rebase
or fixup to apply just those changes to that commit, then add a new commit
that includes the logic that uses that option in the server somewhere.
## Testing API changes
@@ -402,7 +467,7 @@ progress will be lost if you do not;
1. Identify the name(s) of the file(s) you want to import.
- A complete list of all possible file names can be found at
`./Paper-Server/.gradle/caches/paperweight/mc-dev-sources/net/minecraft/`. You might find
[MiniMappingViewer] useful if you need to translate between Mojang and Spigot mapped names.
[MappingViewer] useful if you need to translate between Mojang and Spigot mapped names.
1. Open the file at `./build-data/dev-imports.txt` and add the name of your file to
the script. Follow the instructions there;
1. Re-patch the server `./gradlew applyPatches`;
@@ -427,16 +492,16 @@ file (`CONTRIBUTING.md`), the `LICENSE.md` file, and so forth.
### Patching and building is *really* slow, what can I do?
This only applies if you're running Windows. If you're running a prior Windows
release, either update to Windows 10 or move to macOS/Linux/BSD.
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
out of date, update your system with the
[Windows Update Assistant](https://www.microsoft.com/en-us/software-download/windows10).
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-win10>
<https://docs.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
@@ -446,6 +511,6 @@ everything like usual.
> ❗ Do not use the `/mnt/` directory in WSL! Instead, mount the WSL directories
> in Windows like described here:
> <https://www.howtogeek.com/426749/how-to-access-your-linux-wsl-files-in-windows-10/>
> <https://docs.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
[MiniMappingViewer]: https://minidigger.github.io/MiniMappingViewer/
[MappingViewer]: https://mappings.cephx.dev/
+18 -2
View File
@@ -40,13 +40,29 @@ rickyboy320 <rickw320@hotmail.com>
DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com>
JRoy <joshroy126@gmail.com>
ysl3000 <yannicklamprecht@live.de>
kennytv <jahnke.nassim@gmail.com>
Machine_Maker <machine@machinemaker.me>
Ivan Pekov <ivan@mrivanplays.com>
Camotoy <20743703+Camotoy@users.noreply.github.com>
Bjarne Koll <lynxplay101@gmail.com>
Bjarne Koll <git@lynxplay.dev>
MeFisto94 <MeFisto94@users.noreply.github.com>
Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
LemonCaramel <admin@caramel.moe>
Noah van der Aa <ndvdaa@gmail.com>
Doc <nachito94@msn.com>
Nick Hensel <nickhensel25@icloud.com>
vytskalt <vytskalt@protonmail.com>
TheFruxz <cedricspitzer@outlook.de>
Kieran Wallbanks <kieran.wallbanks@gmail.com>
Denery <dorofeevij@gmail.com>
Jakubk15 <jakubk15@protonmail.com>
Redned <redned235@gmail.com>
Luke Chambers <consolelogluke@gmail.com>
Emily <emilia.lopezf.1999@gmail.com>
dawon <dawon@dawon.eu>
Ollie <69084614+olijeffers0n@users.noreply.github.com>
Oliwier Miodun <naczs@blueflow.pl>
aerulion <aerulion@gmail.com>
Lukas Planz <lukas.planz@web.de>
granny <contact@granny.dev>
mja00 <me@mja00.dev>
```
-32
View File
@@ -1,32 +0,0 @@
plugins {
`java-library`
`maven-publish`
}
java {
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
maven("https://libraries.minecraft.net")
}
dependencies {
implementation(project(":paper-api"))
api("com.mojang:brigadier:1.0.18")
compileOnly("it.unimi.dsi:fastutil:8.5.6")
compileOnly("org.jetbrains:annotations:23.0.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.hamcrest:hamcrest-library:1.3")
testImplementation("org.ow2.asm:asm-tree:9.2")
}
configure<PublishingExtension> {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
@@ -1,9 +0,0 @@
package com.destroystokyo.paper.brigadier;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.suggestion.SuggestionProvider;
import java.util.function.Predicate;
public interface BukkitBrigadierCommand <S extends BukkitBrigadierCommandSource> extends Command<S>, Predicate<S>, SuggestionProvider<S> {
}
@@ -1,21 +0,0 @@
package com.destroystokyo.paper.brigadier;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.jetbrains.annotations.Nullable;
public interface BukkitBrigadierCommandSource {
@Nullable
Entity getBukkitEntity();
@Nullable
World getBukkitWorld();
@Nullable
Location getBukkitLocation();
CommandSender getBukkitSender();
}
@@ -1,68 +0,0 @@
package com.destroystokyo.paper.event.brigadier;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
import com.mojang.brigadier.tree.RootCommandNode;
import org.bukkit.Bukkit;
import org.bukkit.Warning;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.NotNull;
/**
* Fired any time a Brigadier RootCommandNode is generated for a player to inform the client of commands.
* You may manipulate this CommandNode to change what the client sees.
*
* This event may fire on login, world change, and permission rebuilds, by plugin request, and potentially future means.
*
* This event will fire before {@link org.bukkit.event.player.PlayerCommandSendEvent}, so no filtering has been done by
* other plugins yet.
*
* WARNING: This event will potentially (and most likely) fire twice! Once for Async, and once again for Sync.
* It is important that you check event.isAsynchronous() and event.hasFiredAsync() to ensure you only act once.
* If for some reason we are unable to send this asynchronously in the future, only the sync method will fire.
*
* Your logic should look like this:
* if (event.isAsynchronous() || !event.hasFiredAsync()) { do stuff }
*
* If your logic is not safe to run asynchronously, only react to the synchronous version.
* @deprecated Draft API - Subject to change until confirmed solves desired use cases
*/
@Deprecated
@Warning(false)
public class AsyncPlayerSendCommandsEvent <S extends BukkitBrigadierCommandSource> extends PlayerEvent {
private static final HandlerList handlers = new HandlerList();
private final RootCommandNode<S> node;
private final boolean hasFiredAsync;
public AsyncPlayerSendCommandsEvent(Player player, RootCommandNode<S> node, boolean hasFiredAsync) {
super(player, !Bukkit.isPrimaryThread());
this.node = node;
this.hasFiredAsync = hasFiredAsync;
}
/**
* @return The full Root Command Node being sent to the client, which is mutable.
*/
public RootCommandNode<S> getCommandNode() {
return node;
}
/**
* @return If this event has already fired asynchronously.
*/
public boolean hasFiredAsync() {
return hasFiredAsync;
}
@NotNull
public HandlerList getHandlers() {
return handlers;
}
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
}
@@ -1,77 +0,0 @@
package com.destroystokyo.paper.event.brigadier;
import com.mojang.brigadier.suggestion.Suggestions;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.NotNull;
/**
* Called when sending Suggestions to the client. Will be called asynchronously if a plugin
* marks the AsyncTabComplete event handled asynchronously, otherwise called synchronously.
*/
public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled = false;
private Suggestions suggestions;
private final String buffer;
public AsyncPlayerSendSuggestionsEvent(Player player, Suggestions suggestions, String buffer) {
super(player, !Bukkit.isPrimaryThread());
this.suggestions = suggestions;
this.buffer = buffer;
}
/**
* @return The input buffer sent to request these suggestions
*/
public String getBuffer() {
return buffer;
}
/**
* @return The suggestions being sent to client
*/
public Suggestions getSuggestions() {
return suggestions;
}
/**
* @param suggestions The suggestions to be sent to client if need to change them
*/
public void setSuggestions(Suggestions suggestions) {
this.suggestions = suggestions;
}
/**
* {@inheritDoc}
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels sending suggestions to the client
* {@inheritDoc}
*/
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@NotNull
public HandlerList getHandlers() {
return handlers;
}
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
}
@@ -1,125 +0,0 @@
package com.destroystokyo.paper.event.brigadier;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommand;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
import com.mojang.brigadier.tree.ArgumentCommandNode;
import com.mojang.brigadier.tree.LiteralCommandNode;
import com.mojang.brigadier.tree.RootCommandNode;
import org.bukkit.Warning;
import org.bukkit.command.Command;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.server.ServerEvent;
import org.jetbrains.annotations.NotNull;
/**
* Fired anytime the server synchronizes Bukkit CommandMap to Brigadier.
*
* Allows a plugin to control the Literal and Argument nodes for this command to be
* sent to the client.
* This is done at Plugin Enable time after commands have been registered, but some
* plugins may use reflection to retrigger this rebuild during runtime.
*
* @deprecated Draft API - Subject to change until confirmed solves desired use cases
*/
@Deprecated
@Warning(false)
public class CommandRegisteredEvent <S extends BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final String commandLabel;
private final Command command;
private final BukkitBrigadierCommand<S> brigadierCommand;
private final RootCommandNode<S> root;
private final ArgumentCommandNode<S, String> defaultArgs;
private LiteralCommandNode<S> literal;
private boolean cancelled = false;
public CommandRegisteredEvent(String commandLabel, BukkitBrigadierCommand<S> brigadierCommand, Command command, RootCommandNode<S> root, LiteralCommandNode<S> literal, ArgumentCommandNode<S, String> defaultArgs) {
this.commandLabel = commandLabel;
this.brigadierCommand = brigadierCommand;
this.command = command;
this.root = root;
this.literal = literal;
this.defaultArgs = defaultArgs;
}
/**
* @return The command name being registered
*/
public String getCommandLabel() {
return commandLabel;
}
/**
* @return The Bukkit API Brigadier Wrapped Command Object to handle executions and suggestions
*/
public BukkitBrigadierCommand<S> getBrigadierCommand() {
return brigadierCommand;
}
public Command getCommand() {
return command;
}
/**
* @return Gets the root command node being used to register a command to.
*/
public RootCommandNode<S> getRoot() {
return root;
}
/**
* Returns the Bukkit API's default handling of Arguments, if you wish to reuse it.
* @return
*/
public ArgumentCommandNode<S, String> getDefaultArgs() {
return defaultArgs;
}
/**
* Returns the Bukkit API's default literal for this command, including the {@link #getDefaultArgs()} as a child already.
* @return
*/
public LiteralCommandNode<S> getLiteral() {
return literal;
}
/**
* Changes the literal used to register this command. The previous literable is mutable, so this is primarily if
* you want to completely replace the object.
* @param literal
*/
public void setLiteral(LiteralCommandNode<S> literal) {
this.literal = literal;
}
/**
* {@inheritDoc}
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels registering this command to Brigadier, but will remain in Bukkit Command Map. Can be used to hide a
* command from all players.
*
* {@inheritDoc}
*/
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@NotNull
public HandlerList getHandlers() {
return handlers;
}
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
}
@@ -1,42 +0,0 @@
package io.papermc.paper.brigadier;
import com.mojang.brigadier.Message;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.ComponentLike;
import net.kyori.adventure.text.TextComponent;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Helper methods to bridge the gaps between Brigadier and Paper-MojangAPI.
*/
public final class PaperBrigadier {
private PaperBrigadier() {
throw new RuntimeException("PaperBrigadier is not to be instantiated!");
}
/**
* Create a new Brigadier {@link Message} from a {@link ComponentLike}.
*
* <p>Mostly useful for creating rich suggestion tooltips in combination with other Paper-MojangAPI APIs.</p>
*
* @param componentLike The {@link ComponentLike} to use for the {@link Message} contents
* @return A new Brigadier {@link Message}
*/
public static @NonNull Message message(final @NonNull ComponentLike componentLike) {
return PaperBrigadierProvider.instance().message(componentLike);
}
/**
* Create a new {@link Component} from a Brigadier {@link Message}.
*
* <p>If the {@link Message} was created from a {@link Component}, it will simply be
* converted back, otherwise a new {@link TextComponent} will be created with the
* content of {@link Message#getString()}</p>
*
* @param message The {@link Message} to create a {@link Component} from
* @return The created {@link Component}
*/
public static @NonNull Component componentFromMessage(final @NonNull Message message) {
return PaperBrigadierProvider.instance().componentFromMessage(message);
}
}
@@ -1,30 +0,0 @@
package io.papermc.paper.brigadier;
import com.mojang.brigadier.Message;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.ComponentLike;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.checker.nullness.qual.NonNull;
import static java.util.Objects.requireNonNull;
interface PaperBrigadierProvider {
final class Holder {
private static @MonotonicNonNull PaperBrigadierProvider INSTANCE;
}
static @NonNull PaperBrigadierProvider instance() {
return requireNonNull(Holder.INSTANCE, "PaperBrigadierProvider has not yet been initialized!");
}
static void initialize(final @NonNull PaperBrigadierProvider instance) {
if (Holder.INSTANCE != null) {
throw new IllegalStateException("PaperBrigadierProvider has already been initialized!");
}
Holder.INSTANCE = instance;
}
@NonNull Message message(@NonNull ComponentLike componentLike);
@NonNull Component componentFromMessage(@NonNull Message message);
}
+29 -25
View File
@@ -1,72 +1,76 @@
Paper [![Paper Build Status](https://img.shields.io/github/workflow/status/PaperMC/Paper/Build%20Paper/master)](https://github.com/PaperMC/Paper/actions)
> [!CAUTION]
> **This branch will be deleted soon, please replace usage of it with the new `main` branch**.
>
> If you need history from before 1.21.4, please use the archive repo: https://github.com/PaperMC/Paper-archive
Paper [![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=master)](https://github.com/PaperMC/Paper/actions)
[![Discord](https://img.shields.io/discord/289587909051416579.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/papermc)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/papermc?label=GitHub%20Sponsors)](https://github.com/sponsors/PaperMC)
[![Open Collective](https://img.shields.io/opencollective/all/papermc?label=OpenCollective%20Sponsors)](https://opencollective.com/papermc)
===========
High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.
The most widely used, high-performance Minecraft server that aims to fix gameplay and mechanics inconsistencies.
**Support and Project Discussion:**
- [IRC](https://webchat.esper.net/?channels=paper) or [Discord](https://discord.gg/papermc)
- [Our forums](https://forums.papermc.io/) or [Discord](https://discord.gg/papermc)
How To (Server Admins)
------
Paperclip is a jar file that you can download and run just like a normal jar file.
Download Paper from our [downloads page](https://papermc.io/downloads).
Download Paper from our [downloads page](https://papermc.io/downloads/paper).
Run the Paperclip jar directly from your server. Just like old times
* Documentation on using Paper: [paper.readthedocs.io](https://paper.readthedocs.io/)
* For a sneak peek on upcoming features, [see here](https://github.com/PaperMC/Paper/projects)
* Documentation on using Paper: [docs.papermc.io](https://docs.papermc.io)
* For a sneak peek at upcoming features, [see here](https://github.com/PaperMC/Paper/projects)
How To (Plugin Developers)
------
* See our API patches [here](patches/api)
* See upcoming, pending, and recently added API [here](https://github.com/PaperMC/Paper/projects/6)
* Paper API javadocs here: [papermc.io/javadocs](https://papermc.io/javadocs/)
* Maven Repo (for paper-api):
* See our API patches [here](patches/api)
* See upcoming, pending, and recently added API [here](https://github.com/orgs/PaperMC/projects/2/views/4)
* Paper API javadocs here: [papermc.io/javadocs](https://papermc.io/javadocs/)
#### Repository (for paper-api)
##### Maven
```xml
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
```
* Artifact Information:
```xml
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
**Or alternatively, with Gradle:**
* Repository:
```
##### Gradle
```kotlin
repositories {
maven {
url = uri("https://papermc.io/repo/repository/maven-public/")
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
```
How To (Compiling Jar From Source)
------
To compile Paper, you need JDK 17 and an internet connection.
To compile Paper, you need JDK 21 and an internet connection.
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createReobfBundlerJar` from your terminal. You can find the compiled jar in the project root's `build/libs` directory.
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createMojmapBundlerJar` from your terminal. You can find the compiled jar in the project root's `build/libs` directory.
To get a full list of tasks, run `./gradlew tasks`.
@@ -76,9 +80,9 @@ See [Contributing](CONTRIBUTING.md)
Support Us
------
First of all, thank you for considering helping out, we really appreciate that!
First of all, thank you for considering helping out, we really appreciate that!
PaperMC has various recurring expenses, mostly related to infrastructure. Paper uses [Open Collective](https://opencollective.com/) via the [Open Source Collective fiscal host](https://opencollective.com/opensource) to manage expenses. Open Collective allows us to be extremely transparent, so you can always see how your donations are used. You can read more about finanically supporting PaperMC [on our website](https://papermc.io/sponsors).
PaperMC has various recurring expenses, mostly related to infrastructure. Paper uses [Open Collective](https://opencollective.com/) via the [Open Source Collective fiscal host](https://opencollective.com/opensource) to manage expenses. Open Collective allows us to be extremely transparent, so you can always see how your donations are used. You can read more about financially supporting PaperMC [on our website](https://papermc.io/sponsors).
You can find our collective [here](https://opencollective.com/papermc), or you can donate via GitHub Sponsors [here](https://github.com/sponsors/PaperMC), which will also go towards the collective.
+14
View File
@@ -0,0 +1,14 @@
# Security Policy
## Supported Versions
We generally only fully support the latest version, the same applies to exploits such as server crashes and item
duplication bugs. In the transition period during larger Minecraft updates, we may still backport important fixes to the
last minor or major release.
## Reporting a Vulnerability
For any issues that are NOT duplication bugs, server/client crashes, or otherwise serious exploits, please open an issue
through the [Issues tab](https://github.com/PaperMC/Paper/issues).
For exploits, please [join our Discord](https://discord.gg/papermc) and see the [#paper-exploit-report channel](https://discord.com/channels/289587909051416579/1208749386348101682) for
further instructions.
+4
View File
@@ -8,4 +8,8 @@
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
# To import minecraft data files, like the default chat type, use `mc_data` as the prefix:
# mc_data chat_type/chat.json
# mc_data dimension_type/overworld.json
#
+3 -282
View File
@@ -13,285 +13,6 @@ public net.minecraft.server.MinecraftServer doRunTask(Lnet/minecraft/server/Tick
public net.minecraft.world.level.dimension.end.EndDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
public net.minecraft.nbt.TagParser readArrayTag()Lnet/minecraft/nbt/Tag;
# Paper config files
public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;)D
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;D)D
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;)I
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;I)I
public org.spigotmc.SpigotWorldConfig getList(Ljava/lang/String;Ljava/lang/Object;)Ljava/util/List;
public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
# MC Utils
public net.minecraft.server.level.ServerChunkCache mainThread
public net.minecraft.server.level.ServerLevel chunkSource
public org.bukkit.craftbukkit.inventory.CraftItemStack handle
# Add PlayerInitialSpawnEvent
public net.minecraft.world.entity.Entity setRot(FF)V
# Add PlayerUseUnknownEntityEvent
public net.minecraft.network.protocol.game.ServerboundInteractPacket$ActionType
# Configurable RCON IP address
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
# Mob Spawner API Enhancements
public net.minecraft.world.level.BaseSpawner isNearPlayer(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.level.BaseSpawner delay(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V
# LootTable API
public org.bukkit.craftbukkit.block.CraftBlockEntityState getTileEntity()Lnet/minecraft/world/level/block/entity/BlockEntity;
public org.bukkit.craftbukkit.block.CraftLootable setLootTable(Lorg/bukkit/loot/LootTable;J)V
public org.bukkit.craftbukkit.entity.CraftMinecartContainer setLootTable(Lorg/bukkit/loot/LootTable;J)V
# Firework API
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
# Add option to make parrots stay
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
# LivingEntity setkiller
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
# SkeletonHorse Additions
public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime
# Fix client rendering skulls
public net.minecraft.world.item.ItemStack tag
# Async chunk io
public net.minecraft.server.level.ChunkMap structureManager
public net.minecraft.server.level.ChunkMap overworldDataStorage
public net.minecraft.server.level.ChunkMap getUpdatingChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
public-f net.minecraft.world.level.chunk.storage.RegionFileStorage
public net.minecraft.world.level.chunk.storage.RegionFileStorage getFile(Lnet/minecraft/world/level/ChunkPos;Z)Lnet/minecraft/world/level/chunk/storage/RegionFile;
public net.minecraft.world.level.chunk.storage.SectionStorage dirty
public net.minecraft.util.thread.BlockableEventLoop runAllTasks()V
public net.minecraft.server.level.ChunkMap getPoiManager()Lnet/minecraft/world/entity/ai/village/poi/PoiManager;
# Improve death events
public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
public net.minecraft.world.entity.Mob handItems
public net.minecraft.world.entity.Mob armorItems
# Add sun related api
public net.minecraft.world.entity.Mob isSunBurnTick()Z
# Turtle API
public net.minecraft.world.entity.animal.Turtle getHomePos()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V
public net.minecraft.world.entity.animal.Turtle isGoingHome()Z
public net.minecraft.world.entity.animal.Turtle setGoingHome(Z)V
public net.minecraft.world.entity.animal.Turtle isTravelling()Z
public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V
# Call player spectator target event
public net.minecraft.server.network.ServerGamePacketListenerImpl updateBookPages(Ljava/util/List;Ljava/util/function/UnaryOperator;Lnet/minecraft/world/item/ItemStack;ILnet/minecraft/world/item/ItemStack;)V
# Improve Server THread Pool
public net.minecraft.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
# Add more zombie API
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
# Add PlayerConnectionCloseEvent
public net.minecraft.server.network.ServerLoginPacketListenerImpl$State
public net.minecraft.server.network.ServerLoginPacketListenerImpl state
public net.minecraft.server.network.ServerLoginPacketListenerImpl gameProfile
# Entity Activation Range 2.0
public net.minecraft.world.entity.Entity isInsidePortal
public net.minecraft.world.entity.Mob leashHolder
public net.minecraft.world.entity.LivingEntity jumping
# No-Tick view distance
public net.minecraft.server.level.ChunkHolder broadcast(Lnet/minecraft/network/protocol/Packet;Z)V
public net.minecraft.server.level.ChunkMap setViewDistance(I)V
public net.minecraft.server.level.ChunkMap readChunk(Lnet/minecraft/world/level/ChunkPos;)Lnet/minecraft/nbt/CompoundTag;
public net.minecraft.server.level.ChunkMap playerLoadedChunk(Lnet/minecraft/server/level/ServerPlayer;[Lnet/minecraft/network/protocol/Packet;Lnet/minecraft/world/level/chunk/LevelChunk;)V
public net.minecraft.server.level.ChunkMap mainThreadMailbox # todo one of these doesn't belong here
# Optimise TickListServer
public net.minecraft.world.level.ServerTickList saveTickList(Ljava/util/function/Function;Ljava/lang/Iterable;J)Lnet/minecraft/nbt/ListTag;
public net.minecraft.world.level.chunk.storage.EntityStorage level
# Don't move existing players to world spawn
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
# Implement Player Client Options API
public net.minecraft.world.entity.player.Player DATA_PLAYER_MODE_CUSTOMISATION
# Fix Longstanding Broken behavior
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
# Load Chunks for Login Async
public net.minecraft.server.level.ServerChunkCache runDistanceManagerUpdates()Z
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor # todo doesn't belong here but oh well
# Implement MobGoalApi
public net.minecraft.world.entity.ai.goal.GoalSelector availableGoals
# Add villager reputation API
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
# Add entity liquid API
public net.minecraft.world.entity.Entity isInRain()Z
public net.minecraft.world.entity.Entity isInBubbleColumn()Z
# Allow delegation to vanilla chunk gen
public org.bukkit.craftbukkit.generator.CustomChunkGenerator delegate
# Optimize redstone algorithm
public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal
# Add more Evoker API
public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V
public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/Sheep;
# More lightning API
public net.minecraft.world.entity.LightningBolt life
public net.minecraft.world.entity.LightningBolt flashes
# Configurable door breaking difficulty
public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.Zombie DOOR_BREAKING_PREDICATE
# Optimize sending packets to nearby locations (sounds/effects)
public net.minecraft.server.level.ServerLevel players
# Item Rarity API
public net.minecraft.world.item.Item rarity
# More Enchantment API
public net.minecraft.world.item.enchantment.Enchantment slots
# Fix and optimise world force upgrading
public net.minecraft.util.worldupdate.WorldUpgrader REGEX
# More Lidded Block API
public net.minecraft.world.level.block.entity.EnderChestBlockEntity openersCounter
# Improve EntityShootBowEvent
public net.minecraft.world.entity.projectile.AbstractArrow getPickupItem()Lnet.minecraft.world.item.ItemStack;
# Implement Expanded ArmorStand API
public net.minecraft.world.entity.decoration.ArmorStand isDisabled(Lnet/minecraft/world/entity/EquipmentSlot;)Z
# Chunk debug command
public net.minecraft.server.level.ChunkMap entitiesInLevel
public net.minecraft.server.level.ServerLevel players
# Chunk priority urgency system
public net.minecraft.server.level.ChunkMap$ChunkDistanceManager
# Here's Johnny
public net.minecraft.world.entity.monster.Vindicator isJohnny
# Chunk debug command
public net.minecraft.server.level.Ticket createdTick
public net.minecraft.server.level.ServerChunkCache CHUNK_STATUSES
public net.minecraft.server.level.ChunkHolder pos
# Incremental chunk saving
public net.minecraft.world.level.entity.PersistentEntitySectionManager storeChunkSections(JLjava/util/function/Consumer;)Z
# Mending XP API
public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
# Implement an API for CanPlaceOn and CanDestroy NBT values
public net.minecraft.commands.arguments.blocks.BlockStateParser id
# Villager Restock API
public net.minecraft.world.entity.npc.Villager numberOfRestocksToday
# Mob Pathfinding API
public net.minecraft.world.entity.ai.navigation.PathNavigation pathFinder
public net.minecraft.world.level.pathfinder.PathFinder nodeEvaluator
public net.minecraft.world.level.pathfinder.Path nodes
# Add more Witch API
public net.minecraft.world.entity.monster.Witch usingTime
# PlayerDeathEvent#getItemsToKeep
public net.minecraft.world.entity.player.Inventory compartments
# Missing Entity Behavior API
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 isFaceplanted()Z
public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V
# Cook speed multipler API
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity recipeType
# Add methods to get translation keys
public org.bukkit.craftbukkit.inventory.CraftMetaFirework
public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/FireworkEffect$Type;)I
# Vanilla command permission fixes
public-f com.mojang.brigadier.tree.CommandNode requirement
# Block Enderpearl Travel Exploit
public net.minecraft.world.entity.projectile.Projectile cachedOwner
public net.minecraft.world.entity.projectile.Projectile ownerUUID
# Add missing display slots
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations toBukkitSlot(I)Lorg/bukkit/scoreboard/DisplaySlot;
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations fromBukkitSlot(Lorg/bukkit/scoreboard/DisplaySlot;)I
# Add methods to find targets for lightning strikes
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
# Improve CraftBlockStates
public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
# Default entity attributes
public net.minecraft.world.entity.ai.attributes.AttributeSupplier instances
# Add ItemFactory#getSpawnEgg API
public net.minecraft.world.item.SpawnEggItem BY_ID
# Zombie API - breaking doors
public net.minecraft.world.entity.monster.Zombie supportsBreakDoorGoal()Z
# Add Material#hasCollision
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
# add per world spawn limits
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
# Optimize isValidLocation
public net.minecraft.world.level.chunk.LevelChunkSection states
# Player.setPlayerProfile API
public-f net.minecraft.world.entity.player.Player gameProfile
# Generator Settings
public net.minecraft.world.level.levelgen.SurfaceRules$Condition
public net.minecraft.world.level.levelgen.SurfaceRules$Context
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockX
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockY
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockZ
public net.minecraft.world.level.levelgen.SurfaceRules$Context context
public net.minecraft.world.level.levelgen.SurfaceRules$Context system
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource
public net.minecraft.world.level.levelgen.SurfaceRules$SurfaceRule
public net.minecraft.world.level.levelgen.SurfaceSystem getOrCreateRandomFactory(Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/world/level/levelgen/PositionalRandomFactory;
# Fix removing recipes
public net.minecraft.world.item.crafting.RecipeManager byName
# Entity powdered snow API
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
# Add health methods for item entities
public net.minecraft.world.entity.item.ItemEntity health
# TODO 1.20 remapSpigotAt.at doesn't remap the return type for this method for some reason
public net/minecraft/world/entity/Display$TextDisplay getText()Lnet/minecraft/network/chat/Component;
public net/minecraft/world/entity/Display$BlockDisplay getBlockState()Lnet/minecraft/world/level/block/state/BlockState;
+6 -7
View File
@@ -14,16 +14,15 @@ tiny 2 0 mojang+yarn spigot
# CraftBukkit changes type
c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData N
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData L
c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chunk
f Lnet/minecraft/server/level/ServerLevel; level q
f Lnet/minecraft/server/level/ServerLevel; level r
# See mappings-patch.tiny
c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager D
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager G
# 1.18 todo: verify paper still changes this
# Paper changes type
c net/minecraft/core/MappedRegistry net/minecraft/core/RegistryMaterials
f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId bA
# The method is made public by Spigot, which then causes accidental overrides
c net/minecraft/world/entity/Entity net/minecraft/world/entity/Entity
m ()Z isInRain isInRain0
+206 -30
View File
@@ -1,8 +1,17 @@
import io.papermc.paperweight.PaperweightException
import io.papermc.paperweight.tasks.BaseTask
import io.papermc.paperweight.util.*
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import java.io.ByteArrayOutputStream
import java.nio.file.Path
import java.util.regex.Pattern
import kotlin.io.path.*
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "7.1.1" apply false
id("io.papermc.paperweight.core") version "1.3.3"
id("io.papermc.paperweight.core") version "1.7.7"
}
allprojects {
@@ -11,15 +20,18 @@ allprojects {
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion = JavaLanguageVersion.of(21)
}
}
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
subprojects {
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
options.release = 21
options.isFork = true
}
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
@@ -27,45 +39,60 @@ subprojects {
tasks.withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
if (name == "Paper-MojangAPI") {
return@subprojects
tasks.withType<Test> {
testLogging {
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
events(TestLogEvent.STANDARD_OUT)
}
}
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
maven(paperMavenPublicUrl)
}
}
val spigotDecompiler: Configuration by configurations.creating
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/") {
content { onlyForConfigurations("paperclip") }
maven(paperMavenPublicUrl) {
content {
onlyForConfigurations(
configurations.paperclip.name,
spigotDecompiler.name,
)
}
}
}
dependencies {
paramMappings("net.fabricmc:yarn:1.18.1+build.1:mergedv2")
remapper("net.fabricmc:tiny-remapper:0.7.0:fat")
decompiler("net.minecraftforge:forgeflower:1.5.498.22")
paperclip("io.papermc:paperclip:3.0.2")
paramMappings("net.fabricmc:yarn:1.21.4+build.1:mergedv2")
remapper("net.fabricmc:tiny-remapper:0.10.3:fat")
decompiler("org.vineflower:vineflower:1.10.1")
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13")
paperclip("io.papermc:paperclip:3.0.3")
}
paperweight {
minecraftVersion.set(providers.gradleProperty("mcVersion"))
serverProject.set(project(":paper-server"))
minecraftVersion = providers.gradleProperty("mcVersion")
serverProject = project(":paper-server")
paramMappingsRepo.set("https://maven.fabricmc.net/")
remapRepo.set("https://maven.fabricmc.net/")
decompileRepo.set("https://files.minecraftforge.net/maven/")
paramMappingsRepo = paperMavenPublicUrl
remapRepo = paperMavenPublicUrl
decompileRepo = paperMavenPublicUrl
craftBukkit {
fernFlowerJar = layout.file(spigotDecompiler.elements.map { it.single().asFile })
}
paper {
spigotApiPatchDir.set(layout.projectDirectory.dir("patches/api"))
spigotServerPatchDir.set(layout.projectDirectory.dir("patches/server"))
spigotApiPatchDir = layout.projectDirectory.dir("patches/api")
spigotServerPatchDir = layout.projectDirectory.dir("patches/server")
mappingsPatch.set(layout.projectDirectory.file("build-data/mappings-patch.tiny"))
reobfMappingsPatch.set(layout.projectDirectory.file("build-data/reobf-mappings-patch.tiny"))
mappingsPatch = layout.projectDirectory.file("build-data/mappings-patch.tiny")
reobfMappingsPatch = layout.projectDirectory.file("build-data/reobf-mappings-patch.tiny")
reobfPackagesToFix.addAll(
"co.aikar.timings",
@@ -82,18 +109,15 @@ paperweight {
}
tasks.generateDevelopmentBundle {
apiCoordinates.set("io.papermc.paper:paper-api")
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
apiCoordinates = "io.papermc.paper:paper-api"
libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/",
"https://libraries.minecraft.net/",
"https://papermc.io/repo/repository/maven-public/",
"https://maven.fabricmc.net/",
paperMavenPublicUrl,
)
}
publishing {
if (project.providers.gradleProperty("publishDevBundle").forUseAtConfigurationTime().isPresent) {
if (project.providers.gradleProperty("publishDevBundle").isPresent) {
publications.create<MavenPublication>("devBundle") {
artifact(tasks.generateDevelopmentBundle) {
artifactId = "dev-bundle"
@@ -105,7 +129,7 @@ publishing {
allprojects {
publishing {
repositories {
maven("https://papermc.io/repo/repository/maven-snapshots/") {
maven("https://repo.papermc.io/repository/maven-snapshots/") {
name = "paperSnapshots"
credentials(PasswordCredentials::class)
}
@@ -118,3 +142,155 @@ tasks.register("printMinecraftVersion") {
println(providers.gradleProperty("mcVersion").get().trim())
}
}
tasks.register("printPaperVersion") {
doLast {
println(project.version)
}
}
// see gradle.properties
if (providers.gradleProperty("updatingMinecraft").getOrElse("false").toBoolean()) {
tasks.collectAtsFromPatches {
val dir = layout.projectDirectory.dir("patches/unapplied/server")
if (dir.path.isDirectory()) {
extraPatchDir = dir
}
}
tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches>().configureEach {
filterPatches = false
}
tasks.register("continueServerUpdate", RebasePatches::class) {
description = "Moves the next X patches from unapplied to applied, and applies them. X being the number of patches that apply cleanly, plus the terminal failure if any."
projectDir = project.projectDir
appliedPatches = file("patches/server")
unappliedPatches = file("patches/unapplied/server")
applyTaskName = "applyServerPatches"
patchedDir = "Paper-Server"
}
}
@UntrackedTask(because = "Does not make sense to track state")
abstract class RebasePatches : BaseTask() {
@get:Internal
abstract val projectDir: DirectoryProperty
@get:InputFiles
abstract val appliedPatches: DirectoryProperty
@get:InputFiles
abstract val unappliedPatches: DirectoryProperty
@get:Input
abstract val applyTaskName: Property<String>
@get:Input
abstract val patchedDir: Property<String>
private fun unapplied(): List<Path> =
unappliedPatches.path.listDirectoryEntries("*.patch").sortedBy { it.name }
private fun appliedLoc(patch: Path): Path = appliedPatches.path.resolve(unappliedPatches.path.relativize(patch))
companion object {
val regex = Pattern.compile("Patch failed at ([0-9]{4}) (.*)")
val continuationRegex = Pattern.compile("^\\s{1}.+\$")
const val subjectPrefix = "Subject: [PATCH] "
}
@TaskAction
fun run() {
val patchedDirPath = projectDir.path.resolve(patchedDir.get())
if (patchedDirPath.isDirectory()) {
val status = Git(patchedDirPath)("status").getText()
if (status.contains("You are in the middle of an am session.")) {
throw PaperweightException("Cannot continue update when $patchedDirPath is in the middle of an am session.")
}
}
val unapplied = unapplied()
for (patch in unapplied) {
patch.copyTo(appliedLoc(patch))
}
val out = ByteArrayOutputStream()
val proc = ProcessBuilder()
.directory(projectDir.path)
.command("./gradlew", applyTaskName.get())
.redirectErrorStream(true)
.start()
val f = redirect(proc.inputStream, out)
val exit = proc.waitFor()
f.get()
if (exit != 0) {
val outStr = String(out.toByteArray())
val matcher = regex.matcher(outStr)
if (!matcher.find()) error("Could not determine failure point")
val failedSubjectFragment = matcher.group(2)
val failed = unapplied.single { p ->
p.useLines { lines ->
val collect = mutableListOf<String>()
for (line in lines) {
if (line.startsWith(subjectPrefix)) {
collect += line
} else if (collect.size == 1) {
if (continuationRegex.matcher(line).matches()) {
collect += line
} else {
break
}
}
}
val subjectLine = collect.joinToString("").substringAfter(subjectPrefix)
subjectLine.startsWith(failedSubjectFragment)
}
}
// delete successful & failure point from unapplied patches dir
for (path in unapplied) {
path.deleteIfExists()
if (path == failed) {
break
}
}
// delete failed from patches dir
var started = false
for (path in unapplied) {
if (path == failed) {
started = true
continue
}
if (started) {
appliedLoc(path).deleteIfExists()
}
}
// Delete the build file before resetting the AM session in case it has compilation errors
patchedDirPath.resolve("build.gradle.kts").deleteIfExists()
// Apply again to reset the am session (so it ends on the failed patch, to allow us to rebuild after fixing it)
val apply2 = ProcessBuilder()
.directory(projectDir.path)
.command("./gradlew", applyTaskName.get())
.redirectErrorStream(true)
.start()
val f1 = redirect(apply2.inputStream, System.out)
apply2.waitFor()
f1.get()
logger.lifecycle(outStr)
logger.lifecycle("Patch failed at $failed; See Git output above.")
} else {
unapplied.forEach { it.deleteIfExists() }
logger.lifecycle("All patches applied!")
}
val git = Git(projectDir.path)
git("add", appliedPatches.path.toString() + "/*").runSilently()
git("add", unappliedPatches.path.toString() + "/*").runSilently()
}
}
+4 -2
View File
@@ -1,7 +1,9 @@
group=io.papermc.paper
version=1.18.1-R0.1-SNAPSHOT
version=1.21.4-R0.1-SNAPSHOT
mcVersion=1.21.4
mcVersion=1.18.1
# Set to true while updating Minecraft version
updatingMinecraft=false
org.gradle.caching=true
org.gradle.parallel=true
Binary file not shown.
+3 -1
View File
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+31 -13
View File
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +82,12 @@ do
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,22 +134,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -193,11 +201,15 @@ if "$cygwin" || "$msys" ; then
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
@@ -205,6 +217,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Vendored
+21 -16
View File
@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
+1 -1
View File
@@ -672,4 +672,4 @@ program into proprietary programs. If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
GNU Lesser General Public License instead of this License. But first,
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
+37
View File
@@ -0,0 +1,37 @@
import io.papermc.paperweight.PaperweightSourceGeneratorHelper
import io.papermc.paperweight.extension.PaperweightSourceGeneratorExt
import io.papermc.paperweight.util.defaultJavaLauncher
plugins {
java
}
plugins.apply(PaperweightSourceGeneratorHelper::class)
extensions.configure(PaperweightSourceGeneratorExt::class) {
atFile.set(projectDir.toPath().resolve("wideners.at").toFile())
}
dependencies {
implementation("com.squareup:javapoet:1.13.0")
implementation(project(":paper-api"))
implementation("io.github.classgraph:classgraph:4.8.47")
implementation("org.jetbrains:annotations:24.1.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.register<JavaExec>("generate") {
dependsOn(tasks.check)
mainClass.set("io.papermc.generator.Main")
classpath(sourceSets.main.map { it.runtimeClasspath })
args(projectDir.toPath().resolve("generated").toString())
javaLauncher = javaToolchains.defaultJavaLauncher(project)
}
tasks.test {
useJUnitPlatform()
}
group = "io.papermc.paper"
version = "1.0-SNAPSHOT"
@@ -0,0 +1,447 @@
package com.destroystokyo.paper.entity.ai;
import com.destroystokyo.paper.entity.RangedEntity;
import io.papermc.paper.entity.SchoolableFish;
import io.papermc.paper.generated.GeneratedFrom;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.AbstractHorse;
import org.bukkit.entity.AbstractSkeleton;
import org.bukkit.entity.AbstractVillager;
import org.bukkit.entity.Animals;
import org.bukkit.entity.Bee;
import org.bukkit.entity.Blaze;
import org.bukkit.entity.Cat;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.Dolphin;
import org.bukkit.entity.Drowned;
import org.bukkit.entity.Enderman;
import org.bukkit.entity.Evoker;
import org.bukkit.entity.Fish;
import org.bukkit.entity.Fox;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Guardian;
import org.bukkit.entity.Illager;
import org.bukkit.entity.Illusioner;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Llama;
import org.bukkit.entity.Mob;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Ocelot;
import org.bukkit.entity.Panda;
import org.bukkit.entity.Parrot;
import org.bukkit.entity.Phantom;
import org.bukkit.entity.PolarBear;
import org.bukkit.entity.PufferFish;
import org.bukkit.entity.Rabbit;
import org.bukkit.entity.Raider;
import org.bukkit.entity.Shulker;
import org.bukkit.entity.Silverfish;
import org.bukkit.entity.SkeletonHorse;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Spellcaster;
import org.bukkit.entity.Spider;
import org.bukkit.entity.Squid;
import org.bukkit.entity.Strider;
import org.bukkit.entity.Tameable;
import org.bukkit.entity.Turtle;
import org.bukkit.entity.Vex;
import org.bukkit.entity.Vindicator;
import org.bukkit.entity.WanderingTrader;
import org.bukkit.entity.Wither;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.Zombie;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for Mob Goals.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class);
GoalKey<AbstractHorse> RUN_AROUND_LIKE_CRAZY = create("run_around_like_crazy", AbstractHorse.class);
GoalKey<AbstractSkeleton> ABSTRACT_SKELETON_MELEE = create("abstract_skeleton_melee", AbstractSkeleton.class);
GoalKey<AbstractVillager> LOOK_AT_TRADING_PLAYER = create("look_at_trading_player", AbstractVillager.class);
GoalKey<AbstractVillager> TRADE_WITH_PLAYER = create("trade_with_player", AbstractVillager.class);
GoalKey<Animals> BREED = create("breed", Animals.class);
GoalKey<Animals> FOLLOW_PARENT = create("follow_parent", Animals.class);
GoalKey<Bee> BEE_ATTACK = create("bee_attack", Bee.class);
GoalKey<Bee> BEE_BECOME_ANGRY = create("bee_become_angry", Bee.class);
GoalKey<Bee> BEE_ENTER_HIVE = create("bee_enter_hive", Bee.class);
GoalKey<Bee> BEE_GO_TO_HIVE = create("bee_go_to_hive", Bee.class);
GoalKey<Bee> BEE_GO_TO_KNOWN_FLOWER = create("bee_go_to_known_flower", Bee.class);
GoalKey<Bee> BEE_GROW_CROP = create("bee_grow_crop", Bee.class);
GoalKey<Bee> BEE_HURT_BY_OTHER = create("bee_hurt_by_other", Bee.class);
GoalKey<Bee> BEE_LOCATE_HIVE = create("bee_locate_hive", Bee.class);
GoalKey<Bee> BEE_POLLINATE = create("bee_pollinate", Bee.class);
GoalKey<Bee> BEE_WANDER = create("bee_wander", Bee.class);
GoalKey<Bee> VALIDATE_FLOWER = create("validate_flower", Bee.class);
GoalKey<Bee> VALIDATE_HIVE = create("validate_hive", Bee.class);
GoalKey<Blaze> BLAZE_ATTACK = create("blaze_attack", Blaze.class);
GoalKey<Cat> CAT_AVOID_ENTITY = create("cat_avoid_entity", Cat.class);
GoalKey<Cat> CAT_LIE_ON_BED = create("cat_lie_on_bed", Cat.class);
GoalKey<Cat> CAT_RELAX_ON_OWNER = create("cat_relax_on_owner", Cat.class);
GoalKey<Cat> CAT_SIT_ON_BLOCK = create("cat_sit_on_block", Cat.class);
GoalKey<Cat> CAT_TEMPT = create("cat_tempt", Cat.class);
GoalKey<Creature> AVOID_ENTITY = create("avoid_entity", Creature.class);
GoalKey<Creature> BREATH_AIR = create("breath_air", Creature.class);
GoalKey<Creature> DROWNED_GO_TO_WATER = create("drowned_go_to_water", Creature.class);
GoalKey<Creature> FLEE_SUN = create("flee_sun", Creature.class);
GoalKey<Creature> FOLLOW_BOAT = create("follow_boat", Creature.class);
GoalKey<Creature> GOLEM_RANDOM_STROLL_IN_VILLAGE = create("golem_random_stroll_in_village", Creature.class);
GoalKey<Creature> HURT_BY = create("hurt_by", Creature.class);
GoalKey<Creature> MELEE_ATTACK = create("melee_attack", Creature.class);
GoalKey<Creature> MOVE_BACK_TO_VILLAGE = create("move_back_to_village", Creature.class);
GoalKey<Creature> MOVE_THROUGH_VILLAGE = create("move_through_village", Creature.class);
GoalKey<Creature> MOVE_TOWARDS = create("move_towards", Creature.class);
GoalKey<Creature> MOVE_TOWARDS_RESTRICTION = create("move_towards_restriction", Creature.class);
GoalKey<Creature> PANIC = create("panic", Creature.class);
GoalKey<Creature> PARROT_WANDER = create("parrot_wander", Creature.class);
GoalKey<Creature> RANDOM_STROLL = create("random_stroll", Creature.class);
GoalKey<Creature> RANDOM_SWIMMING = create("random_swimming", Creature.class);
GoalKey<Creature> REMOVE_BLOCK = create("remove_block", Creature.class);
GoalKey<Creature> RESTRICT_SUN = create("restrict_sun", Creature.class);
GoalKey<Creature> STROLL_THROUGH_VILLAGE = create("stroll_through_village", Creature.class);
GoalKey<Creature> TEMPT = create("tempt", Creature.class);
GoalKey<Creature> TRY_FIND_WATER = create("try_find_water", Creature.class);
GoalKey<Creature> WATER_AVOIDING_RANDOM_FLYING = create("water_avoiding_random_flying", Creature.class);
GoalKey<Creature> WATER_AVOIDING_RANDOM_STROLL = create("water_avoiding_random_stroll", Creature.class);
GoalKey<Creeper> SWELL = create("swell", Creeper.class);
GoalKey<Dolphin> DOLPHIN_JUMP = create("dolphin_jump", Dolphin.class);
GoalKey<Dolphin> DOLPHIN_SWIM_TO_TREASURE = create("dolphin_swim_to_treasure", Dolphin.class);
GoalKey<Dolphin> DOLPHIN_SWIM_WITH_PLAYER = create("dolphin_swim_with_player", Dolphin.class);
GoalKey<Dolphin> PLAY_WITH_ITEMS = create("play_with_items", Dolphin.class);
GoalKey<Drowned> DROWNED_ATTACK = create("drowned_attack", Drowned.class);
GoalKey<Drowned> DROWNED_GO_TO_BEACH = create("drowned_go_to_beach", Drowned.class);
GoalKey<Drowned> DROWNED_SWIM_UP = create("drowned_swim_up", Drowned.class);
GoalKey<Enderman> ENDERMAN_FREEZE_WHEN_LOOKED_AT = create("enderman_freeze_when_looked_at", Enderman.class);
GoalKey<Enderman> ENDERMAN_LEAVE_BLOCK = create("enderman_leave_block", Enderman.class);
GoalKey<Enderman> ENDERMAN_LOOK_FOR_PLAYER = create("enderman_look_for_player", Enderman.class);
GoalKey<Enderman> ENDERMAN_TAKE_BLOCK = create("enderman_take_block", Enderman.class);
GoalKey<Evoker> EVOKER_ATTACK_SPELL = create("evoker_attack_spell", Evoker.class);
GoalKey<Evoker> EVOKER_CASTING_SPELL = create("evoker_casting_spell", Evoker.class);
GoalKey<Evoker> EVOKER_SUMMON_SPELL = create("evoker_summon_spell", Evoker.class);
GoalKey<Evoker> EVOKER_WOLOLO_SPELL = create("evoker_wololo_spell", Evoker.class);
GoalKey<Fish> FISH_SWIM = create("fish_swim", Fish.class);
GoalKey<Fox> DEFEND_TRUSTED = create("defend_trusted", Fox.class);
GoalKey<Fox> FACEPLANT = create("faceplant", Fox.class);
GoalKey<Fox> FOX_BREED = create("fox_breed", Fox.class);
GoalKey<Fox> FOX_EAT_BERRIES = create("fox_eat_berries", Fox.class);
GoalKey<Fox> FOX_FLOAT = create("fox_float", Fox.class);
GoalKey<Fox> FOX_FOLLOW_PARENT = create("fox_follow_parent", Fox.class);
GoalKey<Fox> FOX_LOOK_AT_PLAYER = create("fox_look_at_player", Fox.class);
GoalKey<Fox> FOX_MELEE_ATTACK = create("fox_melee_attack", Fox.class);
GoalKey<Fox> FOX_PANIC = create("fox_panic", Fox.class);
GoalKey<Fox> FOX_POUNCE = create("fox_pounce", Fox.class);
GoalKey<Fox> FOX_SEARCH_FOR_ITEMS = create("fox_search_for_items", Fox.class);
GoalKey<Fox> FOX_STROLL_THROUGH_VILLAGE = create("fox_stroll_through_village", Fox.class);
GoalKey<Fox> PERCH_AND_SEARCH = create("perch_and_search", Fox.class);
GoalKey<Fox> SEEK_SHELTER = create("seek_shelter", Fox.class);
GoalKey<Fox> SLEEP = create("sleep", Fox.class);
GoalKey<Fox> STALK_PREY = create("stalk_prey", Fox.class);
GoalKey<Ghast> GHAST_LOOK = create("ghast_look", Ghast.class);
GoalKey<Ghast> GHAST_SHOOT_FIREBALL = create("ghast_shoot_fireball", Ghast.class);
GoalKey<Ghast> RANDOM_FLOAT_AROUND = create("random_float_around", Ghast.class);
GoalKey<Guardian> GUARDIAN_ATTACK = create("guardian_attack", Guardian.class);
GoalKey<Illager> HOLD_GROUND_ATTACK = create("hold_ground_attack", Illager.class);
GoalKey<Illager> RAIDER_OPEN_DOOR = create("raider_open_door", Illager.class);
GoalKey<Illusioner> ILLUSIONER_BLINDNESS_SPELL = create("illusioner_blindness_spell", Illusioner.class);
GoalKey<Illusioner> ILLUSIONER_MIRROR_SPELL = create("illusioner_mirror_spell", Illusioner.class);
GoalKey<IronGolem> DEFEND_VILLAGE = create("defend_village", IronGolem.class);
GoalKey<IronGolem> OFFER_FLOWER = create("offer_flower", IronGolem.class);
GoalKey<Llama> LLAMA_ATTACK_WOLF = create("llama_attack_wolf", Llama.class);
GoalKey<Llama> LLAMA_FOLLOW_CARAVAN = create("llama_follow_caravan", Llama.class);
GoalKey<Llama> LLAMA_HURT_BY = create("llama_hurt_by", Llama.class);
GoalKey<Llama> TRADER_LLAMA_DEFEND_WANDERING_TRADER = create("trader_llama_defend_wandering_trader", Llama.class);
GoalKey<Mob> BREAK_DOOR = create("break_door", Mob.class);
GoalKey<Mob> CLIMB_ON_TOP_OF_POWDER_SNOW = create("climb_on_top_of_powder_snow", Mob.class);
GoalKey<Mob> EAT_BLOCK = create("eat_block", Mob.class);
GoalKey<Mob> FLOAT = create("float", Mob.class);
GoalKey<Mob> FOLLOW_MOB = create("follow_mob", Mob.class);
GoalKey<Mob> INTERACT = create("interact", Mob.class);
GoalKey<Mob> LEAP_AT = create("leap_at", Mob.class);
GoalKey<Mob> LOOK_AT_PLAYER = create("look_at_player", Mob.class);
GoalKey<Mob> NEAREST_ATTACKABLE = create("nearest_attackable", Mob.class);
GoalKey<Mob> OCELOT_ATTACK = create("ocelot_attack", Mob.class);
GoalKey<Mob> OPEN_DOOR = create("open_door", Mob.class);
GoalKey<Mob> RANDOM_LOOK_AROUND = create("random_look_around", Mob.class);
GoalKey<Mob> RESET_UNIVERSAL_ANGER = create("reset_universal_anger", Mob.class);
GoalKey<Mob> USE_ITEM = create("use_item", Mob.class);
GoalKey<Mob> VINDICATOR_BREAK_DOOR = create("vindicator_break_door", Mob.class);
GoalKey<Monster> RANGED_BOW_ATTACK = create("ranged_bow_attack", Monster.class);
GoalKey<Monster> RANGED_CROSSBOW_ATTACK = create("ranged_crossbow_attack", Monster.class);
GoalKey<Ocelot> OCELOT_AVOID_ENTITY = create("ocelot_avoid_entity", Ocelot.class);
GoalKey<Ocelot> OCELOT_TEMPT = create("ocelot_tempt", Ocelot.class);
GoalKey<Panda> PANDA_ATTACK = create("panda_attack", Panda.class);
GoalKey<Panda> PANDA_AVOID = create("panda_avoid", Panda.class);
GoalKey<Panda> PANDA_BREED = create("panda_breed", Panda.class);
GoalKey<Panda> PANDA_HURT_BY = create("panda_hurt_by", Panda.class);
GoalKey<Panda> PANDA_LIE_ON_BACK = create("panda_lie_on_back", Panda.class);
GoalKey<Panda> PANDA_LOOK_AT_PLAYER = create("panda_look_at_player", Panda.class);
GoalKey<Panda> PANDA_PANIC = create("panda_panic", Panda.class);
GoalKey<Panda> PANDA_ROLL = create("panda_roll", Panda.class);
GoalKey<Panda> PANDA_SIT = create("panda_sit", Panda.class);
GoalKey<Panda> PANDA_SNEEZE = create("panda_sneeze", Panda.class);
GoalKey<Parrot> LAND_ON_OWNERS_SHOULDER = create("land_on_owners_shoulder", Parrot.class);
GoalKey<Phantom> PHANTOM_ATTACK_PLAYER = create("phantom_attack_player", Phantom.class);
GoalKey<Phantom> PHANTOM_ATTACK_STRATEGY = create("phantom_attack_strategy", Phantom.class);
GoalKey<Phantom> PHANTOM_CIRCLE_AROUND_ANCHOR = create("phantom_circle_around_anchor", Phantom.class);
GoalKey<Phantom> PHANTOM_SWEEP_ATTACK = create("phantom_sweep_attack", Phantom.class);
GoalKey<PolarBear> POLAR_BEAR_ATTACK_PLAYERS = create("polar_bear_attack_players", PolarBear.class);
GoalKey<PolarBear> POLAR_BEAR_HURT_BY = create("polar_bear_hurt_by", PolarBear.class);
GoalKey<PolarBear> POLAR_BEAR_MELEE_ATTACK = create("polar_bear_melee_attack", PolarBear.class);
GoalKey<PufferFish> PUFFERFISH_PUFF = create("pufferfish_puff", PufferFish.class);
GoalKey<Rabbit> RABBIT_AVOID_ENTITY = create("rabbit_avoid_entity", Rabbit.class);
GoalKey<Rabbit> RABBIT_PANIC = create("rabbit_panic", Rabbit.class);
GoalKey<Rabbit> RAID_GARDEN = create("raid_garden", Rabbit.class);
GoalKey<Raider> LONG_DISTANCE_PATROL = create("long_distance_patrol", Raider.class);
GoalKey<Raider> NEAREST_ATTACKABLE_WITCH = create("nearest_attackable_witch", Raider.class);
GoalKey<Raider> NEAREST_HEALABLE_RAIDER = create("nearest_healable_raider", Raider.class);
GoalKey<Raider> OBTAIN_RAID_LEADER_BANNER = create("obtain_raid_leader_banner", Raider.class);
GoalKey<Raider> PATHFIND_TO_RAID = create("pathfind_to_raid", Raider.class);
GoalKey<Raider> RAIDER_CELEBRATION = create("raider_celebration", Raider.class);
GoalKey<Raider> RAIDER_MOVE_THROUGH_VILLAGE = create("raider_move_through_village", Raider.class);
GoalKey<RangedEntity> DROWNED_TRIDENT_ATTACK = create("drowned_trident_attack", RangedEntity.class);
GoalKey<RangedEntity> RANGED_ATTACK = create("ranged_attack", RangedEntity.class);
GoalKey<SchoolableFish> FOLLOW_FLOCK_LEADER = create("follow_flock_leader", SchoolableFish.class);
GoalKey<Shulker> SHULKER_ATTACK = create("shulker_attack", Shulker.class);
GoalKey<Shulker> SHULKER_DEFENSE_ATTACK = create("shulker_defense_attack", Shulker.class);
GoalKey<Shulker> SHULKER_NEAREST_ATTACK = create("shulker_nearest_attack", Shulker.class);
GoalKey<Shulker> SHULKER_PEEK = create("shulker_peek", Shulker.class);
GoalKey<Silverfish> SILVERFISH_MERGE_WITH_STONE = create("silverfish_merge_with_stone", Silverfish.class);
GoalKey<Silverfish> SILVERFISH_WAKE_UP_FRIENDS = create("silverfish_wake_up_friends", Silverfish.class);
GoalKey<SkeletonHorse> SKELETON_TRAP = create("skeleton_trap", SkeletonHorse.class);
GoalKey<Slime> SLIME_ATTACK = create("slime_attack", Slime.class);
GoalKey<Slime> SLIME_FLOAT = create("slime_float", Slime.class);
GoalKey<Slime> SLIME_KEEP_ON_JUMPING = create("slime_keep_on_jumping", Slime.class);
GoalKey<Slime> SLIME_RANDOM_DIRECTION = create("slime_random_direction", Slime.class);
GoalKey<Spellcaster> SPELLCASTER_CASTING_SPELL = create("spellcaster_casting_spell", Spellcaster.class);
GoalKey<Spider> SPIDER = create("spider", Spider.class);
GoalKey<Spider> SPIDER_ATTACK = create("spider_attack", Spider.class);
GoalKey<Squid> SQUID_FLEE = create("squid_flee", Squid.class);
GoalKey<Squid> SQUID_RANDOM_MOVEMENT = create("squid_random_movement", Squid.class);
GoalKey<Strider> STRIDER_GO_TO_LAVA = create("strider_go_to_lava", Strider.class);
GoalKey<Tameable> FOLLOW_OWNER = create("follow_owner", Tameable.class);
GoalKey<Tameable> NON_TAME_RANDOM = create("non_tame_random", Tameable.class);
GoalKey<Tameable> OWNER_HURT = create("owner_hurt", Tameable.class);
GoalKey<Tameable> OWNER_HURT_BY = create("owner_hurt_by", Tameable.class);
GoalKey<Tameable> SIT_WHEN_ORDERED_TO = create("sit_when_ordered_to", Tameable.class);
GoalKey<Tameable> TAMABLE_ANIMAL_PANIC = create("tamable_animal_panic", Tameable.class);
GoalKey<Turtle> TURTLE_BREED = create("turtle_breed", Turtle.class);
GoalKey<Turtle> TURTLE_GO_HOME = create("turtle_go_home", Turtle.class);
GoalKey<Turtle> TURTLE_GO_TO_WATER = create("turtle_go_to_water", Turtle.class);
GoalKey<Turtle> TURTLE_LAY_EGG = create("turtle_lay_egg", Turtle.class);
GoalKey<Turtle> TURTLE_PANIC = create("turtle_panic", Turtle.class);
GoalKey<Turtle> TURTLE_RANDOM_STROLL = create("turtle_random_stroll", Turtle.class);
GoalKey<Turtle> TURTLE_TRAVEL = create("turtle_travel", Turtle.class);
GoalKey<Vex> VEX_CHARGE_ATTACK = create("vex_charge_attack", Vex.class);
GoalKey<Vex> VEX_COPY_OWNER = create("vex_copy_owner", Vex.class);
GoalKey<Vex> VEX_RANDOM_MOVE = create("vex_random_move", Vex.class);
GoalKey<Vindicator> VINDICATOR_JOHNNY_ATTACK = create("vindicator_johnny_attack", Vindicator.class);
GoalKey<WanderingTrader> WANDER_TO_POSITION = create("wander_to_position", WanderingTrader.class);
GoalKey<Wither> WITHER_DO_NOTHING = create("wither_do_nothing", Wither.class);
GoalKey<Wolf> BEG = create("beg", Wolf.class);
GoalKey<Wolf> WOLF_AVOID_ENTITY = create("wolf_avoid_entity", Wolf.class);
GoalKey<Zombie> ZOMBIE_ATTACK = create("zombie_attack", Zombie.class);
GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);
private static <T extends Mob> GoalKey<T> create(final String key, final Class<T> type) {
return GoalKey.of(type, NamespacedKey.minecraft(key));
}
}
@@ -0,0 +1,260 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.attribute.Attribute;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#ATTRIBUTE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class AttributeKeys {
/**
* {@code minecraft:armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> ARMOR = create(key("armor"));
/**
* {@code minecraft:armor_toughness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> ARMOR_TOUGHNESS = create(key("armor_toughness"));
/**
* {@code minecraft:attack_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> ATTACK_DAMAGE = create(key("attack_damage"));
/**
* {@code minecraft:attack_knockback}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> ATTACK_KNOCKBACK = create(key("attack_knockback"));
/**
* {@code minecraft:attack_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> ATTACK_SPEED = create(key("attack_speed"));
/**
* {@code minecraft:block_break_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> BLOCK_BREAK_SPEED = create(key("block_break_speed"));
/**
* {@code minecraft:block_interaction_range}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> BLOCK_INTERACTION_RANGE = create(key("block_interaction_range"));
/**
* {@code minecraft:burning_time}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> BURNING_TIME = create(key("burning_time"));
/**
* {@code minecraft:entity_interaction_range}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> ENTITY_INTERACTION_RANGE = create(key("entity_interaction_range"));
/**
* {@code minecraft:explosion_knockback_resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> EXPLOSION_KNOCKBACK_RESISTANCE = create(key("explosion_knockback_resistance"));
/**
* {@code minecraft:fall_damage_multiplier}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> FALL_DAMAGE_MULTIPLIER = create(key("fall_damage_multiplier"));
/**
* {@code minecraft:flying_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> FLYING_SPEED = create(key("flying_speed"));
/**
* {@code minecraft:follow_range}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> FOLLOW_RANGE = create(key("follow_range"));
/**
* {@code minecraft:gravity}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> GRAVITY = create(key("gravity"));
/**
* {@code minecraft:jump_strength}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> JUMP_STRENGTH = create(key("jump_strength"));
/**
* {@code minecraft:knockback_resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> KNOCKBACK_RESISTANCE = create(key("knockback_resistance"));
/**
* {@code minecraft:luck}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> LUCK = create(key("luck"));
/**
* {@code minecraft:max_absorption}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> MAX_ABSORPTION = create(key("max_absorption"));
/**
* {@code minecraft:max_health}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> MAX_HEALTH = create(key("max_health"));
/**
* {@code minecraft:mining_efficiency}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> MINING_EFFICIENCY = create(key("mining_efficiency"));
/**
* {@code minecraft:movement_efficiency}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> MOVEMENT_EFFICIENCY = create(key("movement_efficiency"));
/**
* {@code minecraft:movement_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> MOVEMENT_SPEED = create(key("movement_speed"));
/**
* {@code minecraft:oxygen_bonus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> OXYGEN_BONUS = create(key("oxygen_bonus"));
/**
* {@code minecraft:safe_fall_distance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> SAFE_FALL_DISTANCE = create(key("safe_fall_distance"));
/**
* {@code minecraft:scale}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> SCALE = create(key("scale"));
/**
* {@code minecraft:sneaking_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> SNEAKING_SPEED = create(key("sneaking_speed"));
/**
* {@code minecraft:spawn_reinforcements}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> SPAWN_REINFORCEMENTS = create(key("spawn_reinforcements"));
/**
* {@code minecraft:step_height}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> STEP_HEIGHT = create(key("step_height"));
/**
* {@code minecraft:submerged_mining_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> SUBMERGED_MINING_SPEED = create(key("submerged_mining_speed"));
/**
* {@code minecraft:sweeping_damage_ratio}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> SWEEPING_DAMAGE_RATIO = create(key("sweeping_damage_ratio"));
/**
* {@code minecraft:tempt_range}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> TEMPT_RANGE = create(key("tempt_range"));
/**
* {@code minecraft:water_movement_efficiency}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> WATER_MOVEMENT_EFFICIENCY = create(key("water_movement_efficiency"));
private AttributeKeys() {
}
private static TypedKey<Attribute> create(final Key key) {
return TypedKey.create(RegistryKey.ATTRIBUTE, key);
}
}
@@ -0,0 +1,344 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.banner.PatternType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#BANNER_PATTERN}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class BannerPatternKeys {
/**
* {@code minecraft:base}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> BASE = create(key("base"));
/**
* {@code minecraft:border}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> BORDER = create(key("border"));
/**
* {@code minecraft:bricks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> BRICKS = create(key("bricks"));
/**
* {@code minecraft:circle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> CIRCLE = create(key("circle"));
/**
* {@code minecraft:creeper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> CREEPER = create(key("creeper"));
/**
* {@code minecraft:cross}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> CROSS = create(key("cross"));
/**
* {@code minecraft:curly_border}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> CURLY_BORDER = create(key("curly_border"));
/**
* {@code minecraft:diagonal_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> DIAGONAL_LEFT = create(key("diagonal_left"));
/**
* {@code minecraft:diagonal_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> DIAGONAL_RIGHT = create(key("diagonal_right"));
/**
* {@code minecraft:diagonal_up_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> DIAGONAL_UP_LEFT = create(key("diagonal_up_left"));
/**
* {@code minecraft:diagonal_up_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> DIAGONAL_UP_RIGHT = create(key("diagonal_up_right"));
/**
* {@code minecraft:flow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> FLOW = create(key("flow"));
/**
* {@code minecraft:flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> FLOWER = create(key("flower"));
/**
* {@code minecraft:globe}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> GLOBE = create(key("globe"));
/**
* {@code minecraft:gradient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> GRADIENT = create(key("gradient"));
/**
* {@code minecraft:gradient_up}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> GRADIENT_UP = create(key("gradient_up"));
/**
* {@code minecraft:guster}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> GUSTER = create(key("guster"));
/**
* {@code minecraft:half_horizontal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> HALF_HORIZONTAL = create(key("half_horizontal"));
/**
* {@code minecraft:half_horizontal_bottom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> HALF_HORIZONTAL_BOTTOM = create(key("half_horizontal_bottom"));
/**
* {@code minecraft:half_vertical}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> HALF_VERTICAL = create(key("half_vertical"));
/**
* {@code minecraft:half_vertical_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> HALF_VERTICAL_RIGHT = create(key("half_vertical_right"));
/**
* {@code minecraft:mojang}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> MOJANG = create(key("mojang"));
/**
* {@code minecraft:piglin}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> PIGLIN = create(key("piglin"));
/**
* {@code minecraft:rhombus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> RHOMBUS = create(key("rhombus"));
/**
* {@code minecraft:skull}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SKULL = create(key("skull"));
/**
* {@code minecraft:small_stripes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SMALL_STRIPES = create(key("small_stripes"));
/**
* {@code minecraft:square_bottom_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SQUARE_BOTTOM_LEFT = create(key("square_bottom_left"));
/**
* {@code minecraft:square_bottom_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SQUARE_BOTTOM_RIGHT = create(key("square_bottom_right"));
/**
* {@code minecraft:square_top_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SQUARE_TOP_LEFT = create(key("square_top_left"));
/**
* {@code minecraft:square_top_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SQUARE_TOP_RIGHT = create(key("square_top_right"));
/**
* {@code minecraft:straight_cross}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRAIGHT_CROSS = create(key("straight_cross"));
/**
* {@code minecraft:stripe_bottom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_BOTTOM = create(key("stripe_bottom"));
/**
* {@code minecraft:stripe_center}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_CENTER = create(key("stripe_center"));
/**
* {@code minecraft:stripe_downleft}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_DOWNLEFT = create(key("stripe_downleft"));
/**
* {@code minecraft:stripe_downright}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_DOWNRIGHT = create(key("stripe_downright"));
/**
* {@code minecraft:stripe_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_LEFT = create(key("stripe_left"));
/**
* {@code minecraft:stripe_middle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_MIDDLE = create(key("stripe_middle"));
/**
* {@code minecraft:stripe_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_RIGHT = create(key("stripe_right"));
/**
* {@code minecraft:stripe_top}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_TOP = create(key("stripe_top"));
/**
* {@code minecraft:triangle_bottom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> TRIANGLE_BOTTOM = create(key("triangle_bottom"));
/**
* {@code minecraft:triangle_top}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> TRIANGLE_TOP = create(key("triangle_top"));
/**
* {@code minecraft:triangles_bottom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> TRIANGLES_BOTTOM = create(key("triangles_bottom"));
/**
* {@code minecraft:triangles_top}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> TRIANGLES_TOP = create(key("triangles_top"));
private BannerPatternKeys() {
}
/**
* Creates a key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<PatternType> create(final Key key) {
return TypedKey.create(RegistryKey.BANNER_PATTERN, key);
}
}
@@ -0,0 +1,498 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.Biome;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#BIOME}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class BiomeKeys {
/**
* {@code minecraft:badlands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> BADLANDS = create(key("badlands"));
/**
* {@code minecraft:bamboo_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> BAMBOO_JUNGLE = create(key("bamboo_jungle"));
/**
* {@code minecraft:basalt_deltas}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> BASALT_DELTAS = create(key("basalt_deltas"));
/**
* {@code minecraft:beach}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> BEACH = create(key("beach"));
/**
* {@code minecraft:birch_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> BIRCH_FOREST = create(key("birch_forest"));
/**
* {@code minecraft:cherry_grove}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> CHERRY_GROVE = create(key("cherry_grove"));
/**
* {@code minecraft:cold_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> COLD_OCEAN = create(key("cold_ocean"));
/**
* {@code minecraft:crimson_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> CRIMSON_FOREST = create(key("crimson_forest"));
/**
* {@code minecraft:dark_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DARK_FOREST = create(key("dark_forest"));
/**
* {@code minecraft:deep_cold_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DEEP_COLD_OCEAN = create(key("deep_cold_ocean"));
/**
* {@code minecraft:deep_dark}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DEEP_DARK = create(key("deep_dark"));
/**
* {@code minecraft:deep_frozen_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DEEP_FROZEN_OCEAN = create(key("deep_frozen_ocean"));
/**
* {@code minecraft:deep_lukewarm_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DEEP_LUKEWARM_OCEAN = create(key("deep_lukewarm_ocean"));
/**
* {@code minecraft:deep_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DEEP_OCEAN = create(key("deep_ocean"));
/**
* {@code minecraft:desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DESERT = create(key("desert"));
/**
* {@code minecraft:dripstone_caves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> DRIPSTONE_CAVES = create(key("dripstone_caves"));
/**
* {@code minecraft:end_barrens}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> END_BARRENS = create(key("end_barrens"));
/**
* {@code minecraft:end_highlands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> END_HIGHLANDS = create(key("end_highlands"));
/**
* {@code minecraft:end_midlands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> END_MIDLANDS = create(key("end_midlands"));
/**
* {@code minecraft:eroded_badlands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> ERODED_BADLANDS = create(key("eroded_badlands"));
/**
* {@code minecraft:flower_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> FLOWER_FOREST = create(key("flower_forest"));
/**
* {@code minecraft:forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> FOREST = create(key("forest"));
/**
* {@code minecraft:frozen_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> FROZEN_OCEAN = create(key("frozen_ocean"));
/**
* {@code minecraft:frozen_peaks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> FROZEN_PEAKS = create(key("frozen_peaks"));
/**
* {@code minecraft:frozen_river}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> FROZEN_RIVER = create(key("frozen_river"));
/**
* {@code minecraft:grove}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> GROVE = create(key("grove"));
/**
* {@code minecraft:ice_spikes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> ICE_SPIKES = create(key("ice_spikes"));
/**
* {@code minecraft:jagged_peaks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> JAGGED_PEAKS = create(key("jagged_peaks"));
/**
* {@code minecraft:jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> JUNGLE = create(key("jungle"));
/**
* {@code minecraft:lukewarm_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> LUKEWARM_OCEAN = create(key("lukewarm_ocean"));
/**
* {@code minecraft:lush_caves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> LUSH_CAVES = create(key("lush_caves"));
/**
* {@code minecraft:mangrove_swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> MANGROVE_SWAMP = create(key("mangrove_swamp"));
/**
* {@code minecraft:meadow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> MEADOW = create(key("meadow"));
/**
* {@code minecraft:mushroom_fields}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> MUSHROOM_FIELDS = create(key("mushroom_fields"));
/**
* {@code minecraft:nether_wastes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> NETHER_WASTES = create(key("nether_wastes"));
/**
* {@code minecraft:ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> OCEAN = create(key("ocean"));
/**
* {@code minecraft:old_growth_birch_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> OLD_GROWTH_BIRCH_FOREST = create(key("old_growth_birch_forest"));
/**
* {@code minecraft:old_growth_pine_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> OLD_GROWTH_PINE_TAIGA = create(key("old_growth_pine_taiga"));
/**
* {@code minecraft:old_growth_spruce_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> OLD_GROWTH_SPRUCE_TAIGA = create(key("old_growth_spruce_taiga"));
/**
* {@code minecraft:pale_garden}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> PALE_GARDEN = create(key("pale_garden"));
/**
* {@code minecraft:plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> PLAINS = create(key("plains"));
/**
* {@code minecraft:river}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> RIVER = create(key("river"));
/**
* {@code minecraft:savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SAVANNA = create(key("savanna"));
/**
* {@code minecraft:savanna_plateau}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SAVANNA_PLATEAU = create(key("savanna_plateau"));
/**
* {@code minecraft:small_end_islands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SMALL_END_ISLANDS = create(key("small_end_islands"));
/**
* {@code minecraft:snowy_beach}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SNOWY_BEACH = create(key("snowy_beach"));
/**
* {@code minecraft:snowy_plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SNOWY_PLAINS = create(key("snowy_plains"));
/**
* {@code minecraft:snowy_slopes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SNOWY_SLOPES = create(key("snowy_slopes"));
/**
* {@code minecraft:snowy_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SNOWY_TAIGA = create(key("snowy_taiga"));
/**
* {@code minecraft:soul_sand_valley}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SOUL_SAND_VALLEY = create(key("soul_sand_valley"));
/**
* {@code minecraft:sparse_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SPARSE_JUNGLE = create(key("sparse_jungle"));
/**
* {@code minecraft:stony_peaks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> STONY_PEAKS = create(key("stony_peaks"));
/**
* {@code minecraft:stony_shore}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> STONY_SHORE = create(key("stony_shore"));
/**
* {@code minecraft:sunflower_plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SUNFLOWER_PLAINS = create(key("sunflower_plains"));
/**
* {@code minecraft:swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SWAMP = create(key("swamp"));
/**
* {@code minecraft:taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> TAIGA = create(key("taiga"));
/**
* {@code minecraft:the_end}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> THE_END = create(key("the_end"));
/**
* {@code minecraft:the_void}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> THE_VOID = create(key("the_void"));
/**
* {@code minecraft:warm_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> WARM_OCEAN = create(key("warm_ocean"));
/**
* {@code minecraft:warped_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> WARPED_FOREST = create(key("warped_forest"));
/**
* {@code minecraft:windswept_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> WINDSWEPT_FOREST = create(key("windswept_forest"));
/**
* {@code minecraft:windswept_gravelly_hills}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> WINDSWEPT_GRAVELLY_HILLS = create(key("windswept_gravelly_hills"));
/**
* {@code minecraft:windswept_hills}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> WINDSWEPT_HILLS = create(key("windswept_hills"));
/**
* {@code minecraft:windswept_savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> WINDSWEPT_SAVANNA = create(key("windswept_savanna"));
/**
* {@code minecraft:wooded_badlands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> WOODED_BADLANDS = create(key("wooded_badlands"));
private BiomeKeys() {
}
/**
* Creates a key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Biome> create(final Key key) {
return TypedKey.create(RegistryKey.BIOME, key);
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,113 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#CAT_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class CatVariantKeys {
/**
* {@code minecraft:all_black}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> ALL_BLACK = create(key("all_black"));
/**
* {@code minecraft:black}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> BLACK = create(key("black"));
/**
* {@code minecraft:british_shorthair}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> BRITISH_SHORTHAIR = create(key("british_shorthair"));
/**
* {@code minecraft:calico}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> CALICO = create(key("calico"));
/**
* {@code minecraft:jellie}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> JELLIE = create(key("jellie"));
/**
* {@code minecraft:persian}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> PERSIAN = create(key("persian"));
/**
* {@code minecraft:ragdoll}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> RAGDOLL = create(key("ragdoll"));
/**
* {@code minecraft:red}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> RED = create(key("red"));
/**
* {@code minecraft:siamese}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> SIAMESE = create(key("siamese"));
/**
* {@code minecraft:tabby}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> TABBY = create(key("tabby"));
/**
* {@code minecraft:white}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> WHITE = create(key("white"));
private CatVariantKeys() {
}
private static TypedKey<Cat.Type> create(final Key key) {
return TypedKey.create(RegistryKey.CAT_VARIANT, key);
}
}
@@ -0,0 +1,386 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#DAMAGE_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class DamageTypeKeys {
/**
* {@code minecraft:arrow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> ARROW = create(key("arrow"));
/**
* {@code minecraft:bad_respawn_point}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> BAD_RESPAWN_POINT = create(key("bad_respawn_point"));
/**
* {@code minecraft:cactus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> CACTUS = create(key("cactus"));
/**
* {@code minecraft:campfire}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> CAMPFIRE = create(key("campfire"));
/**
* {@code minecraft:cramming}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> CRAMMING = create(key("cramming"));
/**
* {@code minecraft:dragon_breath}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> DRAGON_BREATH = create(key("dragon_breath"));
/**
* {@code minecraft:drown}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> DROWN = create(key("drown"));
/**
* {@code minecraft:dry_out}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> DRY_OUT = create(key("dry_out"));
/**
* {@code minecraft:ender_pearl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> ENDER_PEARL = create(key("ender_pearl"));
/**
* {@code minecraft:explosion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> EXPLOSION = create(key("explosion"));
/**
* {@code minecraft:fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> FALL = create(key("fall"));
/**
* {@code minecraft:falling_anvil}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> FALLING_ANVIL = create(key("falling_anvil"));
/**
* {@code minecraft:falling_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> FALLING_BLOCK = create(key("falling_block"));
/**
* {@code minecraft:falling_stalactite}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> FALLING_STALACTITE = create(key("falling_stalactite"));
/**
* {@code minecraft:fireball}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> FIREBALL = create(key("fireball"));
/**
* {@code minecraft:fireworks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> FIREWORKS = create(key("fireworks"));
/**
* {@code minecraft:fly_into_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> FLY_INTO_WALL = create(key("fly_into_wall"));
/**
* {@code minecraft:freeze}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> FREEZE = create(key("freeze"));
/**
* {@code minecraft:generic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> GENERIC = create(key("generic"));
/**
* {@code minecraft:generic_kill}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> GENERIC_KILL = create(key("generic_kill"));
/**
* {@code minecraft:hot_floor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> HOT_FLOOR = create(key("hot_floor"));
/**
* {@code minecraft:in_fire}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> IN_FIRE = create(key("in_fire"));
/**
* {@code minecraft:in_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> IN_WALL = create(key("in_wall"));
/**
* {@code minecraft:indirect_magic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> INDIRECT_MAGIC = create(key("indirect_magic"));
/**
* {@code minecraft:lava}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> LAVA = create(key("lava"));
/**
* {@code minecraft:lightning_bolt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> LIGHTNING_BOLT = create(key("lightning_bolt"));
/**
* {@code minecraft:mace_smash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> MACE_SMASH = create(key("mace_smash"));
/**
* {@code minecraft:magic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> MAGIC = create(key("magic"));
/**
* {@code minecraft:mob_attack}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> MOB_ATTACK = create(key("mob_attack"));
/**
* {@code minecraft:mob_attack_no_aggro}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> MOB_ATTACK_NO_AGGRO = create(key("mob_attack_no_aggro"));
/**
* {@code minecraft:mob_projectile}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> MOB_PROJECTILE = create(key("mob_projectile"));
/**
* {@code minecraft:on_fire}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> ON_FIRE = create(key("on_fire"));
/**
* {@code minecraft:out_of_world}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> OUT_OF_WORLD = create(key("out_of_world"));
/**
* {@code minecraft:outside_border}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> OUTSIDE_BORDER = create(key("outside_border"));
/**
* {@code minecraft:player_attack}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> PLAYER_ATTACK = create(key("player_attack"));
/**
* {@code minecraft:player_explosion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> PLAYER_EXPLOSION = create(key("player_explosion"));
/**
* {@code minecraft:sonic_boom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> SONIC_BOOM = create(key("sonic_boom"));
/**
* {@code minecraft:spit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> SPIT = create(key("spit"));
/**
* {@code minecraft:stalagmite}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> STALAGMITE = create(key("stalagmite"));
/**
* {@code minecraft:starve}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> STARVE = create(key("starve"));
/**
* {@code minecraft:sting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> STING = create(key("sting"));
/**
* {@code minecraft:sweet_berry_bush}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> SWEET_BERRY_BUSH = create(key("sweet_berry_bush"));
/**
* {@code minecraft:thorns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> THORNS = create(key("thorns"));
/**
* {@code minecraft:thrown}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> THROWN = create(key("thrown"));
/**
* {@code minecraft:trident}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> TRIDENT = create(key("trident"));
/**
* {@code minecraft:unattributed_fireball}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> UNATTRIBUTED_FIREBALL = create(key("unattributed_fireball"));
/**
* {@code minecraft:wind_charge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> WIND_CHARGE = create(key("wind_charge"));
/**
* {@code minecraft:wither}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> WITHER = create(key("wither"));
/**
* {@code minecraft:wither_skull}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> WITHER_SKULL = create(key("wither_skull"));
private DamageTypeKeys() {
}
/**
* Creates a key for {@link DamageType} in the registry {@code minecraft:damage_type}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<DamageType> create(final Key key) {
return TypedKey.create(RegistryKey.DAMAGE_TYPE, key);
}
}
@@ -0,0 +1,337 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.enchantments.Enchantment;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#ENCHANTMENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class EnchantmentKeys {
/**
* {@code minecraft:aqua_affinity}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> AQUA_AFFINITY = create(key("aqua_affinity"));
/**
* {@code minecraft:bane_of_arthropods}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> BANE_OF_ARTHROPODS = create(key("bane_of_arthropods"));
/**
* {@code minecraft:binding_curse}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> BINDING_CURSE = create(key("binding_curse"));
/**
* {@code minecraft:blast_protection}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> BLAST_PROTECTION = create(key("blast_protection"));
/**
* {@code minecraft:breach}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> BREACH = create(key("breach"));
/**
* {@code minecraft:channeling}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> CHANNELING = create(key("channeling"));
/**
* {@code minecraft:density}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> DENSITY = create(key("density"));
/**
* {@code minecraft:depth_strider}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> DEPTH_STRIDER = create(key("depth_strider"));
/**
* {@code minecraft:efficiency}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> EFFICIENCY = create(key("efficiency"));
/**
* {@code minecraft:feather_falling}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> FEATHER_FALLING = create(key("feather_falling"));
/**
* {@code minecraft:fire_aspect}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> FIRE_ASPECT = create(key("fire_aspect"));
/**
* {@code minecraft:fire_protection}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> FIRE_PROTECTION = create(key("fire_protection"));
/**
* {@code minecraft:flame}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> FLAME = create(key("flame"));
/**
* {@code minecraft:fortune}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> FORTUNE = create(key("fortune"));
/**
* {@code minecraft:frost_walker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> FROST_WALKER = create(key("frost_walker"));
/**
* {@code minecraft:impaling}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> IMPALING = create(key("impaling"));
/**
* {@code minecraft:infinity}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> INFINITY = create(key("infinity"));
/**
* {@code minecraft:knockback}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> KNOCKBACK = create(key("knockback"));
/**
* {@code minecraft:looting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> LOOTING = create(key("looting"));
/**
* {@code minecraft:loyalty}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> LOYALTY = create(key("loyalty"));
/**
* {@code minecraft:luck_of_the_sea}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> LUCK_OF_THE_SEA = create(key("luck_of_the_sea"));
/**
* {@code minecraft:lure}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> LURE = create(key("lure"));
/**
* {@code minecraft:mending}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> MENDING = create(key("mending"));
/**
* {@code minecraft:multishot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> MULTISHOT = create(key("multishot"));
/**
* {@code minecraft:piercing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> PIERCING = create(key("piercing"));
/**
* {@code minecraft:power}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> POWER = create(key("power"));
/**
* {@code minecraft:projectile_protection}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> PROJECTILE_PROTECTION = create(key("projectile_protection"));
/**
* {@code minecraft:protection}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> PROTECTION = create(key("protection"));
/**
* {@code minecraft:punch}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> PUNCH = create(key("punch"));
/**
* {@code minecraft:quick_charge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> QUICK_CHARGE = create(key("quick_charge"));
/**
* {@code minecraft:respiration}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> RESPIRATION = create(key("respiration"));
/**
* {@code minecraft:riptide}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> RIPTIDE = create(key("riptide"));
/**
* {@code minecraft:sharpness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> SHARPNESS = create(key("sharpness"));
/**
* {@code minecraft:silk_touch}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> SILK_TOUCH = create(key("silk_touch"));
/**
* {@code minecraft:smite}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> SMITE = create(key("smite"));
/**
* {@code minecraft:soul_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> SOUL_SPEED = create(key("soul_speed"));
/**
* {@code minecraft:sweeping_edge}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> SWEEPING_EDGE = create(key("sweeping_edge"));
/**
* {@code minecraft:swift_sneak}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> SWIFT_SNEAK = create(key("swift_sneak"));
/**
* {@code minecraft:thorns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> THORNS = create(key("thorns"));
/**
* {@code minecraft:unbreaking}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> UNBREAKING = create(key("unbreaking"));
/**
* {@code minecraft:vanishing_curse}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> VANISHING_CURSE = create(key("vanishing_curse"));
/**
* {@code minecraft:wind_burst}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Enchantment> WIND_BURST = create(key("wind_burst"));
private EnchantmentKeys() {
}
/**
* Creates a key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Enchantment> create(final Key key) {
return TypedKey.create(RegistryKey.ENCHANTMENT, key);
}
}
@@ -0,0 +1,71 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Fluid;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#FLUID}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class FluidKeys {
/**
* {@code minecraft:empty}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Fluid> EMPTY = create(key("empty"));
/**
* {@code minecraft:flowing_lava}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Fluid> FLOWING_LAVA = create(key("flowing_lava"));
/**
* {@code minecraft:flowing_water}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Fluid> FLOWING_WATER = create(key("flowing_water"));
/**
* {@code minecraft:lava}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Fluid> LAVA = create(key("lava"));
/**
* {@code minecraft:water}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Fluid> WATER = create(key("water"));
private FluidKeys() {
}
private static TypedKey<Fluid> create(final Key key) {
return TypedKey.create(RegistryKey.FLUID, key);
}
}
@@ -0,0 +1,57 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Frog;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#FROG_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class FrogVariantKeys {
/**
* {@code minecraft:cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Frog.Variant> COLD = create(key("cold"));
/**
* {@code minecraft:temperate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Frog.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<Frog.Variant> WARM = create(key("warm"));
private FrogVariantKeys() {
}
private static TypedKey<Frog.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.FROG_VARIANT, key);
}
}
@@ -0,0 +1,463 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.GameEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#GAME_EVENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class GameEventKeys {
/**
* {@code minecraft:block_activate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_ACTIVATE = create(key("block_activate"));
/**
* {@code minecraft:block_attach}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_ATTACH = create(key("block_attach"));
/**
* {@code minecraft:block_change}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_CHANGE = create(key("block_change"));
/**
* {@code minecraft:block_close}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_CLOSE = create(key("block_close"));
/**
* {@code minecraft:block_deactivate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_DEACTIVATE = create(key("block_deactivate"));
/**
* {@code minecraft:block_destroy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_DESTROY = create(key("block_destroy"));
/**
* {@code minecraft:block_detach}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_DETACH = create(key("block_detach"));
/**
* {@code minecraft:block_open}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_OPEN = create(key("block_open"));
/**
* {@code minecraft:block_place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BLOCK_PLACE = create(key("block_place"));
/**
* {@code minecraft:container_close}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> CONTAINER_CLOSE = create(key("container_close"));
/**
* {@code minecraft:container_open}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> CONTAINER_OPEN = create(key("container_open"));
/**
* {@code minecraft:drink}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> DRINK = create(key("drink"));
/**
* {@code minecraft:eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> EAT = create(key("eat"));
/**
* {@code minecraft:elytra_glide}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ELYTRA_GLIDE = create(key("elytra_glide"));
/**
* {@code minecraft:entity_action}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ENTITY_ACTION = create(key("entity_action"));
/**
* {@code minecraft:entity_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ENTITY_DAMAGE = create(key("entity_damage"));
/**
* {@code minecraft:entity_die}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ENTITY_DIE = create(key("entity_die"));
/**
* {@code minecraft:entity_dismount}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ENTITY_DISMOUNT = create(key("entity_dismount"));
/**
* {@code minecraft:entity_interact}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ENTITY_INTERACT = create(key("entity_interact"));
/**
* {@code minecraft:entity_mount}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ENTITY_MOUNT = create(key("entity_mount"));
/**
* {@code minecraft:entity_place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ENTITY_PLACE = create(key("entity_place"));
/**
* {@code minecraft:equip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> EQUIP = create(key("equip"));
/**
* {@code minecraft:explode}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> EXPLODE = create(key("explode"));
/**
* {@code minecraft:flap}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> FLAP = create(key("flap"));
/**
* {@code minecraft:fluid_pickup}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> FLUID_PICKUP = create(key("fluid_pickup"));
/**
* {@code minecraft:fluid_place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> FLUID_PLACE = create(key("fluid_place"));
/**
* {@code minecraft:hit_ground}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> HIT_GROUND = create(key("hit_ground"));
/**
* {@code minecraft:instrument_play}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> INSTRUMENT_PLAY = create(key("instrument_play"));
/**
* {@code minecraft:item_interact_finish}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ITEM_INTERACT_FINISH = create(key("item_interact_finish"));
/**
* {@code minecraft:item_interact_start}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> ITEM_INTERACT_START = create(key("item_interact_start"));
/**
* {@code minecraft:jukebox_play}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> JUKEBOX_PLAY = create(key("jukebox_play"));
/**
* {@code minecraft:jukebox_stop_play}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> JUKEBOX_STOP_PLAY = create(key("jukebox_stop_play"));
/**
* {@code minecraft:lightning_strike}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> LIGHTNING_STRIKE = create(key("lightning_strike"));
/**
* {@code minecraft:note_block_play}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> NOTE_BLOCK_PLAY = create(key("note_block_play"));
/**
* {@code minecraft:prime_fuse}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> PRIME_FUSE = create(key("prime_fuse"));
/**
* {@code minecraft:projectile_land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> PROJECTILE_LAND = create(key("projectile_land"));
/**
* {@code minecraft:projectile_shoot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> PROJECTILE_SHOOT = create(key("projectile_shoot"));
/**
* {@code minecraft:resonate_1}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_1 = create(key("resonate_1"));
/**
* {@code minecraft:resonate_2}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_2 = create(key("resonate_2"));
/**
* {@code minecraft:resonate_3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_3 = create(key("resonate_3"));
/**
* {@code minecraft:resonate_4}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_4 = create(key("resonate_4"));
/**
* {@code minecraft:resonate_5}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_5 = create(key("resonate_5"));
/**
* {@code minecraft:resonate_6}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_6 = create(key("resonate_6"));
/**
* {@code minecraft:resonate_7}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_7 = create(key("resonate_7"));
/**
* {@code minecraft:resonate_8}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_8 = create(key("resonate_8"));
/**
* {@code minecraft:resonate_9}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_9 = create(key("resonate_9"));
/**
* {@code minecraft:resonate_10}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_10 = create(key("resonate_10"));
/**
* {@code minecraft:resonate_11}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_11 = create(key("resonate_11"));
/**
* {@code minecraft:resonate_12}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_12 = create(key("resonate_12"));
/**
* {@code minecraft:resonate_13}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_13 = create(key("resonate_13"));
/**
* {@code minecraft:resonate_14}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_14 = create(key("resonate_14"));
/**
* {@code minecraft:resonate_15}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> RESONATE_15 = create(key("resonate_15"));
/**
* {@code minecraft:sculk_sensor_tendrils_clicking}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> SCULK_SENSOR_TENDRILS_CLICKING = create(key("sculk_sensor_tendrils_clicking"));
/**
* {@code minecraft:shear}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> SHEAR = create(key("shear"));
/**
* {@code minecraft:shriek}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> SHRIEK = create(key("shriek"));
/**
* {@code minecraft:splash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> SPLASH = create(key("splash"));
/**
* {@code minecraft:step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> STEP = create(key("step"));
/**
* {@code minecraft:swim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> SWIM = create(key("swim"));
/**
* {@code minecraft:teleport}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> TELEPORT = create(key("teleport"));
/**
* {@code minecraft:unequip}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> UNEQUIP = create(key("unequip"));
private GameEventKeys() {
}
/**
* Creates a key for {@link GameEvent} in the registry {@code minecraft:game_event}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<GameEvent> create(final Key key) {
return TypedKey.create(RegistryKey.GAME_EVENT, key);
}
}
@@ -0,0 +1,99 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MusicInstrument;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#INSTRUMENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class InstrumentKeys {
/**
* {@code minecraft:admire_goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MusicInstrument> ADMIRE_GOAT_HORN = create(key("admire_goat_horn"));
/**
* {@code minecraft:call_goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MusicInstrument> CALL_GOAT_HORN = create(key("call_goat_horn"));
/**
* {@code minecraft:dream_goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MusicInstrument> DREAM_GOAT_HORN = create(key("dream_goat_horn"));
/**
* {@code minecraft:feel_goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MusicInstrument> FEEL_GOAT_HORN = create(key("feel_goat_horn"));
/**
* {@code minecraft:ponder_goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MusicInstrument> PONDER_GOAT_HORN = create(key("ponder_goat_horn"));
/**
* {@code minecraft:seek_goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MusicInstrument> SEEK_GOAT_HORN = create(key("seek_goat_horn"));
/**
* {@code minecraft:sing_goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MusicInstrument> SING_GOAT_HORN = create(key("sing_goat_horn"));
/**
* {@code minecraft:yearn_goat_horn}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MusicInstrument> YEARN_GOAT_HORN = create(key("yearn_goat_horn"));
private InstrumentKeys() {
}
/**
* Creates a key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<MusicInstrument> create(final Key key) {
return TypedKey.create(RegistryKey.INSTRUMENT, key);
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,176 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.JukeboxSong;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#JUKEBOX_SONG}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class JukeboxSongKeys {
/**
* {@code minecraft:11}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> ELEVEN = create(key("11"));
/**
* {@code minecraft:13}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> THIRTEEN = create(key("13"));
/**
* {@code minecraft:5}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> FIVE = create(key("5"));
/**
* {@code minecraft:blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> BLOCKS = create(key("blocks"));
/**
* {@code minecraft:cat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> CAT = create(key("cat"));
/**
* {@code minecraft:chirp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> CHIRP = create(key("chirp"));
/**
* {@code minecraft:creator}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> CREATOR = create(key("creator"));
/**
* {@code minecraft:creator_music_box}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> CREATOR_MUSIC_BOX = create(key("creator_music_box"));
/**
* {@code minecraft:far}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> FAR = create(key("far"));
/**
* {@code minecraft:mall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> MALL = create(key("mall"));
/**
* {@code minecraft:mellohi}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> MELLOHI = create(key("mellohi"));
/**
* {@code minecraft:otherside}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> OTHERSIDE = create(key("otherside"));
/**
* {@code minecraft:pigstep}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> PIGSTEP = create(key("pigstep"));
/**
* {@code minecraft:precipice}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> PRECIPICE = create(key("precipice"));
/**
* {@code minecraft:relic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> RELIC = create(key("relic"));
/**
* {@code minecraft:stal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> STAL = create(key("stal"));
/**
* {@code minecraft:strad}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> STRAD = create(key("strad"));
/**
* {@code minecraft:wait}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> WAIT = create(key("wait"));
/**
* {@code minecraft:ward}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> WARD = create(key("ward"));
private JukeboxSongKeys() {
}
/**
* Creates a key for {@link JukeboxSong} in the registry {@code minecraft:jukebox_song}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<JukeboxSong> create(final Key key) {
return TypedKey.create(RegistryKey.JUKEBOX_SONG, key);
}
}
@@ -0,0 +1,281 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.map.MapCursor;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#MAP_DECORATION_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class MapDecorationTypeKeys {
/**
* {@code minecraft:banner_black}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_BLACK = create(key("banner_black"));
/**
* {@code minecraft:banner_blue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_BLUE = create(key("banner_blue"));
/**
* {@code minecraft:banner_brown}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_BROWN = create(key("banner_brown"));
/**
* {@code minecraft:banner_cyan}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_CYAN = create(key("banner_cyan"));
/**
* {@code minecraft:banner_gray}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_GRAY = create(key("banner_gray"));
/**
* {@code minecraft:banner_green}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_GREEN = create(key("banner_green"));
/**
* {@code minecraft:banner_light_blue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_LIGHT_BLUE = create(key("banner_light_blue"));
/**
* {@code minecraft:banner_light_gray}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_LIGHT_GRAY = create(key("banner_light_gray"));
/**
* {@code minecraft:banner_lime}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_LIME = create(key("banner_lime"));
/**
* {@code minecraft:banner_magenta}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_MAGENTA = create(key("banner_magenta"));
/**
* {@code minecraft:banner_orange}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_ORANGE = create(key("banner_orange"));
/**
* {@code minecraft:banner_pink}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_PINK = create(key("banner_pink"));
/**
* {@code minecraft:banner_purple}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_PURPLE = create(key("banner_purple"));
/**
* {@code minecraft:banner_red}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_RED = create(key("banner_red"));
/**
* {@code minecraft:banner_white}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_WHITE = create(key("banner_white"));
/**
* {@code minecraft:banner_yellow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_YELLOW = create(key("banner_yellow"));
/**
* {@code minecraft:blue_marker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BLUE_MARKER = create(key("blue_marker"));
/**
* {@code minecraft:frame}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> FRAME = create(key("frame"));
/**
* {@code minecraft:jungle_temple}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> JUNGLE_TEMPLE = create(key("jungle_temple"));
/**
* {@code minecraft:mansion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> MANSION = create(key("mansion"));
/**
* {@code minecraft:monument}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> MONUMENT = create(key("monument"));
/**
* {@code minecraft:player}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> PLAYER = create(key("player"));
/**
* {@code minecraft:player_off_limits}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> PLAYER_OFF_LIMITS = create(key("player_off_limits"));
/**
* {@code minecraft:player_off_map}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> PLAYER_OFF_MAP = create(key("player_off_map"));
/**
* {@code minecraft:red_marker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> RED_MARKER = create(key("red_marker"));
/**
* {@code minecraft:red_x}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> RED_X = create(key("red_x"));
/**
* {@code minecraft:swamp_hut}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> SWAMP_HUT = create(key("swamp_hut"));
/**
* {@code minecraft:target_point}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> TARGET_POINT = create(key("target_point"));
/**
* {@code minecraft:target_x}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> TARGET_X = create(key("target_x"));
/**
* {@code minecraft:trial_chambers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> TRIAL_CHAMBERS = create(key("trial_chambers"));
/**
* {@code minecraft:village_desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_DESERT = create(key("village_desert"));
/**
* {@code minecraft:village_plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_PLAINS = create(key("village_plains"));
/**
* {@code minecraft:village_savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_SAVANNA = create(key("village_savanna"));
/**
* {@code minecraft:village_snowy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_SNOWY = create(key("village_snowy"));
/**
* {@code minecraft:village_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_TAIGA = create(key("village_taiga"));
private MapDecorationTypeKeys() {
}
private static TypedKey<MapCursor.Type> create(final Key key) {
return TypedKey.create(RegistryKey.MAP_DECORATION_TYPE, key);
}
}
@@ -0,0 +1,211 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.MenuType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#MENU}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class MenuTypeKeys {
/**
* {@code minecraft:anvil}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> ANVIL = create(key("anvil"));
/**
* {@code minecraft:beacon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> BEACON = create(key("beacon"));
/**
* {@code minecraft:blast_furnace}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> BLAST_FURNACE = create(key("blast_furnace"));
/**
* {@code minecraft:brewing_stand}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> BREWING_STAND = create(key("brewing_stand"));
/**
* {@code minecraft:cartography_table}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> CARTOGRAPHY_TABLE = create(key("cartography_table"));
/**
* {@code minecraft:crafter_3x3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> CRAFTER_3X3 = create(key("crafter_3x3"));
/**
* {@code minecraft:crafting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> CRAFTING = create(key("crafting"));
/**
* {@code minecraft:enchantment}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> ENCHANTMENT = create(key("enchantment"));
/**
* {@code minecraft:furnace}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> FURNACE = create(key("furnace"));
/**
* {@code minecraft:generic_3x3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_3X3 = create(key("generic_3x3"));
/**
* {@code minecraft:generic_9x1}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X1 = create(key("generic_9x1"));
/**
* {@code minecraft:generic_9x2}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X2 = create(key("generic_9x2"));
/**
* {@code minecraft:generic_9x3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X3 = create(key("generic_9x3"));
/**
* {@code minecraft:generic_9x4}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X4 = create(key("generic_9x4"));
/**
* {@code minecraft:generic_9x5}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X5 = create(key("generic_9x5"));
/**
* {@code minecraft:generic_9x6}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X6 = create(key("generic_9x6"));
/**
* {@code minecraft:grindstone}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GRINDSTONE = create(key("grindstone"));
/**
* {@code minecraft:hopper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> HOPPER = create(key("hopper"));
/**
* {@code minecraft:lectern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> LECTERN = create(key("lectern"));
/**
* {@code minecraft:loom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> LOOM = create(key("loom"));
/**
* {@code minecraft:merchant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> MERCHANT = create(key("merchant"));
/**
* {@code minecraft:shulker_box}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> SHULKER_BOX = create(key("shulker_box"));
/**
* {@code minecraft:smithing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> SMITHING = create(key("smithing"));
/**
* {@code minecraft:smoker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> SMOKER = create(key("smoker"));
/**
* {@code minecraft:stonecutter}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> STONECUTTER = create(key("stonecutter"));
private MenuTypeKeys() {
}
private static TypedKey<MenuType> create(final Key key) {
return TypedKey.create(RegistryKey.MENU, key);
}
}
@@ -0,0 +1,309 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#MOB_EFFECT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class MobEffectKeys {
/**
* {@code minecraft:absorption}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> ABSORPTION = create(key("absorption"));
/**
* {@code minecraft:bad_omen}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> BAD_OMEN = create(key("bad_omen"));
/**
* {@code minecraft:blindness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> BLINDNESS = create(key("blindness"));
/**
* {@code minecraft:conduit_power}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> CONDUIT_POWER = create(key("conduit_power"));
/**
* {@code minecraft:darkness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> DARKNESS = create(key("darkness"));
/**
* {@code minecraft:dolphins_grace}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> DOLPHINS_GRACE = create(key("dolphins_grace"));
/**
* {@code minecraft:fire_resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> FIRE_RESISTANCE = create(key("fire_resistance"));
/**
* {@code minecraft:glowing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> GLOWING = create(key("glowing"));
/**
* {@code minecraft:haste}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> HASTE = create(key("haste"));
/**
* {@code minecraft:health_boost}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> HEALTH_BOOST = create(key("health_boost"));
/**
* {@code minecraft:hero_of_the_village}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> HERO_OF_THE_VILLAGE = create(key("hero_of_the_village"));
/**
* {@code minecraft:hunger}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> HUNGER = create(key("hunger"));
/**
* {@code minecraft:infested}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> INFESTED = create(key("infested"));
/**
* {@code minecraft:instant_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> INSTANT_DAMAGE = create(key("instant_damage"));
/**
* {@code minecraft:instant_health}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> INSTANT_HEALTH = create(key("instant_health"));
/**
* {@code minecraft:invisibility}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> INVISIBILITY = create(key("invisibility"));
/**
* {@code minecraft:jump_boost}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> JUMP_BOOST = create(key("jump_boost"));
/**
* {@code minecraft:levitation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> LEVITATION = create(key("levitation"));
/**
* {@code minecraft:luck}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> LUCK = create(key("luck"));
/**
* {@code minecraft:mining_fatigue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> MINING_FATIGUE = create(key("mining_fatigue"));
/**
* {@code minecraft:nausea}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> NAUSEA = create(key("nausea"));
/**
* {@code minecraft:night_vision}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> NIGHT_VISION = create(key("night_vision"));
/**
* {@code minecraft:oozing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> OOZING = create(key("oozing"));
/**
* {@code minecraft:poison}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> POISON = create(key("poison"));
/**
* {@code minecraft:raid_omen}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> RAID_OMEN = create(key("raid_omen"));
/**
* {@code minecraft:regeneration}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> REGENERATION = create(key("regeneration"));
/**
* {@code minecraft:resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> RESISTANCE = create(key("resistance"));
/**
* {@code minecraft:saturation}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> SATURATION = create(key("saturation"));
/**
* {@code minecraft:slow_falling}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> SLOW_FALLING = create(key("slow_falling"));
/**
* {@code minecraft:slowness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> SLOWNESS = create(key("slowness"));
/**
* {@code minecraft:speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> SPEED = create(key("speed"));
/**
* {@code minecraft:strength}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> STRENGTH = create(key("strength"));
/**
* {@code minecraft:trial_omen}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> TRIAL_OMEN = create(key("trial_omen"));
/**
* {@code minecraft:unluck}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> UNLUCK = create(key("unluck"));
/**
* {@code minecraft:water_breathing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> WATER_BREATHING = create(key("water_breathing"));
/**
* {@code minecraft:weakness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> WEAKNESS = create(key("weakness"));
/**
* {@code minecraft:weaving}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> WEAVING = create(key("weaving"));
/**
* {@code minecraft:wind_charged}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> WIND_CHARGED = create(key("wind_charged"));
/**
* {@code minecraft:wither}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionEffectType> WITHER = create(key("wither"));
private MobEffectKeys() {
}
private static TypedKey<PotionEffectType> create(final Key key) {
return TypedKey.create(RegistryKey.MOB_EFFECT, key);
}
}
@@ -0,0 +1,393 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Art;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#PAINTING_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class PaintingVariantKeys {
/**
* {@code minecraft:alban}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> ALBAN = create(key("alban"));
/**
* {@code minecraft:aztec}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> AZTEC = create(key("aztec"));
/**
* {@code minecraft:aztec2}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> AZTEC2 = create(key("aztec2"));
/**
* {@code minecraft:backyard}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> BACKYARD = create(key("backyard"));
/**
* {@code minecraft:baroque}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> BAROQUE = create(key("baroque"));
/**
* {@code minecraft:bomb}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> BOMB = create(key("bomb"));
/**
* {@code minecraft:bouquet}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> BOUQUET = create(key("bouquet"));
/**
* {@code minecraft:burning_skull}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> BURNING_SKULL = create(key("burning_skull"));
/**
* {@code minecraft:bust}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> BUST = create(key("bust"));
/**
* {@code minecraft:cavebird}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> CAVEBIRD = create(key("cavebird"));
/**
* {@code minecraft:changing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> CHANGING = create(key("changing"));
/**
* {@code minecraft:cotan}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> COTAN = create(key("cotan"));
/**
* {@code minecraft:courbet}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> COURBET = create(key("courbet"));
/**
* {@code minecraft:creebet}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> CREEBET = create(key("creebet"));
/**
* {@code minecraft:donkey_kong}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> DONKEY_KONG = create(key("donkey_kong"));
/**
* {@code minecraft:earth}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> EARTH = create(key("earth"));
/**
* {@code minecraft:endboss}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> ENDBOSS = create(key("endboss"));
/**
* {@code minecraft:fern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> FERN = create(key("fern"));
/**
* {@code minecraft:fighters}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> FIGHTERS = create(key("fighters"));
/**
* {@code minecraft:finding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> FINDING = create(key("finding"));
/**
* {@code minecraft:fire}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> FIRE = create(key("fire"));
/**
* {@code minecraft:graham}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> GRAHAM = create(key("graham"));
/**
* {@code minecraft:humble}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> HUMBLE = create(key("humble"));
/**
* {@code minecraft:kebab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> KEBAB = create(key("kebab"));
/**
* {@code minecraft:lowmist}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> LOWMIST = create(key("lowmist"));
/**
* {@code minecraft:match}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> MATCH = create(key("match"));
/**
* {@code minecraft:meditative}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> MEDITATIVE = create(key("meditative"));
/**
* {@code minecraft:orb}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> ORB = create(key("orb"));
/**
* {@code minecraft:owlemons}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> OWLEMONS = create(key("owlemons"));
/**
* {@code minecraft:passage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> PASSAGE = create(key("passage"));
/**
* {@code minecraft:pigscene}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> PIGSCENE = create(key("pigscene"));
/**
* {@code minecraft:plant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> PLANT = create(key("plant"));
/**
* {@code minecraft:pointer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> POINTER = create(key("pointer"));
/**
* {@code minecraft:pond}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> POND = create(key("pond"));
/**
* {@code minecraft:pool}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> POOL = create(key("pool"));
/**
* {@code minecraft:prairie_ride}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> PRAIRIE_RIDE = create(key("prairie_ride"));
/**
* {@code minecraft:sea}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> SEA = create(key("sea"));
/**
* {@code minecraft:skeleton}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> SKELETON = create(key("skeleton"));
/**
* {@code minecraft:skull_and_roses}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> SKULL_AND_ROSES = create(key("skull_and_roses"));
/**
* {@code minecraft:stage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> STAGE = create(key("stage"));
/**
* {@code minecraft:sunflowers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> SUNFLOWERS = create(key("sunflowers"));
/**
* {@code minecraft:sunset}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> SUNSET = create(key("sunset"));
/**
* {@code minecraft:tides}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> TIDES = create(key("tides"));
/**
* {@code minecraft:unpacked}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> UNPACKED = create(key("unpacked"));
/**
* {@code minecraft:void}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> VOID = create(key("void"));
/**
* {@code minecraft:wanderer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> WANDERER = create(key("wanderer"));
/**
* {@code minecraft:wasteland}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> WASTELAND = create(key("wasteland"));
/**
* {@code minecraft:water}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> WATER = create(key("water"));
/**
* {@code minecraft:wind}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> WIND = create(key("wind"));
/**
* {@code minecraft:wither}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Art> WITHER = create(key("wither"));
private PaintingVariantKeys() {
}
/**
* Creates a key for {@link Art} in the registry {@code minecraft:painting_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Art> create(final Key key) {
return TypedKey.create(RegistryKey.PAINTING_VARIANT, key);
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,281 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.generator.structure.Structure;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#STRUCTURE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class StructureKeys {
/**
* {@code minecraft:ancient_city}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> ANCIENT_CITY = create(key("ancient_city"));
/**
* {@code minecraft:bastion_remnant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> BASTION_REMNANT = create(key("bastion_remnant"));
/**
* {@code minecraft:buried_treasure}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> BURIED_TREASURE = create(key("buried_treasure"));
/**
* {@code minecraft:desert_pyramid}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> DESERT_PYRAMID = create(key("desert_pyramid"));
/**
* {@code minecraft:end_city}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> END_CITY = create(key("end_city"));
/**
* {@code minecraft:fortress}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> FORTRESS = create(key("fortress"));
/**
* {@code minecraft:igloo}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> IGLOO = create(key("igloo"));
/**
* {@code minecraft:jungle_pyramid}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> JUNGLE_PYRAMID = create(key("jungle_pyramid"));
/**
* {@code minecraft:mansion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> MANSION = create(key("mansion"));
/**
* {@code minecraft:mineshaft}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> MINESHAFT = create(key("mineshaft"));
/**
* {@code minecraft:mineshaft_mesa}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> MINESHAFT_MESA = create(key("mineshaft_mesa"));
/**
* {@code minecraft:monument}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> MONUMENT = create(key("monument"));
/**
* {@code minecraft:nether_fossil}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> NETHER_FOSSIL = create(key("nether_fossil"));
/**
* {@code minecraft:ocean_ruin_cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> OCEAN_RUIN_COLD = create(key("ocean_ruin_cold"));
/**
* {@code minecraft:ocean_ruin_warm}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> OCEAN_RUIN_WARM = create(key("ocean_ruin_warm"));
/**
* {@code minecraft:pillager_outpost}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> PILLAGER_OUTPOST = create(key("pillager_outpost"));
/**
* {@code minecraft:ruined_portal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> RUINED_PORTAL = create(key("ruined_portal"));
/**
* {@code minecraft:ruined_portal_desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> RUINED_PORTAL_DESERT = create(key("ruined_portal_desert"));
/**
* {@code minecraft:ruined_portal_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> RUINED_PORTAL_JUNGLE = create(key("ruined_portal_jungle"));
/**
* {@code minecraft:ruined_portal_mountain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> RUINED_PORTAL_MOUNTAIN = create(key("ruined_portal_mountain"));
/**
* {@code minecraft:ruined_portal_nether}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> RUINED_PORTAL_NETHER = create(key("ruined_portal_nether"));
/**
* {@code minecraft:ruined_portal_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> RUINED_PORTAL_OCEAN = create(key("ruined_portal_ocean"));
/**
* {@code minecraft:ruined_portal_swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> RUINED_PORTAL_SWAMP = create(key("ruined_portal_swamp"));
/**
* {@code minecraft:shipwreck}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> SHIPWRECK = create(key("shipwreck"));
/**
* {@code minecraft:shipwreck_beached}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> SHIPWRECK_BEACHED = create(key("shipwreck_beached"));
/**
* {@code minecraft:stronghold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> STRONGHOLD = create(key("stronghold"));
/**
* {@code minecraft:swamp_hut}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> SWAMP_HUT = create(key("swamp_hut"));
/**
* {@code minecraft:trail_ruins}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> TRAIL_RUINS = create(key("trail_ruins"));
/**
* {@code minecraft:trial_chambers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> TRIAL_CHAMBERS = create(key("trial_chambers"));
/**
* {@code minecraft:village_desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> VILLAGE_DESERT = create(key("village_desert"));
/**
* {@code minecraft:village_plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> VILLAGE_PLAINS = create(key("village_plains"));
/**
* {@code minecraft:village_savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> VILLAGE_SAVANNA = create(key("village_savanna"));
/**
* {@code minecraft:village_snowy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> VILLAGE_SNOWY = create(key("village_snowy"));
/**
* {@code minecraft:village_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Structure> VILLAGE_TAIGA = create(key("village_taiga"));
private StructureKeys() {
}
/**
* Creates a key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Structure> create(final Key key) {
return TypedKey.create(RegistryKey.STRUCTURE, key);
}
}
@@ -0,0 +1,148 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.generator.structure.StructureType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#STRUCTURE_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class StructureTypeKeys {
/**
* {@code minecraft:buried_treasure}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> BURIED_TREASURE = create(key("buried_treasure"));
/**
* {@code minecraft:desert_pyramid}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> DESERT_PYRAMID = create(key("desert_pyramid"));
/**
* {@code minecraft:end_city}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> END_CITY = create(key("end_city"));
/**
* {@code minecraft:fortress}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> FORTRESS = create(key("fortress"));
/**
* {@code minecraft:igloo}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> IGLOO = create(key("igloo"));
/**
* {@code minecraft:jigsaw}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> JIGSAW = create(key("jigsaw"));
/**
* {@code minecraft:jungle_temple}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> JUNGLE_TEMPLE = create(key("jungle_temple"));
/**
* {@code minecraft:mineshaft}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> MINESHAFT = create(key("mineshaft"));
/**
* {@code minecraft:nether_fossil}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> NETHER_FOSSIL = create(key("nether_fossil"));
/**
* {@code minecraft:ocean_monument}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> OCEAN_MONUMENT = create(key("ocean_monument"));
/**
* {@code minecraft:ocean_ruin}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> OCEAN_RUIN = create(key("ocean_ruin"));
/**
* {@code minecraft:ruined_portal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> RUINED_PORTAL = create(key("ruined_portal"));
/**
* {@code minecraft:shipwreck}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> SHIPWRECK = create(key("shipwreck"));
/**
* {@code minecraft:stronghold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> STRONGHOLD = create(key("stronghold"));
/**
* {@code minecraft:swamp_hut}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> SWAMP_HUT = create(key("swamp_hut"));
/**
* {@code minecraft:woodland_mansion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<StructureType> WOODLAND_MANSION = create(key("woodland_mansion"));
private StructureTypeKeys() {
}
private static TypedKey<StructureType> create(final Key key) {
return TypedKey.create(RegistryKey.STRUCTURE_TYPE, key);
}
}
@@ -0,0 +1,120 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#TRIM_MATERIAL}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class TrimMaterialKeys {
/**
* {@code minecraft:amethyst}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> AMETHYST = create(key("amethyst"));
/**
* {@code minecraft:copper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> COPPER = create(key("copper"));
/**
* {@code minecraft:diamond}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> DIAMOND = create(key("diamond"));
/**
* {@code minecraft:emerald}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> EMERALD = create(key("emerald"));
/**
* {@code minecraft:gold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> GOLD = create(key("gold"));
/**
* {@code minecraft:iron}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> IRON = create(key("iron"));
/**
* {@code minecraft:lapis}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> LAPIS = create(key("lapis"));
/**
* {@code minecraft:netherite}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> NETHERITE = create(key("netherite"));
/**
* {@code minecraft:quartz}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> QUARTZ = create(key("quartz"));
/**
* {@code minecraft:redstone}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> REDSTONE = create(key("redstone"));
/**
* {@code minecraft:resin}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimMaterial> RESIN = create(key("resin"));
private TrimMaterialKeys() {
}
/**
* Creates a key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<TrimMaterial> create(final Key key) {
return TypedKey.create(RegistryKey.TRIM_MATERIAL, key);
}
}
@@ -0,0 +1,169 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.meta.trim.TrimPattern;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#TRIM_PATTERN}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class TrimPatternKeys {
/**
* {@code minecraft:bolt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> BOLT = create(key("bolt"));
/**
* {@code minecraft:coast}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> COAST = create(key("coast"));
/**
* {@code minecraft:dune}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> DUNE = create(key("dune"));
/**
* {@code minecraft:eye}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> EYE = create(key("eye"));
/**
* {@code minecraft:flow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> FLOW = create(key("flow"));
/**
* {@code minecraft:host}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> HOST = create(key("host"));
/**
* {@code minecraft:raiser}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> RAISER = create(key("raiser"));
/**
* {@code minecraft:rib}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> RIB = create(key("rib"));
/**
* {@code minecraft:sentry}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> SENTRY = create(key("sentry"));
/**
* {@code minecraft:shaper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> SHAPER = create(key("shaper"));
/**
* {@code minecraft:silence}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> SILENCE = create(key("silence"));
/**
* {@code minecraft:snout}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> SNOUT = create(key("snout"));
/**
* {@code minecraft:spire}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> SPIRE = create(key("spire"));
/**
* {@code minecraft:tide}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> TIDE = create(key("tide"));
/**
* {@code minecraft:vex}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> VEX = create(key("vex"));
/**
* {@code minecraft:ward}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> WARD = create(key("ward"));
/**
* {@code minecraft:wayfinder}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> WAYFINDER = create(key("wayfinder"));
/**
* {@code minecraft:wild}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<TrimPattern> WILD = create(key("wild"));
private TrimPatternKeys() {
}
/**
* Creates a key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<TrimPattern> create(final Key key) {
return TypedKey.create(RegistryKey.TRIM_PATTERN, key);
}
}
@@ -0,0 +1,141 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Villager;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#VILLAGER_PROFESSION}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class VillagerProfessionKeys {
/**
* {@code minecraft:armorer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> ARMORER = create(key("armorer"));
/**
* {@code minecraft:butcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> BUTCHER = create(key("butcher"));
/**
* {@code minecraft:cartographer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> CARTOGRAPHER = create(key("cartographer"));
/**
* {@code minecraft:cleric}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> CLERIC = create(key("cleric"));
/**
* {@code minecraft:farmer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> FARMER = create(key("farmer"));
/**
* {@code minecraft:fisherman}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> FISHERMAN = create(key("fisherman"));
/**
* {@code minecraft:fletcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> FLETCHER = create(key("fletcher"));
/**
* {@code minecraft:leatherworker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> LEATHERWORKER = create(key("leatherworker"));
/**
* {@code minecraft:librarian}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> LIBRARIAN = create(key("librarian"));
/**
* {@code minecraft:mason}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> MASON = create(key("mason"));
/**
* {@code minecraft:nitwit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> NITWIT = create(key("nitwit"));
/**
* {@code minecraft:none}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> NONE = create(key("none"));
/**
* {@code minecraft:shepherd}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> SHEPHERD = create(key("shepherd"));
/**
* {@code minecraft:toolsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> TOOLSMITH = create(key("toolsmith"));
/**
* {@code minecraft:weaponsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> WEAPONSMITH = create(key("weaponsmith"));
private VillagerProfessionKeys() {
}
private static TypedKey<Villager.Profession> create(final Key key) {
return TypedKey.create(RegistryKey.VILLAGER_PROFESSION, key);
}
}
@@ -0,0 +1,85 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Villager;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#VILLAGER_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class VillagerTypeKeys {
/**
* {@code minecraft:desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> DESERT = create(key("desert"));
/**
* {@code minecraft:jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> JUNGLE = create(key("jungle"));
/**
* {@code minecraft:plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> PLAINS = create(key("plains"));
/**
* {@code minecraft:savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> SAVANNA = create(key("savanna"));
/**
* {@code minecraft:snow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> SNOW = create(key("snow"));
/**
* {@code minecraft:swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> SWAMP = create(key("swamp"));
/**
* {@code minecraft:taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> TAIGA = create(key("taiga"));
private VillagerTypeKeys() {
}
private static TypedKey<Villager.Type> create(final Key key) {
return TypedKey.create(RegistryKey.VILLAGER_TYPE, key);
}
}
@@ -0,0 +1,106 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Wolf;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#WOLF_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class WolfVariantKeys {
/**
* {@code minecraft:ashen}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> ASHEN = create(key("ashen"));
/**
* {@code minecraft:black}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> BLACK = create(key("black"));
/**
* {@code minecraft:chestnut}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> CHESTNUT = create(key("chestnut"));
/**
* {@code minecraft:pale}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> PALE = create(key("pale"));
/**
* {@code minecraft:rusty}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> RUSTY = create(key("rusty"));
/**
* {@code minecraft:snowy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> SNOWY = create(key("snowy"));
/**
* {@code minecraft:spotted}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> SPOTTED = create(key("spotted"));
/**
* {@code minecraft:striped}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> STRIPED = create(key("striped"));
/**
* {@code minecraft:woods}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.Variant> WOODS = create(key("woods"));
private WolfVariantKeys() {
}
/**
* Creates a key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static TypedKey<Wolf.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.WOLF_VARIANT, key);
}
}
@@ -0,0 +1,120 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.banner.PatternType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#BANNER_PATTERN}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class BannerPatternTagKeys {
/**
* {@code #minecraft:no_item_required}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> NO_ITEM_REQUIRED = create(key("no_item_required"));
/**
* {@code #minecraft:pattern_item/bordure_indented}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_BORDURE_INDENTED = create(key("pattern_item/bordure_indented"));
/**
* {@code #minecraft:pattern_item/creeper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_CREEPER = create(key("pattern_item/creeper"));
/**
* {@code #minecraft:pattern_item/field_masoned}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_FIELD_MASONED = create(key("pattern_item/field_masoned"));
/**
* {@code #minecraft:pattern_item/flow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_FLOW = create(key("pattern_item/flow"));
/**
* {@code #minecraft:pattern_item/flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_FLOWER = create(key("pattern_item/flower"));
/**
* {@code #minecraft:pattern_item/globe}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_GLOBE = create(key("pattern_item/globe"));
/**
* {@code #minecraft:pattern_item/guster}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_GUSTER = create(key("pattern_item/guster"));
/**
* {@code #minecraft:pattern_item/mojang}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_MOJANG = create(key("pattern_item/mojang"));
/**
* {@code #minecraft:pattern_item/piglin}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_PIGLIN = create(key("pattern_item/piglin"));
/**
* {@code #minecraft:pattern_item/skull}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PatternType> PATTERN_ITEM_SKULL = create(key("pattern_item/skull"));
private BannerPatternTagKeys() {
}
/**
* Creates a tag key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<PatternType> create(final Key key) {
return TagKey.create(RegistryKey.BANNER_PATTERN, key);
}
}
@@ -0,0 +1,533 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.Biome;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#BIOME}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class BiomeTagKeys {
/**
* {@code #minecraft:allows_surface_slime_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> ALLOWS_SURFACE_SLIME_SPAWNS = create(key("allows_surface_slime_spawns"));
/**
* {@code #minecraft:allows_tropical_fish_spawns_at_any_height}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
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}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_ANCIENT_CITY = create(key("has_structure/ancient_city"));
/**
* {@code #minecraft:has_structure/bastion_remnant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_BASTION_REMNANT = create(key("has_structure/bastion_remnant"));
/**
* {@code #minecraft:has_structure/buried_treasure}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_BURIED_TREASURE = create(key("has_structure/buried_treasure"));
/**
* {@code #minecraft:has_structure/desert_pyramid}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_DESERT_PYRAMID = create(key("has_structure/desert_pyramid"));
/**
* {@code #minecraft:has_structure/end_city}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_END_CITY = create(key("has_structure/end_city"));
/**
* {@code #minecraft:has_structure/igloo}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_IGLOO = create(key("has_structure/igloo"));
/**
* {@code #minecraft:has_structure/jungle_temple}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_JUNGLE_TEMPLE = create(key("has_structure/jungle_temple"));
/**
* {@code #minecraft:has_structure/mineshaft}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_MINESHAFT = create(key("has_structure/mineshaft"));
/**
* {@code #minecraft:has_structure/mineshaft_mesa}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_MINESHAFT_MESA = create(key("has_structure/mineshaft_mesa"));
/**
* {@code #minecraft:has_structure/nether_fortress}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_NETHER_FORTRESS = create(key("has_structure/nether_fortress"));
/**
* {@code #minecraft:has_structure/nether_fossil}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_NETHER_FOSSIL = create(key("has_structure/nether_fossil"));
/**
* {@code #minecraft:has_structure/ocean_monument}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_OCEAN_MONUMENT = create(key("has_structure/ocean_monument"));
/**
* {@code #minecraft:has_structure/ocean_ruin_cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_OCEAN_RUIN_COLD = create(key("has_structure/ocean_ruin_cold"));
/**
* {@code #minecraft:has_structure/ocean_ruin_warm}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_OCEAN_RUIN_WARM = create(key("has_structure/ocean_ruin_warm"));
/**
* {@code #minecraft:has_structure/pillager_outpost}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_PILLAGER_OUTPOST = create(key("has_structure/pillager_outpost"));
/**
* {@code #minecraft:has_structure/ruined_portal_desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_DESERT = create(key("has_structure/ruined_portal_desert"));
/**
* {@code #minecraft:has_structure/ruined_portal_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_JUNGLE = create(key("has_structure/ruined_portal_jungle"));
/**
* {@code #minecraft:has_structure/ruined_portal_mountain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_MOUNTAIN = create(key("has_structure/ruined_portal_mountain"));
/**
* {@code #minecraft:has_structure/ruined_portal_nether}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_NETHER = create(key("has_structure/ruined_portal_nether"));
/**
* {@code #minecraft:has_structure/ruined_portal_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_OCEAN = create(key("has_structure/ruined_portal_ocean"));
/**
* {@code #minecraft:has_structure/ruined_portal_standard}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_STANDARD = create(key("has_structure/ruined_portal_standard"));
/**
* {@code #minecraft:has_structure/ruined_portal_swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_RUINED_PORTAL_SWAMP = create(key("has_structure/ruined_portal_swamp"));
/**
* {@code #minecraft:has_structure/shipwreck}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_SHIPWRECK = create(key("has_structure/shipwreck"));
/**
* {@code #minecraft:has_structure/shipwreck_beached}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_SHIPWRECK_BEACHED = create(key("has_structure/shipwreck_beached"));
/**
* {@code #minecraft:has_structure/stronghold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_STRONGHOLD = create(key("has_structure/stronghold"));
/**
* {@code #minecraft:has_structure/swamp_hut}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_SWAMP_HUT = create(key("has_structure/swamp_hut"));
/**
* {@code #minecraft:has_structure/trail_ruins}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_TRAIL_RUINS = create(key("has_structure/trail_ruins"));
/**
* {@code #minecraft:has_structure/trial_chambers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_TRIAL_CHAMBERS = create(key("has_structure/trial_chambers"));
/**
* {@code #minecraft:has_structure/village_desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_DESERT = create(key("has_structure/village_desert"));
/**
* {@code #minecraft:has_structure/village_plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_PLAINS = create(key("has_structure/village_plains"));
/**
* {@code #minecraft:has_structure/village_savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_SAVANNA = create(key("has_structure/village_savanna"));
/**
* {@code #minecraft:has_structure/village_snowy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_SNOWY = create(key("has_structure/village_snowy"));
/**
* {@code #minecraft:has_structure/village_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> HAS_STRUCTURE_VILLAGE_TAIGA = create(key("has_structure/village_taiga"));
/**
* {@code #minecraft:has_structure/woodland_mansion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
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}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_BADLANDS = create(key("is_badlands"));
/**
* {@code #minecraft:is_beach}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_BEACH = create(key("is_beach"));
/**
* {@code #minecraft:is_deep_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_DEEP_OCEAN = create(key("is_deep_ocean"));
/**
* {@code #minecraft:is_end}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_END = create(key("is_end"));
/**
* {@code #minecraft:is_forest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_FOREST = create(key("is_forest"));
/**
* {@code #minecraft:is_hill}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_HILL = create(key("is_hill"));
/**
* {@code #minecraft:is_jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_JUNGLE = create(key("is_jungle"));
/**
* {@code #minecraft:is_mountain}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_MOUNTAIN = create(key("is_mountain"));
/**
* {@code #minecraft:is_nether}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_NETHER = create(key("is_nether"));
/**
* {@code #minecraft:is_ocean}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_OCEAN = create(key("is_ocean"));
/**
* {@code #minecraft:is_overworld}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_OVERWORLD = create(key("is_overworld"));
/**
* {@code #minecraft:is_river}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_RIVER = create(key("is_river"));
/**
* {@code #minecraft:is_savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_SAVANNA = create(key("is_savanna"));
/**
* {@code #minecraft:is_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> IS_TAIGA = create(key("is_taiga"));
/**
* {@code #minecraft:mineshaft_blocking}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> MINESHAFT_BLOCKING = create(key("mineshaft_blocking"));
/**
* {@code #minecraft:more_frequent_drowned_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
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}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> POLAR_BEARS_SPAWN_ON_ALTERNATE_BLOCKS = create(key("polar_bears_spawn_on_alternate_blocks"));
/**
* {@code #minecraft:produces_corals_from_bonemeal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> PRODUCES_CORALS_FROM_BONEMEAL = create(key("produces_corals_from_bonemeal"));
/**
* {@code #minecraft:reduce_water_ambient_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> REDUCE_WATER_AMBIENT_SPAWNS = create(key("reduce_water_ambient_spawns"));
/**
* {@code #minecraft:required_ocean_monument_surrounding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
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_frogs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_COLD_VARIANT_FROGS = create(key("spawns_cold_variant_frogs"));
/**
* {@code #minecraft:spawns_gold_rabbits}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_GOLD_RABBITS = create(key("spawns_gold_rabbits"));
/**
* {@code #minecraft:spawns_snow_foxes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_SNOW_FOXES = create(key("spawns_snow_foxes"));
/**
* {@code #minecraft:spawns_warm_variant_frogs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_WARM_VARIANT_FROGS = create(key("spawns_warm_variant_frogs"));
/**
* {@code #minecraft:spawns_white_rabbits}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_WHITE_RABBITS = create(key("spawns_white_rabbits"));
/**
* {@code #minecraft:stronghold_biased_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> STRONGHOLD_BIASED_TO = create(key("stronghold_biased_to"));
/**
* {@code #minecraft:water_on_map_outlines}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
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}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> WITHOUT_WANDERING_TRADER_SPAWNS = create(key("without_wandering_trader_spawns"));
/**
* {@code #minecraft:without_zombie_sieges}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> WITHOUT_ZOMBIE_SIEGES = create(key("without_zombie_sieges"));
private BiomeTagKeys() {
}
/**
* Creates a tag key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Biome> create(final Key key) {
return TagKey.create(RegistryKey.BIOME, key);
}
}
@@ -0,0 +1,57 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#CAT_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class CatVariantTagKeys {
/**
* {@code #minecraft:default_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Cat.Type> DEFAULT_SPAWNS = create(key("default_spawns"));
/**
* {@code #minecraft:full_moon_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Cat.Type> FULL_MOON_SPAWNS = create(key("full_moon_spawns"));
private CatVariantTagKeys() {
}
/**
* Creates a tag key for {@link Cat.Type} in the registry {@code minecraft:cat_variant}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Cat.Type> create(final Key key) {
return TagKey.create(RegistryKey.CAT_VARIANT, key);
}
}
@@ -0,0 +1,274 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#DAMAGE_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class DamageTypeTagKeys {
/**
* {@code #minecraft:always_hurts_ender_dragons}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> ALWAYS_HURTS_ENDER_DRAGONS = create(key("always_hurts_ender_dragons"));
/**
* {@code #minecraft:always_kills_armor_stands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> ALWAYS_KILLS_ARMOR_STANDS = create(key("always_kills_armor_stands"));
/**
* {@code #minecraft:always_most_significant_fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> ALWAYS_MOST_SIGNIFICANT_FALL = create(key("always_most_significant_fall"));
/**
* {@code #minecraft:always_triggers_silverfish}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> ALWAYS_TRIGGERS_SILVERFISH = create(key("always_triggers_silverfish"));
/**
* {@code #minecraft:avoids_guardian_thorns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> AVOIDS_GUARDIAN_THORNS = create(key("avoids_guardian_thorns"));
/**
* {@code #minecraft:burn_from_stepping}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BURN_FROM_STEPPING = create(key("burn_from_stepping"));
/**
* {@code #minecraft:burns_armor_stands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BURNS_ARMOR_STANDS = create(key("burns_armor_stands"));
/**
* {@code #minecraft:bypasses_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BYPASSES_ARMOR = create(key("bypasses_armor"));
/**
* {@code #minecraft:bypasses_effects}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BYPASSES_EFFECTS = create(key("bypasses_effects"));
/**
* {@code #minecraft:bypasses_enchantments}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BYPASSES_ENCHANTMENTS = create(key("bypasses_enchantments"));
/**
* {@code #minecraft:bypasses_invulnerability}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BYPASSES_INVULNERABILITY = create(key("bypasses_invulnerability"));
/**
* {@code #minecraft:bypasses_resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BYPASSES_RESISTANCE = create(key("bypasses_resistance"));
/**
* {@code #minecraft:bypasses_shield}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BYPASSES_SHIELD = create(key("bypasses_shield"));
/**
* {@code #minecraft:bypasses_wolf_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> BYPASSES_WOLF_ARMOR = create(key("bypasses_wolf_armor"));
/**
* {@code #minecraft:can_break_armor_stand}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> CAN_BREAK_ARMOR_STAND = create(key("can_break_armor_stand"));
/**
* {@code #minecraft:damages_helmet}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> DAMAGES_HELMET = create(key("damages_helmet"));
/**
* {@code #minecraft:ignites_armor_stands}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IGNITES_ARMOR_STANDS = create(key("ignites_armor_stands"));
/**
* {@code #minecraft:is_drowning}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IS_DROWNING = create(key("is_drowning"));
/**
* {@code #minecraft:is_explosion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IS_EXPLOSION = create(key("is_explosion"));
/**
* {@code #minecraft:is_fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IS_FALL = create(key("is_fall"));
/**
* {@code #minecraft:is_fire}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IS_FIRE = create(key("is_fire"));
/**
* {@code #minecraft:is_freezing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IS_FREEZING = create(key("is_freezing"));
/**
* {@code #minecraft:is_lightning}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IS_LIGHTNING = create(key("is_lightning"));
/**
* {@code #minecraft:is_player_attack}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IS_PLAYER_ATTACK = create(key("is_player_attack"));
/**
* {@code #minecraft:is_projectile}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> IS_PROJECTILE = create(key("is_projectile"));
/**
* {@code #minecraft:mace_smash}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> MACE_SMASH = create(key("mace_smash"));
/**
* {@code #minecraft:no_anger}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> NO_ANGER = create(key("no_anger"));
/**
* {@code #minecraft:no_impact}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> NO_IMPACT = create(key("no_impact"));
/**
* {@code #minecraft:no_knockback}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> NO_KNOCKBACK = create(key("no_knockback"));
/**
* {@code #minecraft:panic_causes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> PANIC_CAUSES = create(key("panic_causes"));
/**
* {@code #minecraft:panic_environmental_causes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> PANIC_ENVIRONMENTAL_CAUSES = create(key("panic_environmental_causes"));
/**
* {@code #minecraft:witch_resistant_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> WITCH_RESISTANT_TO = create(key("witch_resistant_to"));
/**
* {@code #minecraft:wither_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> WITHER_IMMUNE_TO = create(key("wither_immune_to"));
private DamageTypeTagKeys() {
}
/**
* Creates a tag key for {@link DamageType} in the registry {@code minecraft:damage_type}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<DamageType> create(final Key key) {
return TagKey.create(RegistryKey.DAMAGE_TYPE, key);
}
}
@@ -0,0 +1,324 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MinecraftExperimental;
import org.bukkit.enchantments.Enchantment;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#ENCHANTMENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class EnchantmentTagKeys {
/**
* {@code #minecraft:curse}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> CURSE = create(key("curse"));
/**
* {@code #minecraft:double_trade_price}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> DOUBLE_TRADE_PRICE = create(key("double_trade_price"));
/**
* {@code #minecraft:exclusive_set/armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> EXCLUSIVE_SET_ARMOR = create(key("exclusive_set/armor"));
/**
* {@code #minecraft:exclusive_set/boots}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> EXCLUSIVE_SET_BOOTS = create(key("exclusive_set/boots"));
/**
* {@code #minecraft:exclusive_set/bow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> EXCLUSIVE_SET_BOW = create(key("exclusive_set/bow"));
/**
* {@code #minecraft:exclusive_set/crossbow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> EXCLUSIVE_SET_CROSSBOW = create(key("exclusive_set/crossbow"));
/**
* {@code #minecraft:exclusive_set/damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> EXCLUSIVE_SET_DAMAGE = create(key("exclusive_set/damage"));
/**
* {@code #minecraft:exclusive_set/mining}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> EXCLUSIVE_SET_MINING = create(key("exclusive_set/mining"));
/**
* {@code #minecraft:exclusive_set/riptide}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> EXCLUSIVE_SET_RIPTIDE = create(key("exclusive_set/riptide"));
/**
* {@code #minecraft:in_enchanting_table}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> IN_ENCHANTING_TABLE = create(key("in_enchanting_table"));
/**
* {@code #minecraft:non_treasure}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> NON_TREASURE = create(key("non_treasure"));
/**
* {@code #minecraft:on_mob_spawn_equipment}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> ON_MOB_SPAWN_EQUIPMENT = create(key("on_mob_spawn_equipment"));
/**
* {@code #minecraft:on_random_loot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> ON_RANDOM_LOOT = create(key("on_random_loot"));
/**
* {@code #minecraft:on_traded_equipment}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> ON_TRADED_EQUIPMENT = create(key("on_traded_equipment"));
/**
* {@code #minecraft:prevents_bee_spawns_when_mining}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> PREVENTS_BEE_SPAWNS_WHEN_MINING = create(key("prevents_bee_spawns_when_mining"));
/**
* {@code #minecraft:prevents_decorated_pot_shattering}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> PREVENTS_DECORATED_POT_SHATTERING = create(key("prevents_decorated_pot_shattering"));
/**
* {@code #minecraft:prevents_ice_melting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> PREVENTS_ICE_MELTING = create(key("prevents_ice_melting"));
/**
* {@code #minecraft:prevents_infested_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> PREVENTS_INFESTED_SPAWNS = create(key("prevents_infested_spawns"));
/**
* {@code #minecraft:smelts_loot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> SMELTS_LOOT = create(key("smelts_loot"));
/**
* {@code #minecraft:tooltip_order}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> TOOLTIP_ORDER = create(key("tooltip_order"));
/**
* {@code #minecraft:tradeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> TRADEABLE = create(key("tradeable"));
/**
* {@code #minecraft:trades/desert_common}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_DESERT_COMMON = create(key("trades/desert_common"));
/**
* {@code #minecraft:trades/desert_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_DESERT_SPECIAL = create(key("trades/desert_special"));
/**
* {@code #minecraft:trades/jungle_common}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_JUNGLE_COMMON = create(key("trades/jungle_common"));
/**
* {@code #minecraft:trades/jungle_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_JUNGLE_SPECIAL = create(key("trades/jungle_special"));
/**
* {@code #minecraft:trades/plains_common}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_PLAINS_COMMON = create(key("trades/plains_common"));
/**
* {@code #minecraft:trades/plains_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_PLAINS_SPECIAL = create(key("trades/plains_special"));
/**
* {@code #minecraft:trades/savanna_common}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SAVANNA_COMMON = create(key("trades/savanna_common"));
/**
* {@code #minecraft:trades/savanna_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SAVANNA_SPECIAL = create(key("trades/savanna_special"));
/**
* {@code #minecraft:trades/snow_common}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SNOW_COMMON = create(key("trades/snow_common"));
/**
* {@code #minecraft:trades/snow_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SNOW_SPECIAL = create(key("trades/snow_special"));
/**
* {@code #minecraft:trades/swamp_common}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SWAMP_COMMON = create(key("trades/swamp_common"));
/**
* {@code #minecraft:trades/swamp_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_SWAMP_SPECIAL = create(key("trades/swamp_special"));
/**
* {@code #minecraft:trades/taiga_common}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_TAIGA_COMMON = create(key("trades/taiga_common"));
/**
* {@code #minecraft:trades/taiga_special}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Enchantment> TRADES_TAIGA_SPECIAL = create(key("trades/taiga_special"));
/**
* {@code #minecraft:treasure}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Enchantment> TREASURE = create(key("treasure"));
private EnchantmentTagKeys() {
}
/**
* Creates a tag key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Enchantment> create(final Key key) {
return TagKey.create(RegistryKey.ENCHANTMENT, key);
}
}
@@ -0,0 +1,57 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Fluid;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#FLUID}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class FluidTagKeys {
/**
* {@code #minecraft:lava}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> LAVA = create(key("lava"));
/**
* {@code #minecraft:water}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Fluid> WATER = create(key("water"));
private FluidTagKeys() {
}
/**
* Creates a tag key for {@link Fluid} in the registry {@code minecraft:fluid}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Fluid> create(final Key key) {
return TagKey.create(RegistryKey.FLUID, key);
}
}
@@ -0,0 +1,78 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.GameEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#GAME_EVENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class GameEventTagKeys {
/**
* {@code #minecraft:allay_can_listen}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<GameEvent> ALLAY_CAN_LISTEN = create(key("allay_can_listen"));
/**
* {@code #minecraft:ignore_vibrations_sneaking}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<GameEvent> IGNORE_VIBRATIONS_SNEAKING = create(key("ignore_vibrations_sneaking"));
/**
* {@code #minecraft:shrieker_can_listen}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<GameEvent> SHRIEKER_CAN_LISTEN = create(key("shrieker_can_listen"));
/**
* {@code #minecraft:vibrations}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<GameEvent> VIBRATIONS = create(key("vibrations"));
/**
* {@code #minecraft:warden_can_listen}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<GameEvent> WARDEN_CAN_LISTEN = create(key("warden_can_listen"));
private GameEventTagKeys() {
}
/**
* Creates a tag key for {@link GameEvent} in the registry {@code minecraft:game_event}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<GameEvent> create(final Key key) {
return TagKey.create(RegistryKey.GAME_EVENT, key);
}
}
@@ -0,0 +1,64 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MusicInstrument;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#INSTRUMENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class InstrumentTagKeys {
/**
* {@code #minecraft:goat_horns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<MusicInstrument> GOAT_HORNS = create(key("goat_horns"));
/**
* {@code #minecraft:regular_goat_horns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<MusicInstrument> REGULAR_GOAT_HORNS = create(key("regular_goat_horns"));
/**
* {@code #minecraft:screaming_goat_horns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<MusicInstrument> SCREAMING_GOAT_HORNS = create(key("screaming_goat_horns"));
private InstrumentTagKeys() {
}
/**
* Creates a tag key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<MusicInstrument> create(final Key key) {
return TagKey.create(RegistryKey.INSTRUMENT, key);
}
}
@@ -0,0 +1,50 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.Art;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#PAINTING_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class PaintingVariantTagKeys {
/**
* {@code #minecraft:placeable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Art> PLACEABLE = create(key("placeable"));
private PaintingVariantTagKeys() {
}
/**
* Creates a tag key for {@link Art} in the registry {@code minecraft:painting_variant}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Art> create(final Key key) {
return TagKey.create(RegistryKey.PAINTING_VARIANT, key);
}
}
@@ -0,0 +1,198 @@
package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MinecraftExperimental;
import org.bukkit.generator.structure.Structure;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#STRUCTURE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@ApiStatus.Experimental
public final class StructureTagKeys {
/**
* {@code #minecraft:cats_spawn_as_black}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> CATS_SPAWN_AS_BLACK = create(key("cats_spawn_as_black"));
/**
* {@code #minecraft:cats_spawn_in}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> CATS_SPAWN_IN = create(key("cats_spawn_in"));
/**
* {@code #minecraft:dolphin_located}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> DOLPHIN_LOCATED = create(key("dolphin_located"));
/**
* {@code #minecraft:eye_of_ender_located}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> EYE_OF_ENDER_LOCATED = create(key("eye_of_ender_located"));
/**
* {@code #minecraft:mineshaft}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> MINESHAFT = create(key("mineshaft"));
/**
* {@code #minecraft:ocean_ruin}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> OCEAN_RUIN = create(key("ocean_ruin"));
/**
* {@code #minecraft:on_desert_village_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_DESERT_VILLAGE_MAPS = create(key("on_desert_village_maps"));
/**
* {@code #minecraft:on_jungle_explorer_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_JUNGLE_EXPLORER_MAPS = create(key("on_jungle_explorer_maps"));
/**
* {@code #minecraft:on_ocean_explorer_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_OCEAN_EXPLORER_MAPS = create(key("on_ocean_explorer_maps"));
/**
* {@code #minecraft:on_plains_village_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_PLAINS_VILLAGE_MAPS = create(key("on_plains_village_maps"));
/**
* {@code #minecraft:on_savanna_village_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SAVANNA_VILLAGE_MAPS = create(key("on_savanna_village_maps"));
/**
* {@code #minecraft:on_snowy_village_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SNOWY_VILLAGE_MAPS = create(key("on_snowy_village_maps"));
/**
* {@code #minecraft:on_swamp_explorer_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SWAMP_EXPLORER_MAPS = create(key("on_swamp_explorer_maps"));
/**
* {@code #minecraft:on_taiga_village_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_TAIGA_VILLAGE_MAPS = create(key("on_taiga_village_maps"));
/**
* {@code #minecraft:on_treasure_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_TREASURE_MAPS = create(key("on_treasure_maps"));
/**
* {@code #minecraft:on_trial_chambers_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_TRIAL_CHAMBERS_MAPS = create(key("on_trial_chambers_maps"));
/**
* {@code #minecraft:on_woodland_explorer_maps}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> ON_WOODLAND_EXPLORER_MAPS = create(key("on_woodland_explorer_maps"));
/**
* {@code #minecraft:ruined_portal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> RUINED_PORTAL = create(key("ruined_portal"));
/**
* {@code #minecraft:shipwreck}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> SHIPWRECK = create(key("shipwreck"));
/**
* {@code #minecraft:village}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Structure> VILLAGE = create(key("village"));
private StructureTagKeys() {
}
/**
* Creates a tag key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Structure> create(final Key key) {
return TagKey.create(RegistryKey.STRUCTURE, key);
}
}
@@ -0,0 +1,92 @@
package io.papermc.generator;
import io.papermc.generator.types.GeneratedKeyType;
import io.papermc.generator.types.GeneratedTagKeyType;
import io.papermc.generator.types.SourceGenerator;
import io.papermc.generator.types.goal.MobGoalGenerator;
import io.papermc.paper.registry.RegistryKey;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import org.bukkit.Art;
import org.bukkit.Fluid;
import org.bukkit.GameEvent;
import org.bukkit.JukeboxSong;
import org.bukkit.MusicInstrument;
import org.bukkit.Sound;
import org.bukkit.attribute.Attribute;
import org.bukkit.block.Biome;
import org.bukkit.block.BlockType;
import org.bukkit.block.banner.PatternType;
import org.bukkit.damage.DamageType;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Cat;
import org.bukkit.entity.Frog;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.generator.structure.Structure;
import org.bukkit.generator.structure.StructureType;
import org.bukkit.inventory.ItemType;
import org.bukkit.inventory.MenuType;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.bukkit.inventory.meta.trim.TrimPattern;
import org.bukkit.map.MapCursor;
import org.bukkit.potion.PotionEffectType;
public interface Generators {
SourceGenerator[] API = {
// built-ins
simpleKey("GameEventKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT, true),
simpleKey("StructureTypeKeys", StructureType.class, Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, false),
simpleKey("MobEffectKeys", PotionEffectType.class, Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, false),
simpleKey("BlockTypeKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK, false),
simpleKey("ItemTypeKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM, false),
simpleKey("CatVariantKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT, false),
simpleKey("FrogVariantKeys", Frog.Variant.class, Registries.FROG_VARIANT, RegistryKey.FROG_VARIANT, false),
simpleKey("VillagerProfessionKeys", Villager.Profession.class, Registries.VILLAGER_PROFESSION, RegistryKey.VILLAGER_PROFESSION, false),
simpleKey("VillagerTypeKeys", Villager.Type.class, Registries.VILLAGER_TYPE, RegistryKey.VILLAGER_TYPE, false),
simpleKey("MapDecorationTypeKeys", MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, RegistryKey.MAP_DECORATION_TYPE, false),
simpleKey("MenuTypeKeys", MenuType.class, Registries.MENU, RegistryKey.MENU, false),
simpleKey("AttributeKeys", Attribute.class, Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, false),
simpleKey("FluidKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID, false),
simpleKey("SoundEventKeys", Sound.class, Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, false),
// data-driven
simpleKey("BiomeKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME, true),
simpleKey("StructureKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE, true),
simpleKey("TrimMaterialKeys", TrimMaterial.class, Registries.TRIM_MATERIAL, RegistryKey.TRIM_MATERIAL, true),
simpleKey("TrimPatternKeys", TrimPattern.class, Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, true),
simpleKey("DamageTypeKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, true),
simpleKey("WolfVariantKeys", Wolf.Variant.class, Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, true),
simpleKey("EnchantmentKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, true),
simpleKey("JukeboxSongKeys", JukeboxSong.class, Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, true),
simpleKey("BannerPatternKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, true),
simpleKey("PaintingVariantKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT, true),
simpleKey("InstrumentKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT, true),
// tags
simpleTagKey("GameEventTagKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT),
simpleTagKey("BlockTypeTagKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK),
simpleTagKey("ItemTypeTagKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM),
simpleTagKey("CatVariantTagKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT),
simpleTagKey("FluidTagKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID),
simpleTagKey("BiomeTagKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME),
simpleTagKey("StructureTagKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE),
simpleTagKey("DamageTypeTagKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE),
simpleTagKey("EnchantmentTagKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT),
simpleTagKey("BannerPatternTagKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN),
simpleTagKey("PaintingVariantTagKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT),
simpleTagKey("InstrumentTagKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT),
new MobGoalGenerator("VanillaGoal", "com.destroystokyo.paper.entity.ai")
};
private static <T, A> SourceGenerator simpleKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
return new GeneratedKeyType<>(className, apiType, "io.papermc.paper.registry.keys", registryKey, apiRegistryKey, publicCreateKeyMethod);
}
private static <T, A> SourceGenerator simpleTagKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey) {
return new GeneratedTagKeyType<>(className, apiType, "io.papermc.paper.registry.keys.tags", registryKey, apiRegistryKey, true);
}
}
@@ -0,0 +1,93 @@
package io.papermc.generator;
import com.google.common.util.concurrent.MoreExecutors;
import com.mojang.logging.LogUtils;
import io.papermc.generator.types.SourceGenerator;
import io.papermc.generator.utils.TagCollector;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import net.minecraft.SharedConstants;
import net.minecraft.commands.Commands;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.LayeredRegistryAccess;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistryAccess;
import net.minecraft.resources.RegistryDataLoader;
import net.minecraft.server.Bootstrap;
import net.minecraft.server.RegistryLayer;
import net.minecraft.server.ReloadableServerResources;
import net.minecraft.server.packs.PackType;
import net.minecraft.server.packs.repository.Pack;
import net.minecraft.server.packs.repository.PackRepository;
import net.minecraft.server.packs.repository.ServerPacksSource;
import net.minecraft.server.packs.resources.MultiPackResourceManager;
import net.minecraft.tags.TagKey;
import net.minecraft.tags.TagLoader;
import net.minecraft.world.flag.FeatureFlags;
import org.apache.commons.io.file.PathUtils;
import org.slf4j.Logger;
public final class Main {
private static final Logger LOGGER = LogUtils.getLogger();
public static final RegistryAccess.Frozen REGISTRY_ACCESS;
public static final Map<TagKey<?>, String> EXPERIMENTAL_TAGS;
static {
SharedConstants.tryDetectVersion();
Bootstrap.bootStrap();
Bootstrap.validate();
final PackRepository resourceRepository = ServerPacksSource.createVanillaTrustedRepository();
resourceRepository.reload();
final MultiPackResourceManager resourceManager = new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().map(Pack::open).toList());
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
final List<Registry.PendingTags<?>> pendingTags = TagLoader.loadTagsForExistingRegistries(resourceManager, layers.getLayer(RegistryLayer.STATIC));
final List<HolderLookup.RegistryLookup<?>> worldGenLayer = TagLoader.buildUpdatedLookups(layers.getAccessForLoading(RegistryLayer.WORLDGEN), pendingTags);
final RegistryAccess.Frozen frozenWorldgenRegistries = RegistryDataLoader.load(resourceManager, worldGenLayer, RegistryDataLoader.WORLDGEN_REGISTRIES);
layers = layers.replaceFrom(RegistryLayer.WORLDGEN, frozenWorldgenRegistries);
REGISTRY_ACCESS = layers.compositeAccess().freeze();
final ReloadableServerResources reloadableServerResources = ReloadableServerResources.loadResources(
resourceManager,
layers,
pendingTags,
FeatureFlags.VANILLA_SET,
Commands.CommandSelection.DEDICATED,
0,
MoreExecutors.directExecutor(),
MoreExecutors.directExecutor()
).join();
reloadableServerResources.updateStaticRegistryTags();
EXPERIMENTAL_TAGS = TagCollector.grabExperimental(resourceManager);
}
private Main() {
}
public static void main(final String[] args) {
LOGGER.info("Running API generators...");
generate(Paths.get(args[0]), Generators.API);
// LOGGER.info("Running Server generators...");
// generate(Paths.get(args[1]), Generators.SERVER);
}
private static void generate(Path output, SourceGenerator[] generators) {
try {
if (Files.exists(output)) {
PathUtils.deleteDirectory(output);
}
Files.createDirectories(output);
for (final SourceGenerator generator : generators) {
generator.writeToFile(output);
}
LOGGER.info("Files written to {}", output.toAbsolutePath());
} catch (final Exception ex) {
throw new RuntimeException(ex);
}
}
}
@@ -0,0 +1,207 @@
package io.papermc.generator.types;
import com.google.common.collect.Sets;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import io.papermc.generator.Main;
import io.papermc.generator.utils.Annotations;
import io.papermc.generator.utils.CollectingContext;
import io.papermc.generator.utils.Formatting;
import io.papermc.generator.utils.Javadocs;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Collections;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import javax.lang.model.SourceVersion;
import net.kyori.adventure.key.Key;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistrySetBuilder;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.registries.VanillaRegistries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.flag.FeatureElement;
import net.minecraft.world.flag.FeatureFlags;
import org.bukkit.MinecraftExperimental;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.framework.qual.DefaultQualifier;
import static com.squareup.javapoet.TypeSpec.classBuilder;
import static io.papermc.generator.utils.Annotations.EXPERIMENTAL_API_ANNOTATION;
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
import static java.util.Objects.requireNonNull;
import static javax.lang.model.element.Modifier.FINAL;
import static javax.lang.model.element.Modifier.PRIVATE;
import static javax.lang.model.element.Modifier.PUBLIC;
import static javax.lang.model.element.Modifier.STATIC;
@DefaultQualifier(NonNull.class)
public class GeneratedKeyType<T, A> extends SimpleGenerator {
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> VANILLA_REGISTRY_ENTRIES = VanillaRegistries.BUILDER.entries.stream()
.collect(Collectors.toMap(RegistrySetBuilder.RegistryStub::key, RegistrySetBuilder.RegistryStub::bootstrap));
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> EXPERIMENTAL_REGISTRY_ENTRIES = Map.of(); // Update for Experimental API
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
static {
final Map<RegistryKey<?>, String> map = new HashMap<>();
try {
for (final Field field : RegistryKey.class.getFields()) {
if (!Modifier.isStatic(field.getModifiers()) || !Modifier.isFinal(field.getModifiers()) || field.getType() != RegistryKey.class) {
continue;
}
map.put((RegistryKey<?>) field.get(null), field.getName());
}
REGISTRY_KEY_FIELD_NAMES = Map.copyOf(map);
} catch (final ReflectiveOperationException ex) {
throw new RuntimeException(ex);
}
}
private static final String CREATE_JAVADOC = """
Creates a key for {@link $T} in the registry {@code $L}.
@param key the value's key in the registry
@return a new typed key
""";
private final Class<A> apiType;
private final ResourceKey<? extends Registry<T>> registryKey;
private final RegistryKey<A> apiRegistryKey;
private final boolean publicCreateKeyMethod;
public GeneratedKeyType(final String keysClassName, final Class<A> apiType, final String pkg, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
super(keysClassName, pkg);
this.apiType = apiType;
this.registryKey = registryKey;
this.apiRegistryKey = apiRegistryKey;
this.publicCreateKeyMethod = publicCreateKeyMethod;
}
private MethodSpec.Builder createMethod(final TypeName returnType) {
final TypeName keyType = TypeName.get(Key.class);
final ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
final MethodSpec.Builder create = MethodSpec.methodBuilder("create")
.addModifiers(this.publicCreateKeyMethod ? PUBLIC : PRIVATE, STATIC)
.addParameter(keyParam)
.addCode("return $T.create($T.$L, $N);", TypedKey.class, RegistryKey.class, requireNonNull(REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey), "Missing field for " + this.apiRegistryKey), keyParam)
.returns(returnType);
if (this.publicCreateKeyMethod) {
create.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO remove once not experimental
create.addJavadoc(CREATE_JAVADOC, this.apiType, this.registryKey.location().toString());
}
return create;
}
private TypeSpec.Builder keyHolderType() {
return classBuilder(this.className)
.addModifiers(PUBLIC, FINAL)
.addJavadoc(Javadocs.getVersionDependentClassHeader("{@link $T#$L}"), RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
.addAnnotations(Annotations.CLASS_HEADER)
.addMethod(MethodSpec.constructorBuilder()
.addModifiers(PRIVATE)
.build()
);
}
@Deprecated
private static final Map<String, String> JUKEBOX_SONG_NAMES = Map.of(
"5", "FIVE",
"11", "ELEVEN",
"13", "THIRTEEN"
);
@Override
protected TypeSpec getTypeSpec() {
final TypeName typedKey = ParameterizedTypeName.get(TypedKey.class, this.apiType);
final TypeSpec.Builder typeBuilder = this.keyHolderType();
final MethodSpec.Builder createMethod = this.createMethod(typedKey);
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
final Set<ResourceKey<T>> experimental = this.collectExperimentalKeys(registry);
boolean allExperimental = true;
for (final Holder.Reference<T> reference : registry.listElements().sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList()) {
final ResourceKey<T> key = reference.key();
final String keyPath = key.location().getPath();
String fieldName = Formatting.formatKeyAsField(keyPath);
if (!SourceVersion.isIdentifier(fieldName) && this.registryKey.equals(Registries.JUKEBOX_SONG) && JUKEBOX_SONG_NAMES.containsKey(fieldName)) {
fieldName = JUKEBOX_SONG_NAMES.get(fieldName);
}
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(typedKey, fieldName, PUBLIC, STATIC, FINAL)
.initializer("$N(key($S))", createMethod.build(), keyPath)
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), key.location().toString());
if (experimental.contains(key)) {
fieldBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
} else {
allExperimental = false;
}
typeBuilder.addField(fieldBuilder.build());
}
if (allExperimental) {
typeBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
createMethod.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
} else {
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
}
return typeBuilder.addMethod(createMethod.build()).build();
}
// todo at some point this should be per feature data pack not all merged
private Set<ResourceKey<T>> collectExperimentalKeys(final Registry<T> registry) {
if (FeatureElement.FILTERED_REGISTRIES.contains(registry.key())) {
return this.collectExperimentalKeysBuiltIn(registry);
} else {
return this.collectExperimentalKeysDataDriven(registry);
}
}
private Set<ResourceKey<T>> collectExperimentalKeysBuiltIn(final Registry<T> registry) {
final HolderLookup.RegistryLookup<T> filteredLookup = registry.filterElements(v -> {
return v instanceof final FeatureElement featureElement && FeatureFlags.isExperimental(featureElement.requiredFeatures()); // Update for Experimental API
});
return filteredLookup.listElementIds().collect(Collectors.toUnmodifiableSet());
}
@SuppressWarnings("unchecked")
private Set<ResourceKey<T>> collectExperimentalKeysDataDriven(final Registry<T> registry) {
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> experimentalBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) EXPERIMENTAL_REGISTRY_ENTRIES.get(this.registryKey);
if (experimentalBootstrap == null) {
return Collections.emptySet();
}
final Set<ResourceKey<T>> experimental = Collections.newSetFromMap(new IdentityHashMap<>());
final CollectingContext<T> experimentalCollector = new CollectingContext<>(experimental, registry);
experimentalBootstrap.run(experimentalCollector);
final RegistrySetBuilder.@Nullable RegistryBootstrap<T> vanillaBootstrap = (RegistrySetBuilder.RegistryBootstrap<T>) VANILLA_REGISTRY_ENTRIES.get(this.registryKey);
if (vanillaBootstrap != null) {
final Set<ResourceKey<T>> vanilla = Collections.newSetFromMap(new IdentityHashMap<>());
final CollectingContext<T> vanillaCollector = new CollectingContext<>(vanilla, registry);
vanillaBootstrap.run(vanillaCollector);
return Sets.difference(experimental, vanilla);
}
return experimental;
}
@Override
protected JavaFile.Builder file(final JavaFile.Builder builder) {
return builder
.addStaticImport(Key.class, "key");
}
}
@@ -0,0 +1,138 @@
package io.papermc.generator.types;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import io.papermc.generator.Main;
import io.papermc.generator.utils.Annotations;
import io.papermc.generator.utils.Formatting;
import io.papermc.generator.utils.Javadocs;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import net.kyori.adventure.key.Key;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey;
import org.bukkit.MinecraftExperimental;
import static com.squareup.javapoet.TypeSpec.classBuilder;
import static io.papermc.generator.utils.Annotations.EXPERIMENTAL_API_ANNOTATION;
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
import static java.util.Objects.requireNonNull;
import static javax.lang.model.element.Modifier.FINAL;
import static javax.lang.model.element.Modifier.PRIVATE;
import static javax.lang.model.element.Modifier.PUBLIC;
import static javax.lang.model.element.Modifier.STATIC;
public class GeneratedTagKeyType<T, A> extends SimpleGenerator {
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
static {
final Map<RegistryKey<?>, String> map = new HashMap<>();
try {
for (final Field field : RegistryKey.class.getFields()) {
if (!Modifier.isStatic(field.getModifiers()) || !Modifier.isFinal(field.getModifiers()) || field.getType() != RegistryKey.class) {
continue;
}
map.put((RegistryKey<?>) field.get(null), field.getName());
}
REGISTRY_KEY_FIELD_NAMES = Map.copyOf(map);
} catch (final ReflectiveOperationException ex) {
throw new RuntimeException(ex);
}
}
private static final String CREATE_JAVADOC = """
Creates a tag key for {@link $T} in the registry {@code $L}.
@param key the tag key's key
@return a new tag key
""";
private final Class<A> apiType;
private final ResourceKey<? extends Registry<T>> registryKey;
private final RegistryKey<A> apiRegistryKey;
private final boolean publicCreateKeyMethod;
public GeneratedTagKeyType(final String keysClassName, final Class<A> apiType, final String pkg, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
super(keysClassName, pkg);
this.apiType = apiType;
this.registryKey = registryKey;
this.apiRegistryKey = apiRegistryKey;
this.publicCreateKeyMethod = publicCreateKeyMethod;
}
private MethodSpec.Builder createMethod(final TypeName returnType) {
final TypeName keyType = TypeName.get(Key.class);
final ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
final MethodSpec.Builder create = MethodSpec.methodBuilder("create")
.addModifiers(this.publicCreateKeyMethod ? PUBLIC : PRIVATE, STATIC)
.addParameter(keyParam)
.addCode("return $T.create($T.$L, $N);", TagKey.class, RegistryKey.class, requireNonNull(REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey), "Missing field for " + this.apiRegistryKey), keyParam)
.returns(returnType);
if (this.publicCreateKeyMethod) {
create.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO remove once not experimental
create.addJavadoc(CREATE_JAVADOC, this.apiType, this.registryKey.location().toString());
}
return create;
}
private TypeSpec.Builder keyHolderType() {
return classBuilder(this.className)
.addModifiers(PUBLIC, FINAL)
.addJavadoc(Javadocs.getVersionDependentClassHeader("{@link $T#$L}"), RegistryKey.class, REGISTRY_KEY_FIELD_NAMES.get(this.apiRegistryKey))
.addAnnotations(Annotations.CLASS_HEADER)
.addMethod(MethodSpec.constructorBuilder()
.addModifiers(PRIVATE)
.build()
);
}
@Override
protected TypeSpec getTypeSpec() {
final TypeName tagKey = ParameterizedTypeName.get(TagKey.class, this.apiType);
final TypeSpec.Builder typeBuilder = this.keyHolderType();
final MethodSpec.Builder createMethod = this.createMethod(tagKey);
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
final AtomicBoolean allExperimental = new AtomicBoolean(true);
registry.listTagIds().sorted(Formatting.alphabeticKeyOrder(nmsTagKey -> nmsTagKey.location().getPath())).forEach(nmsTagKey -> {
final String fieldName = Formatting.formatKeyAsField(nmsTagKey.location().getPath());
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(tagKey, fieldName, PUBLIC, STATIC, FINAL)
.initializer("$N(key($S))", createMethod.build(), nmsTagKey.location().getPath())
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), "#" + nmsTagKey.location());
final String featureFlagName = Main.EXPERIMENTAL_TAGS.get(nmsTagKey);
if (featureFlagName != null) {
fieldBuilder.addAnnotations(experimentalAnnotations(MinecraftExperimental.Requires.valueOf(featureFlagName.toUpperCase(Locale.ENGLISH)))); // Update for Experimental API
} else {
allExperimental.set(false);
}
typeBuilder.addField(fieldBuilder.build());
});
if (allExperimental.get()) {
typeBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
createMethod.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
} else {
typeBuilder.addAnnotation(EXPERIMENTAL_API_ANNOTATION); // TODO experimental API
}
return typeBuilder.addMethod(createMethod.build()).build();
}
@Override
protected JavaFile.Builder file(final JavaFile.Builder builder) {
return builder
.addStaticImport(Key.class, "key");
}
}
@@ -0,0 +1,34 @@
package io.papermc.generator.types;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.TypeSpec;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
public abstract class SimpleGenerator implements SourceGenerator {
protected final String className;
protected final String packageName;
protected SimpleGenerator(String className, String packageName) {
this.className = className;
this.packageName = packageName;
}
protected abstract TypeSpec getTypeSpec();
protected abstract JavaFile.Builder file(JavaFile.Builder builder);
@Override
public void writeToFile(Path parent) throws IOException {
JavaFile.Builder builder = JavaFile.builder(this.packageName, this.getTypeSpec());
this.file(builder)
.indent(" ")
.skipJavaLangImports(true);
builder.build().writeTo(parent, StandardCharsets.UTF_8);
}
}
@@ -0,0 +1,9 @@
package io.papermc.generator.types;
import java.io.IOException;
import java.nio.file.Path;
public interface SourceGenerator {
void writeToFile(Path parent) throws IOException;
}
@@ -0,0 +1,100 @@
package io.papermc.generator.types.goal;
import com.destroystokyo.paper.entity.ai.GoalKey;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import com.squareup.javapoet.TypeVariableName;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ScanResult;
import io.papermc.generator.types.SimpleGenerator;
import io.papermc.generator.utils.Annotations;
import io.papermc.generator.utils.Formatting;
import io.papermc.generator.utils.Javadocs;
import java.util.Comparator;
import java.util.List;
import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.ai.goal.WrappedGoal;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Mob;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.framework.qual.DefaultQualifier;
import org.jetbrains.annotations.Nullable;
import static javax.lang.model.element.Modifier.FINAL;
import static javax.lang.model.element.Modifier.PRIVATE;
import static javax.lang.model.element.Modifier.PUBLIC;
import static javax.lang.model.element.Modifier.STATIC;
@DefaultQualifier(NonNull.class)
public class MobGoalGenerator extends SimpleGenerator {
private static final String CLASS_HEADER = Javadocs.getVersionDependentClassHeader("Mob Goals");
public MobGoalGenerator(final String keysClassName, final String pkg) {
super(keysClassName, pkg);
}
@Override
protected TypeSpec getTypeSpec() {
TypeVariableName type = TypeVariableName.get("T", Mob.class);
TypeSpec.Builder typeBuilder = TypeSpec.interfaceBuilder(this.className)
.addSuperinterface(ParameterizedTypeName.get(ClassName.get(com.destroystokyo.paper.entity.ai.Goal.class), type))
.addModifiers(PUBLIC)
.addTypeVariable(type)
.addAnnotations(Annotations.CLASS_HEADER)
.addJavadoc(CLASS_HEADER);
TypeName mobType = ParameterizedTypeName.get(ClassName.get(Class.class), type);
TypeName keyType = TypeName.get(String.class);
ParameterSpec keyParam = ParameterSpec.builder(keyType, "key", FINAL).build();
ParameterSpec typeParam = ParameterSpec.builder(mobType, "type", FINAL).build();
MethodSpec.Builder createMethod = MethodSpec.methodBuilder("create")
.addModifiers(PRIVATE, STATIC)
.addParameter(keyParam)
.addParameter(typeParam)
.addCode("return $T.of($N, $T.minecraft($N));", GoalKey.class, typeParam, NamespacedKey.class, keyParam)
.addTypeVariable(type)
.returns(ParameterizedTypeName.get(ClassName.get(GoalKey.class), type));
List<Class<Goal>> classes;
try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages("net.minecraft").scan()) {
classes = scanResult.getSubclasses(Goal.class.getName()).loadClasses(Goal.class);
}
List<GoalKey<Mob>> vanillaNames = classes.stream()
.filter(clazz -> !java.lang.reflect.Modifier.isAbstract(clazz.getModifiers()))
.filter(clazz -> !WrappedGoal.class.equals(clazz)) // TODO - properly fix
.map(goalClass -> MobGoalNames.getKey(goalClass.getName(), goalClass))
.filter((key) -> !MobGoalNames.isIgnored(key.getNamespacedKey().getKey()))
.sorted(Comparator.<GoalKey<?>, String>comparing(o -> o.getEntityClass().getSimpleName())
.thenComparing(vanillaGoalKey -> vanillaGoalKey.getNamespacedKey().getKey())
)
.toList();
for (final GoalKey<?> goalKey : vanillaNames) {
TypeName typedKey = ParameterizedTypeName.get(GoalKey.class, goalKey.getEntityClass());
NamespacedKey key = goalKey.getNamespacedKey();
String keyPath = key.getKey();
String fieldName = Formatting.formatKeyAsField(keyPath);
FieldSpec.Builder fieldBuilder = FieldSpec.builder(typedKey, fieldName, PUBLIC, STATIC, FINAL)
.initializer("$N($S, $T.class)", createMethod.build(), keyPath, goalKey.getEntityClass());
typeBuilder.addField(fieldBuilder.build());
}
return typeBuilder.addMethod(createMethod.build()).build();
}
@Override
protected JavaFile.Builder file(JavaFile.Builder builder) {
return builder;
}
}
@@ -0,0 +1,336 @@
package io.papermc.generator.types.goal;
import com.destroystokyo.paper.entity.RangedEntity;
import com.destroystokyo.paper.entity.ai.GoalKey;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import net.minecraft.world.entity.FlyingMob;
import net.minecraft.world.entity.PathfinderMob;
import net.minecraft.world.entity.TamableAnimal;
import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.ambient.AmbientCreature;
import net.minecraft.world.entity.animal.AbstractFish;
import net.minecraft.world.entity.animal.AbstractGolem;
import net.minecraft.world.entity.animal.AbstractSchoolingFish;
import net.minecraft.world.entity.animal.Animal;
import net.minecraft.world.entity.animal.Pufferfish;
import net.minecraft.world.entity.animal.ShoulderRidingEntity;
import net.minecraft.world.entity.animal.SnowGolem;
import net.minecraft.world.entity.animal.WaterAnimal;
import net.minecraft.world.entity.animal.horse.AbstractChestedHorse;
import net.minecraft.world.entity.boss.wither.WitherBoss;
import net.minecraft.world.entity.monster.AbstractIllager;
import net.minecraft.world.entity.monster.EnderMan;
import net.minecraft.world.entity.monster.PatrollingMonster;
import net.minecraft.world.entity.monster.RangedAttackMob;
import net.minecraft.world.entity.monster.SpellcasterIllager;
import net.minecraft.world.entity.monster.ZombifiedPiglin;
import net.minecraft.world.entity.monster.piglin.AbstractPiglin;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.AbstractHorse;
import org.bukkit.entity.AbstractSkeleton;
import org.bukkit.entity.AbstractVillager;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Ambient;
import org.bukkit.entity.Animals;
import org.bukkit.entity.Bat;
import org.bukkit.entity.Bee;
import org.bukkit.entity.Blaze;
import org.bukkit.entity.Cat;
import org.bukkit.entity.CaveSpider;
import org.bukkit.entity.ChestedHorse;
import org.bukkit.entity.Chicken;
import org.bukkit.entity.Cod;
import org.bukkit.entity.Cow;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.Dolphin;
import org.bukkit.entity.Donkey;
import org.bukkit.entity.Drowned;
import org.bukkit.entity.ElderGuardian;
import org.bukkit.entity.EnderDragon;
import org.bukkit.entity.Enderman;
import org.bukkit.entity.Endermite;
import org.bukkit.entity.Evoker;
import org.bukkit.entity.Fish;
import org.bukkit.entity.Flying;
import org.bukkit.entity.Fox;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Giant;
import org.bukkit.entity.Golem;
import org.bukkit.entity.Guardian;
import org.bukkit.entity.Hoglin;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Husk;
import org.bukkit.entity.Illager;
import org.bukkit.entity.Illusioner;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Llama;
import org.bukkit.entity.MagmaCube;
import org.bukkit.entity.Mob;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Mule;
import org.bukkit.entity.MushroomCow;
import org.bukkit.entity.Ocelot;
import org.bukkit.entity.Panda;
import org.bukkit.entity.Parrot;
import org.bukkit.entity.Phantom;
import org.bukkit.entity.Pig;
import org.bukkit.entity.PigZombie;
import org.bukkit.entity.Piglin;
import org.bukkit.entity.PiglinAbstract;
import org.bukkit.entity.PiglinBrute;
import org.bukkit.entity.Pillager;
import org.bukkit.entity.PolarBear;
import org.bukkit.entity.PufferFish;
import org.bukkit.entity.Rabbit;
import org.bukkit.entity.Raider;
import org.bukkit.entity.Ravager;
import org.bukkit.entity.Salmon;
import org.bukkit.entity.Sheep;
import org.bukkit.entity.Shulker;
import org.bukkit.entity.Silverfish;
import org.bukkit.entity.Skeleton;
import org.bukkit.entity.SkeletonHorse;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Snowman;
import org.bukkit.entity.Spellcaster;
import org.bukkit.entity.Spider;
import org.bukkit.entity.Squid;
import org.bukkit.entity.Stray;
import org.bukkit.entity.Strider;
import org.bukkit.entity.Tameable;
import org.bukkit.entity.TraderLlama;
import org.bukkit.entity.TropicalFish;
import org.bukkit.entity.Turtle;
import org.bukkit.entity.Vex;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Vindicator;
import org.bukkit.entity.WanderingTrader;
import org.bukkit.entity.WaterMob;
import org.bukkit.entity.Witch;
import org.bukkit.entity.Wither;
import org.bukkit.entity.WitherSkeleton;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.Zoglin;
import org.bukkit.entity.Zombie;
import org.bukkit.entity.ZombieHorse;
import org.bukkit.entity.ZombieVillager;
import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
public class MobGoalNames {
private static final Map<Class<? extends Goal>, Class<? extends Mob>> entityClassCache = new HashMap<>();
public static final Map<Class<? extends net.minecraft.world.entity.Mob>, Class<? extends Mob>> bukkitMap = new HashMap<>();
static {
//<editor-fold defaultstate="collapsed" desc="bukkitMap Entities">
bukkitMap.put(net.minecraft.world.entity.Mob.class, Mob.class);
bukkitMap.put(net.minecraft.world.entity.AgeableMob.class, Ageable.class);
bukkitMap.put(AmbientCreature.class, Ambient.class);
bukkitMap.put(Animal.class, Animals.class);
bukkitMap.put(net.minecraft.world.entity.ambient.Bat.class, Bat.class);
bukkitMap.put(net.minecraft.world.entity.animal.Bee.class, Bee.class);
bukkitMap.put(net.minecraft.world.entity.monster.Blaze.class, Blaze.class);
bukkitMap.put(net.minecraft.world.entity.animal.Cat.class, Cat.class);
bukkitMap.put(net.minecraft.world.entity.monster.CaveSpider.class, CaveSpider.class);
bukkitMap.put(net.minecraft.world.entity.animal.Chicken.class, Chicken.class);
bukkitMap.put(net.minecraft.world.entity.animal.Cod.class, Cod.class);
bukkitMap.put(net.minecraft.world.entity.animal.Cow.class, Cow.class);
bukkitMap.put(PathfinderMob.class, Creature.class);
bukkitMap.put(net.minecraft.world.entity.monster.Creeper.class, Creeper.class);
bukkitMap.put(net.minecraft.world.entity.animal.Dolphin.class, Dolphin.class);
bukkitMap.put(net.minecraft.world.entity.monster.Drowned.class, Drowned.class);
bukkitMap.put(net.minecraft.world.entity.boss.enderdragon.EnderDragon.class, EnderDragon.class);
bukkitMap.put(EnderMan.class, Enderman.class);
bukkitMap.put(net.minecraft.world.entity.monster.Endermite.class, Endermite.class);
bukkitMap.put(net.minecraft.world.entity.monster.Evoker.class, Evoker.class);
bukkitMap.put(AbstractFish.class, Fish.class);
bukkitMap.put(AbstractSchoolingFish.class, io.papermc.paper.entity.SchoolableFish.class);
bukkitMap.put(FlyingMob.class, Flying.class);
bukkitMap.put(net.minecraft.world.entity.animal.Fox.class, Fox.class);
bukkitMap.put(net.minecraft.world.entity.monster.Ghast.class, Ghast.class);
bukkitMap.put(net.minecraft.world.entity.monster.Giant.class, Giant.class);
bukkitMap.put(AbstractGolem.class, Golem.class);
bukkitMap.put(net.minecraft.world.entity.monster.Guardian.class, Guardian.class);
bukkitMap.put(net.minecraft.world.entity.monster.ElderGuardian.class, ElderGuardian.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.Horse.class, Horse.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.AbstractHorse.class, AbstractHorse.class);
bukkitMap.put(AbstractChestedHorse.class, ChestedHorse.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.Donkey.class, Donkey.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.Mule.class, Mule.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.SkeletonHorse.class, SkeletonHorse.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.ZombieHorse.class, ZombieHorse.class);
bukkitMap.put(net.minecraft.world.entity.animal.camel.Camel.class, org.bukkit.entity.Camel.class);
bukkitMap.put(AbstractIllager.class, Illager.class);
bukkitMap.put(net.minecraft.world.entity.monster.Illusioner.class, Illusioner.class);
bukkitMap.put(SpellcasterIllager.class, Spellcaster.class);
bukkitMap.put(net.minecraft.world.entity.animal.IronGolem.class, IronGolem.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.Llama.class, Llama.class);
bukkitMap.put(net.minecraft.world.entity.animal.horse.TraderLlama.class, TraderLlama.class);
bukkitMap.put(net.minecraft.world.entity.monster.MagmaCube.class, MagmaCube.class);
bukkitMap.put(net.minecraft.world.entity.monster.Monster.class, Monster.class);
bukkitMap.put(PatrollingMonster.class, Raider.class); // close enough
bukkitMap.put(net.minecraft.world.entity.animal.MushroomCow.class, MushroomCow.class);
bukkitMap.put(net.minecraft.world.entity.animal.Ocelot.class, Ocelot.class);
bukkitMap.put(net.minecraft.world.entity.animal.Panda.class, Panda.class);
bukkitMap.put(net.minecraft.world.entity.animal.Parrot.class, Parrot.class);
bukkitMap.put(ShoulderRidingEntity.class, Parrot.class); // close enough
bukkitMap.put(net.minecraft.world.entity.monster.Phantom.class, Phantom.class);
bukkitMap.put(net.minecraft.world.entity.animal.Pig.class, Pig.class);
bukkitMap.put(ZombifiedPiglin.class, PigZombie.class);
bukkitMap.put(net.minecraft.world.entity.monster.Pillager.class, Pillager.class);
bukkitMap.put(net.minecraft.world.entity.animal.PolarBear.class, PolarBear.class);
bukkitMap.put(Pufferfish.class, PufferFish.class);
bukkitMap.put(net.minecraft.world.entity.animal.Rabbit.class, Rabbit.class);
bukkitMap.put(net.minecraft.world.entity.raid.Raider.class, Raider.class);
bukkitMap.put(net.minecraft.world.entity.monster.Ravager.class, Ravager.class);
bukkitMap.put(net.minecraft.world.entity.animal.Salmon.class, Salmon.class);
bukkitMap.put(net.minecraft.world.entity.animal.Sheep.class, Sheep.class);
bukkitMap.put(net.minecraft.world.entity.monster.Shulker.class, Shulker.class);
bukkitMap.put(net.minecraft.world.entity.monster.Silverfish.class, Silverfish.class);
bukkitMap.put(net.minecraft.world.entity.monster.Skeleton.class, Skeleton.class);
bukkitMap.put(net.minecraft.world.entity.monster.AbstractSkeleton.class, AbstractSkeleton.class);
bukkitMap.put(net.minecraft.world.entity.monster.Stray.class, Stray.class);
bukkitMap.put(net.minecraft.world.entity.monster.WitherSkeleton.class, WitherSkeleton.class);
bukkitMap.put(net.minecraft.world.entity.monster.Slime.class, Slime.class);
bukkitMap.put(SnowGolem.class, Snowman.class);
bukkitMap.put(net.minecraft.world.entity.monster.Spider.class, Spider.class);
bukkitMap.put(net.minecraft.world.entity.animal.Squid.class, Squid.class);
bukkitMap.put(TamableAnimal.class, Tameable.class);
bukkitMap.put(net.minecraft.world.entity.animal.TropicalFish.class, TropicalFish.class);
bukkitMap.put(net.minecraft.world.entity.animal.Turtle.class, Turtle.class);
bukkitMap.put(net.minecraft.world.entity.monster.Vex.class, Vex.class);
bukkitMap.put(net.minecraft.world.entity.npc.Villager.class, Villager.class);
bukkitMap.put(net.minecraft.world.entity.npc.AbstractVillager.class, AbstractVillager.class);
bukkitMap.put(net.minecraft.world.entity.npc.WanderingTrader.class, WanderingTrader.class);
bukkitMap.put(net.minecraft.world.entity.monster.Vindicator.class, Vindicator.class);
bukkitMap.put(WaterAnimal.class, WaterMob.class);
bukkitMap.put(net.minecraft.world.entity.monster.Witch.class, Witch.class);
bukkitMap.put(WitherBoss.class, Wither.class);
bukkitMap.put(net.minecraft.world.entity.animal.Wolf.class, Wolf.class);
bukkitMap.put(net.minecraft.world.entity.monster.Zombie.class, Zombie.class);
bukkitMap.put(net.minecraft.world.entity.monster.Husk.class, Husk.class);
bukkitMap.put(net.minecraft.world.entity.monster.ZombieVillager.class, ZombieVillager.class);
bukkitMap.put(net.minecraft.world.entity.monster.hoglin.Hoglin.class, Hoglin.class);
bukkitMap.put(net.minecraft.world.entity.monster.piglin.Piglin.class, Piglin.class);
bukkitMap.put(AbstractPiglin.class, PiglinAbstract.class);
bukkitMap.put(net.minecraft.world.entity.monster.piglin.PiglinBrute.class, PiglinBrute.class);
bukkitMap.put(net.minecraft.world.entity.monster.Strider.class, Strider.class);
bukkitMap.put(net.minecraft.world.entity.monster.Zoglin.class, Zoglin.class);
bukkitMap.put(net.minecraft.world.entity.GlowSquid.class, org.bukkit.entity.GlowSquid.class);
bukkitMap.put(net.minecraft.world.entity.animal.axolotl.Axolotl.class, org.bukkit.entity.Axolotl.class);
bukkitMap.put(net.minecraft.world.entity.animal.goat.Goat.class, org.bukkit.entity.Goat.class);
bukkitMap.put(net.minecraft.world.entity.animal.frog.Frog.class, org.bukkit.entity.Frog.class);
bukkitMap.put(net.minecraft.world.entity.animal.frog.Tadpole.class, org.bukkit.entity.Tadpole.class);
bukkitMap.put(net.minecraft.world.entity.monster.warden.Warden.class, org.bukkit.entity.Warden.class);
bukkitMap.put(net.minecraft.world.entity.animal.allay.Allay.class, org.bukkit.entity.Allay.class);
bukkitMap.put(net.minecraft.world.entity.animal.sniffer.Sniffer.class, org.bukkit.entity.Sniffer.class);
bukkitMap.put(net.minecraft.world.entity.monster.breeze.Breeze.class, org.bukkit.entity.Breeze.class);
bukkitMap.put(net.minecraft.world.entity.animal.armadillo.Armadillo.class, org.bukkit.entity.Armadillo.class);
bukkitMap.put(net.minecraft.world.entity.monster.Bogged.class, org.bukkit.entity.Bogged.class);
bukkitMap.put(net.minecraft.world.entity.monster.creaking.Creaking.class, org.bukkit.entity.Creaking.class);
bukkitMap.put(net.minecraft.world.entity.animal.AgeableWaterCreature.class, org.bukkit.entity.Squid.class); // close enough
//</editor-fold>
}
private static final BiMap<String, String> deobfuscationMap = HashBiMap.create();
static final Set<String> ignored = new HashSet<>();
static {
deobfuscationMap.put("abstract_skeleton_1", "abstract_skeleton_melee");
ignored.add("goal_selector_1");
ignored.add("goal_selector_2");
ignored.add("selector_1");
ignored.add("selector_2");
ignored.add("wrapped");
}
public static String getUsableName(String name) {
final String original = name;
name = name.substring(name.lastIndexOf(".") + 1);
boolean flag = false;
// inner classes
if (name.contains("$")) {
String cut = name.substring(name.indexOf("$") + 1);
if (cut.length() <= 2) {
name = name.replace("Entity", "");
name = name.replace("$", "_");
flag = true;
} else {
// mapped, wooo
name = cut;
}
}
name = name.replace("PathfinderGoal", "");
name = name.replace("TargetGoal", "");
name = name.replace("Goal", "");
StringBuilder sb = new StringBuilder();
for (char c : name.toCharArray()) {
if (c >= 'A' && c <= 'Z') {
sb.append("_");
sb.append(Character.toLowerCase(c));
} else {
sb.append(c);
}
}
name = sb.toString();
name = name.replaceFirst("_", "");
if (flag && !deobfuscationMap.containsKey(name.toLowerCase(Locale.ROOT)) && !ignored.contains(name)) {
System.out.println("need to map " + original + " (" + name.toLowerCase(Locale.ROOT) + ")");
}
// did we rename this key?
return deobfuscationMap.getOrDefault(name, name);
}
public static boolean isIgnored(String name) {
return ignored.contains(name);
}
public static <T extends Mob> GoalKey<T> getKey(String clazzName, Class<? extends Goal> goalClass) {
String name = getUsableName(clazzName);
if (MobGoalNames.isIgnored(name)) {
//noinspection unchecked
return (GoalKey<T>) GoalKey.of(Mob.class, NamespacedKey.minecraft(name));
}
return GoalKey.of(getEntity(goalClass), NamespacedKey.minecraft(name));
}
public static <T extends Mob> Class<T> getEntity(Class<? extends Goal> goalClass) {
//noinspection unchecked
return (Class<T>) entityClassCache.computeIfAbsent(goalClass, key -> {
for (Constructor<?> ctor : key.getDeclaredConstructors()) {
for (int i = 0; i < ctor.getParameterCount(); i++) {
Class<?> param = ctor.getParameterTypes()[i];
if (net.minecraft.world.entity.Mob.class.isAssignableFrom(param)) {
//noinspection unchecked
return toBukkitClass((Class<? extends net.minecraft.world.entity.Mob>) param);
} else if (RangedAttackMob.class.isAssignableFrom(param)) {
return RangedEntity.class;
}
}
}
throw new RuntimeException("Can't figure out applicable entity for mob goal " + goalClass); // maybe just return EntityInsentient?
});
}
public static Class<? extends Mob> toBukkitClass(Class<? extends net.minecraft.world.entity.Mob> nmsClass) {
Class<? extends Mob> bukkitClass = bukkitMap.get(nmsClass);
if (bukkitClass == null) {
throw new RuntimeException("Can't figure out applicable bukkit entity for nms entity " + nmsClass); // maybe just return Mob?
}
return bukkitClass;
}
}
@@ -0,0 +1,65 @@
package io.papermc.generator.utils;
import com.squareup.javapoet.AnnotationSpec;
import java.util.ArrayList;
import java.util.List;
import io.papermc.paper.generated.GeneratedFrom;
import net.minecraft.SharedConstants;
import org.bukkit.MinecraftExperimental;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
import org.jspecify.annotations.NullMarked;
public final class Annotations {
public static List<AnnotationSpec> experimentalAnnotations(final MinecraftExperimental.@Nullable Requires requiredFeatureFlag) {
final List<AnnotationSpec> annotationSpecs = new ArrayList<>();
annotationSpecs.add(AnnotationSpec.builder(ApiStatus.Experimental.class).build());
if (requiredFeatureFlag != null) {
annotationSpecs.add(AnnotationSpec.builder(MinecraftExperimental.class)
.addMember("value", "$T.$L", MinecraftExperimental.Requires.class, requiredFeatureFlag.name())
.build());
} else {
annotationSpecs.add(AnnotationSpec.builder(MinecraftExperimental.class).build());
}
return annotationSpecs;
}
public static AnnotationSpec deprecatedVersioned(final @Nullable String version, final boolean forRemoval) {
final AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(Deprecated.class);
if (forRemoval) {
annotationSpec.addMember("forRemoval", "$L", true);
}
if (version != null) {
annotationSpec.addMember("since", "$S", version);
}
return annotationSpec.build();
}
public static AnnotationSpec scheduledRemoval(final @Nullable String version) {
return AnnotationSpec.builder(ApiStatus.ScheduledForRemoval.class)
.addMember("inVersion", "$S", version)
.build();
}
@ApiStatus.Experimental
public static final AnnotationSpec EXPERIMENTAL_API_ANNOTATION = AnnotationSpec.builder(ApiStatus.Experimental.class).build();
public static final AnnotationSpec NULL_MARKED = AnnotationSpec.builder(NullMarked.class).build();
private static final AnnotationSpec SUPPRESS_WARNINGS = AnnotationSpec.builder(SuppressWarnings.class)
.addMember("value", "$S", "unused")
.addMember("value", "$S", "SpellCheckingInspection")
.build();
private static final AnnotationSpec GENERATED_FROM = AnnotationSpec.builder(GeneratedFrom.class)
.addMember("value", "$S", SharedConstants.getCurrentVersion().getName())
.build();
public static final Iterable<AnnotationSpec> CLASS_HEADER = List.of(
SUPPRESS_WARNINGS,
GENERATED_FROM,
NULL_MARKED
);
private Annotations() {
}
}
@@ -0,0 +1,28 @@
package io.papermc.generator.utils;
import com.mojang.serialization.Lifecycle;
import io.papermc.generator.Main;
import java.util.Set;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderGetter;
import net.minecraft.core.Registry;
import net.minecraft.data.worldgen.BootstrapContext;
import net.minecraft.resources.ResourceKey;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.framework.qual.DefaultQualifier;
@DefaultQualifier(NonNull.class)
public record CollectingContext<T>(Set<ResourceKey<T>> registered,
Registry<T> registry) implements BootstrapContext<T> {
@Override
public Holder.Reference<T> register(final ResourceKey<T> resourceKey, final @NonNull T t, final Lifecycle lifecycle) {
this.registered.add(resourceKey);
return Holder.Reference.createStandAlone(this.registry, resourceKey);
}
@Override
public <S> HolderGetter<S> lookup(final ResourceKey<? extends Registry<? extends S>> resourceKey) {
return Main.REGISTRY_ACCESS.lookupOrThrow(resourceKey);
}
}
@@ -0,0 +1,59 @@
package io.papermc.generator.utils;
import java.util.Optional;
import org.apache.commons.lang3.math.NumberUtils;
import java.util.Comparator;
import java.util.Locale;
import java.util.OptionalInt;
import java.util.function.Function;
import java.util.regex.Pattern;
public final class Formatting {
private static final Pattern ILLEGAL_FIELD_CHARACTERS = Pattern.compile("[.-/]");
public static String formatKeyAsField(String path) {
return ILLEGAL_FIELD_CHARACTERS.matcher(path.toUpperCase(Locale.ROOT)).replaceAll("_");
}
public static Optional<String> formatTagKey(String tagDir, String resourcePath) {
int tagsIndex = resourcePath.indexOf(tagDir);
int dotIndex = resourcePath.lastIndexOf('.');
if (tagsIndex == -1 || dotIndex == -1) {
return Optional.empty();
}
return Optional.of(resourcePath.substring(tagsIndex + tagDir.length() + 1, dotIndex)); // namespace/tags/registry_key/[tag_key].json
}
public static Comparator<String> ALPHABETIC_KEY_ORDER = alphabeticKeyOrder(path -> path);
public static <T> Comparator<T> alphabeticKeyOrder(Function<T, String> mapper) {
return (o1, o2) -> {
String path1 = mapper.apply(o1);
String path2 = mapper.apply(o2);
OptionalInt trailingInt1 = tryParseTrailingInt(path1);
OptionalInt trailingInt2 = tryParseTrailingInt(path2);
if (trailingInt1.isPresent() && trailingInt2.isPresent()) {
return Integer.compare(trailingInt1.getAsInt(), trailingInt2.getAsInt());
}
return path1.compareTo(path2);
};
}
private static OptionalInt tryParseTrailingInt(String path) {
int delimiterIndex = path.lastIndexOf('_');
if (delimiterIndex != -1) {
String score = path.substring(delimiterIndex + 1);
if (NumberUtils.isDigits(score)) {
return OptionalInt.of(Integer.parseInt(score));
}
}
return OptionalInt.empty();
}
private Formatting() {
}
}
@@ -0,0 +1,27 @@
package io.papermc.generator.utils;
public final class Javadocs {
public static String getVersionDependentClassHeader(String headerIdentifier) {
return """
Vanilla keys for %s.
@apiNote The fields provided here are a direct representation of
what is available from the vanilla game source. They may be
changed (including removals) on any Minecraft version
bump, so cross-version compatibility is not provided on the
same level as it is on most of the other API.
""".formatted(headerIdentifier);
}
public static String getVersionDependentField(String headerIdentifier) {
return """
%s
@apiNote This field is version-dependant and may be removed in future Minecraft versions
""".formatted(headerIdentifier);
}
private Javadocs() {
}
}
@@ -0,0 +1,79 @@
package io.papermc.generator.utils;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.mojang.logging.LogUtils;
import io.papermc.generator.Main;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;
import java.util.function.BiConsumer;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistryAccess;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.server.packs.PackResources;
import net.minecraft.server.packs.PackType;
import net.minecraft.server.packs.repository.BuiltInPackSource;
import net.minecraft.server.packs.resources.MultiPackResourceManager;
import net.minecraft.tags.TagKey;
import org.slf4j.Logger;
// collect all the tags by grabbing the json from the data-packs
// another (probably) way is to hook into the data generator like the typed keys generator
public final class TagCollector {
private static final Logger LOGGER = LogUtils.getLogger();
public static Map<TagKey<?>, String> grabExperimental(final MultiPackResourceManager resourceManager) {
Map<TagKey<?>, String> result = new IdentityHashMap<>();
// collect all vanilla tags
Multimap<ResourceKey<? extends Registry<?>>, String> vanillaTags = HashMultimap.create();
PackResources vanillaPack = resourceManager.listPacks()
.filter(packResources -> packResources.packId().equals(BuiltInPackSource.VANILLA_ID))
.findFirst()
.orElseThrow();
collectFromPack(vanillaPack, (entry, path) -> vanillaTags.put(entry.key(), path));
// then distinct with other data-pack tags to know for sure newly created tags and so experimental one
resourceManager.listPacks().forEach(pack -> {
String packId = pack.packId();
if (packId.equals(BuiltInPackSource.VANILLA_ID)) return;
collectFromPack(pack, (entry, path) -> {
if (vanillaTags.get(entry.key()).contains(path)) {
return;
}
result.put(entry.value().listTagIds()
.filter(tagKey -> tagKey.location().getPath().equals(path))
.findFirst()
.orElseThrow(), packId);
});
});
return Collections.unmodifiableMap(result);
}
private static void collectFromPack(PackResources pack, BiConsumer<RegistryAccess.RegistryEntry<?>, String> output) {
Set<String> namespaces = pack.getNamespaces(PackType.SERVER_DATA);
for (String namespace : namespaces) {
Main.REGISTRY_ACCESS.registries().forEach(entry -> {
// this is probably expensive but can't find another way around and data-pack loader has similar logic
// the issue is that registry key can have parent/key (and custom folder too) but tag key can also have parent/key so parsing become a mess
// without having at least one of the two values
String tagDir = Registries.tagsDirPath(entry.key());
pack.listResources(PackType.SERVER_DATA, namespace, tagDir, (id, supplier) -> {
Formatting.formatTagKey(tagDir, id.getPath()).ifPresentOrElse(path -> output.accept(entry, path), () -> {
LOGGER.warn("Unable to parse the path: {}/{}/{}.json in the data-pack {} into a tag key", namespace, tagDir, id.getPath(), pack.packId());
});
});
});
}
}
private TagCollector() {
}
}
@@ -0,0 +1,37 @@
package io.papermc.generator;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ScanResult;
import io.papermc.generator.types.goal.MobGoalNames;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.Mob;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.fail;
public class MobGoalConverterTest {
@Test
public void testBukkitMap() {
final List<Class<Mob>> classes;
try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages(Entity.class.getPackageName()).scan()) {
classes = scanResult.getSubclasses(Mob.class.getName()).loadClasses(Mob.class);
}
assertFalse(classes.isEmpty(), "There are supposed to be more than 0 mob classes!");
List<String> missingClasses = new ArrayList<>();
for (Class<Mob> nmsClass : classes) {
if (!MobGoalNames.bukkitMap.containsKey(nmsClass)) {
missingClasses.add(nmsClass.getCanonicalName());
}
}
if (!missingClasses.isEmpty()) {
fail("Missing some entity classes in the bukkit map: " + String.join(", ", missingClasses));
}
}
}
+6
View File
@@ -0,0 +1,6 @@
# for auto-marking experimental stuff
public net/minecraft/core/RegistrySetBuilder entries
public net/minecraft/core/RegistrySetBuilder$RegistryStub
public net/minecraft/data/registries/VanillaRegistries BUILDER
public net/minecraft/data/registries/WinterDropRegistries BUILDER
public net/minecraft/data/registries/TradeRebalanceRegistries BUILDER
+103 -71
View File
@@ -8,7 +8,7 @@ apply if there are changes made to it from upstream - thus notifying us
that changes were made.
diff --git a/.gitignore b/.gitignore
index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f2177b6a036 100644
index 5dd700a956e915c00b25d91dea8d6f285ddab72b..97e78e27ee0eea2c8b24886eeb19164d552323fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
@@ -17,7 +17,7 @@ index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f21
# Eclipse stuff
/.classpath
/.project
@@ -30,3 +32,7 @@
@@ -32,3 +34,7 @@
*.ipr
*.iws
.idea/
@@ -27,10 +27,10 @@ index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f21
+/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca625273a14
index 0000000000000000000000000000000000000000..dfb490fe94c1f543cc75e9f5ca76f8254bff9159
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,66 @@
@@ -0,0 +1,93 @@
+plugins {
+ `java-library`
+ `maven-publish`
@@ -41,25 +41,32 @@ index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca6
+ withJavadocJar()
+}
+
+val annotationsVersion = "24.1.0"
+val bungeeCordChatVersion = "1.20-R0.2"
+
+dependencies {
+ // api dependencies are listed transitively to API consumers
+ api("commons-lang:commons-lang:2.6")
+ api("com.google.guava:guava:31.0.1-jre")
+ api("com.google.code.gson:gson:2.8.8")
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
+ api("org.yaml:snakeyaml:1.30")
+ api("com.google.guava:guava:33.3.1-jre")
+ api("com.google.code.gson:gson:2.11.0")
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
+ api("org.yaml:snakeyaml:2.2")
+ api("org.joml:joml:1.10.8") {
+ isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
+ }
+
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.4")
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.2")
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.2")
+ compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
+
+ val annotations = "org.jetbrains:annotations-java5:23.0.0"
+ val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
+ compileOnly(annotations)
+ testCompileOnly(annotations)
+
+ testImplementation("junit:junit:4.13.2")
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
+ testImplementation("org.ow2.asm:asm-tree:9.2")
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
+ testImplementation("org.hamcrest:hamcrest:2.2")
+ testImplementation("org.mockito:mockito-core:5.14.1")
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
+}
+
+configure<PublishingExtension> {
@@ -90,19 +97,39 @@ index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca6
+}
+
+tasks.withType<Javadoc> {
+ (options as StandardJavadocDocletOptions).links(
+ "https://guava.dev/releases/31.0.1-jre/api/docs/",
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
+ val options = options as StandardJavadocDocletOptions
+ options.overview = "src/main/javadoc/overview.html"
+ options.use()
+ options.isDocFilesSubDirs = true
+ options.links(
+ "https://guava.dev/releases/33.3.1-jre/api/docs/",
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
+ )
+ options.tags("apiNote:a:API Note:")
+
+ // workaround for https://github.com/gradle/gradle/issues/4046
+ inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
+ doLast {
+ copy {
+ from("src/main/javadoc") {
+ include("**/doc-files/**")
+ }
+ into("build/docs/javadoc")
+ }
+ }
+}
+
+tasks.test {
+ useJUnitPlatform()
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..0000000000000000000000000000000000000000
index 25a8f7daaf393f3306ca5c6c0c79d3de7bc983db..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
@@ -1,262 +0,0 @@
@@ -1,267 +0,0 @@
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -110,7 +137,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
-
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId>
- <version>1.18.1-R0.1-SNAPSHOT</version>
- <version>1.21.4-R0.1-SNAPSHOT</version>
- <packaging>jar</packaging>
-
- <name>Spigot-API</name>
@@ -119,8 +146,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
-
- <properties>
- <skipTests>true</skipTests>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <maven.compiler.release>17</maven.compiler.release>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
@@ -136,82 +162,89 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
- </distributionManagement>
-
- <dependencies>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
- <scope>compile</scope>
- </dependency>
- <!-- bundled with Minecraft, should be kept in sync -->
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>31.0.1-jre</version>
- <version>33.3.1-jre</version>
- <scope>compile</scope>
- </dependency>
- <!-- bundled with Minecraft, should be kept in sync -->
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.8.8</version>
- <version>2.11.0</version>
- <scope>compile</scope>
- </dependency>
- <!-- bundled with Minecraft, should be kept in sync -->
- <dependency>
- <groupId>org.joml</groupId>
- <artifactId>joml</artifactId>
- <version>1.10.8</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>net.md-5</groupId>
- <artifactId>bungeecord-chat</artifactId>
- <version>1.16-R0.4</version>
- <version>1.20-R0.2</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- <version>1.30</version>
- <version>2.2</version>
- <scope>compile</scope>
- </dependency>
- <!-- not part of the API proper -->
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-resolver-provider</artifactId>
- <version>3.8.4</version>
- <version>3.9.6</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.resolver</groupId>
- <artifactId>maven-resolver-connector-basic</artifactId>
- <version>1.7.2</version>
- <version>1.9.18</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.resolver</groupId>
- <artifactId>maven-resolver-transport-http</artifactId>
- <version>1.7.2</version>
- <version>1.9.18</version>
- <scope>provided</scope>
- </dependency>
- <!-- annotations -->
- <dependency>
- <groupId>org.jetbrains</groupId>
- <artifactId>annotations-java5</artifactId>
- <version>23.0.0</version>
- <version>24.1.0</version>
- <scope>provided</scope>
- </dependency>
- <!-- testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.13.2</version>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter</artifactId>
- <version>5.10.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <version>1.3</version>
- <artifactId>hamcrest</artifactId>
- <version>2.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>5.14.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-tree</artifactId>
- <version>9.2</version>
- <version>9.7.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
@@ -221,7 +254,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
- <plugin>
- <groupId>net.md-5</groupId>
- <artifactId>scriptus</artifactId>
- <version>0.4.1</version>
- <version>0.5.0</version>
- <executions>
- <execution>
- <phase>initialize</phase>
@@ -234,28 +267,16 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
- <version>3.13.0</version>
- <configuration>
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
- <compilerId>eclipse</compilerId>
- <!-- default changed with version 3.11.0 -->
- <showWarnings>false</showWarnings>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-compiler-eclipse</artifactId>
- <version>2.8.8</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jdt</groupId>
- <artifactId>ecj</artifactId>
- <version>3.28.0</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.2.0</version>
- <version>3.4.1</version>
- <configuration>
- <archive>
- <manifest>
@@ -270,7 +291,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>3.2.4</version>
- <version>3.5.3</version>
- <executions>
- <execution>
- <phase>package</phase>
@@ -290,21 +311,32 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
- </filters>
- <!-- when downloading via Maven we can pull depends individually -->
- <shadedArtifactAttached>true</shadedArtifactAttached>
- <!-- In 3.3.0 and later, shadedArtifactAttached causes dependant projects to use dependency reduced pom (bug?) -->
- <createDependencyReducedPom>false</createDependencyReducedPom>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.3.1</version>
- <version>3.6.3</version>
- <configuration>
- <links>
- <link>https://guava.dev/releases/31.0.1-jre/api/docs/</link>
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.30/</link>
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/</link>
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
- <link>https://guava.dev/releases/32.1.2-jre/api/docs/</link>
- </links>
- <tags>
- <tag>
- <name>apiNote</name>
- <placement>a</placement>
- <head>API Note:</head>
- </tag>
- </tags>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.2.5</version>
- </plugin>
- </plugins>
- </build>
-
@@ -319,7 +351,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.1.2</version>
- <version>3.3.1</version>
- <executions>
- <execution>
- <phase>process-classes</phase>
@@ -343,7 +375,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.20</version>
- <version>1.23</version>
- <executions>
- <execution>
- <phase>process-classes</phase>
+67 -22
View File
@@ -5,44 +5,89 @@ Subject: [PATCH] Build system changes
diff --git a/build.gradle.kts b/build.gradle.kts
index c76bfbcfbe034700bdbd9396643cfca625273a14..1f680baffba17265e8ce38b3516624bffd034075 100644
index dfb490fe94c1f543cc75e9f5ca76f8254bff9159..3667f27baa87c82e071cc14ca20491d38feee255 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -15,15 +15,27 @@ dependencies {
api("com.google.code.gson:gson:2.8.8")
api("net.md-5:bungeecord-chat:1.16-R0.4")
api("org.yaml:snakeyaml:1.30")
@@ -20,15 +20,27 @@ dependencies {
api("org.joml:joml:1.10.8") {
isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
}
+ // Paper start
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
+ isTransitive = false // includes junit
+ }
+ // Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.8.4")
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.2")
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.2")
+ compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
- val annotations = "org.jetbrains:annotations-java5:23.0.0"
+ val annotations = "org.jetbrains:annotations:23.0.0" // Paper - we don't want Java 5 annotations...
- val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
+ val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations...
compileOnly(annotations)
testCompileOnly(annotations)
+ // Paper start - add checker
+ val checkerQual = "org.checkerframework:checker-qual:3.21.0"
+ val checkerQual = "org.checkerframework:checker-qual:3.33.0"
+ compileOnlyApi(checkerQual)
+ testCompileOnly(checkerQual)
+ // Paper end
+ api("org.jspecify:jspecify:1.0.0") // Paper - add jspecify
+
testImplementation("junit:junit:4.13.2")
testImplementation("org.hamcrest:hamcrest-library:1.3")
testImplementation("org.ow2.asm:asm-tree:9.2")
@@ -60,7 +72,7 @@ tasks.withType<Javadoc> {
(options as StandardJavadocDocletOptions).links(
"https://guava.dev/releases/31.0.1-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
+ "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
testImplementation("org.apache.commons:commons-lang3:3.12.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation("org.hamcrest:hamcrest:2.2")
@@ -71,8 +83,13 @@ tasks.withType<Javadoc> {
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-java5/$annotationsVersion/",
+ "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
"https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
+ // Paper start - add missing javadoc links
+ "https://javadoc.io/doc/org.joml/joml/1.10.8/index.html",
+ "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
+ "https://jspecify.dev/docs/api/",
+ // Paper end
)
options.tags("apiNote:a:API Note:")
@@ -91,3 +108,14 @@ tasks.withType<Javadoc> {
tasks.test {
useJUnitPlatform()
}
+
+// Paper start
+val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
+ badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
+ jarToScan.set(tasks.jar.flatMap { it.archiveFile })
+ classpath.from(configurations.compileClasspath)
+}
+tasks.check {
+ dependsOn(scanJar)
+}
+// Paper end
diff --git a/src/main/java/io/papermc/paper/annotation/DoNotUse.java b/src/main/java/io/papermc/paper/annotation/DoNotUse.java
new file mode 100644
index 0000000000000000000000000000000000000000..4766e49d819e75e5c2127c698b44078bf2fd6219
--- /dev/null
+++ b/src/main/java/io/papermc/paper/annotation/DoNotUse.java
@@ -0,0 +1,18 @@
+package io.papermc.paper.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.jetbrains.annotations.ApiStatus;
+
+/**
+ * Annotation used to mark methods or constructors which should not be called.
+ *
+ * <p>Separate from {@link Deprecated} to differentiate from the large amount of deprecations.</p>
+ */
+@ApiStatus.Internal
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
+public @interface DoNotUse {
+}
@@ -1,114 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 17 Mar 2019 23:04:30 +0000
Subject: [PATCH] Annotation Test changes
- Allow use of TYPE_USE annotations
- Ignore package-private methods for nullability annotations
- Add excludes for classes which don't pass
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
index 0c7377247ad9251c9e498039511e7220370aba2d..c6a8a37a933cfc5a5885602a8a70fdda8fb6aa10 100644
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ b/src/test/java/org/bukkit/AnnotationTest.java
@@ -40,7 +40,17 @@ public class AnnotationTest {
"org/bukkit/util/io/Wrapper",
"org/bukkit/plugin/java/PluginClassLoader",
// Generic functional interface
- "org/bukkit/util/Consumer"
+ "org/bukkit/util/Consumer",
+ // Paper start
+ // Timings history is broken in terms of nullability due to guavas Function defining that the param is NonNull
+ "co/aikar/timings/TimingHistory$2",
+ "co/aikar/timings/TimingHistory$2$1",
+ "co/aikar/timings/TimingHistory$2$1$1",
+ "co/aikar/timings/TimingHistory$2$1$2",
+ "co/aikar/timings/TimingHistory$3",
+ "co/aikar/timings/TimingHistory$4",
+ "co/aikar/timings/TimingHistoryEntry$1"
+ // Paper end
};
@Test
@@ -67,14 +77,40 @@ public class AnnotationTest {
}
if (mustBeAnnotated(Type.getReturnType(method.desc)) && !isWellAnnotated(method.invisibleAnnotations)) {
+ // Paper start - Allow use of TYPE_USE annotations
+ boolean warn = true;
+ if (isWellAnnotated(method.visibleTypeAnnotations)) {
+ warn = false;
+ } else if (method.invisibleTypeAnnotations != null) {
+ dance: for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.invisibleTypeAnnotations) {
+ final org.objectweb.asm.TypeReference ref = new org.objectweb.asm.TypeReference(invisibleTypeAnnotation.typeRef);
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_RETURN && java.util.Arrays.binarySearch(ACCEPTED_ANNOTATIONS, invisibleTypeAnnotation.desc) >= 0) {
+ warn = false;
+ break dance; // cha cha real smooth
+ }
+ }
+ }
+ if (warn)
+ // Paper end
warn(errors, clazz, method, "return value");
}
Type[] paramTypes = Type.getArgumentTypes(method.desc);
List<ParameterNode> parameters = method.parameters;
+ dancing: // Paper
for (int i = 0; i < paramTypes.length; i++) {
if (mustBeAnnotated(paramTypes[i]) && !isWellAnnotated(method.invisibleParameterAnnotations == null ? null : method.invisibleParameterAnnotations[i])) {
+ // Paper start
+ if (method.invisibleTypeAnnotations != null) {
+ for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.invisibleTypeAnnotations) {
+ final org.objectweb.asm.TypeReference ref = new org.objectweb.asm.TypeReference(invisibleTypeAnnotation.typeRef);
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_FORMAL_PARAMETER && ref.getTypeParameterIndex() == i && java.util.Arrays.binarySearch(ACCEPTED_ANNOTATIONS, invisibleTypeAnnotation.desc) >= 0) {
+ continue dancing;
+ }
+ }
+ }
+ // Paper end - Allow use of TYPE_USE annotations
ParameterNode paramNode = parameters == null ? null : parameters.get(i);
String paramName = paramNode == null ? null : paramNode.name;
@@ -91,13 +127,18 @@ public class AnnotationTest {
Collections.sort(errors);
- System.out.println(errors.size() + " missing annotation(s):");
+ StringBuilder builder = new StringBuilder()
+ .append("There ")
+ .append(errors.size() != 1 ? "are " : "is ")
+ .append(errors.size())
+ .append(" missing annotation")
+ .append(errors.size() != 1 ? "s:\n" : ":\n");
+
for (String message : errors) {
- System.out.print("\t");
- System.out.println(message);
+ builder.append("\t").append(message).append("\n");
}
- Assert.fail("There " + errors.size() + " are missing annotation(s)");
+ Assert.fail(builder.toString());
}
private static void collectClasses(@NotNull File from, @NotNull Map<String, ClassNode> to) throws IOException {
@@ -152,7 +193,7 @@ public class AnnotationTest {
private static boolean isMethodIncluded(@NotNull ClassNode clazz, @NotNull MethodNode method, @NotNull Map<String, ClassNode> allClasses) {
// Exclude private, synthetic and deprecated methods
- if ((method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_DEPRECATED)) != 0) {
+ if ((method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_DEPRECATED)) != 0 || (method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED | Opcodes.ACC_PUBLIC)) == 0) { // Paper - ignore package-private
return false;
}
@@ -174,7 +215,7 @@ public class AnnotationTest {
return true;
}
- private static boolean isWellAnnotated(@Nullable List<AnnotationNode> annotations) {
+ private static boolean isWellAnnotated(@Nullable List<? extends AnnotationNode> annotations) { // Paper
if (annotations == null) {
return false;
}
+349
View File
@@ -0,0 +1,349 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 17 Mar 2019 23:04:30 +0000
Subject: [PATCH] Test changes
- Allow use of TYPE_USE annotations
- Ignore package-private methods for nullability annotations
- Add excludes for classes which don't pass
- Disable stupid BukkitMirrorTest
- configure mockito agent to address changes in newer java versions see https://openjdk.org/jeps/451
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
diff --git a/build.gradle.kts b/build.gradle.kts
index 3667f27baa87c82e071cc14ca20491d38feee255..73aaa8a341565626556327cda6a73f98c318863a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,6 +11,18 @@ java {
val annotationsVersion = "24.1.0"
val bungeeCordChatVersion = "1.20-R0.2"
+// Paper start - configure mockito agent that is needed in newer java versions
+val mockitoAgent = configurations.register("mockitoAgent")
+abstract class MockitoAgentProvider : CommandLineArgumentProvider {
+ @get:CompileClasspath
+ abstract val fileCollection: ConfigurableFileCollection
+
+ override fun asArguments(): Iterable<String> {
+ return listOf("-javaagent:" + fileCollection.files.single().absolutePath)
+ }
+}
+// Paper end - configure mockito agent that is needed in newer java versions
+
dependencies {
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:33.3.1-jre")
@@ -46,6 +58,7 @@ dependencies {
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:5.14.1")
testImplementation("org.ow2.asm:asm-tree:9.7.1")
+ mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions
}
configure<PublishingExtension> {
@@ -107,8 +120,19 @@ tasks.withType<Javadoc> {
tasks.test {
useJUnitPlatform()
+ // Paper start - configure mockito agent that is needed in newer java versions
+ val provider = objects.newInstance<MockitoAgentProvider>()
+ provider.fileCollection.from(mockitoAgent)
+ jvmArgumentProviders.add(provider)
+ // Paper end - configure mockito agent that is needed in newer java versions
}
+// Paper start - compile tests with -parameters for better junit parameterized test names
+tasks.compileTestJava {
+ options.compilerArgs.add("-parameters")
+}
+// Paper end
+
// Paper start
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
diff --git a/src/test/java/io/papermc/paper/testing/EmptyTag.java b/src/test/java/io/papermc/paper/testing/EmptyTag.java
new file mode 100644
index 0000000000000000000000000000000000000000..77154095cfb8b259bdb318e8ff40cb6f559ebc18
--- /dev/null
+++ b/src/test/java/io/papermc/paper/testing/EmptyTag.java
@@ -0,0 +1,31 @@
+package io.papermc.paper.testing;
+
+import java.util.Collections;
+import java.util.Set;
+import org.bukkit.Keyed;
+import org.bukkit.NamespacedKey;
+import org.bukkit.Tag;
+import org.jetbrains.annotations.NotNull;
+
+public record EmptyTag(NamespacedKey key) implements Tag<Keyed> {
+
+ @SuppressWarnings("deprecation")
+ public EmptyTag() {
+ this(NamespacedKey.randomKey());
+ }
+
+ @Override
+ public @NotNull NamespacedKey getKey() {
+ return this.key;
+ }
+
+ @Override
+ public boolean isTagged(@NotNull final Keyed item) {
+ return false;
+ }
+
+ @Override
+ public @NotNull Set<Keyed> getValues() {
+ return Collections.emptySet();
+ }
+}
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
index 64e7aef6220097edefdff3b98a771b988365930d..07f904a78f51b220a5891aca1afffac4f46d58b4 100644
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ b/src/test/java/org/bukkit/AnnotationTest.java
@@ -29,7 +29,13 @@ public class AnnotationTest {
"Lorg/jetbrains/annotations/Nullable;",
"Lorg/jetbrains/annotations/NotNull;",
"Lorg/jetbrains/annotations/Contract;",
- "Lorg/bukkit/UndefinedNullability;"
+ "Lorg/bukkit/UndefinedNullability;",
+ // Paper start
+ "Lorg/checkerframework/checker/nullness/qual/MonotonicNonNull;",
+ "Lorg/checkerframework/checker/nullness/qual/NonNull;",
+ "Lorg/checkerframework/checker/nullness/qual/Nullable;",
+ "Lorg/checkerframework/checker/nullness/qual/PolyNull;",
+ // Paper end
};
private static final String[] EXCLUDED_CLASSES = {
@@ -40,7 +46,17 @@ public class AnnotationTest {
"org/bukkit/util/io/Wrapper",
"org/bukkit/plugin/java/PluginClassLoader",
// Generic functional interface
- "org/bukkit/util/Consumer"
+ "org/bukkit/util/Consumer",
+ // Paper start
+ // Timings history is broken in terms of nullability due to guavas Function defining that the param is NonNull
+ "co/aikar/timings/TimingHistory$2",
+ "co/aikar/timings/TimingHistory$2$1",
+ "co/aikar/timings/TimingHistory$2$1$1",
+ "co/aikar/timings/TimingHistory$2$1$2",
+ "co/aikar/timings/TimingHistory$3",
+ "co/aikar/timings/TimingHistory$4",
+ "co/aikar/timings/TimingHistoryEntry$1"
+ // Paper end
};
@Test
@@ -61,20 +77,60 @@ public class AnnotationTest {
continue;
}
+ // Paper start - skip class if it's @NullMarked
+ if (isClassNullMarked(clazz, foundClasses)) {
+ continue;
+ }
+ // Paper end - skip class if it's @NullMarked
+
for (MethodNode method : clazz.methods) {
if (!isMethodIncluded(clazz, method, foundClasses)) {
continue;
}
if (mustBeAnnotated(Type.getReturnType(method.desc)) && !isWellAnnotated(method.invisibleAnnotations)) {
+ // Paper start - Allow use of TYPE_USE annotations
+ boolean warn = true;
+ if (isWellAnnotated(method.visibleTypeAnnotations)) {
+ warn = false;
+ } else if (method.invisibleTypeAnnotations != null) {
+ dance: for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.invisibleTypeAnnotations) {
+ final org.objectweb.asm.TypeReference ref = new org.objectweb.asm.TypeReference(invisibleTypeAnnotation.typeRef);
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_RETURN && java.util.Arrays.asList(ACCEPTED_ANNOTATIONS).contains(invisibleTypeAnnotation.desc)) {
+ warn = false;
+ break dance; // cha cha real smooth
+ }
+ }
+ }
+ if (warn)
+ // Paper end
warn(errors, clazz, method, "return value");
}
Type[] paramTypes = Type.getArgumentTypes(method.desc);
List<ParameterNode> parameters = method.parameters;
+ dancing: // Paper
for (int i = 0; i < paramTypes.length; i++) {
if (mustBeAnnotated(paramTypes[i]) ^ isWellAnnotated(method.invisibleParameterAnnotations == null ? null : method.invisibleParameterAnnotations[i])) {
+ // Paper start
+ if (method.invisibleTypeAnnotations != null) {
+ for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.invisibleTypeAnnotations) {
+ final org.objectweb.asm.TypeReference ref = new org.objectweb.asm.TypeReference(invisibleTypeAnnotation.typeRef);
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_FORMAL_PARAMETER && ref.getTypeParameterIndex() == i && java.util.Arrays.asList(ACCEPTED_ANNOTATIONS).contains(invisibleTypeAnnotation.desc)) {
+ continue dancing;
+ }
+ }
+ }
+ if (method.visibleTypeAnnotations != null) {
+ for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.visibleTypeAnnotations) {
+ final org.objectweb.asm.TypeReference ref = new org.objectweb.asm.TypeReference(invisibleTypeAnnotation.typeRef);
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_FORMAL_PARAMETER && ref.getTypeParameterIndex() == i && java.util.Arrays.asList(ACCEPTED_ANNOTATIONS).contains(invisibleTypeAnnotation.desc)) {
+ continue dancing;
+ }
+ }
+ }
+ // Paper end - Allow use of TYPE_USE annotations
ParameterNode paramNode = parameters == null ? null : parameters.get(i);
String paramName = paramNode == null ? null : paramNode.name;
@@ -91,17 +147,37 @@ public class AnnotationTest {
Collections.sort(errors);
- System.out.println(errors.size() + " missing annotation(s):");
+ StringBuilder builder = new StringBuilder()
+ .append("There ")
+ .append(errors.size() != 1 ? "are " : "is ")
+ .append(errors.size())
+ .append(" missing annotation")
+ .append(errors.size() != 1 ? "s:\n" : ":\n");
+
for (String message : errors) {
- System.out.print("\t");
- System.out.println(message);
+ builder.append("\t").append(message).append("\n");
}
- fail("There " + errors.size() + " are missing annotation(s)");
+ fail(builder.toString());
}
private static void collectClasses(@NotNull File from, @NotNull Map<String, ClassNode> to) throws IOException {
if (from.isDirectory()) {
+ // Paper start - skip packages with @NullMarked
+ final File packageInfo = new File(from, "package-info.class");
+ if (packageInfo.exists()) {
+ try (final FileInputStream in = new FileInputStream(packageInfo)) {
+ final ClassReader cr = new ClassReader(in);
+
+ final ClassNode node = new ClassNode();
+ cr.accept(node, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
+
+ if (isClassNullMarked0(node)) {
+ return; // skip packages with @NullMarked
+ }
+ }
+ }
+ // Paper end - skip packages with @NullMarked
final File[] files = from.listFiles();
assert files != null;
@@ -125,6 +201,23 @@ public class AnnotationTest {
}
}
+ // Paper start - skip class if it's @NullMarked
+ private static boolean isClassNullMarked(@NotNull ClassNode clazz, @NotNull Map<String, ClassNode> allClasses) {
+ if (clazz.nestHostClass != null) {
+ final ClassNode nestHostNode = allClasses.get(clazz.nestHostClass);
+ if (nestHostNode != null) {
+ return isClassNullMarked0(nestHostNode);
+ }
+ }
+
+ return isClassNullMarked0(clazz);
+ }
+
+ private static boolean isClassNullMarked0(@NotNull ClassNode clazz) {
+ return clazz.visibleAnnotations != null && clazz.visibleAnnotations.stream().anyMatch(node -> "Lorg/jspecify/annotations/NullMarked;".equals(node.desc));
+ }
+ // Paper end - skip class if it's @NullMarked
+
private static boolean isClassIncluded(@NotNull ClassNode clazz, @NotNull Map<String, ClassNode> allClasses) {
// Exclude private, synthetic or deprecated classes and annotations, since their members can't be null
if ((clazz.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_DEPRECATED | Opcodes.ACC_ANNOTATION)) != 0) {
@@ -140,6 +233,11 @@ public class AnnotationTest {
// Exceptions are excluded
return false;
}
+ // Paper start
+ if (isInternal(clazz.invisibleAnnotations)) {
+ return false;
+ }
+ // Paper end
for (String excludedClass : EXCLUDED_CLASSES) {
if (excludedClass.equals(clazz.name)) {
@@ -152,7 +250,7 @@ public class AnnotationTest {
private static boolean isMethodIncluded(@NotNull ClassNode clazz, @NotNull MethodNode method, @NotNull Map<String, ClassNode> allClasses) {
// Exclude private, synthetic and deprecated methods
- if ((method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_DEPRECATED)) != 0) {
+ if ((method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_DEPRECATED)) != 0 || (method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED | Opcodes.ACC_PUBLIC)) == 0) { // Paper - ignore package-private
return false;
}
@@ -170,11 +268,30 @@ public class AnnotationTest {
if ("<init>".equals(method.name) && isAnonymous(clazz)) {
return false;
}
+ // Paper start
+ if (isInternal(method.invisibleAnnotations)) {
+ return false;
+ }
+ // Paper end
return true;
}
+ // Paper start
+ private static boolean isInternal(List<? extends AnnotationNode> annotations) {
+ if (annotations == null) {
+ return false;
+ }
+ for (AnnotationNode node : annotations) {
+ if (node.desc.equals("Lorg/jetbrains/annotations/ApiStatus$Internal;")) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ // Paper end
- private static boolean isWellAnnotated(@Nullable List<AnnotationNode> annotations) {
+ private static boolean isWellAnnotated(@Nullable List<? extends AnnotationNode> annotations) { // Paper
if (annotations == null) {
return false;
}
diff --git a/src/test/java/org/bukkit/BukkitMirrorTest.java b/src/test/java/org/bukkit/BukkitMirrorTest.java
index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..5974ceea58940e1799f3589eac0e39b925a42c3b 100644
--- a/src/test/java/org/bukkit/BukkitMirrorTest.java
+++ b/src/test/java/org/bukkit/BukkitMirrorTest.java
@@ -9,6 +9,7 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
+@org.junit.jupiter.api.Disabled // Paper
public class BukkitMirrorTest {
public static Stream<Arguments> data() {
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
index c67e0784c043ed194f6acde32411e156412a9b24..eb1fd4b911c4af76cdd3eac85d5365e7941a4a2e 100644
--- a/src/test/java/org/bukkit/support/TestServer.java
+++ b/src/test/java/org/bukkit/support/TestServer.java
@@ -83,6 +83,11 @@ public final class TestServer {
UnsafeValues unsafeValues = mock(withSettings().stubOnly());
when(instance.getUnsafe()).thenReturn(unsafeValues);
+ // Paper start - testing changes
+ when(instance.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new io.papermc.paper.testing.EmptyTag());
+ when(instance.getScoreboardCriteria(anyString())).thenReturn(null);
+ // Paper end - testing changes
+
Bukkit.setServer(instance);
}
@@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 1 Apr 2016 00:02:47 -0400
Subject: [PATCH] Add FastUtil to Bukkit
Doesn't expose to plugins, just allows Paper-API to use it for optimization
diff --git a/build.gradle.kts b/build.gradle.kts
index 364b6215d2facb0273a67ff605ccb8e707e080b8..3777d12874ede329410a6bf1c0533deb44924d73 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -19,6 +19,7 @@ dependencies {
api("com.googlecode.json-simple:json-simple:1.1.1") {
isTransitive = false // includes junit
}
+ api("it.unimi.dsi:fastutil:8.5.6")
// Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.8.4")
Loaded 100 of 2954 files, more files were not shown because too many files have changed in this diff. Show more