mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 22:32:04 +00:00
- 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. <optional> - Perhaps more?
This commit is contained in:
@@ -25,6 +25,9 @@ import com.volmit.iris.core.nms.v1X.NMSBinding1X;
|
|||||||
import com.volmit.iris.core.service.IrisEngineSVC;
|
import com.volmit.iris.core.service.IrisEngineSVC;
|
||||||
import com.volmit.iris.core.tools.IrisToolbelt;
|
import com.volmit.iris.core.tools.IrisToolbelt;
|
||||||
import com.volmit.iris.engine.framework.Engine;
|
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.engine.object.IrisEntity;
|
||||||
import com.volmit.iris.util.decree.DecreeExecutor;
|
import com.volmit.iris.util.decree.DecreeExecutor;
|
||||||
import com.volmit.iris.util.decree.DecreeOrigin;
|
import com.volmit.iris.util.decree.DecreeOrigin;
|
||||||
@@ -44,6 +47,7 @@ import net.jpountz.lz4.LZ4FrameOutputStream;
|
|||||||
import org.apache.commons.lang.RandomStringUtils;
|
import org.apache.commons.lang.RandomStringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Creeper;
|
import org.bukkit.entity.Creeper;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
@@ -136,7 +140,13 @@ public class CommandDeveloper implements DecreeExecutor {
|
|||||||
@Decree(description = "test")
|
@Decree(description = "test")
|
||||||
public void test() throws NoSuchFieldException, IllegalAccessException {
|
public void test() throws NoSuchFieldException, IllegalAccessException {
|
||||||
Iris.info("CMD Executed");
|
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.")
|
@Decree(description = "UnloadChunks for good reasons.")
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ public class IrisCavePlacer implements IRare {
|
|||||||
private String cave;
|
private String cave;
|
||||||
@Desc("If set to true, this cave is allowed to break the surface")
|
@Desc("If set to true, this cave is allowed to break the surface")
|
||||||
private boolean breakSurface = true;
|
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.")
|
@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));
|
private IrisStyledRange caveStartHeight = new IrisStyledRange(13, 120, new IrisGeneratorStyle(NoiseStyle.STATIC));
|
||||||
|
|
||||||
@@ -82,13 +84,19 @@ public class IrisCavePlacer implements IRare {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (y == -1) {
|
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 h = (int) caveStartHeight.get(rng, x, z, data);
|
||||||
int ma = breakSurface ? h : (int) (engine.getComplex().getHeightStream().get(x, z) - 9);
|
int ma = breakSurface ? h : (int) (engine.getComplex().getHeightStream().get(x, z) - 9);
|
||||||
y = Math.min(h, ma);
|
y = Math.min(h, ma);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
fail.set(true);
|
fail.set(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user