Finish ByteTag
This commit is contained in:
parent
9b33f69021
commit
a8d99586c9
1 changed files with 6 additions and 4 deletions
|
@ -2,18 +2,20 @@ import 'package:libac_flutter/nbt/Stream.dart';
|
|||
import 'package:libac_flutter/nbt/Tag.dart';
|
||||
|
||||
class ByteTag extends Tag {
|
||||
final int value;
|
||||
int _value = 0;
|
||||
|
||||
ByteTag({required this.value});
|
||||
ByteTag(int value) {
|
||||
_value = value;
|
||||
}
|
||||
|
||||
@override
|
||||
void readValue(ByteLayer data) {
|
||||
// TODO: implement readValue
|
||||
_value = data.readByte();
|
||||
}
|
||||
|
||||
@override
|
||||
void writeValue(ByteLayer data) {
|
||||
// TODO: implement writeValue
|
||||
data.writeByte(_value);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue