本文整理匯總了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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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);
}