Commit graph

18974 commits

Author SHA1 Message Date
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
Nassim Jahnke
0280fbb374 Disable deprecated annotation test 2024-12-03 15:33:45 +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
Lulu13022002
cb940e72b1 Expose particle status client option (#11573) 2024-11-26 18:46:12 +01:00
Nassim Jahnke
cd36f8d3e2 [ci skip] leaf 2024-11-25 20:18:47 +01:00
Spottedleaf
22dea6efbd 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
c9731fc93d 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]
cea5939bba 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
c64c011b1e [ci skip] fix compile issues caused by b52fea4 (#11664) 2024-11-25 11:18:05 +01:00
Jake Potrebic
b52fea44fe [ci skip] use more jspecify in server 2024-11-24 19:26:32 -08:00
Jake Potrebic
ca5499c7fa Switch Impl types to Holderable 2024-11-24 15:08:19 -08:00
Jake Potrebic
ebd2dc259d Add all missing TagKey constants files (#11661) 2024-11-24 13:32:52 -08:00
Lulu13022002
8e2102c70b Fix painting variant builder (#11660) 2024-11-24 20:12:08 +01:00
Bjarne Koll
bbe32f42f0 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
d5c1214b8e Painting variant registry modification API (#11648) 2024-11-23 22:10:54 +00:00
Bjarne Koll
34989c63b0 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 Potrebic
564005cc5f 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