Commit Graph

6454 Commits

Author SHA1 Message Date
Lulu13022002
8d5be7ed9f port some generator fixes
- fix a regression for minecart entity type's class
- stable alphanumeric order for fields and data holder fields for CraftBlockData
- properly register bed and conduit block entity metas
2025-06-10 17:36:48 +02:00
Lulu13022002
7e68259ce9 attribute modifier display 2025-06-10 16:53:02 +02:00
Spottedleaf
6101c8af5b Fix infinite loop in RegionFile IO
If an exception is thrown during decompress then the read process
would be started again, which of course would eventually throw in
the decompress process.
2025-06-09 03:04:38 -07:00
Lulu13022002
c63166f35c remove support of inlined painting variant in registry 2025-06-08 20:59:27 +02:00
Lulu13022002
d4a7bbde1d fix Phantom#setAnchorLocation(null) 2025-06-08 20:34:06 +02:00
Lulu13022002
c5fc0dc84b support block state mutation of already placed block entity in BlockStateListPopulator
As seen in https://github.com/PaperMC/Paper/issues/12645, the BlockStateListPopulator always destroy
block entity data when the block state change. However this is something that should be supported
so plugin can retrieve block entity data of captured blocks.
Additionally only create snapshots at the end of the capture so we don't need to refresh block entity
data for decorator like the beehive, this is possible since multiple capture
at the same position is not supported and will overwrite the previous data anyway.
2025-06-08 19:55:19 +02:00
Lulu13022002
48e94e8c89 fix sponge absorb resetting block entity data of waterlogged blocks
alternative to 320f25cb04, this commit has the side effect of
not including the waterlogged block into the block list for the later event. Generally this logic is fragile and should be handled by
the BlockStateListPopulator in the future.
2025-06-07 23:57:28 +02:00
Owen1212055
c986ce54d9 Fix V4307 ordering issues
The underlying components seem to still be appended in a different order compared to vanilla but that is fine as the order does not really matter in an ItemStack's component map.

However, 'hidden_components' seem to have defined order that must be respected. We use a hashset and keep the fixing order that is on the vanilla datafixer.
2025-06-07 15:09:22 -04:00
Owen1212055
4604c5f294 Change ordering on YamlSanitizationTest
DataConverter changes the output of these, but order of the components is generally undefined so just change this for now.
2025-06-07 15:01:59 -04:00
Owen1212055
adb5aefcbf Add api for shear equippable logic 2025-06-06 23:37:50 -04:00
Owen1212055
1e44102532 Removed inlined art api
Inlined art is no longer supported.
2025-06-06 23:26:38 -04:00
Owen1212055
720e63ffec Remove craft flying 2025-06-06 23:25:43 -04:00
Owen1212055
3594d24a2d Properly send over SADDLE and BODY equipment items to PlayerInventory
This uses the ClientboundSetPlayerInventoryPacket... in general this logic should be investigated and seen if it can be cleaned up by using this packet.
2025-06-06 23:23:38 -04:00
Owen1212055
c609d6dc29 Remove SERVER_ONLY command flag functionality
This will throw a warning for players on 1.21.6
2025-06-06 22:42:24 -04:00
Owen1212055
73d218c154 Improve command permission lookups
This allows us to append to the vanilla permission check object to avoid having to look into a map.

