3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-07-03 09:18:03 +02:00

Dirty workaround for CharBlocks blocks NPE

Dieser Commit ist enthalten in:
Hannes Greule 2021-04-14 22:32:44 +02:00
Ursprung 56714e44fd
Commit 737606a791

Datei anzeigen

@ -4,6 +4,7 @@ import com.boydti.fawe.beta.IBatchProcessor;
import com.boydti.fawe.beta.IChunk;
import com.boydti.fawe.beta.IChunkGet;
import com.boydti.fawe.beta.IChunkSet;
import com.boydti.fawe.beta.implementation.blocks.CharBlocks;
import com.boydti.fawe.beta.implementation.lighting.HeightMapType;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.world.World;
@ -55,6 +56,10 @@ public class HeightmapProcessor implements IBatchProcessor {
}
if (block == null || block.getBlockType() == RESERVED) {
if (!hasSectionGet) continue;
// TODO this is only a workaround to avoid large stacktraces
// and needs to be fixed in CharBlocks/BukkitGetBlocks
if (((CharBlocks) get).blocks[y >> 4] == null) continue;
block = get.getBlock(x, y, z);
}
// fast skip if block isn't relevant for any height map