From 21f9564208926fe1de552e16c4df43be450b61e5 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 2 Feb 2023 21:07:10 +0100 Subject: Add Block & textures --- .../java/common/blocks/Block_LapotronicEnergyUnit.java | 8 ++++++++ .../textures/blocks/ReallyUltimateEnergyUnit_side.png | Bin 275 -> 200 bytes .../textures/blocks/ReallyUltimateEnergyUnit_top.png | Bin 259 -> 190 bytes 3 files changed, 8 insertions(+) (limited to 'src') 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/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png index 15a89994a1..d2e362dba9 100644 Binary files a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png and b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png index ff2f1e826d..def607dde8 100644 Binary files a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png and b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png differ -- cgit From de6b528905ec1c2a6294505073c350f20ce05924 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 2 Feb 2023 21:11:15 +0100 Subject: Localization --- src/main/resources/assets/kekztech/lang/en_US.lang | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main/resources/assets/kekztech/lang/en_US.lang b/src/main/resources/assets/kekztech/lang/en_US.lang index 0e0245ae8e..54ed1f6870 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=Ultimate Extreme 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) -- cgit From 322e11461b2a5cdd381fcb643c8f1178d8f63c2a Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 2 Feb 2023 21:19:35 +0100 Subject: Insert UEV Cap stuff --- .../java/common/itemBlocks/IB_LapotronicEnergyUnit.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java b/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java index 370dfb0a11..fecfce2bc9 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; } } } -- cgit From 79b1212b00cb16aeaf14a548aced73b3337bed3d Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 2 Feb 2023 21:26:10 +0100 Subject: First attempt --- .../GTMTE_LapotronicSuperCapacitor.java | 46 ++++++++++++++-------- 1 file changed, 29 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index a020502bad..cf261dec3d 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -70,6 +70,7 @@ public class GTMTE_LapotronicSuperCapacitor private final Queue 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)), @@ -77,6 +78,7 @@ public class GTMTE_LapotronicSuperCapacitor ZPM(4, BigInteger.valueOf(ZPM_cap_storage)), UV(5, BigInteger.valueOf(UV_cap_storage)), UHV(6, MAX_LONG), + UEV(7, MAX_LONG), None(0, BigInteger.ZERO), EV(1, BigInteger.valueOf(EV_cap_storage)); @@ -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; @@ -395,16 +397,21 @@ public class GTMTE_LapotronicSuperCapacitor private int getUHVCapacitorCount() { 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 +422,12 @@ 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 + " capacitor in the multiblock.") + + 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. If there is less than " + GT_Values.TIER_COLORS[9] + + GT_Utility.formatNumbers(LSC_wireless_eu_cap) + EnumChatFormatting.GRAY + "(" + GT_Values.TIER_COLORS[10] + GT_Values.VN[9] + EnumChatFormatting.GRAY + ")" + " or " + GT_Values.TIER_COLORS[10] + 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() @@ -551,13 +558,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 +692,7 @@ public class GTMTE_LapotronicSuperCapacitor } } - if (getUHVCapacitorCount() <= 0) { + if (getUHVCapacitorCount() <= 0 && getUEVCapacitorCount() <= 0) { wireless_mode = false; } @@ -697,7 +705,7 @@ 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 +716,7 @@ 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 +766,16 @@ 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())); + long uev_cap_multiplier = + min(temp_capacity_divided, max_passive_drain_eu_per_tick_per_uev_cap * max(1, getUEVCapacitorCount())); + // Passive loss is multiplied by number of maintenance issues. - long total_passive_loss = uhv_cap_multiplier * (getIdealStatus() - repairStatus + 1); + long total_passive_loss = (uhv_cap_multiplier + uev_cap_multiplier) * (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). @@ -936,14 +947,15 @@ 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 + " capacitor."); + + EnumChatFormatting.RESET + " or " + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + + EnumChatFormatting.RESET + " capacitor."); wireless_mode = false; } } -- cgit From 0e683242448990f70d46b0742293a9e79996811b Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 2 Feb 2023 21:27:13 +0100 Subject: Spotless --- .../common/itemBlocks/IB_LapotronicEnergyUnit.java | 8 +++---- .../GTMTE_LapotronicSuperCapacitor.java | 25 +++++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java b/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java index fecfce2bc9..8414b34006 100644 --- a/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java +++ b/src/main/java/common/itemBlocks/IB_LapotronicEnergyUnit.java @@ -49,7 +49,7 @@ public class IB_LapotronicEnergyUnit extends ItemBlock { // 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)); + 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; @@ -96,10 +96,10 @@ public class IB_LapotronicEnergyUnit extends ItemBlock { break; case 8: lines.add("Capacity: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(UEV_cap_storage) - + EnumChatFormatting.GRAY + "EU"); + + 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."); + + 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 cf261dec3d..9cb106be49 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -397,6 +397,7 @@ public class GTMTE_LapotronicSuperCapacitor private int getUHVCapacitorCount() { return capacitors[4]; } + private int getUEVCapacitorCount() { return capacitors[7]; } @@ -410,8 +411,9 @@ public class GTMTE_LapotronicSuperCapacitor + 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 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(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.") @@ -422,12 +424,17 @@ 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.") + + 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 " + GT_Values.TIER_COLORS[9] - + GT_Utility.formatNumbers(LSC_wireless_eu_cap) + EnumChatFormatting.GRAY + "(" + GT_Values.TIER_COLORS[10] + GT_Values.VN[9] + EnumChatFormatting.GRAY + ")" + " or " + GT_Values.TIER_COLORS[10] + GT_Utility.formatNumbers(UEV_wireless_eu_cap) + EnumChatFormatting.GRAY + "(" + GT_Values.TIER_COLORS[10] + GT_Values.VN[10] + EnumChatFormatting.GRAY + ")" + "EU in the LSC") + + GT_Utility.formatNumbers(LSC_wireless_eu_cap) + EnumChatFormatting.GRAY + "(" + + GT_Values.TIER_COLORS[10] + GT_Values.VN[9] + EnumChatFormatting.GRAY + ")" + " or " + + GT_Values.TIER_COLORS[10] + 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() @@ -705,7 +712,8 @@ public class GTMTE_LapotronicSuperCapacitor // Find difference. BigInteger transferred_eu = - stored.subtract((LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount()))).add(UEV_wireless_eu_cap.multiply(BigInteger.valueOf(getUEVCapacitorCount())))); + 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(); @@ -716,7 +724,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())).add(UEV_wireless_eu_cap.multiply(BigInteger.valueOf(getUEVCapacitorCount()))); + stored = LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount())) + .add(UEV_wireless_eu_cap.multiply(BigInteger.valueOf(getUEVCapacitorCount()))); } } @@ -772,7 +781,7 @@ public class GTMTE_LapotronicSuperCapacitor min(temp_capacity_divided, max_passive_drain_eu_per_tick_per_uhv_cap * max(1, getUHVCapacitorCount())); long uev_cap_multiplier = - min(temp_capacity_divided, max_passive_drain_eu_per_tick_per_uev_cap * max(1, getUEVCapacitorCount())); + min(temp_capacity_divided, max_passive_drain_eu_per_tick_per_uev_cap * max(1, getUEVCapacitorCount())); // Passive loss is multiplied by number of maintenance issues. long total_passive_loss = (uhv_cap_multiplier + uev_cap_multiplier) * (getIdealStatus() - repairStatus + 1); @@ -955,7 +964,7 @@ public class GTMTE_LapotronicSuperCapacitor 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."); + + EnumChatFormatting.RESET + " capacitor."); wireless_mode = false; } } -- cgit From 20ef1212161d01560ed9e8ab41fba1dd59a3d6d8 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 2 Feb 2023 21:40:38 +0100 Subject: Tooltips --- .../common/tileentities/GTMTE_LapotronicSuperCapacitor.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index 9cb106be49..ef4aab8db4 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -429,12 +429,12 @@ public class GTMTE_LapotronicSuperCapacitor .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 " + GT_Values.TIER_COLORS[9] + .addInfo("wireless EU network. If there is less than " + EnumChatFormatting.RED + GT_Utility.formatNumbers(LSC_wireless_eu_cap) + EnumChatFormatting.GRAY + "(" - + GT_Values.TIER_COLORS[10] + GT_Values.VN[9] + EnumChatFormatting.GRAY + ")" + " or " - + GT_Values.TIER_COLORS[10] + GT_Utility.formatNumbers(UEV_wireless_eu_cap) + + 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") + + 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() @@ -446,6 +446,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[9] + GT_Values.VN[9] + EnumChatFormatting.GRAY + ")", "Center 3x(1-47)x3 above base (9-423 blocks)") .addStructureInfo( @@ -854,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("---------------------------------------------"); -- cgit From b9f8b3ae072c2b50b38abbc12a0b3417124db005 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 3 Feb 2023 00:07:51 +0100 Subject: new texture --- .../textures/blocks/ReallyUltimateEnergyUnit_side.png | Bin 200 -> 488 bytes .../textures/blocks/ReallyUltimateEnergyUnit_top.png | Bin 190 -> 227 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'src') diff --git a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png index d2e362dba9..ae861e1d8a 100644 Binary files a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png and b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_side.png differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png index def607dde8..61ecab2e40 100644 Binary files a/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png and b/src/main/resources/assets/kekztech/textures/blocks/ReallyUltimateEnergyUnit_top.png differ -- cgit From d5f9b910087e76530e787bebbe3ffcebc0cc8417 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 3 Feb 2023 00:08:02 +0100 Subject: fixes --- .../GTMTE_LapotronicSuperCapacitor.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index ef4aab8db4..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; @@ -78,9 +77,10 @@ public class GTMTE_LapotronicSuperCapacitor ZPM(4, BigInteger.valueOf(ZPM_cap_storage)), UV(5, BigInteger.valueOf(UV_cap_storage)), UHV(6, MAX_LONG), - UEV(7, 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; @@ -429,7 +429,8 @@ public class GTMTE_LapotronicSuperCapacitor .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 + .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) @@ -446,7 +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[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( @@ -778,14 +779,13 @@ public class GTMTE_LapotronicSuperCapacitor // 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())); - - long uev_cap_multiplier = - min(temp_capacity_divided, max_passive_drain_eu_per_tick_per_uev_cap * max(1, getUEVCapacitorCount())); + 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 + uev_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). -- cgit From e6476eeac14391e6f9b1bdeb2e9cbf5236784434 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 3 Feb 2023 23:00:14 +0100 Subject: recipes --- src/main/java/common/Recipes.java | 53 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'src') diff --git a/src/main/java/common/Recipes.java b/src/main/java/common/Recipes.java index 19977d37c3..8e396b74a1 100644 --- a/src/main/java/common/Recipes.java +++ b/src/main/java/common/Recipes.java @@ -924,6 +924,53 @@ 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, + 6_400_000); + + // 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, + BW_Util.getMachineVoltageFromTier(9)); + // Capacitor recycling GT_Values.RA.addUnboxingRecipe( new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 7), @@ -961,6 +1008,12 @@ public class Recipes { GT_OreDictUnificator.get(OrePrefixes.screw, Materials.CosmicNeutronium, 24), 1200, 32); + GT_Values.RA.addUnboxingRecipe( + new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 8), + ItemList.ZPM4.get(1L), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 24), + 1200, + 32); } /*private static void registerRecipes_SpaceElevator() { -- cgit From eab1afe11ddd894fef8ba618deda9926e09edab7 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 5 Feb 2023 00:11:56 +0100 Subject: name fix --- src/main/resources/assets/kekztech/lang/en_US.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/resources/assets/kekztech/lang/en_US.lang b/src/main/resources/assets/kekztech/lang/en_US.lang index 54ed1f6870..bd7639fb73 100644 --- a/src/main/resources/assets/kekztech/lang/en_US.lang +++ b/src/main/resources/assets/kekztech/lang/en_US.lang @@ -143,7 +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=Ultimate Extreme Capacitor (UEV) +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 -- cgit From d4c5e0f96170c29d537bbb1456334371851b40c3 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 5 Feb 2023 22:39:38 +0100 Subject: TierEU --- src/main/java/common/Recipes.java | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/main/java/common/Recipes.java b/src/main/java/common/Recipes.java index 8e396b74a1..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; @@ -956,7 +953,7 @@ public class Recipes { }, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 8), 250 * 20, - 6_400_000); + (int) TierEU.RECIPE_UEV); // UEV Capacitor alt recipe GT_Values.RA.addAssemblerRecipe( @@ -969,7 +966,7 @@ public class Recipes { null, new ItemStack(Blocks.lscLapotronicEnergyUnit, 1, 8), 640 * 20, - BW_Util.getMachineVoltageFromTier(9)); + (int) TierEU.RECIPE_UHV); // Capacitor recycling GT_Values.RA.addUnboxingRecipe( @@ -977,43 +974,43 @@ public class Recipes { 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, - 32); + (int) TierEU.RECIPE_LV); } /*private static void registerRecipes_SpaceElevator() { -- cgit