some minor refactoring

This commit is contained in:
Jesse Boyd
2019-08-18 02:09:09 +01:00
parent d1af07b6ae
commit d434dfcfdd
64 changed files with 1892 additions and 812 deletions

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.world;
import com.boydti.fawe.beta.IChunkGet;
import com.boydti.fawe.beta.implementation.NullChunkGet;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
@ -132,6 +134,11 @@ public class NullWorld extends AbstractWorld {
return BlockVector3.ZERO;
}
@Override
public IChunkGet get(int x, int z) {
return NullChunkGet.INSTANCE;
}
@Override
public BlockState getBlock(int x, int y, int z) {
return BlockTypes.AIR.getDefaultState();

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.world;
import com.boydti.fawe.beta.IChunkGet;
import com.boydti.fawe.beta.implementation.IChunkCache;
import com.boydti.fawe.object.extent.LightingExtent;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
@ -47,7 +49,7 @@ import java.util.Locale;
/**
* Represents a world (dimension).
*/
public interface World extends Extent, Keyed {
public interface World extends Extent, Keyed, IChunkCache<IChunkGet> {
/**
* Get the name of the world.
@ -290,4 +292,7 @@ public interface World extends Extent, Keyed {
default String getId() {
return getName().replace(" ", "_").toLowerCase(Locale.ROOT);
}
@Override
IChunkGet get(int x, int z);
}