mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 10:05:12 +01:00
Remove MetaType1_8#NonExistent (#3774)
This commit is contained in:
parent
5569caf610
commit
617ef10667
@ -24,7 +24,6 @@ package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.VoidType;
|
||||
|
||||
public enum MetaType1_8 implements MetaType {
|
||||
Byte(0, Type.BYTE),
|
||||
@ -34,9 +33,7 @@ public enum MetaType1_8 implements MetaType {
|
||||
String(4, Type.STRING),
|
||||
Slot(5, Type.ITEM1_8),
|
||||
Position(6, Type.VECTOR),
|
||||
Rotation(7, Type.ROTATION),
|
||||
@Deprecated
|
||||
NonExistent(-1, new VoidType());
|
||||
Rotation(7, Type.ROTATION);
|
||||
|
||||
private final int typeID;
|
||||
private final Type type;
|
||||
|
@ -57,7 +57,7 @@ public enum MetaIndex {
|
||||
PLAYER_HUMAN_BYTE(ENTITY_HUMAN, 16, MetaType1_8.Byte, null), // unused on 1.8
|
||||
PLAYER_ADDITIONAL_HEARTS(ENTITY_HUMAN, 17, MetaType1_8.Float, 10, MetaType1_9.Float),
|
||||
PLAYER_SCORE(ENTITY_HUMAN, 18, MetaType1_8.Int, 11, MetaType1_9.VarInt),
|
||||
PLAYER_HAND(ENTITY_HUMAN, -1, MetaType1_8.NonExistent, 5, MetaType1_9.Byte), // new in 1.9
|
||||
PLAYER_HAND(ENTITY_HUMAN, 5, MetaType1_9.Byte), // new in 1.9
|
||||
// horse
|
||||
HORSE_INFO(HORSE, 16, MetaType1_8.Int, 12, MetaType1_9.Byte),
|
||||
HORSE_TYPE(HORSE, 19, MetaType1_8.Byte, 13, MetaType1_9.VarInt),
|
||||
@ -150,7 +150,7 @@ public enum MetaIndex {
|
||||
// ender crystal
|
||||
ENDERCRYSTAL_HEALTH(ENDER_CRYSTAL, 8, MetaType1_8.Int, null),
|
||||
// ender dragon
|
||||
ENDERDRAGON_PHASE(ENDER_DRAGON, -1, MetaType1_8.NonExistent, 11, MetaType1_9.VarInt);
|
||||
ENDERDRAGON_PHASE(ENDER_DRAGON, 11, MetaType1_9.VarInt);
|
||||
|
||||
private static final HashMap<Pair<EntityTypes1_10.EntityType, Integer>, MetaIndex> metadataRewrites = new HashMap<>();
|
||||
|
||||
@ -173,6 +173,14 @@ public enum MetaIndex {
|
||||
this.newType = newType;
|
||||
}
|
||||
|
||||
MetaIndex(EntityTypes1_10.EntityType type, int newIndex, @Nullable MetaType1_9 newType) {
|
||||
this.clazz = type;
|
||||
this.index = -1;
|
||||
this.oldType = null;
|
||||
this.newIndex = newIndex;
|
||||
this.newType = newType;
|
||||
}
|
||||
|
||||
MetaIndex(EntityTypes1_10.EntityType type, int index, MetaType1_8 oldType, int newIndex, @Nullable MetaType1_9 newType) {
|
||||
this.clazz = type;
|
||||
this.index = index;
|
||||
|
Loading…
Reference in New Issue
Block a user