diff --git a/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java b/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java index e1ffc33df..92ac8c54b 100644 --- a/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java +++ b/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java @@ -114,7 +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 = placer.getHighest(xx, zz, getData()) + offset + (v.getH() / 2); + int height = i.getStructure().getStructure().getLockY() != -1 + ? i.getStructure().getStructure().getLockY() + : placer.getHighest(xx, zz, getData()) + offset + (v.getH() / 2); if (options.getMode().equals(ObjectPlaceMode.PAINT) || options.isVacuum()) { height = -1; @@ -124,7 +126,6 @@ public class PlannedStructure { int h = vo.place(xx, height, zz, placer, options, rng, (b) -> e.set(b.getX(), b.getY(), b.getZ(), v.getLoadKey() + "@" + id), null, getData()); - for (IrisJigsawPieceConnector j : i.getAvailableConnectors()) { if (j.getSpawnEntity() != null)// && h != -1) { diff --git a/src/main/java/com/volmit/iris/engine/object/jigsaw/IrisJigsawStructure.java b/src/main/java/com/volmit/iris/engine/object/jigsaw/IrisJigsawStructure.java index 143427054..af36ce9fa 100644 --- a/src/main/java/com/volmit/iris/engine/object/jigsaw/IrisJigsawStructure.java +++ b/src/main/java/com/volmit/iris/engine/object/jigsaw/IrisJigsawStructure.java @@ -59,6 +59,9 @@ 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.") + private int lockY = -1; + private transient AtomicCache maxDimension = new AtomicCache<>(); private void loadPool(String p, KList pools, KList pieces) {