Commit Graph

3828 Commits

Author SHA1 Message Date
Warrior e616498ed7 Add Vault block API (#12068) 2025-02-12 23:15:22 +01:00
Lulu13022002 a06179a018 Update entity effect (#12104) 2025-02-12 23:14:07 +01:00
Tamion 072a8317b2 Add proper attached blocks API to AbstractArrow (#12099) 2025-02-12 23:13:07 +01:00
Owen fa5824e4c8 Add skipTripwireHookPlacementValidation (#12091)
This allows for the configuration of tripwire hook duping.
2025-02-10 23:04:38 +01:00
Dreeam cafef9ce9b [ci skip] Move EntityUtil to correct directory (#12092) 2025-02-10 13:34:52 +01:00
Lulu13022002 eff617b8f8 [ci skip] Deprecate Server#setSpawnRadius (#12024) 2025-02-08 22:10:08 +01:00
Lulu13022002 1a04e96ab7 Fix EntityBreedEvent cancellation (#12046) 2025-02-08 20:59:13 +01:00
Lulu13022002 51acc802b8 Prevent duplicate raider in RaidSpawnWaveEvent list (#12040) 2025-02-08 20:55:57 +01:00
masmc05 786ddf53c6 Default piston block entity direction to DOWN (#12039) 2025-02-08 20:17:45 +01:00
David 53ae5c95b7 Make Sittable interface extend Entity (#12016) 2025-02-08 20:16:23 +01:00
Shane Freeder 597dcfffb9 Add support for lz4 (#12053)
Mojang added this early 2024, however, it wasn't ever added to the actual config option
inside of paper
2025-02-08 19:07:43 +01:00
Warrior 742968e078 [ci skip] Increase outdated build delay to two weeks (#12063) 2025-02-04 18:34:11 +00:00
Lulu13022002 e0711af5d5 Deprecate UnsafeValues#getSpawnEggLayerColor (#12041) 2025-01-31 13:17:45 +01:00
Lulu13022002 5bcfb12a99 Fix activation range config and water animal status (#12047) 2025-01-31 13:13:14 +01:00
Lulu13022002 d4a957849c Experimental annotation changes (#12028) 2025-01-30 20:02:14 +01:00
Spottedleaf 54b2e9d973 Add buffer to CraftWorld#warnUnsafeChunk
This allows plugins to access chunks slightly outside of the
max world border (such as ones which may be loaded naturally
by players) without tripping any logs.
2025-01-28 17:43:30 -08: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 a392d475c2 Make Watchdog thread extend TickThread
This allows the watchdog thread to be seen as the
primary thread during shutdown, which prevents it
from tripping thread checks in various areas.

Fixes https://github.com/PaperMC/Paper/issues/12030
2025-01-27 16:35:23 -08:00
masmc05 3af5e77132 Add Player#give (#11995) 2025-01-26 21:19:00 +01:00
Warrior ce95b5d653 Use proper default for setting null display background color (#12010) 2025-01-25 21:33:47 +01:00
Tamion 939bb7828f Add RayTraceConfigurationBuilder (#11907) 2025-01-25 20:58:16 +01:00
Creeam 336ea9dfeb Check for empty when sending equipment changes (#12008) 2025-01-25 20:04:47 +01:00
TomTom 30046e0410 Fix a rare crash with a concurrent modification of scaled health attributes (#12002) 2025-01-22 18:58:44 +00:00
Shane Freeder e150ffd272 Add missing final
"muh checkstyle" more like "muh missing style config"
2025-01-17 13:49:38 +00:00
Shane Freeder 938a84fc39 Add missing TagSerializable to GsonDataComponentValue converter (Fixes #11768) 2025-01-17 13:47:28 +00:00
Nassim Jahnke cd9d6d6998 Allow duplicate relative flags in entity teleport
Fixes #11976
2025-01-15 12:13:58 +01:00
Jake Potrebic fe75eaf09a split direct holder support up from ctor accepting Holder
Enchantment shouldn't support direct holders despite the ctor
accepting a Holder type. We want to limit the types
to ones that are actually used as direct holders in the game
2025-01-13 20:12:13 -08:00
Jake Potrebic 6fde26d7f8 remove .paperassetsroot
No longer needed with new build system
2025-01-13 18:48:51 -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
masmc05 3709150bc1 Expose all possible block data states (#11958) 2025-01-12 14:56:56 -08:00
Lulu13022002 2ea6aee343 Deprecate Turtle#isDigging (#11959) 2025-01-12 12:49:25 -08:00
masmc05 08ac057fda Rename getPotentialBedLocation to getPotentialRespawnLocation (#11950) 2025-01-12 02:17:46 +01:00
Strokkur24 c2f24e1567 Feat: Add 'with' methods to CommandSourceStack (#11868) 2025-01-11 13:29:16 -08:00
Miles c94922514a MenuType API addition InventoryView Builders (#11816) 2025-01-11 20:21:24 +01:00
Jake Potrebic ac3aaa248b Don't use delayed registries in impl anywhere (#11918) 2025-01-11 20:02:28 +01:00
Spottedleaf 3d9ecc4e08 Log thread check parameters when the thread check fails
This provides additional debug information that may be useful.
2025-01-11 04:56:54 -08:00
SoSeDiK b242f1eb15 Prevent day cycle on the client when using fixed time (#11924) 2025-01-11 10:59:50 +01:00
Spottedleaf 6316a50dbd Make CraftServer#isPrimaryThread use TickThread check
This diff was accidentally dropped when updating to hard fork.

This diff importantly:
 - Does not return true if the async catcher is disabled
 - Does not return true during shutdown
 - Returns true for any instance of TickThread (enables
   watchdog and Folia threads to be considered main)
2025-01-11 00:13:45 -08:00
Bjarne Koll 400717174e Correct obfuscation of oversized items (#11944) 2025-01-10 14:38:50 +01:00
Owen 55f3f280cb Reimplement ItemStack Obfuscation (#11817)
Reimplementation of the itemstack obfuscation config that
leverages the component patch map codec to drop
unwanted components on items or replaces them with
sanitized versions.

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2025-01-09 18:58:18 +01:00
Lulu13022002 49d15f6345 Fix DiscoveredDatapack#getSource (#11928) 2025-01-07 19:40:45 +01:00
Warrior 337557044e Fix MapCanvas#drawImage (#11865) 2025-01-07 13:54:34 +01:00
Shane Bee 4106da712c Fix retain passengers teleport flag (#11858) 2025-01-04 21:19:07 +01:00
Nassim Jahnke 1dd52bed49 Use playerlist whitelist status instead of properties
The actual property value is final, only the serialized output is changed. This uses the correct value from PlayerList instead
Fixes #11878
2025-01-01 18:53:23 +01:00
Hannes Greule 287eb52fa4 Use hidden classes for event executors (#11848)
Static final MethodHandles perform similar to direct calls. Additionally,
hidden classes simplify logic around ClassLoaders as they can be defined
weakly coupled to their defining class loader. All variants of methods
(static, private, non-void) can be covered by this mechanism.
2024-12-29 00:11:09 +01:00
Strokkur24 93a3df085c Extend HumanEntity#dropItem API (#11810) 2024-12-28 23:47:21 +01:00
Jake Potrebic feb8756567 Add datapack registration lifecycle event (#11804) 2024-12-28 13:30:43 -08:00
Bjarne Koll dac977a106 Correctly force particles (#11850) 2024-12-28 16:42:11 +01:00
Jake Potrebic 0629524cb2 Directly build Art (#11813) 2024-12-27 16:07:48 -08:00