couple more compilation issues

This commit is contained in:
Jesse Boyd
2019-07-23 06:58:18 +10:00
parent e53fc8a7f6
commit c05d425f64
22 changed files with 274 additions and 151 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.