mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 06:24:43 +00:00
Added ChickenBones's request ITextureLoadHandler hook
This commit is contained in:
1 parent
4e575f353f
commit
421f31cce5
4 files changed
+53
-2
No files matched your search
@@ -44,6 +44,15 @@ public class ForgeHooksClient
|
||||
|
||||
public static LinkedList<IHighlightHandler> highlightHandlers = new LinkedList<IHighlightHandler>();
|
||||
public static LinkedList<IRenderWorldLastHandler> renderWorldLastHandlers = new LinkedList<IRenderWorldLastHandler>();
|
||||
|
||||
public static void onTextureLoad(String textureName, int textureID)
|
||||
{
|
||||
for (ITextureLoadHandler handler: textureLoadHandlers)
|
||||
{
|
||||
handler.onTextureLoad(textureName, textureID);
|
||||
}
|
||||
}
|
||||
public static LinkedList<ITextureLoadHandler> textureLoadHandlers = new LinkedList<ITextureLoadHandler>();
|
||||
|
||||
public static boolean canRenderInPass(Block block, int pass)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
public interface ITextureLoadHandler
|
||||
{
|
||||
public void onTextureLoad(String textureName, int textureID);
|
||||
}
|
||||
@@ -36,6 +36,24 @@ public class MinecraftForgeClient
|
||||
{
|
||||
ForgeHooksClient.registerRenderContextHandler(texture, subid, handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a Texture Load Handler
|
||||
* @param handler The handler
|
||||
*/
|
||||
public static void registerTextureLoadHandler(ITextureLoadHandler handler)
|
||||
{
|
||||
ForgeHooksClient.textureLoadHandlers.add(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a Render Last Handler
|
||||
* @param handler The handler
|
||||
*/
|
||||
public static void registerRenderLastHandler(IRenderWorldLastHandler handler)
|
||||
{
|
||||
ForgeHooksClient.renderWorldLastHandlers.add(handler);
|
||||
}
|
||||
|
||||
/** Bind a texture. This is used to bind a texture file when
|
||||
* performing your own rendering, rather than using ITextureProvider.
|
||||
|
||||
Reference in new issue
Block a user