Implement EndTag

This commit is contained in:
zontreck 2024-05-04 21:29:04 -07:00
parent 0bf1e2b2d9
commit 61aebb03ad
2 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,7 @@
import 'package:libac_flutter/nbt/impl/ByteArrayTag.dart';
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
import 'package:libac_flutter/nbt/impl/DoubleTag.dart';
import 'package:libac_flutter/nbt/impl/TagEnd.dart';
import 'package:libac_flutter/nbt/impl/EndTag.dart';
import 'package:libac_flutter/nbt/impl/TagFloat.dart';
import 'package:libac_flutter/nbt/impl/TagInt.dart';
import 'package:libac_flutter/nbt/impl/TagLong.dart';
@ -56,7 +56,7 @@ abstract class Tag {
static Tag readNamedTag(ByteLayer data) {
var type = data.readByte();
if (type == 0) {
return new TagEnd();
return new EndTag();
} else {
Tag tag = makeTagOfType(TagType.get(type));
tag._key = data.readString();
@ -94,7 +94,7 @@ abstract class Tag {
return new DoubleTag();
}
case TagType.End:
return new TagEnd();
return new EndTag();
case TagType.Short:
return new TagShort(value: 0);
case TagType.Int:

View file

@ -1,8 +1,8 @@
import 'package:libac_flutter/nbt/Stream.dart';
import 'package:libac_flutter/nbt/Tag.dart';
class TagEnd extends Tag {
TagEnd();
class EndTag extends Tag {
EndTag();
@override
void readValue(ByteLayer data) {}