merge with upstream (broken)

Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-03 16:53:58 +11:00
Ursprung f361619037
Commit 4cd8d08134
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
67 geänderte Dateien mit 255 neuen und 200 gelöschten Zeilen

Datei anzeigen

@ -21,7 +21,7 @@ import com.sk89q.jnbt.Tag;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@ -287,7 +287,7 @@ public abstract class BukkitQueue_0<CHUNK, CHUNKSECTIONS, SECTION> extends NMSMa
}
@Override
public boolean regenerateChunk(World world, int x, int z, BaseBiome biome, Long seed) {
public boolean regenerateChunk(World world, int x, int z, BiomeType biome, Long seed) {
if (!keepLoaded.isEmpty()) keepLoaded.remove(MathMan.pairInt(x, z));
boolean result = world.regenerateChunk(x, z);
return result;

Datei anzeigen

@ -12,7 +12,7 @@ import com.boydti.fawe.util.TaskManager;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter;
import com.sk89q.worldedit.function.operation.Operation;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.io.File;
import java.util.Collection;
import java.util.List;
@ -865,7 +865,7 @@ public class AsyncWorld extends DelegateFaweQueue implements World, HasFaweQueue
@Override
public void setBiome(int x, int z, Biome bio) {
int id = adapter.getBiomeId(bio);
queue.setBiome(x, z, new BaseBiome(id));
queue.setBiome(x, z, new BiomeType(id));
}
@Override

Datei anzeigen

@ -1,7 +1,7 @@
package com.boydti.fawe;
import com.sk89q.jnbt.*;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.lang.reflect.Field;
import java.util.*;
@ -32,15 +32,15 @@ public class FaweCache {
/**
* Immutable biome cache
*/
public final static BaseBiome[] CACHE_BIOME = new BaseBiome[256];
public final static BiomeType[] CACHE_BIOME = new BiomeType[256];
public static final BaseBiome getBiome(int id) {
public static final BiomeType getBiome(int id) {
return CACHE_BIOME[id];
}
static {
for (int i = 0; i < 256; i++) {
CACHE_BIOME[i] = new BaseBiome(i) {
CACHE_BIOME[i] = new BiomeType(i) {
@Override
public void setId(int id) {
throw new IllegalStateException("Cannot set id");

Datei anzeigen

@ -32,7 +32,7 @@ import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.command.binding.Switch;
import com.sk89q.worldedit.util.command.parametric.Optional;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.io.IOException;
import java.io.RandomAccessFile;
@ -291,7 +291,7 @@ public class AnvilCommands {
desc = "Delete chunks matching a specific biome"
)
@CommandPermissions("worldedit.anvil.trimallair")
public void deleteBiome(Player player, String folder, BaseBiome biome, @Switch('u') boolean unsafe) {
public void deleteBiome(Player player, String folder, BiomeType biome, @Switch('u') boolean unsafe) {
DeleteBiomeFilterSimple filter = new DeleteBiomeFilterSimple(biome);
DeleteBiomeFilterSimple result = runWithWorld(player, folder, filter, true, unsafe);
if (result != null) player.print(BBC.getPrefix() + BBC.VISITOR_BLOCK.format(result.getTotal()));

Datei anzeigen

@ -52,7 +52,7 @@ import com.sk89q.worldedit.util.command.binding.Switch;
import com.sk89q.worldedit.util.command.parametric.Optional;
import com.sk89q.worldedit.util.command.parametric.ParameterException;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -527,7 +527,7 @@ public class CFICommands extends MethodCommands {
" - If a mask is used, the biome will be set anywhere the mask applies"
)
@CommandPermissions("worldedit.anvil.cfi")
public void biome(FawePlayer fp, BaseBiome biome, @Optional FawePrimitiveBinding.ImageUri image, @Optional Mask mask, @Switch('w') boolean disableWhiteOnly) throws ParameterException{
public void biome(FawePlayer fp, BiomeType biome, @Optional FawePrimitiveBinding.ImageUri image, @Optional Mask mask, @Switch('w') boolean disableWhiteOnly) throws ParameterException{
HeightMapMCAGenerator gen = assertSettings(fp).getGenerator();
if (image != null) gen.setBiome(load(image), (byte) biome.getId(), !disableWhiteOnly);
else if (mask != null) gen.setBiome(mask, (byte) biome.getId());

Datei anzeigen

@ -17,7 +17,7 @@ import com.boydti.fawe.util.TaskManager;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.util.ArrayDeque;
@ -119,7 +119,7 @@ public abstract class MappedFaweQueue<WORLD, CHUNK, CHUNKSECTIONS, SECTION> impl
public abstract WORLD getImpWorld();
public abstract boolean regenerateChunk(WORLD world, int x, int z, BaseBiome biome, Long seed);
public abstract boolean regenerateChunk(WORLD world, int x, int z, BiomeType biome, Long seed);
@Override
public abstract FaweChunk getFaweChunk(int x, int z);
@ -140,7 +140,7 @@ public abstract class MappedFaweQueue<WORLD, CHUNK, CHUNKSECTIONS, SECTION> impl
}
@Override
public boolean regenerateChunk(int x, int z, BaseBiome biome, Long seed) {
public boolean regenerateChunk(int x, int z, BiomeType biome, Long seed) {
return regenerateChunk(getWorld(), x, z, biome, seed);
}
@ -193,7 +193,7 @@ public abstract class MappedFaweQueue<WORLD, CHUNK, CHUNKSECTIONS, SECTION> impl
}
@Override
public boolean setBiome(int x, int z, BaseBiome biome) {
public boolean setBiome(int x, int z, BiomeType biome) {
int cx = x >> 4;
int cz = z >> 4;
FaweChunk chunk = map.getFaweChunk(cx, cz);

Datei anzeigen

@ -3,7 +3,7 @@ package com.boydti.fawe.example;
import com.boydti.fawe.object.FaweChunk;
import com.boydti.fawe.object.FaweQueue;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.util.HashMap;
@ -97,7 +97,7 @@ public class NullFaweChunk extends FaweChunk<Void> {
}
@Override
public void setBiome(int x, int z, BaseBiome biome) {
public void setBiome(int x, int z, BiomeType biome) {
}

Datei anzeigen

@ -33,7 +33,7 @@ import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.TreeGenerator;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -689,7 +689,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return this.setBiome(position.getBlockX(), position.getBlockZ(), biome);
}
@ -741,7 +741,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
}
@Override
public boolean setBiome(int x, int z, BaseBiome biome) {
public boolean setBiome(int x, int z, BiomeType biome) {
int index = z * getWidth() + x;
if (index < 0 || index >= getArea()) return false;
biomes.setByte(index, (byte) biome.getId());
@ -829,7 +829,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
}
@Override
public boolean regenerateChunk(int x, int z, @Nullable BaseBiome biome, @Nullable Long seed) {
public boolean regenerateChunk(int x, int z, @Nullable BiomeType biome, @Nullable Long seed) {
// Unsupported
return false;
}
@ -1010,7 +1010,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
return FaweCache.CACHE_BIOME[getBiomeId(position.getBlockX(), position.getBlockZ())];
}

Datei anzeigen

@ -17,7 +17,7 @@ import com.boydti.fawe.object.collection.IterableThreadLocal;
import com.boydti.fawe.util.MainUtil;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
@ -643,7 +643,7 @@ public class MCAQueue extends NMSMappedFaweQueue<FaweQueue, FaweChunk, FaweChunk
}
@Override
public boolean regenerateChunk(FaweQueue faweQueue, int x, int z, BaseBiome biome, Long seed) {
public boolean regenerateChunk(FaweQueue faweQueue, int x, int z, BiomeType biome, Long seed) {
throw new UnsupportedOperationException("Not supported");
}

Datei anzeigen

@ -19,7 +19,7 @@ import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.SimpleWorld;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.io.File;
@ -108,12 +108,12 @@ public class MCAWorld implements SimpleWorld {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
return extent.getBiome(position);
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return extent.setBiome(position, biome);
}

Datei anzeigen

@ -3,12 +3,12 @@ package com.boydti.fawe.jnbt.anvil.filters;
import com.boydti.fawe.jnbt.anvil.MCAChunk;
import com.boydti.fawe.jnbt.anvil.MCAFilterCounter;
import com.boydti.fawe.object.number.MutableLong;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
public class DeleteBiomeFilterSimple extends MCAFilterCounter {
private final int id;
public DeleteBiomeFilterSimple(BaseBiome biome) {
public DeleteBiomeFilterSimple(BiomeType biome) {
this.id = biome.getId();
}

Datei anzeigen

@ -4,7 +4,7 @@ import com.boydti.fawe.FaweCache;
import com.boydti.fawe.object.changeset.FaweChangeSet;
import com.boydti.fawe.object.queue.DelegateFaweQueue;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -43,7 +43,7 @@ public class ChangeSetFaweQueue extends DelegateFaweQueue {
}
@Override
public boolean setBiome(int x, int z, BaseBiome biome) {
public boolean setBiome(int x, int z, BiomeType biome) {
if (super.setBiome(x, z, biome)) {
int oldBiome = getParent().getBiomeId(x, z);
if (oldBiome != biome.getId()) {

Datei anzeigen

@ -5,7 +5,7 @@ import com.boydti.fawe.util.MainUtil;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.ArrayDeque;
@ -289,7 +289,7 @@ public abstract class FaweChunk<T> implements Callable<FaweChunk> {
*/
public abstract CompoundTag getTile(int x, int y, int z);
public void setBiome(final int x, final int z, final BaseBiome biome) {
public void setBiome(final int x, final int z, final BiomeType biome) {
setBiome(x, z, (byte) biome.getId());
}

Datei anzeigen

@ -630,7 +630,6 @@ public abstract class FawePlayer<T> extends Metadatable {
cancel(true);
if (Settings.IMP.HISTORY.DELETE_ON_LOGOUT) {
session = getSession();
WorldEdit.getInstance().getSessionManager().remove(toWorldEditPlayer());
session.setClipboard(null);
session.clearHistory();
session.unregisterTools(getPlayer());

Datei anzeigen

@ -21,7 +21,7 @@ import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -107,7 +107,7 @@ public interface FaweQueue extends HasFaweQueue, Extent {
}
@Override
default BaseBiome getBiome(BlockVector2 position) {
default BiomeType getBiome(BlockVector2 position) {
return null;
}
@ -127,7 +127,7 @@ public interface FaweQueue extends HasFaweQueue, Extent {
}
@Override
default boolean setBiome(BlockVector2 position, BaseBiome biome) {
default boolean setBiome(BlockVector2 position, BiomeType biome) {
return setBiome(position.getBlockX(), position.getBlockZ(), biome);
}
@ -214,7 +214,7 @@ public interface FaweQueue extends HasFaweQueue, Extent {
void removeEntity(int x, int y, int z, UUID uuid);
boolean setBiome(final int x, final int z, final BaseBiome biome);
boolean setBiome(final int x, final int z, final BiomeType biome);
FaweChunk getFaweChunk(int x, int z);
@ -333,7 +333,7 @@ public interface FaweQueue extends HasFaweQueue, Extent {
return regenerateChunk(x, z, null, null);
}
boolean regenerateChunk(int x, int z, @Nullable BaseBiome biome, @Nullable Long seed);
boolean regenerateChunk(int x, int z, @Nullable BiomeType biome, @Nullable Long seed);
default void startSet(boolean parallel) {
}

Datei anzeigen

@ -17,7 +17,7 @@ import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.Vector2;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -105,8 +105,8 @@ public class HistoryExtent extends AbstractDelegateExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome newBiome) {
BaseBiome oldBiome = this.getBiome(position);
public boolean setBiome(BlockVector2 position, BiomeType newBiome) {
BiomeType oldBiome = this.getBiome(position);
if (oldBiome.getId() != newBiome.getId()) {
this.changeSet.addBiomeChange(position.getBlockX(), position.getBlockZ(), oldBiome, newBiome);
return getExtent().setBiome(position, newBiome);
@ -116,8 +116,8 @@ public class HistoryExtent extends AbstractDelegateExtent {
}
@Override
public boolean setBiome(int x, int y, int z, BaseBiome newBiome) {
BaseBiome oldBiome = this.getBiome(BlockVector2.at(x, z));
public boolean setBiome(int x, int y, int z, BiomeType newBiome) {
BiomeType oldBiome = this.getBiome(BlockVector2.at(x, z));
if (oldBiome.getId() != newBiome.getId()) {
this.changeSet.addBiomeChange(x, z, oldBiome, newBiome);
return getExtent().setBiome(x, y, z, newBiome);

Datei anzeigen

@ -11,7 +11,7 @@ import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
public class MaskedFaweQueue extends DelegateFaweQueue {
@ -88,7 +88,7 @@ public class MaskedFaweQueue extends DelegateFaweQueue {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
if (region.contains(position.getBlockX(), position.getBlockZ())) {
return super.setBiome(position, biome);
}
@ -96,7 +96,7 @@ public class MaskedFaweQueue extends DelegateFaweQueue {
}
@Override
public boolean setBiome(int x, int z, BaseBiome biome) {
public boolean setBiome(int x, int z, BiomeType biome) {
if (region.contains(x, z)) {
return super.setBiome(x, z, biome);
}

Datei anzeigen

@ -5,7 +5,7 @@ import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.extent.inventory.BlockBag;
import com.sk89q.worldedit.history.change.Change;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.util.ArrayList;
import java.util.Iterator;
@ -49,7 +49,7 @@ public class NullChangeSet extends FaweChangeSet {
}
@Override
public void addBiomeChange(int x, int z, BaseBiome from, BaseBiome to) {
public void addBiomeChange(int x, int z, BiomeType from, BiomeType to) {
}

Datei anzeigen

@ -18,7 +18,7 @@ import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.TreeGenerator;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.weather.WeatherType;
import com.sk89q.worldedit.world.weather.WeatherTypes;
@ -41,7 +41,7 @@ public abstract class ImmutableVirtualWorld implements VirtualWorld {
}
@Override
public boolean regenerateChunk(int x, int z, @Nullable BaseBiome biome, @Nullable Long seed) {
public boolean regenerateChunk(int x, int z, @Nullable BiomeType biome, @Nullable Long seed) {
return unsupported();
}
@ -61,7 +61,7 @@ public abstract class ImmutableVirtualWorld implements VirtualWorld {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
return FaweCache.getBiome(0);
}
@ -232,7 +232,7 @@ public abstract class ImmutableVirtualWorld implements VirtualWorld {
}
@Override
public boolean setBiome(int x, int z, BaseBiome biome) {
public boolean setBiome(int x, int z, BiomeType biome) {
return unsupported();
}

Datei anzeigen

@ -13,7 +13,7 @@ import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
@ -61,7 +61,7 @@ public class VisualExtent extends AbstractDelegateExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
// Do nothing
return false;
}

Datei anzeigen

@ -4,17 +4,17 @@ import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.history.UndoContext;
import com.sk89q.worldedit.history.change.Change;
import com.sk89q.worldedit.math.MutableBlockVector2;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
public class MutableBiomeChange implements Change {
private MutableBlockVector2 mutable = new MutableBlockVector2();
private BaseBiome from;
private BaseBiome to;
private BiomeType from;
private BiomeType to;
public MutableBiomeChange() {
this.from = new BaseBiome(0);
this.to = new BaseBiome(0);
this.from = new BiomeType(0);
this.to = new BiomeType(0);
}
public void setBiome(int x, int z, int from, int to) {

Datei anzeigen

@ -13,7 +13,7 @@ import com.sk89q.worldedit.history.change.EntityCreate;
import com.sk89q.worldedit.history.change.EntityRemove;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.Iterator;
@ -89,7 +89,7 @@ public class AbstractDelegateChangeSet extends FaweChangeSet {
}
@Override
public void addBiomeChange(int x, int z, BaseBiome from, BaseBiome to) {
public void addBiomeChange(int x, int z, BiomeType from, BiomeType to) {
parent.addBiomeChange(x, z, from, to);
}

Datei anzeigen

@ -8,7 +8,7 @@ import com.google.common.base.Function;
import com.google.common.collect.Iterators;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.history.change.Change;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
@ -79,7 +79,7 @@ public class AnvilHistory extends FaweChangeSet implements IAnvilHistory {
}
@Override
public void addBiomeChange(int x, int z, BaseBiome from, BaseBiome to) {
public void addBiomeChange(int x, int z, BiomeType from, BiomeType to) {
throw new UnsupportedOperationException("Only anvil operations are supported");
}

Datei anzeigen

@ -7,7 +7,7 @@ import com.boydti.fawe.object.change.CFIChange;
import com.boydti.fawe.util.MainUtil;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.history.change.Change;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
@ -65,7 +65,7 @@ public class CFIChangeSet extends FaweChangeSet {
}
@Override
public void addBiomeChange(int x, int z, BaseBiome from, BaseBiome to) {
public void addBiomeChange(int x, int z, BiomeType from, BiomeType to) {
throw new UnsupportedOperationException("Only CFI operations are supported");
}

Datei anzeigen

@ -8,7 +8,7 @@ import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.extent.inventory.BlockBag;
import com.sk89q.worldedit.history.change.Change;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.util.ArrayList;
import java.util.Iterator;
@ -59,7 +59,7 @@ public class CPUOptimizedChangeSet extends FaweChangeSet {
}
@Override
public void addBiomeChange(int x, int z, BaseBiome from, BaseBiome to) {
public void addBiomeChange(int x, int z, BiomeType from, BiomeType to) {
throw new UnsupportedOperationException("Invalid mode");
}

Datei anzeigen

@ -25,7 +25,7 @@ import com.sk89q.worldedit.history.changeset.ChangeSet;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.Iterator;
@ -141,7 +141,7 @@ public abstract class FaweChangeSet implements ChangeSet {
public abstract void addEntityCreate(CompoundTag tag);
public abstract void addBiomeChange(int x, int z, BaseBiome from, BaseBiome to);
public abstract void addBiomeChange(int x, int z, BiomeType from, BiomeType to);
public Iterator<Change> getIterator(BlockBag blockBag, int mode, boolean redo) {
return getIterator(redo);

Datei anzeigen

@ -16,7 +16,7 @@ import com.sk89q.jnbt.NBTOutputStream;
import com.sk89q.worldedit.extent.inventory.BlockBag;
import com.sk89q.worldedit.history.change.Change;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.io.EOFException;
@ -325,7 +325,7 @@ public abstract class FaweStreamChangeSet extends FaweChangeSet {
}
@Override
public void addBiomeChange(int x, int z, BaseBiome from, BaseBiome to) {
public void addBiomeChange(int x, int z, BiomeType from, BiomeType to) {
blockSize++;
try {
OutputStream os = getBiomeOS();

Datei anzeigen

@ -8,7 +8,7 @@ import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
@ -47,12 +47,12 @@ public class AbstractDelegateFaweClipboard extends FaweClipboard {
}
@Override
public BaseBiome getBiome(int x, int z) {
public BiomeType getBiome(int x, int z) {
return parent.getBiome(x, z);
}
@Override
public BaseBiome getBiome(int index) {
public BiomeType getBiome(int index) {
return parent.getBiome(index);
}

Datei anzeigen

@ -14,7 +14,7 @@ import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
@ -84,15 +84,15 @@ public class CPUOptimizedClipboard extends FaweClipboard {
}
@Override
public BaseBiome getBiome(int index) {
public BiomeType getBiome(int index) {
if (!hasBiomes()) {
return EditSession.nullBiome;
return null;
}
return FaweCache.CACHE_BIOME[biomes[index] & 0xFF];
}
@Override
public BaseBiome getBiome(int x, int z) {
public BiomeType getBiome(int x, int z) {
return getBiome(getIndex(x, 0, z));
}

Datei anzeigen

@ -19,7 +19,7 @@ import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -140,9 +140,9 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable {
}
@Override
public BaseBiome getBiome(int index) {
public BiomeType getBiome(int index) {
if (!hasBiomes()) {
return EditSession.nullBiome;
return null;
}
int biomeId = mbb.get(HEADER_SIZE + (volume << 2) + index) & 0xFF;
return FaweCache.CACHE_BIOME[biomeId];
@ -162,7 +162,7 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable {
}
@Override
public BaseBiome getBiome(int x, int z) {
public BiomeType getBiome(int x, int z) {
return getBiome(getIndex(x, 0, z));
}

Datei anzeigen

@ -13,7 +13,7 @@ import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
@ -84,8 +84,8 @@ public class EmptyClipboard implements Clipboard {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
return EditSession.nullBiome;
public BiomeType getBiome(BlockVector2 position) {
return null;
}
@Override
@ -94,7 +94,7 @@ public class EmptyClipboard implements Clipboard {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return false;
}

Datei anzeigen

@ -12,7 +12,7 @@ import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
@ -35,9 +35,9 @@ public abstract class FaweClipboard {
public abstract boolean setBiome(int x, int z, int biome);
public abstract BaseBiome getBiome(int x, int z);
public abstract BiomeType getBiome(int x, int z);
public abstract BaseBiome getBiome(int index);
public abstract BiomeType getBiome(int index);
public abstract BaseBlock getBlock(int index);

Datei anzeigen

@ -16,7 +16,7 @@ import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -117,15 +117,15 @@ public class MemoryOptimizedClipboard extends FaweClipboard {
}
@Override
public BaseBiome getBiome(int index) {
public BiomeType getBiome(int index) {
if (!hasBiomes()) {
return EditSession.nullBiome;
return null;
}
return FaweCache.CACHE_BIOME[biomes[index] & 0xFF];
}
@Override
public BaseBiome getBiome(int x, int z) {
public BiomeType getBiome(int x, int z) {
return getBiome(getIndex(x, 0, z));
}

Datei anzeigen

@ -1,7 +1,7 @@
package com.boydti.fawe.object.clipboard;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.world.biome.BaseBiome;
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;
@ -36,7 +36,7 @@ public class OffsetFaweClipboard extends AbstractDelegateFaweClipboard {
}
@Override
public BaseBiome getBiome(int x, int z) {
public BiomeType getBiome(int x, int z) {
return super.getBiome(ox + x, oz + z);
}

Datei anzeigen

@ -10,7 +10,7 @@ import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
@ -51,7 +51,7 @@ public abstract class ReadOnlyClipboard extends FaweClipboard {
}
@Override
public BaseBiome getBiome(int index) {
public BiomeType getBiome(int index) {
throw new UnsupportedOperationException("World based clipboards do not provide index access");
}
@ -80,7 +80,7 @@ public abstract class ReadOnlyClipboard extends FaweClipboard {
public abstract BaseBlock getBlock(int x, int y, int z);
@Override
public abstract BaseBiome getBiome(int x, int z);
public abstract BiomeType getBiome(int x, int z);
@Override
public abstract List<? extends Entity> getEntities();

Datei anzeigen

@ -16,7 +16,7 @@ import com.sk89q.worldedit.math.MutableBlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector2;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.util.ArrayList;
import java.util.List;
@ -55,7 +55,7 @@ public class WorldCopyClipboard extends ReadOnlyClipboard {
}
@Override
public BaseBiome getBiome(int x, int z) {
public BiomeType getBiome(int x, int z) {
return extent.getBiome(MutableBlockVector2.setComponents(mx + x, mz + z));
}

Datei anzeigen

@ -8,7 +8,7 @@ import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector3;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
public class BlockTranslateExtent extends AbstractDelegateExtent {
@ -36,17 +36,17 @@ public class BlockTranslateExtent extends AbstractDelegateExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return super.setBiome(position.add(dx, dz), biome);
}
@Override
public boolean setBiome(int x, int y, int z, BaseBiome biome) {
public boolean setBiome(int x, int y, int z, BiomeType biome) {
return super.setBiome(x + dx, y + dy, z + dz, biome);
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
return super.getBiome(position.add(dx, dz));
}

Datei anzeigen

@ -12,7 +12,7 @@ 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.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.Collections;
@ -55,7 +55,7 @@ public class EmptyExtent implements Extent {
}
@Nullable
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
return null;
}
@ -65,12 +65,12 @@ public class EmptyExtent implements Extent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return false;
}
@Override
public boolean setBiome(int x, int y, int z, BaseBiome biome) {
public boolean setBiome(int x, int y, int z, BiomeType biome) {
return false;
}

Datei anzeigen

@ -17,7 +17,7 @@ import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
@ -106,7 +106,7 @@ public class FastWorldEditExtent extends AbstractDelegateExtent implements HasFa
}
@Override
public BaseBiome getBiome(final BlockVector2 position) {
public BiomeType getBiome(final BlockVector2 position) {
return FaweCache.CACHE_BIOME[queue.getBiomeId(position.getBlockX(), position.getBlockZ())];
}
@ -165,7 +165,7 @@ public class FastWorldEditExtent extends AbstractDelegateExtent implements HasFa
}
@Override
public boolean setBiome(final BlockVector2 position, final BaseBiome biome) {
public boolean setBiome(final BlockVector2 position, final BiomeType biome) {
queue.setBiome(position.getBlockX(), position.getBlockZ(), biome);
return true;
}

Datei anzeigen

@ -14,7 +14,7 @@ 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.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.Collection;
@ -79,7 +79,7 @@ public abstract class FaweRegionExtent extends ResettableExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
if (!contains(position)) {
if (!limit.MAX_FAILS()) {
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
@ -90,7 +90,7 @@ public abstract class FaweRegionExtent extends ResettableExtent {
}
@Override
public boolean setBiome(int x, int y, int z, BaseBiome biome) {
public boolean setBiome(int x, int y, int z, BiomeType biome) {
if (!contains(x, y, z)) {
if (!limit.MAX_FAILS()) {
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
@ -101,12 +101,12 @@ public abstract class FaweRegionExtent extends ResettableExtent {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
if (!contains(position)) {
if (!limit.MAX_FAILS()) {
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
}
return EditSession.nullBiome;
return null;
}
return super.getBiome(position);
}

Datei anzeigen

@ -8,7 +8,7 @@ import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.Collection;
@ -46,7 +46,7 @@ public class MultiTransform extends RandomTransform {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
boolean result = false;
for (AbstractDelegateExtent extent : extents) result |= extent.setBiome(position, biome);
return result;

Datei anzeigen

@ -14,7 +14,7 @@ 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.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import javax.annotation.Nullable;
@ -48,7 +48,7 @@ public class NullExtent extends FaweRegionExtent {
}
@Override
public BaseBiome getBiome(final BlockVector2 arg0) {
public BiomeType getBiome(final BlockVector2 arg0) {
if(reason != null) {
throw new FaweException(reason);
}else {
@ -75,7 +75,7 @@ public class NullExtent extends FaweRegionExtent {
}
@Override
public boolean setBiome(final BlockVector2 arg0, final BaseBiome arg1) {
public boolean setBiome(final BlockVector2 arg0, final BiomeType arg1) {
if(reason != null) {
throw new FaweException(reason);
}else {

Datei anzeigen

@ -5,7 +5,7 @@ import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector2;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
public class OffsetExtent extends ResettableExtent {
@ -20,12 +20,12 @@ public class OffsetExtent extends ResettableExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return getExtent().setBiome(mutable.setComponents(position.getBlockX() + dx, position.getBlockZ() + dz), biome);
}
@Override
public boolean setBiome(int x, int y, int z, BaseBiome biome) {
public boolean setBiome(int x, int y, int z, BiomeType biome) {
return getExtent().setBiome(x + dx, y + dy, z + dz, biome);
}

Datei anzeigen

@ -9,7 +9,7 @@ import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector3;
import com.sk89q.worldedit.math.MutableVector3;
import com.sk89q.worldedit.math.transform.Transform;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
public class PositionTransformExtent extends ResettableExtent {
@ -67,7 +67,7 @@ public class PositionTransformExtent extends ResettableExtent {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
mutable.mutX(position.getBlockX());
mutable.mutZ(position.getBlockZ());
mutable.mutY(0);
@ -86,7 +86,7 @@ public class PositionTransformExtent extends ResettableExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
mutable.mutX(position.getBlockX());
mutable.mutZ(position.getBlockZ());
mutable.mutY(0);

Datei anzeigen

@ -16,7 +16,7 @@ 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.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.List;
@ -48,7 +48,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
}
@Override
public BaseBiome getBiome(final BlockVector2 position) {
public BiomeType getBiome(final BlockVector2 position) {
return super.getBiome(position);
}
@ -116,7 +116,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
}
@Override
public boolean setBiome(final BlockVector2 position, final BaseBiome biome) {
public boolean setBiome(final BlockVector2 position, final BiomeType biome) {
if (!limit.MAX_CHANGES()) {
WEManager.IMP.cancelEditSafe(this, BBC.WORLDEDIT_CANCEL_REASON_MAX_CHANGES);
return false;

Datei anzeigen

@ -6,7 +6,7 @@ import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector2;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.SplittableRandom;
@ -26,7 +26,7 @@ public class RandomOffsetTransform extends ResettableExtent {
}
@Override
public boolean setBiome(BlockVector2 pos, BaseBiome biome) {
public boolean setBiome(BlockVector2 pos, BiomeType biome) {
int x = pos.getBlockX() + random.nextInt(1 + (dx << 1)) - dx;
int z = pos.getBlockZ() + random.nextInt(1 + (dz << 1)) - dz;
return getExtent().setBiome(mutable.setComponents(x, z), biome);

Datei anzeigen

@ -9,7 +9,7 @@ import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector3;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import javax.annotation.Nullable;
@ -80,7 +80,7 @@ public class ScaleTransform extends ResettableExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
boolean result = false;
MutableBlockVector3 pos = new MutableBlockVector3(getPos(position.getBlockX(), 0, position.getBlockZ()));
double sx = pos.getX();

Datei anzeigen

@ -11,7 +11,7 @@ import com.sk89q.worldedit.extent.NullExtent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import javax.annotation.Nullable;
@ -50,7 +50,7 @@ public abstract class SelectTransform extends ResettableExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return getExtent(position).setBiome(position, biome);
}
}

Datei anzeigen

@ -7,7 +7,7 @@ import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.registry.BundledBlockData;
@ -16,7 +16,7 @@ public class TemporalExtent extends AbstractDelegateExtent {
private BlockStateHolder<?> block = EditSession.nullBlock;
private int bx, bz = Integer.MAX_VALUE;
private BaseBiome biome = EditSession.nullBiome;
private BiomeType biome = null;
/**
* Create a new instance.
@ -35,7 +35,7 @@ public class TemporalExtent extends AbstractDelegateExtent {
this.block = block;
}
public void set(int x, int z, BaseBiome biome) {
public void set(int x, int z, BiomeType biome) {
this.bx = x;
this.bz = z;
this.biome = biome;
@ -86,7 +86,7 @@ public class TemporalExtent extends AbstractDelegateExtent {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
if (position.getX() == bx && position.getZ() == bz) {
return biome;
}

Datei anzeigen

@ -9,7 +9,7 @@ import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector3;
import com.sk89q.worldedit.math.MutableVector3;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
public class TransformExtent extends BlockTransformExtent {
@ -98,7 +98,7 @@ public class TransformExtent extends BlockTransformExtent {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
mutable.mutX(position.getBlockX());
mutable.mutZ(position.getBlockZ());
mutable.mutY(0);
@ -117,7 +117,7 @@ public class TransformExtent extends BlockTransformExtent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
mutable.mutX(position.getBlockX());
mutable.mutZ(position.getBlockZ());
mutable.mutY(0);

Datei anzeigen

@ -5,13 +5,13 @@ import com.sk89q.worldedit.function.mask.AbstractExtentMask;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector2;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
public class BiomeMask extends AbstractExtentMask implements ResettableMask {
private final BaseBiome biome;
private final BiomeType biome;
private transient MutableBlockVector2 mutable = new MutableBlockVector2();
public BiomeMask(Extent extent, BaseBiome biome) {
public BiomeMask(Extent extent, BiomeType biome) {
super(extent);
this.biome = biome;
}

Datei anzeigen

@ -6,14 +6,14 @@ import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector2;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.io.IOException;
public class BiomePattern extends ExistingPattern {
private transient MutableBlockVector2 mutable = new MutableBlockVector2();
private final BaseBiome biome;
private final BiomeType biome;
public BiomePattern(Extent extent, BaseBiome biome) {
public BiomePattern(Extent extent, BiomeType biome) {
super(extent);
this.biome = biome;
}
@ -36,7 +36,7 @@ public class BiomePattern extends ExistingPattern {
return BiomePattern.this;
}
public BaseBiome getBiome() {
public BiomeType getBiome() {
return biome;
}

Datei anzeigen

@ -13,7 +13,7 @@ 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.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.io.IOException;
@ -102,8 +102,8 @@ public class PatternExtent extends AbstractPattern implements Extent {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
return new BaseBiome(0);
public BiomeType getBiome(BlockVector2 position) {
return new BiomeType(0);
}
@Override
@ -112,7 +112,7 @@ public class PatternExtent extends AbstractPattern implements Extent {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return false;
}

Datei anzeigen

@ -9,7 +9,7 @@ import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.MutableBlockVector2;
import com.sk89q.worldedit.world.biome.BaseBiome;
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;
@ -63,7 +63,7 @@ public class FaweQueueDelegateExtent extends DelegateFaweQueue {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return parentExtent.setBiome(position, biome);
}
@ -73,7 +73,7 @@ public class FaweQueueDelegateExtent extends DelegateFaweQueue {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
return parentExtent.getBiome(position);
}

Datei anzeigen

@ -28,7 +28,7 @@ import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.io.File;
import java.util.Collection;
@ -76,7 +76,7 @@ public interface IDelegateFaweQueue extends FaweQueue {
}
@Override
default BaseBiome getBiome(BlockVector2 position) {
default BiomeType getBiome(BlockVector2 position) {
return getQueue().getBiome(position);
}
@ -86,7 +86,7 @@ public interface IDelegateFaweQueue extends FaweQueue {
}
@Override
default boolean setBiome(BlockVector2 position, BaseBiome biome) {
default boolean setBiome(BlockVector2 position, BiomeType biome) {
return getQueue().setBiome(position, biome);
}
@ -146,7 +146,7 @@ public interface IDelegateFaweQueue extends FaweQueue {
}
@Override
default boolean setBiome(int x, int z, BaseBiome biome) {
default boolean setBiome(int x, int z, BiomeType biome) {
return getQueue().setBiome(x, z, biome);
}
@ -277,7 +277,7 @@ public interface IDelegateFaweQueue extends FaweQueue {
}
@Override
default boolean regenerateChunk(int x, int z, @Nullable BaseBiome biome, @Nullable Long seed) {
default boolean regenerateChunk(int x, int z, @Nullable BiomeType biome, @Nullable Long seed) {
return getQueue().regenerateChunk(x, z, biome, seed);
}

Datei anzeigen

@ -6,7 +6,7 @@ import com.boydti.fawe.object.visitor.FaweChunkVisitor;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.Map;
@ -171,7 +171,7 @@ public abstract class LazyFaweChunk<T extends FaweChunk> extends FaweChunk {
}
@Override
public void setBiome(int x, int z, BaseBiome biome) {
public void setBiome(int x, int z, BiomeType biome) {
internalGetOrCacheChunk().setBiome(x, z, biome);
}

Datei anzeigen

@ -9,7 +9,7 @@ import com.boydti.fawe.util.SetQueue;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -53,7 +53,7 @@ public class NullFaweQueue implements FaweQueue {
}
@Override
public boolean setBiome(int x, int z, BaseBiome biome) {
public boolean setBiome(int x, int z, BiomeType biome) {
return false;
}
@ -148,7 +148,7 @@ public class NullFaweQueue implements FaweQueue {
}
@Override
public boolean regenerateChunk(int x, int z, @Nullable BaseBiome biome, @Nullable Long seed) {
public boolean regenerateChunk(int x, int z, @Nullable BiomeType biome, @Nullable Long seed) {
return false;
}

Datei anzeigen

@ -32,7 +32,7 @@ import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.TargetBlock;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
@ -630,7 +630,7 @@ public class SchemVis extends ImmutableVirtualWorld {
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
// TODO Auto-generated method stub
return false;
}

Datei anzeigen

@ -11,7 +11,7 @@ import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.platform.Capability;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.biome.Biomes;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockTypes;
@ -84,7 +84,7 @@ public class FaweLocalBlockQueue extends LocalBlockQueue {
return PlotBlock.get(state.getInternalBlockTypeId(), state.getInternalPropertiesId());
}
private BaseBiome biome;
private BiomeType biome;
private String lastBiome;
private BiomeRegistry reg;
@ -94,7 +94,7 @@ public class FaweLocalBlockQueue extends LocalBlockQueue {
if (reg == null) {
reg = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.USER_COMMANDS).getRegistries().getBiomeRegistry();
}
List<BaseBiome> biomes = reg.getBiomes();
List<BiomeType> biomes = reg.getBiomes();
lastBiome = biome;
this.biome = Biomes.findBiomeByName(biomes, biome, reg);
}

Datei anzeigen

@ -23,7 +23,7 @@ import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.platform.Capability;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.biome.Biomes;
import com.sk89q.worldedit.world.registry.BiomeRegistry;
import java.util.HashSet;
@ -55,8 +55,8 @@ public class PlotSetBiome extends Command {
checkTrue(args.length == 1, Captions.COMMAND_SYNTAX, getUsage());
final HashSet<RegionWrapper> regions = plot.getRegions();
BiomeRegistry biomeRegistry = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.GAME_HOOKS).getRegistries().getBiomeRegistry();
List<BaseBiome> knownBiomes = biomeRegistry.getBiomes();
final BaseBiome biome = Biomes.findBiomeByName(knownBiomes, args[0], biomeRegistry);
List<BiomeType> knownBiomes = biomeRegistry.getBiomes();
final BiomeType biome = Biomes.findBiomeByName(knownBiomes, args[0], biomeRegistry);
if (biome == null) {
String biomes = StringMan.join(WorldUtil.IMP.getBiomeList(), Captions.BLOCK_LIST_SEPARATER.s());
Captions.NEED_BIOME.send(player);

Datei anzeigen

@ -19,7 +19,7 @@ import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.TreeGenerator;
import com.sk89q.worldedit.world.AbstractWorld;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BaseBiome;
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;
@ -246,12 +246,12 @@ public class WorldWrapper extends AbstractWorld {
}
@Override
public BaseBiome getBiome(BlockVector2 position) {
public BiomeType getBiome(BlockVector2 position) {
return parent.getBiome(position);
}
@Override
public boolean setBiome(BlockVector2 position, BaseBiome biome) {
public boolean setBiome(BlockVector2 position, BiomeType biome) {
return parent.setBiome(position, biome);
}

Datei anzeigen

@ -18,7 +18,7 @@ import com.sk89q.worldedit.regions.shape.WorldEditExpressionEnvironment;
import com.sk89q.worldedit.session.request.RequestSelection;
import com.sk89q.worldedit.util.command.binding.Switch;
import com.sk89q.worldedit.util.command.parametric.Optional;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockType;
import java.util.function.Predicate;
@ -414,7 +414,7 @@ public class MaskCommands extends MethodCommands {
min = 1,
max = 1
)
public Mask biome(Extent extent, BaseBiome biome) throws ExpressionException {
public Mask biome(Extent extent, BiomeType biome) throws ExpressionException {
return new BiomeMask(extent, biome);
}

Datei anzeigen

@ -28,7 +28,7 @@ import com.sk89q.worldedit.regions.shape.WorldEditExpressionEnvironment;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.util.command.binding.Range;
import com.sk89q.worldedit.util.command.parametric.Optional;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import java.awt.Color;
import java.io.IOException;
import java.util.Collections;
@ -268,7 +268,7 @@ public class PatternCommands extends MethodCommands {
min = 1,
max = 1
)
public Pattern biome(Actor actor, LocalSession session, Extent extent, BaseBiome biome) {
public Pattern biome(Actor actor, LocalSession session, Extent extent, BiomeType biome) {
return new BiomePattern(extent, biome);
}

Datei anzeigen

@ -58,7 +58,7 @@ import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.util.ArrayList;
import com.sk89q.worldedit.world.biome.BaseBiome;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.biome.Biomes;
import com.sk89q.worldedit.world.registry.BiomeRegistry;

Datei anzeigen

@ -55,7 +55,7 @@ public class ExpressionMaskParser extends InputParser<Mask> {
if (context.getActor() instanceof SessionOwner) {
SessionOwner owner = (SessionOwner) context.getActor();
IntSupplier timeout = () -> WorldEdit.getInstance().getSessionManager().get(owner).getTimeout();
return new ExpressionMask(exp, timeout);
// TODO timeout
}
return new ExpressionMask(exp);
} catch (ExpressionException e) {

Datei anzeigen

@ -0,0 +1,56 @@
/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.sk89q.worldedit.function.operation;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.util.LocatedBlock;
import java.util.List;
public class SetLocatedBlocks implements Operation {
private final Extent extent;
private final Iterable<LocatedBlock> blocks;
public SetLocatedBlocks(Extent extent, Iterable<LocatedBlock> blocks) {
this.extent = checkNotNull(extent);
this.blocks = checkNotNull(blocks);
}
@Override
public Operation resume(RunContext run) throws WorldEditException {
for (LocatedBlock block : blocks) {
extent.setBlock(block.getLocation(), block.getBlock());
}
return null;
}
@Override
public void cancel() {
}
@Override
public void addStatusMessages(List<String> messages) {
}
}

Datei anzeigen

@ -79,17 +79,17 @@ public abstract class ArbitraryBiomeShape {
*
* @param x X coordinate to be queried
* @param z Z coordinate to be queried
* @param defaultBaseBiome The default biome for the current column.
* @param defaultBiomeType The default biome for the current column.
* @return material to place or null to not place anything.
*/
protected abstract BiomeType getBiome(int x, int z, BiomeType defaultBaseBiome);
protected abstract BiomeType getBiome(int x, int z, BiomeType defaultBiomeType);
private BiomeType getBiomeCached(int x, int z, BiomeType baseBiome) {
private BiomeType getBiomeCached(int x, int z, BiomeType BiomeType) {
final int index = (z - cacheOffsetZ) + (x - cacheOffsetX) * cacheSizeZ;
final BiomeType cacheEntry = cache[index];
if (cacheEntry == null) {// unknown, fetch material
final BiomeType material = getBiome(x, z, baseBiome);
final BiomeType material = getBiome(x, z, BiomeType);
if (material == null) {
// outside
cache[index] = BiomeTypes.THE_VOID;
@ -108,13 +108,13 @@ public abstract class ArbitraryBiomeShape {
return cacheEntry;
}
private boolean isInsideCached(int x, int z, BiomeType baseBiome) {
private boolean isInsideCached(int x, int z, BiomeType BiomeType) {
final int index = (z - cacheOffsetZ) + (x - cacheOffsetX) * cacheSizeZ;
final BiomeType cacheEntry = cache[index];
if (cacheEntry == null) {
// unknown block, meaning they must be outside the extent at this stage, but might still be inside the shape
return getBiomeCached(x, z, baseBiome) != null;
return getBiomeCached(x, z, BiomeType) != null;
}
return cacheEntry != BiomeTypes.THE_VOID;
@ -124,11 +124,11 @@ public abstract class ArbitraryBiomeShape {
* Generates the shape.
*
* @param editSession The EditSession to use.
* @param baseBiome The default biome type.
* @param BiomeType The default biome type.
* @param hollow Specifies whether to generate a hollow shape.
* @return number of affected blocks.
*/
public int generate(EditSession editSession, BiomeType baseBiome, boolean hollow) {
public int generate(EditSession editSession, BiomeType BiomeType, boolean hollow) {
int affected = 0;
for (BlockVector2 position : getExtent()) {
@ -136,7 +136,7 @@ public abstract class ArbitraryBiomeShape {
int z = position.getBlockZ();
if (!hollow) {
final BiomeType material = getBiome(x, z, baseBiome);
final BiomeType material = getBiome(x, z, BiomeType);
if (material != null && material != BiomeTypes.THE_VOID) {
editSession.getWorld().setBiome(position, material);
++affected;
@ -145,26 +145,26 @@ public abstract class ArbitraryBiomeShape {
continue;
}
final BiomeType material = getBiomeCached(x, z, baseBiome);
final BiomeType material = getBiomeCached(x, z, BiomeType);
if (material == null) {
continue;
}
boolean draw = false;
do {
if (!isInsideCached(x + 1, z, baseBiome)) {
if (!isInsideCached(x + 1, z, BiomeType)) {
draw = true;
break;
}
if (!isInsideCached(x - 1, z, baseBiome)) {
if (!isInsideCached(x - 1, z, BiomeType)) {
draw = true;
break;
}
if (!isInsideCached(x, z + 1, baseBiome)) {
if (!isInsideCached(x, z + 1, BiomeType)) {
draw = true;
break;
}
if (!isInsideCached(x, z - 1, baseBiome)) {
if (!isInsideCached(x, z - 1, BiomeType)) {
draw = true;
break;
}