From 20bef6e26d948698398bd16aeab8c9e6b89110e4 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 22 Aug 2019 20:01:40 -0400 Subject: Format/import cleanup --- .../darkknight/jewelrycraft/thirdparty/EE3.java | 41 +++----------- .../darkknight/jewelrycraft/thirdparty/ModIds.java | 44 +++++++-------- .../darkknight/jewelrycraft/thirdparty/NEI.java | 12 ++-- .../jewelrycraft/thirdparty/ThirdPartyManager.java | 65 +++++++--------------- 4 files changed, 54 insertions(+), 108 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/thirdparty') diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java b/src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java index 8f61767..26be29f 100755 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java @@ -25,53 +25,30 @@ public class EE3 implements IThirdParty { @Override public void postInit() { - EnergyValueRegistryProxy.addPostAssignedEnergyValue( - new ItemStack(BlockList.shadowOre), 4096); + EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(BlockList.shadowOre), 4096); - EnergyValueRegistryProxy.addPostAssignedEnergyValue( - new ItemStack(BlockList.shadowBlock), - 36864); + EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(BlockList.shadowBlock), 36864); - EnergyValueRegistryProxy.addPostAssignedEnergyValue( - new ItemStack(ItemList.shadowIngot), 4096); + EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(ItemList.shadowIngot), 4096); - EnergyValueRegistryProxy.addPostAssignedEnergyValue( - new ItemStack(BlockList.jewelCraftingTable), - 16640); + EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(BlockList.jewelCraftingTable), 16640); - EnergyValueRegistryProxy.addPostAssignedEnergyValue( - new ItemStack(ItemList.guide), 288); + EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(ItemList.guide), 288); for (int i = 0; i < ItemClayMolds.moldsItemNames.length; i++) { - EnergyValueRegistryProxy - .addPostAssignedEnergyValue( - new ItemStack(ItemList.clayMolds, - 1, - i), - 128); + EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(ItemList.clayMolds, 1, i), 128); } for (int i = 0; i < ItemMolds.moldsItemNames.length; i++) { - EnergyValueRegistryProxy - .addPostAssignedEnergyValue( - new ItemStack(ItemList.molds, - 1, - i), - 128); + EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(ItemList.molds, 1, i), 128); } for (int i = 0; i < BlockCrystal.colors.length; i++) { - EnergyValueRegistryProxy - .addPostAssignedEnergyValue( - new ItemStack(BlockList.crystal, - 1, - i), - 64); + EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(BlockList.crystal, 1, i), 64); } for (int i = 0; i < Names.Items.GEM_SUBTYPES.length; i++) { - JewelrycraftUtil.gem.add( - new ItemStack(ModItems.gem, 1, i)); + JewelrycraftUtil.gem.add(new ItemStack(ModItems.gem, 1, i)); } } diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java b/src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java index 42fc800..ae394d1 100755 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java @@ -4,26 +4,26 @@ package darkknight.jewelrycraft.thirdparty; * @author MineMarteen from Pneumaticraft */ public class ModIds { - public static final String BUILDCRAFT = "BuildCraft|Core"; - public static final String COMPUTERCRAFT = "ComputerCraft"; - public static final String INDUSTRIALCRAFT = "IC2"; - public static final String IGWMOD = "IGWMod"; - public static final String FMP = "ForgeMultipart"; - public static final String WAILA = "Waila"; - public static final String TE = "ThermalExpansion"; - public static final String HC = "HydCraft"; - public static final String NEI = "NotEnoughItems"; - public static final String THAUMCRAFT = "Thaumcraft"; - public static final String BLOOD_MAGIC = "AWWayofTime"; - public static final String AE2 = "appliedenergistics2"; - public static final String CHISEL = "chisel"; - public static final String FORESTRY = "Forestry"; - public static final String MFR = "MineFactoryReloaded"; - public static final String OPEN_BLOCKS = "OpenBlocks"; - public static final String COFH_CORE = "CoFHCore"; - public static final String NOT_ENOUGH_KEYS = "notenoughkeys"; - public static final String OPEN_COMPUTERS = "OpenComputers|Core"; - public static final String EE3 = "EE3"; - public static final String PENUMATICRAFT = "PneumaticCraft"; - public static final String ALPACA = "alpaca"; + public static final String BUILDCRAFT = "BuildCraft|Core"; + public static final String COMPUTERCRAFT = "ComputerCraft"; + public static final String INDUSTRIALCRAFT = "IC2"; + public static final String IGWMOD = "IGWMod"; + public static final String FMP = "ForgeMultipart"; + public static final String WAILA = "Waila"; + public static final String TE = "ThermalExpansion"; + public static final String HC = "HydCraft"; + public static final String NEI = "NotEnoughItems"; + public static final String THAUMCRAFT = "Thaumcraft"; + public static final String BLOOD_MAGIC = "AWWayofTime"; + public static final String AE2 = "appliedenergistics2"; + public static final String CHISEL = "chisel"; + public static final String FORESTRY = "Forestry"; + public static final String MFR = "MineFactoryReloaded"; + public static final String OPEN_BLOCKS = "OpenBlocks"; + public static final String COFH_CORE = "CoFHCore"; + public static final String NOT_ENOUGH_KEYS = "notenoughkeys"; + public static final String OPEN_COMPUTERS = "OpenComputers|Core"; + public static final String EE3 = "EE3"; + public static final String PENUMATICRAFT = "PneumaticCraft"; + public static final String ALPACA = "alpaca"; } \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java b/src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java index 70a8744..212faf1 100755 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java @@ -19,14 +19,10 @@ public class NEI implements IThirdParty { @Override public void postInit() { for (int i = 0; i < Curse.getCurseList().size(); i++) - codechicken.nei.api.API.hideItem(new ItemStack( - ItemList.testItem, 1, i)); - codechicken.nei.api.API - .hideItem(new ItemStack(ItemList.goldObj)); - codechicken.nei.api.API.hideItem( - new ItemStack(BlockList.midasTouchBlock)); - codechicken.nei.api.API - .hideItem(new ItemStack(ItemList.metal)); + codechicken.nei.api.API.hideItem(new ItemStack(ItemList.testItem, 1, i)); + codechicken.nei.api.API.hideItem(new ItemStack(ItemList.goldObj)); + codechicken.nei.api.API.hideItem(new ItemStack(BlockList.midasTouchBlock)); + codechicken.nei.api.API.hideItem(new ItemStack(ItemList.metal)); } @Override diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java b/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java index bb819d5..35dd49b 100755 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java @@ -21,8 +21,8 @@ import net.minecraft.world.World; */ public class ThirdPartyManager implements IGuiHandler { - private static ThirdPartyManager INSTANCE = new ThirdPartyManager(); - private final List thirdPartyMods = new ArrayList<>(); + private static ThirdPartyManager INSTANCE = new ThirdPartyManager(); + private final List thirdPartyMods = new ArrayList<>(); public static ThirdPartyManager instance() { return INSTANCE; @@ -36,34 +36,24 @@ public class ThirdPartyManager implements IGuiHandler { List enabledThirdParty = new ArrayList<>(); - ConfigHandler.config.addCustomCategoryComment( - "third_party_enabling", + ConfigHandler.config.addCustomCategoryComment("third_party_enabling", "With these options you can disable third party content by mod." + " Useful if something in the mod changes and causes crashes."); for (String modid : thirdPartyClasses.keySet()) { - if (ConfigHandler.config - .get("Third_Party_Enabling", modid, - true) - .getBoolean()) { + if (ConfigHandler.config.get("Third_Party_Enabling", modid, true).getBoolean()) { enabledThirdParty.add(modid); } } ConfigHandler.config.save(); - for (Map.Entry> entry : thirdPartyClasses - .entrySet()) { - if (enabledThirdParty.contains(entry.getKey()) - && Loader.isModLoaded( - entry.getKey())) { + for (Map.Entry> entry : thirdPartyClasses.entrySet()) { + if (enabledThirdParty.contains(entry.getKey()) && Loader.isModLoaded(entry.getKey())) { try { - thirdPartyMods.add(entry.getValue() - .newInstance()); + thirdPartyMods.add(entry.getValue().newInstance()); } catch (Exception e) { - JewelrycraftMod.logger.log( - Level.ERROR, - "Failed to instantiate third party handler!"); + JewelrycraftMod.logger.log(Level.ERROR, "Failed to instantiate third party handler!"); e.printStackTrace(); } } @@ -73,16 +63,14 @@ public class ThirdPartyManager implements IGuiHandler { public void onItemRegistry(Item item) { for (IThirdParty thirdParty : thirdPartyMods) { if (thirdParty instanceof IRegistryListener) - ((IRegistryListener) thirdParty) - .onItemRegistry(item); + ((IRegistryListener) thirdParty).onItemRegistry(item); } } public void onBlockRegistry(Block block) { for (IThirdParty thirdParty : thirdPartyMods) { if (thirdParty instanceof IRegistryListener) - ((IRegistryListener) thirdParty) - .onBlockRegistry(block); + ((IRegistryListener) thirdParty).onBlockRegistry(block); } } @@ -93,8 +81,7 @@ public class ThirdPartyManager implements IGuiHandler { } catch (Throwable e) { JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " - + thirdParty.getClass() - + " in the PreInit phase!"); + + thirdParty.getClass() + " in the PreInit phase!"); e.printStackTrace(); } } @@ -107,8 +94,7 @@ public class ThirdPartyManager implements IGuiHandler { } catch (Throwable e) { JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " - + thirdParty.getClass() - + " in the Init phase!"); + + thirdParty.getClass() + " in the Init phase!"); e.printStackTrace(); } } @@ -121,8 +107,7 @@ public class ThirdPartyManager implements IGuiHandler { } catch (Throwable e) { JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " - + thirdParty.getClass() - + " in the PostInit phase!"); + + thirdParty.getClass() + " in the PostInit phase!"); e.printStackTrace(); } } @@ -135,8 +120,7 @@ public class ThirdPartyManager implements IGuiHandler { } catch (Throwable e) { JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " - + thirdParty.getClass() - + " client side!"); + + thirdParty.getClass() + " client side!"); e.printStackTrace(); } } @@ -149,23 +133,17 @@ public class ThirdPartyManager implements IGuiHandler { } catch (Throwable e) { JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " - + thirdParty.getClass() - + " client side on the init!"); + + thirdParty.getClass() + " client side on the init!"); e.printStackTrace(); } } } @Override - public Object getServerGuiElement(int ID, EntityPlayer player, - World world, int x, int y, int z) { + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { for (IThirdParty thirdParty : thirdPartyMods) { if (thirdParty instanceof IGuiHandler) { - Object obj = ((IGuiHandler) thirdParty) - .getServerGuiElement(ID, - player, - world, x, - y, z); + Object obj = ((IGuiHandler) thirdParty).getServerGuiElement(ID, player, world, x, y, z); if (obj != null) return obj; } @@ -174,15 +152,10 @@ public class ThirdPartyManager implements IGuiHandler { } @Override - public Object getClientGuiElement(int ID, EntityPlayer player, - World world, int x, int y, int z) { + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { for (IThirdParty thirdParty : thirdPartyMods) { if (thirdParty instanceof IGuiHandler) { - Object obj = ((IGuiHandler) thirdParty) - .getClientGuiElement(ID, - player, - world, x, - y, z); + Object obj = ((IGuiHandler) thirdParty).getClientGuiElement(ID, player, world, x, y, z); if (obj != null) return obj; } -- cgit v1.2.3