Fix stateByID fix for 1.11.2 amd 1.12.2

This commit is contained in:
Mike Primm 2021-03-14 18:09:51 -05:00
parent bf5aeb62a5
commit 1972c95246
2 changed files with 2 additions and 2 deletions

View file

@ -177,7 +177,7 @@ public class DynmapPlugin
int i = Block.getIdFromBlock(b);
if (i >= (stateByID.length >> 4)) {
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);
}
ResourceLocation ui = null;

View file

@ -178,7 +178,7 @@ public class DynmapPlugin
int i = Block.getIdFromBlock(b);
if (i >= (stateByID.length >> 4)) {
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);
}
ResourceLocation ui = null;