Search in sources :

Example 16 with Style

use of net.minecraft.util.text.Style in project Railcraft by Railcraft.

the class CommandHelpers method printHelp.

public static void printHelp(ICommandSender sender, IModCommand command) {
    Style header = new Style();
    header.setColor(TextFormatting.BLUE);
    sendLocalizedChatMessage(sender, header, "command.railcraft." + command.getFullString().replace(" ", ".").replace('_', '.') + ".format", command.getFullString());
    Style body = new Style();
    body.setColor(TextFormatting.GRAY);
    sendLocalizedChatMessage(sender, body, "command.railcraft.aliases", command.getAliases().toString().replace("[", "").replace("]", ""));
    sendLocalizedChatMessage(sender, body, "command.railcraft.permlevel", command.getPermissionLevel());
    sendLocalizedChatMessage(sender, body, "command.railcraft." + command.getFullString().replace(" ", ".").replace('_', '.') + ".help");
    if (!command.getChildren().isEmpty()) {
        sendLocalizedChatMessage(sender, "command.railcraft.list");
        for (SubCommand child : command.getChildren()) {
            sendLocalizedChatMessage(sender, "command.railcraft." + child.getFullString().replace(" ", ".").replace('_', '.') + ".desc", child.getName());
        }
    }
}
Also used : Style(net.minecraft.util.text.Style)

Example 17 with Style

use of net.minecraft.util.text.Style in project GregTech by GregTechCE.

the class VacuumFreezerInfo method generateBlockTooltips.

@Override
protected void generateBlockTooltips() {
    super.generateBlockTooltips();
    ITextComponent tooltip = new TextComponentTranslation("gregtech.multiblock.preview.limit", 14).setStyle(new Style().setColor(TextFormatting.AQUA));
    addBlockTooltip(MetaBlocks.METAL_CASING.getItemVariant(MetalCasingType.ALUMINIUM_FROSTPROOF), tooltip);
}
Also used : TextComponentTranslation(net.minecraft.util.text.TextComponentTranslation) ITextComponent(net.minecraft.util.text.ITextComponent) Style(net.minecraft.util.text.Style)

Example 18 with Style

use of net.minecraft.util.text.Style in project GregTech by GregTechCE.

the class CrackerUnitInfo method generateBlockTooltips.

@Override
protected void generateBlockTooltips() {
    super.generateBlockTooltips();
    ITextComponent tooltip = new TextComponentTranslation("gregtech.multiblock.preview.limit", 20).setStyle(new Style().setColor(TextFormatting.AQUA));
    addBlockTooltip(MetaBlocks.METAL_CASING.getItemVariant(BlockMetalCasing.MetalCasingType.STAINLESS_CLEAN), tooltip);
}
Also used : TextComponentTranslation(net.minecraft.util.text.TextComponentTranslation) ITextComponent(net.minecraft.util.text.ITextComponent) Style(net.minecraft.util.text.Style)

Example 19 with Style

use of net.minecraft.util.text.Style in project GregTech by GregTechCE.

the class DistillationTowerInfo method generateBlockTooltips.

@Override
protected void generateBlockTooltips() {
    super.generateBlockTooltips();
    ITextComponent tooltip = new TextComponentTranslation("gregtech.multiblock.preview.limit_per_layer", 1).setStyle(new Style().setColor(TextFormatting.DARK_RED));
    ITextComponent inputTooltip = new TextComponentTranslation("gregtech.multiblock.preview.only_location", I18n.format("gregtech.multiblock.preview.location.b_c")).setStyle(new Style().setColor(TextFormatting.DARK_RED));
    for (int i = 0; i < GTValues.V.length; i++) {
        addBlockTooltip(MetaTileEntities.FLUID_EXPORT_HATCH[i].getStackForm(), tooltip);
        addBlockTooltip(MetaTileEntities.FLUID_IMPORT_HATCH[i].getStackForm(), inputTooltip);
    }
}
Also used : TextComponentTranslation(net.minecraft.util.text.TextComponentTranslation) ITextComponent(net.minecraft.util.text.ITextComponent) Style(net.minecraft.util.text.Style)

Example 20 with Style

use of net.minecraft.util.text.Style in project GregTech by GregTechCE.

the class PyrolyzeOvenInfo method generateBlockTooltips.

@Override
protected void generateBlockTooltips() {
    super.generateBlockTooltips();
    ItemStack coils = MetaBlocks.WIRE_COIL.getItemVariant(BlockWireCoil.CoilType.CUPRONICKEL);
    ITextComponent tooltip = new TextComponentTranslation("gregtech.multiblock.preview.only", coils.getDisplayName()).setStyle(new Style().setColor(TextFormatting.RED));
    addBlockTooltip(coils, tooltip);
}
Also used : TextComponentTranslation(net.minecraft.util.text.TextComponentTranslation) ITextComponent(net.minecraft.util.text.ITextComponent) Style(net.minecraft.util.text.Style) ItemStack(net.minecraft.item.ItemStack)

Aggregations

Style (net.minecraft.util.text.Style)51 TextComponentTranslation (net.minecraft.util.text.TextComponentTranslation)30 TextComponentString (net.minecraft.util.text.TextComponentString)21 ITextComponent (net.minecraft.util.text.ITextComponent)17 ClickEvent (net.minecraft.util.text.event.ClickEvent)10 BlockPos (net.minecraft.util.math.BlockPos)9 CommandException (net.minecraft.command.CommandException)7 EntityPlayer (net.minecraft.entity.player.EntityPlayer)4 ItemStack (net.minecraft.item.ItemStack)4 World (net.minecraft.world.World)4 Colony (com.minecolonies.coremod.colony.Colony)3 PlayerIdentifier (com.mraof.minestuck.util.IdentifierHandler.PlayerIdentifier)3 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)3 GameProfile (com.mojang.authlib.GameProfile)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)2 HoverEvent (net.minecraft.util.text.event.HoverEvent)2 Biome (net.minecraft.world.biome.Biome)2 FluidStack (net.minecraftforge.fluids.FluidStack)2