diff options
| author | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
|---|---|---|
| committer | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
| commit | 55f64675b42ac8d3c557cc850f78664bee006f6f (patch) | |
| tree | 2afd26dd3d5e6f763119bc192b57c66a1a075922 /src/main/java/gtPlusPlus/xmod/witchery | |
| parent | 0f5dfd01b877b6a1019e0671b88d07974aae68c0 (diff) | |
| download | GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.gz GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.bz2 GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.zip | |
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/witchery')
| -rw-r--r-- | src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java b/src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java index b1e01eab7f..78a1bcba91 100644 --- a/src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java +++ b/src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java @@ -1,17 +1,20 @@ package gtPlusPlus.xmod.witchery; -import com.mojang.authlib.GameProfile; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.util.reflect.ReflectionUtils; import java.lang.reflect.Field; import java.util.ArrayList; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.oredict.OreDictionary; +import com.mojang.authlib.GameProfile; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + public class WitchUtils { private static final GameProfile NORMAL_MINER_PROFILE; @@ -26,8 +29,7 @@ public class WitchUtils { a2 = getField("com.emoniph.witchery.entity.ai.EntityAIDigBlocks", "KOBOLDITE_MINER_PROFILE"); b1 = (GameProfile) a1.get(null); b2 = (GameProfile) a2.get(null); - } catch (Throwable t) { - } + } catch (Throwable t) {} } NORMAL_MINER_PROFILE = b1; KOBOLDITE_MINER_PROFILE = b2; @@ -38,8 +40,7 @@ public class WitchUtils { if (LoadedMods.Witchery) { - if (harvester != null - && !harvester.worldObj.isRemote + if (harvester != null && !harvester.worldObj.isRemote && !event.isCanceled() && (isEqual(harvester.getGameProfile(), KOBOLDITE_MINER_PROFILE) || isEqual(harvester.getGameProfile(), NORMAL_MINER_PROFILE))) { @@ -52,8 +53,7 @@ public class WitchUtils { if (oreIDs.length > 0) { final String oreName = OreDictionary.getOreName(oreIDs[0]); if (oreName != null && oreName.startsWith("ore")) { - final ItemStack smeltedDrop = - FurnaceRecipes.smelting().getSmeltingResult(drop); + final ItemStack smeltedDrop = FurnaceRecipes.smelting().getSmeltingResult(drop); if (smeltedDrop != null && hasKobolditePick && harvester.worldObj.rand.nextDouble() < 0.5) { addOriginal = false; newDrops.add(smeltedDrop.copy()); @@ -93,10 +93,6 @@ public class WitchUtils { } public static boolean isEqual(final GameProfile a, final GameProfile b) { - return a != null - && b != null - && a.getId() != null - && b.getId() != null - && a.getId().equals(b.getId()); + return a != null && b != null && a.getId() != null && b.getId() != null && a.getId().equals(b.getId()); } } |
