3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-17 13:30:14 +01:00

Update VV usage

Dieser Commit ist enthalten in:
KennyTV 2021-06-02 22:05:05 +02:00
Ursprung 4cc3ea0883
Commit 08f6c0b1f1
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
5 geänderte Dateien mit 7 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,7 @@ plugins {
allprojects {
group = "com.viaversion"
version = "4.0.0-1.17-pre2-SNAPSHOT"
version = "4.0.0-1.17-pre4-SNAPSHOT"
description = "Allow older clients to join newer server versions."
}

Datei anzeigen

@ -30,7 +30,6 @@ import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandler;
import com.viaversion.viaversion.api.protocol.remapper.PacketRemapper;
import com.viaversion.viaversion.api.protocol.remapper.ValueCreator;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.libs.gson.JsonElement;
import com.viaversion.viaversion.protocols.protocol1_12_1to1_12.ClientboundPackets1_12_1;
@ -66,9 +65,9 @@ public class PlayerPacket1_13 extends RewriterBase<Protocol1_12_2To1_13> {
@Override
public void handle(PacketWrapper packetWrapper) throws Exception {
packetWrapper.cancel();
packetWrapper.create(0x02, new ValueCreator() { // Plugin response
packetWrapper.create(0x02, new PacketHandler() { // Plugin response
@Override
public void write(PacketWrapper newWrapper) throws Exception {
public void handle(PacketWrapper newWrapper) throws Exception {
newWrapper.write(Type.VAR_INT, packetWrapper.read(Type.VAR_INT)); // Packet id
newWrapper.write(Type.BOOLEAN, false); // Success
}

Datei anzeigen

@ -87,7 +87,7 @@ public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
map(Type.SHORT); // 9 - Velocity X
map(Type.SHORT); // 10 - Velocity Y
map(Type.SHORT); // 11 - Velocity Z
create(wrapper -> wrapper.write(Types1_14.METADATA_LIST, new ArrayList<>())); // Metadata is no longer sent in 1.15, so we have to send an empty one
handler(wrapper -> wrapper.write(Types1_14.METADATA_LIST, new ArrayList<>())); // Metadata is no longer sent in 1.15, so we have to send an empty one
handler(wrapper -> {
int type = wrapper.get(Type.VAR_INT, 1);
@ -140,7 +140,7 @@ public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
map(Type.DOUBLE); // 4 - Z
map(Type.BYTE); // 5 - Yaw
map(Type.BYTE); // 6 - Pitch
create(wrapper -> wrapper.write(Types1_14.METADATA_LIST, new ArrayList<>())); // Metadata is no longer sent in 1.15, so we have to send an empty one
handler(wrapper -> wrapper.write(Types1_14.METADATA_LIST, new ArrayList<>())); // Metadata is no longer sent in 1.15, so we have to send an empty one
handler(getTrackerHandler(Entity1_15Types.PLAYER, Type.VAR_INT));
}

Datei anzeigen

@ -302,7 +302,7 @@ public class BlockItemPackets1_17 extends com.viaversion.viabackwards.api.rewrit
public void registerMap() {
map(Type.VAR_INT); // Map ID
map(Type.BYTE); // Scale
create(wrapper -> wrapper.write(Type.BOOLEAN, true)); // Tracking position
handler(wrapper -> wrapper.write(Type.BOOLEAN, true)); // Tracking position
map(Type.BOOLEAN); // Locked
handler(wrapper -> {
boolean hasMarkers = wrapper.read(Type.BOOLEAN);

Datei anzeigen

@ -3,7 +3,7 @@ metadata.format.version = "1.0"
[versions]
# ViaVersion
viaver = "4.0.0-1.17-pre2-SNAPSHOT"
viaver = "4.0.0-1.17-pre4-SNAPSHOT"
# Common provided
netty = "4.0.20.Final"