From 50686795d02580e493cf50b10c73382e4c7fb8e7 Mon Sep 17 00:00:00 2001 From: RePixelatedMC Date: Wed, 20 Mar 2024 11:32:44 +0100 Subject: [PATCH] - Added /iris what region - Sort of Fixed EngineStatus - Added /iris hasAccess - Added /iris irisworlds/worlds - Added Some dev commands - Redid / improved the mantle tectonic unload - Convert still not working so ignore that - Cleaned Iris of IrisPackBenchmarking.java im redoing it on second thought. - Adjusted build.gradle - Renamed some tectonic stuff - Fixed Eta - Fixed entities spawning inside blocks or at least it should. - Lib update fixes all the iris titles/actionbars - Cave spawning adjustments, now they get engine height if caveStartHeight is too large. - Perhaps more? --- .../volmit/iris/core/commands/CommandDeveloper.java | 12 +++++++++++- .../volmit/iris/engine/object/IrisCavePlacer.java | 10 +++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/volmit/iris/core/commands/CommandDeveloper.java b/core/src/main/java/com/volmit/iris/core/commands/CommandDeveloper.java index 8363cd146..3509c262e 100644 --- a/core/src/main/java/com/volmit/iris/core/commands/CommandDeveloper.java +++ b/core/src/main/java/com/volmit/iris/core/commands/CommandDeveloper.java @@ -25,6 +25,9 @@ import com.volmit.iris.core.nms.v1X.NMSBinding1X; import com.volmit.iris.core.service.IrisEngineSVC; import com.volmit.iris.core.tools.IrisToolbelt; import com.volmit.iris.engine.framework.Engine; +import com.volmit.iris.engine.mantle.components.MantleObjectComponent; +import com.volmit.iris.engine.object.IrisBiome; +import com.volmit.iris.engine.object.IrisCave; import com.volmit.iris.engine.object.IrisEntity; import com.volmit.iris.util.decree.DecreeExecutor; import com.volmit.iris.util.decree.DecreeOrigin; @@ -44,6 +47,7 @@ import net.jpountz.lz4.LZ4FrameOutputStream; import org.apache.commons.lang.RandomStringUtils; import org.bukkit.Bukkit; import org.bukkit.Chunk; +import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Creeper; import org.bukkit.entity.EntityType; @@ -136,7 +140,13 @@ public class CommandDeveloper implements DecreeExecutor { @Decree(description = "test") public void test() throws NoSuchFieldException, IllegalAccessException { Iris.info("CMD Executed"); - Vector3d box2 = INMS.get().getBoundingbox(EntityType.CREEPER); + Engine engine = IrisToolbelt.access(player().getWorld()).getEngine(); + Location at = player().getLocation(); + IrisBiome caveBiome = engine.getMantle().getComplex().getCaveBiomeStream().get(at.getBlockX(), at.getBlockZ()); + if (!caveBiome.getName().contains("Subterranean Land")) { + sender().sendMessage("Cool cave?: " + caveBiome.getName()); + } + } @Decree(description = "UnloadChunks for good reasons.") diff --git a/core/src/main/java/com/volmit/iris/engine/object/IrisCavePlacer.java b/core/src/main/java/com/volmit/iris/engine/object/IrisCavePlacer.java index 17dd4623d..911323e4a 100644 --- a/core/src/main/java/com/volmit/iris/engine/object/IrisCavePlacer.java +++ b/core/src/main/java/com/volmit/iris/engine/object/IrisCavePlacer.java @@ -52,6 +52,8 @@ public class IrisCavePlacer implements IRare { private String cave; @Desc("If set to true, this cave is allowed to break the surface") private boolean breakSurface = true; + @Desc("If set to true, this cave is allowed to get placed above the terrain level") + private boolean ignoreHeightLimit = false; @Desc("The height range this cave can spawn at. If breakSurface is false, the output of this range will be clamped by the current world height to prevent surface breaking.") private IrisStyledRange caveStartHeight = new IrisStyledRange(13, 120, new IrisGeneratorStyle(NoiseStyle.STATIC)); @@ -82,13 +84,19 @@ public class IrisCavePlacer implements IRare { } if (y == -1) { + if(!ignoreHeightLimit) { + int eH = engine.getHeight(x, z); + if (caveStartHeight.getMax() > eH) { + caveStartHeight.setMax(eH); + } + } int h = (int) caveStartHeight.get(rng, x, z, data); int ma = breakSurface ? h : (int) (engine.getComplex().getHeightStream().get(x, z) - 9); y = Math.min(h, ma); } try { - cave.generate(mantle, rng, engine, x + rng.nextInt(15), y, z + rng.nextInt(15), waterHint); + cave.generate(mantle, rng, engine, x + rng.nextInt(15), y, z + rng.nextInt(15), waterHint); } catch (Throwable e) { e.printStackTrace(); fail.set(true);