mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-05 23:36:12 +00:00
Cleanup
This commit is contained in:
@@ -76,7 +76,8 @@ public class B {
|
||||
Material mm = Material.valueOf(bx);
|
||||
materialCache.put(bx, mm);
|
||||
return mm;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
nullMaterialCache.add(bx);
|
||||
return null;
|
||||
}
|
||||
@@ -111,7 +112,8 @@ public class B {
|
||||
}
|
||||
|
||||
return bdx;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
Iris.warn("Unknown Block Data '" + bdxf + "'");
|
||||
}
|
||||
|
||||
@@ -143,7 +145,8 @@ public class B {
|
||||
BlockData bx = Bukkit.createBlockData(ix);
|
||||
blockDataCache.put(ix, bx);
|
||||
return bx;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
|
||||
@@ -154,7 +157,8 @@ public class B {
|
||||
try {
|
||||
BlockData bd = Material.valueOf(i).createBlockData();
|
||||
blockDataCache.put(ix, bd);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,8 @@ public class DirectWorldWriter {
|
||||
|
||||
MCAUtil.write(writeBuffer.get(i), f, true);
|
||||
writeBuffer.remove(i);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
@@ -157,7 +158,8 @@ public class DirectWorldWriter {
|
||||
}
|
||||
|
||||
return getBlockData(tag);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
return B.get("AIR");
|
||||
@@ -238,14 +240,11 @@ public class DirectWorldWriter {
|
||||
public void verify(int mcaox, int mcaoz) {
|
||||
MCAFile file = getMCA(mcaox, mcaoz);
|
||||
|
||||
for(int i = 0; i < 32; i++)
|
||||
{
|
||||
for(int j = 0; j < 32; j++)
|
||||
{
|
||||
for (int i = 0; i < 32; i++) {
|
||||
for (int j = 0; j < 32; j++) {
|
||||
Chunk c = file.getChunk(i, j);
|
||||
|
||||
if(c == null)
|
||||
{
|
||||
if (c == null) {
|
||||
Iris.warn("Chunk " + ((mcaox << 5) + i) + ", " + ((mcaoz << 5) + j) + " is null in MCA File " + mcaox + ", " + mcaoz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ public class LinkedTerrainChunk implements TerrainChunk {
|
||||
private ChunkData createChunkData(int maxHeight) {
|
||||
try {
|
||||
return Bukkit.createChunkData(new HeightedFakeWorld(maxHeight));
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
@@ -126,23 +126,21 @@ public class ResourceLoader<T extends IrisRegistrant> {
|
||||
t.setLoader(manager);
|
||||
lock.unlock();
|
||||
return t;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
lock.unlock();
|
||||
failLoad(j, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public KList<T> loadAll(KList<String> s)
|
||||
{
|
||||
public KList<T> loadAll(KList<String> s) {
|
||||
KList<T> m = new KList<>();
|
||||
|
||||
for(String i : s)
|
||||
{
|
||||
for (String i : s) {
|
||||
T t = load(i);
|
||||
|
||||
if(t != null)
|
||||
{
|
||||
if (t != null) {
|
||||
m.add(t);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,19 +93,22 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
} else if (SHORT_LITERAL_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
return new ShortTag(Short.parseShort(s.substring(0, s.length() - 1)));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("short not in range: \"" + s.substring(0, s.length() - 1) + "\"");
|
||||
}
|
||||
} else if (LONG_LITERAL_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
return new LongTag(Long.parseLong(s.substring(0, s.length() - 1)));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("long not in range: \"" + s.substring(0, s.length() - 1) + "\"");
|
||||
}
|
||||
} else if (INT_LITERAL_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
return new IntTag(Integer.parseInt(s));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("int not in range: \"" + s.substring(0, s.length() - 1) + "\"");
|
||||
}
|
||||
} else if (DOUBLE_LITERAL_PATTERN.matcher(s).matches()) {
|
||||
@@ -152,7 +155,8 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
Tag<?> element = parseAnything(decrementMaxDepth(maxDepth));
|
||||
try {
|
||||
list.addUnchecked(element);
|
||||
} catch (IllegalArgumentException ex) {Iris.reportError(ex);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException(ex.getMessage());
|
||||
}
|
||||
if (!ptr.nextArrayElement()) {
|
||||
@@ -187,7 +191,8 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
if (NUMBER_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
byteList.add(Byte.parseByte(s));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("byte not in range: \"" + s + "\"");
|
||||
}
|
||||
} else {
|
||||
@@ -213,7 +218,8 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
if (NUMBER_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
intList.add(Integer.parseInt(s));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("int not in range: \"" + s + "\"");
|
||||
}
|
||||
} else {
|
||||
@@ -235,7 +241,8 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
if (NUMBER_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
longList.add(Long.parseLong(s));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("long not in range: \"" + s + "\"");
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user