Fixed save incompatibility with missing types

This commit is contained in:
Anuken
2020-08-18 23:42:05 -04:00
parent b551af6bcf
commit 7ebe84cc0e
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -331,6 +331,11 @@ public abstract class SaveVersion extends SaveFileReader{
for(int j = 0; j < amount; j++){
readChunk(stream, true, in -> {
byte typeid = in.readByte();
if(EntityMapping.map(typeid) == null){
in.skipBytes(lastRegionLength - 1);
return;
}
Entityc entity = (Entityc)EntityMapping.map(typeid).get();
entity.read(Reads.get(in));
entity.add();