use of net.minecraft.util.text.ITextComponent in project SpongeCommon by SpongePowered.
the class LegacySerializerTest method testNestedText.
@Test
public void testNestedText() {
ITextComponent component = new TextComponentString("first");
component.getStyle().setColor(TextFormatting.RED);
component.appendSibling(new TextComponentString("second"));
TextComponentString component2 = new TextComponentString("third");
component2.getStyle().setColor(TextFormatting.BLUE);
component.appendSibling(component2);
assertThat(SpongeTexts.toLegacy(component), is(COLOR_CHAR + "cfirstsecond" + COLOR_CHAR + "9third"));
}
use of net.minecraft.util.text.ITextComponent 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);
}
use of net.minecraft.util.text.ITextComponent 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);
}
use of net.minecraft.util.text.ITextComponent 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);
}
}
use of net.minecraft.util.text.ITextComponent 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);
}
Aggregations