Class PalettedTextureManager
java.lang.Object
net.minecraft.client.resources.palette.PalettedTextureManager
- All Implemented Interfaces:
AutoCloseable, PreparableReloadListener
public class PalettedTextureManager
extends Object
implements PreparableReloadListener, AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static final recordstatic interfaceprivate static classprivate static final recordprivate static final recordNested classes/interfaces inherited from interface PreparableReloadListener
PreparableReloadListener.PreparationBarrier, PreparableReloadListener.SharedState, PreparableReloadListener.StateKey<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<PalettedTextureManager.AtlasTexture> private final LoadingCache<Identifier, Optional<PalettedTextureManager.BaseTexture>> private final Map<PalettedTextureManager.SlotKey, PalettedTextureManager.Handle> private static final org.slf4j.Loggerprivate final PalettedTextureManager.Handleprivate final List<PalettedTextureManager.OverflowTexture> private BiFunction<Identifier, Identifier, PaletteMapping> private final TextureManager -
Constructor Summary
ConstructorsConstructorDescriptionPalettedTextureManager(ResourceManager resourceManager, TextureManager textureManager) -
Method Summary
Modifier and TypeMethodDescriptionprivate PalettedTextureManager.SlotallocateSlot(int width, int height) voidclose()getOrPrepare(Identifier baseTexture, Identifier paletteId) private static @Nullable PalettedTextureManager.BaseTextureloadBaseTexture(Identifier id, ResourceManager resourceManager) private PalettedTextureManager.HandleprepareSlot(Identifier baseTextureId, Identifier paletteId) reload(PreparableReloadListener.SharedState currentReload, Executor taskExecutor, PreparableReloadListener.PreparationBarrier preparationBarrier, Executor reloadExecutor) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PreparableReloadListener
getName, prepareSharedState
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
textureManager
-
paletteMappings
-
baseTextureCache
private final LoadingCache<Identifier, Optional<PalettedTextureManager.BaseTexture>> baseTextureCache -
atlasTextures
-
overflowTextures
-
handles
-
missingHandle
-
-
Constructor Details
-
PalettedTextureManager
-
-
Method Details
-
loadBaseTexture
private static @Nullable PalettedTextureManager.BaseTexture loadBaseTexture(Identifier id, ResourceManager resourceManager) -
getOrPrepare
-
prepareSlot
-
allocateSlot
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-