Search in sources :

Example 1 with RenderItemTubeModule

use of pneumaticCraft.client.render.itemblock.RenderItemTubeModule in project PneumaticCraft by MineMaarten.

the class ClientProxy method registerModuleRenderers.

public void registerModuleRenderers() {
    Collection<Item> moduleItems = ModuleRegistrator.moduleItems.values();
    Collection<Class<? extends TubeModule>> modules = ModuleRegistrator.modules.values();
    Iterator<Item> itemIterator = moduleItems.iterator();
    Iterator<Class<? extends TubeModule>> moduleIterator = modules.iterator();
    while (itemIterator.hasNext()) {
        try {
            MinecraftForgeClient.registerItemRenderer(itemIterator.next(), new RenderItemTubeModule(moduleIterator.next().newInstance()));
        } catch (Exception e) {
            Log.error("Something happened when registering tube module renderers!");
            e.printStackTrace();
        }
    }
}
Also used : Item(net.minecraft.item.Item) TubeModule(pneumaticCraft.common.block.tubes.TubeModule) RenderItemTubeModule(pneumaticCraft.client.render.itemblock.RenderItemTubeModule) RenderItemTubeModule(pneumaticCraft.client.render.itemblock.RenderItemTubeModule)

Aggregations

Item (net.minecraft.item.Item)1 RenderItemTubeModule (pneumaticCraft.client.render.itemblock.RenderItemTubeModule)1 TubeModule (pneumaticCraft.common.block.tubes.TubeModule)1