Package net.minecraftforge.client
Class MinecraftForgeClient
java.lang.Object
net.minecraftforge.client.MinecraftForgeClient
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static HashMap<ResourceLocation,Supplier<NativeImage>>private static com.google.common.cache.LoadingCache<org.apache.commons.lang3.tuple.Pair<Level,BlockPos>,Optional<RenderChunkRegion>>private static BitSetprivate static Map<ResourceLocation,ITextureAtlasSpriteLoader>private static Map<Class<? extends TooltipComponent>,Function<TooltipComponent,ClientTooltipComponent>>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidstatic ClientTooltipComponentgetClientTooltipComponent(TooltipComponent component)static NativeImagegetImageLayer(ResourceLocation resourceLocation, ResourceManager resourceManager)static Localereturns the Locale set by the player in Minecraft.static RenderChunkRegiongetRegionRenderCache(Level world, BlockPos pos)static Optional<RenderChunkRegion>getRegionRenderCacheOptional(Level world, BlockPos pos)static RenderTypestatic ITextureAtlasSpriteLoaderstatic voidonRebuildChunk(Level world, BlockPos position, RenderChunkRegion cache)static voidregisterImageLayerSupplier(ResourceLocation resourceLocation, Supplier<NativeImage> supplier)static voidRegister a custom ITextureAtlasSprite loader.static <T extends TooltipComponent>
 voidregisterTooltipComponentFactory(Class<T> cls, Function<? super T,? extends ClientTooltipComponent> factory)Register a factory for ClientTooltipComponents.static voidreleaseStencilBit(int bit)Release the stencil bit for other usestatic intReserve a stencil bit for use in rendering Note: you must check the Framebuffer you are working with to determine if stencil bits are enabled on it before use.
- 
Field Details- 
stencilBits
- 
regionCacheprivate static final com.google.common.cache.LoadingCache<org.apache.commons.lang3.tuple.Pair<Level,BlockPos>,Optional<RenderChunkRegion>> regionCache
- 
bufferedImageSuppliers
- 
textureAtlasSpriteLoaders
- 
tooltipComponentFactoriesprivate static final Map<Class<? extends TooltipComponent>,Function<TooltipComponent,ClientTooltipComponent>> tooltipComponentFactories
 
- 
- 
Constructor Details- 
MinecraftForgeClientpublic MinecraftForgeClient()
 
- 
- 
Method Details- 
getRenderLayer
- 
getLocalereturns the Locale set by the player in Minecraft. Useful for creating string and number formatters.
- 
reserveStencilBitpublic static int reserveStencilBit()Reserve a stencil bit for use in rendering Note: you must check the Framebuffer you are working with to determine if stencil bits are enabled on it before use.- Returns:
- A bit or -1 if no further stencil bits are available
 
- 
releaseStencilBitpublic static void releaseStencilBit(int bit)Release the stencil bit for other use- Parameters:
- bit- The bit from- reserveStencilBit()
 
- 
onRebuildChunk
- 
getRegionRenderCache
- 
getRegionRenderCacheOptional
- 
clearRenderCachepublic static void clearRenderCache()
- 
registerImageLayerSupplierpublic static void registerImageLayerSupplier(ResourceLocation resourceLocation, Supplier<NativeImage> supplier)
- 
getImageLayer@Nonnull public static NativeImage getImageLayer(ResourceLocation resourceLocation, ResourceManager resourceManager) throws IOException- Throws:
- IOException
 
- 
registerTextureAtlasSpriteLoaderpublic static void registerTextureAtlasSpriteLoader(ResourceLocation name, ITextureAtlasSpriteLoader loader)Register a custom ITextureAtlasSprite loader. Call this method duringFMLClientSetupEvent.
- 
getTextureAtlasSpriteLoader@Nullable public static ITextureAtlasSpriteLoader getTextureAtlasSpriteLoader(ResourceLocation name)
- 
registerTooltipComponentFactorypublic static <T extends TooltipComponent> void registerTooltipComponentFactory(Class<T> cls, Function<? super T,? extends ClientTooltipComponent> factory)Register a factory for ClientTooltipComponents.- Parameters:
- cls- the class for the component
- factory- the factory for the ClientTooltipComponent
 
- 
getClientTooltipComponent@Nullable public static ClientTooltipComponent getClientTooltipComponent(TooltipComponent component)
 
-