3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-08 04:20:06 +01:00

Some changes to make the diff between 1.14-snapshot and commanding branch smaller.

Dieser Commit ist enthalten in:
MattBDev 2019-10-11 10:34:56 -04:00
Ursprung 0d794c1004
Commit fb91456bdd
9 geänderte Dateien mit 28 neuen und 25 gelöschten Zeilen

Datei anzeigen

@ -89,7 +89,7 @@ public interface IChunk<T extends Future<T>> extends Trimable, Callable<T>, IChu
* Filter through all the blocks in the chunk * Filter through all the blocks in the chunk
* *
* @param filter the filter * @param filter the filter
* @param block The filter block * @param block The filter block
* @param region The region allowed to filter (may be null) * @param region The region allowed to filter (may be null)
*/ */
void filterBlocks(Filter filter, ChunkFilterBlock block, @Nullable Region region); void filterBlocks(Filter filter, ChunkFilterBlock block, @Nullable Region region);

Datei anzeigen

@ -145,7 +145,7 @@ public interface IQueueExtent extends Flushable, Trimable, Extent {
* #wrap(IChunk)} * #wrap(IChunk)}
* *
* @param isFull true if a more optimized chunk should be returned * @param isFull true if a more optimized chunk should be returned
* @return * @return a more optimized chunk object
*/ */
IChunk create(boolean isFull); IChunk create(boolean isFull);
@ -173,13 +173,16 @@ public interface IQueueExtent extends Flushable, Trimable, Extent {
ChunkFilterBlock initFilterBlock(); ChunkFilterBlock initFilterBlock();
/** /**
* Number of chunks in queue * Returns the number of chunks in this queue.
* @return *
* @return the number of chunks in this queue
*/ */
int size(); int size();
/** /**
* @return If queue is empty * Returns <tt>true</tt> if this queue contains no elements.
*
* @return <tt>true</tt> if this queue contains no elements
*/ */
boolean isEmpty(); boolean isEmpty();
} }

Datei anzeigen

@ -113,8 +113,7 @@ public class CharBlocks implements IBlocks {
return get(blocks, layer)[index]; return get(blocks, layer)[index];
} }
public final void set(CharBlocks blocks, int layer, int index, public final void set(CharBlocks blocks, int layer, int index, char value) {
char value) {
get(blocks, layer)[index] = value; get(blocks, layer)[index] = value;
} }
} }

Datei anzeigen

@ -6,8 +6,6 @@ import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypes;
import java.util.concurrent.Future;
public abstract class CharGetBlocks extends CharBlocks implements IChunkGet { public abstract class CharGetBlocks extends CharBlocks implements IChunkGet {
@Override @Override

Datei anzeigen

@ -1,29 +1,25 @@
package com.boydti.fawe.beta.implementation.holder; package com.boydti.fawe.beta.implementation.holder;
import com.boydti.fawe.beta.IChunk; import com.boydti.fawe.beta.IChunk;
import com.boydti.fawe.beta.IChunkSet;
import com.boydti.fawe.beta.IDelegateChunk; import com.boydti.fawe.beta.IDelegateChunk;
import com.sk89q.jnbt.CompoundTag;
import java.util.concurrent.Future;
/** /**
* Implementation of IDelegateChunk * Implementation of IDelegateChunk
*/ */
public class DelegateChunk<U extends IChunk> implements IDelegateChunk<U> { public class DelegateChunk<T extends IChunk> implements IDelegateChunk<T> {
private U parent; private T parent;
public DelegateChunk(U parent) { public DelegateChunk(final T parent) {
this.parent = parent; this.parent = parent;
} }
@Override @Override
public final U getParent() { public final T getParent() {
return parent; return parent;
} }
public final void setParent(U parent) { public final void setParent(final T parent) {
this.parent = parent; this.parent = parent;
} }
} }

Datei anzeigen

@ -25,6 +25,7 @@ import com.boydti.fawe.util.image.ImageViewer;
import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.blocks.BaseItemStack; import com.sk89q.worldedit.blocks.BaseItemStack;
import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.entity.Player;
@ -43,6 +44,7 @@ import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.registry.state.PropertyKey; import com.sk89q.worldedit.registry.state.PropertyKey;
import com.sk89q.worldedit.session.ClipboardHolder; import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.TreeGenerator;
import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.biome.BiomeTypes; import com.sk89q.worldedit.world.biome.BiomeTypes;
@ -1946,6 +1948,11 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
return false; return false;
} }
@Override
public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, BlockVector3 position) throws MaxChangedBlocksException {
return false;
}
@Override @Override
public void dropItem(Vector3 position, BaseItemStack item) { public void dropItem(Vector3 position, BaseItemStack item) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

Datei anzeigen

@ -31,6 +31,11 @@ public class AbstractDelegateChangeSet extends FaweChangeSet {
this.waitingAsync = parent.waitingAsync; this.waitingAsync = parent.waitingAsync;
} }
@Override
public boolean closeAsync() {
return parent.closeAsync();
}
@Override @Override
public boolean flush() { public boolean flush() {
return parent.flush(); return parent.flush();
@ -61,11 +66,6 @@ public class AbstractDelegateChangeSet extends FaweChangeSet {
return parent.flushAsync(); return parent.flushAsync();
} }
@Override
public boolean closeAsync() {
return parent.closeAsync();
}
@Override @Override
public void add(int x, int y, int z, int combinedFrom, int combinedTo) { public void add(int x, int y, int z, int combinedFrom, int combinedTo) {
parent.add(x, y, z, combinedFrom, combinedTo); parent.add(x, y, z, combinedFrom, combinedTo);

Datei anzeigen

@ -23,6 +23,6 @@ public class CombinedBlockCopy implements RegionFunction {
// BlockStateHolder block = source.getBlock(position); // BlockStateHolder block = source.getBlock(position);
BaseBlock block = source.getFullBlock(position); BaseBlock block = source.getFullBlock(position);
function.apply(position); function.apply(position);
return destination.setBlock(position.getX(),position.getY(),position.getZ(), block); return destination.setBlock(position, block);
} }
} }

Datei anzeigen

@ -17,6 +17,6 @@ public class SimpleBlockCopy implements RegionFunction {
@Override @Override
public boolean apply(BlockVector3 position) throws WorldEditException { public boolean apply(BlockVector3 position) throws WorldEditException {
return destination.setBlock(position.getX(),position.getY(),position.getZ(), source.getFullBlock(position)); return destination.setBlock(position, source.getFullBlock(position));
} }
} }