# Conflicts:
#	worldedit-core/src/main/java/com/boydti/fawe/command/CFICommands.java
#	worldedit-core/src/main/java/com/boydti/fawe/object/extent/NullExtent.java
This commit is contained in:
MattBDev
2019-07-22 22:26:00 -04:00
23 changed files with 269 additions and 121 deletions

View File

@ -41,6 +41,7 @@ import com.sk89q.worldedit.world.weather.WeatherType;
import com.sk89q.worldedit.world.weather.WeatherTypes;
import javax.annotation.Nullable;
import java.nio.file.Path;
import java.util.function.Supplier;
/**
* An abstract implementation of {@link World}.
@ -105,7 +106,7 @@ public interface SimpleWorld extends World {
@Override
default boolean queueBlockBreakEffect(Platform server, BlockVector3 position, BlockType blockType, double priority) {
Fawe.get().getQueueHandler().sync(() -> playEffect(position, 2001, blockType.getLegacyCombinedId() >> 4));
Fawe.get().getQueueHandler().sync((Supplier<Boolean>) () -> playEffect(position, 2001, blockType.getLegacyCombinedId() >> 4));
return true;
}

View File

@ -19,6 +19,7 @@
package com.sk89q.worldedit.world;
import com.boydti.fawe.object.extent.LightingExtent;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.WorldEditException;
@ -127,7 +128,13 @@ public interface World extends Extent {
* @param position the position
* @return the light level (0-15)
*/
int getBlockLightLevel(BlockVector3 position);
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();
}
/**
* Clear a chest's contents.