Drop 255 hardcode checks

This commit is contained in:
DanMB
2022-03-14 09:26:31 -07:00
parent 7f5b0559aa
commit 30ae065cb4
6 changed files with 11 additions and 11 deletions

View File

@@ -293,7 +293,7 @@ public class IrisBiome extends IrisRegistrant implements IRare {
height += i.getHeight(xg, x, z, seed);
}
return Math.max(0, Math.min(height, 255));
return Math.max(0, Math.min(height, xg.getHeight()));
}
public CNG getBiomeGenerator(RNG random) {
@@ -448,7 +448,7 @@ public class IrisBiome extends IrisRegistrant implements IRare {
}
for(int i = 0; i < maxDepth; i++) {
int offset = (255 - height) - i;
int offset = (512 - height) - i;
int index = offset % data.size();
real.add(data.get(Math.max(index, 0)));
}

View File

@@ -157,7 +157,7 @@ public class IrisDimension extends IrisRegistrant {
private KList<IrisJigsawStructurePlacement> jigsawStructures = new KList<>();
@Required
@MinNumber(0)
@MaxNumber(255)
@MaxNumber(1024)
@Desc("The fluid height for this dimension")
private int fluidHeight = 63;
@Desc("Define the min and max Y bounds of this dimension. Please keep in mind that Iris internally generates from 0 to (max - min). \n\nFor example at -64 to 320, Iris is internally generating to 0 to 384, then on outputting chunks, it shifts it down by the min height (64 blocks). The default is -64 to 320. \n\nThe fluid height is placed at (fluid height + min height). So a fluid height of 63 would actually show up in the world at 1.")

View File

@@ -35,14 +35,14 @@ import lombok.experimental.Accessors;
@Data
public class IrisObjectLimit {
@MinNumber(0)
@MaxNumber(255)
@MaxNumber(1024)
@Desc("The minimum height for placement (bottom of object)")
private int minimumHeight = 0;
@MinNumber(0)
@MaxNumber(255)
@MaxNumber(1024)
@Desc("The maximum height for placement (top of object)")
private int maximumHeight = 255;
private int maximumHeight = 512;
public boolean canPlace(int h, int l) {
return h <= maximumHeight && l >= minimumHeight;

View File

@@ -35,12 +35,12 @@ import lombok.experimental.Accessors;
@Data
public class IrisSlopeClip {
@MinNumber(0)
@MaxNumber(255)
@MaxNumber(1024)
@Desc("The minimum slope for placement")
private double minimumSlope = 0;
@MinNumber(0)
@MaxNumber(255)
@MaxNumber(1024)
@Desc("The maximum slope for placement")
private double maximumSlope = 10;