mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-19 14:59:30 +00:00
Fix lenient merging sometimes merging entities out of order
This commit is contained in:
@@ -86,12 +86,16 @@ public interface MergeStrategy {
|
||||
return previous;
|
||||
}
|
||||
|
||||
if (!mergeHistory.hasPreviousMerged(entity, previous)) {
|
||||
this.entityTable.clear();
|
||||
}
|
||||
|
||||
Entity nextEntity = this.entityTable.getAndWrite(entity);
|
||||
if (nextEntity == null || entity == nextEntity || !nextEntity.level().equals(entity.level())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return mergeHistory.hasPreviousMerged(entity, nextEntity) && entity.compareState(nextEntity) ? nextEntity : null;
|
||||
return entity.compareState(nextEntity) ? nextEntity : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user