mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-11 18:02:08 +01:00
fix missing inversion in DataComponentMap#diff handling for removed entries (#2359)
This commit is contained in:
parent
af7e357140
commit
11ed85a921
@ -72,7 +72,7 @@ public sealed interface DataComponentMap extends DataComponent.Holder permits Da
|
|||||||
final var protoComp = protoImpl.components().get(entry.getIntKey()); // Entry in prototype
|
final var protoComp = protoImpl.components().get(entry.getIntKey()); // Entry in prototype
|
||||||
if (entry.getValue() == null) {
|
if (entry.getValue() == null) {
|
||||||
// If the component is removed, remove it from the diff if it is not in the prototype
|
// 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();
|
iter.remove();
|
||||||
}
|
}
|
||||||
} else if (protoComp != null && protoComp.equals(entry.getValue())) {
|
} else if (protoComp != null && protoComp.equals(entry.getValue())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user