mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 20:19:06 +00:00
The engine is the framework
This commit is contained in:
@@ -31,6 +31,7 @@ import lombok.Data;
|
||||
public class IrisContext {
|
||||
private static ChronoLatch cl = new ChronoLatch(60000);
|
||||
private static KMap<Thread, IrisContext> context = new KMap<>();
|
||||
private final Engine engine;
|
||||
|
||||
public static IrisContext get() {
|
||||
return context.get(Thread.currentThread());
|
||||
@@ -50,8 +51,6 @@ public class IrisContext {
|
||||
}
|
||||
}
|
||||
|
||||
private final Engine engine;
|
||||
|
||||
public void touch() {
|
||||
IrisContext.touch(this);
|
||||
}
|
||||
@@ -61,6 +60,6 @@ public class IrisContext {
|
||||
}
|
||||
|
||||
public IrisComplex getComplex() {
|
||||
return engine.getFramework().getComplex();
|
||||
return engine.getComplex();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ReactiveFolder {
|
||||
|
||||
if (checkCycle % 3 == 0 ? fw.checkModified() : fw.checkModifiedFast()) {
|
||||
for (File i : fw.getCreated()) {
|
||||
if (i.getName().endsWith(".iob") || i.getName().endsWith(".json")|| i.getName().endsWith(".js")) {
|
||||
if (i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) {
|
||||
modified = true;
|
||||
break;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class ReactiveFolder {
|
||||
|
||||
if (!modified) {
|
||||
for (File i : fw.getChanged()) {
|
||||
if (i.getName().endsWith(".iob") || i.getName().endsWith(".json")|| i.getName().endsWith(".js")) {
|
||||
if (i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) {
|
||||
modified = true;
|
||||
break;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class ReactiveFolder {
|
||||
|
||||
if (!modified) {
|
||||
for (File i : fw.getDeleted()) {
|
||||
if (i.getName().endsWith(".iob") || i.getName().endsWith(".json")|| i.getName().endsWith(".js")) {
|
||||
if (i.getName().endsWith(".iob") || i.getName().endsWith(".json") || i.getName().endsWith(".js")) {
|
||||
modified = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
|
||||
package com.volmit.iris.util.mantle;
|
||||
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
import com.volmit.iris.util.data.Varint;
|
||||
import com.volmit.iris.util.documentation.ChunkCoordinates;
|
||||
import com.volmit.iris.util.matter.IrisMatter;
|
||||
import com.volmit.iris.util.matter.Matter;
|
||||
@@ -63,8 +60,7 @@ public class MantleChunk {
|
||||
int s = din.readByte();
|
||||
int f = din.readByte();
|
||||
|
||||
for(int i = 0; i < f; i++)
|
||||
{
|
||||
for (int i = 0; i < f; i++) {
|
||||
flags.add(din.readUTF());
|
||||
}
|
||||
|
||||
@@ -75,21 +71,15 @@ public class MantleChunk {
|
||||
}
|
||||
}
|
||||
|
||||
public void flag(String s, boolean f)
|
||||
{
|
||||
if(f)
|
||||
{
|
||||
public void flag(String s, boolean f) {
|
||||
if (f) {
|
||||
flags.add(s);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
} else {
|
||||
flags.remove(s);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isFlagged(String s)
|
||||
{
|
||||
public boolean isFlagged(String s) {
|
||||
return flags.contains(s);
|
||||
}
|
||||
|
||||
@@ -162,8 +152,7 @@ public class MantleChunk {
|
||||
dos.writeByte(sections.length());
|
||||
dos.writeByte(flags.size());
|
||||
|
||||
for(String i : flags)
|
||||
{
|
||||
for (String i : flags) {
|
||||
dos.writeUTF(i);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,8 @@ public class ZoneMatter extends RawMatter<IrisFeaturePositional> {
|
||||
|
||||
@Override
|
||||
public void setRaw(int x, int y, int z, IrisFeaturePositional t) {
|
||||
for(int i = 0; i < getHeight(); i++)
|
||||
{
|
||||
if(get(x, i, z) == null)
|
||||
{
|
||||
for (int i = 0; i < getHeight(); i++) {
|
||||
if (get(x, i, z) == null) {
|
||||
super.setRaw(x, i, z, t);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user