9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-30 04:29:05 +00:00
This commit is contained in:
Daniel Mills
2020-09-07 20:10:22 -04:00
parent 1993639bf6
commit bdb86808a5
11 changed files with 173 additions and 64 deletions

View File

@@ -161,7 +161,7 @@ public class IrisDimension extends IrisRegistrant
@DontObfuscate
@Desc("Add slabs in post processing")
private boolean postProcessingSlabs = true;
@DontObfuscate
@Desc("Add painted walls in post processing")
private boolean postProcessingWalls = true;
@@ -600,10 +600,8 @@ public class IrisDimension extends IrisRegistrant
{
Iris.info("Calculating the Parallax Size in Parallel");
O<Integer> xg = new O<>();
O<Integer> yg = new O<>();
O<Integer> zg = new O<>();
xg.set(0);
yg.set(0);
zg.set(0);
KSet<String> objects = new KSet<>();
@@ -630,7 +628,6 @@ public class IrisDimension extends IrisRegistrant
BlockVector bv = IrisObject.sampleSize(g.getData().getObjectLoader().findFile(i));
t.lock();
xg.set(bv.getBlockX() > xg.get() ? bv.getBlockX() : xg.get());
yg.set(bv.getBlockY() > yg.get() ? bv.getBlockY() : yg.get());
zg.set(bv.getBlockZ() > zg.get() ? bv.getBlockZ() : zg.get());
t.unlock();
}
@@ -643,8 +640,8 @@ public class IrisDimension extends IrisRegistrant
}
g.getAccelerant().waitFor("tx-psize");
int x = Math.max(xg.get(), Math.max(yg.get(), zg.get()));
int z = x;
int x = xg.get();
int z = zg.get();
for(IrisDepositGenerator i : getDeposits())
{
@@ -698,8 +695,8 @@ public class IrisDimension extends IrisRegistrant
z = (Math.max(z, 16) + 16) >> 4;
x = x % 2 == 0 ? x + 1 : x;
z = z % 2 == 0 ? z + 1 : z;
z = Math.max(x, z);
x = z;
x = Math.max(x, z);
z = x;
Iris.info("Done! Parallax Size: " + x + ", " + z);
return new ChunkPosition(x, z);
});

View File

@@ -204,12 +204,13 @@ public class IrisObject extends IrisRegistrant
center = new BlockVector(w / 2, h / 2, d / 2);
}
@SuppressWarnings("resource")
public static BlockVector sampleSize(File file) throws IOException
{
FileInputStream in = new FileInputStream(file);
DataInputStream din = new DataInputStream(in);
BlockVector bv = new BlockVector(din.readInt(), din.readInt(), din.readInt());
din.close();
Iris.later(() -> din.close());
return bv;
}