Revert "Lighting and Database changes"

This reverts commit 39dfc244
This commit is contained in:
MattBDev
2020-02-18 18:06:19 -05:00
parent e0bb1ce853
commit 8e97b3b4b1
22 changed files with 285 additions and 93 deletions

View File

@ -22,6 +22,7 @@ package com.sk89q.worldedit.world;
import com.boydti.fawe.beta.IChunkGet;
import com.boydti.fawe.beta.implementation.packet.ChunkPacket;
import com.boydti.fawe.beta.IChunkCache;
import com.boydti.fawe.object.extent.LightingExtent;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.WorldEditException;
@ -133,6 +134,10 @@ public interface World extends Extent, Keyed, IChunkCache<IChunkGet> {
* @return the light level (0-15)
*/
default int getBlockLightLevel(BlockVector3 position) {
if (this instanceof LightingExtent) {
LightingExtent extent = (LightingExtent) this;
return extent.getBlockLight(position.getX(), position.getY(), position.getZ());
}
return getBlock(position).getMaterial().getLightValue();
}