Commit graph

9366 commits

Author SHA1 Message Date
Lulu13022002
68e1550ec9 fix components 2024-12-04 19:39:35 +01:00
Lulu13022002
6d270af78c fix item meta 2024-12-04 18:47:33 +01:00
Jason Penilla
0891cf604b Update setup-gradle action
setup-gradle v4 validates the wrapper
2024-12-04 10:33:50 -07:00
Spottedleaf
8999170435 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
97afdbfb02 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
7a307edd46 Update readme, set updatingMinecraft to false 2024-12-04 11:05:07 +01:00
Owen1212055
ebc080b944 Implement assetid 2024-12-04 00:33:47 -05:00
Owen1212055
0eefdfb97a Implement new CustomModelData 2024-12-04 00:26:31 -05:00
Jason Penilla
606d8d99f8 Fix api build script deprecation 2024-12-03 20:50:18 -07:00
Jason Penilla
39ab1fb456 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
8aed12873b Update paperweight and Gradle wrapper 2024-12-03 20:28:39 -07:00
Jason Penilla
2b69f2bf9a Use ConcurrentUtil from Paper repo 2024-12-03 20:04:41 -07:00
Jason Penilla
572fb23805 Update Moonrise 2024-12-03 15:26:43 -07:00
Jason Penilla
5a0e5546e6 Update DataConverter 2024-12-03 15:21:36 -07:00
Nassim Jahnke
df479182fe Add back post_teleport chunk ticket 2024-12-03 22:56:26 +01:00
Nassim Jahnke
636439f610 Fix jd gson version, move back mc util diff 2024-12-03 22:37:48 +01:00
Nassim Jahnke
6eb70d323b Tests succeed (by removing one) 2024-12-03 22:20:30 +01:00
Nassim Jahnke
b4c75aa92c Compilation fixes 2024-12-03 22:06:05 +01:00
Jason Penilla
5e0c01db49 Set java launcher for api generate task 2024-12-03 13:34:44 -07:00
Nassim Jahnke
e88124493c Update generated classes 2024-12-03 21:32:05 +01:00
Nassim Jahnke
834a4c4a8d Apply remaining patches, fix API 2024-12-03 21:24:17 +01:00
Nassim Jahnke
e3db6ac6e4 moonrise 2024-12-03 21:11:09 +01:00
Nassim Jahnke
0e668caa27 Even more work 2024-12-03 21:03:25 +01:00
Nassim Jahnke
a894c3a437 Some fixes, start updating CustomModelData API 2024-12-03 20:58:25 +01:00
Nassim Jahnke
2c2dadf75b More more more more work 2024-12-03 20:34:55 +01:00
Nassim Jahnke
39c2c1d5f7 More more more work 2024-12-03 19:54:10 +01:00
Nassim Jahnke
3af13e34fb More more work 2024-12-03 19:21:12 +01:00
Nassim Jahnke
529f01a04a More work 2024-12-03 19:05:31 +01:00
Nassim Jahnke
2103d82751 Work 2024-12-03 18:27:11 +01:00
Nassim Jahnke
3a8f9e0b6e Start update, apply API patches 2024-12-03 17:58:41 +01:00
Bjarne Koll
881d616533 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
65ca4c1911 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
e9eb96862c 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
de3742283b 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
6788ba5e80 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
86e20be366 Only attempt to find spawn position if there isn't a fixed spawn position set (#11682) 2024-12-01 12:44:03 -03:00
Nassim Jahnke
c221e072a3 Fix item_model adapter, rename internal classes
Fixes #11688
2024-11-30 10:56:37 +01:00
Nassim Jahnke
4299c69e13 Add back discard policy 2024-11-30 10:44:57 +01:00
Lulu13022002
326abeaab5 Deprecate ChatVisibility#UNKNOWN (#11683) 2024-11-29 17:12:17 +01:00
Nassim Jahnke
736c78c71e Copy dispatcher root children before passing it into async tree building 2024-11-29 17:04:32 +01:00
Nassim Jahnke
4a5ff5039c 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
46ef70e7d1 [ci skip] leaf 2024-11-29 09:44:19 +01:00
Spottedleaf
b37a391c02 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 17:39:40 -08:00
Spottedleaf
c8457716c4 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:22:32 -08:00
Spottedleaf
cb0a972b9f 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
b207266c7d deprecate adventure key() methods where applicable 2024-11-28 13:51:48 -08:00
Noah
57ab68f4ee Remove string dupe exploit setting (#11670) 2024-11-28 18:17:57 +01:00
Spottedleaf
63d0de648f 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
f9b1c374e4 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
0cfa6aa89a Prevent duplicate/superfluous BlockPhysicsEvent (#11609) 2024-11-26 20:05:52 +01:00