More verbosely get block data and ensure biome layer isn't null

This commit is contained in:
dordsor21
2021-12-21 18:00:09 +00:00
parent 9ec829eddf
commit 28f3bc61ea
3 changed files with 15 additions and 2 deletions

View File

@@ -242,7 +242,12 @@ public final class PaperweightFaweAdapter extends CachedBukkitAdapter implements
LevelChunk chunk = handle.getChunk(x >> 4, z >> 4);
final BlockPos blockPos = new BlockPos(x, y, z);
final net.minecraft.world.level.block.state.BlockState blockData = chunk.getBlockState(blockPos);
return adapt(blockData);
BlockState state = adapt(blockData);
if (state == null) {
org.bukkit.block.Block bukkitBlock = location.getBlock();
state = BukkitAdapter.adapt(bukkitBlock.getBlockData());
}
return state;
}
@Override