From 5926dce3bbbe9bf2f4bfad2a13f87a40eedb77f4 Mon Sep 17 00:00:00 2001 From: Thiakil Date: Thu, 16 Jan 2025 18:10:31 +0800 Subject: [PATCH] skip iterating entities if radiation is background level --- .../content/fission/FissionReactorMultiblockData.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/generators/java/mekanism/generators/common/content/fission/FissionReactorMultiblockData.java b/src/generators/java/mekanism/generators/common/content/fission/FissionReactorMultiblockData.java index b83d4375a56..6075a93ad3a 100644 --- a/src/generators/java/mekanism/generators/common/content/fission/FissionReactorMultiblockData.java +++ b/src/generators/java/mekanism/generators/common/content/fission/FissionReactorMultiblockData.java @@ -486,10 +486,13 @@ private void burnFuel(Level world) { private void radiateEntities(Level world) { IRadiationManager radiationManager = IRadiationManager.INSTANCE; if (radiationManager.isRadiationEnabled() && isBurning() && world.getRandom().nextInt() % SharedConstants.TICKS_PER_SECOND == 0) { + double wasteRadiation = getWasteTankRadioactivity(false) / 3_600F; // divide down to Sv/s + double magnitude = lastBurnRate + wasteRadiation; + if (magnitude <= RadiationManager.BASELINE) { + return; + } List entitiesToRadiate = getLevel().getEntitiesOfClass(LivingEntity.class, hotZone); if (!entitiesToRadiate.isEmpty()) { - double wasteRadiation = getWasteTankRadioactivity(false) / 3_600F; // divide down to Sv/s - double magnitude = lastBurnRate + wasteRadiation; for (LivingEntity entity : entitiesToRadiate) { radiationManager.radiate(entity, magnitude); }