Skip to content

Commit

Permalink
Clear teams when npc is created
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverSchlueter committed Oct 20, 2024
1 parent a8eb356 commit f484c01
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void create() {
EntityType<?> nmsType = BuiltInRegistries.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(data.getType().getKey()));
EntityType.EntityFactory factory = (EntityType.EntityFactory) ReflectionUtils.getValue(nmsType, "factory"); // EntityType.factory
npc = factory.create(nmsType, serverLevel);
isTeamCreated.clear();
}
}

Expand Down

0 comments on commit f484c01

Please sign in to comment.