Fix free build restrictions

This commit is contained in:
Jesse Boyd
2018-09-05 07:09:24 +10:00
parent dfb1195242
commit 594d72d2fe
2 changed files with 43 additions and 22 deletions

View File

@ -7,8 +7,10 @@ import com.boydti.fawe.object.RunnableVal2;
import com.boydti.fawe.object.exception.FaweException;
import com.boydti.fawe.util.SetQueue;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.io.File;
@ -19,9 +21,15 @@ import javax.annotation.Nullable;
public class NullFaweQueue implements FaweQueue {
private final String worldName;
private final BlockState state;
public NullFaweQueue(String worldName) {
this(worldName, BlockTypes.AIR.getDefaultState());
}
public NullFaweQueue(String worldName, BlockState state) {
this.worldName = worldName;
this.state = state;
}
@Override
@ -179,14 +187,19 @@ public class NullFaweQueue implements FaweQueue {
return 0;
}
@Override
public BlockState getBlock(Vector position) {
return state;
}
@Override
public int getCombinedId4Data(int x, int y, int z) throws FaweException.FaweChunkLoadException {
return BlockTypes.AIR.getInternalId();
return state.getInternalId();
}
@Override
public int getCachedCombinedId4Data(int x, int y, int z) throws FaweException.FaweChunkLoadException {
return BlockTypes.AIR.getInternalId();
return state.getInternalId();
}
@Override