diff options
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/multi')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java | 16 | ||||
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java | 53 |
2 files changed, 47 insertions, 22 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java index 9dcb7d0ca7..10a334fb2b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java @@ -20,6 +20,8 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_AUTOCLA import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import static gregtech.api.util.GTStructureUtility.ofCoil; import static gregtech.api.util.GTStructureUtility.ofFrame; +import static net.minecraft.util.EnumChatFormatting.BLUE; +import static net.minecraft.util.EnumChatFormatting.GOLD; import java.text.DecimalFormat; import java.util.List; @@ -193,16 +195,20 @@ public class MTEMultiAutoclave extends MTEExtendedPowerMultiBlockBase<MTEMultiAu return STRUCTURE_DEFINITION; } + private static final String TOOLTIP_BAR = GOLD + + "---------------------------------------------------------------------------------------"; + @Override protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType("Autoclave") + .addInfo(TOOLTIP_BAR) .addInfo("Controller Block for the Industrial Autoclave.") - .addInfo("Gains 12 parallels per item pipe casing tier.") - .addInfo("Each pipe casing (bronze, steel, titanium, tungstensteel)") - .addInfo("decreases the EU usageby 1/pipe tier.") - .addInfo("Heating Coils increase speed by 1/((tier + 1) / 2).") - .addInfo("Needs a minimum of 128 Pressure Containment Casings.") + .addInfo(TOOLTIP_BAR) + .addInfo("Processes 12 items per Item Pipe Casing Tier.") + .addInfo("Energy consumption is reduced with higher fluid pipe tiers.") + .addInfo(BLUE + "Energy consumption = Recipe Consumption * (12 - Pipe Casing Tier) / 12.") + .addInfo("Each coil level makes the machine 25% faster than singleblock machines of the same voltage.") .addInfo(AuthorVolence) .addSeparator() .beginStructureBlock(7, 7, 9, true) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java index 5beda2d038..67ef907e62 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java @@ -15,6 +15,9 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_LATHE_A import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_LATHE_ACTIVE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_LATHE_GLOW; import static gregtech.api.util.GTStructureUtility.buildHatchAdder; +import static net.minecraft.util.EnumChatFormatting.BLUE; +import static net.minecraft.util.EnumChatFormatting.DARK_AQUA; +import static net.minecraft.util.EnumChatFormatting.GOLD; import java.text.DecimalFormat; import java.util.List; @@ -48,7 +51,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.GregTechTileClientEvents; -import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase; import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; @@ -59,7 +62,7 @@ import gregtech.common.blocks.BlockCasings2; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; -public class MTEMultiLathe extends MTEEnhancedMultiBlockBase<MTEMultiLathe> implements ISurvivalConstructable { +public class MTEMultiLathe extends MTEExtendedPowerMultiBlockBase<MTEMultiLathe> implements ISurvivalConstructable { public MTEMultiLathe(final int aID, final String aName, final String aNameRegional) { super(aID, aName, aNameRegional); @@ -81,10 +84,10 @@ public class MTEMultiLathe extends MTEEnhancedMultiBlockBase<MTEMultiLathe> impl Brass(1, 0.8F), Electrum(2, 0.9F), Platinum(4, 1F), - Osmium(8, 1.25F), - Quantium(12, 1.5F), - FluxedElectrum(16, 2F), - BlackPlutonium(32, 2.5F); + Osmium(8, 1.5F), + Quantium(12, 2F), + FluxedElectrum(16, 3F), + BlackPlutonium(32, 4F); final int maxParallel; final float speedBoost; @@ -227,20 +230,31 @@ public class MTEMultiLathe extends MTEEnhancedMultiBlockBase<MTEMultiLathe> impl return rTexture; } + private static final String TOOLTIP_BAR = GOLD + + "---------------------------------------------------------------------------------------"; + @Override protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType("Lathe") - .addInfo("Controller Block for the Industrial Precision Lathe") - .addInfo("Gains 2 parallels per voltage tier,") - .addInfo("and 4 parallels per pipe casing tier starting at Platinum, 16 for Black Plutonium") - .addInfo("Better item pipe casings increase speed") - .addInfo("Only uses 80% of the recipe's required energy") + .addInfo(TOOLTIP_BAR) + .addInfo("Controller Block for the Industrial Precision Lathe.") + .addInfo(TOOLTIP_BAR) + .addInfo(BLUE + "Allows more parallel recipes based on item pipe casing parallel and voltage.") + .addInfo("Max Parallel Recipes = Item Pipe Casing Parallel + (Voltage Tier * 2).") + .addInfo(BLUE + "Increases processing speed based on item pipe casing speed and voltage.") + .addInfo("Time Reduction = 1 / (Item Pipe Casing Speed Boost + Voltage Tier / 4).") + .addInfo("Speed Increase = (100 / Time Reduction).") + .addInfo( + DARK_AQUA + + "For example, using Black Plutonium item pipe casings (boost of 4) and Tier 3 voltage (HV) ") + .addInfo(DARK_AQUA + "reduces processing time to 57% of the recipe time, making the machine 175% faster.") + .addInfo(BLUE + "Only uses 80% of the EU/T normally required.") .addInfo(AuthorVolence) .addSeparator() .beginStructureBlock(7, 5, 5, true) .addController("Front Center") - .addCasingInfoMin("Solid Steel Machine Casing", 36, false) + .addCasingInfoMin("Solid Steel Machine Casing", 42, false) .addCasingInfoExactly("Steel Pipe Casing", 8, false) .addInputBus("Any of the 9 Solid Steel Casing at Each End", 1) .addOutputBus("Any of the 9 Solid Steel Casing at Each End", 1) @@ -285,19 +299,25 @@ public class MTEMultiLathe extends MTEEnhancedMultiBlockBase<MTEMultiLathe> impl public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { pipeTier = -2; mEnergyHatches.clear(); + mCasingAmount = 0; if (!checkPiece(STRUCTURE_PIECE_MAIN, 3, 4, 0)) return false; getBaseMetaTileEntity().sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, getUpdateData()); if (!checkPiece(STRUCTURE_PIECE_BODY, 3, 4, -1) && !checkPiece(STRUCTURE_PIECE_BODY_ALT, 3, 4, -1)) return false; return this.mMaintenanceHatches.size() == 1 && pipeTier > 0 && mEnergyHatches.size() >= 1 + && mCasingAmount >= 42 && mMufflerHatches.size() == 1; } + public float speedBoost(float speedBoost, byte voltageTier) { + return 1F / ((speedBoost + voltageTier) / 4F); + } + @Override protected ProcessingLogic createProcessingLogic() { return new ProcessingLogic() - .setSpeedBonus(1F / (getPipeData().speedBoost + GTUtility.getTier(this.getMaxInputVoltage()) / 4F)) + .setSpeedBonus(speedBoost(getPipeData().speedBoost, GTUtility.getTier(this.getMaxInputVoltage()))) .setEuModifier(0.8F) .setMaxParallelSupplier(this::getMaxParallelRecipes); } @@ -311,10 +331,9 @@ public class MTEMultiLathe extends MTEEnhancedMultiBlockBase<MTEMultiLathe> impl int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setInteger("itemPipeTier", Math.max(0, pipeTier)); - tag.setFloat( - "speedBonus", - Math.max(0, 100 / (1F / (getPipeData().speedBoost + GTUtility.getTier(this.getMaxInputVoltage()) / 4F)))); + tag.setFloat("speedBonus", getPipeData().speedBoost); tag.setFloat("getMaxParallelRecipes", Math.max(0, getMaxParallelRecipes())); + tag.setByte("voltageTier", GTUtility.getTier(this.getMaxInputVoltage())); } private static final DecimalFormat dfNone = new DecimalFormat("#"); @@ -335,7 +354,7 @@ public class MTEMultiLathe extends MTEEnhancedMultiBlockBase<MTEMultiLathe> impl currenttip.add( StatCollector.translateToLocal("GT5U.multiblock.speed") + ": " + EnumChatFormatting.WHITE - + dfNone.format(Math.max(0, tag.getFloat("speedBonus"))) + + dfNone.format(Math.max(0, 100 / speedBoost(tag.getFloat("speedBonus"), tag.getByte("voltageTier")))) + "%"); } |