Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
I hope these are the last few errors
Dieser Commit ist enthalten in:
Ursprung
f963e63f58
Commit
3ed9bdc7c9
@ -84,7 +84,7 @@ public interface Actor extends Identifiable, SessionOwner, Subject, Metadatable
|
|||||||
*/
|
*/
|
||||||
void print(Component component);
|
void print(Component component);
|
||||||
|
|
||||||
/**F
|
/**
|
||||||
* Returns true if the actor can destroy bedrock.
|
* Returns true if the actor can destroy bedrock.
|
||||||
*
|
*
|
||||||
* @return true if bedrock can be broken by the actor
|
* @return true if bedrock can be broken by the actor
|
||||||
|
@ -21,16 +21,12 @@ public abstract class ABlockMask extends AbstractExtentMask {
|
|||||||
List<String> strings = new ArrayList<>();
|
List<String> strings = new ArrayList<>();
|
||||||
for (BlockType type : BlockTypes.values) {
|
for (BlockType type : BlockTypes.values) {
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
boolean hasAll = true;
|
boolean hasAll;
|
||||||
boolean hasAny = false;
|
|
||||||
List<BlockState> all = type.getAllStates();
|
List<BlockState> all = type.getAllStates();
|
||||||
for (BlockState state : all) {
|
hasAll = all.stream().map(this::test).reduce(true, (a, b) -> a && b);
|
||||||
hasAll &= test(state);
|
|
||||||
hasAny = true;
|
|
||||||
}
|
|
||||||
if (hasAll) {
|
if (hasAll) {
|
||||||
strings.add(type.getId());
|
strings.add(type.getId());
|
||||||
} else if (hasAny) {
|
} else {
|
||||||
for (BlockState state : all) {
|
for (BlockState state : all) {
|
||||||
if (test(state)) {
|
if (test(state)) {
|
||||||
strings.add(state.getAsString());
|
strings.add(state.getAsString());
|
||||||
|
@ -81,15 +81,15 @@ public interface Mask {
|
|||||||
return value == null ? this : value;
|
return value == null ? this : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
default Mask and(Mask other) {
|
// default Mask and(Mask other) {
|
||||||
Mask value = and(other);
|
// Mask value = and(other);
|
||||||
return value == null ? new MaskIntersection(this, other) : value;
|
// return value == null ? new MaskIntersection(this, other) : value;
|
||||||
}
|
// }
|
||||||
|
|
||||||
default Mask or(Mask other) {
|
// default Mask or(Mask other) {
|
||||||
Mask value = or(other);
|
// Mask value = or(other);
|
||||||
return value == null ? new MaskUnion(this, other) : value;
|
// return value == null ? new MaskUnion(this, other) : value;
|
||||||
}
|
// }
|
||||||
|
|
||||||
default Mask inverse() {
|
default Mask inverse() {
|
||||||
if (this instanceof Masks.AlwaysTrue) {
|
if (this instanceof Masks.AlwaysTrue) {
|
||||||
|
@ -34,9 +34,8 @@ import com.sk89q.worldedit.world.biome.BiomeType;
|
|||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
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.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class RequestExtent implements Extent {
|
public class RequestExtent implements Extent {
|
||||||
|
|
||||||
@ -96,6 +95,12 @@ public class RequestExtent implements Extent {
|
|||||||
return getExtent().setBlock(position, block);
|
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
|
@Override
|
||||||
public boolean setTile(int x, int y, int z, CompoundTag tile) throws WorldEditException {
|
public boolean setTile(int x, int y, int z, CompoundTag tile) throws WorldEditException {
|
||||||
return getExtent().setTile(x, y, z, tile);
|
return getExtent().setTile(x, y, z, tile);
|
||||||
@ -106,6 +111,11 @@ public class RequestExtent implements Extent {
|
|||||||
return getExtent().setBiome(position, biome);
|
return getExtent().setBiome(position, biome);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean setBiome(int x, int y, int z, BiomeType biome) {
|
||||||
|
return getExtent().setBiome(BlockVector2.at(x,z), biome);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public Operation commit() {
|
public Operation commit() {
|
||||||
|
@ -87,11 +87,20 @@ public class NullWorld extends AbstractWorld {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BiomeType getBiome(BlockVector2 position) {
|
||||||
|
return BiomeTypes.THE_VOID;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public BiomeType getBiomeType(int x, int z) {
|
public BiomeType getBiomeType(int x, int z) {
|
||||||
return BiomeTypes.THE_VOID;
|
return BiomeTypes.THE_VOID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean setBiome(BlockVector2 position, BiomeType biome) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setBiome(int x, int y, int z, BiomeType biome) {
|
public boolean setBiome(int x, int y, int z, BiomeType biome) {
|
||||||
return false;
|
return false;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren