Updated Via* (23w40a server support)

This commit is contained in:
RaphiMC 2023-10-07 21:26:08 +02:00
parent cf813304ab
commit 8dda29a6f4
No known key found for this signature in database
GPG key ID: 0F6BB0657A03AC94
3 changed files with 8 additions and 13 deletions

View file

@ -65,21 +65,21 @@ repositories {
} }
dependencies { dependencies {
include "com.viaversion:viaversion:4.8.1" include "com.viaversion:viaversion:4.9.0-23w40a-SNAPSHOT"
include("com.viaversion:viabackwards-common:4.8.1") { include("com.viaversion:viabackwards-common:4.9.0-23w40a-SNAPSHOT") {
exclude group: "com.viaversion", module: "viaversion" exclude group: "com.viaversion", module: "viaversion"
exclude group: "io.netty", module: "netty-all" exclude group: "io.netty", module: "netty-all"
exclude group: "com.google.guava", module: "guava" exclude group: "com.google.guava", module: "guava"
} }
include "com.viaversion:viarewind-common:3.0.0" include "com.viaversion:viarewind-common:3.0.0"
include "net.raphimc:ViaLegacy:2.2.20" include "net.raphimc:ViaLegacy:2.2.21-SNAPSHOT"
include "net.raphimc:ViaAprilFools:2.0.9" include "net.raphimc:ViaAprilFools:2.0.9"
include("net.raphimc:ViaBedrock:0.0.3-SNAPSHOT") { include("net.raphimc:ViaBedrock:0.0.3-SNAPSHOT") {
exclude group: "io.netty", module: "netty-codec-http" exclude group: "io.netty", module: "netty-codec-http"
exclude group: "io.jsonwebtoken", module: "jjwt-impl" exclude group: "io.jsonwebtoken", module: "jjwt-impl"
exclude group: "io.jsonwebtoken", module: "jjwt-gson" exclude group: "io.jsonwebtoken", module: "jjwt-gson"
} }
include("net.raphimc:ViaLoader:2.2.10") { include("net.raphimc:ViaLoader:2.2.11-SNAPSHOT") {
exclude group: "org.slf4j", module: "slf4j-api" exclude group: "org.slf4j", module: "slf4j-api"
} }

View file

@ -46,10 +46,10 @@ public class ClassicWorldHeightInjection {
if (wrapper.isCancelled()) return; if (wrapper.isCancelled()) return;
if (VersionEnum.fromUserConnection(wrapper.user()).isOlderThanOrEqualTo(VersionEnum.c0_28toc0_30)) { if (VersionEnum.fromUserConnection(wrapper.user()).isOlderThanOrEqualTo(VersionEnum.c0_28toc0_30)) {
for (Tag dimension : wrapper.get(Type.NBT, 0).<CompoundTag>get("minecraft:dimension_type").<ListTag>get("value")) { for (Tag dimension : wrapper.get(Type.NAMED_COMPOUND_TAG, 0).<CompoundTag>get("minecraft:dimension_type").<ListTag>get("value")) {
changeDimensionTagHeight(wrapper.user(), ((CompoundTag) dimension).get("element")); changeDimensionTagHeight(wrapper.user(), ((CompoundTag) dimension).get("element"));
} }
changeDimensionTagHeight(wrapper.user(), wrapper.get(Type.NBT, 1)); changeDimensionTagHeight(wrapper.user(), wrapper.get(Type.NAMED_COMPOUND_TAG, 1));
} }
}; };
} }
@ -60,7 +60,7 @@ public class ClassicWorldHeightInjection {
if (wrapper.isCancelled()) return; if (wrapper.isCancelled()) return;
if (VersionEnum.fromUserConnection(wrapper.user()).isOlderThanOrEqualTo(VersionEnum.c0_28toc0_30)) { if (VersionEnum.fromUserConnection(wrapper.user()).isOlderThanOrEqualTo(VersionEnum.c0_28toc0_30)) {
changeDimensionTagHeight(wrapper.user(), wrapper.get(Type.NBT, 0)); changeDimensionTagHeight(wrapper.user(), wrapper.get(Type.NAMED_COMPOUND_TAG, 0));
} }
}; };
} }

View file

@ -23,7 +23,6 @@ import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.BitSetType; import com.viaversion.viaversion.api.type.types.BitSetType;
import com.viaversion.viaversion.api.type.types.ByteArrayType;
import com.viaversion.viaversion.protocols.base.ClientboundLoginPackets; import com.viaversion.viaversion.protocols.base.ClientboundLoginPackets;
import com.viaversion.viaversion.protocols.base.ServerboundLoginPackets; import com.viaversion.viaversion.protocols.base.ServerboundLoginPackets;
import com.viaversion.viaversion.protocols.protocol1_19_1to1_19.ClientboundPackets1_19_1; import com.viaversion.viaversion.protocols.protocol1_19_1to1_19.ClientboundPackets1_19_1;
@ -49,10 +48,6 @@ import java.util.concurrent.ThreadLocalRandom;
@Mixin(value = Protocol1_19_3To1_19_1.class, remap = false) @Mixin(value = Protocol1_19_3To1_19_1.class, remap = false)
public abstract class MixinProtocol1_19_3To1_19_1 extends AbstractProtocol<ClientboundPackets1_19_1, ClientboundPackets1_19_3, ServerboundPackets1_19_1, ServerboundPackets1_19_3> { public abstract class MixinProtocol1_19_3To1_19_1 extends AbstractProtocol<ClientboundPackets1_19_1, ClientboundPackets1_19_3, ServerboundPackets1_19_1, ServerboundPackets1_19_3> {
@Final
@Shadow
private static ByteArrayType.OptionalByteArrayType OPTIONAL_MESSAGE_SIGNATURE_BYTES_TYPE;
@Final @Final
@Shadow @Shadow
private static BitSetType ACKNOWLEDGED_BIT_SET_TYPE; private static BitSetType ACKNOWLEDGED_BIT_SET_TYPE;
@ -114,7 +109,7 @@ public abstract class MixinProtocol1_19_3To1_19_1 extends AbstractProtocol<Clien
map(Type.STRING); // Message map(Type.STRING); // Message
map(Type.LONG); // Timestamp map(Type.LONG); // Timestamp
map(Type.LONG); // Salt map(Type.LONG); // Salt
read(OPTIONAL_MESSAGE_SIGNATURE_BYTES_TYPE); // Signature read(Type.OPTIONAL_SIGNATURE_BYTES); // Signature
handler(wrapper -> { handler(wrapper -> {
final ChatSession1_19_1 chatSession = wrapper.user().get(ChatSession1_19_1.class); final ChatSession1_19_1 chatSession = wrapper.user().get(ChatSession1_19_1.class);
final ReceivedMessagesStorage messagesStorage = wrapper.user().get(ReceivedMessagesStorage.class); final ReceivedMessagesStorage messagesStorage = wrapper.user().get(ReceivedMessagesStorage.class);