net.minecraftforge.client

## Class MinecraftForgeClient

- java.lang.Object
- - net.minecraftforge.client.MinecraftForgeClient

-     public class MinecraftForgeClient
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MinecraftForgeClient()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IItemRenderer` | `getItemRenderer(ItemStack item, IItemRenderer.ItemRenderType type)`
    `static int` | `getRenderPass()` Get the current render pass.
    `static void` | `preloadTexture(String texture)` Preload a texture.
    `static void` | `registerItemRenderer(int itemID, IItemRenderer renderer)` Register a custom renderer for a specific item.
    `static void` | `registerRenderContextHandler(String texture, int subid, IRenderContextHandler handler)` Register a new render context handler.
    `static void` | `renderBlock(RenderBlocks render, Block block, int x, int y, int z)` Render a block.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MinecraftForgeClient

          public MinecraftForgeClient()

  - ### Method Detail

    - #### registerRenderContextHandler

          public static void registerRenderContextHandler(String texture,
                                          int subid,
                                          IRenderContextHandler handler)

      Register a new render context handler. A render context is a block of rendering performed with similar OpenGL modes, for example, texture name.
      Parameters:
        `texture` - The name of the texture for this render context.
        `subid` - The subid of this render context. 0 is the default pass for normal rendering, higher subids render later. All subids of 0 will render before all subids of 1, etc.
        `handler` - The handler to register.

    - #### preloadTexture

          public static void preloadTexture(String texture)

      Preload a texture. Textures must be preloaded before the first use, or they will cause visual anomalies.

    - #### renderBlock

          public static void renderBlock(RenderBlocks render,
                         Block block,
                         int x,
                         int y,
                         int z)

      Render a block. Render a block which may have a custom texture.

    - #### getRenderPass

          public static int getRenderPass()

      Get the current render pass.

    - #### registerItemRenderer

          public static void registerItemRenderer(int itemID,
                                  IItemRenderer renderer)

      Register a custom renderer for a specific item. This can be used to render the item in-world as an EntityItem, when the item is equipped, or when the item is in an inventory slot.
      Parameters:
        `itemID` - The item ID (shifted index) to handle rendering.
        `renderer` - The IItemRenderer interface that handles rendering for this item.

    - #### getItemRenderer

          public static IItemRenderer getItemRenderer(ItemStack item,
                                      IItemRenderer.ItemRenderType type)