Commit Graph

56 Commits

Author SHA1 Message Date
Space Walker
9b9de82706 Update Alternate Current patch to v1.9.1 (#12115) 2025-02-15 12:40:31 +01:00
Dreeam
cafef9ce9b [ci skip] Move EntityUtil to correct directory (#12092) 2025-02-10 13:34:52 +01:00
Bjarne Koll
edacfdf462 Do not queue player info packets (#12080)
Player info packets carry chat state to other clients since the
introduction of chat signatures. Queuing these packets while force
pushing chat packets allows for potentially inverted packet order, which
may cause chain corruption on clients.
2025-02-09 11:51:11 +01:00
Spottedleaf
8927091a08 Do not record movement for vehicles/players unaffected by blocks
If the player is not affected by movement through blocks, then
storing the movement would eventually invoke logic to apply effects
caused by moving through such blocks. For example, moving through
a portal in spectator mode and then later switching to creative mode
would portal the player.
2025-02-02 11:16:59 -08:00
Lulu13022002
5bcfb12a99 Fix activation range config and water animal status (#12047) 2025-01-31 13:13:14 +01:00
Spottedleaf
e2f0efd1af Remove nms.Entity#isChunkLoaded
This method was used pre 1.17 era where an Entity was explicitly
tied to a (then called) Chunk's entity slices. If an entity
was not inside a Chunk, then it was considered invalid as
it was not possible to save the entity.

In 1.17+, entities are now tied to a separately tracked entity
section management system. This system is far more reliable now
as it no longer requires a full chunk load to properly track
entities for saving. As a result, an Entity if inside the world
is always attached to some entity chunk section (except in rare
cases in Vanilla which are fixed in Moonrise).

As a result, whether the chunk the entity is in is loaded is no
longer an indication of whether they are tracked in the world
and we can reliably infer that the entity is correctly in the
world through the valid field alone.

Additionally drop the isInWorld() check, as valid=true implies
isInWorld=true. More importantly, the isInWorld() check invokes
getHandle which may trip a thread check on Folia. This will fix
World#getEntities() and friends exploding on Folia.

However, World#getEntities() on Folia still cannot reliably return
all entities in the world as actions such as cross-region
(not cross-world) teleporting will remove entities from the world.
2025-01-28 17:33:48 -08:00
Spottedleaf
1004374a83 Add further information to thread check errors
The entity data is more complete, which will help debug problems
on Folia.
2025-01-28 13:43:34 -08:00
Spottedleaf
5a34bf0425 Correctly retrun true for empty input shapes in EntityGetter#isUnobstructed
Vanilla will return true for empty shapes, so we should as well.
2025-01-27 13:45:44 -08:00
EnZaXD
fb5b173c6a Add PlayerClientLoadedWorldEvent (#11940) 2025-01-25 21:47:08 +01:00
Spottedleaf
88bbead13b Flush regionfiles on save configuration option
The windows file system does not write metadata unless
the FileChannel is explicitly flushed with metaData=true.

Note: Setting SYNC (not DSYNC) on the FileChannel does not appear
to write the metadata.

Specifically, we are interested in writing the last modified
timestamp so that fs watchers can detect when RegionFiles are
modified.
2025-01-22 11:55:39 -08:00
Tamion
ab1b312064 Call PlayerItemDamageEvent for tridents (#11899) 2025-01-12 15:29:52 -08:00
Jake Potrebic
5e23d28ad2 Remove entity tag selector tag completion fix (#11964)
The fix was causing too many issues, it really needs a client-side fix
MC-235045
2025-01-12 15:07:24 -08:00
Tamion
eb4db794eb Make CommandSourceStack respect hidden players (#11898) 2025-01-12 17:50:08 +01:00
Strokkur24
c2f24e1567 Feat: Add 'with' methods to CommandSourceStack (#11868) 2025-01-11 13:29:16 -08:00
SoSeDiK
b242f1eb15 Prevent day cycle on the client when using fixed time (#11924) 2025-01-11 10:59:50 +01:00
Nassim Jahnke
2b73d1957c More var name fixes 2024-12-27 13:45:04 +01:00
SoSeDiK
aac246ae29 Expand on entity serialization API (#11807) 2024-12-27 00:08:00 +01:00
Jake Potrebic
af2812fb0f For new registry values, allow copying from existing (#11796)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-12-26 13:41:15 -08:00
Warrior
763b32d825 Fix framed maps looping through all players in world (#11819) 2024-12-25 12:31:03 +01:00
Bjarne Koll
17d76ae42b Correctly die when cancelling EntityResurrectEvent (#11785)
The existing logic in LivingEntity#checkTotemDeathProtection completes
by checking whether the death protection component is null or not.
In cases where the event was cancelled, the component needs to be nulled
out to prevent the method from returning true, causing the player to
properly die.
2024-12-23 19:38:10 +01:00
Shane Freeder
cbf630d5b5 Move missing import into feature patches to fix pre-features compile
Came across this in my complete utter failure to use the commands to
apply patches properly
2024-12-23 09:28:58 +00:00
Lulu13022002
3bfdf6a07a fix flying too long check 2024-12-21 19:27:59 +01:00
Bjarne Koll
286e3468d7 Some more cleanup 2024-12-21 16:03:34 +01:00
Nassim Jahnke
3b0b3a0aef and some more 2024-12-21 13:45:04 +01:00
Nassim Jahnke
82216a59fe Apply some feature patches to files instead
They're small and/or really shouldn't be left unapplied
2024-12-21 13:21:47 +01:00
Nassim Jahnke
e0593e9286 More diff/changed variable name cleanup 2024-12-21 12:15:25 +01:00
Nassim Jahnke
13b890950d Apply remaining feature patches 2024-12-20 23:24:23 +01:00
Lulu13022002
2213ce5bbc fix enderpearl across portals 2024-12-20 21:22:58 +01:00
Spottedleaf
86378c66b3 Fix compile errors in Moonrise patch 2024-12-20 11:06:19 -08:00
Spottedleaf
48f34f8c90 Port CB changes from Moonrise patch 2024-12-20 10:52:51 -08:00
Spottedleaf
3af380ba08 Rebase on latest 2024-12-20 09:36:39 -08:00
Spottedleaf
45c905b928 Apply Moonrise patch minus CB diff 2024-12-20 09:22:42 -08:00
Spottedleaf
6186079231 Migrate ChunkSystem class to PaperHooks 2024-12-20 09:22:42 -08:00
Spottedleaf
0ed399bb41 Fix file paths in Moonrise patch 2024-12-20 09:22:42 -08:00
Spottedleaf
f25d4a6b28 Fix indices/line numbers in Moonrise patch 2024-12-20 09:22:42 -08:00
Spottedleaf
09aea75701 Move Moonrise patch 2024-12-20 09:22:42 -08:00
Lulu13022002
25a7793b9c drop duplicate block update 2024-12-19 22:12:09 +01:00
Lulu13022002
1f86b55302 reapply SummonEntityEffect 2024-12-19 21:29:31 +01:00
Jake Potrebic
49f715fdda update brig in the API and patch cleanup 2024-12-18 18:30:29 -08:00
Lulu13022002
5922e6334b fix allowPermanentBlockBreakExploits config 2024-12-18 23:35:47 +01:00
Lulu13022002
6126012369 readd beacon effect cause 2024-12-18 19:29:39 +01:00
Nassim Jahnke
972266605e Remove dead code, param renames in added methods 2024-12-17 22:04:50 +01:00
Nassim Jahnke
7caf863b52 Small diff cleanups from patch updating
And remove a dumb log change in PacketEncoder
2024-12-17 16:50:59 +01:00
Nassim Jahnke
2d83f05a6c Update watchdog patches 2024-12-17 13:32:46 +01:00
Nassim Jahnke
7daedfcbc3 Update Optimise-collision-checking, apply more updated patches 2024-12-17 12:49:23 +01:00
Nassim Jahnke
05c0d4a6e2 Unapply hopper patch for now
Apparently depends on moonrise change
2024-12-17 11:11:41 +01:00
Nassim Jahnke
4e26399002 Apply the updated patches 2024-12-17 11:05:41 +01:00
Spottedleaf
7d29c678f7 Add in DataConverter 2024-12-16 09:39:14 -08:00
Spottedleaf
df3be3f436 Fix patch line numbers and indices 2024-12-16 09:38:31 -08:00
Spottedleaf
9539f74ff0 Move rewrite dataconverter system patch 2024-12-16 09:38:31 -08:00