fix missing inversion in DataComponentMap#diff handling for removed entries (#2359)

This commit is contained in:
Floweynt 2024-09-07 22:31:42 +00:00 committed by GitHub
parent af7e357140
commit 11ed85a921
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,7 +72,7 @@ public sealed interface DataComponentMap extends DataComponent.Holder permits Da
final var protoComp = protoImpl.components().get(entry.getIntKey()); // Entry in prototype
if (entry.getValue() == null) {
// If the component is removed, remove it from the diff if it is not in the prototype
if (protoImpl.components().containsKey(entry.getIntKey())) {
if (!protoImpl.components().containsKey(entry.getIntKey())) {
iter.remove();
}
} else if (protoComp != null && protoComp.equals(entry.getValue())) {