Package net.minecraftforge.client
Class MinecraftForgeClient
java.lang.Object
net.minecraftforge.client.MinecraftForgeClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static HashMap<ResourceLocation,Supplier<NativeImage>> private static floatprivate static BitSetprivate static final Map<ResourceLocation,ITextureAtlasSpriteLoader> private static final Map<Class<? extends TooltipComponent>,Function<TooltipComponent, ClientTooltipComponent>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientTooltipComponentgetClientTooltipComponent(TooltipComponent component) static NativeImagegetImageLayer(ResourceLocation resourceLocation, ResourceManager resourceManager) static Localereturns the Locale set by the player in Minecraft.static floatstatic RenderTypestatic ITextureAtlasSpriteLoaderstatic 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.static voidsetPartialTick(float partialTick)
-
Field Details
-
partialTick
private static float partialTick -
stencilBits
-
bufferedImageSuppliers
-
textureAtlasSpriteLoaders
-
tooltipComponentFactories
private static final Map<Class<? extends TooltipComponent>,Function<TooltipComponent, tooltipComponentFactoriesClientTooltipComponent>>
-
-
Constructor Details
-
MinecraftForgeClient
public MinecraftForgeClient()
-
-
Method Details
-
getRenderType
-
getPartialTick
public static float getPartialTick() -
setPartialTick
public static void setPartialTick(float partialTick) -
getLocale
returns the Locale set by the player in Minecraft. Useful for creating string and number formatters. -
reserveStencilBit
public 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
-
releaseStencilBit
public static void releaseStencilBit(int bit) Release the stencil bit for other use- Parameters:
bit- The bit fromreserveStencilBit()
-
registerImageLayerSupplier
public static void registerImageLayerSupplier(ResourceLocation resourceLocation, Supplier<NativeImage> supplier) -
getImageLayer
@Nonnull public static NativeImage getImageLayer(ResourceLocation resourceLocation, ResourceManager resourceManager) throws IOException - Throws:
IOException
-
registerTextureAtlasSpriteLoader
public static void registerTextureAtlasSpriteLoader(ResourceLocation name, ITextureAtlasSpriteLoader loader) Register a custom ITextureAtlasSprite loader. Call this method duringFMLClientSetupEvent. -
getTextureAtlasSpriteLoader
@Nullable public static ITextureAtlasSpriteLoader getTextureAtlasSpriteLoader(ResourceLocation name) -
registerTooltipComponentFactory
public 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 componentfactory- the factory for the ClientTooltipComponent
-
getClientTooltipComponent
@Nullable public static ClientTooltipComponent getClientTooltipComponent(TooltipComponent component)
-