Package net.minecraft.client.font
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 official fgnintermediary net/minecraft/class_378named net/minecraft/client/font/FontManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static final recordprivate static final recordprivate static final recordprivate static final recordNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable FontStorageprivate static final ResourceFinderprivate static final Stringprivate final Map<Identifier, FontStorage> private static final Gson(package private) static final Loggerstatic final Identifierprivate final FontStorageprivate final TextureManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private static Font.FontFilterPairprivate static Set<FontFilterType> getActiveFilters(GameOptions options) private Map<Identifier, List<Font.FontFilterPair>> private FontStoragegetStorage(Identifier id) private FontStorageprivate voidinsertFont(List<Font.FontFilterPair> fonts, Font.FontFilterPair font) private CompletableFuture<Optional<Font>> load(FontManager.FontKey key, FontLoader.Loadable loadable, ResourceManager resourceManager, Executor executor) private static List<com.mojang.datafixers.util.Pair<FontManager.FontKey, FontLoader.Provider>> loadFontProviders(List<Resource> fontResources, Identifier id) loadIndex(ResourceManager resourceManager, Executor executor) private voidreload(FontManager.ProviderIndex index, Profiler profiler) reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) Performs a reload.voidsetActiveFilters(GameOptions options) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceReloader
getName
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official bLfgn;b:Lorg/slf4j/Logger;intermediary field_2261Lnet/minecraft/class_378;field_2261:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/client/font/FontManager;LOGGER:Lorg/slf4j/Logger;
-
FONTS_JSON
- See Also:
- Mappings:
Namespace Name Mixin selector official cLfgn;c:Ljava/lang/String;intermediary field_32226Lnet/minecraft/class_378;field_32226:Ljava/lang/String;named FONTS_JSONLnet/minecraft/client/font/FontManager;FONTS_JSON:Ljava/lang/String;
-
MISSING_STORAGE_ID
- Mappings:
Namespace Name Mixin selector official aLfgn;a:Lajv;intermediary field_24254Lnet/minecraft/class_378;field_24254:Lnet/minecraft/class_2960;named MISSING_STORAGE_IDLnet/minecraft/client/font/FontManager;MISSING_STORAGE_ID:Lnet/minecraft/util/Identifier;
-
FINDER
- Mappings:
Namespace Name Mixin selector official dLfgn;d:Lajo;intermediary field_40409Lnet/minecraft/class_378;field_40409:Lnet/minecraft/class_7654;named FINDERLnet/minecraft/client/font/FontManager;FINDER:Lnet/minecraft/resource/ResourceFinder;
-
GSON
- Mappings:
Namespace Name Mixin selector official eLfgn;e:Lcom/google/gson/Gson;intermediary field_44757Lnet/minecraft/class_378;field_44757:Lcom/google/gson/Gson;named GSONLnet/minecraft/client/font/FontManager;GSON:Lcom/google/gson/Gson;
-
missingStorage
- Mappings:
Namespace Name Mixin selector official fLfgn;f:Lfgp;intermediary field_24255Lnet/minecraft/class_378;field_24255:Lnet/minecraft/class_377;named missingStorageLnet/minecraft/client/font/FontManager;missingStorage:Lnet/minecraft/client/font/FontStorage;
-
fonts
- Mappings:
Namespace Name Mixin selector official gLfgn;g:Ljava/util/List;intermediary field_44758Lnet/minecraft/class_378;field_44758:Ljava/util/List;named fontsLnet/minecraft/client/font/FontManager;fonts:Ljava/util/List;
-
fontStorages
- Mappings:
Namespace Name Mixin selector official hLfgn;h:Ljava/util/Map;intermediary field_2259Lnet/minecraft/class_378;field_2259:Ljava/util/Map;named fontStoragesLnet/minecraft/client/font/FontManager;fontStorages:Ljava/util/Map;
-
textureManager
- Mappings:
Namespace Name Mixin selector official iLfgn;i:Lglt;intermediary field_2260Lnet/minecraft/class_378;field_2260:Lnet/minecraft/class_1060;named textureManagerLnet/minecraft/client/font/FontManager;textureManager:Lnet/minecraft/client/texture/TextureManager;
-
currentStorage
- Mappings:
Namespace Name Mixin selector official jLfgn;j:Lfgp;intermediary field_49111Lnet/minecraft/class_378;field_49111:Lnet/minecraft/class_377;named currentStorageLnet/minecraft/client/font/FontManager;currentStorage:Lnet/minecraft/client/font/FontStorage;
-
-
Constructor Details
-
FontManager
- Mappings:
Namespace Name Mixin selector official <init>Lfgn;<init>(Lglt;)Vintermediary <init>Lnet/minecraft/class_378;<init>(Lnet/minecraft/class_1060;)Vnamed <init>Lnet/minecraft/client/font/FontManager;<init>(Lnet/minecraft/client/texture/TextureManager;)V
-
-
Method Details
-
createEmptyFont
- Mappings:
Namespace Name Mixin selector official dLfgn;d()Leuu$a;intermediary method_57027Lnet/minecraft/class_378;method_57027()Lnet/minecraft/class_390$class_9241;named createEmptyFontLnet/minecraft/client/font/FontManager;createEmptyFont()Lnet/minecraft/client/font/Font$FontFilterPair;
-
reload
public CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, 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 ofthenAcceptAsync.- Specified by:
reloadin interfaceResourceReloader- Parameters:
synchronizer- the synchronizermanager- the resource managerprepareProfiler- the profiler for prepare stageapplyProfiler- the profiler for apply stageprepareExecutor- the executor for prepare stageapplyExecutor- the executor for apply stage- Returns:
- a future for the reload
- See Also:
- Mappings:
Namespace Name Mixin selector official aLasy;a(Lasy$a;Late;Lbkt;Lbkt;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_25931Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;Lnet/minecraft/class_3695;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;named reloadLnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;Lnet/minecraft/util/profiler/Profiler;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 official aLfgn;a(Late;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_51608Lnet/minecraft/class_378;method_51608(Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;named loadIndexLnet/minecraft/client/font/FontManager;loadIndex(Lnet/minecraft/resource/ResourceManager;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 official aLfgn;a(Lfgn$a;Lfha$b;Late;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_51613Lnet/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;named loadLnet/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;
-
getRequiredFontProviders
private Map<Identifier,List<Font.FontFilterPair>> getRequiredFontProviders(List<FontManager.FontEntry> entries) - Mappings:
Namespace Name Mixin selector official aLfgn;a(Ljava/util/List;)Ljava/util/Map;intermediary method_51617Lnet/minecraft/class_378;method_51617(Ljava/util/List;)Ljava/util/Map;named getRequiredFontProvidersLnet/minecraft/client/font/FontManager;getRequiredFontProviders(Ljava/util/List;)Ljava/util/Map;
-
insertFont
- Mappings:
Namespace Name Mixin selector official aLfgn;a(Ljava/util/List;Leuu$a;)Vintermediary method_51620Lnet/minecraft/class_378;method_51620(Ljava/util/List;Lnet/minecraft/class_390$class_9241;)Vnamed insertFontLnet/minecraft/client/font/FontManager;insertFont(Ljava/util/List;Lnet/minecraft/client/font/Font$FontFilterPair;)V
-
getActiveFilters
- Mappings:
Namespace Name Mixin selector official bLfgn;b(Lfcc;)Ljava/util/Set;intermediary method_57026Lnet/minecraft/class_378;method_57026(Lnet/minecraft/class_315;)Ljava/util/Set;named getActiveFiltersLnet/minecraft/client/font/FontManager;getActiveFilters(Lnet/minecraft/client/option/GameOptions;)Ljava/util/Set;
-
reload
- Mappings:
Namespace Name Mixin selector official aLfgn;a(Lfgn$d;Lbkt;)Vintermediary method_51614Lnet/minecraft/class_378;method_51614(Lnet/minecraft/class_378$class_8536;Lnet/minecraft/class_3695;)Vnamed reloadLnet/minecraft/client/font/FontManager;reload(Lnet/minecraft/client/font/FontManager$ProviderIndex;Lnet/minecraft/util/profiler/Profiler;)V
-
setActiveFilters
- Mappings:
Namespace Name Mixin selector official aLfgn;a(Lfcc;)Vintermediary method_57024Lnet/minecraft/class_378;method_57024(Lnet/minecraft/class_315;)Vnamed setActiveFiltersLnet/minecraft/client/font/FontManager;setActiveFilters(Lnet/minecraft/client/option/GameOptions;)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 official aLfgn;a(Ljava/util/List;Lajv;)Ljava/util/List;intermediary method_51619Lnet/minecraft/class_378;method_51619(Ljava/util/List;Lnet/minecraft/class_2960;)Ljava/util/List;named loadFontProvidersLnet/minecraft/client/font/FontManager;loadFontProviders(Ljava/util/List;Lnet/minecraft/util/Identifier;)Ljava/util/List;
-
createTextRenderer
- Mappings:
Namespace Name Mixin selector official aLfgn;a()Lfdj;intermediary method_27539Lnet/minecraft/class_378;method_27539()Lnet/minecraft/class_327;named createTextRendererLnet/minecraft/client/font/FontManager;createTextRenderer()Lnet/minecraft/client/font/TextRenderer;
-
createAdvanceValidatingTextRenderer
- Mappings:
Namespace Name Mixin selector official bLfgn;b()Lfdj;intermediary method_45078Lnet/minecraft/class_378;method_45078()Lnet/minecraft/class_327;named createAdvanceValidatingTextRendererLnet/minecraft/client/font/FontManager;createAdvanceValidatingTextRenderer()Lnet/minecraft/client/font/TextRenderer;
-
getStorageInternal
- Mappings:
Namespace Name Mixin selector official aLfgn;a(Lajv;)Lfgp;intermediary method_57023Lnet/minecraft/class_378;method_57023(Lnet/minecraft/class_2960;)Lnet/minecraft/class_377;named getStorageInternalLnet/minecraft/client/font/FontManager;getStorageInternal(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/font/FontStorage;
-
getStorage
- Mappings:
Namespace Name Mixin selector official bLfgn;b(Lajv;)Lfgp;intermediary method_57025Lnet/minecraft/class_378;method_57025(Lnet/minecraft/class_2960;)Lnet/minecraft/class_377;named getStorageLnet/minecraft/client/font/FontManager;getStorage(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/font/FontStorage;
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-