Skip to content

Commit 1921c78

Browse files
committed
Remove test packet
1 parent 1c1a7a5 commit 1921c78

File tree

4 files changed

+4
-32
lines changed

4 files changed

+4
-32
lines changed

api/src/main/java/com/noxcrew/noxesium/api/player/NoxesiumServerPlayer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import com.noxcrew.noxesium.api.registry.NoxesiumRegistries;
1717
import com.noxcrew.noxesium.api.registry.NoxesiumRegistry;
1818
import 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;
2020
import com.noxcrew.noxesium.core.network.clientbound.ClientboundUpdateGameComponentsPacket;
2121
import java.util.ArrayList;
2222
import 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
/**

api/src/main/java/com/noxcrew/noxesium/core/network/CommonPackets.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.noxcrew.noxesium.core.network.clientbound.ClientboundCustomSoundStartPacket;
1010
import com.noxcrew.noxesium.core.network.clientbound.ClientboundCustomSoundStopPacket;
1111
import com.noxcrew.noxesium.core.network.clientbound.ClientboundOpenLinkPacket;
12-
import com.noxcrew.noxesium.core.network.clientbound.ClientboundOpenLinkV2Packet;
1312
import com.noxcrew.noxesium.core.network.clientbound.ClientboundUpdateEntityComponentsPacket;
1413
import com.noxcrew.noxesium.core.network.clientbound.ClientboundUpdateGameComponentsPacket;
1514
import 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
}

api/src/main/java/com/noxcrew/noxesium/core/network/clientbound/ClientboundOpenLinkV2Packet.java

Lines changed: 0 additions & 11 deletions
This file was deleted.

nms/src/main/java/com/noxcrew/noxesium/core/nms/serialization/CommonPacketSerializers.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import com.noxcrew.noxesium.core.network.clientbound.ClientboundCustomSoundStartPacket;
1212
import com.noxcrew.noxesium.core.network.clientbound.ClientboundCustomSoundStopPacket;
1313
import com.noxcrew.noxesium.core.network.clientbound.ClientboundOpenLinkPacket;
14-
import com.noxcrew.noxesium.core.network.clientbound.ClientboundOpenLinkV2Packet;
1514
import com.noxcrew.noxesium.core.network.clientbound.ClientboundUpdateEntityComponentsPacket;
1615
import com.noxcrew.noxesium.core.network.clientbound.ClientboundUpdateGameComponentsPacket;
1716
import 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
}

0 commit comments

Comments
 (0)