1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2024-12-21 05:55:08 +01:00
Commit graph

3441 commits

Author SHA1 Message Date
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) ()
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 () 2024-12-01 16:44:03 +01:00
Nassim Jahnke
27e4ddcd06
Fix item_model adapter, rename internal classes
Fixes 
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 () 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 ()
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 () 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 () 2024-11-26 20:05:52 +01:00
Lulu13022002
f4741f22e8
Expose particle status client option () 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
Glicz
a63013cf48
[ci skip] fix compile issues caused by 5b53cb4 () 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
Lulu13022002
9bc147178d
Fix painting variant builder () 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 ()
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 () 2024-11-23 23:10:54 +01:00
Bjarne Koll
edabff8a35
Correctly damage tick wolf after armor block ()
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
eef40b78c2
Configurable Entity Despawn Time ()
* 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 () 2024-11-23 20:37:38 +01:00
Jake Potrebic
860d948731
Support tags for more SimpleRegistry () 2024-11-23 20:26:51 +01:00
Nassim Jahnke
f2412609a1
Make TypedKey an actual Key () 2024-11-23 20:21:24 +01:00
Lulu13022002
751e9bd125
Fix jukebox component () 2024-11-23 20:09:34 +01:00
Jake Potrebic
915637df5c
Run 'freeze' listeners before tag events () 2024-11-23 10:52:00 -08:00
Abel
817550c520
Add API to allow/disallow tick sleeping () 2024-11-22 12:53:01 +01:00
Abel
8dc42fadfa
Add API to check if the server is sleeping () 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