You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NumberBinaryTag should have a simple way to get the java.lang.Number instance.
Why?
Having intValue(), floatValue() etc. is nice, however if you want to get the underlying number for further processing you would need to perform an instance of check on every single implementation to get the "real" number.
The text was updated successfully, but these errors were encountered:
Don't quite understand your approach, all implementations store their number as a primitive data type, which is why issuing a Number object would lead to unnecessary overhead.
In addition, the Number object only has the exact same methods, which is why there is no basic number there either.
What exactly are you trying to do, maybe there is another approach?
Don't quite understand your approach, all implementations store their number as a primitive data type, which is why issuing a Number object would lead to unnecessary overhead.
That doesn't need to be changed. The Number wrapper could be created on demand.
What exactly are you trying to do, maybe there is another approach?
I'm looking to get the raw value of the binary tag for use in a conversion system (between nbt and raw types). Using any of the implementations like intValue() etc. would cast the number. The only proper way to get the actual value is to cast to each implementation (IntBinaryTag, LongBinaryTag, etc.) and get the value from there.
It works, but it is annoying. That's why I suggested that
The NumberBinaryTag should have a simple way to get the java.lang.Number instance.
Why?
Having intValue(), floatValue() etc. is nice, however if you want to get the underlying number for further processing you would need to perform an instance of check on every single implementation to get the "real" number.
The text was updated successfully, but these errors were encountered: