Java 类cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler 实例源码

项目:amunra    文件:ClientProxy.java   
@Override
public void init(FMLInitializationEvent event)
{
    ISimpleBlockRenderingHandler myISBRH = new BlockRendererMultiOre();
    RenderingRegistry.registerBlockHandler(myISBRH.getRenderId(), myISBRH);

    ISimpleBlockRenderingHandler dummyRenderer = new BlockRendererDummy();
    RenderingRegistry.registerBlockHandler(dummyRenderer.getRenderId(), dummyRenderer);

    ISimpleBlockRenderingHandler msBoosterRenderer = new BlockRendererMothershipBooster();
    RenderingRegistry.registerBlockHandler(msBoosterRenderer.getRenderId(), msBoosterRenderer);

    ISimpleBlockRenderingHandler chestRenderer = new BlockRendererARChest();
    RenderingRegistry.registerBlockHandler(chestRenderer.getRenderId(), chestRenderer);

    SystemRenderEventHandler clientEventHandler = new SystemRenderEventHandler();
    FMLCommonHandler.instance().bus().register(clientEventHandler);
    MinecraftForge.EVENT_BUS.register(clientEventHandler);

    FMLCommonHandler.instance().bus().register(new TickHandlerClient());
}
项目:JABBA    文件:ClientProxy.java   
public void checkRenderers()
{
    ISimpleBlockRenderingHandler renderer = (ISimpleBlockRenderingHandler)blockRenderers.get(Integer.valueOf(BetterBarrels.blockBarrelRendererID));
    if (!(renderer instanceof BlockBarrelRenderer)) {
        throw new RuntimeException(String.format("Wrong renderer found ! %s found while looking up the Jabba Barrel renderer.", new Object[] { renderer.getClass().getCanonicalName() }));
    }
}
项目:DaVincing    文件:BlockLoader.java   
@SideOnly(Side.CLIENT)
public void registerRendering(ISimpleBlockRenderingHandler blockRenderer, TileEntitySpecialRenderer tileRenderer) {
  if (blockRenderer != null) {
    renderID = RenderingRegistry.getNextAvailableRenderId();
    RenderingRegistry.registerBlockHandler(renderID, blockRenderer);
  }
  if (tileRenderer != null) {
    ClientRegistry.bindTileEntitySpecialRenderer(tileEntityClass, tileRenderer);
  }
}
项目:EBXS-AutumnWoods    文件:ClientProxy.java   
@Override
public int registerBlockHandler(ISimpleBlockRenderingHandler handler)
{
    final int renderId = RenderingRegistry.getNextAvailableRenderId();
    RenderingRegistry.registerBlockHandler(renderId, handler);
    return renderId;
}
项目:minepainter    文件:BlockLoader.java   
@SideOnly(Side.CLIENT)
public void registerRendering(ISimpleBlockRenderingHandler blockRenderer, TileEntitySpecialRenderer tileRenderer){
    if(blockRenderer != null){
        renderID = RenderingRegistry.getNextAvailableRenderId();
        RenderingRegistry.registerBlockHandler(renderID, blockRenderer);
    }
    if(tileRenderer != null){
        ClientRegistry.bindTileEntitySpecialRenderer(tileEntityClass, tileRenderer);
    }
}
项目:ExtraUtilities    文件:ExtraUtilsClient.java   
@Override
public void registerRenderInformation() {
    ExtraUtilsClient.colorBlockID = RenderingRegistry.getNextAvailableRenderId();
    ExtraUtilsClient.fullBrightBlockID = RenderingRegistry.getNextAvailableRenderId();
    ExtraUtilsClient.multiBlockID = RenderingRegistry.getNextAvailableRenderId();
    ExtraUtilsClient.spikeBlockID = RenderingRegistry.getNextAvailableRenderId();
    ExtraUtilsClient.drumRendererID = RenderingRegistry.getNextAvailableRenderId();
    ExtraUtilsClient.connectedTextureID = RenderingRegistry.getNextAvailableRenderId();
    ExtraUtilsClient.connectedTextureEtheralID = RenderingRegistry.getNextAvailableRenderId();
    RenderingRegistry.registerBlockHandler((ISimpleBlockRenderingHandler)new RenderBlockColor());
    RenderingRegistry.registerBlockHandler((ISimpleBlockRenderingHandler)new RenderBlockFullBright());
    RenderingRegistry.registerBlockHandler((ISimpleBlockRenderingHandler)new RenderBlockMultiBlock());
    RenderingRegistry.registerBlockHandler((ISimpleBlockRenderingHandler)ExtraUtilsClient.renderBlockSpike);
    for (final Item item : ItemBlockSpike.itemHashSet) {
        MinecraftForgeClient.registerItemRenderer(item, (IItemRenderer)ExtraUtilsClient.renderItemSpikeSword);
    }
    RenderingRegistry.registerBlockHandler((ISimpleBlockRenderingHandler)new RenderBlockDrum());
    RenderingRegistry.registerBlockHandler((ISimpleBlockRenderingHandler)new RenderBlockConnectedTextures());
    RenderingRegistry.registerBlockHandler((ISimpleBlockRenderingHandler)new RenderBlockConnectedTexturesEthereal());
    if (ExtraUtils.spikeGoldEnabled) {
        ClientRegistry.bindTileEntitySpecialRenderer((Class)TileEntityEnchantedSpike.class, (TileEntitySpecialRenderer)new RenderTileEntitySpike());
    }
    if (ExtraUtils.colorBlockDataEnabled) {
        for (final BlockColor b : ExtraUtils.colorblocks) {
            MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock((Block)b), (IItemRenderer)ExtraUtilsClient.renderItemBlockColor);
        }
    }
    if (ExtraUtils.unstableIngot != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.unstableIngot, (IItemRenderer)ExtraUtilsClient.renderItemUnstable);
    }
    if (ExtraUtils.erosionShovel != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.erosionShovel, (IItemRenderer)ExtraUtilsClient.renderItemMultiTransparency);
    }
    if (ExtraUtils.destructionPickaxe != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.destructionPickaxe, (IItemRenderer)ExtraUtilsClient.renderItemMultiTransparency);
    }
    if (ExtraUtils.buildersWand != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.buildersWand, (IItemRenderer)ExtraUtilsClient.renderItemMultiTransparency);
    }
    if (ExtraUtils.ethericSword != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.ethericSword, (IItemRenderer)ExtraUtilsClient.renderItemMultiTransparency);
    }
    if (ExtraUtils.healingAxe != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.healingAxe, (IItemRenderer)ExtraUtilsClient.renderItemMultiTransparency);
    }
    if (ExtraUtils.creativeBuildersWand != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.creativeBuildersWand, (IItemRenderer)ExtraUtilsClient.renderItemMultiTransparency);
    }
    if (ExtraUtils.precisionShears != null) {
        MinecraftForgeClient.registerItemRenderer((Item)ExtraUtils.precisionShears, (IItemRenderer)ExtraUtilsClient.renderItemMultiTransparency);
    }
    if (ExtraUtils.temporalHoe != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.temporalHoe, (IItemRenderer)ExtraUtilsClient.renderItemMultiTransparency);
    }
    if (ExtraUtils.drum != null) {
        MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ExtraUtils.drum), (IItemRenderer)ExtraUtilsClient.renderItemDrum);
    }
    if (ExtraUtils.microBlocks != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.microBlocks, (IItemRenderer)new RenderItemMicroblock());
    }
    if (ExtraUtils.lawSwordEnabled) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.lawSword, (IItemRenderer)new RenderItemLawSword());
    }
    if (ExtraUtils.glove != null) {
        MinecraftForgeClient.registerItemRenderer(ExtraUtils.glove, (IItemRenderer)RenderItemGlove.INSTANCE);
    }
}
项目:PopularMMOS-EpicProportions-Mod    文件:ClientProxy.java   
public void registerRenderInformation()
  {
epicproportionsmod_christmas.BulbModelID = RenderingRegistry.instance().getNextAvailableRenderId();
      RenderingRegistry.instance().registerBlockHandler(epicproportionsmod_christmas.BulbModelID , (ISimpleBlockRenderingHandler) new TileEntityBulbRender());
      }
