mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-06-26 14:45:02 +02:00
17 lines
332 B
Java
17 lines
332 B
Java
|
package us.myles.ViaVersion.chunks;
|
||
|
|
||
|
import java.util.BitSet;
|
||
|
|
||
|
public class MagicBitSet extends BitSet{
|
||
|
private final int initLength;
|
||
|
|
||
|
public MagicBitSet(int nbits) {
|
||
|
super(nbits);
|
||
|
this.initLength = nbits;
|
||
|
}
|
||
|
|
||
|
public int getTrueLength() {
|
||
|
return length() == 0 ? initLength : length();
|
||
|
}
|
||
|
}
|