Fix stateByID fix for 1.11.2 amd 1.12.2
This commit is contained in:
parent
396acc6ae8
commit
693db1e19c
2 changed files with 2 additions and 2 deletions
|
|
@ -177,7 +177,7 @@ public class DynmapPlugin
|
||||||
int i = Block.getIdFromBlock(b);
|
int i = Block.getIdFromBlock(b);
|
||||||
if (i >= (stateByID.length >> 4)) {
|
if (i >= (stateByID.length >> 4)) {
|
||||||
int plen = stateByID.length;
|
int plen = stateByID.length;
|
||||||
stateByID = Arrays.copyOf(stateByID, i*11/10); // grow array by 10%
|
stateByID = Arrays.copyOf(stateByID, (i*11/10) << 4); // grow array by 10%
|
||||||
Arrays.fill(stateByID, plen, stateByID.length, DynmapBlockState.AIR);
|
Arrays.fill(stateByID, plen, stateByID.length, DynmapBlockState.AIR);
|
||||||
}
|
}
|
||||||
ResourceLocation ui = null;
|
ResourceLocation ui = null;
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ public class DynmapPlugin
|
||||||
int i = Block.getIdFromBlock(b);
|
int i = Block.getIdFromBlock(b);
|
||||||
if (i >= (stateByID.length >> 4)) {
|
if (i >= (stateByID.length >> 4)) {
|
||||||
int plen = stateByID.length;
|
int plen = stateByID.length;
|
||||||
stateByID = Arrays.copyOf(stateByID, i*11/10); // grow array by 10%
|
stateByID = Arrays.copyOf(stateByID, (i*11/10) << 4); // grow array by 10%
|
||||||
Arrays.fill(stateByID, plen, stateByID.length, DynmapBlockState.AIR);
|
Arrays.fill(stateByID, plen, stateByID.length, DynmapBlockState.AIR);
|
||||||
}
|
}
|
||||||
ResourceLocation ui = null;
|
ResourceLocation ui = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue