Java 类net.minecraft.client.model.ModelShulker 实例源码

项目:EndermanEvolution    文件:IronChests.java   
@SideOnly(Side.CLIENT)
public static void renderShulkerBox(ItemStack stack, float lidProgress) {
    ModelShulker shulkerBoxModel = new ModelShulker();
    GlStateManager.enableDepth();
    GlStateManager.depthFunc(515);
    GlStateManager.depthMask(true);
    GlStateManager.disableCull();
    String color = getShulkerColorName(stack);
    RenderUtils.bindTexture(new ResourceLocation("ironchest", "textures/model/shulker/" + color + "/shulker_" + color + "" + getShulkerBoxType(stack).modelTexture));
    GlStateManager.pushMatrix();
    GlStateManager.enableRescaleNormal();
    GlStateManager.translate(0 + 0.5F, 0 + 1.5F, 0 + 0.5F);
    GlStateManager.scale(1.0F, -1.0F, -1.0F);
    GlStateManager.translate(0.0F, 1.0F, 0.0F);
    GlStateManager.scale(0.9995F, 0.9995F, 0.9995F);
    GlStateManager.translate(0.0F, -1.0F, 0.0F);
    shulkerBoxModel.base.render(0.0625F);
    GlStateManager.translate(0.0F, -lidProgress * 0.5F, 0.0F);
    GlStateManager.rotate(270.0F * lidProgress, 0.0F, 1.0F, 0.0F);
    shulkerBoxModel.lid.render(0.0625F);
    GlStateManager.enableCull();
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
项目:Backmemed    文件:ModelAdapterShulkerBox.java   
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;
        }
    }
}
项目:Backmemed    文件:TileEntityRendererDispatcher.java   
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityEndGateway.class, new TileEntityEndGatewayRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());
    this.mapSpecialRenderers.put(TileEntityStructure.class, new TileEntityStructureRenderer());
    this.mapSpecialRenderers.put(TileEntityShulkerBox.class, new TileEntityShulkerBoxRenderer(new ModelShulker()));

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
项目:Backmemed    文件:ModelAdapterShulkerBox.java   
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelShulker))
    {
        return null;
    }
    else
    {
        ModelShulker modelshulker = (ModelShulker)model;
        return modelPart.equals("head") ? modelshulker.head : (modelPart.equals("base") ? modelshulker.base : (modelPart.equals("lid") ? modelshulker.lid : null));
    }
}
项目:Backmemed    文件:ModelAdapterShulker.java   
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelShulker))
    {
        return null;
    }
    else
    {
        ModelShulker modelshulker = (ModelShulker)model;
        return modelPart.equals("head") ? modelshulker.head : (modelPart.equals("base") ? modelshulker.base : (modelPart.equals("lid") ? modelshulker.lid : null));
    }
}
项目:CustomWorldGen    文件:RenderShulker.java   
public RenderShulker(RenderManager manager, ModelShulker p_i46550_2_)
{
    super(manager, p_i46550_2_, 0.0F);
    this.addLayer(new RenderShulker.HeadLayer());
    this.modelVersion = p_i46550_2_.getModelVersion();
    this.shadowSize = 0.0F;
}
项目:CustomWorldGen    文件:RenderShulker.java   
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityShulker entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (this.modelVersion != ((ModelShulker)this.mainModel).getModelVersion())
    {
        this.mainModel = new ModelShulker();
        this.modelVersion = ((ModelShulker)this.mainModel).getModelVersion();
    }

    int i = entity.getClientTeleportInterp();

    if (i > 0 && entity.isAttachedToBlock())
    {
        BlockPos blockpos = entity.getAttachmentPos();
        BlockPos blockpos1 = entity.getOldAttachPos();
        double d0 = (double)((float)i - partialTicks) / 6.0D;
        d0 = d0 * d0;
        double d1 = (double)(blockpos.getX() - blockpos1.getX()) * d0;
        double d2 = (double)(blockpos.getY() - blockpos1.getY()) * d0;
        double d3 = (double)(blockpos.getZ() - blockpos1.getZ()) * d0;
        super.doRender(entity, x - d1, y - d2, z - d3, entityYaw, partialTicks);
    }
    else
    {
        super.doRender(entity, x, y, z, entityYaw, partialTicks);
    }
}
项目:ExpandedRailsMod    文件:RenderShulker.java   
public RenderShulker(RenderManager manager, ModelShulker p_i46550_2_)
{
    super(manager, p_i46550_2_, 0.0F);
    this.addLayer(new RenderShulker.HeadLayer());
    this.modelVersion = p_i46550_2_.getModelVersion();
    this.shadowSize = 0.0F;
}
项目:ExpandedRailsMod    文件:RenderShulker.java   
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityShulker entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (this.modelVersion != ((ModelShulker)this.mainModel).getModelVersion())
    {
        this.mainModel = new ModelShulker();
        this.modelVersion = ((ModelShulker)this.mainModel).getModelVersion();
    }

    int i = entity.getClientTeleportInterp();

    if (i > 0 && entity.isAttachedToBlock())
    {
        BlockPos blockpos = entity.getAttachmentPos();
        BlockPos blockpos1 = entity.getOldAttachPos();
        double d0 = (double)((float)i - partialTicks) / 6.0D;
        d0 = d0 * d0;
        double d1 = (double)(blockpos.getX() - blockpos1.getX()) * d0;
        double d2 = (double)(blockpos.getY() - blockpos1.getY()) * d0;
        double d3 = (double)(blockpos.getZ() - blockpos1.getZ()) * d0;
        super.doRender(entity, x - d1, y - d2, z - d3, entityYaw, partialTicks);
    }
    else
    {
        super.doRender(entity, x, y, z, entityYaw, partialTicks);
    }
}
项目:Backmemed    文件:ModelAdapterShulkerBox.java   
public ModelBase makeModel()
{
    return new ModelShulker();
}
项目:Backmemed    文件:ModelAdapterShulker.java   
public ModelBase makeModel()
{
    return new ModelShulker();
}
项目:Backmemed    文件:RenderShulker.java   
public RenderShulker(RenderManager p_i47194_1_)
{
    super(p_i47194_1_, new ModelShulker(), 0.0F);
    this.addLayer(new RenderShulker.HeadLayer());
}
项目:Backmemed    文件:RenderShulker.java   
public ModelShulker getMainModel()
{
    return (ModelShulker)super.getMainModel();
}
项目:Backmemed    文件:TileEntityShulkerBoxRenderer.java   
public TileEntityShulkerBoxRenderer(ModelShulker p_i47216_1_)
{
    this.field_191285_a = p_i47216_1_;
}
项目:CustomWorldGen    文件:RenderManager.java   
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn)
{
    this.renderEngine = renderEngineIn;
    this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this));
    this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this));
    this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F));
    this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F));
    this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F));
    this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F));
    this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F));
    this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F));
    this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this));
    this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this));
    this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this));
    this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this));
    this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this));
    this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this));
    this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this));
    this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this));
    this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this));
    this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this));
    this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F));
    this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this));
    this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F));
    this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this));
    this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F));
    this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this));
    this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this));
    this.entityRenderMap.put(EntityBat.class, new RenderBat(this));
    this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this));
    this.entityRenderMap.put(EntityShulker.class, new RenderShulker(this, new ModelShulker()));
    this.entityRenderMap.put(EntityPolarBear.class, new RenderPolarBear(this, new ModelPolarBear(), 0.7F));
    this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this));
    this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this));
    this.entityRenderMap.put(EntityWither.class, new RenderWither(this));
    this.entityRenderMap.put(Entity.class, new RenderEntity(this));
    this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this));
    this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn));
    this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this));
    this.entityRenderMap.put(EntityTippedArrow.class, new RenderTippedArrow(this));
    this.entityRenderMap.put(EntitySpectralArrow.class, new RenderSpectralArrow(this));
    this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.SNOWBALL, itemRendererIn));
    this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ENDER_PEARL, itemRendererIn));
    this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ENDER_EYE, itemRendererIn));
    this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.EGG, itemRendererIn));
    this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn));
    this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.EXPERIENCE_BOTTLE, itemRendererIn));
    this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.FIREWORKS, itemRendererIn));
    this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F));
    this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F));
    this.entityRenderMap.put(EntityDragonFireball.class, new RenderDragonFireball(this));
    this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this));
    this.entityRenderMap.put(EntityShulkerBullet.class, new RenderShulkerBullet(this));
    this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn));
    this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this));
    this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this));
    this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this));
    this.entityRenderMap.put(EntityArmorStand.class, new RenderArmorStand(this));
    this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this));
    this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this));
    this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this));
    this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this));
    this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this));
    this.entityRenderMap.put(EntityAreaEffectCloud.class, new RenderAreaEffectCloud(this));
    this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F));
    this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this));
    this.playerRenderer = new RenderPlayer(this);
    this.skinMap.put("default", this.playerRenderer);
    this.skinMap.put("slim", new RenderPlayer(this, true));
    net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.entityRenderMap);
}
项目:CustomWorldGen    文件:RenderShulker.java   
public void doRenderLayer(EntityShulker entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    GlStateManager.pushMatrix();

    switch (entitylivingbaseIn.getAttachmentFacing())
    {
        case DOWN:
        default:
            break;
        case EAST:
            GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(1.0F, -1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
            break;
        case WEST:
            GlStateManager.rotate(-90.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(-1.0F, -1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
            break;
        case NORTH:
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -1.0F, -1.0F);
            break;
        case SOUTH:
            GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -1.0F, 1.0F);
            break;
        case UP:
            GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -2.0F, 0.0F);
    }

    ModelRenderer modelrenderer = ((ModelShulker)RenderShulker.this.getMainModel()).head;
    modelrenderer.rotateAngleY = netHeadYaw * 0.017453292F;
    modelrenderer.rotateAngleX = headPitch * 0.017453292F;
    RenderShulker.this.bindTexture(RenderShulker.SHULKER_ENDERGOLEM_TEXTURE);
    modelrenderer.render(scale);
    GlStateManager.popMatrix();
}
项目:ExpandedRailsMod    文件:RenderManager.java   
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn)
{
    this.renderEngine = renderEngineIn;
    this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this));
    this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this));
    this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F));
    this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F));
    this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F));
    this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F));
    this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F));
    this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F));
    this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F));
    this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this));
    this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this));
    this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this));
    this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this));
    this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this));
    this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this));
    this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this));
    this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this));
    this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this));
    this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this));
    this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F));
    this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this));
    this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F));
    this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this));
    this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F));
    this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this));
    this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this));
    this.entityRenderMap.put(EntityBat.class, new RenderBat(this));
    this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this));
    this.entityRenderMap.put(EntityShulker.class, new RenderShulker(this, new ModelShulker()));
    this.entityRenderMap.put(EntityPolarBear.class, new RenderPolarBear(this, new ModelPolarBear(), 0.7F));
    this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this));
    this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this));
    this.entityRenderMap.put(EntityWither.class, new RenderWither(this));
    this.entityRenderMap.put(Entity.class, new RenderEntity(this));
    this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this));
    this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn));
    this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this));
    this.entityRenderMap.put(EntityTippedArrow.class, new RenderTippedArrow(this));
    this.entityRenderMap.put(EntitySpectralArrow.class, new RenderSpectralArrow(this));
    this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.SNOWBALL, itemRendererIn));
    this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ENDER_PEARL, itemRendererIn));
    this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ENDER_EYE, itemRendererIn));
    this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.EGG, itemRendererIn));
    this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn));
    this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.EXPERIENCE_BOTTLE, itemRendererIn));
    this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.FIREWORKS, itemRendererIn));
    this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F));
    this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F));
    this.entityRenderMap.put(EntityDragonFireball.class, new RenderDragonFireball(this));
    this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this));
    this.entityRenderMap.put(EntityShulkerBullet.class, new RenderShulkerBullet(this));
    this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn));
    this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this));
    this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this));
    this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this));
    this.entityRenderMap.put(EntityArmorStand.class, new RenderArmorStand(this));
    this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this));
    this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this));
    this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this));
    this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this));
    this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this));
    this.entityRenderMap.put(EntityAreaEffectCloud.class, new RenderAreaEffectCloud(this));
    this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F));
    this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this));
    this.playerRenderer = new RenderPlayer(this);
    this.skinMap.put("default", this.playerRenderer);
    this.skinMap.put("slim", new RenderPlayer(this, true));
    net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.entityRenderMap);
}
项目:ExpandedRailsMod    文件:RenderShulker.java   
public void doRenderLayer(EntityShulker entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    GlStateManager.pushMatrix();

    switch (entitylivingbaseIn.getAttachmentFacing())
    {
        case DOWN:
        default:
            break;
        case EAST:
            GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(1.0F, -1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
            break;
        case WEST:
            GlStateManager.rotate(-90.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(-1.0F, -1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
            break;
        case NORTH:
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -1.0F, -1.0F);
            break;
        case SOUTH:
            GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -1.0F, 1.0F);
            break;
        case UP:
            GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -2.0F, 0.0F);
    }

    ModelRenderer modelrenderer = ((ModelShulker)RenderShulker.this.getMainModel()).head;
    modelrenderer.rotateAngleY = netHeadYaw * 0.017453292F;
    modelrenderer.rotateAngleX = headPitch * 0.017453292F;
    RenderShulker.this.bindTexture(RenderShulker.SHULKER_ENDERGOLEM_TEXTURE);
    modelrenderer.render(scale);
    GlStateManager.popMatrix();
}