This also fixes non vanilla commands from technically being able to be skipped through permissions.
2025-06-06 22:11:49 -04:00
Spottedleaf
774c40e712 Update CraftWorld#getForceLoadedChunks to avoid using getChunkAt
Usual methods of adding force loaded chunks sync load them, so
they should be loaded already. This should avoid the more expensive
getChunkAt and more importantly allow this function to properly work
on Folia due to avoiding thread checks.
2025-06-05 14:55:57 -07:00
Lulu13022002
26a8254556 fix some NPEs 2025-06-05 22:02:57 +02:00
Bjarne Koll
77d1c2338f Remove useless comments and FQN in source 2025-06-05 19:29:19 +02:00
Bjarne Koll
a8df934641 Run generators 2025-06-05 19:28:06 +02:00
Spottedleaf
24cd24c8cc Optimise CraftWorld#getLoadedChunks
We can use the existing full chunk map so that we do not need
to iterate over all ChunkHolders. Additionally, do not use streams
to do the iteration either.
2025-06-05 08:16:25 -07:00
Bjarne Koll
f00d9bce79 Second part of diff
Tired.
2025-06-05 03:05:16 +02:00
Bjarne Koll
921c5f936e Do not send update packets for saddle/body slots
The player inventory now allows setting the saddle and body equipment
slot. The client menu for this however does not contain slots. As such,
updating the player for such slots leads to an IOOB exception.
2025-06-05 01:23:45 +02:00
Bjarne Koll
f8bde6e1d0 Resend leash state 2025-06-04 21:38:33 +02:00
Bjarne Koll
39ff9ed2c8 Pass hand to entity unleash event 2025-06-04 21:10:37 +02:00
Jason Penilla
a4e0777a94 Build updates 2025-06-04 09:42:35 -07:00
Bjarne Koll
66272e6aa3 Bump server compile memory 2025-06-04 17:31:22 +02:00
Bjarne Koll
ec548f93dd 1.21.6-pre3 2025-06-04 16:22:28 +02:00
Bjarne Koll
b2f3c2c94f Move over to non discarding reporter 2025-06-03 23:33:36 +02:00
Spottedleaf
5b36269252 Add MCUtil#toLocation from Folia
Helper methods to convert NMS world/position to Bukkit Location
2025-06-03 13:23:32 -07:00
Spottedleaf
87b3d8ba06 Replace deprecated Thread#getId usage with Thread#threadId 2025-06-03 13:23:05 -07:00
Spottedleaf
cb705c41ff Add DataConverter patch 2025-06-03 13:15:20 -07:00
Spottedleaf
4fa21c21fc Update Moonrise to 1.21.6-pre2
See b312be2921
2025-06-03 12:58:11 -07:00
Bjarne Koll
52880cec74 Fix LayeredCauldronBlock event call
Hello masmc05 o/
2025-06-03 17:17:52 +02:00
Bjarne Koll
c136222eeb Moonrise compile fixes and changes
Kept in separate patch for easier revert once leaf smites me.
2025-06-03 16:58:23 +02:00
Bjarne Koll
b15c51cea1 Rest of feature patches
Needs indepth testing of collision improvements on player move packet.
2025-06-03 14:30:33 +02:00
Bjarne Koll
767e99c963 Moonrise attempt
Notable changes:
 - Mojang now force loads a 1 radius large block around the player,
   including entities.

Do not smite me leaf.
2025-06-03 12:12:30 +02:00
Lulu13022002
0c3879ac21 track block for lava/conduit damage
dropped diff
2025-06-02 22:02:52 +02:00
Lulu13022002
fbc139e097 some fixes 2025-06-02 21:43:03 +02:00
Lulu13022002
18924de733 run generator 2025-06-02 19:51:09 +02:00
Bjarne Koll
5cfd638335 Fix compile issues 2025-06-02 17:14:12 +02:00
Bjarne Koll
4b6fae1079 1.21.6-pre2 2025-06-02 17:02:22 +02:00
Bjarne Koll
1366eaa540 Readd dropped hunk 2025-06-02 15:20:57 +02:00
Bjarne Koll
ff05a2df63 Hacky EAR 2.0 fixes
EAR yields immunity to entities that are not on the ground and are not
"flying entities". What this "flying entity" filter actually entails
however is undocumented. The previous implementation checked for
FlyingMob, which only covered ghasts and phantoms, leaving entities like
the blaze and wither untouched for *some* reason.

To be improved by consulting the elders (cat).
2025-06-01 20:33:10 +02:00
Bjarne Koll
ed3b39e944 14 first feature patches 2025-06-01 20:07:10 +02:00
Bjarne Koll
f3bad8c86f Prepare work on feature patches 2025-06-01 20:05:43 +02:00
Bjarne Koll
c34fb5f8b8 Test fixes
Mostly around the fact that player inventories now properly support
setting and getting the BODY and SADDLE equipment slot. The slots are
exposed to the API via the extra contents array.
2025-06-01 19:53:44 +02:00
Bjarne Koll
d16b93e646 Generator 2025-06-01 17:34:54 +02:00
Bjarne Koll
a1bfc19ab3 Some more compilation issues 2025-06-01 17:04:02 +02:00
Bjarne Koll
20136f71ca Some initial adoption of ValueInput/Output 2025-06-01 16:34:59 +02:00
Bjarne Koll
5933bd5bf3 TrialSpawner compile fixes 2025-06-01 14:39:40 +02:00