9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-31 04:46:40 +00:00

Cleanup / Fixes

This commit is contained in:
RePixelatedMC
2023-11-02 16:55:47 +01:00
parent dc21f05482
commit 021f9b1d0e
7 changed files with 16 additions and 21 deletions

View File

@@ -185,14 +185,8 @@ public class CommandIris implements DecreeExecutor {
@Decree(description = "Benchmark a pack", origin = DecreeOrigin.CONSOLE)
public void fixunstable() throws InterruptedException {
if (unstablemode){
if (sender() instanceof Player) { // todo: fix this being always false
sender().sendMessage(C.RED + "Your server is experiencing an incompatibility with the Iris plugin.");
sender().sendMessage(C.RED + "Please rectify this problem to avoid further complications.");
sender().sendMessage(C.RED + "----------------------------------------------------------------");
sender().sendMessage(C.RED + "Command ran: /iris fixunstable");
sender().sendMessage(C.RED + "Server Issues: " + C.DARK_RED + UtilsSFG.MSGIncompatibleWarnings());
sender().sendMessage(C.RED + "----------------------------------------------------------------");
}
sender().sendMessage(C.RED + "Incompatibilities are posted in console..");
Iris.info(C.RED + "Your server is experiencing an incompatibility with the Iris plugin.");
Iris.info(C.RED + "Please rectify this problem to avoid further complications.");
Iris.info(C.RED + "----------------------------------------------------------------");
@@ -210,10 +204,6 @@ public class CommandIris implements DecreeExecutor {
sender().sendMessage(C.GREEN + "" + sender().player().getWorld().getMinHeight() + " to " + sender().player().getWorld().getMaxHeight());
sender().sendMessage(C.GREEN + "Total Height: " + (sender().player().getWorld().getMaxHeight() - sender().player().getWorld().getMinHeight()));
}
@Decree(description = "TEST")
public void cpspaper() {
ChunkHandlerSVC.exit();
}
@Decree(description = "QOL command to open a overworld studio world.", sync = true)
public void so() {

View File

@@ -111,7 +111,7 @@ public class ChunkHandlerSVC implements Listener {
}
public void onChunkLoad(Chunk chunk) {
//System.out.printf("%s > Loaded Chunk [x=%s, z=%s]%n", world.getName(), chunk.getX(), chunk.getZ());
// System.out.printf("%s > Loaded Chunk [x=%s, z=%s]%n", world.getName(), chunk.getX(), chunk.getZ());
chunks.put(chunk, System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(3));
}

View File

@@ -176,7 +176,6 @@ public class IrisCreator {
}
}
//if (benchmark){loaded = true;}
Iris.info("Debug1");
});

View File

@@ -46,6 +46,7 @@ import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import static com.volmit.iris.core.tools.IrisPackBenchmarking.benchmark;
import static com.volmit.iris.engine.safeguard.PerformanceSFG.lowPerformance;
@Data
public class IrisEngineMantle implements EngineMantle {
@@ -285,15 +286,19 @@ public class IrisEngineMantle implements EngineMantle {
x = Math.max(x, c);
x = (Math.max(x, 16) + 16) >> 4;
x = x % 2 == 0 ? x + 1 : x;
IrisPackBenchmarking PackBench = new IrisPackBenchmarking();
if (benchmark){
x = 4;
Iris.info("Mantle Size: " + x + " Chunks " + C.BLUE + "BENCHMARK MODE");
} else {
Iris.info("Mantle Size: " + x + " Chunks");
Iris.info(" Object Mantle Size: " + u + " (" + ((Math.max(u, 16) + 16) >> 4) + ")");
Iris.info(" Jigsaw Mantle Size: " + jig + " (" + ((Math.max(jig, 16) + 16) >> 4) + ")");
Iris.info(" Carving Mantle Size: " + c + " (" + ((Math.max(c, 16) + 16) >> 4) + ")");
if(lowPerformance){
x = 4;
Iris.info("Mantle Size: " + x + " Chunks" + C.GOLD + "LOW PERFORMANCE MODE");
} else {
Iris.info("Mantle Size: " + x + " Chunks");
Iris.info(" Object Mantle Size: " + u + " (" + ((Math.max(u, 16) + 16) >> 4) + ")");
Iris.info(" Jigsaw Mantle Size: " + jig + " (" + ((Math.max(jig, 16) + 16) >> 4) + ")");
Iris.info(" Carving Mantle Size: " + c + " (" + ((Math.max(c, 16) + 16) >> 4) + ")");
}
}

View File

@@ -101,7 +101,7 @@ public class PlannedStructure {
int sz = (v.getD() / 2);
int xx = i.getPosition().getX() + sx;
int zz = i.getPosition().getZ() + sz;
RNG rngf = new RNG(Cache.key(xx, zz));
RNG rng = new RNG(Cache.key(xx, zz));
int offset = i.getPosition().getY() - startHeight;
int height;

View File

@@ -8,6 +8,7 @@ public class IrisSafeguard {
public static void IrisSafeguardSystem() {
Iris.info("Enabled Iris SafeGuard");
ServerBootSFG.BootCheck();
PerformanceSFG.calculatePerformance();
}
}

View File

@@ -7,7 +7,7 @@ import static com.volmit.iris.util.misc.getHardware.*;
public class PerformanceSFG {
public static boolean lowPerformance = false;
public void getPerformance(){
public static void calculatePerformance(){
if (getCPUModel().contains("Xeon")){
lowPerformance = true;