mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
palette does not always start with zero...
This commit is contained in:
parent
a05abf0403
commit
3685d6b580
2 changed files with 2 additions and 3 deletions
|
@ -10,7 +10,7 @@ public class ListPalette implements Palette {
|
|||
private final int maxId;
|
||||
|
||||
private final int[] data;
|
||||
private int nextId = 1;
|
||||
private int nextId = 0;
|
||||
|
||||
public ListPalette(int bitsPerEntry) {
|
||||
this.maxId = (1 << bitsPerEntry) - 1;
|
||||
|
|
|
@ -13,13 +13,12 @@ public class MapPalette implements Palette {
|
|||
|
||||
private final int[] idToState;
|
||||
private final IntObjectMap<Integer> stateToId = new IntObjectHashMap<>();
|
||||
private int nextId = 1;
|
||||
private int nextId = 0;
|
||||
|
||||
public MapPalette(int bitsPerEntry) {
|
||||
this.maxId = (1 << bitsPerEntry) - 1;
|
||||
|
||||
this.idToState = new int[this.maxId + 1];
|
||||
this.stateToId.put(0, (Integer) 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue