Skip to content

Commit

Permalink
Enqueue stat register event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ustc-zzzz committed Mar 11, 2022
1 parent 860500e commit c388ada
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/teacon/chromeball/common/CBHitsByStat.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public class CBHitsByStat {

@SubscribeEvent
public static void registerStat(FMLCommonSetupEvent event) {
Registry.register(Registry.CUSTOM_STAT, INSTANCE, INSTANCE);
Stats.CUSTOM.get(INSTANCE);
event.enqueueWork(() -> {
Registry.register(Registry.CUSTOM_STAT, INSTANCE, INSTANCE);
Stats.CUSTOM.get(INSTANCE);
});
}
}

0 comments on commit c388ada

Please sign in to comment.