本文整理匯總了Java中net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer類的典型用法代碼示例。如果您正苦於以下問題:Java TileEntitySpecialRenderer類的具體用法?Java TileEntitySpecialRenderer怎麽用?Java TileEntitySpecialRenderer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TileEntitySpecialRenderer類屬於net.minecraft.client.renderer.tileentity包,在下文中一共展示了TileEntitySpecialRenderer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
@Override
public void init(FMLInitializationEvent e) {
super.init(e);
Register.registerGlobalEntityID(EntityLaser.class, "laser");
Register.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser());
Register.registerItemRenderer(RorysMod.items.rifle1, new RenderRifle());
Register.registerItemRenderer(RorysMod.items.rifle2, new RenderRifle());
Register.registerItemRenderer(RorysMod.items.rifle3, new RenderRifle());
Register.registerItemRenderer(RorysMod.items.rifle4, new RenderRifle());
Register.registerItemRenderer(RorysMod.items.rifle5, new RenderRifle());
TileEntitySpecialRenderer render = new RenderRifleTable();
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRifleTable.class, render);
Register.registerItemRenderer(Item.getItemFromBlock(RorysMod.blocks.upgradeTable), new ItemRender(render, new TileEntityRifleTable()));
render = new RenderPoweredChest();
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPoweredChest.class, render);
FMLInterModComms.sendMessage("Waila", "register", WailaConfig.class.getName() + ".callbackRegister");
}
示例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(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;
}
}
}
示例3: renderChest
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
public void renderChest(EntityBoatChest entity, float partialTicks) {
TileEntitySpecialRenderer<TileEntityChest> renderer = TileEntityRendererDispatcher.instance.getSpecialRenderer(DUMMY_CHEST);
if(renderer != null) {
GlStateManager.pushMatrix();
GlStateManager.translate(-0.5, 0.125, -0.5);
GlStateManager.rotate(180, 1, 0, 0);
GlStateManager.rotate(90, 0, 1, 0);
DUMMY_CHEST.numPlayersUsing = entity.getPlayersUsing();
DUMMY_CHEST.lidAngle = entity.getLidAngle();
DUMMY_CHEST.prevLidAngle = entity.getPrevLidAngle();
DUMMY_CHEST.setWorld(Boatifull.proxy.getClientWorld());
renderer.renderTileEntityAt(DUMMY_CHEST, 0, 0, 0, partialTicks, -1);
GlStateManager.popMatrix();
}
}
示例4: renderEntity
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
@SideOnly(Side.CLIENT)
public void renderEntity(IGuiLexiconEntry gui, TileEntity entity, int x, int y, int scale, float rotation) {
entity.setWorldObj(Minecraft.getMinecraft() != null ? Minecraft.getMinecraft().theWorld : null);
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
GL11.glPushMatrix();
GL11.glTranslatef(x, y, 75.0F);
GL11.glScalef(-scale, scale, scale);
GL11.glRotatef(180F, 0.0F, 0.25F, 1.0F);
GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F);
RenderHelper.enableStandardItemLighting();
GL11.glTranslatef(0.0F, 0, 0.0F);
RenderManager.instance.playerViewY = 180.0F;
TileEntitySpecialRenderer render = TileEntityRendererDispatcher.instance.getSpecialRenderer(te);
if(render != null)
render.renderTileEntityAt(entity, 0, 0, 0, 1);
GL11.glPopMatrix();
RenderHelper.disableStandardItemLighting();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
GL11.glDisable(GL11.GL_TEXTURE_2D);
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
if(relativeMouseX >= x - width * scale / 2 - 10 && relativeMouseY >= y - height * scale - 20 && relativeMouseX <= x + width * scale / 2 + 10 && relativeMouseY <= y + 20)
tooltipEntity = true;
}
示例5: registerRenderers
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
public void registerRenderers(){
TileEntitySpecialRenderer render = new RenderElectricEngine();
TileEntitySpecialRenderer render2 = new RenderOilEngine();
TileEntitySpecialRenderer render3 = new RenderOilPump();
TileEntitySpecialRenderer render4 = new RenderLiquidTank();
TileEntitySpecialRenderer render5 = new RenderFluidPipe();
TileEntitySpecialRenderer render6 = new RenderElectricPipe();
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectricEngine.class, render);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOilEngine.class, render2);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOilPump.class, render3);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidPipe.class, render5);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLiquidTank.class, render4);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectricPipe.class, render6);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(TectoCraft.electricEngine), new ItemRendererElectricEngine(render, new TileEntityElectricEngine()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(TectoCraft.oilEngine), new ItemRendererOilEngine(render2, new TileEntityOilEngine()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(TectoCraft.oilPump), new ItemRendererOilPump(render3, new TileEntityOilPump()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(TectoCraft.liquidTank), new ItemRendererLiquidTank(render4, new TileEntityLiquidTank()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(TectoCraft.fluidPipe), new ItemRendererFluidPipe(render5, new TileEntityFluidPipe()));
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(TectoCraft.electricPipe), new ItemRendererElectricPipe(render6, new TileEntityElectricPipe()));
MinecraftForgeClient.registerItemRenderer(TectoCraft.minigun, new ItemRenderMinigun());
MinecraftForgeClient.registerItemRenderer(TectoCraft.iphone6, new ItemRenderIphone6());
MinecraftForgeClient.registerItemRenderer(TectoCraft.nethersBane, new ItemRenderNethersBane());
MinecraftForgeClient.registerItemRenderer(TectoCraft.tectonicMultitool, new ItemRenderTectoMultitool());
}
示例6: initMod
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
public static void initMod()
{
MinecraftForgeClient.registerItemRenderer(ModItems.bioCrystal, new ItemRendererBioCrystal());
MinecraftForgeClient.registerItemRenderer(ModItems.infusedHoe, new ItemRendererInfusedHoe());
MinecraftForgeClient.registerItemRenderer(ModItems.infusedHoeOne, new ItemRendererInfusedHoe());
TileEntitySpecialRenderer render = new BlockRendererBioGenerator();
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.bioGen), new ItemRendererBioGenerator(render, new TileEntityBioGenerator()));
TileEntitySpecialRenderer render1 = new BlockRendererBioInfuser();
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.bioInfuser), new ItemRendererBioInfuser(render1, new TileEntityBioInfuser()));
TileEntitySpecialRenderer render2 = new BlockRendererBioExtractor();
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.bioExtractor), new ItemRendererBioExtractor(render2, new TileEntityBioExtractor()));
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBioGenerator.class, new BlockRendererBioGenerator());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBioInfuser.class, new BlockRendererBioInfuser());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBioExtractor.class, new BlockRendererBioExtractor());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBioPipe.class, new TileEntityRendererPipe());
}
示例7: registerRenderThings
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
public void registerRenderThings() {
RenderingRegistry.registerEntityRenderingHandler(EntityZertum.class, new RenderZertum(new ModelZertum(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityRedZertum.class, new RenderRedZertum(new ModelRedZertum(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityDarkZertum.class, new RenderDarkZertum(new ModelDarkZertum(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityDestroZertum.class, new RenderDestroZertum(new ModelDestroZertum(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityJakan.class, new RenderJakan(new ModelJakan(), 1.0F));
RenderingRegistry.registerEntityRenderingHandler(EntityIceZertum.class, new RenderIceZertum(new ModelIceZertum(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityForisZertum.class, new RenderForisZertum(new ModelForisZertum(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityKurr.class, new RenderKurr(new ModelKurr(), 1.0F));
RenderingRegistry.registerEntityRenderingHandler(EntityKortor.class, new RenderKortor(new ModelKortor(), 1.0F));
RenderingRegistry.registerEntityRenderingHandler(EntityFlamingPoisonball.class, new RenderFPoisonball(1));
RenderingRegistry.registerEntityRenderingHandler(EntityIceball.class, new RenderIceball(Items.snowball, 1));
RenderingRegistry.registerEntityRenderingHandler(EntityFireball.class, new RenderFireball(Items.fire_charge, 1));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderGrenade(ModItems.nileGrenade));
TileEntitySpecialRenderer render = new RendererNileTable();
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNileTable.class, render);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.nileWorktable), new ItemRendererNileTable(render, new TileEntityNileTable()));
}
示例8: 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;
}
}
}
示例9: 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;
}
}
}
示例10: 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;
}
}
}
示例11: renderTileItem
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
public static void renderTileItem(Item item, int metadata)
{
Class<? extends TileEntity> tileClass = tileItemMap.get(Pair.of(item, metadata));
if (tileClass != null)
{
TileEntitySpecialRenderer<?> r = TileEntityRendererDispatcher.instance.getSpecialRendererByClass(tileClass);
if (r != null)
{
r.renderTileEntityAt(null, 0, 0, 0, 0, -1);
}
}
}
示例12: init
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
public static void init(Class<?> clazz) {
AlchemyModLoader.checkState();
Listener listener = clazz.getAnnotation(Listener.class);
if (listener != null)
for (Listener.Type type : listener.value())
type.getEventBus().register(clazz);
if (Always.isClient()) {
Texture texture = clazz.getAnnotation(Texture.class);
if (texture != null)
if (texture.value() != null)
for (String res : texture.value())
texture_set.add(res);
else
AlchemyRuntimeException.onException(new NullPointerException(clazz + " -> @Texture.value()"));
Render render = clazz.getAnnotation(Render.class);
if (render != null)
if (render.value() != null) {
if (Tool.isSubclass(TileEntity.class, render.value()) && Tool.isSubclass(TileEntitySpecialRenderer.class, clazz))
try {
ClientRegistry.bindTileEntitySpecialRenderer(render.value(), (TileEntitySpecialRenderer) clazz.newInstance());
} catch (Exception e) { AlchemyRuntimeException.onException(e); }
else
AlchemyRuntimeException.onException(new RuntimeException(
"Can't bind Render: " + render.value().getName() + " -> " + clazz.getName()));
} else
AlchemyRuntimeException.onException(new NullPointerException(clazz + " -> @Render.value()"));
}
}
示例13: registerRenderThings
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
@Override
public void registerRenderThings(){
//オーバーレイブロックレンダ―
RenderingRegistry.registerBlockHandler(new OverlayBlockRender());
//粘土るつぼレンダ―
TileEntitySpecialRenderer clayCrucibleSpecialRender = new ClayCrucibleSpecialRender();
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityClayCrucible.class,clayCrucibleSpecialRender);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AntiMatterModRegistry.clayCrucible), new ItemRenderClayCrucibles(clayCrucibleSpecialRender,new TileEntityClayCrucible()));
ClientRegistry.bindTileEntitySpecialRenderer(TileMultiController.class, new MultiControllerTileRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileBasicTank.class, new RenderTileTank());
RenderingRegistry.registerBlockHandler(new renderMarker());
//土かまどレンダー
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySatStove.class,new SatStoveSpecialRender());
//レンチ関係
MinecraftForge.EVENT_BUS.register(new RenderWrenchSelectionBox());
ClientRegistry.registerKeyBinding(wrenchSetting);
MinecraftForge.EVENT_BUS.register(new WrenchKeyEvent());
FMLCommonHandler.instance().bus().register(new WrenchKeyEvent());
RenderingRegistry.registerEntityRenderingHandler(EntityDeveloperBoss.class, new RenderDeveloperBoss());
//MinecraftForgeClient.registerItemRenderer(AntiMatterModRegistry.hammer_01, new ToolDamageRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileMarker.class, new RenderMarker());
}
示例14: registerRenderInfo
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
@Override
public void registerRenderInfo()
{
BlockBabyChest.pRenderID = RenderingRegistry.getNextAvailableRenderId();
TileEntitySpecialRenderer render = new RenderBabyChest();
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MainRegistry._mBlockBabyChest), new RenderItemBabyChest());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBabyChest.class, render);
MinecraftForge.EVENT_BUS.register(CONFIG_HANDLER);
}
示例15: TileEntityRegistration
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; //導入依賴的package包/類
public TileEntityRegistration() {
super(RegTileEntity.class, "TileEntity");
this.setLoadStage(LoadStage.INIT);
if(SideHelper.isClient()) {
this.addWork(HasRender.class, new PostWork<HasRender, Class<? extends TileEntity>>() {
@Override
@SideOnly(Side.CLIENT)
public void invoke(HasRender anno, Class<? extends TileEntity> obj) throws Exception {
ClientRegistry.bindTileEntitySpecialRenderer(obj,
(TileEntitySpecialRenderer) helper.getFieldFromClass(obj, RegTileEntity.Render.class));
}
});
}
}