# 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

@ -3,26 +3,34 @@ package com.boydti.fawe.object.extent;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.object.FaweLimit;
import com.boydti.fawe.object.exception.FaweException;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
import com.sk89q.worldedit.function.generator.GenBase;
import com.sk89q.worldedit.function.generator.Resource;
import com.sk89q.worldedit.function.mask.Mask;
import com.sk89q.worldedit.function.operation.Operation;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.Countable;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Set;
public class NullExtent extends FaweRegionExtent {
@ -53,26 +61,27 @@ public class NullExtent extends FaweRegionExtent {
@Override
public BiomeType getBiome(final BlockVector2 arg0) {
if(reason != null) {
throw reason;
}
return null;
@Override
public BiomeType getBiomeType(int x, int z) {
throw reason;
}
@Override
public BlockState getBlock(final BlockVector3 arg0) {
if(reason != null) {
throw reason;
}
return null;
}
@Override
public BlockState getBlock(int x, int y, int z) {
if(reason != null) {
throw reason;
}
return null;
@Override
public BaseBlock getFullBlock(BlockVector3 position) {
throw reason;
}
@Override
@ -85,44 +94,73 @@ public class NullExtent extends FaweRegionExtent {
@Override
public boolean setBiome(final BlockVector2 arg0, final BiomeType arg1) {
if(reason != null) {
throw reason;
}
@Override
public boolean setBiome(int x, int y, int z, BiomeType biome) {
throw reason;
}
return false;
}
@Override
public boolean setBlock(final BlockVector3 arg0, final BlockStateHolder arg1) throws WorldEditException {
if(reason != null) {
throw reason;
}
return false;
}
@Override
public boolean setBlock(int x, int y, int z, BlockStateHolder block) throws WorldEditException {
if(reason != null) {
throw reason;
}
return false;
@Nullable
@Override
public Entity createEntity(final Location arg0, final BaseEntity arg1) {
throw reason;
}
@Override
public Entity createEntity(final Location arg0, final BaseEntity arg1) {
if(reason != null) {
public boolean isQueueEnabled() {
throw reason;
}
@Override
public void enableQueue() {
throw reason;
}
@Override
public void disableQueue() {
throw reason;
}
@Override
public boolean isWorld() {
throw reason;
}
@Override
public boolean regenerateChunk(int x, int z, @Nullable BiomeType type, @Nullable Long seed) {
throw reason;
}
@Override
public int getHighestTerrainBlock(int x, int z, int minY, int maxY) {
throw reason;
}
@Override
public int getHighestTerrainBlock(int x, int z, int minY, int maxY, Mask filter) {
throw reason;
}
return null;
}
@Override
public List<? extends Entity> getEntities() {
return new ArrayList<>();
throw reason;
}
@Override
public List<? extends Entity> getEntities(final Region arg0) {
return new ArrayList<>();
throw reason;
}
@Override
@ -137,57 +175,157 @@ public class NullExtent extends FaweRegionExtent {
@Override
public boolean contains(int x, int z) {
if(reason != null) {
throw reason;
}
return false;
}
@Override
public boolean contains(int x, int y, int z) {
if(reason != null) {
throw reason;
}
return false;
}
@Override
public Collection<Region> getRegions() {
return Collections.emptyList();
throw reason;
}
@Nullable
@Override
public Operation commit() {
return null;
throw reason;
}
@Override
public boolean cancel() {
throw reason;
}
@Override
public int getMaxY() {
throw reason;
}
@Override
public BlockArrayClipboard lazyCopy(Region region) {
throw reason;
}
@Override
public int countBlocks(Region region, Set<BaseBlock> searchBlocks) {
throw reason;
}
@Override
public int countBlocks(Region region, Mask searchMask) {
throw reason;
}
@Override
public <B extends BlockStateHolder<B>> int setBlocks(Region region, B block) throws MaxChangedBlocksException {
throw reason;
}
@Override
public int setBlocks(Region region, Pattern pattern) throws MaxChangedBlocksException {
throw reason;
}
@Override
public <B extends BlockStateHolder<B>> int replaceBlocks(Region region, Set<BaseBlock> filter, B replacement) throws MaxChangedBlocksException {
throw reason;
}
@Override
public int replaceBlocks(Region region, Set<BaseBlock> filter, Pattern pattern) throws MaxChangedBlocksException {
throw reason;
}
@Override
public int replaceBlocks(Region region, Mask mask, Pattern pattern) throws MaxChangedBlocksException {
throw reason;
}
@Override
public int center(Region region, Pattern pattern) throws MaxChangedBlocksException {
throw reason;
}
@Override
public int setBlocks(Set<BlockVector3> vset, Pattern pattern) {
throw reason;
}
@Override
public World getWorld() {
throw reason;
}
@Override
public int getNearestSurfaceLayer(int x, int z, int y, int minY, int maxY) {
if(reason != null) {
throw reason;
}
@Override
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY, boolean ignoreAir) {
throw reason;
}
return -1;
}
@Override
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY) {
if(reason != null) {
throw reason;
}
return -1;
}
@Override
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY, int failedMin, int failedMax) {
if(reason != null) {
throw reason;
}
return -1;
throw reason;
}
@Override
public Extent getExtent() {
return this;
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY, int failedMin, int failedMax, Mask mask) {
throw reason;
}
@Override
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY, int failedMin, int failedMax, boolean ignoreAir) {
throw reason;
}
@Override
public void addCaves(Region region) throws WorldEditException {
throw reason;
}
@Override
public void generate(Region region, GenBase gen) throws WorldEditException {
throw reason;
}
@Override
public void addSchems(Region region, Mask mask, List<ClipboardHolder> clipboards, int rarity, boolean rotate) throws WorldEditException {
throw reason;
}
@Override
public void spawnResource(Region region, Resource gen, int rarity, int frequency) throws WorldEditException {
throw reason;
}
@Override
public void addOre(Region region, Mask mask, Pattern material, int size, int frequency, int rarity, int minY, int maxY) throws WorldEditException {
throw reason;
}
@Override
public void addOres(Region region, Mask mask) throws WorldEditException {
throw reason;
}
@Override
public List<Countable<BlockType>> getBlockDistribution(Region region) {
throw reason;
}
@Override
public List<Countable<BlockState>> getBlockDistributionWithData(Region region) {
throw reason;
}
}