Apply autofixes

This commit is contained in:
zontreck 2024-05-06 13:45:52 -07:00
parent 5357da3746
commit dd6ee1bf60
15 changed files with 36 additions and 30 deletions

View file

@ -15,8 +15,9 @@ class NbtUtils {
static bool readBoolean(CompoundTag tag, String name) {
if (tag.contains(name)) {
return tag.get(name)!.asByte() == 1 ? true : false;
} else
} else {
return false;
}
}
static void writeVector2d(CompoundTag tag, String name, Vector2d pos) {
@ -30,8 +31,9 @@ class NbtUtils {
if (tag.contains(name)) {
ListTag lst = tag.get(name)! as ListTag;
return Vector2d(X: lst.get(0).asDouble(), Z: lst.get(1).asDouble());
} else
} else {
return Vector2d.ZERO;
}
}
static void writeVector2i(CompoundTag tag, String name, Vector2i pos) {
@ -45,8 +47,9 @@ class NbtUtils {
if (tag.contains(name)) {
ListTag lst = tag.get(name)! as ListTag;
return Vector2i(X: lst.get(0).asInt(), Z: lst.get(1).asInt());
} else
} else {
return Vector2i.ZERO;
}
}
static void writeVector3d(CompoundTag tag, String name, Vector3d pos) {
@ -64,8 +67,9 @@ class NbtUtils {
X: lst.get(0).asDouble(),
Y: lst.get(1).asDouble(),
Z: lst.get(2).asDouble());
} else
} else {
return Vector3d.ZERO;
}
}
static void writeVector3i(CompoundTag tag, String name, Vector3i pos) {
@ -81,7 +85,8 @@ class NbtUtils {
ListTag lst = tag.get(name)! as ListTag;
return Vector3i(
X: lst.get(0).asInt(), Y: lst.get(1).asInt(), Z: lst.get(2).asInt());
} else
} else {
return Vector3i.ZERO;
}
}
}