fix: release interaction NPC handle when owner NPC despawn (#3161)

This commit is contained in:
ZX夏夜之风 2024-10-22 19:19:26 +08:00 committed by GitHub
parent 5e85b8a035
commit 4d1b5a79b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,6 +61,7 @@ public class BoundingBoxTrait extends Trait implements Supplier<BoundingBox> {
npc.data().remove(NPC.Metadata.BOUNDING_BOX_FUNCTION); npc.data().remove(NPC.Metadata.BOUNDING_BOX_FUNCTION);
if (interaction != null) { if (interaction != null) {
interaction.destroy(); interaction.destroy();
interaction = null;
} }
} }