diff --git a/src/main/java/gregtech/api/util/GTUtility.java b/src/main/java/gregtech/api/util/GTUtility.java index 9b3c1082408..628e61ef3e9 100644 --- a/src/main/java/gregtech/api/util/GTUtility.java +++ b/src/main/java/gregtech/api/util/GTUtility.java @@ -448,6 +448,11 @@ public static byte getOppositeSide(ForgeDirection side) { .ordinal(); } + /** + * Gets the voltage tier corresponding to an amount of EU, capped to 15 (MAX+) + * @param l The amount of EU + * @return Corresponding voltage tier in the range 0-15 + */ public static byte getTier(long l) { if (l > V[14]) return 15; if (l <= V[0]) return 0; @@ -460,6 +465,17 @@ public static byte getTier(long l) { return (byte) ((log2L - 2) / 2); } + /** + * Gets the voltage tier corresponding to an amount of EU, capped to 127 + * @param l The amount of EU + * @return Corresponding voltage tier + */ + public static byte getTierExtended(long l) { + if (l <= V[0]) return 0; + int log2L = 64 - Long.numberOfLeadingZeros(l - 1); + return (byte) Math.min(((log2L - 2) / 2), 127); + } + public static long getAmperageForTier(long voltage, byte tier) { return ceilDiv(voltage, GTValues.V[tier]); } diff --git a/src/main/java/gregtech/api/util/MultiblockTooltipBuilder.java b/src/main/java/gregtech/api/util/MultiblockTooltipBuilder.java index 30abba0fdd5..5d468a7c0f2 100644 --- a/src/main/java/gregtech/api/util/MultiblockTooltipBuilder.java +++ b/src/main/java/gregtech/api/util/MultiblockTooltipBuilder.java @@ -567,7 +567,7 @@ public MultiblockTooltipBuilder addOtherStructurePart(String name, String info, * @return Instance this method was called on. */ public MultiblockTooltipBuilder addTecTechHatchInfo() { - iLines.add(EnumChatFormatting.BLUE + TT_tectechhatch); + iLines.add(EnumChatFormatting.GREEN + TT_tectechhatch); return this; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialElectromagneticSeparator.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialElectromagneticSeparator.java index 38ae848b060..0a95059efde 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialElectromagneticSeparator.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialElectromagneticSeparator.java @@ -97,7 +97,9 @@ public static String buildMagnetTooltip(MagnetTiers m) { if (m.supportsExotic) tooltip = tooltip + "/n " + EnumChatFormatting.BOLD + EnumChatFormatting.GREEN - + "Can Use Multiamp Hatches"; + + "Can Use Multiamp Hatches/n " + + EnumChatFormatting.RED + + "Limit to one energy hatch if using Multiamp"; return tooltip; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java index b1f45e5b552..81abe90dbc9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEBlackHoleCompressor.java @@ -376,6 +376,9 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo( EnumChatFormatting.RED + "Recipe tier is limited to hatch tier + 1. Will not perform overclocks above the hatch tier.") + .addInfo( + EnumChatFormatting.RED + + "Limit to one energy hatch if using a Multiamp or Laser hatch.") .beginStructureBlock(35, 33, 35, false) .addCasingInfoMin("Background Radiation Absorbent Casing", 950, false) .addCasingInfoExactly("Extreme Density Space-Bending Casing", 3667, false) @@ -416,6 +419,11 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a spacetimeHatches.clear(); if (!checkPiece(STRUCTURE_PIECE_MAIN, 17, 27, 10)) return false; + // Allow only 1 energy hatch if laser/multiamp + if (!mExoticEnergyHatches.isEmpty()) { + if (!mEnergyHatches.isEmpty()) return false; + if (mExoticEnergyHatches.size() > 1) return false; + } return mCasingAmount >= 950; } @@ -685,7 +693,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { } public int getMaxParallelRecipes() { - int parallels = (8 * GTUtility.getTier(this.getMaxInputVoltage())); + int parallels = (8 * GTUtility.getTierExtended(this.getMaxInputEu())); if (blackHoleStatus == 4) parallels *= 4; else if (blackHoleStability < 60) { parallels *= 2;