项目:LambdaLib    文件:BlockRendererRegistration.java   
@Override
protected void register(ISimpleBlockRenderingHandler obj,
        RegBlockRenderer anno) throws Exception {
    RenderingRegistry.registerBlockHandler(obj);
}
项目:EBXS-AutumnWoods    文件:CommonProxy.java   
public int registerBlockHandler(ISimpleBlockRenderingHandler handler) {
    return 0;
}
项目:ConveyorBelts    文件:BlockBase.java   
@SideOnly(Side.CLIENT)
public void setRenderer(ISimpleBlockRenderingHandler handler) {
    renderId = handler.getRenderId();
}
项目:Gadomancy    文件:ClientProxy.java   
public int registerBlockRenderer(ISimpleBlockRenderingHandler renderer) {
    int nextId = RenderingRegistry.getNextAvailableRenderId();
    RenderingRegistry.registerBlockHandler(nextId, renderer);
    return nextId;
}
项目:AmadornesLib    文件:AmaUtils.java   
public static void registerRenderers(Object o, Class<? extends AmaTileEntity> te, Item item) {

    if (o instanceof AmaTESR) registerTESR((AmaTESR) o, te);
    if (o instanceof ISimpleBlockRenderingHandler) registerISBRH((ISimpleBlockRenderingHandler) o);
    if (o instanceof IItemRenderer) registerItemRenderer((IItemRenderer) o, item);
}
项目:Artifacts    文件:ClientProxy.java   
@Override
    public void registerRenders() {

        int r = RenderingRegistry.getNextAvailableRenderId();
        ISimpleBlockRenderingHandler handler = new RenderFakeBlock(r);
        RenderingRegistry.registerBlockHandler(handler);
        ((BlockIllusionary)BlockIllusionary.instance).renderType = r;
//      GameRegistry.registerTileEntity(TileEntitySpikes.class, "artifacts.spiketrap");

        r = RenderingRegistry.getNextAvailableRenderId();
        handler = new RenderArrowTrap(r);
        RenderingRegistry.registerBlockHandler(handler);
        ((BlockTrap)BlockTrap.instance).renderType = r;
//      GameRegistry.registerTileEntity(TileEntityTrap.class, "artifacts.arrowtrap");

//      r = RenderingRegistry.getNextAvailableRenderId();
//      handler = new RenderQuickSand(r);
//      RenderingRegistry.registerBlockHandler(handler);
//      ((BlockQuickSand)BlockQuickSand.instance).renderType = r;

        r = RenderingRegistry.getNextAvailableRenderId();
        handler = new RenderCoverPlate(r);
        RenderingRegistry.registerBlockHandler(handler);
        ((BlockCoverPlate)BlockCoverPlate.instance).renderType = r;
        RenderingRegistry.registerEntityRenderingHandler(EntityClayGolem.class, new RenderClayGolem());

        TileEntitySpecialRenderer render = new TESwordRenderer();
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySword.class, render);
        MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockSword.instance), new ItemRenderPedestal(render, new TileEntitySword()));

        render = new PedestalRenderer();
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayPedestal.class, render);
        MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockPedestal.instance), new ItemRenderPedestal(render, new TileEntityDisplayPedestal()));

        render = new SpikesRenderer();
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySpikes.class, render);
        MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockSpikes.instance), new ItemRenderPedestal(render, new TileEntitySpikes()));

        r = RenderingRegistry.getNextAvailableRenderId();
        handler = new RenderLaserBeam(r);
        RenderingRegistry.registerBlockHandler(handler);
        ((BlockLaserBeam)BlockLaserBeam.instance).renderID = r;

        r = RenderingRegistry.getNextAvailableRenderId();
        handler = new RenderLaserSource(r);
        RenderingRegistry.registerBlockHandler(handler);
        ((BlockLaserBeamSource)BlockLaserBeamSource.instance).renderID = r;

        if(Loader.isModLoaded("antiqueatlas")) {
//          AtlasAPI.getTileAPI().setTexture("wizardtower", new ResourceLocation("artifacts:textures/gui/tower.png"));
        }
    }
项目:AmadornesLib    文件:AmaUtils.java   
public static void registerISBRH(ISimpleBlockRenderingHandler isbrh) {

    RenderingRegistry.registerBlockHandler(isbrh);
}