Implement basic NBT PODO
This commit is contained in:
parent
80ab4ad0e5
commit
79c14b9097
17 changed files with 518 additions and 19 deletions
35
lib/nbt/Tag.dart
Normal file
35
lib/nbt/Tag.dart
Normal file
|
@ -0,0 +1,35 @@
|
|||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue