cache the correct number of blocks for FAWE

fixes #747
Dieser Commit ist enthalten in:
dordsor21 2020-12-17 22:06:32 +00:00
Ursprung e8f0c0e6ea
Commit e08fda0ac2
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
4 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -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();

Datei anzeigen

@ -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();

Datei anzeigen

@ -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();

Datei anzeigen

@ -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();