Commit graph

1134 commits

Author SHA1 Message Date
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
Newwind
fabd859878
Add command block material tags (#11720) 2024-12-08 22:40:02 +01:00
Jake Potrebic
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
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
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
e73d39671d
fix asset id 2024-12-04 20:01:17 +01:00
Lulu13022002
2206b9a5f2
fix components 2024-12-04 19:39:35 +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
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
Nassim Jahnke
d7d2f88893
Apply remaining patches, fix API 2024-12-03 21:24:17 +01:00
Nassim Jahnke
4601dc901b
Some fixes, start updating CustomModelData API 2024-12-03 20:58:25 +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
Lulu13022002
47f2071350
Deprecate ChatVisibility#UNKNOWN (#11683) 2024-11-29 17:12:17 +01:00
Jake Potrebic
5f6a79668c
deprecate adventure key() methods where applicable 2024-11-28 13:51:48 -08:00
Lulu13022002
f4741f22e8
Expose particle status client option (#11573) 2024-11-26 18:46:12 +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
Lulu13022002
9bc147178d
Fix painting variant builder (#11660) 2024-11-24 20:12:08 +01:00
kokiriglade
6051dac82b
Painting variant registry modification API (#11648) 2024-11-23 23:10:54 +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
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
Nassim Jahnke
55475f05d5
[ci skip] Fix typos 2024-11-21 17:57:18 +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
Spottedleaf
fdef6d392b Add missing NotNull annotation for getChunksAtAsync cb param 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
Owen
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
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
Barnaby
52fb26524e
Optimize custom map rendering (#11000) 2024-11-11 18:04:22 +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
Yannick Lamprecht
e47f79acd9
Configure mockito agent (#11560) 2024-11-09 22:49:07 +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
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
Jake Potrebic
16d7d73bd5
bunch more general fixes 2024-10-31 20:35:06 -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
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