diff options
Diffstat (limited to 'src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java')
-rw-r--r-- | src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java | 224 |
1 files changed, 112 insertions, 112 deletions
diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java index e970084691..76c5de859c 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -67,107 +67,107 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 0L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { OrePrefixes.circuit.get(Materials.Basic) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 0L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { OrePrefixes.circuit.get(Materials.Basic) }); long bits = GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE; GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 1L), - bits, - new Object[] { "d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 1L), + bits, + new Object[] { "d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 2L), - bits, - new Object[] { " d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 2L), + bits, + new Object[] { " d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 3L), - bits, - new Object[] { " d", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 3L), + bits, + new Object[] { " d", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 4L), - bits, - new Object[] { aTextEmptyRow, " Pd", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 4L), + bits, + new Object[] { aTextEmptyRow, " Pd", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 5L), - bits, - new Object[] { aTextEmptyRow, " P ", " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 5L), + bits, + new Object[] { aTextEmptyRow, " P ", " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 6L), - bits, - new Object[] { aTextEmptyRow, " P ", " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 6L), + bits, + new Object[] { aTextEmptyRow, " P ", " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 7L), - bits, - new Object[] { aTextEmptyRow, " P ", "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 7L), + bits, + new Object[] { aTextEmptyRow, " P ", "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 8L), - bits, - new Object[] { aTextEmptyRow, "dP ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 8L), + bits, + new Object[] { aTextEmptyRow, "dP ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 9L), - bits, - new Object[] { "P d", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 9L), + bits, + new Object[] { "P d", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 10L), - bits, - new Object[] { "P ", " d", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 10L), + bits, + new Object[] { "P ", " d", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 11L), - bits, - new Object[] { "P ", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 11L), + bits, + new Object[] { "P ", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 12L), - bits, - new Object[] { "P ", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 12L), + bits, + new Object[] { "P ", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 13L), - bits, - new Object[] { " P", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 13L), + bits, + new Object[] { " P", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 14L), - bits, - new Object[] { " P", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 14L), + bits, + new Object[] { " P", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 15L), - bits, - new Object[] { " P", aTextEmptyRow, "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 15L), + bits, + new Object[] { " P", aTextEmptyRow, "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 16L), - bits, - new Object[] { " P", "d ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 16L), + bits, + new Object[] { " P", "d ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 17L), - bits, - new Object[] { aTextEmptyRow, aTextEmptyRow, "d P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 17L), + bits, + new Object[] { aTextEmptyRow, aTextEmptyRow, "d P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 18L), - bits, - new Object[] { aTextEmptyRow, "d ", " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 18L), + bits, + new Object[] { aTextEmptyRow, "d ", " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 19L), - bits, - new Object[] { "d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 19L), + bits, + new Object[] { "d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 20L), - bits, - new Object[] { " d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 20L), + bits, + new Object[] { " d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 21L), - bits, - new Object[] { "d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 21L), + bits, + new Object[] { "d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 22L), - bits, - new Object[] { " d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 22L), + bits, + new Object[] { " d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 23L), - bits, - new Object[] { " d", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 23L), + bits, + new Object[] { " d", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 24L), - bits, - new Object[] { aTextEmptyRow, " d", "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 24L), + bits, + new Object[] { aTextEmptyRow, " d", "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); } private static String getModeString(int aMetaData) { @@ -189,23 +189,23 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo public void addAdditionalToolTips(List<String> aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); aList.add( - GT_LanguageManager.addStringLocalization( - new StringBuilder().append(getUnlocalizedName()) - .append(".configuration") - .toString(), - "Configuration: ") + getConfigurationString(getDamage(aStack))); + GT_LanguageManager.addStringLocalization( + new StringBuilder().append(getUnlocalizedName()) + .append(".configuration") + .toString(), + "Configuration: ") + getConfigurationString(getDamage(aStack))); aList.add( - GT_LanguageManager.addStringLocalization( - new StringBuilder().append(getUnlocalizedName()) - .append(".tooltip.0") - .toString(), - "Right click to reconfigure")); + GT_LanguageManager.addStringLocalization( + new StringBuilder().append(getUnlocalizedName()) + .append(".tooltip.0") + .toString(), + "Right click to reconfigure")); aList.add( - GT_LanguageManager.addStringLocalization( - new StringBuilder().append(getUnlocalizedName()) - .append(".tooltip.1") - .toString(), - "Needs a screwdriver or circuit programming tool")); + GT_LanguageManager.addStringLocalization( + new StringBuilder().append(getUnlocalizedName()) + .append(".tooltip.1") + .toString(), + "Needs a screwdriver or circuit programming tool")); } @Override @@ -224,8 +224,8 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo public void registerIcons(IIconRegister aIconRegister) { super.registerIcons(aIconRegister); for (int i = 0; i < mIconDamage.length; i++) { - mIconDamage[i] = aIconRegister.registerIcon( - GregTech.getResourcePath(GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); + mIconDamage[i] = aIconRegister + .registerIcon(GregTech.getResourcePath(GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); } if (GregTech_API.sPostloadFinished) { GT_Log.out.println("GT_Mod: Starting Item Icon Load Phase"); @@ -260,7 +260,7 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo ItemStack[] mainInventory = player.inventory.mainInventory; mainInventory[toolIndex.getKey()] = toolIndex.getValue() - .apply(mainInventory[toolIndex.getKey()], player); + .apply(mainInventory[toolIndex.getKey()], player); } stack.setItemDamage(meta); @@ -280,18 +280,18 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo if (configurator == null) { int count; try { - count = Integer.parseInt( - StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); + count = Integer + .parseInt(StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); } catch (NumberFormatException e) { player.addChatComponentMessage( - new ChatComponentText( - "Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " - + e.getMessage())); + new ChatComponentText( + "Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " + + e.getMessage())); count = 1; } player.addChatComponentMessage( - new ChatComponentTranslation( - "GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); + new ChatComponentTranslation( + "GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); return stack; } configuratorStack = player.inventory.mainInventory[configurator.getKey()]; @@ -302,14 +302,14 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo private void openSelectorGui(ItemStack configurator, int meta, EntityPlayer player) { UIInfos.openClientUI( - player, - buildContext -> new SelectItemUIFactory( - StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), - configurator, - GT_IntegratedCircuit_Item::onConfigured, - ALL_VARIANTS, - meta, - true).createWindow(buildContext)); + player, + buildContext -> new SelectItemUIFactory( + StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), + configurator, + GT_IntegratedCircuit_Item::onConfigured, + ALL_VARIANTS, + meta, + true).createWindow(buildContext)); } private static void onConfigured(ItemStack stack) { @@ -319,17 +319,17 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } private static Pair<Integer, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> findConfiguratorInInv( - EntityPlayer player) { + EntityPlayer player) { ItemStack[] mainInventory = player.inventory.mainInventory; for (int j = 0, mainInventoryLength = mainInventory.length; j < mainInventoryLength; j++) { ItemStack toolStack = mainInventory[j]; if (!GT_Utility.isStackValid(toolStack)) continue; - for (Map.Entry<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> p : GregTech_API.sCircuitProgrammerList.entrySet()) + for (Map.Entry<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> p : GregTech_API.sCircuitProgrammerList + .entrySet()) if (p.getKey() - .test(toolStack)) - return Pair.of(j, p.getValue()); + .test(toolStack)) return Pair.of(j, p.getValue()); } return null; } |