From f100f6e3f04c58a6d4ab821babe739f174b29a98 Mon Sep 17 00:00:00 2001 From: Matsv Date: Tue, 4 Oct 2016 20:04:49 +0200 Subject: [PATCH] Rename Snapshot to 1.11 --- .../myles/ViaVersion/api/protocol/ProtocolRegistry.java | 4 ++-- .../us/myles/ViaVersion/api/protocol/ProtocolVersion.java | 4 ++-- .../ItemRewriter.java | 2 +- .../MetadataRewriter.java | 6 +++--- .../Protocol1_11To1_10.java} | 8 ++++---- .../packets/InventoryPackets.java | 8 ++++---- .../storage/EntityTracker.java | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) rename common/src/main/java/us/myles/ViaVersion/protocols/{protocolsnapshotto1_10 => protocol1_11to1_10}/ItemRewriter.java (96%) rename common/src/main/java/us/myles/ViaVersion/protocols/{protocolsnapshotto1_10 => protocol1_11to1_10}/MetadataRewriter.java (97%) rename common/src/main/java/us/myles/ViaVersion/protocols/{protocolsnapshotto1_10/ProtocolSnapshotTo1_10.java => protocol1_11to1_10/Protocol1_11To1_10.java} (97%) rename common/src/main/java/us/myles/ViaVersion/protocols/{protocolsnapshotto1_10 => protocol1_11to1_10}/packets/InventoryPackets.java (95%) rename common/src/main/java/us/myles/ViaVersion/protocols/{protocolsnapshotto1_10 => protocol1_11to1_10}/storage/EntityTracker.java (95%) diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java index 51f32af25..91b4050ca 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java +++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java @@ -6,12 +6,12 @@ import us.myles.ViaVersion.api.Pair; import us.myles.ViaVersion.api.Via; 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_11to1_10.Protocol1_11To1_10; 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_10.ProtocolSnapshotTo1_10; import java.util.*; import java.util.concurrent.ConcurrentHashMap; @@ -37,7 +37,7 @@ public class ProtocolRegistry { registerProtocol(new Protocol1_9_1_2TO1_9_3_4(), Arrays.asList(ProtocolVersion.v1_9_1.getId(), ProtocolVersion.v1_9_2.getId()), ProtocolVersion.v1_9_3.getId()); registerProtocol(new Protocol1_10To1_9_3_4(), Collections.singletonList(ProtocolVersion.v1_10.getId()), ProtocolVersion.v1_9_3.getId()); - registerProtocol(new ProtocolSnapshotTo1_10(), Collections.singletonList(ProtocolVersion.vSNAPSHOT.getId()), ProtocolVersion.v1_10.getId()); + registerProtocol(new Protocol1_11To1_10(), Collections.singletonList(ProtocolVersion.v1_11.getId()), ProtocolVersion.v1_10.getId()); } diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java index 735b5814f..01572c45d 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java +++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java @@ -27,7 +27,7 @@ public class ProtocolVersion { public static final ProtocolVersion v1_9_2; public static final ProtocolVersion v1_9_3; public static final ProtocolVersion v1_10; - public static final ProtocolVersion vSNAPSHOT; + public static final ProtocolVersion v1_11; public static final ProtocolVersion unknown; private final int id; @@ -52,7 +52,7 @@ public class ProtocolVersion { register(v1_9_3 = new ProtocolVersion(110, "1.9.3/4")); register(v1_10 = new ProtocolVersion(210, "1.10")); // Snapshot uses colon as dashes are used other places... - register(vSNAPSHOT = new ProtocolVersion(309, "1.11:SNAPSHOT")); + register(v1_11 = new ProtocolVersion(309, "1.11:SNAPSHOT")); // TODO change to the full version register(unknown = new ProtocolVersion(-1, "UNKNOWN")); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/ItemRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java similarity index 96% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/ItemRewriter.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java index ada23508d..5020ad5f6 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/ItemRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java @@ -1,4 +1,4 @@ -package us.myles.ViaVersion.protocols.protocolsnapshotto1_10; +package us.myles.ViaVersion.protocols.protocol1_11to1_10; import org.spacehq.opennbt.tag.builtin.CompoundTag; import org.spacehq.opennbt.tag.builtin.StringTag; diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/MetadataRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/MetadataRewriter.java similarity index 97% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/MetadataRewriter.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/MetadataRewriter.java index e4aa98f6f..76ab9bfb2 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/MetadataRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/MetadataRewriter.java @@ -1,4 +1,4 @@ -package us.myles.ViaVersion.protocols.protocolsnapshotto1_10; +package us.myles.ViaVersion.protocols.protocol1_11to1_10; import com.google.common.base.Optional; import us.myles.ViaVersion.api.PacketWrapper; @@ -8,7 +8,7 @@ import us.myles.ViaVersion.api.entities.Entity1_11Types.EntityType; import us.myles.ViaVersion.api.minecraft.metadata.Metadata; import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_9; import us.myles.ViaVersion.api.type.Type; -import us.myles.ViaVersion.protocols.protocolsnapshotto1_10.storage.EntityTracker; +import us.myles.ViaVersion.protocols.protocol1_11to1_10.storage.EntityTracker; import java.util.ArrayList; import java.util.List; @@ -184,7 +184,7 @@ public class MetadataRewriter { wrapper.write(Type.SHORT, (short) 0); wrapper.write(Type.BOOLEAN, true); - wrapper.send(ProtocolSnapshotTo1_10.class); + wrapper.send(Protocol1_11To1_10.class); } catch (Exception e) { e.printStackTrace(); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/ProtocolSnapshotTo1_10.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java similarity index 97% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/ProtocolSnapshotTo1_10.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java index 4ee87a699..cd506f380 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/ProtocolSnapshotTo1_10.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java @@ -1,4 +1,4 @@ -package us.myles.ViaVersion.protocols.protocolsnapshotto1_10; +package us.myles.ViaVersion.protocols.protocol1_11to1_10; import com.google.common.base.Optional; import us.myles.ViaVersion.api.PacketWrapper; @@ -13,10 +13,10 @@ import us.myles.ViaVersion.api.remapper.ValueTransformer; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.api.type.types.version.Types1_9; import us.myles.ViaVersion.packets.State; -import us.myles.ViaVersion.protocols.protocolsnapshotto1_10.packets.InventoryPackets; -import us.myles.ViaVersion.protocols.protocolsnapshotto1_10.storage.EntityTracker; +import us.myles.ViaVersion.protocols.protocol1_11to1_10.packets.InventoryPackets; +import us.myles.ViaVersion.protocols.protocol1_11to1_10.storage.EntityTracker; -public class ProtocolSnapshotTo1_10 extends Protocol { +public class Protocol1_11To1_10 extends Protocol { private static final ValueTransformer toOldByte = new ValueTransformer(Type.UNSIGNED_BYTE) { @Override public Short transform(PacketWrapper wrapper, Float inputValue) throws Exception { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/packets/InventoryPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/packets/InventoryPackets.java similarity index 95% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/packets/InventoryPackets.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/packets/InventoryPackets.java index 0750942de..d8dfab8e0 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/packets/InventoryPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/packets/InventoryPackets.java @@ -1,4 +1,4 @@ -package us.myles.ViaVersion.protocols.protocolsnapshotto1_10.packets; +package us.myles.ViaVersion.protocols.protocol1_11to1_10.packets; import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.minecraft.item.Item; @@ -6,11 +6,11 @@ import us.myles.ViaVersion.api.remapper.PacketHandler; import us.myles.ViaVersion.api.remapper.PacketRemapper; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.packets.State; -import us.myles.ViaVersion.protocols.protocolsnapshotto1_10.ItemRewriter; -import us.myles.ViaVersion.protocols.protocolsnapshotto1_10.ProtocolSnapshotTo1_10; +import us.myles.ViaVersion.protocols.protocol1_11to1_10.ItemRewriter; +import us.myles.ViaVersion.protocols.protocol1_11to1_10.Protocol1_11To1_10; public class InventoryPackets { - public static void register(ProtocolSnapshotTo1_10 protocol) { + public static void register(Protocol1_11To1_10 protocol) { /* Incoming packets */ diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/storage/EntityTracker.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/storage/EntityTracker.java similarity index 95% rename from common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/storage/EntityTracker.java rename to common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/storage/EntityTracker.java index f01bc9c68..328be0ec6 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_10/storage/EntityTracker.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/storage/EntityTracker.java @@ -1,4 +1,4 @@ -package us.myles.ViaVersion.protocols.protocolsnapshotto1_10.storage; +package us.myles.ViaVersion.protocols.protocol1_11to1_10.storage; import com.google.common.base.Optional; import com.google.common.collect.Sets;