mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 12:11:35 +01:00
reset meta block state on BlockStateMeta#setBlockState
This commit is contained in:
parent
476103747a
commit
85894149b3
@ -427,6 +427,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ patchedMap.setAll(map);
|
+ patchedMap.setAll(map);
|
||||||
+ final DataComponentPatch patch = patchedMap.asPatch();
|
+ final DataComponentPatch patch = patchedMap.asPatch();
|
||||||
+ this.updateFromPatch(patch, null);
|
+ this.updateFromPatch(patch, null);
|
||||||
|
+ // we have to reset the fields because this should be like a "new" block entity is being used
|
||||||
|
+ this.blockEntityTag = CustomData.EMPTY;
|
||||||
|
+ this.components = DataComponentMap.EMPTY;
|
||||||
+ this.updateBlockState(patch);
|
+ this.updateBlockState(patch);
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user