3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 18:40:05 +01:00

Fix combine-stages=false for FAVS

Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-14 14:31:27 +10:00
Ursprung 6502f0b5c6
Commit b3e1076868
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F

Datei anzeigen

@ -4,7 +4,11 @@ import com.boydti.fawe.FaweCache;
import com.boydti.fawe.object.changeset.FaweChangeSet; import com.boydti.fawe.object.changeset.FaweChangeSet;
import com.boydti.fawe.object.queue.DelegateFaweQueue; import com.boydti.fawe.object.queue.DelegateFaweQueue;
import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.biome.BiomeType; 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.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypes;
@ -25,8 +29,28 @@ public class ChangeSetFaweQueue extends DelegateFaweQueue {
} }
@Override @Override
public boolean setBlock(int x, int y, int z, int combinedId) { public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 p, B block) throws WorldEditException {
return setBlock(p.getX(), p.getY(), p.getZ(), block.getInternalId(), block.getNbtData());
}
@Override
public <B extends BlockStateHolder<B>> boolean setBlock(int x, int y, int z, B block) throws WorldEditException {
return setBlock(x, y, z, block.getInternalId(), block.getNbtData());
}
@Override
public boolean setBlock(int x, int y, int z, int combinedId, CompoundTag nbt) {
if (setBlock(x, y, z, combinedId)) {
if (nbt != null) {
set.addTileCreate(nbt);
}
return true;
}
return false;
}
@Override
public boolean setBlock(int x, int y, int z, int combinedId) {
if (super.setBlock(x, y, z, combinedId)) { if (super.setBlock(x, y, z, combinedId)) {
int combinedFrom = getParent().getCombinedId4Data(x, y, z); int combinedFrom = getParent().getCombinedId4Data(x, y, z);
BlockType typeFrom = BlockTypes.getFromStateId(combinedFrom); BlockType typeFrom = BlockTypes.getFromStateId(combinedFrom);