Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-19 17:30:08 +01:00
Utilise thread extends when able
Dieser Commit ist enthalten in:
Ursprung
81febcccba
Commit
e3deffac8b
@ -6,6 +6,8 @@ import com.fastasyncworldedit.core.queue.Filter;
|
||||
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.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
@ -15,6 +17,7 @@ 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;
|
||||
@ -24,6 +27,7 @@ import com.sk89q.worldedit.world.block.BlockType;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
|
||||
@ -193,17 +197,55 @@ public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
return getExtent().getBlock(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock getFullBlock(int x, int y, int z) {
|
||||
return getExtent().getFullBlock(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Entity> getEntities(Region region) {
|
||||
return getExtent().getEntities(region);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Entity> getEntities() {
|
||||
return getExtent().getEntities();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Entity createEntity(Location location, BaseEntity entity) {
|
||||
return getExtent().createEntity(location, entity);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Entity createEntity(Location location, BaseEntity entity, UUID uuid) {
|
||||
return getExtent().createEntity(location, entity, uuid);
|
||||
}
|
||||
|
||||
@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);
|
||||
@ -214,11 +256,21 @@ 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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cancel() {
|
||||
return getExtent().cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeEntity(int x, int y, int z, UUID uuid) {
|
||||
getExtent().removeEntity(x, y, z, uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isQueueEnabled() {
|
||||
return getExtent().isQueueEnabled();
|
||||
@ -244,6 +296,16 @@ public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
return getExtent().apply(region, filter, full);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeType getBiome(BlockVector3 position) {
|
||||
return getExtent().getBiome(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeType getBiomeType(int x, int y, int z) {
|
||||
return getExtent().getBiomeType(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends Filter> T apply(Iterable<BlockVector3> positions, T filter) {
|
||||
return getExtent().apply(positions, filter);
|
||||
|
@ -221,9 +221,9 @@ public class ParallelQueueExtent extends PassthroughExtent {
|
||||
return new Operation() {
|
||||
@Override
|
||||
public Operation resume(final RunContext run) throws WorldEditException {
|
||||
getExtent().commit();
|
||||
extent.commit();
|
||||
processor.flush();
|
||||
getExtent().flush();
|
||||
((IQueueExtent<IQueueChunk<?>>) extent).flush();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren