Skip to content

Commit

Permalink
fix: prevent client crash with radiationParticleCount set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
thiakil committed Nov 22, 2023
1 parent 296c1de commit f6a6ba9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public void tickClient(Player player) {
return;
}
// perhaps also play Geiger counter sound effect, even when not using item (similar to fallout)
if (clientRadiationScale != RadiationScale.NONE && player.level().getRandom().nextInt(2) == 0) {
if (clientRadiationScale != RadiationScale.NONE && MekanismConfig.client.radiationParticleCount.get() != 0 && player.level().getRandom().nextInt(2) == 0) {
int count = player.level().getRandom().nextInt(clientRadiationScale.ordinal() * MekanismConfig.client.radiationParticleCount.get());
int radius = MekanismConfig.client.radiationParticleRadius.get();
for (int i = 0; i < count; i++) {
Expand Down

0 comments on commit f6a6ba9

Please sign in to comment.