make vec2 safer too
This commit is contained in:
parent
a214c49c1c
commit
f4ea6cfedb
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ object HexUtils {
|
|||
LongArrayTag(longArrayOf(this.x.toDouble().toRawBits(), this.y.toDouble().toRawBits()))
|
||||
|
||||
@JvmStatic
|
||||
fun DeserializeVec2FromNBT(tag: LongArray): Vec2 =
|
||||
fun DeserializeVec2FromNBT(tag: LongArray): Vec2 = if (tag.size != 2) Vec2.ZERO else
|
||||
Vec2(
|
||||
Double.fromBits(tag[0]).toFloat(),
|
||||
Double.fromBits(tag[1]).toFloat(),
|
||||
|
|
Loading…
Reference in a new issue