Commit graph

8763 commits

Author SHA1 Message Date
Jake Potrebic
bbe01377d5 Improve default item attributes API (#10765) 2024-05-23 11:44:07 -07:00
Jason Penilla
cb60dbc9e3 Print CommandRegisteredEvent deprecation warnings again (#10756) 2024-05-23 10:44:45 -07:00
Jake Potrebic
d637706bbd Fix equipment slot and group API (#10767) 2024-05-23 10:39:44 -07:00
Jake Potrebic
98853ee548 [ci skip] Move logic in our patches to ItemType/BlockType (#10772) 2024-05-23 10:32:02 -07:00
Jake Potrebic
c7e42591dd Always show command exception stack traces in logs (#10766) 2024-05-22 10:24:09 -07:00
Jake Potrebic
0c9dd451de fix default item attributes 2024-05-22 07:16:50 -07:00
Spottedleaf
dd88498616 Fix compile 2024-05-21 08:41:36 -07:00
Spottedleaf
e29a098cbe Remove ThreadedWorldUpgrader patch
The patch does not implement Vanilla forceUpgrade behavior.
Specifically, poi/entity conversion and regionfile recreation.

The Vanilla force upgrader is also no longer broken by CB, so the
bug fixes from this patch are not relevant anymore.
2024-05-21 08:21:28 -07:00
Jason Penilla
e71c77f5e9 Add a better warning message than "Server performance will be affected" for CommandRegisteredEvent use (#10754) 2024-05-20 11:15:21 -07:00
Jake Potrebic
93cb23c488 Add an 'empty' RecipeChoice for certain ingredient slots (#10710) 2024-05-20 07:20:47 -07:00
Jake Potrebic
763f42fc65 Check for more correct profile validation (#10730) 2024-05-19 17:45:43 -07:00
Jake Potrebic
3fb22e8951 fix CompassMeta not being correct (#10737) 2024-05-19 17:15:44 -07:00
Shane Freeder
c889d48f8c Make PaperSimplePluginClassLoader show class which is not found 2024-05-18 21:17:54 +01:00
Jake Potrebic
f14fe2e4f4 Fixes issues in the suppress dismount cancellation patch (#10735) 2024-05-17 14:37:16 -07:00
Jake Potrebic
5bd61ce801 Fix NPE sending resource pack without prompt
Fixes KyoriPowered/adventure#1075
2024-05-17 14:22:45 -07:00
Riley Park
1570ecc56c Expose server build information (#10729)
* Expose server build information

* squash patches

* final tweaks

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
2024-05-15 17:06:59 -07:00
Jason Penilla
b7e944756d Show stacktrace when modifyItemStack fails 2024-05-13 22:58:50 -07:00
Jason Penilla
9e0c66cd6c Correctly copy alias requirements in command upgrader
Fixes NPE when converting namespaced commands.

Since the brigadier command api, more aliased commands
(namespaced variants) are registered in the vanilla dispatcher,
which made this issue more apparent.
2024-05-13 15:55:15 -07:00
Spottedleaf
e5d36081c0 Make exception during command conversion non-fatal
Instead of allowing chunks to fail to convert completely,
simply log the exception and the offending command. Command
conversion failure should never result in chunk data deletion,
as commands are not critical chunk data.
2024-05-13 14:40:02 -07:00
scarfacered
67ab77467b Remove Adventure snapshot repo from dev bundle (#10716)
* Remove Adventure snapshot repo

* do not remove trailing comma
2024-05-13 13:38:28 -04:00
Jake Potrebic
036a488ef5 fix creating complex recipes that have air results
Fixes #10715
2024-05-13 06:16:45 -07:00
Jake Potrebic
0c984809fd Better way to keep paper datapack enabled 2024-05-12 21:48:07 -07:00
Jake Potrebic
eba7123352 Improve Recipe validation (#10707) 2024-05-12 13:46:46 -07:00
Bjarne Koll
def79f079d Prevent infinite recursion on cyclic brig redirect (#10705)
Prevent infinite recursion when declaring a cyclic relation between
command nodes via child nodes redirecting to an nth parent by marking a
command node as unwrapped before unwrapping its children.
2024-05-12 17:41:21 +02:00
Owen1212055
cde6cb4f28 Properly pass requirement on namespaced redirects (#10701) 2024-05-12 02:46:42 -04:00
Jason Penilla
f9008ceb01 Fix signed book page serialization (#10696) 2024-05-11 15:13:18 -07:00
Jake Potrebic
702864d8f8 Updated Upstream (Bukkit/CraftBukkit) (#10691)
Updated Upstream (Bukkit/CraftBukkit)

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

Bukkit Changes:
fa99e752 PR-1007: Add ItemMeta#getAsComponentString()
94a91782 Fix copy-pasted BlockType.Typed documentation
9b34ac8c Largely restore deprecated PotionData API
51a6449b PR-1008: Deprecate ITEMS_TOOLS, removed in 1.20.5
702d15fe Fix Javadoc reference
42f6cdf4 PR-919: Add internal ItemType and BlockType, delegate Material methods to them
237bb37b SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent
035ea146 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
8c7880fb PR-1004: Improve field rename handling and centralize conversion between bukkit and string more
87c90e93 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent

CraftBukkit Changes:
4af0f22e8 SPIGOT-7664: Item meta should prevail over block states
c2ccc46ec SPIGOT-7666: Fix access to llama and horse special slot
124ac66d7 SPIGOT-7665: Fix ThrownPotion#getEffects() implementation only bringing custom effects
66f1f439a Restore null page behaviour of signed books even though not strictly allowed by API
6118e5398 Fix regression listening to minecraft:brand custom payloads
c1a26b366 Fix unnecessary and potential not thread-safe chat visibility check
12360a7ec Remove unused imports
147b098b4 PR-1397: Add ItemMeta#getAsComponentString()
428aefe0e Largely restore deprecated PotionData API
afe5b5ee9 PR-1275: Add internal ItemType and BlockType, delegate Material methods to them
8afeafa7d SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent
4e7d749d4 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
441880757 Support both entity_data and bucket_entity_data on axolotl/fish buckets
0e22fdd1e Fix custom direct BlockState being not correctly set in DamageSource
f2182ed47 SPIGOT-7659: TropicalFishBucketMeta should use BUCKET_ENTITY_DATA
2a6207fe1 PR-1393: Improve field rename handling and centralize conversion between bukkit and string more
c024a5039 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent
741b84480 PR-1390: Improve internal handling of damage sources
0364df4e1 SPIGOT-7657: Error when loading angry entities
2024-05-11 14:48:37 -07:00
Owen1212055
567cc3f4b3 Brigadier Command Support (#8235)
Adds the ability for plugins to register their own brigadier commands 

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-05-11 16:30:30 -04:00
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