From 7d5191fa2f5c6372a353c4aa6dd2b2248b23d0ac Mon Sep 17 00:00:00 2001 From: Matsv Date: Thu, 1 Jun 2017 16:00:35 +0200 Subject: [PATCH] Implement 1.12 MetaTypes --- .../metadata/types/MetaType1_12.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 common/src/main/java/us/myles/ViaVersion/api/minecraft/metadata/types/MetaType1_12.java diff --git a/common/src/main/java/us/myles/ViaVersion/api/minecraft/metadata/types/MetaType1_12.java b/common/src/main/java/us/myles/ViaVersion/api/minecraft/metadata/types/MetaType1_12.java new file mode 100644 index 000000000..9d480443e --- /dev/null +++ b/common/src/main/java/us/myles/ViaVersion/api/minecraft/metadata/types/MetaType1_12.java @@ -0,0 +1,34 @@ +package us.myles.ViaVersion.api.minecraft.metadata.types; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import us.myles.ViaVersion.api.minecraft.metadata.MetaType; +import us.myles.ViaVersion.api.type.Type; + +@RequiredArgsConstructor +@Getter +public enum MetaType1_12 implements MetaType { + Byte(0, Type.BYTE), + VarInt(1, Type.VAR_INT), + Float(2, Type.FLOAT), + String(3, Type.STRING), + Chat(4, Type.STRING), + Slot(5, Type.ITEM), + Boolean(6, Type.BOOLEAN), + Vector3F(7, Type.ROTATION), + Position(8, Type.POSITION), + OptPosition(9, Type.OPTIONAL_POSITION), + Direction(10, Type.VAR_INT), + OptUUID(11, Type.OPTIONAL_UUID), + BlockID(12, Type.VAR_INT), + NBTTag(13, Type.NBT), + Discontinued(99, null); + + private final int typeID; + private final Type type; + + public static MetaType1_12 byId(int id) { + return values()[id]; + } + +}