From ef6bb505b982622294f9b47995bb9795639be6a9 Mon Sep 17 00:00:00 2001 From: LexManos Date: Thu, 10 May 2012 01:25:56 -0700 Subject: [PATCH] Inventroy rendering --- .../cpw/mods/fml/client/FMLClientHandler.java | 15 +++++++++++++++ fml/client/net/minecraft/src/ModLoader.java | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/fml/client/cpw/mods/fml/client/FMLClientHandler.java b/fml/client/cpw/mods/fml/client/FMLClientHandler.java index 23c8ad6ee..4b6b32161 100644 --- a/fml/client/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/client/cpw/mods/fml/client/FMLClientHandler.java @@ -651,4 +651,19 @@ public class FMLClientHandler implements IFMLSidedHandler } return ((BaseMod)mod.getMod()).renderWorldBlock(renderer, world, x, y, z, block, modelID); } + + /** + * @param renderer + * @param block + * @param metadata + * @param modelID + */ + public void onRenderInvBlock(RenderBlocks renderer, Block block, int metadata, int modelID) + { + ModLoaderModContainer mod = blockModelIds.get(modelID); + if (mod != null) + { + ((BaseMod)mod.getMod()).renderInvBlock(renderer, block, metadata, modelID); + } + } } diff --git a/fml/client/net/minecraft/src/ModLoader.java b/fml/client/net/minecraft/src/ModLoader.java index 08b75915b..1deaecfd5 100644 --- a/fml/client/net/minecraft/src/ModLoader.java +++ b/fml/client/net/minecraft/src/ModLoader.java @@ -673,7 +673,7 @@ public class ModLoader public static void renderInvBlock(RenderBlocks renderer, Block block, int metadata, int modelID) { - //TODO + FMLClientHandler.instance().onRenderInvBlock(renderer, block, metadata, modelID); } public static boolean renderWorldBlock(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block, int modelID)