9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-29 03:59:06 +00:00

Decorator Updates and Fixes - Season 2

- Added SEA_FLOOR type to decorators which will only place bellow sea level/in water
- Implemented CEILING type to decorators, which will allow stacked blocks to place from the top down
- Fixed height variance not being implemented properly. The height of stacked blocks is now correct

Dev notes: This WILL require updates to the overworld pack as fixing some of the bugs here made some workarounds in the overworld pack kinda break
This commit is contained in:
StrangeOne101
2021-07-10 03:34:11 +12:00
parent f1dfb1c952
commit 7652aca406
8 changed files with 85 additions and 29 deletions

View File

@@ -85,7 +85,7 @@ public class IrisDecorator
return stackMin;
}
return getHeightGenerator(rng, data).fit(stackMin, stackMax, x / heightVariance.getZoom(), z / heightVariance.getZoom());
return getHeightGenerator(rng, data).fit(stackMin, stackMax, x / heightVariance.getZoom(), z / heightVariance.getZoom()) + 1;
}
public CNG getHeightGenerator(RNG rng, IrisDataManager data)
@@ -134,7 +134,7 @@ public class IrisDecorator
return getBlockData(data).get(0);
}
return getVarianceGenerator(rng, data).fit(getBlockData(data), zz, xx); //X and Z must be switched
return getVarianceGenerator(rng, data).fit(getBlockData(data), z, x); //X and Z must be switched
}
return null;
@@ -162,7 +162,7 @@ public class IrisDecorator
return getBlockData(data).get(0);
}
return getVarianceGenerator(rng, data).fit(getBlockData(data), zz, xx).clone(); //X and Z must be switched
return getVarianceGenerator(rng, data).fit(getBlockData(data), z, x).clone(); //X and Z must be switched
}
public BlockData getBlockDataForTop(IrisBiome b, RNG rng, double x, double z, IrisDataManager data)
@@ -182,7 +182,7 @@ public class IrisDecorator
return getBlockDataTops(data).get(0);
}
return getVarianceGenerator(rng, data).fit(getBlockDataTops(data), zz, xx); //X and Z must be switched
return getVarianceGenerator(rng, data).fit(getBlockDataTops(data), z, x); //X and Z must be switched
}
return null;