Commit Graph

19482 Commits

Author SHA1 Message Date
Jake Potrebic
89059c25dc Add RegistryRetriever for future use in registry API 2025-06-14 10:56:22 -07:00
Lulu13022002
2f1c6f35d6 do not teleport player twice on first spawn
Mojang moved the adjustSpawnLocation call from the ServerPlayer constructor
to where we do it normally making it duplicate
2025-06-14 18:18:50 +02:00
Lulu13022002
d1f89b9c70 pass correct context to CraftChatMessage#toJSON 2025-06-14 17:33:23 +02:00
Lulu13022002
084abd4546 do not call BlockGrowEvent on each age grow for cactus
this might be something we do in the future but it should be consistent with the rest too
closes https://github.com/PaperMC/Paper/issues/12662
2025-06-14 17:28:55 +02:00
Lulu13022002
dac59acac9 fix EntityPortalExitEvent handling 2025-06-14 17:22:24 +02:00
Lulu13022002
6fbb3846d7 tweak BlockStateListPopulator pt 2 2025-06-13 20:35:55 +02:00
Lulu13022002
b9a4ec080a tweak BlockStateListPopulator
* catch destroyBlock calls in the populator, this is needed when sponge
absorb water around plants.
Some of them are destroyed in the process and can only live underwater and plugin
should get the final state in that case and not the not waterlogged state.
* handle drying process for waterlogged blocks on the living world at the end,
while the populator will catch any block changes, it will however not trigger
the particle effects done in destroyBlock
* always try to set block entity data even if the underlying block state doesn't
change for snapshot exposed by the events
2025-06-13 20:12:20 +02:00
Lulu13022002
c346755417 bump built-in datapack version 2025-06-12 17:45:00 +02:00
Lulu13022002
f961ed57db update to rc1 2025-06-12 17:43:45 +02:00
Lulu13022002
1102e7b821 fix Equippable#shearSound 2025-06-12 17:09:30 +02:00
Jake Potrebic
96d739c17e rename RegistryFreezeEvent to RegistryComposeEvent 2025-06-11 19:31:54 -07:00
Lulu13022002
a38aeef6de fix indices for horse inventories getItem
If the index is shifted for slots after the saddle slot in the setter
then it should be in the getter to stay consistent.
2025-06-11 18:47:00 +02:00
Lulu13022002
87d0fdd89e happy ghast is a vehicle 2025-06-11 17:31:09 +02:00
Lulu13022002
8c313fb30b properly override removePassenger for happy ghast 2025-06-11 17:18:55 +02:00
Lulu13022002
569c3231fb update to pre4 2025-06-10 18:50:02 +02:00
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
7c2ffd5e57 Prune the api version suffix
This is needed for the test plugin, as the bukkit api does not support these versions in the plugin manifest.

Alternatively we could add another gradle property
2025-06-06 22:39:01 -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
Lulu13022002
94fefb88e6 [ci skip] fix classpath split on Windows for generator CLI 2025-06-06 21:30:23 +02: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
Lulu13022002
73c536da8b add new UI sound category 2025-06-05 18:47:13 +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
Bjarne Koll
b81bb10233 Add new attributes for 1.21.6 2025-06-04 19:12:57 +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
4c4ddfcce5 Update ItemType 2025-06-04 00:13:36 +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