SPIGOT-7976: Renaming a sign item adds block_entity_data component

This commit is contained in:
md_5 2024-12-23 17:37:42 +11:00
parent 21b5eaf8fd
commit 7bb75dc5c2
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -70,18 +70,19 @@
@Nullable
@Override
public <T> T get(DataComponentType<T> datacomponenttype) {
@@ -287,6 +317,10 @@
@@ -287,6 +317,11 @@
DataComponentPatch datacomponentpatch1 = datacomponentpatch.forget(set::contains);
this.components = datacomponentpatch1.split().added();
+ // CraftBukkit start
+ set.remove(DataComponents.BLOCK_ENTITY_DATA); // Remove as never actually added by applyImplicitComponents
+ set.remove(DataComponents.BLOCK_STATE); // Remove as never actually added by applyImplicitComponents
+ return set;
+ // CraftBukkit end
}
protected void collectImplicitComponents(DataComponentMap.a datacomponentmap_a) {}
@@ -321,6 +355,15 @@
@@ -321,6 +356,15 @@
}
}