Added scaleStack property to decorators

- Added scaleStack to decorators. It allows the size of the stack to scale to the size of the cave, using stackMin and stackMax as a min/max percentage
- Fixed stacks missing a block in size when the top block isn't defined
- Changed decorator stacks of a single block to place the top block instead of the body
- Fixed tab sound playing to other players
This commit is contained in:
StrangeOne101
2021-07-27 00:04:17 +12:00
parent 5fabec6a42
commit 21ce09a5b5
8 changed files with 47 additions and 11 deletions

View File

@@ -56,17 +56,20 @@ public class IrisDecorator {
@DependsOn({"stackMin", "stackMax"})
@MinNumber(1)
@MaxNumber(256) // TODO: WARNING HEIGHT
@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) // TODO: WARNING HEIGHT
@Desc("The maximum repeat stack height")
private int stackMax = 1;
@DependsOn({"stackMin", "stackMax"})
@Desc("Changes stackMin and stackMin from being absolute block heights and instead uses them as a percentage to scale the stack based on the cave height" +
"\n\nWithin a cave, setting them stackMin/max to 50 would make the stack 50% of the cave height")
private boolean scaleStack = false;
@Required
@MinNumber(0)
@MaxNumber(1)
@@ -168,7 +171,7 @@ public class IrisDecorator {
public BlockData getBlockDataForTop(IrisBiome b, RNG rng, double x, double z, IrisDataManager data) {
if (getBlockDataTops(data).isEmpty()) {
return null;
return getBlockData100(b, rng, x, z, data);
}
double xx = x / style.getZoom();