mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Minor changes to match upstream more closely
This commit is contained in:
@ -30,15 +30,20 @@ import com.boydti.fawe.object.extent.LightingExtent;
|
||||
import com.boydti.fawe.util.ExtentTraverser;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
import com.sk89q.worldedit.extent.buffer.ForgetfulExtentBuffer;
|
||||
import com.sk89q.worldedit.function.operation.Operation;
|
||||
import com.sk89q.worldedit.function.operation.OperationQueue;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
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 java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
@ -69,7 +74,7 @@ public class AbstractDelegateExtent implements Extent, LightingExtent {
|
||||
|
||||
@Override
|
||||
public BlockState getBlock(BlockVector3 position) {
|
||||
return getBlock(position.getX(),position.getY(),position.getZ());
|
||||
return extent.getBlock(position.getX(),position.getY(),position.getZ());
|
||||
}
|
||||
|
||||
/*
|
||||
@ -124,24 +129,37 @@ public class AbstractDelegateExtent implements Extent, LightingExtent {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Bounds
|
||||
*/
|
||||
@Override
|
||||
public int getMaxY() {
|
||||
return extent.getMaxY();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Input + Output
|
||||
*/
|
||||
|
||||
@Override
|
||||
public BlockState getBlock(int x, int y, int z) {
|
||||
return extent.getBlock(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Entity createEntity(Location location, BaseEntity entity) {
|
||||
return extent.createEntity(location, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Entity> getEntities() {
|
||||
return extent.getEntities();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Entity> getEntities(Region region) {
|
||||
return extent.getEntities(region);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeType getBiome(BlockVector2 position) {
|
||||
return extent.getBiome(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock getFullBlock(int x, int y, int z) {
|
||||
return extent.getFullBlock(x, y, z);
|
||||
|
@ -5,8 +5,6 @@ import com.boydti.fawe.object.changeset.FaweChangeSet;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
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.clipboard.BlockArrayClipboard;
|
||||
import com.sk89q.worldedit.function.generator.GenBase;
|
||||
import com.sk89q.worldedit.function.generator.Resource;
|
||||
@ -18,19 +16,18 @@ 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.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.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
@ -40,32 +37,7 @@ public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
super(extent);
|
||||
}
|
||||
|
||||
public BlockVector3 getMinimumPoint() {
|
||||
return getExtent().getMinimumPoint();
|
||||
}
|
||||
|
||||
public BlockVector3 getMaximumPoint() {
|
||||
return getExtent().getMaximumPoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Entity> getEntities(Region region) {
|
||||
return getExtent().getEntities(region);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Entity> getEntities() {
|
||||
return getExtent().getEntities();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Entity createEntity(Location location, BaseEntity entity) {
|
||||
return getExtent().createEntity(location, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public void removeEntity(int x, int y, int z, UUID uuid) {
|
||||
getExtent().removeEntity(x, y, z, uuid);
|
||||
}
|
||||
@ -160,11 +132,6 @@ public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
return getExtent().getBlockDistributionWithData(region);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxY() {
|
||||
return getExtent().getMaxY();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockArrayClipboard lazyCopy(Region region) {
|
||||
return getExtent().lazyCopy(region);
|
||||
@ -215,43 +182,22 @@ public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
return getExtent().setBlocks(vset, pattern);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getBlock(BlockVector3 position) {
|
||||
return getExtent().getBlock(position);
|
||||
}
|
||||
|
||||
public BlockState getBlock(int x, int y, int z) {
|
||||
return getExtent().getBlock(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock getFullBlock(BlockVector3 position) {
|
||||
return getExtent().getFullBlock(position);
|
||||
}
|
||||
|
||||
public BaseBlock getFullBlock(int x, int y, int z) {
|
||||
return getExtent().getFullBlock(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeType getBiome(BlockVector2 position) {
|
||||
return getExtent().getBiome(position);
|
||||
}
|
||||
|
||||
public BiomeType getBiomeType(int x, int z) {
|
||||
return getExtent().getBiomeType(x, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(BlockVector3 position, T block) throws WorldEditException {
|
||||
return getExtent().setBlock(position, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(int x, int y, int z, T block) throws WorldEditException {
|
||||
return getExtent().setBlock(x, y, z, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setTile(int x, int y, int z, CompoundTag tile) throws WorldEditException {
|
||||
return getExtent().setTile(x, y, z, tile);
|
||||
@ -262,11 +208,6 @@ public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
return getExtent().setBiome(position, biome);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBiome(int x, int y, int z, BiomeType biome) {
|
||||
return getExtent().setBiome(x, y, z, biome);
|
||||
}
|
||||
|
||||
// special
|
||||
public Extent disableHistory() {
|
||||
return super.disableHistory();
|
||||
|
@ -357,10 +357,6 @@ public class MCEditSchematicReader extends NBTSchematicReader {
|
||||
|
||||
private String convertBlockEntityId(String id) {
|
||||
switch (id) {
|
||||
case "Chest":
|
||||
return "chest";
|
||||
case "Sign":
|
||||
return "sign";
|
||||
case "Cauldron":
|
||||
return "brewing_stand";
|
||||
case "Control":
|
||||
@ -388,6 +384,24 @@ public class MCEditSchematicReader extends NBTSchematicReader {
|
||||
return "note_block";
|
||||
case "Structure":
|
||||
return "structure_block";
|
||||
case "Chest":
|
||||
return "chest";
|
||||
case "Sign":
|
||||
return "sign";
|
||||
case "Banner":
|
||||
return "banner";
|
||||
case "Beacon":
|
||||
return "beacon";
|
||||
case "Comparator":
|
||||
return "comparator";
|
||||
case "Dropper":
|
||||
return "dropper";
|
||||
case "Furnace":
|
||||
return "furnace";
|
||||
case "Hopper":
|
||||
return "hopper";
|
||||
case "Skull":
|
||||
return "skull";
|
||||
default:
|
||||
return id;
|
||||
}
|
||||
|
Reference in New Issue
Block a user