Fixed map re-import not working
This commit is contained in:
@@ -97,6 +97,7 @@ public class MapIO{
|
||||
};
|
||||
|
||||
ver.readRegion("content", stream, counter, ver::readContentHeader);
|
||||
if(ver.version >= 11) ver.readRegion("content", stream, counter, ver::skipContentPatches);
|
||||
ver.readRegion("preview_map", stream, counter, in -> ver.readMap(in, new WorldContext(){
|
||||
@Override public void resize(int width, int height){}
|
||||
@Override public boolean isGenerating(){return false;}
|
||||
|
||||
@@ -505,6 +505,14 @@ public abstract class SaveVersion extends SaveFileReader{
|
||||
readWorldEntities(stream, mapping);
|
||||
}
|
||||
|
||||
public void skipContentPatches(DataInput stream) throws IOException{
|
||||
int amount = stream.readUnsignedByte();
|
||||
for(int i = 0; i < amount; i++){
|
||||
int len = stream.readInt();
|
||||
stream.skipBytes(len);
|
||||
}
|
||||
}
|
||||
|
||||
public void readContentPatches(DataInput stream) throws IOException{
|
||||
Seq<String> patches = new Seq<>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user