Data bits

This commit is contained in:
cyberpwn
2021-09-26 04:42:44 -04:00
parent c7a8cb566b
commit f2a5489363
8 changed files with 33 additions and 49 deletions

View File

@@ -18,6 +18,7 @@
package com.volmit.iris.util.matter;
import com.volmit.iris.Iris;
import com.volmit.iris.engine.data.cache.Cache;
import com.volmit.iris.util.data.Varint;
import com.volmit.iris.util.data.palette.Palette;
@@ -184,7 +185,15 @@ public interface MatterSlice<T> extends Hunk<T>, PaletteType<T>, Writable<T> {
default void read(DataInputStream din) throws IOException {
if ((this instanceof PaletteOrHunk f && f.isPalette())) {
f.setPalette(new DataContainer<>(din, this));
try {
f.setPalette(new DataContainer<>(din, this));
}
catch(Throwable e)
{
Iris.error("Failed to read " + getType() + " Matter! ?? ");
throw new IOException(e);
}
return;
}