Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gregtech.api.metatileentity.multiblock;

import gregtech.api.GTValues;
import gregtech.api.GregTechAPI;
import gregtech.api.block.VariantActiveBlock;
import gregtech.api.capability.GregtechCapabilities;
Expand All @@ -24,6 +25,7 @@
import gregtech.client.renderer.handler.MultiblockPreviewRenderer;
import gregtech.client.renderer.texture.Textures;
import gregtech.client.renderer.texture.cube.SimpleOrientedCubeRenderer;
import gregtech.client.utils.TooltipHelper;
import gregtech.common.blocks.MetaBlocks;

import net.minecraft.block.Block;
Expand Down Expand Up @@ -189,6 +191,44 @@ public TextureAtlasSprite getFrontDefaultTexture() {
return getFrontOverlay().getParticleSprite();
}

@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip,
boolean advanced, String energyType, boolean hasPerfectOC, int tierskipLimit,
String... extraInfo) {
super.addInformation(stack, world, tooltip, advanced);
tooltip.add("");
Collections.addAll(tooltip, extraInfo);
tooltip.add("");
tooltip.add(energyType);
if (hasPerfectOC) tooltip.add(TooltipHelper.RAINBOW_SLOW + I18n.format("gregtech.machine.perfect_oc"));
if (tierskipLimit == 0) {
tooltip.add(I18n.format("gregtech.machine.tierskip.none"));
} else if (tierskipLimit >= GTValues.MAX) {
tooltip.add(I18n.format("gregtech.machine.tierskip.unlimited"));
} else if (tierskipLimit != -1) {
tooltip.add(I18n.format("gregtech.machine.tierskip", tierskipLimit));
}
tooltip.add("");
}

@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip,
boolean advanced, String energyType, int tierskipLimit, String... extraInfo) {
addInformation(stack, world, tooltip, advanced, energyType, false, tierskipLimit, extraInfo);
}

@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip,
boolean advanced, String energyType, boolean hasPerfectOC, String... extraInfo) {
addInformation(stack, world, tooltip, advanced, energyType, hasPerfectOC, 0, extraInfo);
}

@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip,
boolean advanced, String energyType, String... extraInfo) {
addInformation(stack, world, tooltip, advanced, energyType, false, 0, extraInfo);
}

public static TraceabilityPredicate tilePredicate(@NotNull BiFunction<BlockWorldState, MetaTileEntity, Boolean> predicate,
@Nullable Supplier<BlockInfo[]> candidates) {
return new TraceabilityPredicate(blockWorldState -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,10 @@ protected void addWarningText(List<ITextComponent> textList) {

@Override
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, boolean advanced) {
tooltip.add("");
tooltip.add(I18n.format("gregtech.machine.cleanroom.tooltip.1"));
tooltip.add(I18n.format("gregtech.machine.cleanroom.tooltip.2"));
tooltip.add(I18n.format("gregtech.machine.cleanroom.tooltip.3"));
tooltip.add(I18n.format("gregtech.machine.cleanroom.tooltip.4"));

if (TooltipHelper.isCtrlDown()) {
tooltip.add("");
Expand All @@ -558,6 +558,7 @@ public void addInformation(ItemStack stack, @Nullable World player, List<String>
}
tooltip.add("");
} else {
tooltip.add("");
tooltip.add(I18n.format("gregtech.machine.cleanroom.tooltip.hold_ctrl"));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ public ICubeRenderer getBaseTexture(IMultiblockPart sourcePart) {
@Override
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip,
boolean advanced) {
super.addInformation(stack, world, tooltip, advanced);
tooltip.add(I18n.format("gregtech.machine.electric_blast_furnace.tooltip.1"));
tooltip.add(I18n.format("gregtech.machine.electric_blast_furnace.tooltip.2"));
tooltip.add(I18n.format("gregtech.machine.electric_blast_furnace.tooltip.3"));
super.addInformation(stack, world, tooltip, advanced, I18n.format("gregtech.machine.energy.16a"), 1,
I18n.format("gregtech.machine.electric_blast_furnace.tooltip.1"),
I18n.format("gregtech.machine.electric_blast_furnace.tooltip.2"),
I18n.format("gregtech.machine.electric_blast_furnace.tooltip.3"),
I18n.format("gregtech.machine.electric_blast_furnace.tooltip.4"));
}

@Override
Expand Down
Loading
Loading