mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Fixed a bunch of extends and removed slottableblockbag
This commit is contained in:
@ -32,8 +32,8 @@ import com.sk89q.worldedit.WorldEditException;
|
||||
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.world.World;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
@ -124,10 +124,9 @@ public class AbstractDelegateExtent implements Extent, LightingExtent {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Bounds
|
||||
*/
|
||||
Bounds
|
||||
*/
|
||||
@Override
|
||||
public int getMaxY() {
|
||||
return extent.getMaxY();
|
||||
@ -157,6 +156,12 @@ public class AbstractDelegateExtent implements Extent, LightingExtent {
|
||||
return extent.setBiome(x, y, z, biome);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(BlockVector3 position, T block)
|
||||
throws WorldEditException {
|
||||
return extent.setBlock(position.getX(), position.getY(), position.getZ(), block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(int x, int y, int z, T block)
|
||||
throws WorldEditException {
|
||||
@ -168,6 +173,11 @@ public class AbstractDelegateExtent implements Extent, LightingExtent {
|
||||
return setBlock(x, y, z, getBlock(x, y, z).toBaseBlock(tile));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBiome(BlockVector2 position, BiomeType biome) {
|
||||
return extent.setBiome(position.getX(), 0, position.getZ(), biome);
|
||||
}
|
||||
|
||||
/*
|
||||
Light
|
||||
*/
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
package com.sk89q.worldedit.extent;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.boydti.fawe.object.clipboard.WorldCopyClipboard;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
@ -59,16 +61,13 @@ import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* A world, portion of a world, clipboard, or other object that can have blocks
|
||||
@ -295,7 +294,7 @@ public interface Extent extends InputExtent, OutputExtent {
|
||||
int clearanceAbove = maxY - y;
|
||||
int clearanceBelow = y - minY;
|
||||
int clearance = Math.min(clearanceAbove, clearanceBelow);
|
||||
BlockStateHolder block = getBlock(x, y, z);
|
||||
BlockState block = getBlock(x, y, z);
|
||||
boolean state = !block.getBlockType().getMaterial().isMovementBlocker();
|
||||
int offset = state ? 0 : 1;
|
||||
for (int d = 0; d <= clearance; d++) {
|
||||
|
@ -92,6 +92,12 @@ public class NullExtent implements Extent {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(int x, int y, int z, T block)
|
||||
throws WorldEditException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setTile(int x, int y, int z, CompoundTag tile) throws WorldEditException {
|
||||
return false;
|
||||
@ -102,6 +108,11 @@ public class NullExtent implements Extent {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBiome(int x, int y, int z, BiomeType biome) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Operation commit() {
|
||||
|
@ -186,6 +186,7 @@ public class PassthroughExtent extends AbstractDelegateExtent {
|
||||
return getExtent().cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxY() {
|
||||
return getExtent().getMaxY();
|
||||
}
|
||||
|
Reference in New Issue
Block a user