From f6a6ba94db0f90cd1541f63c3a7d09ceb5a99928 Mon Sep 17 00:00:00 2001 From: Thiakil Date: Wed, 22 Nov 2023 12:15:04 +0800 Subject: [PATCH] fix: prevent client crash with radiationParticleCount set to 0 --- .../java/mekanism/common/lib/radiation/RadiationManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/mekanism/common/lib/radiation/RadiationManager.java b/src/main/java/mekanism/common/lib/radiation/RadiationManager.java index 05d20fb453d..553af9cade0 100644 --- a/src/main/java/mekanism/common/lib/radiation/RadiationManager.java +++ b/src/main/java/mekanism/common/lib/radiation/RadiationManager.java @@ -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++) {