diff options
author | boubou19 <miisterunknown@gmail.com> | 2023-10-04 23:22:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 21:22:52 +0000 |
commit | e0d5a220e764f9a921d5cd98a3e1e2e64ad6c591 (patch) | |
tree | f998981e355c22edeae24f47286defeedf03213f /src/main/java/gregtech/api/items | |
parent | 9f75b1d13967a7fee94b39da61fac361ae3170fa (diff) | |
download | GT5-Unofficial-e0d5a220e764f9a921d5cd98a3e1e2e64ad6c591.tar.gz GT5-Unofficial-e0d5a220e764f9a921d5cd98a3e1e2e64ad6c591.tar.bz2 GT5-Unofficial-e0d5a220e764f9a921d5cd98a3e1e2e64ad6c591.zip |
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 <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/api/items')
-rw-r--r-- | src/main/java/gregtech/api/items/GT_BreederCell_Item.java | 2 | ||||
-rw-r--r-- | src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java | 3 |
2 files changed, 2 insertions, 3 deletions
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); } } |