Class LangBuilder

java.lang.Object
com.simibubi.create.foundation.utility.LangBuilder

public class LangBuilder extends Object
  • Constructor Details

    • LangBuilder

      public LangBuilder(String namespace)
  • Method Details

    • space

      public LangBuilder space()
    • newLine

      public LangBuilder newLine()
    • translate

      public LangBuilder translate(String langKey, Object... args)
      Appends a localised component
      To add an independently formatted localised component, use add() and a nested builder
      Parameters:
      langKey -
      args -
      Returns:
    • text

      public LangBuilder text(String literalText)
      Appends a text component
      Parameters:
      literalText -
      Returns:
    • text

      public LangBuilder text(net.minecraft.ChatFormatting format, String literalText)
      Appends a colored text component
      Parameters:
      format -
      literalText -
      Returns:
    • text

      public LangBuilder text(int color, String literalText)
      Appends a colored text component
      Parameters:
      color -
      literalText -
      Returns:
    • add

      public LangBuilder add(LangBuilder otherBuilder)
      Appends the contents of another builder
      Parameters:
      otherBuilder -
      Returns:
    • add

      public LangBuilder add(net.minecraft.network.chat.MutableComponent customComponent)
      Appends a component
      Parameters:
      customComponent -
      Returns:
    • style

      public LangBuilder style(net.minecraft.ChatFormatting format)
      Applies the format to all added components
      Parameters:
      format -
      Returns:
    • color

      public LangBuilder color(int color)
      Applies the color to all added components
      Parameters:
      color -
      Returns:
    • component

      public net.minecraft.network.chat.MutableComponent component()
    • string

      public String string()
    • json

      public String json()
    • sendStatus

      public void sendStatus(net.minecraft.world.entity.player.Player player)
    • sendChat

      public void sendChat(net.minecraft.world.entity.player.Player player)
    • addTo

      public void addTo(List<? super net.minecraft.network.chat.MutableComponent> tooltip)
    • forGoggles

      public void forGoggles(List<? super net.minecraft.network.chat.MutableComponent> tooltip)
    • forGoggles

      public void forGoggles(List<? super net.minecraft.network.chat.MutableComponent> tooltip, int indents)