Commit graph

3474 commits

Author SHA1 Message Date
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 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
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
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
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
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
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