Commit Graph

3815 Commits

Author SHA1 Message Date
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
Bjarne Koll
33411ec0a1 Properly remove UnsafeValues#getDamageEffect 2024-12-28 00:21:27 +01:00
Chaosdave34
5c7537cb5c Add DamageType RegistryEvent (#11783) 2024-12-28 00:13:27 +01:00
Warrior
4b893907f6 Fix contextual map renderer memory leak (#11841) 2024-12-27 23:25:02 +01:00
Jake Potrebic
b4051dbff7 Handle disabled vanilla registry values correctly (#11781) 2024-12-27 23:11:26 +01:00
96DarkCode96
13c94e40ad Updated adventure to 4.18.0 (#11809) 2024-12-27 22:04:17 +01:00
Nassim Jahnke
326c687047 Fix whack diff from last commit 2024-12-27 13:47:25 +01:00
Nassim Jahnke
2b73d1957c More var name fixes 2024-12-27 13:45:04 +01:00
Nassim Jahnke
c530c39f4e More var name fixes 2024-12-27 12:31:54 +01:00
kokiriglade
953f6f929e Banner pattern registry modification (#11803) 2024-12-26 18:57:34 -05:00
SoSeDiK
aac246ae29 Expand on entity serialization API (#11807) 2024-12-27 00:08:00 +01:00
YoungSoulluoS
0efd3012c9 Fix suggestions for ResourceLocation (#11830) 2024-12-27 00:07:02 +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
Jake Potrebic
a8f850a128 temporarily revert OldEnum toString changes (#11829) 2024-12-26 10:11:18 -08:00