mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Cleanup
This commit is contained in:
parent
90f0a5eac6
commit
8e16b8e4a8
@ -172,17 +172,15 @@ public class CommandIris implements DecreeExecutor {
|
|||||||
@Decree(name = "regen", description = "Regenerate nearby chunks.", aliases = "rg", sync = true, origin = DecreeOrigin.PLAYER)
|
@Decree(name = "regen", description = "Regenerate nearby chunks.", aliases = "rg", sync = true, origin = DecreeOrigin.PLAYER)
|
||||||
public void regen(
|
public void regen(
|
||||||
@Param(name = "radius", description = "The radius of nearby cunks", defaultValue = "5")
|
@Param(name = "radius", description = "The radius of nearby cunks", defaultValue = "5")
|
||||||
int radius
|
int radius
|
||||||
) {
|
) {
|
||||||
if(IrisToolbelt.isIrisWorld(player().getWorld()))
|
if (IrisToolbelt.isIrisWorld(player().getWorld())) {
|
||||||
{
|
|
||||||
VolmitSender sender = sender();
|
VolmitSender sender = sender();
|
||||||
J.a(() -> {
|
J.a(() -> {
|
||||||
DecreeContext.touch(sender);
|
DecreeContext.touch(sender);
|
||||||
PlatformChunkGenerator plat = IrisToolbelt.access(player().getWorld());
|
PlatformChunkGenerator plat = IrisToolbelt.access(player().getWorld());
|
||||||
Engine engine = plat.getEngine();
|
Engine engine = plat.getEngine();
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
int vd = radius;
|
int vd = radius;
|
||||||
int rg = 0;
|
int rg = 0;
|
||||||
Chunk cx = player().getLocation().getChunk();
|
Chunk cx = player().getLocation().getChunk();
|
||||||
@ -190,21 +188,18 @@ public class CommandIris implements DecreeExecutor {
|
|||||||
BurstExecutor b = MultiBurst.burst.burst();
|
BurstExecutor b = MultiBurst.burst.burst();
|
||||||
b.setMulticore(false);
|
b.setMulticore(false);
|
||||||
int rad = engine.getMantle().getRealRadius();
|
int rad = engine.getMantle().getRealRadius();
|
||||||
for(int i = -(vd+rad); i <= vd+rad; i++) {
|
for (int i = -(vd + rad); i <= vd + rad; i++) {
|
||||||
for (int j = -(vd+rad); j <= vd+rad; j++) {
|
for (int j = -(vd + rad); j <= vd + rad; j++) {
|
||||||
engine.getMantle().getMantle().deleteChunk(i + cx.getX(), j + cx.getZ());
|
engine.getMantle().getMantle().deleteChunk(i + cx.getX(), j + cx.getZ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = -vd; i <= vd; i++)
|
for (int i = -vd; i <= vd; i++) {
|
||||||
{
|
for (int j = -vd; j <= vd; j++) {
|
||||||
for(int j = -vd; j <= vd; j++)
|
|
||||||
{
|
|
||||||
int finalJ = j;
|
int finalJ = j;
|
||||||
int finalI = i;
|
int finalI = i;
|
||||||
b.queue(() -> plat.injectChunkReplacement(player().getWorld(), finalI + cx.getX(), finalJ + cx.getZ(), (f) -> {
|
b.queue(() -> plat.injectChunkReplacement(player().getWorld(), finalI + cx.getX(), finalJ + cx.getZ(), (f) -> {
|
||||||
synchronized (js)
|
synchronized (js) {
|
||||||
{
|
|
||||||
js.add(f);
|
js.add(f);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@ -220,10 +215,8 @@ public class CommandIris implements DecreeExecutor {
|
|||||||
public void execute(Runnable runnable) {
|
public void execute(Runnable runnable) {
|
||||||
futures.add(J.sfut(runnable));
|
futures.add(J.sfut(runnable));
|
||||||
|
|
||||||
if(futures.size() > 64)
|
if (futures.size() > 64) {
|
||||||
{
|
while (futures.isNotEmpty()) {
|
||||||
while(futures.isNotEmpty())
|
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
futures.remove(0).get();
|
futures.remove(0).get();
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
@ -240,17 +233,11 @@ public class CommandIris implements DecreeExecutor {
|
|||||||
};
|
};
|
||||||
r.queue(js);
|
r.queue(js);
|
||||||
r.execute(sender());
|
r.execute(sender());
|
||||||
}
|
} catch (Throwable e) {
|
||||||
|
|
||||||
catch(Throwable e)
|
|
||||||
{
|
|
||||||
sender().sendMessage("Unable to parse view-distance");
|
sender().sendMessage("Unable to parse view-distance");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender().sendMessage(C.RED + "You must be in an Iris World to use regen!");
|
sender().sendMessage(C.RED + "You must be in an Iris World to use regen!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
package com.volmit.iris.core.commands;
|
package com.volmit.iris.core.commands;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.IrisSettings;
|
|
||||||
import com.volmit.iris.core.edit.JigsawEditor;
|
import com.volmit.iris.core.edit.JigsawEditor;
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.core.service.ObjectSVC;
|
|
||||||
import com.volmit.iris.core.service.StudioSVC;
|
|
||||||
import com.volmit.iris.core.service.WandSVC;
|
|
||||||
import com.volmit.iris.engine.jigsaw.PlannedStructure;
|
import com.volmit.iris.engine.jigsaw.PlannedStructure;
|
||||||
import com.volmit.iris.engine.object.*;
|
import com.volmit.iris.engine.object.IrisJigsawPiece;
|
||||||
import com.volmit.iris.util.data.Cuboid;
|
import com.volmit.iris.engine.object.IrisJigsawStructure;
|
||||||
|
import com.volmit.iris.engine.object.IrisObject;
|
||||||
|
import com.volmit.iris.engine.object.IrisPosition;
|
||||||
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;
|
||||||
import com.volmit.iris.util.decree.annotations.Decree;
|
import com.volmit.iris.util.decree.annotations.Decree;
|
||||||
@ -17,23 +15,10 @@ import com.volmit.iris.util.decree.annotations.Param;
|
|||||||
import com.volmit.iris.util.decree.specialhandlers.ObjectHandler;
|
import com.volmit.iris.util.decree.specialhandlers.ObjectHandler;
|
||||||
import com.volmit.iris.util.format.C;
|
import com.volmit.iris.util.format.C;
|
||||||
import com.volmit.iris.util.format.Form;
|
import com.volmit.iris.util.format.Form;
|
||||||
import com.volmit.iris.util.math.Direction;
|
|
||||||
import com.volmit.iris.util.math.RNG;
|
import com.volmit.iris.util.math.RNG;
|
||||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||||
import com.volmit.iris.util.scheduling.Queue;
|
|
||||||
import org.bukkit.*;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.block.BlockState;
|
|
||||||
import org.bukkit.block.TileState;
|
|
||||||
import org.bukkit.block.data.BlockData;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.util.Vector;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
|
||||||
import java.text.NumberFormat;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
@Decree(name = "jigsaw", origin = DecreeOrigin.PLAYER, studio = true, description = "Iris jigsaw commands")
|
@Decree(name = "jigsaw", origin = DecreeOrigin.PLAYER, studio = true, description = "Iris jigsaw commands")
|
||||||
public class CommandJigsaw implements DecreeExecutor {
|
public class CommandJigsaw implements DecreeExecutor {
|
||||||
@ -82,30 +67,28 @@ public class CommandJigsaw implements DecreeExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Decree(description = "Exit the current jigsaw editor")
|
@Decree(description = "Exit the current jigsaw editor")
|
||||||
public void exit()
|
public void exit() {
|
||||||
{
|
|
||||||
JigsawEditor editor = JigsawEditor.editors.get(player());
|
JigsawEditor editor = JigsawEditor.editors.get(player());
|
||||||
|
|
||||||
if (editor == null) {
|
if (editor == null) {
|
||||||
sender().sendMessage(C.GOLD +"You don't have any pieces open to exit!");
|
sender().sendMessage(C.GOLD + "You don't have any pieces open to exit!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.exit();
|
editor.exit();
|
||||||
sender().sendMessage(C.GREEN +"Exited Jigsaw Editor");
|
sender().sendMessage(C.GREEN + "Exited Jigsaw Editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Decree(description = "Save & Exit the current jigsaw editor")
|
@Decree(description = "Save & Exit the current jigsaw editor")
|
||||||
public void save()
|
public void save() {
|
||||||
{
|
|
||||||
JigsawEditor editor = JigsawEditor.editors.get(player());
|
JigsawEditor editor = JigsawEditor.editors.get(player());
|
||||||
|
|
||||||
if (editor == null) {
|
if (editor == null) {
|
||||||
sender().sendMessage(C.GOLD +"You don't have any pieces open to save!");
|
sender().sendMessage(C.GOLD + "You don't have any pieces open to save!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.close();
|
editor.close();
|
||||||
sender().sendMessage(C.GREEN +"Saved & Exited Jigsaw Editor");
|
sender().sendMessage(C.GREEN + "Saved & Exited Jigsaw Editor");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -357,11 +357,7 @@ public class IrisData implements ExclusionStrategy, TypeAdapterFactory {
|
|||||||
public boolean shouldSkipClass(Class<?> c) {
|
public boolean shouldSkipClass(Class<?> c) {
|
||||||
if (c.equals(AtomicCache.class)) {
|
if (c.equals(AtomicCache.class)) {
|
||||||
return true;
|
return true;
|
||||||
} else if (c.equals(ChronoLatch.class)) {
|
} else return c.equals(ChronoLatch.class);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -291,10 +291,8 @@ public class ResourceLoader<T extends IrisRegistrant> {
|
|||||||
|
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
||||||
if(folderCache == null)
|
if (folderCache == null) {
|
||||||
{
|
synchronized (this) {
|
||||||
synchronized (this)
|
|
||||||
{
|
|
||||||
return getFolderCache();
|
return getFolderCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ public class CommandSVC implements IrisService, DecreeSystem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((msg.startsWith("locate ") || msg.startsWith("locatebiome ")) && IrisToolbelt.isIrisWorld(e.getPlayer().getWorld())){
|
if ((msg.startsWith("locate ") || msg.startsWith("locatebiome ")) && IrisToolbelt.isIrisWorld(e.getPlayer().getWorld())) {
|
||||||
new VolmitSender(e.getPlayer()).sendMessage(C.RED + "Locating biomes & objects is disabled in Iris Worlds. Use /iris studio goto <biome>");
|
new VolmitSender(e.getPlayer()).sendMessage(C.RED + "Locating biomes & objects is disabled in Iris Worlds. Use /iris studio goto <biome>");
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,6 @@ import org.bukkit.util.Vector;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class MantleWriter implements IObjectPlacer {
|
public class MantleWriter implements IObjectPlacer {
|
||||||
@ -67,8 +66,7 @@ public class MantleWriter implements IObjectPlacer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public <T> void setData(int x, int y, int z, T t) {
|
public <T> void setData(int x, int y, int z, T t) {
|
||||||
if(t == null)
|
if (t == null) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +166,7 @@ public class MantleWriter implements IObjectPlacer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public <T> void setElipsoid(int cx, int cy, int cz, double rx, double ry, double rz, boolean fill, T data) {
|
public <T> void setElipsoid(int cx, int cy, int cz, double rx, double ry, double rz, boolean fill, T data) {
|
||||||
setElipsoidFunction(cx, cy, cz, rx, ry, rz, fill, (a,b,c)->data);
|
setElipsoidFunction(cx, cy, cz, rx, ry, rz, fill, (a, b, c) -> data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,10 +103,9 @@ public class IrisCarveModifier extends EngineAssignedModifier<BlockData> {
|
|||||||
|
|
||||||
if (c.isWater()) {
|
if (c.isWater()) {
|
||||||
output.set(rx, yy, rz, WATER);
|
output.set(rx, yy, rz, WATER);
|
||||||
} else if(c.isLava()) {
|
} else if (c.isLava()) {
|
||||||
output.set(rx, yy, rz, LAVA);
|
output.set(rx, yy, rz, LAVA);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
output.set(rx, yy, rz, AIR);
|
output.set(rx, yy, rz, AIR);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -171,13 +170,11 @@ public class IrisCarveModifier extends EngineAssignedModifier<BlockData> {
|
|||||||
int thickness = zone.airThickness();
|
int thickness = zone.airThickness();
|
||||||
String customBiome = "";
|
String customBiome = "";
|
||||||
|
|
||||||
if(B.isDecorant(output.get(rx, zone.ceiling+1, rz)))
|
if (B.isDecorant(output.get(rx, zone.ceiling + 1, rz))) {
|
||||||
{
|
output.set(rx, zone.ceiling + 1, rz, AIR);
|
||||||
output.set(rx, zone.ceiling+1, rz, AIR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(B.isDecorant(output.get(rx, zone.ceiling, rz)))
|
if (B.isDecorant(output.get(rx, zone.ceiling, rz))) {
|
||||||
{
|
|
||||||
output.set(rx, zone.ceiling, rz, AIR);
|
output.set(rx, zone.ceiling, rz, AIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,8 +121,7 @@ public class IrisDepositModifier extends EngineAssignedModifier<BlockData> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!getEngine().getMantle().isCarved((cx << 4) + nx, ny, (cz << 4) + nz))
|
if (!getEngine().getMantle().isCarved((cx << 4) + nx, ny, (cz << 4) + nz)) {
|
||||||
{
|
|
||||||
data.set(nx, ny, nz, B.toDeepSlateOre(data.get(nx, ny, nz), clump.getBlocks().get(j)));
|
data.set(nx, ny, nz, B.toDeepSlateOre(data.get(nx, ny, nz), clump.getBlocks().get(j)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.object;
|
package com.volmit.iris.engine.object;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.core.loader.IrisRegistrant;
|
import com.volmit.iris.core.loader.IrisRegistrant;
|
||||||
import com.volmit.iris.engine.framework.Engine;
|
import com.volmit.iris.engine.framework.Engine;
|
||||||
@ -73,7 +72,8 @@ public class IrisCave extends IrisRegistrant {
|
|||||||
public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, int z, int waterHint) {
|
public void generate(MantleWriter writer, RNG rng, Engine engine, int x, int y, int z, int waterHint) {
|
||||||
|
|
||||||
double girth = getWorm().getGirth().get(rng, x, z, engine.getData());
|
double girth = getWorm().getGirth().get(rng, x, z, engine.getData());
|
||||||
KList<IrisPosition> points = getWorm().generate(rng, engine.getData(), writer, verticalRange, x, y, z, (at) -> {});
|
KList<IrisPosition> points = getWorm().generate(rng, engine.getData(), writer, verticalRange, x, y, z, (at) -> {
|
||||||
|
});
|
||||||
int highestWater = Math.max(waterHint, -1);
|
int highestWater = Math.max(waterHint, -1);
|
||||||
|
|
||||||
if (highestWater == -1) {
|
if (highestWater == -1) {
|
||||||
|
@ -287,7 +287,7 @@ public class IrisDimension extends IrisRegistrant {
|
|||||||
int jump = strongholdJumpDistance;
|
int jump = strongholdJumpDistance;
|
||||||
RNG rng = new RNG((seed * 223) + 12945);
|
RNG rng = new RNG((seed * 223) + 12945);
|
||||||
|
|
||||||
for (int i = 0; i < maxStrongholds+1; i++) {
|
for (int i = 0; i < maxStrongholds + 1; i++) {
|
||||||
int m = i + 1;
|
int m = i + 1;
|
||||||
pos.add(new Position2(
|
pos.add(new Position2(
|
||||||
(int) ((rng.i(jump * i) + (jump * i)) * (rng.b() ? -1D : 1D)),
|
(int) ((rng.i(jump * i) + (jump * i)) * (rng.b() ? -1D : 1D)),
|
||||||
|
@ -73,8 +73,7 @@ public class IrisLake implements IRare {
|
|||||||
double[] surfaces = new double[pos.size()];
|
double[] surfaces = new double[pos.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for(IrisPosition p : pos)
|
for (IrisPosition p : pos) {
|
||||||
{
|
|
||||||
surfaces[i] = engine.getComplex().getHeightStream().get(x, z);
|
surfaces[i] = engine.getComplex().getHeightStream().get(x, z);
|
||||||
ax += p.getX();
|
ax += p.getX();
|
||||||
ay += surfaces[i];
|
ay += surfaces[i];
|
||||||
@ -92,11 +91,9 @@ public class IrisLake implements IRare {
|
|||||||
double depth = dg.fitDouble(depthStyle.getMin(), depthStyle.getMax(), p.getX(), p.getZ()) + (surface - avg.getY());
|
double depth = dg.fitDouble(depthStyle.getMin(), depthStyle.getMax(), p.getX(), p.getZ()) + (surface - avg.getY());
|
||||||
double width = bw.fitDouble(widthStyle.getMin(), widthStyle.getMax(), p.getX(), p.getZ());
|
double width = bw.fitDouble(widthStyle.getMin(), widthStyle.getMax(), p.getX(), p.getZ());
|
||||||
|
|
||||||
if(depth > 1)
|
if (depth > 1) {
|
||||||
{
|
writer.setElipsoidFunction(p.getX(), avg.getY(), p.getZ(), width, depth, width, true, (xx, yy, zz) -> {
|
||||||
writer.setElipsoidFunction(p.getX(), avg.getY(), p.getZ(), width, depth, width, true, (xx,yy,zz) -> {
|
if (yy > avg.getY()) {
|
||||||
if(yy > avg.getY())
|
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.object;
|
package com.volmit.iris.engine.object;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.core.loader.IrisRegistrant;
|
import com.volmit.iris.core.loader.IrisRegistrant;
|
||||||
import com.volmit.iris.engine.framework.Engine;
|
import com.volmit.iris.engine.framework.Engine;
|
||||||
@ -150,13 +149,9 @@ public class IrisRavine extends IrisRegistrant {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid()))
|
if (lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid())) {
|
||||||
{
|
|
||||||
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, l);
|
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, l);
|
||||||
}
|
} else {
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, c);
|
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,13 +169,9 @@ public class IrisRavine extends IrisRegistrant {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid()))
|
if (lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid())) {
|
||||||
{
|
|
||||||
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, l);
|
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, l);
|
||||||
}
|
} else {
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, c);
|
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,7 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.object;
|
package com.volmit.iris.engine.object;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.engine.data.cache.AtomicCache;
|
|
||||||
import com.volmit.iris.engine.framework.Engine;
|
import com.volmit.iris.engine.framework.Engine;
|
||||||
import com.volmit.iris.engine.mantle.MantleWriter;
|
import com.volmit.iris.engine.mantle.MantleWriter;
|
||||||
import com.volmit.iris.engine.object.annotations.*;
|
import com.volmit.iris.engine.object.annotations.*;
|
||||||
@ -30,8 +28,6 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
|
|
||||||
@Snippet("river")
|
@Snippet("river")
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
@ -104,8 +104,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
|||||||
}
|
}
|
||||||
} : null;
|
} : null;
|
||||||
|
|
||||||
if(studio)
|
if (studio) {
|
||||||
{
|
|
||||||
hotloader.setPriority(Thread.MIN_PRIORITY);
|
hotloader.setPriority(Thread.MIN_PRIORITY);
|
||||||
hotloader.start();
|
hotloader.start();
|
||||||
hotloader.setName(getTarget().getWorld().name() + " Hotloader");
|
hotloader.setName(getTarget().getWorld().name() + " Hotloader");
|
||||||
@ -236,8 +235,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
|||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
withExclusiveControl(() -> {
|
withExclusiveControl(() -> {
|
||||||
if(isStudio())
|
if (isStudio()) {
|
||||||
{
|
|
||||||
hotloader.interrupt();
|
hotloader.interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,8 +250,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void hotload() {
|
public void hotload() {
|
||||||
if(!isStudio())
|
if (!isStudio()) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ import com.volmit.iris.core.IrisSettings;
|
|||||||
import com.volmit.iris.util.collection.KList;
|
import com.volmit.iris.util.collection.KList;
|
||||||
import com.volmit.iris.util.scheduling.ChronoLatch;
|
import com.volmit.iris.util.scheduling.ChronoLatch;
|
||||||
import it.unimi.dsi.fastutil.ints.*;
|
import it.unimi.dsi.fastutil.ints.*;
|
||||||
import net.minecraft.world.level.levelgen.OreVeinifier;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
@ -269,18 +268,12 @@ public class B {
|
|||||||
public static BlockData toDeepSlateOre(BlockData block, BlockData ore) {
|
public static BlockData toDeepSlateOre(BlockData block, BlockData ore) {
|
||||||
int key = ore.getMaterial().ordinal();
|
int key = ore.getMaterial().ordinal();
|
||||||
|
|
||||||
if(isDeepSlate(block))
|
if (isDeepSlate(block)) {
|
||||||
{
|
if (normal2DeepslateCache.containsKey(key)) {
|
||||||
if(normal2DeepslateCache.containsKey(key))
|
|
||||||
{
|
|
||||||
return Material.values()[normal2DeepslateCache.get(key)].createBlockData();
|
return Material.values()[normal2DeepslateCache.get(key)].createBlockData();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
if (deepslate2NormalCache.containsKey(key)) {
|
||||||
else
|
|
||||||
{
|
|
||||||
if(deepslate2NormalCache.containsKey(key))
|
|
||||||
{
|
|
||||||
return Material.values()[deepslate2NormalCache.get(key)].createBlockData();
|
return Material.values()[deepslate2NormalCache.get(key)].createBlockData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ package com.volmit.iris.util.decree.handlers;
|
|||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.engine.object.IrisJigsawPiece;
|
import com.volmit.iris.engine.object.IrisJigsawPiece;
|
||||||
import com.volmit.iris.engine.object.IrisJigsawStructure;
|
|
||||||
import com.volmit.iris.util.collection.KList;
|
import com.volmit.iris.util.collection.KList;
|
||||||
import com.volmit.iris.util.collection.KMap;
|
import com.volmit.iris.util.collection.KMap;
|
||||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||||
|
@ -21,7 +21,6 @@ package com.volmit.iris.util.decree.handlers;
|
|||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.engine.object.IrisJigsawStructure;
|
import com.volmit.iris.engine.object.IrisJigsawStructure;
|
||||||
import com.volmit.iris.engine.object.IrisRegion;
|
|
||||||
import com.volmit.iris.util.collection.KList;
|
import com.volmit.iris.util.collection.KList;
|
||||||
import com.volmit.iris.util.collection.KMap;
|
import com.volmit.iris.util.collection.KMap;
|
||||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||||
|
@ -28,18 +28,15 @@ public class MatterCavern {
|
|||||||
private final String customBiome;
|
private final String customBiome;
|
||||||
private final byte liquid; // 0 none 1 water 2 lava
|
private final byte liquid; // 0 none 1 water 2 lava
|
||||||
|
|
||||||
public boolean isAir()
|
public boolean isAir() {
|
||||||
{
|
|
||||||
return liquid == 0;
|
return liquid == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWater()
|
public boolean isWater() {
|
||||||
{
|
|
||||||
return liquid == 1;
|
return liquid == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLava()
|
public boolean isLava() {
|
||||||
{
|
|
||||||
return liquid == 2;
|
return liquid == 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user