mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-03 16:36:00 +00:00
Added #816: Whitelist and blacklist for decorators.
This commit is contained in:
parent
27070f44c7
commit
0818f971fe
@ -62,8 +62,16 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(decorator.getForceBlock() != null)
|
if(decorator.getForceBlock() != null) {
|
||||||
data.set(x, height, z, fixFaces(decorator.getForceBlock().getBlockData(getData()), x, height, z));
|
data.set(x, height, z, fixFaces(decorator.getForceBlock().getBlockData(getData()), x, height, z));
|
||||||
|
} else if(!decorator.isForcePlace()) {
|
||||||
|
if(decorator.getWhitelist() != null && decorator.getWhitelist().stream().noneMatch(d -> d.getBlockData(getData()).equals(bdx))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(decorator.getBlacklist() != null && decorator.getWhitelist().stream().anyMatch(d -> d.getBlockData(getData()).equals(bdx))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(bd instanceof Bisected) {
|
if(bd instanceof Bisected) {
|
||||||
bd = bd.clone();
|
bd = bd.clone();
|
||||||
|
@ -55,6 +55,12 @@ public class IrisDecorator {
|
|||||||
private boolean forcePlace = false;
|
private boolean forcePlace = false;
|
||||||
@Desc("Forced the surface block of this decorant to be the specified block. Assumes forcePlace.")
|
@Desc("Forced the surface block of this decorant to be the specified block. Assumes forcePlace.")
|
||||||
private IrisBlockData forceBlock;
|
private IrisBlockData forceBlock;
|
||||||
|
@ArrayType(min = 1, type = IrisBlockData.class)
|
||||||
|
@Desc("When set, the decorator can only place onto any of these blocks.")
|
||||||
|
private KList<IrisBlockData> whitelist;
|
||||||
|
@ArrayType(min = 1, type = IrisBlockData.class)
|
||||||
|
@Desc("When set, the decorator will never place onto any of these blocks.")
|
||||||
|
private KList<IrisBlockData> blacklist;
|
||||||
@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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user