geforkt von Mirrors/FastAsyncWorldEdit
Use BlockArrayClipboard for schem load
Dieser Commit ist enthalten in:
Ursprung
cfa147cf76
Commit
ac6f4ae358
@ -60,6 +60,13 @@ public class BlockArrayClipboard extends DelegateClipboard implements Clipboard,
|
||||
this(region, UUID.randomUUID());
|
||||
}
|
||||
|
||||
public BlockArrayClipboard(Clipboard clipboard, BlockVector3 offset) {
|
||||
super(clipboard);
|
||||
Region shifted = clipboard.getRegion();
|
||||
shifted.shift(offset);
|
||||
setRegion(shifted);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
|
@ -218,10 +218,9 @@ public class SpongeSchematicReader extends NBTSchematicReader {
|
||||
biomes = null;
|
||||
|
||||
BlockVector3 dimensions = BlockVector3.at(width, height, length);
|
||||
BlockVector3 origin = min;
|
||||
BlockVector3 origin = BlockVector3.ZERO;
|
||||
if (offsetX != Integer.MIN_VALUE && offsetY != Integer.MIN_VALUE && offsetZ != Integer.MIN_VALUE) {
|
||||
// origin = origin.subtract(BlockVector3.at(offsetX, offsetY, offsetZ));
|
||||
origin = BlockVector3.at(offsetX, offsetY, offsetZ);
|
||||
origin = BlockVector3.at(-offsetX, -offsetY, -offsetZ);
|
||||
}
|
||||
|
||||
Clipboard clipboard = createOutput.apply(dimensions);
|
||||
@ -341,6 +340,11 @@ public class SpongeSchematicReader extends NBTSchematicReader {
|
||||
}
|
||||
}
|
||||
clipboard.setOrigin(origin);
|
||||
|
||||
if (!min.equals(BlockVector3.ZERO)) {
|
||||
new BlockArrayClipboard(clipboard, min);
|
||||
}
|
||||
|
||||
return clipboard;
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren