Class ScreenNarrator

java.lang.Object
net.minecraft.client.gui.screen.narration.ScreenNarrator

@Environment(CLIENT) public class ScreenNarrator extends Object
Manages narration messages and combines them into a narrated string.
Mappings:
Namespace Name
named net/minecraft/client/gui/screen/narration/ScreenNarrator
intermediary net/minecraft/class_6385
official fsu
  • Field Details Link icon

    • currentMessageIndex Link icon

      int currentMessageIndex
      Mappings:
      Namespace Name Mixin selector
      named currentMessageIndex Lnet/minecraft/client/gui/screen/narration/ScreenNarrator;currentMessageIndex:I
      intermediary field_33796 Lnet/minecraft/class_6385;field_33796:I
      official a Lfsu;a:I
    • narrations Link icon

      Mappings:
      Namespace Name Mixin selector
      named narrations Lnet/minecraft/client/gui/screen/narration/ScreenNarrator;narrations:Ljava/util/Map;
      intermediary field_33797 Lnet/minecraft/class_6385;field_33797:Ljava/util/Map;
      official b Lfsu;b:Ljava/util/Map;
  • Constructor Details Link icon

    • ScreenNarrator Link icon

      public ScreenNarrator()
  • Method Details Link icon

    • buildNarrations Link icon

      public void buildNarrations(Consumer<NarrationMessageBuilder> builderConsumer)
      Creates the narration messages for the next narration using a NarrationMessageBuilder.
      Parameters:
      builderConsumer - a consumer that adds the narrations to a NarrationMessageBuilder
      Mappings:
      Namespace Name Mixin selector
      named buildNarrations Lnet/minecraft/client/gui/screen/narration/ScreenNarrator;buildNarrations(Ljava/util/function/Consumer;)V
      intermediary method_37044 Lnet/minecraft/class_6385;method_37044(Ljava/util/function/Consumer;)V
      official a Lfsu;a(Ljava/util/function/Consumer;)V
    • buildNarratorText Link icon

      public String buildNarratorText(boolean includeUnchanged)
      Builds a text representation of the narrations produced by the last call to buildNarrations.
      Parameters:
      includeUnchanged - if true, the text will include unchanged messages that have already been included in the output of this method previously
      Returns:
      the created narrator text
      Implementation Note:
      Contains all sentences in the narrations of the current narration message separated by ". ", ordered as described in NarrationMessageBuilder.
      Mappings:
      Namespace Name Mixin selector
      named buildNarratorText Lnet/minecraft/client/gui/screen/narration/ScreenNarrator;buildNarratorText(Z)Ljava/lang/String;
      intermediary method_37045 Lnet/minecraft/class_6385;method_37045(Z)Ljava/lang/String;
      official a Lfsu;a(Z)Ljava/lang/String;