forked from SteamWar/SteamWar
Add Items
This commit is contained in:
@@ -507,6 +507,15 @@ public class WorldEditWrapper14 implements WorldEditWrapper {
|
||||
BlockVector3 offset = BlockVector3.at(offsetX, offsetY, offsetZ);
|
||||
origin = min.subtract(offset);
|
||||
region = new CuboidRegion(min, min.add(width, height, length).subtract(BlockVector3.ONE));
|
||||
} else if (metadataTag != null && metadataTag.containsKey("WorldEdit")){
|
||||
CompoundTag weMeta = requireTag(metadataTag.getValue(), "WorldEdit", CompoundTag.class);
|
||||
int[] off = requireTag(weMeta.getValue(), "Origin", IntArrayTag.class).getValue();
|
||||
if (off.length != 3) {
|
||||
throw new IOException("Invalid offset specified in schematic.");
|
||||
}
|
||||
|
||||
origin = BlockVector3.at(off[0], off[1], off[2]);
|
||||
region = new CuboidRegion(min.add(origin), min.add(origin).add(width, height, length).subtract(BlockVector3.ONE));
|
||||
} else {
|
||||
origin = min;
|
||||
region = new CuboidRegion(origin, origin.add(width, height, length).subtract(BlockVector3.ONE));
|
||||
|
||||
Reference in New Issue
Block a user