Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-24 23:30:17 +01:00
Update VV usage
Dieser Commit ist enthalten in:
Ursprung
4cc3ea0883
Commit
08f6c0b1f1
@ -5,7 +5,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "com.viaversion"
|
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."
|
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.packet.State;
|
||||||
import com.viaversion.viaversion.api.protocol.remapper.PacketHandler;
|
import com.viaversion.viaversion.api.protocol.remapper.PacketHandler;
|
||||||
import com.viaversion.viaversion.api.protocol.remapper.PacketRemapper;
|
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.api.type.Type;
|
||||||
import com.viaversion.viaversion.libs.gson.JsonElement;
|
import com.viaversion.viaversion.libs.gson.JsonElement;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_12_1to1_12.ClientboundPackets1_12_1;
|
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
|
@Override
|
||||||
public void handle(PacketWrapper packetWrapper) throws Exception {
|
public void handle(PacketWrapper packetWrapper) throws Exception {
|
||||||
packetWrapper.cancel();
|
packetWrapper.cancel();
|
||||||
packetWrapper.create(0x02, new ValueCreator() { // Plugin response
|
packetWrapper.create(0x02, new PacketHandler() { // Plugin response
|
||||||
@Override
|
@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.VAR_INT, packetWrapper.read(Type.VAR_INT)); // Packet id
|
||||||
newWrapper.write(Type.BOOLEAN, false); // Success
|
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); // 9 - Velocity X
|
||||||
map(Type.SHORT); // 10 - Velocity Y
|
map(Type.SHORT); // 10 - Velocity Y
|
||||||
map(Type.SHORT); // 11 - Velocity Z
|
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 -> {
|
handler(wrapper -> {
|
||||||
int type = wrapper.get(Type.VAR_INT, 1);
|
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.DOUBLE); // 4 - Z
|
||||||
map(Type.BYTE); // 5 - Yaw
|
map(Type.BYTE); // 5 - Yaw
|
||||||
map(Type.BYTE); // 6 - Pitch
|
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));
|
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() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT); // Map ID
|
map(Type.VAR_INT); // Map ID
|
||||||
map(Type.BYTE); // Scale
|
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
|
map(Type.BOOLEAN); // Locked
|
||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
boolean hasMarkers = wrapper.read(Type.BOOLEAN);
|
boolean hasMarkers = wrapper.read(Type.BOOLEAN);
|
||||||
|
@ -3,7 +3,7 @@ metadata.format.version = "1.0"
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
# ViaVersion
|
# ViaVersion
|
||||||
viaver = "4.0.0-1.17-pre2-SNAPSHOT"
|
viaver = "4.0.0-1.17-pre4-SNAPSHOT"
|
||||||
|
|
||||||
# Common provided
|
# Common provided
|
||||||
netty = "4.0.20.Final"
|
netty = "4.0.20.Final"
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren