Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-20 09:50:06 +01:00
Dirty workaround for CharBlocks blocks NPE
Dieser Commit ist enthalten in:
Ursprung
56714e44fd
Commit
737606a791
@ -4,6 +4,7 @@ import com.boydti.fawe.beta.IBatchProcessor;
|
|||||||
import com.boydti.fawe.beta.IChunk;
|
import com.boydti.fawe.beta.IChunk;
|
||||||
import com.boydti.fawe.beta.IChunkGet;
|
import com.boydti.fawe.beta.IChunkGet;
|
||||||
import com.boydti.fawe.beta.IChunkSet;
|
import com.boydti.fawe.beta.IChunkSet;
|
||||||
|
import com.boydti.fawe.beta.implementation.blocks.CharBlocks;
|
||||||
import com.boydti.fawe.beta.implementation.lighting.HeightMapType;
|
import com.boydti.fawe.beta.implementation.lighting.HeightMapType;
|
||||||
import com.sk89q.worldedit.extent.Extent;
|
import com.sk89q.worldedit.extent.Extent;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
@ -55,6 +56,10 @@ public class HeightmapProcessor implements IBatchProcessor {
|
|||||||
}
|
}
|
||||||
if (block == null || block.getBlockType() == RESERVED) {
|
if (block == null || block.getBlockType() == RESERVED) {
|
||||||
if (!hasSectionGet) continue;
|
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);
|
block = get.getBlock(x, y, z);
|
||||||
}
|
}
|
||||||
// fast skip if block isn't relevant for any height map
|
// fast skip if block isn't relevant for any height map
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren