mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-07 16:26:14 +00:00
Decorator Changes & Jigsaw Fix
- Fixed Jigsaw pieces with rotation disabled rotating randomly. They will now inherit the parent's rotation - Fixed pallete of blocks in stacked blocks not being chosen randomly on the Y axis Fixes for issues in the last commit: - Fixed CEILING decorators not working with scaleStack
This commit is contained in:
@@ -148,17 +148,19 @@ public class IrisDecorator {
|
||||
return null;
|
||||
}
|
||||
|
||||
public BlockData getBlockData100(IrisBiome b, RNG rng, double x, double z, IrisDataManager data) {
|
||||
public BlockData getBlockData100(IrisBiome b, RNG rng, double x, double y, double z, IrisDataManager data) {
|
||||
if (getBlockData(data).isEmpty()) {
|
||||
Iris.warn("Empty Block Data for " + b.getName());
|
||||
return null;
|
||||
}
|
||||
|
||||
double xx = x;
|
||||
double yy = y;
|
||||
double zz = z;
|
||||
|
||||
if (!getVarianceGenerator(rng, data).isStatic()) {
|
||||
xx = x / style.getZoom();
|
||||
yy = y / style.getZoom();
|
||||
zz = z / style.getZoom();
|
||||
}
|
||||
|
||||
@@ -166,23 +168,23 @@ public class IrisDecorator {
|
||||
return getBlockData(data).get(0);
|
||||
}
|
||||
|
||||
return getVarianceGenerator(rng, data).fit(getBlockData(data), z, x).clone(); //X and Z must be switched
|
||||
return getVarianceGenerator(rng, data).fit(getBlockData(data), z, y, x).clone(); //X and Z must be switched
|
||||
}
|
||||
|
||||
public BlockData getBlockDataForTop(IrisBiome b, RNG rng, double x, double z, IrisDataManager data) {
|
||||
public BlockData getBlockDataForTop(IrisBiome b, RNG rng, double x, double y, double z, IrisDataManager data) {
|
||||
if (getBlockDataTops(data).isEmpty()) {
|
||||
return getBlockData100(b, rng, x, z, data);
|
||||
return getBlockData100(b, rng, x, y, z, data);
|
||||
}
|
||||
|
||||
double xx = x / style.getZoom();
|
||||
double zz = z / style.getZoom();
|
||||
|
||||
if (getGenerator(rng, data).fitDouble(0D, 1D, xx, zz) <= chance) {
|
||||
if (getGenerator(rng, data).fitDouble(0D, 1D, xx, zz) <= chance) { //Exclude y from here
|
||||
if (getBlockData(data).size() == 1) {
|
||||
return getBlockDataTops(data).get(0);
|
||||
}
|
||||
|
||||
return getVarianceGenerator(rng, data).fit(getBlockDataTops(data), z, x); //X and Z must be switched
|
||||
return getVarianceGenerator(rng, data).fit(getBlockDataTops(data), z, y, x); //X and Z must be switched
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user