fix: Fixes loading the world when types are deleted (#2055)

This commit is contained in:
Kamron Batman 2025-01-07 22:33:09 -08:00 • committed by GitHub
parent 9f50ae431a
commit e708bd7f69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -375,7 +375,6 @@ public class GenericEntityPersistence<T> : GenericPersistence, IGenericEntityPer
// Skip this entry // Skip this entry
if (t == null) if (t == null)
{ {
dataReader.Seek(entry.Length, SeekOrigin.Current);
continue; continue;
} }
@ -383,7 +382,9 @@ public class GenericEntityPersistence<T> : GenericPersistence, IGenericEntityPer
try try
{ {
var pos = dataReader.Position; dataReader.Seek(entry.Position, SeekOrigin.Begin);
var pos = entry.Position;
t.Deserialize(dataReader); t.Deserialize(dataReader);
var lengthDeserialized = dataReader.Position - pos; var lengthDeserialized = dataReader.Position - pos;