cache the correct number of blocks for FAWE

fixes #747
This commit is contained in:
dordsor21 2020-12-17 22:06:32 +00:00
parent e8f0c0e6ea
commit e08fda0ac2
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
4 changed files with 4 additions and 4 deletions

View File

@ -124,7 +124,7 @@ public final class FAWE_Spigot_v1_15_R2 extends CachedBukkitAdapter implements I
if (ibdToStateOrdinal != null && ibdToStateOrdinal[1] != 0) {
return false;
}
ibdToStateOrdinal = new char[Block.REGISTRY_ID.a()]; // size
ibdToStateOrdinal = new char[BlockTypesCache.states.length]; // size
for (int i = 0; i < ibdToStateOrdinal.length; i++) {
BlockState state = BlockTypesCache.states[i];
BlockMaterial_1_15_2 material = (BlockMaterial_1_15_2) state.getMaterial();

View File

@ -123,7 +123,7 @@ public final class FAWE_Spigot_v1_16_R1 extends CachedBukkitAdapter implements I
if (ibdToStateOrdinal != null && ibdToStateOrdinal[1] != 0) {
return false;
}
ibdToStateOrdinal = new char[Block.REGISTRY_ID.a()]; // size
ibdToStateOrdinal = new char[BlockTypesCache.states.length]; // size
for (int i = 0; i < ibdToStateOrdinal.length; i++) {
BlockState state = BlockTypesCache.states[i];
BlockMaterial_1_16_1 material = (BlockMaterial_1_16_1) state.getMaterial();

View File

@ -124,7 +124,7 @@ public final class FAWE_Spigot_v1_16_R2 extends CachedBukkitAdapter implements I
if (ibdToStateOrdinal != null && ibdToStateOrdinal[1] != 0) {
return false;
}
ibdToStateOrdinal = new char[Block.REGISTRY_ID.a()]; // size
ibdToStateOrdinal = new char[BlockTypesCache.states.length]; // size
for (int i = 0; i < ibdToStateOrdinal.length; i++) {
BlockState state = BlockTypesCache.states[i];
BlockMaterial_1_16_2 material = (BlockMaterial_1_16_2) state.getMaterial();

View File

@ -125,7 +125,7 @@ public final class FAWE_Spigot_v1_16_R3 extends CachedBukkitAdapter implements I
if (ibdToStateOrdinal != null && ibdToStateOrdinal[1] != 0) {
return false;
}
ibdToStateOrdinal = new char[Block.REGISTRY_ID.a()]; // size
ibdToStateOrdinal = new char[BlockTypesCache.states.length]; // size
for (int i = 0; i < ibdToStateOrdinal.length; i++) {
BlockState state = BlockTypesCache.states[i];
BlockMaterial_1_16_4 material = (BlockMaterial_1_16_4) state.getMaterial();