mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
parent
3d2052b0c8
commit
07a5ef5ab4
@ -2939,7 +2939,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
protected BiomeType getBiome(int x, int y, int z, BiomeType defaultBiomeType) {
|
||||
environment.setCurrentBlock(x, y, z);
|
||||
double scaledX = (x - zero.getX()) / unit.getX();
|
||||
double scaledY = (x - zero.getY()) / unit.getX();
|
||||
double scaledY = (y - zero.getY()) / unit.getY();
|
||||
double scaledZ = (z - zero.getZ()) / unit.getZ();
|
||||
|
||||
try {
|
||||
|
@ -311,18 +311,13 @@ public interface Clipboard extends Extent, Iterable<BlockVector3>, Closeable {
|
||||
|
||||
pasteBiomes &= Clipboard.this.hasBiomes();
|
||||
|
||||
MutableBlockVector3 blockVector3 = new MutableBlockVector3();
|
||||
blockVector3.setComponents(Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE);
|
||||
for (BlockVector3 pos : this) {
|
||||
BaseBlock block = pos.getFullBlock(this);
|
||||
int xx = pos.getX() + relx;
|
||||
int yy = pos.getZ() + relz;
|
||||
int zz = pos.getY() + rely;
|
||||
if (hasBiomes() && pos.getBlockY() == 0) {
|
||||
if (pasteBiomes && (xx != blockVector3.getBlockX() || zz != blockVector3.getBlockZ())) {
|
||||
blockVector3.setComponents(xx, yy, zz);
|
||||
extent.setBiome(blockVector3, Clipboard.this.getBiome(BlockVector3.at(pos.getX(), pos.getY(), pos.getZ())));
|
||||
}
|
||||
int yy = pos.getY() + rely;
|
||||
int zz = pos.getZ() + relz;
|
||||
if (pasteBiomes) {
|
||||
extent.setBiome(xx, yy, zz, Clipboard.this.getBiome(BlockVector3.at(pos.getX(), pos.getY(), pos.getZ())));
|
||||
}
|
||||
if (!pasteAir && block.getBlockType().getMaterial().isAir()) {
|
||||
continue;
|
||||
@ -330,7 +325,7 @@ public interface Clipboard extends Extent, Iterable<BlockVector3>, Closeable {
|
||||
if (pos.getY() < 0) {
|
||||
throw new RuntimeException("Y-Position cannot be less than 0!");
|
||||
}
|
||||
extent.setBlock(xx, pos.getY() + rely, zz, block);
|
||||
extent.setBlock(xx, yy, zz, block);
|
||||
}
|
||||
// Entity offset is the paste location subtract the clipboard origin (entity's location is already relative to the world origin)
|
||||
final int entityOffsetX = to.getBlockX() - origin.getBlockX();
|
||||
|
Loading…
Reference in New Issue
Block a user