9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-28 11:39:07 +00:00

Read matter from IOB

This commit is contained in:
cyberpwn
2021-09-11 12:18:25 -04:00
parent 7e65416f10
commit 5a5704ee0b
2 changed files with 45 additions and 3 deletions

View File

@@ -392,6 +392,24 @@ public class IrisObject extends IrisRegistrant {
out.close();
}
public void shrinkwrap() {
BlockVector min = new BlockVector();
BlockVector max = new BlockVector();
for (BlockVector i : getBlocks().keySet()) {
min.setX(Math.min(min.getX(), i.getX()));
min.setY(Math.min(min.getY(), i.getY()));
min.setZ(Math.min(min.getZ(), i.getZ()));
max.setX(Math.max(max.getX(), i.getX()));
max.setY(Math.max(max.getY(), i.getY()));
max.setZ(Math.max(max.getZ(), i.getZ()));
}
w = max.getBlockX() - min.getBlockX();
h = max.getBlockY() - min.getBlockY();
d = max.getBlockZ() - min.getBlockZ();
}
public void clean() {
KMap<BlockVector, BlockData> d = new KMap<>();