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

Rename Snapshot to 1.11

Dieser Commit ist enthalten in:
Matsv 2016-10-04 20:04:49 +02:00
Ursprung 8ae2842e5f
Commit f100f6e3f0
7 geänderte Dateien mit 17 neuen und 17 gelöschten Zeilen

Datei anzeigen

@ -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());
}

Datei anzeigen

@ -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"));
}

Datei anzeigen

@ -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;

Datei anzeigen

@ -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();
}

Datei anzeigen

@ -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<Float, Short> toOldByte = new ValueTransformer<Float, Short>(Type.UNSIGNED_BYTE) {
@Override
public Short transform(PacketWrapper wrapper, Float inputValue) throws Exception {

Datei anzeigen

@ -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
*/

Datei anzeigen

@ -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;