Class FontManager

java.lang.Object
net.minecraft.client.font.FontManager
All Implemented Interfaces:
AutoCloseable, ResourceReloader

@Environment(CLIENT) public class FontManager extends Object implements ResourceReloader, AutoCloseable
Mappings:
Namespace Name
named net/minecraft/client/font/FontManager
intermediary net/minecraft/class_378
official fqv
  • Field Details

    • LOGGER

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/client/font/FontManager;LOGGER:Lorg/slf4j/Logger;
      intermediary field_2261 Lnet/minecraft/class_378;field_2261:Lorg/slf4j/Logger;
      official b Lfqv;b:Lorg/slf4j/Logger;
    • FONTS_JSON

      private static final String FONTS_JSON
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named FONTS_JSON Lnet/minecraft/client/font/FontManager;FONTS_JSON:Ljava/lang/String;
      intermediary field_32226 Lnet/minecraft/class_378;field_32226:Ljava/lang/String;
      official c Lfqv;c:Ljava/lang/String;
    • MISSING_STORAGE_ID

      public static final Identifier MISSING_STORAGE_ID
      Mappings:
      Namespace Name Mixin selector
      named MISSING_STORAGE_ID Lnet/minecraft/client/font/FontManager;MISSING_STORAGE_ID:Lnet/minecraft/util/Identifier;
      intermediary field_24254 Lnet/minecraft/class_378;field_24254:Lnet/minecraft/class_2960;
      official a Lfqv;a:Lalz;
    • FINDER

      private static final ResourceFinder FINDER
      Mappings:
      Namespace Name Mixin selector
      named FINDER Lnet/minecraft/client/font/FontManager;FINDER:Lnet/minecraft/resource/ResourceFinder;
      intermediary field_40409 Lnet/minecraft/class_378;field_40409:Lnet/minecraft/class_7654;
      official d Lfqv;d:Lals;
    • GSON

      private static final Gson GSON
      Mappings:
      Namespace Name Mixin selector
      named GSON Lnet/minecraft/client/font/FontManager;GSON:Lcom/google/gson/Gson;
      intermediary field_44757 Lnet/minecraft/class_378;field_44757:Lcom/google/gson/Gson;
      official e Lfqv;e:Lcom/google/gson/Gson;
    • missingStorage

      private final FontStorage missingStorage
      Mappings:
      Namespace Name Mixin selector
      named missingStorage Lnet/minecraft/client/font/FontManager;missingStorage:Lnet/minecraft/client/font/FontStorage;
      intermediary field_24255 Lnet/minecraft/class_378;field_24255:Lnet/minecraft/class_377;
      official f Lfqv;f:Lfqx;
    • fonts

      private final List<Font> fonts
      Mappings:
      Namespace Name Mixin selector
      named fonts Lnet/minecraft/client/font/FontManager;fonts:Ljava/util/List;
      intermediary field_44758 Lnet/minecraft/class_378;field_44758:Ljava/util/List;
      official g Lfqv;g:Ljava/util/List;
    • fontStorages

      private final Map<Identifier,FontStorage> fontStorages
      Mappings:
      Namespace Name Mixin selector
      named fontStorages Lnet/minecraft/client/font/FontManager;fontStorages:Ljava/util/Map;
      intermediary field_2259 Lnet/minecraft/class_378;field_2259:Ljava/util/Map;
      official h Lfqv;h:Ljava/util/Map;
    • textureManager

      private final TextureManager textureManager
      Mappings:
      Namespace Name Mixin selector
      named textureManager Lnet/minecraft/client/font/FontManager;textureManager:Lnet/minecraft/client/texture/TextureManager;
      intermediary field_2260 Lnet/minecraft/class_378;field_2260:Lnet/minecraft/class_1060;
      official i Lfqv;i:Lhbl;
    • currentStorage

      @Nullable private volatile @Nullable FontStorage currentStorage
      Mappings:
      Namespace Name Mixin selector
      named currentStorage Lnet/minecraft/client/font/FontManager;currentStorage:Lnet/minecraft/client/font/FontStorage;
      intermediary field_49111 Lnet/minecraft/class_378;field_49111:Lnet/minecraft/class_377;
      official j Lfqv;j:Lfqx;
  • Constructor Details

    • FontManager

      public FontManager(TextureManager manager)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/font/FontManager;<init>(Lnet/minecraft/client/texture/TextureManager;)V
      intermediary <init> Lnet/minecraft/class_378;<init>(Lnet/minecraft/class_1060;)V
      official <init> Lfqv;<init>(Lhbl;)V
  • Method Details

    • createEmptyFont

      private static Font.FontFilterPair createEmptyFont()
      Mappings:
      Namespace Name Mixin selector
      named createEmptyFont Lnet/minecraft/client/font/FontManager;createEmptyFont()Lnet/minecraft/client/font/Font$FontFilterPair;
      intermediary method_57027 Lnet/minecraft/class_378;method_57027()Lnet/minecraft/class_390$class_9241;
      official d Lfqv;d()Lfeq$a;
    • reload

      public CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor)
      Performs a reload. Returns a future that is completed when the reload is completed.

      In a reload, there is a prepare stage and an apply stage. For the prepare stage, you should create completable futures with CompletableFuture.supplyAsync(..., prepareExecutor) to ensure the prepare actions are done with the prepare executor. Then, you should have a completable future for all the prepared actions, and call combinedPrepare.thenCompose(synchronizer::waitFor) to notify the synchronizer. Finally, you should run CompletableFuture.thenAcceptAsync(..., applyExecutor) for apply actions. In the end, returns the result of thenAcceptAsync.

      Specified by:
      reload in interface ResourceReloader
      Parameters:
      synchronizer - the synchronizer
      manager - the resource manager
      Returns:
      a future for the reload
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named reload Lnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_25931 Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      official a Lavp;a(Lavp$a;Lavv;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
    • loadIndex

      private CompletableFuture<FontManager.ProviderIndex> loadIndex(ResourceManager resourceManager, Executor executor)
      Mappings:
      Namespace Name Mixin selector
      named loadIndex Lnet/minecraft/client/font/FontManager;loadIndex(Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_51608 Lnet/minecraft/class_378;method_51608(Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      official a Lfqv;a(Lavv;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
    • load

      private CompletableFuture<Optional<Font>> load(FontManager.FontKey key, FontLoader.Loadable loadable, ResourceManager resourceManager, Executor executor)
      Mappings:
      Namespace Name Mixin selector
      named load Lnet/minecraft/client/font/FontManager;load(Lnet/minecraft/client/font/FontManager$FontKey;Lnet/minecraft/client/font/FontLoader$Loadable;Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_51613 Lnet/minecraft/class_378;method_51613(Lnet/minecraft/class_378$class_8534;Lnet/minecraft/class_389$class_8539;Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      official a Lfqv;a(Lfqv$a;Lfri$b;Lavv;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
    • getRequiredFontProviders

      private Map<Identifier,List<Font.FontFilterPair>> getRequiredFontProviders(List<FontManager.FontEntry> entries)
      Mappings:
      Namespace Name Mixin selector
      named getRequiredFontProviders Lnet/minecraft/client/font/FontManager;getRequiredFontProviders(Ljava/util/List;)Ljava/util/Map;
      intermediary method_51617 Lnet/minecraft/class_378;method_51617(Ljava/util/List;)Ljava/util/Map;
      official a Lfqv;a(Ljava/util/List;)Ljava/util/Map;
    • insertFont

      private void insertFont(List<Font.FontFilterPair> fonts, Font.FontFilterPair font)
      Mappings:
      Namespace Name Mixin selector
      named insertFont Lnet/minecraft/client/font/FontManager;insertFont(Ljava/util/List;Lnet/minecraft/client/font/Font$FontFilterPair;)V
      intermediary method_51620 Lnet/minecraft/class_378;method_51620(Ljava/util/List;Lnet/minecraft/class_390$class_9241;)V
      official a Lfqv;a(Ljava/util/List;Lfeq$a;)V
    • getActiveFilters

      private static Set<FontFilterType> getActiveFilters(GameOptions options)
      Mappings:
      Namespace Name Mixin selector
      named getActiveFilters Lnet/minecraft/client/font/FontManager;getActiveFilters(Lnet/minecraft/client/option/GameOptions;)Ljava/util/Set;
      intermediary method_57026 Lnet/minecraft/class_378;method_57026(Lnet/minecraft/class_315;)Ljava/util/Set;
      official b Lfqv;b(Lfmj;)Ljava/util/Set;
    • reload

      private void reload(FontManager.ProviderIndex index, Profiler profiler)
      Mappings:
      Namespace Name Mixin selector
      named reload Lnet/minecraft/client/font/FontManager;reload(Lnet/minecraft/client/font/FontManager$ProviderIndex;Lnet/minecraft/util/profiler/Profiler;)V
      intermediary method_51614 Lnet/minecraft/class_378;method_51614(Lnet/minecraft/class_378$class_8536;Lnet/minecraft/class_3695;)V
      official a Lfqv;a(Lfqv$d;Lbps;)V
    • setActiveFilters

      public void setActiveFilters(GameOptions options)
      Mappings:
      Namespace Name Mixin selector
      named setActiveFilters Lnet/minecraft/client/font/FontManager;setActiveFilters(Lnet/minecraft/client/option/GameOptions;)V
      intermediary method_57024 Lnet/minecraft/class_378;method_57024(Lnet/minecraft/class_315;)V
      official a Lfqv;a(Lfmj;)V
    • loadFontProviders

      private static List<com.mojang.datafixers.util.Pair<FontManager.FontKey,FontLoader.Provider>> loadFontProviders(List<Resource> fontResources, Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named loadFontProviders Lnet/minecraft/client/font/FontManager;loadFontProviders(Ljava/util/List;Lnet/minecraft/util/Identifier;)Ljava/util/List;
      intermediary method_51619 Lnet/minecraft/class_378;method_51619(Ljava/util/List;Lnet/minecraft/class_2960;)Ljava/util/List;
      official a Lfqv;a(Ljava/util/List;Lalz;)Ljava/util/List;
    • createTextRenderer

      public TextRenderer createTextRenderer()
      Mappings:
      Namespace Name Mixin selector
      named createTextRenderer Lnet/minecraft/client/font/FontManager;createTextRenderer()Lnet/minecraft/client/font/TextRenderer;
      intermediary method_27539 Lnet/minecraft/class_378;method_27539()Lnet/minecraft/class_327;
      official a Lfqv;a()Lfnp;
    • createAdvanceValidatingTextRenderer

      public TextRenderer createAdvanceValidatingTextRenderer()
      Mappings:
      Namespace Name Mixin selector
      named createAdvanceValidatingTextRenderer Lnet/minecraft/client/font/FontManager;createAdvanceValidatingTextRenderer()Lnet/minecraft/client/font/TextRenderer;
      intermediary method_45078 Lnet/minecraft/class_378;method_45078()Lnet/minecraft/class_327;
      official b Lfqv;b()Lfnp;
    • getStorageInternal

      private FontStorage getStorageInternal(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named getStorageInternal Lnet/minecraft/client/font/FontManager;getStorageInternal(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/font/FontStorage;
      intermediary method_57023 Lnet/minecraft/class_378;method_57023(Lnet/minecraft/class_2960;)Lnet/minecraft/class_377;
      official a Lfqv;a(Lalz;)Lfqx;
    • getStorage

      private FontStorage getStorage(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named getStorage Lnet/minecraft/client/font/FontManager;getStorage(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/font/FontStorage;
      intermediary method_57025 Lnet/minecraft/class_378;method_57025(Lnet/minecraft/class_2960;)Lnet/minecraft/class_377;
      official b Lfqv;b(Lalz;)Lfqx;
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable