mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Merge branch 'commanding' of https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13 into commanding
# 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:
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user