mirror of
https://github.com/GTNewHorizons/GTNHLib.git
synced 2026-11-26 14:53:14 +00:00
Fix block crash in postInit (#301)
This commit is contained in:
1 parent
73616cadc3
commit
fd880e5b7e
1 file changed
+8
-6
@@ -95,13 +95,15 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
// Applied Item Render for Block Use ModelISBRH
|
||||
for (Object obj : Block.blockRegistry) {
|
||||
Block block = (Block) obj;
|
||||
if (block.getRenderType() == ModelISBRH.JSON_ISBRH_ID) {
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
if (item != null) {
|
||||
MinecraftForgeClient.registerItemRenderer(item, ModelISBRH.INSTANCE);
|
||||
try {
|
||||
Block block = (Block) obj;
|
||||
if (block.getRenderType() == ModelISBRH.JSON_ISBRH_ID) {
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
if (item != null) {
|
||||
MinecraftForgeClient.registerItemRenderer(item, ModelISBRH.INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ignored) {} // Some blocks may throw an Exception here, we can simply ignore it.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user