mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-22 16:57:40 +01:00
Update VV usage
This commit is contained in:
parent
4cc3ea0883
commit
08f6c0b1f1
@ -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."
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user