當前位置: 首頁>>代碼示例>>Java>>正文


Java TileEntitySpecialRenderer.setRendererDispatcher方法代碼示例

本文整理匯總了Java中net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer.setRendererDispatcher方法的典型用法代碼示例。如果您正苦於以下問題:Java TileEntitySpecialRenderer.setRendererDispatcher方法的具體用法?Java TileEntitySpecialRenderer.setRendererDispatcher怎麽用?Java TileEntitySpecialRenderer.setRendererDispatcher使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer的用法示例。


在下文中一共展示了TileEntitySpecialRenderer.setRendererDispatcher方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: makeEntityRender

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入方法依賴的package包/類
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    TileEntityRendererDispatcher tileentityrendererdispatcher = TileEntityRendererDispatcher.instance;
    TileEntitySpecialRenderer tileentityspecialrenderer = tileentityrendererdispatcher.getSpecialRendererByClass(TileEntityShulkerBox.class);

    if (!(tileentityspecialrenderer instanceof TileEntityShulkerBoxRenderer))
    {
        return null;
    }
    else
    {
        if (tileentityspecialrenderer.getEntityClass() == null)
        {
            tileentityspecialrenderer = new TileEntityShulkerBoxRenderer((ModelShulker)modelBase);
            tileentityspecialrenderer.setRendererDispatcher(tileentityrendererdispatcher);
        }

        if (!Reflector.TileEntityShulkerBoxRenderer_model.exists())
        {
            Config.warn("Field not found: TileEntityShulkerBoxRenderer.model");
            return null;
        }
        else
        {
            Reflector.setFieldValue(tileentityspecialrenderer, Reflector.TileEntityShulkerBoxRenderer_model, modelBase);
            return tileentityspecialrenderer;
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:30,代碼來源:ModelAdapterShulkerBox.java

示例2: makeEntityRender

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入方法依賴的package包/類
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    TileEntityRendererDispatcher tileentityrendererdispatcher = TileEntityRendererDispatcher.instance;
    TileEntitySpecialRenderer tileentityspecialrenderer = tileentityrendererdispatcher.getSpecialRendererByClass(TileEntityBanner.class);

    if (!(tileentityspecialrenderer instanceof TileEntityBannerRenderer))
    {
        return null;
    }
    else
    {
        if (tileentityspecialrenderer.getEntityClass() == null)
        {
            tileentityspecialrenderer = new TileEntityBannerRenderer();
            tileentityspecialrenderer.setRendererDispatcher(tileentityrendererdispatcher);
        }

        if (!Reflector.TileEntityBannerRenderer_bannerModel.exists())
        {
            Config.warn("Field not found: TileEntityBannerRenderer.bannerModel");
            return null;
        }
        else
        {
            Reflector.setFieldValue(tileentityspecialrenderer, Reflector.TileEntityBannerRenderer_bannerModel, modelBase);
            return tileentityspecialrenderer;
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:30,代碼來源:ModelAdapterBanner.java

示例3: makeEntityRender

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入方法依賴的package包/類
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    TileEntityRendererDispatcher tileentityrendererdispatcher = TileEntityRendererDispatcher.instance;
    TileEntitySpecialRenderer tileentityspecialrenderer = tileentityrendererdispatcher.getSpecialRendererByClass(TileEntityEnderChest.class);

    if (!(tileentityspecialrenderer instanceof TileEntityEnderChestRenderer))
    {
        return null;
    }
    else
    {
        if (tileentityspecialrenderer.getEntityClass() == null)
        {
            tileentityspecialrenderer = new TileEntityEnderChestRenderer();
            tileentityspecialrenderer.setRendererDispatcher(tileentityrendererdispatcher);
        }

        if (!Reflector.TileEntityEnderChestRenderer_modelChest.exists())
        {
            Config.warn("Field not found: TileEntityEnderChestRenderer.modelChest");
            return null;
        }
        else
        {
            Reflector.setFieldValue(tileentityspecialrenderer, Reflector.TileEntityEnderChestRenderer_modelChest, modelBase);
            return tileentityspecialrenderer;
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:30,代碼來源:ModelAdapterEnderChest.java

示例4: makeEntityRender

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入方法依賴的package包/類
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    TileEntityRendererDispatcher tileentityrendererdispatcher = TileEntityRendererDispatcher.instance;
    TileEntitySpecialRenderer tileentityspecialrenderer = tileentityrendererdispatcher.getSpecialRendererByClass(TileEntityEnchantmentTable.class);

    if (!(tileentityspecialrenderer instanceof TileEntityEnchantmentTableRenderer))
    {
        return null;
    }
    else
    {
        if (tileentityspecialrenderer.getEntityClass() == null)
        {
            tileentityspecialrenderer = new TileEntityEnchantmentTableRenderer();
            tileentityspecialrenderer.setRendererDispatcher(tileentityrendererdispatcher);
        }

        if (!Reflector.TileEntityEnchantmentTableRenderer_modelBook.exists())
        {
            Config.warn("Field not found: TileEntityEnchantmentTableRenderer.modelBook");
            return null;
        }
        else
        {
            Reflector.setFieldValue(tileentityspecialrenderer, Reflector.TileEntityEnchantmentTableRenderer_modelBook, modelBase);
            return tileentityspecialrenderer;
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:30,代碼來源:ModelAdapterBook.java

示例5: bindTileEntitySpecialRenderer

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入方法依賴的package包/類
public static <T extends TileEntity> void bindTileEntitySpecialRenderer(Class<T> tileEntityClass, TileEntitySpecialRenderer<? super T> specialRenderer)
{
    TileEntityRendererDispatcher.instance.mapSpecialRenderers.put(tileEntityClass, specialRenderer);
    specialRenderer.setRendererDispatcher(TileEntityRendererDispatcher.instance);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:6,代碼來源:ClientRegistry.java


注:本文中的net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer.setRendererDispatcher方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。