Basic schematic based generation
This commit is contained in:
@@ -94,12 +94,12 @@ public abstract class SaveFileReader{
|
||||
return length;
|
||||
}
|
||||
|
||||
public void skipRegion(DataInput input) throws IOException{
|
||||
skipRegion(input, false);
|
||||
public void skipChunk(DataInput input) throws IOException{
|
||||
skipChunk(input, false);
|
||||
}
|
||||
|
||||
/** Skip a region completely. */
|
||||
public void skipRegion(DataInput input, boolean isByte) throws IOException{
|
||||
/** Skip a chunk completely, discarding the bytes. */
|
||||
public void skipChunk(DataInput input, boolean isByte) throws IOException{
|
||||
int length = readChunk(input, isByte, t -> {});
|
||||
int skipped = input.skipBytes(length);
|
||||
if(length != skipped){
|
||||
|
||||
@@ -245,7 +245,7 @@ public abstract class SaveVersion extends SaveFileReader{
|
||||
}
|
||||
}else{
|
||||
//skip the entity region, as the entity and its IO code are now gone
|
||||
skipRegion(stream, true);
|
||||
skipChunk(stream, true);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -110,7 +110,7 @@ public abstract class LegacySaveVersion extends SaveVersion{
|
||||
int amount = stream.readInt();
|
||||
for(int j = 0; j < amount; j++){
|
||||
//simply skip all the entities
|
||||
skipRegion(stream, true);
|
||||
skipChunk(stream, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user