mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-23 00:39:20 +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;
|
return previous;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mergeHistory.hasPreviousMerged(entity, previous)) {
|
||||||
|
this.entityTable.clear();
|
||||||
|
}
|
||||||
|
|
||||||
Entity nextEntity = this.entityTable.getAndWrite(entity);
|
Entity nextEntity = this.entityTable.getAndWrite(entity);
|
||||||
if (nextEntity == null || entity == nextEntity || !nextEntity.level().equals(entity.level())) {
|
if (nextEntity == null || entity == nextEntity || !nextEntity.level().equals(entity.level())) {
|
||||||
return null;
|
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