LibAC-dart/lib/nbt/Tag.dart

35 lines
462 B
Dart

import 'Stream.dart';
enum TagType {
End(0),
Byte(1),
Short(2),
Int(3),
Long(4),
Float(5),
Double(6),
ByteArray(7),
String(8),
List(9),
Compound(10),
IntArray(11),
LongArray(12);
final int byte;
const TagType(this.byte);
}
abstract class Tag {
late TagType type;
int getType() {
return type.byte;
}
TagType getTagType() {
return type;
}
void writeValue(ByteLayer data);
void readValue(ByteLayer data);
}