mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-19 07:11:02 +00:00
Added forceBlock field for surface decorator.
This commit is contained in:
@@ -55,7 +55,7 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator {
|
|||||||
bd = decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData());
|
bd = decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData());
|
||||||
|
|
||||||
if(!underwater) {
|
if(!underwater) {
|
||||||
if(!canGoOn(bd, bdx)) {
|
if(!canGoOn(bd, bdx) && !decorator.isForcePlace()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,8 +72,9 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator {
|
|||||||
((Bisected) bd).setHalf(Bisected.Half.BOTTOM);
|
((Bisected) bd).setHalf(Bisected.Half.BOTTOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(decorator.getForceBlock() != null)
|
||||||
|
data.set(x, height, z, decorator.getForceBlock().getBlockData(getData()));
|
||||||
data.set(x, height + 1, z, bd);
|
data.set(x, height + 1, z, bd);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if(height < getDimension().getFluidHeight()) {
|
if(height < getDimension().getFluidHeight()) {
|
||||||
max = getDimension().getFluidHeight();
|
max = getDimension().getFluidHeight();
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ public class IrisDecorator {
|
|||||||
private IrisGeneratorStyle variance = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle variance = NoiseStyle.STATIC.style();
|
||||||
@Desc("Forcefully place this decorant anywhere it is supposed to go even if it should not go on a specific surface block. For example, you could force tallgrass to place on top of stone by using this.")
|
@Desc("Forcefully place this decorant anywhere it is supposed to go even if it should not go on a specific surface block. For example, you could force tallgrass to place on top of stone by using this.")
|
||||||
private boolean forcePlace = false;
|
private boolean forcePlace = false;
|
||||||
|
@Desc("Forced the surface block of this decorant to be the specified block. Assumes forcePlace.")
|
||||||
|
private IrisBlockData forceBlock;
|
||||||
@DependsOn({"scaleStack", "stackMin", "stackMax"})
|
@DependsOn({"scaleStack", "stackMin", "stackMax"})
|
||||||
@Desc("If stackMax is set to true, use this to limit its max height for large caverns")
|
@Desc("If stackMax is set to true, use this to limit its max height for large caverns")
|
||||||
private int absoluteMaxStack = 30;
|
private int absoluteMaxStack = 30;
|
||||||
|
|||||||
Reference in New Issue
Block a user