From 31eae073f52aeaaab4f8b80ef83802b43402760f Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:47:10 +0100 Subject: [PATCH] Updated Via API usage --- build.gradle | 2 +- .../release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index ead20e0..0946ec6 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ repositories { } dependencies { - compileOnly "com.viaversion:viaversion-common:5.1.1" + compileOnly "com.viaversion:viaversion-common:5.1.2-SNAPSHOT" compileOnly "com.google.guava:guava:33.3.1-jre" compileOnly "io.netty:netty-handler:4.1.114.Final" } diff --git a/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java b/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java index 2225ea7..16c4694 100644 --- a/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java +++ b/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java @@ -1409,7 +1409,7 @@ public class Protocolr1_7_6_10Tor1_8 extends AbstractProtocol { final String content = wrapper.read(Types.STRING); // client brand or item name - wrapper.write(Types.REMAINING_BYTES, content.getBytes(StandardCharsets.UTF_8)); // client brand or item name + wrapper.write(Types.SERVERBOUND_CUSTOM_PAYLOAD_DATA, content.getBytes(StandardCharsets.UTF_8)); // client brand or item name } case "MC|AdvCdm" -> { final byte type = wrapper.passthrough(Types.BYTE); // command block type (0 = Block, 1 = Minecart) @@ -1430,7 +1430,7 @@ public class Protocolr1_7_6_10Tor1_8 extends AbstractProtocol { - byte[] channels = wrapper.read(Types.REMAINING_BYTES); + byte[] channels = wrapper.read(Types.SERVERBOUND_CUSTOM_PAYLOAD_DATA); if (ViaLegacy.getConfig().isIgnoreLong1_8ChannelNames()) { final String[] registeredChannels = new String(channels, StandardCharsets.UTF_8).split("\0"); @@ -1451,7 +1451,7 @@ public class Protocolr1_7_6_10Tor1_8 extends AbstractProtocol