diff --git a/src/main/java/dev/dewy/nbt/tags/primitive/NumericalTag.java b/src/main/java/dev/dewy/nbt/tags/primitive/NumericalTag.java new file mode 100644 index 0000000..8921b5d --- /dev/null +++ b/src/main/java/dev/dewy/nbt/tags/primitive/NumericalTag.java @@ -0,0 +1,32 @@ +package dev.dewy.nbt.tags.primitive; + +import dev.dewy.nbt.Tag; + +public abstract class NumericalTag extends Tag { + @Override + public abstract T getValue(); + + public byte byteValue() { + return this.getValue().byteValue(); + } + + public short shortValue() { + return this.getValue().shortValue(); + } + + public int intValue() { + return this.getValue().intValue(); + } + + public long longValue() { + return this.getValue().longValue(); + } + + public float floatValue() { + return this.getValue().floatValue(); + } + + public double doubleValue() { + return this.getValue().doubleValue(); + } +}