Height warnings

This commit is contained in:
DanLT 2021-06-17 19:35:07 -08:00
parent 7efdcdc592
commit 449c2322b8
20 changed files with 40 additions and 26 deletions

View File

@ -118,6 +118,7 @@ public class IrisEngineCompound implements EngineCompound {
if(rootDimension.getDimensionalComposite().isEmpty())
{
burster = null;
// TODO: WARNING HEIGHT
engines = new Engine[]{new IrisEngine(new EngineTarget(world, rootDimension, data, 256, maximumThreads), this, 0)};
defaultEngine = engines[0];
}
@ -145,6 +146,7 @@ public class IrisEngineCompound implements EngineCompound {
{
IrisDimensionIndex index = rootDimension.getDimensionalComposite().get(i);
IrisDimension dimension = data.getDimensionLoader().load(index.getDimension());
// TODO: WARNING HEIGHT
engines[i] = new IrisEngine(new EngineTarget(world, dimension, data.copy(), (int)Math.floor(256D * (index.getWeight() / totalWeight)), index.isInverted(), threadDist), this, i);
engines[i].setMinHeight(buf);
buf += engines[i].getHeight();

View File

@ -135,6 +135,7 @@ public class IrisCaveModifier extends EngineAssignedModifier<BlockData>
return;
}
// TODO: WARNING HEIGHT
int ceiling = -256;
int floor = 512;

View File

@ -87,6 +87,7 @@ public class IrisDepositModifier extends EngineAssignedModifier<BlockData> {
}
int i = Math.max(0, k.getMinHeight());
// TODO: WARNING HEIGHT
int a = Math.min(height, Math.min(256, k.getMaxHeight()));
if(i >= a)

View File

@ -77,6 +77,7 @@ public class IrisRavineModifier extends EngineAssignedModifier<BlockData> {
n5 = 1;
}
float f6 = 1.0f;
// TODO: WARNING HEIGHT
for(int i = 0; i < 256; ++i)
{
if(i == 0 || random.nextInt(getDimension().getRavineRibRarity()) == 0)
@ -153,6 +154,7 @@ public class IrisRavineModifier extends EngineAssignedModifier<BlockData> {
{
for(int j = n10 + 1; !bl && j >= n9 - 1; --j)
{
// TODO: WARNING HEIGHT
if(j < 0 || j >= 256)
{
continue;

View File

@ -62,6 +62,7 @@ public class CommandIrisObjectP1 extends MortarCommand
if(args.length == 1 && args[0].equals("-l"))
{
// TODO: WARNING HEIGHT
g[0] = p.getTargetBlock((Set<Material>) null, 256).getLocation().clone();
}

View File

@ -62,6 +62,7 @@ public class CommandIrisObjectP2 extends MortarCommand
if(args.length == 1 && args[0].equals("-l"))
{
// TODO: WARNING HEIGHT
g[1] = p.getTargetBlock((Set<Material>) null, 256).getLocation().clone();
}

View File

@ -23,16 +23,16 @@ public class IrisBiomeGeneratorLink
@DependsOn({"min", "max"})
@Required
@MinNumber(-256)
@MaxNumber(256)
@MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The min block value (value + fluidHeight)")
private int min = 0;
@DependsOn({"min", "max"})
@Required
@MinNumber(-256)
@MaxNumber(256)
@MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The max block value (value + fluidHeight)")
private int max = 0;

View File

@ -32,14 +32,14 @@ public class IrisBiomePaletteLayer
@DependsOn({"minHeight", "maxHeight"})
@MinNumber(0)
@MaxNumber(256)
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The min thickness of this layer")
private int minHeight = 1;
@DependsOn({"minHeight", "maxHeight"})
@MinNumber(1)
@MaxNumber(256)
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The max thickness of this layer")
private int maxHeight = 1;

View File

@ -42,14 +42,14 @@ public class IrisDecorator
@DependsOn({"stackMin", "stackMax"})
@MinNumber(1)
@MaxNumber(256)
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The minimum repeat stack height (setting to 3 would stack 3 of <block> on top of each other")
private int stackMin = 1;
@DependsOn({"stackMin", "stackMax"})
@MinNumber(1)
@MaxNumber(256)
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The maximum repeat stack height")
private int stackMax = 1;
@ -74,7 +74,7 @@ public class IrisDecorator
@MinNumber(0)
@MaxNumber(1)
@DontObfuscate
@Desc("The chance for this decorator to decorate at a given X,Y coordinate. This is hit 256 times per chunk (per surface block)")
@Desc("The chance for this decorator to decorate at a given X,Y coordinate. This is hit 256 times per chunk (per surface block)") // TODO: WARNING HEIGHT
private double chance = 0.1;
@Required

View File

@ -19,14 +19,14 @@ public class IrisDepositGenerator
{
@Required
@MinNumber(0)
@MaxNumber(256)
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The minimum height this deposit can generate at")
private int minHeight = 7;
@Required
@MinNumber(0)
@MaxNumber(256)
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The maximum height this deposit can generate at")
private int maxHeight = 55;

View File

@ -38,7 +38,7 @@ public class IrisFeaturePositional {
private IrisFeature feature;
private transient AtomicCache<NoiseProvider> provider = new AtomicCache<>();
private static double BLOCK = 1D / 256D;
private static double BLOCK = 1D / 256D; // TODO: WARNING HEIGHT
public static IrisFeaturePositional read(DataInputStream s) throws IOException
{

View File

@ -21,27 +21,27 @@ import lombok.experimental.Accessors;
public class IrisObjectTranslate
{
@MinNumber(-128)
@MaxNumber(128)
@MinNumber(-128) // TODO: WARNING HEIGHT
@MaxNumber(128) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The x shift in blocks")
private int x = 0;
@Required
@MinNumber(-256)
@MaxNumber(256)
@MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The x shift in blocks")
private int y = 0;
@MinNumber(-128)
@MaxNumber(128)
@MinNumber(-128) // TODO: WARNING HEIGHT
@MaxNumber(128) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("Adds an additional amount of height randomly (translateY + rand(0 - yRandom))")
private int yRandom = 0;
@MinNumber(-128)
@MaxNumber(128)
@MinNumber(-128) // TODO: WARNING HEIGHT
@MaxNumber(128) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The x shift in blocks")
private int z = 0;

View File

@ -51,7 +51,7 @@ public class IrisRegion extends IrisRegistrant implements IRare
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
@MinNumber(1)
@MaxNumber(256)
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The rarity of the region")
private int rarity = 1;

View File

@ -26,16 +26,16 @@ public class IrisShapedGeneratorStyle
private IrisGeneratorStyle generator = new IrisGeneratorStyle(NoiseStyle.IRIS);
@Required
@MinNumber(-256)
@MaxNumber(256)
@MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The min block value")
private int min = 0;
@Required
@MinNumber(-256)
@MaxNumber(256)
@MinNumber(-256) // TODO: WARNING HEIGHT
@MaxNumber(256) // TODO: WARNING HEIGHT
@DontObfuscate
@Desc("The max block value")
private int max = 0;

View File

@ -79,6 +79,7 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
public void prepareSpawnAsync(long seed, String worldName, World.Environment env, int radius, Consumer<Double> progress, Runnable onComplete)
{
// TODO: WARNING HEIGHT
prepareSpawnAsync(256, seed, worldName, env, radius, progress, onComplete);
}

View File

@ -34,6 +34,7 @@ public interface EngineCompound extends Listener, Hotloadable, DataProvider
public default int getHeight()
{
// TODO: WARNING HEIGHT
return 256;
}

View File

@ -26,6 +26,7 @@ public class EngineTarget
this.height = height;
this.dimension = dimension;
this.data = data;
// TODO: WARNING HEIGHT
this.parallaxWorld = new ParallaxWorld(256, new File(world.getWorldFolder(), "iris/" + dimension.getLoadKey() + "/parallax"));
this.inverted = inverted;
this.burster = new MultiBurst(threads);

View File

@ -28,6 +28,7 @@ public class BiomeGridHunkView implements Hunk<Biome>
@Override
public int getHeight()
{
// TODO: WARNING HEIGHT
return 256;
}

View File

@ -15,7 +15,7 @@ public class IrisBiomeStorage
static
{
e = (int) Math.round(Math.log(16.0) / Math.log(2.0)) - 2;
f = (int) Math.round(Math.log(256.0) / Math.log(2.0)) - 2;
f = (int) Math.round(Math.log(256.0) / Math.log(2.0)) - 2; // TODO: WARNING HEIGHT
a = 1 << IrisBiomeStorage.e + IrisBiomeStorage.e + IrisBiomeStorage.f;
b = (1 << IrisBiomeStorage.e) - 1;
c = (1 << IrisBiomeStorage.f) - 1;
@ -38,6 +38,7 @@ public class IrisBiomeStorage
public void inject(BiomeGrid grid)
{
// TODO: WARNING HEIGHT
for(int i = 0; i < 256; i++)
{
for(int j = 0; j < 16; j++)

View File

@ -569,6 +569,7 @@ public class MathHelper
{
for(int var02 = 0; var02 < 257; ++var02)
{
// TODO: WARNING HEIGHT
double var1 = (double) var02 / 256.0;
double var3 = Math.asin(var1);
MathHelper.g[var02] = Math.cos(var3);