Fixed save incompatibility with missing types
This commit is contained in:
@@ -37,6 +37,8 @@ public abstract class SaveFileReader{
|
||||
"command-center", "legacy-command-center"
|
||||
);
|
||||
|
||||
protected int lastRegionLength;
|
||||
|
||||
protected void region(String name, DataInput stream, CounterInputStream counter, IORunner<DataInput> cons) throws IOException{
|
||||
counter.resetCount();
|
||||
int length;
|
||||
@@ -90,6 +92,7 @@ public abstract class SaveFileReader{
|
||||
/** Reads a chunk of some length. Use the runner for reading to catch more descriptive errors. */
|
||||
public int readChunk(DataInput input, boolean isShort, IORunner<DataInput> runner) throws IOException{
|
||||
int length = isShort ? input.readUnsignedShort() : input.readInt();
|
||||
lastRegionLength = length;
|
||||
runner.accept(input);
|
||||
return length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user