File tree Expand file tree Collapse file tree 4 files changed +4
-32
lines changed
api/src/main/java/com/noxcrew/noxesium
nms/src/main/java/com/noxcrew/noxesium/core/nms/serialization Expand file tree Collapse file tree 4 files changed +4
-32
lines changed Original file line number Diff line number Diff line change 1616import com .noxcrew .noxesium .api .registry .NoxesiumRegistries ;
1717import com .noxcrew .noxesium .api .registry .NoxesiumRegistry ;
1818import com .noxcrew .noxesium .core .client .setting .ClientSettings ;
19- import com .noxcrew .noxesium .core .network .clientbound .ClientboundOpenLinkV2Packet ;
19+ import com .noxcrew .noxesium .core .network .clientbound .ClientboundOpenLinkPacket ;
2020import com .noxcrew .noxesium .core .network .clientbound .ClientboundUpdateGameComponentsPacket ;
2121import java .util .ArrayList ;
2222import java .util .Collection ;
@@ -502,7 +502,7 @@ public void openLink(String url) {
502502 * the given text message.
503503 */
504504 public void openLink (String url , @ Nullable Component text ) {
505- sendPacket (new ClientboundOpenLinkV2Packet (Optional .ofNullable (text ), url , "" ));
505+ sendPacket (new ClientboundOpenLinkPacket (Optional .ofNullable (text ), url ));
506506 }
507507
508508 /**
Original file line number Diff line number Diff line change 99import com .noxcrew .noxesium .core .network .clientbound .ClientboundCustomSoundStartPacket ;
1010import com .noxcrew .noxesium .core .network .clientbound .ClientboundCustomSoundStopPacket ;
1111import com .noxcrew .noxesium .core .network .clientbound .ClientboundOpenLinkPacket ;
12- import com .noxcrew .noxesium .core .network .clientbound .ClientboundOpenLinkV2Packet ;
1312import com .noxcrew .noxesium .core .network .clientbound .ClientboundUpdateEntityComponentsPacket ;
1413import com .noxcrew .noxesium .core .network .clientbound .ClientboundUpdateGameComponentsPacket ;
1514import com .noxcrew .noxesium .core .network .serverbound .ServerboundClientSettingsPacket ;
@@ -42,11 +41,6 @@ public class CommonPackets {
4241 client (INSTANCE , "clientbound_update_entity_components" ).add (ClientboundUpdateEntityComponentsPacket .class );
4342 public static final NoxesiumPayloadGroup CLIENT_UPDATE_GAME_COMPONENTS =
4443 client (INSTANCE , "clientbound_update_game_components" ).add (ClientboundUpdateGameComponentsPacket .class );
45- public static final NoxesiumPayloadGroup CLIENT_OPEN_LINK = client (INSTANCE , "clientbound_open_link" )
46- .chain (ClientboundOpenLinkPacket .class )
47- .add (
48- ClientboundOpenLinkV2Packet .class ,
49- (it ) -> new ClientboundOpenLinkPacket (it .text (), it .url ()),
50- (it ) -> new ClientboundOpenLinkV2Packet (it .text (), it .url (), "" ))
51- .group ();
44+ public static final NoxesiumPayloadGroup CLIENT_OPEN_LINK =
45+ client (INSTANCE , "clientbound_open_link" ).add (ClientboundOpenLinkPacket .class );
5246}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1111import com .noxcrew .noxesium .core .network .clientbound .ClientboundCustomSoundStartPacket ;
1212import com .noxcrew .noxesium .core .network .clientbound .ClientboundCustomSoundStopPacket ;
1313import com .noxcrew .noxesium .core .network .clientbound .ClientboundOpenLinkPacket ;
14- import com .noxcrew .noxesium .core .network .clientbound .ClientboundOpenLinkV2Packet ;
1514import com .noxcrew .noxesium .core .network .clientbound .ClientboundUpdateEntityComponentsPacket ;
1615import com .noxcrew .noxesium .core .network .clientbound .ClientboundUpdateGameComponentsPacket ;
1716import com .noxcrew .noxesium .core .network .serverbound .ServerboundClientSettingsPacket ;
@@ -131,15 +130,5 @@ public static void register() {
131130 ByteBufCodecs .STRING_UTF8 ,
132131 ClientboundOpenLinkPacket ::url ,
133132 ClientboundOpenLinkPacket ::new ));
134- registerSerializer (
135- ClientboundOpenLinkV2Packet .class ,
136- StreamCodec .composite (
137- ByteBufCodecs .optional (NoxesiumPlatform .getInstance ().getComponentStreamCodec ()),
138- ClientboundOpenLinkV2Packet ::text ,
139- ByteBufCodecs .STRING_UTF8 ,
140- ClientboundOpenLinkV2Packet ::url ,
141- ByteBufCodecs .STRING_UTF8 ,
142- ClientboundOpenLinkV2Packet ::test ,
143- ClientboundOpenLinkV2Packet ::new ));
144133 }
145134}
You can’t perform that action at this time.
0 commit comments