-
Bug
-
Resolution: Invalid
-
None
-
1.19.3
-
None
-
Plausible
-
(Unassigned)
Getting a long array from the `ListTag` does not work as intended. A LongArrayTag has the id 12. The method getLongArray checks if the id of the tag is 11, which will never happen. So the result will be a new empty long array, unless the tag actually has the id 11 (which will cause a cast exception).
Source in net.minecraft.nbt.ListTag:
public long[] getLongArray(int p_177992_) { if (p_177992_ >= 0 && p_177992_ < this.list.size()) { Tag tag = this.list.get(p_177992_); if (tag.getId() == 11) { return ((LongArrayTag)tag).getAsLongArray(); } } return new long[0]; }
I doubt this can be reproduced using the game itself. It should be an issue fix as well, just replace 11 with 12. Hope this is the right place to report an issue like this.