From e0d5a220e764f9a921d5cd98a3e1e2e64ad6c591 Mon Sep 17 00:00:00 2001 From: boubou19 Date: Wed, 4 Oct 2023 23:22:52 +0200 Subject: Code cleanup (#2309) * guard clause technique on GT_ItemIterator * removing oredict for ars magica 2 items * removing oredict for mystcraft items * convert big if ladder into a swtich statement * enhanced switch * clean non GTNH compat and identify other compats * spotlessApply (#2310) Co-authored-by: GitHub GTNH Actions <> * more guard clauses * reordering condition * removing dead code * removing optional block * deprecating mIC2Classic * spotless apply * deprecate modloaded variables * spotlessApply --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Martin Robertz --- src/main/java/gregtech/api/items/GT_BreederCell_Item.java | 2 +- src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/api/items') diff --git a/src/main/java/gregtech/api/items/GT_BreederCell_Item.java b/src/main/java/gregtech/api/items/GT_BreederCell_Item.java index 587d469017..3d51415783 100644 --- a/src/main/java/gregtech/api/items/GT_BreederCell_Item.java +++ b/src/main/java/gregtech/api/items/GT_BreederCell_Item.java @@ -68,7 +68,7 @@ public class GT_BreederCell_Item extends GT_Generic_Item implements IReactorComp @Override public void onUpdate(ItemStack stack, World world, Entity entity, int slotIndex, boolean isCurrentItem) { if ((entity instanceof EntityLivingBase entityLiving)) { - if (!GregTech_API.mIC2Classic && !GT_Utility.isWearingFullRadioHazmat(entityLiving)) { + if (!GT_Utility.isWearingFullRadioHazmat(entityLiving)) { IC2Potion.radiation.applyTo(entityLiving, 20, 1); } } diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java index c38510f750..8698bac886 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java @@ -7,7 +7,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.util.GT_Utility; import ic2.api.reactor.IReactor; @@ -176,7 +175,7 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement @Override public void onUpdate(ItemStack stack, World world, Entity entity, int slotIndex, boolean isCurrentItem) { if (this.sRadiation > 0 && (entity instanceof EntityLivingBase entityLiving)) { - if (!GregTech_API.mIC2Classic && !GT_Utility.isWearingFullRadioHazmat(entityLiving)) { + if (!GT_Utility.isWearingFullRadioHazmat(entityLiving)) { IC2Potion.radiation.applyTo(entityLiving, sRadiation * 20, sRadiation * 10); } } -- cgit