本文整理匯總了Java中cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler類的典型用法代碼示例。如果您正苦於以下問題:Java ISimpleBlockRenderingHandler類的具體用法?Java ISimpleBlockRenderingHandler怎麽用?Java ISimpleBlockRenderingHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ISimpleBlockRenderingHandler類屬於cpw.mods.fml.client.registry包,在下文中一共展示了ISimpleBlockRenderingHandler類的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
@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());
}
示例2: checkRenderers
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
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() }));
}
}
示例3: registerRendering
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
@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);
}
}
示例4: registerBlockHandler
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
@Override
public int registerBlockHandler(ISimpleBlockRenderingHandler handler)
{
final int renderId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(renderId, handler);
return renderId;
}
示例5: registerRendering
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
@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);
}
}
示例6: registerRenderInformation
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
@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);
}
}
示例7: registerRenderInformation
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
public void registerRenderInformation()
{
epicproportionsmod_christmas.BulbModelID = RenderingRegistry.instance().getNextAvailableRenderId();
RenderingRegistry.instance().registerBlockHandler(epicproportionsmod_christmas.BulbModelID , (ISimpleBlockRenderingHandler) new TileEntityBulbRender());
}
示例8: register
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
@Override
protected void register(ISimpleBlockRenderingHandler obj,
RegBlockRenderer anno) throws Exception {
RenderingRegistry.registerBlockHandler(obj);
}
示例9: registerBlockHandler
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
public int registerBlockHandler(ISimpleBlockRenderingHandler handler) {
return 0;
}
示例10: setRenderer
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
@SideOnly(Side.CLIENT)
public void setRenderer(ISimpleBlockRenderingHandler handler) {
renderId = handler.getRenderId();
}
示例11: registerBlockRenderer
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
public int registerBlockRenderer(ISimpleBlockRenderingHandler renderer) {
int nextId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(nextId, renderer);
return nextId;
}
示例12: registerRenderers
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
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);
}
示例13: registerRenders
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
@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"));
}
}
示例14: registerISBRH
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; //導入依賴的package包/類
public static void registerISBRH(ISimpleBlockRenderingHandler isbrh) {
RenderingRegistry.registerBlockHandler(isbrh);
}