Class IdRanges
java.lang.Object
com.viaversion.viaversion.api.data.IdRanges
Reads sets of non-negative ints stored as ranges, packed into a byte array of varints.
Each range is stored as an offset and length pair. The offset is the start of the first range and the
difference to the previous range's exclusive end; the length is the inclusive end minus the start.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic it.unimi.dsi.fastutil.ints.IntSetdecode(com.viaversion.nbt.tag.ByteArrayTag rangesTag) Returns the encoded id set as an int set.static voidforEachId(com.viaversion.nbt.tag.ByteArrayTag rangesTag, IntConsumer consumer)
-
Constructor Details
-
IdRanges
public IdRanges()
-
-
Method Details
-
decode
public static it.unimi.dsi.fastutil.ints.IntSet decode(com.viaversion.nbt.tag.ByteArrayTag rangesTag) Returns the encoded id set as an int set.- Parameters:
rangesTag- tag with the encoded ranges- Returns:
- decoded ids
-
forEachId
-