Skip to content

Commit

Permalink
invalidate damage cache on reload and server start
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDeathlyCow committed Apr 13, 2024
1 parent 3151059 commit 33dd712
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ public class DamageTemperatureEffect extends TemperatureEffect<DamageTemperature

public DamageTemperatureEffect(Codec<Config> codec) {
super(codec);
ServerLifecycleEvents.SERVER_STARTING.register(
server -> this.invalidateRegistryCache()
);
ServerLifecycleEvents.SERVER_STOPPING.register(
server -> this.invalidateRegistryCache()
);
ServerLifecycleEvents.START_DATA_PACK_RELOAD.register(
(server, resourceManager) -> this.invalidateRegistryCache()
);
}

@Override
Expand Down

0 comments on commit 33dd712

Please sign in to comment.