EnZaXD
e436bbe375
Refactor dimension switch handling across all protocols ( #4146 )
2024-09-15 21:51:29 +02:00
EnZaXD
050a1dbacb
Fix set equipment body slot in 1.20.3->.5 if value is not the last ( #4149 )
2024-09-15 19:14:42 +02:00
EnZaXD
7235485802
Cleanup enchantment conversion in 1.12->1.13 to match vanilla ( #4147 )
...
Closes https://github.com/ViaVersion/ViaFabricPlus/issues/560
2024-09-14 21:33:18 +02:00
EnZaXD
fcb472347e
Add EntityTrackerBase#hasClientEntityId and don't use -1 as not set indicator ( #4143 )
2024-09-14 10:45:19 +02:00
EnZaXD
e0ce8cc715
Make EntityTrackerBase#clearEntities call removeEntity for all entries ( #4142 )
2024-09-12 22:09:52 +02:00
EnZaXD
ebc0e61be8
Fix invalid book view not visible in 1.20.3->.5 ( #4139 )
2024-09-07 10:45:10 +02:00
EnZaXD
d0b49009e5
Rewrite display name component in player info packet in 1.20.3->.5 ( #4136 )
2024-09-04 20:27:38 +02:00
Nassim Jahnke
6555bcda74
Small cleanup to mapping file loading
2024-09-02 23:21:29 +02:00
Nassim Jahnke
e537dbb024
Clean up StructuredItemRewriter, also handle sound events
2024-08-30 19:10:43 +02:00
Nassim Jahnke
f92dbb655d
Also cache missing protocol paths, don't reverse base protocols
2024-08-30 11:19:32 +02:00
EnZaXD
7cd5514b90
Add PacketWrapper#sendFutureRaw, cleanup login disconnect handling. ( #4129 )
...
Removes the special handling in Protocol1_8To1_9 and always send the correct/expected data by the client in ServerboundBaseProtocol1_7 itself. Also prevent sending the packet through the protocol pipeline since packet/format changes should also be handled inside the base protocol.
2024-08-29 21:46:43 +02:00
EnZaXD
32e51b52aa
Cleanup LOGIN/STATUS packet handlers ( #4113 )
2024-08-28 15:52:28 +02:00
Nassim Jahnke
4f66fd793b
Go back to fast entity data list iteration and mutation
...
This is a fairly hot method and the array list cannot be modified outside of the already managed event cancellation and provided extra list
2024-08-25 18:59:48 +02:00
Nassim Jahnke
2a71612aea
Small cleanup of a few rewriters
2024-08-25 18:42:21 +02:00
Nassim Jahnke
a993a08b8d
Only map between different primitive types when explicitly requested
...
This would otherwise only happen with unsafe type usage
2024-08-24 18:00:06 +02:00
Nassim Jahnke
a9c947517c
Don't unnecessarily re-wrap objects in passthrough
2024-08-24 17:10:20 +02:00
Pablo Herrera
2841bf3040
Add option to hide scoreboard numbers ( #4122 )
2024-08-24 15:49:09 +02:00
RK_01
7edddda36e
Split base protocols list ( #4118 )
2024-08-23 14:09:14 +02:00
RK_01
33de12ceb1
Reset reader before passing packet through protocols ( #4117 )
2024-08-23 09:42:50 +02:00
RK_01
f8eb57cdbb
Fix 1.8->1.9 click sound mappings ( #4116 )
2024-08-22 19:39:09 +02:00
EnZaXD
b2d523f5c0
Add more API for base protocols and skip manually added ones. ( #4115 )
2024-08-22 17:15:29 +02:00
EnZaXD
b586b0d361
Allow client intention packet to be cancelled ( #4114 )
2024-08-22 10:59:35 +02:00
EnZaXD
c6381e7f4d
Allow protocols to handle client intention packet ( #4112 )
2024-08-21 19:58:32 +02:00
EnZaXD
78abf8be00
Use RedirectProtocolVersion#getOrigin in InitialBaseProtocol if possible ( #4110 )
...
This way, we should be able to get rid of manually adding the base protocol in projects like ViaAprilFools:
https://github.com/ViaVersion/ViaAprilFools/blob/main/common/src/main/java/net/raphimc/viaaprilfools/protocol/s3d_sharewaretov1_14/Protocol3D_SharewareTo1_14.java#L87
2024-08-21 16:56:20 +02:00
EnZaXD
1dde24bb68
[ci skip] Remove outdated comments ( #4111 )
2024-08-21 16:56:09 +02:00
EnZaXD
bc57512ca2
Allow for multiple base protocols per version ( #4106 )
2024-08-21 14:35:19 +02:00
EnZaXD
9d75125e41
Make EntityTrackerBase#entities protected ( #4103 )
2024-08-18 11:03:57 +02:00
RK_01
8ce4112e86
Improve/Fix 1.8->1.9 sound mappings ( #4099 )
2024-08-14 18:04:37 +02:00
EnZaXD
7d542d5667
Fix ComponentRewriter1_20_5#convertFood behaviour ( #4095 )
...
Closes https://github.com/ViaVersion/ViaFabricPlus/issues/517
2024-08-14 15:26:22 +02:00
EnZaXD
1b03e24160
Move VV specific item handling out of component<->nbt conversion in 1.20.3->1.20.5 ( #4094 )
...
The current code backups the tag in CUSTOM_DATA inside the toStructuredItem function which in VB is used for to server packets which causes bad data, this PR moves the backup logic out to the VV specific handler and also prevents toOldItem logic for using the backup to ever get executed in VB. The counterpart PR will add proper handling for CUSTOM_DATA.
Fixes https://github.com/ViaVersion/ViaVersion/issues/4092
2024-08-14 09:31:27 +02:00
Nassim Jahnke
fcd91bb855
Add item cost and particle types to item rewriter
2024-08-13 12:45:36 +02:00
Nassim Jahnke
bda4ea9fd0
[ci skip] Move template protocol into common module
...
Had to move the rewriter classes into the flattened package to make them package private, but this is nicer than having a separate module just for those
2024-08-13 10:24:20 +02:00
Nassim Jahnke
cc1c88001f
Hotfix item id changes in item hover events
2024-08-07 17:36:42 +02:00
Nassim Jahnke
274f98c24e
Fix double remapping of area effect cloud particle in 1.20.2->.3
...
Fixes #4042
2024-08-07 15:37:14 +02:00
EnZaXD
aa22ca1d56
Handle pitch/yaw->data item frame rotation change in 1.16.4->1.17 ( #4064 )
...
See https://github.com/ViaVersion/ViaBackwards/pull/848
2024-08-07 13:02:51 +02:00
Nassim Jahnke
802e868b2e
Track sent armor trim registries in 1.20.3->1.20.5
2024-08-07 12:36:51 +02:00
Nassim Jahnke
02442a9775
Only resend attribute modifiers when necessary
...
Fixes #3973
2024-08-07 11:59:13 +02:00
Nassim Jahnke
a8ef3c890a
Only add dummy enchantment once
2024-08-06 15:21:18 +02:00
EnZaXD
434b32cad8
Fix typo in ViaManagerImpl#destroy log message ( #4073 )
2024-08-05 09:30:48 +02:00
EnZaXD
60b3ba6bb7
Include snakeyaml into final jar, delete compat layers ( #4070 )
...
Snakeyaml is an untypical library which most Via platforms don't have and also broke in the past with V2, having it directly in the jar like Gson cleans up the build scripts massively, reduces the build time and also doesn't break in the future if they release V3 or any other breaking changes.
2024-08-05 09:30:34 +02:00
EnZaXD
864beef341
Regenerate toString() functions and remove them from protocol internals ( #4072 )
2024-08-05 09:09:34 +02:00
Nassim Jahnke
462a10363c
Only print reload info when needed, add additional log message after shutdown
...
Thanks to its name and dependency order, ViaVersion will generally be the last plugin to be disabled and has occasionally been blamed for other plugins stalling server shutdown
2024-08-03 20:35:22 +02:00
Nassim Jahnke
48d5aaf8fa
5.0.2 Release
2024-07-28 14:37:59 +02:00
EnZaXD
41b0d95d70
Fix horse/llama's armor/carpet not visible in 1.20.3->1.20.5 ( #4052 )
2024-07-27 20:26:53 +02:00
EnZaXD
b599399c48
Cleanup 1.20->1.20.2 item and recipe rewriter ( #4050 )
2024-07-27 19:53:59 +02:00
EnZaXD
721e27eb39
Rewrite show_item in translation components in 1.11.1->1.12 ( #4053 )
...
Fixes https://github.com/ViaVersion/ViaVersion/issues/4051
2024-07-27 19:53:44 +02:00
RK_01
b1f64fd081
Use enhanced switches in more places ( #4043 )
2024-07-24 14:32:36 +02:00
EnZaXD
2b508567db
Move damage types 1.20.3 into nbt file ( #4026 )
2024-07-24 13:13:36 +02:00
EnZaXD
24d0ae7607
Add ViaManager#addPostEnableListener ( #4038 )
2024-07-22 18:24:06 +02:00
EnZaXD
40a44d5dc5
Remove version type from dump ( #4036 )
2024-07-22 17:45:21 +02:00
EnZaXD
b5a06181d4
Fix item projectile hierarchy in 1.14+ ( #4034 )
2024-07-22 17:44:07 +02:00
EnZaXD
35fa7e78a0
Handle attribute_modifiers inside container components in 1.21->1.20.5 ( #4035 )
...
Closes https://github.com/ViaVersion/ViaVersion/issues/3968
2024-07-22 17:42:25 +02:00
EnZaXD
3906b47654
Apply required changes for ViaAprilFools ( #4033 )
...
1. Allow the version provider to get the client version sent through the handshake packet
2. Allow platform to override provider instead
2024-07-21 17:45:13 +02:00
Nassim Jahnke
1476adb281
Slightly improve logging on config loading errors
2024-07-21 12:12:06 +02:00
EnZaXD
f2f0be0581
Allow base protocols to set client version ( #4029 )
2024-07-20 09:15:15 +02:00
EnZaXD
5ec30ef18a
Expose origin version in RedirectProtocolVersion ( #4030 )
2024-07-20 09:12:44 +02:00
Nassim Jahnke
0915afe43b
Handle 1.21 attribute id changes
...
Fixes #4005
2024-07-19 11:26:28 +02:00
EnZaXD
87b041bf3a
Fix block predicate conversion in 1.20.3->1.20.5 ( #4025 )
2024-07-19 11:00:00 +02:00
EnZaXD
275b09bdbb
Use SerializerVersion#toTag when converting 1.20.5->1.20.3 block predicates ( #4024 )
2024-07-19 10:54:40 +02:00
Nassim Jahnke
cc87c02020
Add shulker box block entity id if missing
2024-07-17 18:48:07 +02:00
RK_01
6bbcf7d784
Fix respawn "keep data" translation ( #4015 )
2024-07-13 11:00:12 +02:00
EnZaXD
465a2354c0
Call component rewriter in pre 1.20.3 advancement handler ( #4014 )
...
Required for ViaBackwards where we need to rewrite the translation key (and it also doesn't hurt to have this in forward protocols).
Closes https://github.com/ViaVersion/ViaBackwards/issues/819
2024-07-13 11:00:00 +02:00
EnZaXD
c59c15d6f3
[ci skip] Fix player combat packet value comments ( #4013 )
2024-07-13 10:59:47 +02:00
EnZaXD
20f7738f08
Add cancel-block-sounds option for 1.8->1.9 place/break fix ( #4011 )
2024-07-12 00:11:11 +02:00
EnZaXD
323f0fa087
Remove minimize-cooldown config option ( #4009 )
2024-07-07 18:03:35 +02:00
RK_01
3138d667a6
Fix crossbow max damage and 1.8 sword blocking using item data components ( #4010 )
2024-07-07 18:02:51 +02:00
EnZaXD
365040f59d
Handle rarity changes in trident/banner pattern item in 1.20.5->1.21 ( #4001 )
2024-07-07 17:39:30 +02:00
lowercasebtw
303d9ecf51
Hide cooldown indicator completely in 1.8->1.9 ( #4006 )
...
* Change 1.8 to 1.9 Attack Speed
* Fix The Attack Speed Value Type
* Change Attack Speed to 20
Requested/Suggested change from FlorianMichael
Co-authored-by: EnZaXD <florian.michael07@gmail.com>
---------
Co-authored-by: EnZaXD <florian.michael07@gmail.com>
2024-07-06 23:12:01 +02:00
EnZaXD
463381b84e
Rename missing metadata references to entity data ( #4007 )
2024-07-06 21:05:40 +02:00
Nassim Jahnke
7fef96d77e
Remove unneeded 1.13 enchantment translatable mappings
2024-07-03 11:32:25 +02:00
Gegy
17358120cd
Fix: delay chat acknowledgements instead of spoofing ( #3997 )
...
An easy reproduction case is to mute a player using the Social Interactions screen, let them chat, and then send a message. As ViaVersion produces its own acknowledgements, this now does not match with what the client produced and signed its messages with - so the signature will fail verification.
As an alternative, we *always* pass through the same acknowledgement bit set - and for 'spoofed' messages, we reuse the last one that we received. In the case of the chat ack packet with just an offset, we need to hold back the window by at least 20 messages to ensure we don't start making claims about whether the client saw a message that ViaVersion cannot yet make a judgement on.
2024-07-03 10:52:01 +02:00
EnZaXD
e6da77cf47
Handle Slot tag inside CONTAINER tag in 1.20.3->1.20.5 ( #3995 )
...
Fixes shulker box tooltips not showing all items for 1.20.3 clients on 1.20.5+ servers
2024-07-02 11:53:34 +02:00
EnZaXD
dc503cd613
Update legacy Minecraft version warning ( #3989 )
2024-06-30 11:30:54 +02:00
Nassim Jahnke
8aa2f4be46
Handle show item hovers in more component packets
...
Because servers do weird things
2024-06-30 11:10:44 +02:00
Nassim Jahnke
c5dc5b2bf8
Actually restrict velocity change to fishing hooks
2024-06-28 15:29:06 +02:00
EnZaXD
bfbb80f708
Update unsupported java version warning ( #3988 )
...
Now links to the release which contains a guide on how to update
2024-06-27 14:56:15 +02:00
EnZaXD
248da118a9
Move bukkit-only settings into BukkitViaConfig ( #3985 )
2024-06-27 09:56:50 +02:00
EnZaXD
a987882132
Rework unsupported config options in AbstractViaConfig ( #3986 )
2024-06-27 09:54:44 +02:00
EnZaXD
bca25d4744
Rewrite filtered_pages in 1.20.2->1.20.3 ( #3983 )
2024-06-26 10:58:50 +02:00
EnZaXD
2417ffe483
Fixup horse inventory translation in 1.20.5->1.21 ( #3980 )
...
Fixes #3978
2024-06-25 15:27:02 +02:00
EnZaXD
8606e5d663
Handle both json and plain text in CommonBoss ( #3981 )
2024-06-25 15:21:34 +02:00
EnZaXD
5a0ca55b97
Add test command handler to DummyInitializer test ( #3970 )
2024-06-25 15:21:26 +02:00
Nassim Jahnke
ceb1cffb00
Cancel "message not delivered" messages
...
Fixes #3438
2024-06-25 15:19:03 +02:00
Nassim Jahnke
1ff3035bc0
Make 1.10->1.11 fishing hook position desync slightly less bad
2024-06-25 15:17:29 +02:00
EnZaXD
245f7e24e4
Fix DummyInitializer unit test to bootstrap without errors ( #3965 )
2024-06-22 11:04:11 +02:00
EnZaXD
d03207289e
Backup original book pages for creative mode clients in 1.8->1.9 ( #3952 )
2024-06-21 14:38:00 +02:00
Nassim Jahnke
64497b305a
Fix enchantment order
2024-06-20 17:42:27 +02:00
Nassim Jahnke
f5b3799db9
Use default dimension data for defaulted registry entry
2024-06-20 17:32:19 +02:00
Nassim Jahnke
00fedc7656
Also handle aqua affinity
2024-06-20 16:08:46 +02:00
Nassim Jahnke
5243c1800e
entity effect magic
...
Fixes #3927
2024-06-20 12:51:35 +02:00
Nassim Jahnke
77d702bc9b
Also handle movement related enchantments
...
Fixes #3960
2024-06-20 12:12:29 +02:00
EnZaXD
3d083cf463
Add handleMenuType function to ItemRewriter ( #3953 )
2024-06-17 16:39:01 +02:00
Nassim Jahnke
2ab62a8f4f
Protected
2024-06-17 12:48:52 +02:00
Nassim Jahnke
296f42086f
Also handle item_name item data for component rewriting
2024-06-17 12:43:18 +02:00
Nassim Jahnke
e9f547f7ba
Add ArrayUtil
2024-06-17 11:48:21 +02:00
Camotoy
b7f388b9ee
1.20.5 -> 1.20.3: nullify empty tags ( #3949 )
...
Co-authored-by: AJ Ferguson <AJ-Ferguson@users.noreply.github.com>
2024-06-17 09:42:09 +02:00
Leon
8bec05ed38
Fixup hardcore handling on join in 1.8->1.9 ( #3946 )
...
* Fix players crashing when logging into a 1.8 server on hardcore mode, Fixes #3944
* Requested change to #3944 fix
2024-06-16 22:06:39 +02:00
Nassim Jahnke
b367caa4b2
Add Charged item tag if there's charged projectiles
...
Closes ViaVersion/ViaBackwards#787
2024-06-16 21:58:07 +02:00
Nassim Jahnke
d1d279cfea
Don't send the attribute packet if the login packet hasn't been sent yet
2024-06-16 15:44:02 +02:00
Nassim Jahnke
4b44ecf6fa
Fix missed null item return value
2024-06-16 15:00:23 +02:00
Nassim Jahnke
b9474335e8
Fix container item type
2024-06-16 10:48:53 +02:00
Nassim Jahnke
f0c26d5967
Make sure we actually have block mappings before trying to apply them
2024-06-16 10:19:50 +02:00
Nassim Jahnke
aa312f7332
Merge branch 'refs/heads/dev' into preview
2024-06-16 10:19:43 +02:00
Nassim Jahnke
4210463505
Don't return null item in compound tag reading
2024-06-15 22:56:19 +02:00
EnZaXD
ec976dfb6c
Add method to remove sub commands from command handler ( #3941 )
2024-06-15 20:51:24 +02:00
Nassim Jahnke
7e60300e2e
Merge branch 'refs/heads/dev' into preview
2024-06-15 16:11:04 +02:00
EnZaXD
9a9ca9676d
Cleanup /viaversion list and pps command ( #3933 )
2024-06-15 15:53:09 +02:00
EnZaXD
c68915b261
Add /viaversion player <name|*> command ( #3932 )
2024-06-15 15:05:26 +02:00
Nassim Jahnke
524e053327
Don't add tags if they're already in there
2024-06-14 17:04:22 +02:00
EnZaXD
9e523c353a
Fix book signing in 1.8->1.9 ( #3939 )
2024-06-14 10:17:42 +02:00
Nassim Jahnke
ddf6df8097
Add new keys for item data types containing item arrays
2024-06-14 00:21:30 +02:00
Nassim Jahnke
cc6f789334
Handle block ids in tool and adventure more predicate data
2024-06-13 23:10:25 +02:00
EnZaXD
4a70e0ea2a
Fixup command registration once again ( #3937 )
2024-06-13 19:21:52 +02:00
EnZaXD
72cc9e9968
Add ability to detection level in /viaversion displayleaks ( #3934 )
2024-06-13 18:36:08 +02:00
EnZaXD
1039b8556b
Add remaining item types to item rewriter implementations ( #3931 )
2024-06-13 18:34:55 +02:00
Nassim Jahnke
e977e8db90
Write sound in explosion as proper sound event in 1.20.3->1.20.5
2024-06-13 18:30:28 +02:00
Nassim Jahnke
67a349d74b
Add tooltip_order and manually add curse enchantment tags
2024-06-12 23:22:46 +02:00
RK_01
009e2deed1
Add important 1.21 tags ( #4 )
2024-06-12 20:36:15 +02:00
Nassim Jahnke
089df6517e
1.21-rc1
2024-06-12 18:03:51 +02:00
Nassim Jahnke
d007beaeec
1.21-pre4
2024-06-12 18:03:51 +02:00
Nassim Jahnke
3d656d411d
1.21-pre3
2024-06-12 18:03:51 +02:00
Nassim Jahnke
8bc22a1bad
Handle item changes in show item components
2024-06-12 18:03:50 +02:00
Nassim Jahnke
5d0846abe2
Handle chat and horse container changes
2024-06-12 18:03:50 +02:00
Nassim Jahnke
5edb6ff411
Handle jukebox songs
2024-06-12 18:03:50 +02:00
Nassim Jahnke
251ab42c14
Update data component ids
2024-06-12 18:03:50 +02:00
Nassim Jahnke
134c3559bf
WIP 24w21b
2024-06-12 18:03:49 +02:00
Nassim Jahnke
832dbdf493
24w20a
2024-06-12 18:03:49 +02:00
Nassim Jahnke
ccc509432b
Rebase onto 5.0.0
2024-06-12 18:03:49 +02:00
Nassim Jahnke
58d7dc7ca6
24w19a
2024-06-12 18:03:49 +02:00
FlorianMichael
1fe6f72aec
Fix typo
2024-06-12 18:03:48 +02:00
Nassim Jahnke
e3312b1c80
Add basic handling for items within item components
...
No changes so far, but will most likely be needed rather sooner than later
2024-06-12 18:03:48 +02:00
Nassim Jahnke
182148dbe8
Some cleanup
2024-06-12 18:03:48 +02:00
Nassim Jahnke
b5c718098d
24w18a
...
Abstract item rewriters still need additional handling for once there are actual item changes, but this works as is for now
2024-06-12 18:03:39 +02:00
EnZaXD
01ea51e8ee
Add armor stand entity id to ENTITY_DATA in 1.20.3->.5 ( #3930 )
...
Closes https://github.com/ViaVersion/ViaVersion/issues/3929
2024-06-12 18:02:24 +02:00
EnZaXD
ae3042074e
Add trade list rewriter functions to ItemRewriter ( #3926 )
2024-06-11 15:02:04 +02:00
EnZaXD
d0ed528788
Save negative item amounts in 1.10->1.11 ( #3921 )
2024-06-09 17:07:29 +02:00
EnZaXD
2fba2c1e65
Don't send empty items in 1.8->1.9 hand item provider ( #3920 )
2024-06-09 15:52:08 +02:00
Nassim Jahnke
b77d0fedd9
Remove no longer needed empty item check in entity data
...
Also fixes bad null values being set there
2024-06-09 13:05:52 +02:00
Nassim Jahnke
1e244a126d
Handle optional item cost nullability
2024-06-07 13:51:28 +02:00
Nassim Jahnke
842cb8dac5
Change items to not be nullable in 1.20.5+
...
With the server and client actually having empty checks in many places now, this simplifies empty checks going forward
2024-06-07 13:34:46 +02:00
Nassim Jahnke
5053d739c0
Handle empty items in some thrown projectiles
...
Fixes #3909 , #3910
2024-06-07 12:24:02 +02:00
EnZaXD
bb48dc90f9
Add EntityRewriter#registerBlockStateHandler ( #3912 )
2024-06-06 11:00:18 +02:00
EnZaXD
1ea27f1077
Improve some grammar and rename update checker setting ( #3900 )
2024-06-04 12:41:12 +02:00
EnZaXD
3f72e9ea47
Don't publish extra modules ( #3901 )
2024-06-03 15:22:59 +02:00
EnZaXD
8a826b88fb
Move firework flight length appending into VB protocol ( #3902 )
2024-06-02 09:04:24 +02:00
EnZaXD
82452dbdfe
Remove bungee options from config.yml ( #3898 )
2024-06-01 20:37:38 +02:00
Nassim Jahnke
2f41d09e23
Remove deprecated codec handler
2024-06-01 16:49:50 +02:00
Nassim Jahnke
0f73304a1d
Fix trim pattern
2024-05-31 15:17:04 +02:00
EnZaXD
2a088c08ed
Handle edge cases when converting legacy components ( #3896 )
2024-05-30 22:55:03 +02:00
Nassim Jahnke
a48c3a6ec2
Move Bungee and Sponge platforms to separate plugins
...
Bungee support is half broken due to not having the same injection points as Velocity and has become less and less stable with every update. The Sponge plugin has been almost entirely unused
2024-05-30 21:52:34 +02:00