Locky overrides

This commit is contained in:
cyberpwn
2021-08-22 03:30:39 -04:00
parent 5bf6687f1f
commit 4a6d58c36e
5 changed files with 64 additions and 34 deletions

View File

@@ -114,9 +114,9 @@ public class PlannedStructure {
int xx = i.getPosition().getX() + sx;
int zz = i.getPosition().getZ() + sz;
int offset = i.getPosition().getY() - startHeight;
int height = (i.getStructure().getStructure().getLockY() != -1
? i.getStructure().getStructure().getLockY()
: placer.getHighest(xx, zz, getData())) + offset + (v.getH() / 2);
int height = (i.getStructure().getStructure().getLockY() == -1 ? i.getStructure().getStructure().getOverrideYRange() != null
? (int)i.getStructure().getStructure().getOverrideYRange().get(rng, xx, zz, getData())
: i.getStructure().getStructure().getLockY() : placer.getHighest(xx, zz, getData())) + offset + (v.getH() / 2);
if (options.getMode().equals(ObjectPlaceMode.PAINT) || options.isVacuum()) {
height = -1;

View File

@@ -23,6 +23,7 @@ import com.volmit.iris.core.project.loader.IrisRegistrant;
import com.volmit.iris.engine.data.cache.AtomicCache;
import com.volmit.iris.engine.object.annotations.*;
import com.volmit.iris.engine.object.feature.IrisFeature;
import com.volmit.iris.engine.object.noise.IrisStyledRange;
import com.volmit.iris.util.collection.KList;
import com.volmit.iris.util.json.JSONObject;
import com.volmit.iris.util.plugin.VolmitSender;
@@ -61,7 +62,10 @@ public class IrisJigsawStructure extends IrisRegistrant {
@Desc("If set to true, iris will look for any pieces with only one connector in valid pools for edge connectors and attach them to 'terminate' the paths/piece connectors. Essentially it caps off ends. For example in a village, Iris would add houses to the ends of roads where possible. For terminators to be selected, they can only have one connector or they wont be chosen.")
private boolean terminate = true;
@Desc("Set to lock the starting peice to a y coordinate, otherwise the surface will be used.")
@Desc("Override the y range instead of placing on the height map")
private IrisStyledRange overrideYRange = null;
@Desc("Force Y to a specific value")
private int lockY = -1;
private transient AtomicCache<Integer> maxDimension = new AtomicCache<>();