geforkt von Mirrors/FastAsyncWorldEdit
fix indexoutofbounds
Dieser Commit ist enthalten in:
Ursprung
1a64976195
Commit
c9c602470f
@ -37,6 +37,8 @@ public class BlockID {
|
|||||||
public static final int BARRIER = 24;
|
public static final int BARRIER = 24;
|
||||||
public static final int BEACON = 25;
|
public static final int BEACON = 25;
|
||||||
public static final int BEDROCK = 26;
|
public static final int BEDROCK = 26;
|
||||||
|
public static final int BEE_NEST= 677;
|
||||||
|
public static final int BEEHIVE = 678; // highest
|
||||||
public static final int BEETROOTS = 27;
|
public static final int BEETROOTS = 27;
|
||||||
public static final int BELL = 605;
|
public static final int BELL = 605;
|
||||||
public static final int BIRCH_BUTTON = 28;
|
public static final int BIRCH_BUTTON = 28;
|
||||||
|
@ -179,7 +179,7 @@ public class BlockTypesCache {
|
|||||||
Collection<String> blocks = blockReg.values();
|
Collection<String> blocks = blockReg.values();
|
||||||
Map<String, String> blockMap = blocks.stream().collect(Collectors.toMap(item -> item.charAt(item.length() - 1) == ']' ? item.substring(0, item.indexOf('[')) : item, item -> item));
|
Map<String, String> blockMap = blocks.stream().collect(Collectors.toMap(item -> item.charAt(item.length() - 1) == ']' ? item.substring(0, item.indexOf('[')) : item, item -> item));
|
||||||
|
|
||||||
int size = blockMap.size();
|
int size = blockMap.size() + 1;
|
||||||
Field[] idFields = BlockID.class.getDeclaredFields();
|
Field[] idFields = BlockID.class.getDeclaredFields();
|
||||||
for (Field field : idFields) size = Math.max(field.getInt(null) + 1, size);
|
for (Field field : idFields) size = Math.max(field.getInt(null) + 1, size);
|
||||||
BIT_OFFSET = MathMan.log2nlz(size);
|
BIT_OFFSET = MathMan.log2nlz(size);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren