mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 18:15:39 +01:00
Refactor Snapshot to 1.12 as preparation for tomorrows release
This commit is contained in:
parent
7d5191fa2f
commit
914888dade
@ -8,12 +8,12 @@ import us.myles.ViaVersion.protocols.base.BaseProtocol;
|
||||
import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.Protocol1_10To1_9_3_4;
|
||||
import us.myles.ViaVersion.protocols.protocol1_11_1to1_11.Protocol1_11_1To1_11;
|
||||
import us.myles.ViaVersion.protocols.protocol1_11to1_10.Protocol1_11To1_10;
|
||||
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.Protocol1_12To1_11_1;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.Protocol1_9_1_2TO1_9_3_4;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_1to1_9.Protocol1_9_1TO1_9;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.Protocol1_9_3TO1_9_1_2;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9to1_9_1.Protocol1_9TO1_9_1;
|
||||
import us.myles.ViaVersion.protocols.protocolsnapshotto1_11_1.ProtocolSnapshotTo1_11_1;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@ -43,7 +43,7 @@ public class ProtocolRegistry {
|
||||
registerProtocol(new Protocol1_11_1To1_11(), Collections.singletonList(ProtocolVersion.v1_11_1.getId()), ProtocolVersion.v1_11.getId());
|
||||
|
||||
// Snapshot
|
||||
registerProtocol(new ProtocolSnapshotTo1_11_1(), Collections.singletonList(ProtocolVersion.snapshot.getId()), ProtocolVersion.v1_11_1.getId());
|
||||
registerProtocol(new Protocol1_12To1_11_1(), Collections.singletonList(ProtocolVersion.v1_12.getId()), ProtocolVersion.v1_11_1.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@ public class ProtocolVersion {
|
||||
public static final ProtocolVersion v1_10;
|
||||
public static final ProtocolVersion v1_11;
|
||||
public static final ProtocolVersion v1_11_1;
|
||||
public static final ProtocolVersion snapshot;
|
||||
public static final ProtocolVersion v1_12;
|
||||
public static final ProtocolVersion unknown;
|
||||
|
||||
private final int id;
|
||||
@ -55,7 +55,7 @@ public class ProtocolVersion {
|
||||
register(v1_10 = new ProtocolVersion(210, "1.10"));
|
||||
register(v1_11 = new ProtocolVersion(315, "1.11"));
|
||||
register(v1_11_1 = new ProtocolVersion(316, "1.11.1"));
|
||||
register(snapshot = new ProtocolVersion(334, "1.12-pre7"));
|
||||
register(v1_12 = new ProtocolVersion(334, "1.12-pre7"));
|
||||
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package us.myles.ViaVersion.protocols.protocolsnapshotto1_11_1;
|
||||
package us.myles.ViaVersion.protocols.protocol1_12to1_11_1;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.IntTag;
|
||||
@ -15,13 +15,12 @@ import us.myles.ViaVersion.packets.State;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.types.Chunk1_9_3_4Type;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||
|
||||
public class ProtocolSnapshotTo1_11_1 extends Protocol {
|
||||
public class Protocol1_12To1_11_1 extends Protocol {
|
||||
|
||||
@Override
|
||||
protected void registerPackets() {
|
||||
// As of 1.12-pre5
|
||||
|
||||
// Outgoing
|
||||
|
||||
// Chunk Data
|
||||
registerOutgoing(State.PLAY, 0x20, 0x20, new PacketRemapper() {
|
||||
@Override
|
Loading…
Reference in New Issue
Block a user