mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-06 15:56:27 +00:00
Clean
This commit is contained in:
@@ -29,8 +29,6 @@ import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.object.common.IObjectPlacer;
|
||||
import com.volmit.iris.engine.parallax.ParallaxChunkMeta;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import lombok.Data;
|
||||
import org.bukkit.Axis;
|
||||
@@ -53,8 +51,6 @@ public class PlannedStructure {
|
||||
private RNG rng;
|
||||
private boolean verbose;
|
||||
private boolean terminating;
|
||||
private static int hit = 0;
|
||||
private static int miss = 0;
|
||||
|
||||
public PlannedStructure(IrisJigsawStructure structure, IrisPosition position, RNG rng) {
|
||||
terminating = false;
|
||||
@@ -402,19 +398,11 @@ public class PlannedStructure {
|
||||
String key = piece.getObject() + "-" + rotation.hashCode();
|
||||
|
||||
return objectRotationCache.compute(key, (k, v) -> {
|
||||
if(v == null)
|
||||
{
|
||||
miss++;
|
||||
if (v == null) {
|
||||
return rotation.rotateCopy(data.getObjectLoader().load(piece.getObject()));
|
||||
}
|
||||
|
||||
hit++;
|
||||
printCacheHit();
|
||||
return v;
|
||||
});
|
||||
}
|
||||
|
||||
private void printCacheHit() {
|
||||
System.out.println("Cache Hit " + Form.pc((double) hit / (double) (hit + miss), 2) + " Cache Hit: " + hit + " hits " + miss + " misses.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user