diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/common/Recipes.java | 70 | ||||
-rw-r--r-- | src/main/java/common/blocks/Block_LapotronicEnergyUnit.java | 8 | ||||
-rw-r--r-- | src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java | 15 | ||||
-rw-r--r-- | src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java | 62 | ||||
-rw-r--r-- | src/main/resources/assets/kekztech/lang/en_US.lang | 3 | ||||
-rw-r--r-- | src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png | bin | 275 -> 488 bytes | |||
-rw-r--r-- | src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png | bin | 259 -> 227 bytes |
7 files changed, 129 insertions, 29 deletions
diff --git a/src/main/java/common/Recipes.java b/src/main/java/common/Recipes.java index 19977d37c3..12225b8580 100644 --- a/src/main/java/common/Recipes.java +++ b/src/main/java/common/Recipes.java @@ -7,10 +7,7 @@ import common.items.ErrorItem; import common.items.MetaItem_CraftingComponent; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; @@ -924,43 +921,96 @@ public class Recipes { 6400, BW_Util.getMachineVoltageFromTier(8)); + // Extremely Ultimate Capacitor (UEV) + TT_recipeAdder.addResearchableAssemblylineRecipe( + new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 5), + 1200000, + 128, + 8000000, + 16, + new Object[] { + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 24), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.InfinityCatalyst, 32L), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.InfinityCatalyst, 32L), + new Object[] {OrePrefixes.circuit.get(Materials.Optical), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Optical), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Optical), 1}, + new Object[] {OrePrefixes.circuit.get(Materials.Optical), 1}, + ItemList.ZPM3.get(8L), + ItemList.Field_Generator_UEV.get(4), + ItemList.Circuit_Wafer_PPIC.get(64), + ItemList.Circuit_Wafer_PPIC.get(64), + ItemList.Circuit_Wafer_SoC2.get(64), + ItemList.Circuit_Parts_DiodeXSMD.get(64), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUEV, 64) + }, + new FluidStack[] { + new FluidStack(solderUEV, 9216), + Materials.Quantium.getMolten(18432), + Materials.Naquadria.getMolten(18432), + Materials.SuperCoolant.getFluid(64000) + }, + new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 8), + 250 * 20, + (int) TierEU.RECIPE_UEV); + + // UEV Capacitor alt recipe + GT_Values.RA.addAssemblerRecipe( + new ItemStack[] { + ItemList.ZPM4.get(1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 4), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 24), + GT_Utility.getIntegratedCircuit(6) + }, + null, + new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 8), + 640 * 20, + (int) TierEU.RECIPE_UHV); + // Capacitor recycling GT_Values.RA.addUnboxingRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 7), GT_ModHandler.getIC2Item("lapotronCrystal", 1L, 26), new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 6), 1200, - 32); + (int) TierEU.RECIPE_LV); GT_Values.RA.addUnboxingRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 1), ItemList.Energy_LapotronicOrb.get(1L), new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 6), 1200, - 32); + (int) TierEU.RECIPE_LV); GT_Values.RA.addUnboxingRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 2), ItemList.Energy_LapotronicOrb2.get(1L), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Osmiridium, 24), 1200, - 32); + (int) TierEU.RECIPE_LV); GT_Values.RA.addUnboxingRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 3), ItemList.Energy_Module.get(1L), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NaquadahAlloy, 24), 1200, - 32); + (int) TierEU.RECIPE_LV); GT_Values.RA.addUnboxingRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 4), ItemList.Energy_Cluster.get(1L), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 24), 1200, - 32); + (int) TierEU.RECIPE_LV); GT_Values.RA.addUnboxingRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 5), ItemList.ZPM3.get(1L), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.CosmicNeutronium, 24), 1200, - 32); + (int) TierEU.RECIPE_LV); + GT_Values.RA.addUnboxingRecipe( + new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 8), + ItemList.ZPM4.get(1L), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 24), + 1200, + (int) TierEU.RECIPE_LV); } /*private static void registerRecipes_SpaceElevator() { diff --git a/src/main/java/common/blocks/Block_LapotronicEnergyUnit.java b/src/main/java/common/blocks/Block_LapotronicEnergyUnit.java index b9c930d545..ff7e273a7b 100644 --- a/src/main/java/common/blocks/Block_LapotronicEnergyUnit.java +++ b/src/main/java/common/blocks/Block_LapotronicEnergyUnit.java @@ -64,6 +64,8 @@ public class Block_LapotronicEnergyUnit extends BaseGTUpdateableBlock { private IIcon iconLapoUVTop; private IIcon iconUltimateSide; private IIcon iconUltimateTop; + private IIcon iconUltimateExtremeSide; + private IIcon iconUltimateExtremeTop; private Block_LapotronicEnergyUnit() { super(Material.iron); @@ -100,6 +102,8 @@ public class Block_LapotronicEnergyUnit extends BaseGTUpdateableBlock { iconUltimateSide = ir.registerIcon("kekztech:UltimateEnergyUnit_side"); iconUltimateTop = ir.registerIcon("kekztech:UltimateEnergyUnit_top"); + iconUltimateExtremeSide = ir.registerIcon("kekztech:ReallyUltimateEnergyUnit_side"); + iconUltimateExtremeTop = ir.registerIcon("kekztech:ReallyUltimateEnergyUnit_top"); } @Override @@ -117,6 +121,8 @@ public class Block_LapotronicEnergyUnit extends BaseGTUpdateableBlock { par3List.add(new ItemStack(par1, 1, 4)); // Ultimate battery par3List.add(new ItemStack(par1, 1, 5)); + // UEV Cap + par3List.add(new ItemStack(par1, 1, 8)); } @Override @@ -138,6 +144,8 @@ public class Block_LapotronicEnergyUnit extends BaseGTUpdateableBlock { return (side < 2) ? iconLapoEmptyTop : iconLapoEmptySide; case 7: return (side < 2) ? iconLapoEVTop : iconLapoEVSide; + case 8: + return (side < 2) ? iconUltimateExtremeTop : iconUltimateExtremeSide; default: return iconUltimateTop; } diff --git a/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java b/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java index 370dfb0a11..8414b34006 100644 --- a/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java +++ b/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java @@ -44,12 +44,20 @@ public class IB_LapotronicEnergyUnit extends ItemBlock { private static BigInteger UHV_cap_eu_per_tick = LSC_wireless_eu_cap.divide(BigInteger.valueOf(LSC_time_between_wireless_rebalance_in_ticks)); + // 6 Quadrillion EU. + public static BigInteger UEV_wireless_eu_cap = BigInteger.valueOf(100 * 60 * pow(10, 12)); + + // 1 Trillion EU/t + private static BigInteger UEV_cap_eu_per_tick = + UEV_wireless_eu_cap.divide(BigInteger.valueOf(LSC_time_between_wireless_rebalance_in_ticks)); + public static long EV_cap_storage = 60_000_000L; public static long IV_cap_storage = 600_000_000L; public static long LuV_cap_storage = 6_000_000_000L; public static long ZPM_cap_storage = 60_000_000_000L; public static long UV_cap_storage = 600_000_000_000L; public static long UHV_cap_storage = Long.MAX_VALUE; + public static long UEV_cap_storage = Long.MAX_VALUE; @SuppressWarnings("unchecked") @Override @@ -86,6 +94,13 @@ public class IB_LapotronicEnergyUnit extends ItemBlock { lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(EV_cap_storage) + EnumChatFormatting.GRAY + " EU"); break; + case 8: + lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(UEV_cap_storage) + + EnumChatFormatting.GRAY + "EU"); + lines.add("Supports up to " + EnumChatFormatting.RED + GT_Utility.formatNumbers(UEV_cap_eu_per_tick) + + EnumChatFormatting.GRAY + "EU/t of wireless transfer per " + GT_Values.TIER_COLORS[10] + + GT_Values.VN[10] + EnumChatFormatting.GRAY + " capacitor."); + break; } } } diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index a020502bad..bd7788b768 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -5,7 +5,6 @@ import static common.itemBlocks.IB_LapotronicEnergyUnit.*; import static gregtech.api.enums.GT_HatchElement.Maintenance; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.filterByMTEClass; -import static java.lang.Math.max; import static java.lang.Math.min; import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass; @@ -70,6 +69,7 @@ public class GTMTE_LapotronicSuperCapacitor private final Queue<Long> energyOutputValues = new LinkedList<>(); private long max_passive_drain_eu_per_tick_per_uhv_cap = 1_000_000; + private long max_passive_drain_eu_per_tick_per_uev_cap = 100_000_000; private enum Capacitor { IV(2, BigInteger.valueOf(IV_cap_storage)), @@ -78,7 +78,9 @@ public class GTMTE_LapotronicSuperCapacitor UV(5, BigInteger.valueOf(UV_cap_storage)), UHV(6, MAX_LONG), None(0, BigInteger.ZERO), - EV(1, BigInteger.valueOf(EV_cap_storage)); + EV(1, BigInteger.valueOf(EV_cap_storage)), + UEV(7, MAX_LONG), + ; private final int minimalGlassTier; private final BigInteger providedCapacity; @@ -300,7 +302,7 @@ public class GTMTE_LapotronicSuperCapacitor * Count the amount of capacitors of each tier in each slot. * Index = meta - 1 */ - private final int[] capacitors = new int[7]; + private final int[] capacitors = new int[8]; private BigInteger capacity = BigInteger.ZERO; private BigInteger stored = BigInteger.ZERO; @@ -396,15 +398,22 @@ public class GTMTE_LapotronicSuperCapacitor return capacitors[4]; } + private int getUEVCapacitorCount() { + return capacitors[7]; + } + @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Energy Storage") - .addInfo("Loses energy equal to 1% of the total capacity every 24 hours. Capped") - .addInfo("at " + EnumChatFormatting.RED + .addInfo("Loses energy equal to 1% of the total capacity every 24 hours.") + .addInfo("Capped at " + EnumChatFormatting.RED + GT_Utility.formatNumbers(max_passive_drain_eu_per_tick_per_uhv_cap) + EnumChatFormatting.GRAY - + "EU/t passive loss per " + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] - + EnumChatFormatting.GRAY + " capacitor.") + + " EU/t passive loss per " + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + + EnumChatFormatting.GRAY + " capacitor and ") + .addInfo(EnumChatFormatting.RED + GT_Utility.formatNumbers(max_passive_drain_eu_per_tick_per_uev_cap) + + EnumChatFormatting.GRAY + " EU/t passive loss per " + GT_Values.TIER_COLORS[10] + + GT_Values.VN[10] + EnumChatFormatting.GRAY + " capacitor.") .addInfo("Passive loss is multiplied by the number of maintenance issues present.") .addSeparator() .addInfo("Glass shell has to be Tier - 3 of the highest capacitor tier.") @@ -415,12 +424,18 @@ public class GTMTE_LapotronicSuperCapacitor .addSeparator() .addInfo("Wireless mode can be enabled by right clicking with a screwdriver.") .addInfo("This mode can only be enabled if you have a " + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + + EnumChatFormatting.GRAY + " or " + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + EnumChatFormatting.GRAY + " capacitor in the multiblock.") .addInfo("When enabled every " + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(LSC_time_between_wireless_rebalance_in_ticks) + EnumChatFormatting.GRAY + " ticks the LSC will attempt to re-balance against your") - .addInfo("wireless EU network. If there is less than " + EnumChatFormatting.RED - + GT_Utility.formatNumbers(LSC_wireless_eu_cap) + EnumChatFormatting.GRAY + "EU in the LSC") + .addInfo("wireless EU network.") + .addInfo("If there is less than " + EnumChatFormatting.RED + + GT_Utility.formatNumbers(LSC_wireless_eu_cap) + EnumChatFormatting.GRAY + "(" + + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + EnumChatFormatting.GRAY + ")" + " or " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(UEV_wireless_eu_cap) + + EnumChatFormatting.GRAY + "(" + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + + EnumChatFormatting.GRAY + ")" + " EU in the LSC") .addInfo("it will withdraw from the network and add to the LSC. If there is more it will add") .addInfo("the EU to the network and remove it from the LSC.") .addSeparator() @@ -432,6 +447,7 @@ public class GTMTE_LapotronicSuperCapacitor "Lapotronic Capacitor (" + GT_Values.TIER_COLORS[4] + GT_Values.VN[4] + EnumChatFormatting.GRAY + "-" + GT_Values.TIER_COLORS[8] + GT_Values.VN[8] + EnumChatFormatting.GRAY + "), Ultimate Capacitor (" + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + + EnumChatFormatting.GRAY + "-" + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + EnumChatFormatting.GRAY + ")", "Center 3x(1-47)x3 above base (9-423 blocks)") .addStructureInfo( @@ -551,13 +567,14 @@ public class GTMTE_LapotronicSuperCapacitor } // Check if enough (more than 50%) non-empty caps - if (capacitors[5] + if (capacitors[6] > capacitors[0] + capacitors[1] + capacitors[2] + capacitors[3] + getUHVCapacitorCount() - + capacitors[6]) return false; + + capacitors[6] + + getUEVCapacitorCount()) return false; // Calculate total capacity capacity = BigInteger.ZERO; @@ -684,7 +701,7 @@ public class GTMTE_LapotronicSuperCapacitor } } - if (getUHVCapacitorCount() <= 0) { + if (getUHVCapacitorCount() <= 0 && getUEVCapacitorCount() <= 0) { wireless_mode = false; } @@ -697,7 +714,8 @@ public class GTMTE_LapotronicSuperCapacitor // Find difference. BigInteger transferred_eu = - stored.subtract(LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount()))); + stored.subtract((LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount()))) + .add(UEV_wireless_eu_cap.multiply(BigInteger.valueOf(getUEVCapacitorCount())))); if (transferred_eu.signum() == 1) { inputLastTick += transferred_eu.longValue(); @@ -708,7 +726,8 @@ public class GTMTE_LapotronicSuperCapacitor // If that difference can be added then do so. if (addEUToGlobalEnergyMap(global_energy_user_uuid, transferred_eu)) { // If it succeeds there was sufficient energy so set the internal capacity as such. - stored = LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount())); + stored = LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount())) + .add(UEV_wireless_eu_cap.multiply(BigInteger.valueOf(getUEVCapacitorCount()))); } } @@ -758,13 +777,15 @@ public class GTMTE_LapotronicSuperCapacitor long temp_capacity_divided = capacity.divide(BigInteger.valueOf(100L * 86400L * 20L)).longValue(); - // Passive loss is multiplied by number of UHV caps. Minimum of 1 otherwise loss is 0 for non-UHV caps + // Passive loss is multiplied by number of UHV/UEV caps. Minimum of 1 otherwise loss is 0 for non-UHV/UEV caps // calculations. - long uhv_cap_multiplier = - min(temp_capacity_divided, max_passive_drain_eu_per_tick_per_uhv_cap * max(1, getUHVCapacitorCount())); + if (getUHVCapacitorCount() != 0 || getUEVCapacitorCount() != 0) { + temp_capacity_divided = getUHVCapacitorCount() * max_passive_drain_eu_per_tick_per_uhv_cap + + getUEVCapacitorCount() * max_passive_drain_eu_per_tick_per_uev_cap; + } // Passive loss is multiplied by number of maintenance issues. - long total_passive_loss = uhv_cap_multiplier * (getIdealStatus() - repairStatus + 1); + long total_passive_loss = temp_capacity_divided * (getIdealStatus() - repairStatus + 1); // Maximum of 100,000 EU/t drained per UHV cell. The logic is 1% of EU capacity should be drained every 86400 // seconds (1 day). @@ -834,6 +855,8 @@ public class GTMTE_LapotronicSuperCapacitor : EnumChatFormatting.RED + "disabled" + EnumChatFormatting.RESET)); ll.add(GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + EnumChatFormatting.RESET + " Capacitors detected: " + getUHVCapacitorCount()); + ll.add(GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + EnumChatFormatting.RESET + " Capacitors detected: " + + getUEVCapacitorCount()); ll.add("Total wireless EU: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(getUserEU(global_energy_user_uuid))); ll.add("---------------------------------------------"); @@ -936,13 +959,14 @@ public class GTMTE_LapotronicSuperCapacitor @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (getUHVCapacitorCount() != 0) { + if (getUHVCapacitorCount() != 0 || getUEVCapacitorCount() != 0) { wireless_mode = !wireless_mode; GT_Utility.sendChatToPlayer(aPlayer, "Wireless network mode " + (wireless_mode ? "enabled." : "disabled.")); } else { GT_Utility.sendChatToPlayer( aPlayer, "Wireless mode cannot be enabled without at least 1 " + GT_Values.TIER_COLORS[9] + GT_Values.VN[9] + + EnumChatFormatting.RESET + " or " + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + EnumChatFormatting.RESET + " capacitor."); wireless_mode = false; } diff --git a/src/main/resources/assets/kekztech/lang/en_US.lang b/src/main/resources/assets/kekztech/lang/en_US.lang index 0e0245ae8e..bd7639fb73 100644 --- a/src/main/resources/assets/kekztech/lang/en_US.lang +++ b/src/main/resources/assets/kekztech/lang/en_US.lang @@ -143,6 +143,7 @@ tile.kekztech_lapotronicenergyunit_block.4.name=Lapotronic Capacitor (UV) tile.kekztech_lapotronicenergyunit_block.5.name=Ultimate Capacitor (UHV) tile.kekztech_lapotronicenergyunit_block.6.name=Empty Capacitor (-) tile.kekztech_lapotronicenergyunit_block.7.name=Lapotron Capacitor (EV) +tile.kekztech_lapotronicenergyunit_block.8.name=Extremely Ultimate Capacitor (UEV) tile.kekztech_lapotronicenergyunit_block.desc=Part of the Lapotronic Super Capacitor # -------- Thaumium Reinforced Jar: Block @@ -190,3 +191,5 @@ achievement.tile.kekztech_lapotronicenergyunit_block.4.desc=Pickup this item to achievement.tile.kekztech_lapotronicenergyunit_block.4=Lapotronic Capacitor (UV) achievement.tile.kekztech_lapotronicenergyunit_block.5.desc=Pickup this item to see the recipe in NEI achievement.tile.kekztech_lapotronicenergyunit_block.5=Ultimate Capacitor (UHV) +achievement.tile.kekztech_lapotronicenergyunit_block.8.desc=Beyond the ranks of Gods +achievement.tile.kekztech_lapotronicenergyunit_block.8=Ultimate Capacitor (UEV) diff --git a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png Binary files differindex 15a89994a1..ae861e1d8a 100644 --- a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png +++ b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png diff --git a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png Binary files differindex ff2f1e826d..61ecab2e40 100644 --- a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png +++ b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png |