Commit graph

8685 commits

Author SHA1 Message Date
Jason Penilla
8a5ea7e5cf [ci skip] Fix paperclip PR label 2024-05-11 11:13:19 -07:00
Jake Potrebic
b71a9db7ad handle recent ItemMeta changes in serialization logic 2024-05-11 09:14:16 -07:00
Jake Potrebic
c5fb79b218 adjust ItemMeta to distinguish null and empty modifiers
Fixes #10686 (again)
2024-05-11 07:16:21 -07:00
Jake Potrebic
df292ced7a Fix keepalive time interval (#10690) 2024-05-10 17:23:58 -07:00
Jake Potrebic
8a5f5f023a Fix stacks losing empty attr modifiers
Fixes #10686
2024-05-10 12:05:06 -07:00
Jason Penilla
71de67180a Add conversion for summon command 2024-05-10 12:57:07 +02:00
Nassim Jahnke
fb102cafd1 Add validation to player profile and properties (#10680) 2024-05-10 12:52:03 +02:00
Spottedleaf
af67859c56 Use MCDataConverter instead of raw convert call for cmd converter
MCDataConverter uses the breakpoint system, which for future
updates may be neccesary (probably not).

Also, add the 1.20.6 version field.
2024-05-10 00:34:37 -07:00
Joseph Burton
67b30c5ed5 Fix DataConverter ConverterParticleToNBT.parseProperties
- The old code was using `StringReader.peek()` in a place where it meant to be `StringReader.skip()`.
- The vanilla code allows a trailing comma, but only if there is no whitespace between it and the closing bracket, which is a bit weird. I think that's a bug and it shouldn't allow trailing commas, but if you disagree then only the first issue needs to be fixed.
2024-05-10 00:31:58 -07:00
Spottedleaf
79fcb6baf4 Fix chunk data version check not running in chunk system
The old read() method should just redirect to the new
chunk system method, however due to an error in moving
the chunk system patch around the data version check was
left in the old (UNUSED) read() method.
2024-05-09 23:47:13 -07:00
Spottedleaf
b407e24c84 Invalidate PathTypeCache when pathfinding updates are disabled
The configuration should not allow the cache to break. Additionally,
invalidating the cache is cheap and as such there is no gain to avoid
invalidating it.
2024-05-09 23:07:32 -07:00
Spottedleaf
df07e2152f Fix entity tracker desync when new players are added to the tracker
The delta position packet instructs the client to update
the entity position by a position difference. However, this position
difference is relative to the last position in the entity tracker
state, not the last position which has been sent to the player. As
a result, if the last position the player has recorded is different
than the one stored in the entity tracker (which occurs when a new
player is added to an existing entity tracker state) then the sent
position difference will cause a position desync for the client.

We can resolve this problem by either tracking the last position
sent per-player, or by simply resetting the last sent position
in the entity tracker state every time a new player is added.
Resetting the last sent position every time a new player is
added to the tracker is just easier to do, so that is what
this patch does.
2024-05-09 17:08:59 -07:00
Nassim Jahnke
1ebe089f8d Print data component type on encoding error 2024-05-09 15:12:12 +02:00
Nassim Jahnke
b122be82d9 [ci skip] Clarify var entry in contributing file 2024-05-09 15:10:27 +02:00
Shane Freeder
2d2eafa713 Update Adventure to 4.17.0 Release 2024-05-08 15:48:45 +01:00
Bjarne Koll
93f003b64f Correctly compare holders in BeaconMenu (#10673) 2024-05-08 03:18:57 +02:00
Lulu13022002
624d28817c Fix hopper pull event being skipped after the first call (#10667) 2024-05-07 14:28:45 +02:00
Jason Penilla
c0abf0cfc9 Fix ping event always receiving protocol version 0 (#10671) 2024-05-07 05:24:45 -07:00
Jake Potrebic
dfd0478a87 Fix BlockStateMeta (#10647)
* Fixes CraftMetaBlockState block entity data components

* rebase and merge into general item meta fix

* Add javadoc notice

* Update message

---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-05-05 12:56:46 -07:00
SoSeDiK
b00b419da9 Add a way to check whether the chest is blocked (#10635)
* More Chest Block API

* rebased and slight logic fixes
2024-05-05 20:57:28 +03:00
Bridge
254ed14dc9 Prevent profile lookups when unnecessary (#10651) 2024-05-05 19:07:30 +02:00
Tamion
548fa24c1e Fix EntityLoadCrossbowEvent (#10645)
* fix

* hehe
2024-05-05 18:54:04 +02:00
Lulu13022002
1465288208 [ci skip] Update old particle reference in javadoc (#10652) 2024-05-05 18:44:06 +02:00
NonSwag
b5d6fdee48 Add missing SpigotConfig logCommands check (#10659) 2024-05-05 18:41:02 +02:00
Nostal Yuu
de6967e549 Added API to get player's proxy address (#10400) 2024-05-06 00:39:32 +08:00
Jake Potrebic
838bab409e Updated Upstream (CraftBukkit) (#10646)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
66fd94322 SPIGOT-7652: Remove remap for SPELL_MOB_AMBIENT which no longer exists
ecfa4f973 SPIGOT-7654: ItemStack#isSimilar does not work with empty BlockStateMeta
4460ecc49 SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set
5d84f48a4 SPIGOT-7653: Update ApiVersion.CURRENT with latest version and include tests
2024-05-05 09:08:55 -07:00
Lulu13022002
b94c74495e Add missing experimental field and annotations (#10653) 2024-05-05 18:00:54 +02:00
Bjarne Koll
252c489f15 Keep components using single items in creative (#10664)
The craftbukkit implementation stores the old and new data patch of an
item during ItemStack#useOn(UseOnContext) to properly cancel events via
comparison and change detection of the component patch.

However, it uses #getComponentsPatch to fetch the new stack component
patch, which always yields an empty patch set if an itemstack is
considered empty by the game.
As the restoration of an itemstack's count to its previous state is
handled after the entire ItemStack#useOn method, items used in creative
mode temporarily have a count of zero, which causes craftbukkit to
consider their new component patch as EMPTY even tho said item may have
data.
The new patch is applied and, after useOn completes, the count is reset
if the player is in creative mode, leading to lost data.

This commit fixes said inconsistency by directly accessing the
components of the item via components#asPatch, storing the proper
component patch even for an item that temporarily has a count of zero.
2024-05-05 11:40:36 +02:00
Jake Potrebic
f51bdcf978 fix shear drops for wolf and bogged
Fixes #10661
2024-05-04 22:48:06 -07:00
Nassim Jahnke
7b2ce17e23 Add missing step in V3818 2024-05-04 22:49:48 +02:00
Jake Potrebic
4473bf06e0 add RegistryAccess for managing registries (#10154)
* add RegistryAccess for managing registries

* add missing types to key data generator

* fix some stuff

* Add RegistryKeys for all other non-server-backed registries

* fix tests

* remove Experimental annotations
2024-05-04 11:22:35 -07:00
Joseph Burton
128ea2f10b Fix lodestone compass target conversion 2024-05-04 12:58:06 +02:00
Joseph Burton
4a8b9a03eb Fix can_place_on conversion and size check for item containers 2024-05-02 20:23:15 +02:00
Shane Freeder
a8e49a12d3 default save-empty-scoreboard-teams to vanilla
The primary environmental factor which caused this feature to be implemented
is no longer much of a factor within the community
2024-05-02 09:53:43 +01:00
SoSeDiK
a56d850e4b Expose #hasColor to leather armor (#10638) 2024-05-01 20:14:42 +03:00
SoSeDiK
71c03637bf Add EquipmentSlot#getOppositeHand (#10632) 2024-05-01 20:14:27 +03:00
SoSeDiK
6ad89448b8 Add GameMode#isInvulnerable (#10633) 2024-05-01 20:14:17 +03:00
Nassim Jahnke
9432b19638 Update Java version references, add note on var usages 2024-05-01 18:44:17 +02:00
Andrew Teeter
f1693652c8 Add damage check for mending (#10631) 2024-05-01 06:01:48 -04:00
SoSeDiK
58e7ac939f Expose canReach to mob pathfinding API (#10636) 2024-05-01 13:00:11 +03:00
Noah van der Aa
dde797dbca Updated Upstream (CraftBukkit) (#10624)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
666f091c6 SPIGOT-7649: Allow /setworldspawn command in all worlds again
2024-05-01 01:53:54 +02:00
Jake Potrebic
61a36373c0 Fixes beds not exploding in the nether
Also correctly marks the captured BlockState as "unplaced"
Fixes #10629
2024-04-30 16:42:43 -07:00
Jason Penilla
8712a1c838 Update paperweight to 1.6.3 (#10626) 2024-04-30 10:30:14 -07:00
Nassim Jahnke
657059cfe9 [ci skip] Remove trailing comma in projects action 2024-04-30 15:56:43 +02:00
Nassim Jahnke
f97bdb1894 Add initial size cap to component map 2024-04-30 11:14:20 +02:00
Jason Penilla
ec006b59bb Fix sealed package check in BytecodeModifyingURLClassLoader (#10627) 2024-04-30 01:21:16 -07:00
Jake Potrebic
ff22570edc fix dumpitem command nbt format
use the snbt visitor instead of plain string
2024-04-29 18:49:19 -07:00
Jake Potrebic
9db4ebd3f1 fix spawnChunkRadius gamerule resetting
Fixes #10622
2024-04-29 15:22:29 -07:00
Noah van der Aa
723528c18b 1.20.6 (#10623) 2024-04-30 00:16:07 +02:00
Riley Park
3778302a37 [ci skip] update projects workflow configuration 2024-04-29 13:29:50 -07:00