Package net.minecraftforge.client
Class MinecraftForgeClient
- java.lang.Object
-
- net.minecraftforge.client.MinecraftForgeClient
-
public class MinecraftForgeClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.HashMap<ResourceLocation,java.util.function.Supplier<NativeImage>>
bufferedImageSuppliers
private static com.google.common.cache.LoadingCache<org.apache.commons.lang3.tuple.Pair<World,BlockPos>,java.util.Optional<ChunkRenderCache>>
regionCache
private static java.util.BitSet
stencilBits
private static java.util.Map<ResourceLocation,ITextureAtlasSpriteLoader>
textureAtlasSpriteLoaders
-
Constructor Summary
Constructors Constructor Description MinecraftForgeClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
clearRenderCache()
static NativeImage
getImageLayer(ResourceLocation resourceLocation, IResourceManager resourceManager)
static java.util.Locale
getLocale()
returns the Locale set by the player in Minecraft.static ChunkRenderCache
getRegionRenderCache(World world, BlockPos pos)
static java.util.Optional<ChunkRenderCache>
getRegionRenderCacheOptional(World world, BlockPos pos)
static RenderType
getRenderLayer()
static ITextureAtlasSpriteLoader
getTextureAtlasSpriteLoader(ResourceLocation name)
static void
onRebuildChunk(World world, BlockPos position, ChunkRenderCache cache)
static void
registerImageLayerSupplier(ResourceLocation resourceLocation, java.util.function.Supplier<NativeImage> supplier)
static void
registerTextureAtlasSpriteLoader(ResourceLocation name, ITextureAtlasSpriteLoader loader)
Register a custom ITextureAtlasSprite loader.static void
releaseStencilBit(int bit)
Release the stencil bit for other usestatic 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.
-
-
-
Field Detail
-
stencilBits
private static java.util.BitSet stencilBits
-
regionCache
private static final com.google.common.cache.LoadingCache<org.apache.commons.lang3.tuple.Pair<World,BlockPos>,java.util.Optional<ChunkRenderCache>> regionCache
-
bufferedImageSuppliers
private static java.util.HashMap<ResourceLocation,java.util.function.Supplier<NativeImage>> bufferedImageSuppliers
-
textureAtlasSpriteLoaders
private static final java.util.Map<ResourceLocation,ITextureAtlasSpriteLoader> textureAtlasSpriteLoaders
-
-
Method Detail
-
getRenderLayer
public static RenderType getRenderLayer()
-
getLocale
public static java.util.Locale 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()
-
onRebuildChunk
public static void onRebuildChunk(World world, BlockPos position, ChunkRenderCache cache)
-
getRegionRenderCache
@Nullable public static ChunkRenderCache getRegionRenderCache(World world, BlockPos pos)
-
getRegionRenderCacheOptional
public static java.util.Optional<ChunkRenderCache> getRegionRenderCacheOptional(World world, BlockPos pos)
-
clearRenderCache
public static void clearRenderCache()
-
registerImageLayerSupplier
public static void registerImageLayerSupplier(ResourceLocation resourceLocation, java.util.function.Supplier<NativeImage> supplier)
-
getImageLayer
@Nonnull public static NativeImage getImageLayer(ResourceLocation resourceLocation, IResourceManager resourceManager) throws java.io.IOException
- Throws:
java.io.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)
-
-