Java Code Examples for net.minecraft.client.model.ModelBase

The following are top voted examples for showing how to use net.minecraft.client.model.ModelBase. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: Backmemed   File: ModelAdapterMinecartTnt.java   View source code 6 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderTntMinecart rendertntminecart = new RenderTntMinecart(rendermanager);

    if (!Reflector.RenderMinecart_modelMinecart.exists())
    {
        Config.warn("Field not found: RenderMinecart.modelMinecart");
        return null;
    }
    else
    {
        Reflector.setFieldValue(rendertntminecart, Reflector.RenderMinecart_modelMinecart, modelBase);
        rendertntminecart.shadowSize = shadowSize;
        return rendertntminecart;
    }
}
 
Example 2
Project: Backmemed   File: PlayerItemParser.java   View source code 6 votes vote down vote up
public static PlayerItemRenderer parseItemRenderer(JsonObject p_parseItemRenderer_0_, Dimension p_parseItemRenderer_1_)
{
    String s = Json.getString(p_parseItemRenderer_0_, "type");

    if (!Config.equals(s, "ModelBox"))
    {
        Config.warn("Unknown model type: " + s);
        return null;
    }
    else
    {
        String s1 = Json.getString(p_parseItemRenderer_0_, "attachTo");
        int i = parseAttachModel(s1);
        ModelBase modelbase = new ModelPlayerItem();
        modelbase.textureWidth = p_parseItemRenderer_1_.width;
        modelbase.textureHeight = p_parseItemRenderer_1_.height;
        ModelRenderer modelrenderer = parseModelRenderer(p_parseItemRenderer_0_, modelbase, (int[])null, (String)null);
        PlayerItemRenderer playeritemrenderer = new PlayerItemRenderer(i, modelrenderer);
        return playeritemrenderer;
    }
}
 
Example 3
Project: Backmemed   File: ModelAdapterOcelot.java   View source code 6 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelOcelot))
    {
        return null;
    }
    else
    {
        ModelOcelot modelocelot = (ModelOcelot)model;
        Map<String, Integer> map = getMapPartFields();

        if (map.containsKey(modelPart))
        {
            int i = ((Integer)map.get(modelPart)).intValue();
            return (ModelRenderer)Reflector.getFieldValue(modelocelot, Reflector.ModelOcelot_ModelRenderers, i);
        }
        else
        {
            return null;
        }
    }
}
 
Example 4
Project: Backmemed   File: ModelAdapterShulkerBullet.java   View source code 6 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderShulkerBullet rendershulkerbullet = new RenderShulkerBullet(rendermanager);

    if (!Reflector.RenderShulkerBullet_model.exists())
    {
        Config.warn("Field not found: RenderShulkerBullet.model");
        return null;
    }
    else
    {
        Reflector.setFieldValue(rendershulkerbullet, Reflector.RenderShulkerBullet_model, modelBase);
        rendershulkerbullet.shadowSize = shadowSize;
        return rendershulkerbullet;
    }
}
 
Example 5
Project: Backmemed   File: ModelAdapterShulkerBox.java   View source code 6 votes vote down vote up
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;
        }
    }
}
 
Example 6
Project: Backmemed   File: ModelAdapterEvokerFangs.java   View source code 6 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderEvokerFangs renderevokerfangs = new RenderEvokerFangs(rendermanager);

    if (!Reflector.RenderEvokerFangs_model.exists())
    {
        Config.warn("Field not found: RenderEvokerFangs.model");
        return null;
    }
    else
    {
        Reflector.setFieldValue(renderevokerfangs, Reflector.RenderEvokerFangs_model, modelBase);
        renderevokerfangs.shadowSize = shadowSize;
        return renderevokerfangs;
    }
}
 
Example 7
Project: Backmemed   File: ModelAdapterHorse.java   View source code 6 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelHorse))
    {
        return null;
    }
    else
    {
        ModelHorse modelhorse = (ModelHorse)model;
        Map<String, Integer> map = getMapPartFields();

        if (map.containsKey(modelPart))
        {
            int i = ((Integer)map.get(modelPart)).intValue();
            return (ModelRenderer)Reflector.getFieldValue(modelhorse, Reflector.ModelHorse_ModelRenderers, i);
        }
        else
        {
            return null;
        }
    }
}
 
Example 8
Project: Backmemed   File: ModelAdapterVex.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderVex rendervex = new RenderVex(rendermanager);
    rendervex.mainModel = modelBase;
    rendervex.shadowSize = shadowSize;
    return rendervex;
}
 
Example 9
Project: Backmemed   File: ModelAdapterSnowman.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderSnowMan rendersnowman = new RenderSnowMan(rendermanager);
    rendersnowman.mainModel = modelBase;
    rendersnowman.shadowSize = shadowSize;
    return rendersnowman;
}
 
Example 10
Project: harshencastle   File: BaseHarshenBiped.java   View source code 5 votes vote down vote up
protected ModelRenderer newRender(int dimensionX, int dimensionY, int dimensionZ, float positionX, float positionY, float positionZ,
		float offsetX, float offsetY, float offsetZ, int textureX, int textureY, boolean mirror, ModelBase model)
{
	ModelRenderer renderer = new ModelRenderer(model, textureX, textureY);
	renderer.mirror = mirror;
	renderer.addBox(offsetX, offsetY, offsetZ, dimensionX, dimensionY, dimensionZ, 0);
	renderer.setRotationPoint(positionX, positionY, positionZ);
	return renderer;
}
 
Example 11
Project: Backmemed   File: ModelAdapterHeadHumanoid.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelHumanoidHead))
    {
        return null;
    }
    else
    {
        ModelHumanoidHead modelhumanoidhead = (ModelHumanoidHead)model;
        return modelPart.equals("head") ? modelhumanoidhead.skeletonHead : (modelPart.equals("head2") ? (!Reflector.ModelHumanoidHead_head.exists() ? null : (ModelRenderer)Reflector.getFieldValue(modelhumanoidhead, Reflector.ModelHumanoidHead_head)) : null);
    }
}
 
Example 12
Project: Backmemed   File: ModelAdapterPig.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderPig renderpig = new RenderPig(rendermanager);
    renderpig.mainModel = modelBase;
    renderpig.shadowSize = shadowSize;
    return renderpig;
}
 
Example 13
Project: Backmemed   File: ModelAdapterMinecart.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelMinecart))
    {
        return null;
    }
    else
    {
        ModelMinecart modelminecart = (ModelMinecart)model;
        return modelPart.equals("bottom") ? modelminecart.sideModels[0] : (modelPart.equals("back") ? modelminecart.sideModels[1] : (modelPart.equals("front") ? modelminecart.sideModels[2] : (modelPart.equals("right") ? modelminecart.sideModels[3] : (modelPart.equals("left") ? modelminecart.sideModels[4] : (modelPart.equals("dirt") ? modelminecart.sideModels[5] : null)))));
    }
}
 
Example 14
Project: Backmemed   File: ModelAdapterBanner.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelBanner))
    {
        return null;
    }
    else
    {
        ModelBanner modelbanner = (ModelBanner)model;
        return modelPart.equals("slate") ? modelbanner.bannerSlate : (modelPart.equals("stand") ? modelbanner.bannerStand : (modelPart.equals("top") ? modelbanner.bannerTop : null));
    }
}
 
Example 15
Project: Backmemed   File: ModelAdapterBat.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelBat))
    {
        return null;
    }
    else
    {
        ModelBat modelbat = (ModelBat)model;
        return modelPart.equals("head") ? (ModelRenderer)Reflector.getFieldValue(modelbat, Reflector.ModelBat_ModelRenderers, 0) : (modelPart.equals("body") ? (ModelRenderer)Reflector.getFieldValue(modelbat, Reflector.ModelBat_ModelRenderers, 1) : (modelPart.equals("right_wing") ? (ModelRenderer)Reflector.getFieldValue(modelbat, Reflector.ModelBat_ModelRenderers, 2) : (modelPart.equals("left_wing") ? (ModelRenderer)Reflector.getFieldValue(modelbat, Reflector.ModelBat_ModelRenderers, 3) : (modelPart.equals("outer_right_wing") ? (ModelRenderer)Reflector.getFieldValue(modelbat, Reflector.ModelBat_ModelRenderers, 4) : (modelPart.equals("outer_left_wing") ? (ModelRenderer)Reflector.getFieldValue(modelbat, Reflector.ModelBat_ModelRenderers, 5) : null)))));
    }
}
 
Example 16
Project: CustomWorldGen   File: LayerArmorBase.java   View source code 5 votes vote down vote up
public static void renderEnchantedGlint(RenderLivingBase<?> p_188364_0_, EntityLivingBase p_188364_1_, ModelBase model, float p_188364_3_, float p_188364_4_, float p_188364_5_, float p_188364_6_, float p_188364_7_, float p_188364_8_, float p_188364_9_)
{
    float f = (float)p_188364_1_.ticksExisted + p_188364_5_;
    p_188364_0_.bindTexture(ENCHANTED_ITEM_GLINT_RES);
    GlStateManager.enableBlend();
    GlStateManager.depthFunc(514);
    GlStateManager.depthMask(false);
    float f1 = 0.5F;
    GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);

    for (int i = 0; i < 2; ++i)
    {
        GlStateManager.disableLighting();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_COLOR, GlStateManager.DestFactor.ONE);
        float f2 = 0.76F;
        GlStateManager.color(0.38F, 0.19F, 0.608F, 1.0F);
        GlStateManager.matrixMode(5890);
        GlStateManager.loadIdentity();
        float f3 = 0.33333334F;
        GlStateManager.scale(0.33333334F, 0.33333334F, 0.33333334F);
        GlStateManager.rotate(30.0F - (float)i * 60.0F, 0.0F, 0.0F, 1.0F);
        GlStateManager.translate(0.0F, f * (0.001F + (float)i * 0.003F) * 20.0F, 0.0F);
        GlStateManager.matrixMode(5888);
        model.render(p_188364_1_, p_188364_3_, p_188364_4_, p_188364_6_, p_188364_7_, p_188364_8_, p_188364_9_);
    }

    GlStateManager.matrixMode(5890);
    GlStateManager.loadIdentity();
    GlStateManager.matrixMode(5888);
    GlStateManager.enableLighting();
    GlStateManager.depthMask(true);
    GlStateManager.depthFunc(515);
    GlStateManager.disableBlend();
}
 
Example 17
Project: Backmemed   File: ModelAdapterEnderCrystal.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelEnderCrystal))
    {
        return null;
    }
    else
    {
        ModelEnderCrystal modelendercrystal = (ModelEnderCrystal)model;
        return modelPart.equals("cube") ? (ModelRenderer)Reflector.getFieldValue(modelendercrystal, Reflector.ModelEnderCrystal_ModelRenderers, 0) : (modelPart.equals("glass") ? (ModelRenderer)Reflector.getFieldValue(modelendercrystal, Reflector.ModelEnderCrystal_ModelRenderers, 1) : (modelPart.equals("base") ? (ModelRenderer)Reflector.getFieldValue(modelendercrystal, Reflector.ModelEnderCrystal_ModelRenderers, 2) : null));
    }
}
 
Example 18
Project: Backmemed   File: ModelAdapterSkeletonHorse.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderAbstractHorse renderabstracthorse = new RenderAbstractHorse(rendermanager);
    renderabstracthorse.mainModel = modelBase;
    renderabstracthorse.shadowSize = shadowSize;
    return renderabstracthorse;
}
 
Example 19
Project: Backmemed   File: ModelAdapterShulkerBullet.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelShulkerBullet))
    {
        return null;
    }
    else
    {
        ModelShulkerBullet modelshulkerbullet = (ModelShulkerBullet)model;
        return modelPart.equals("bullet") ? modelshulkerbullet.renderer : null;
    }
}
 
Example 20
Project: Backmemed   File: ModelAdapterSpider.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderSpider renderspider = new RenderSpider(rendermanager);
    renderspider.mainModel = modelBase;
    renderspider.shadowSize = shadowSize;
    return renderspider;
}
 
Example 21
Project: Backmemed   File: ModelAdapterCreeper.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderCreeper rendercreeper = new RenderCreeper(rendermanager);
    rendercreeper.mainModel = modelBase;
    rendercreeper.shadowSize = shadowSize;
    return rendercreeper;
}
 
Example 22
Project: Backmemed   File: ModelAdapterOcelot.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderOcelot renderocelot = new RenderOcelot(rendermanager);
    renderocelot.mainModel = modelBase;
    renderocelot.shadowSize = shadowSize;
    return renderocelot;
}
 
Example 23
Project: Backmemed   File: ModelAdapterSheepWool.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    Render render = (Render)rendermanager.getEntityRenderMap().get(EntitySheep.class);

    if (!(render instanceof RenderSheep))
    {
        Config.warn("Not a RenderSheep: " + render);
        return null;
    }
    else
    {
        if (render.getEntityClass() == null)
        {
            RenderSheep rendersheep = new RenderSheep(rendermanager);
            rendersheep.mainModel = new ModelSheep2();
            rendersheep.shadowSize = 0.7F;
            render = rendersheep;
        }

        RenderSheep rendersheep1 = (RenderSheep)render;
        List<LayerRenderer<EntitySheep>> list = rendersheep1.getLayerRenderers();
        Iterator iterator = list.iterator();

        while (iterator.hasNext())
        {
            LayerRenderer layerrenderer = (LayerRenderer)iterator.next();

            if (layerrenderer instanceof LayerSheepWool)
            {
                iterator.remove();
            }
        }

        LayerSheepWool layersheepwool = new LayerSheepWool(rendersheep1);
        layersheepwool.sheepModel = (ModelSheep1)modelBase;
        rendersheep1.addLayer(layersheepwool);
        return rendersheep1;
    }
}
 
Example 24
Project: Halloween   File: RenderTreater.java   View source code 5 votes vote down vote up
private RenderTreater(RenderManager renderManager, ModelBase model)
{
	super(renderManager, model, 0.25F);

	this.defaultTreaterModel = this.mainModel;
	this.spiderTreaterModel = new ModelTreaterSpider();

	this.defaultLayers = Lists.newArrayList(this.layerRenderers);
	this.creeperLayers = Collections.singletonList((LayerRenderer<EntityTreater>)new LayerTreaterCreeper(this));
	this.witchLayers = Collections.singletonList((LayerRenderer<EntityTreater>)new LayerWitchClothes(this));
}
 
Example 25
Project: Backmemed   File: Shaders.java   View source code 5 votes vote down vote up
public static void resetDisplayListModel(ModelBase model)
{
    if (model != null)
    {
        for (Object object : model.boxList)
        {
            if (object instanceof ModelRenderer)
            {
                resetDisplayListModelRenderer((ModelRenderer)object);
            }
        }
    }
}
 
Example 26
Project: Backmemed   File: ModelAdapterShulker.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderShulker rendershulker = new RenderShulker(rendermanager);
    rendershulker.mainModel = modelBase;
    rendershulker.shadowSize = shadowSize;
    return rendershulker;
}
 
Example 27
Project: Backmemed   File: ModelAdapterArmorStand.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelArmorStand))
    {
        return null;
    }
    else
    {
        ModelArmorStand modelarmorstand = (ModelArmorStand)model;
        return modelPart.equals("right") ? modelarmorstand.standRightSide : (modelPart.equals("left") ? modelarmorstand.standLeftSide : (modelPart.equals("waist") ? modelarmorstand.standWaist : (modelPart.equals("base") ? modelarmorstand.standBase : null)));
    }
}
 
Example 28
Project: Backmemed   File: ModelAdapterVindicator.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderVindicator rendervindicator = new RenderVindicator(rendermanager);
    rendervindicator.mainModel = modelBase;
    rendervindicator.shadowSize = shadowSize;
    return rendervindicator;
}
 
Example 29
Project: Backmemed   File: ModelAdapterBlaze.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderBlaze renderblaze = new RenderBlaze(rendermanager);
    renderblaze.mainModel = modelBase;
    renderblaze.shadowSize = shadowSize;
    return renderblaze;
}
 
Example 30
Project: Backmemed   File: ModelAdapterEnderCrystal.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    Render render = (Render)rendermanager.getEntityRenderMap().get(EntityEnderCrystal.class);

    if (!(render instanceof RenderEnderCrystal))
    {
        Config.warn("Not an instance of RenderEnderCrystal: " + render);
        return null;
    }
    else
    {
        RenderEnderCrystal renderendercrystal = (RenderEnderCrystal)render;

        if (!Reflector.RenderEnderCrystal_modelEnderCrystal.exists())
        {
            Config.warn("Field not found: RenderEnderCrystal.modelEnderCrystal");
            return null;
        }
        else
        {
            Reflector.setFieldValue(renderendercrystal, Reflector.RenderEnderCrystal_modelEnderCrystal, modelBase);
            renderendercrystal.shadowSize = shadowSize;
            return renderendercrystal;
        }
    }
}
 
Example 31
Project: Backmemed   File: ModelAdapterBanner.java   View source code 5 votes vote down vote up
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;
        }
    }
}
 
Example 32
Project: Backmemed   File: ModelAdapterEnderChest.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelChest))
    {
        return null;
    }
    else
    {
        ModelChest modelchest = (ModelChest)model;
        return modelPart.equals("lid") ? modelchest.chestLid : (modelPart.equals("base") ? modelchest.chestBelow : (modelPart.equals("knob") ? modelchest.chestKnob : null));
    }
}
 
Example 33
Project: Backmemed   File: ModelAdapterWolf.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelWolf))
    {
        return null;
    }
    else
    {
        ModelWolf modelwolf = (ModelWolf)model;
        return modelPart.equals("head") ? modelwolf.wolfHeadMain : (modelPart.equals("body") ? modelwolf.wolfBody : (modelPart.equals("leg1") ? modelwolf.wolfLeg1 : (modelPart.equals("leg2") ? modelwolf.wolfLeg2 : (modelPart.equals("leg3") ? modelwolf.wolfLeg3 : (modelPart.equals("leg4") ? modelwolf.wolfLeg4 : (modelPart.equals("tail") ? (ModelRenderer)Reflector.getFieldValue(modelwolf, Reflector.ModelWolf_tail) : (modelPart.equals("mane") ? (ModelRenderer)Reflector.getFieldValue(modelwolf, Reflector.ModelWolf_mane) : null)))))));
    }
}
 
Example 34
Project: CustomWorldGen   File: RenderGiantZombie.java   View source code 5 votes vote down vote up
public RenderGiantZombie(RenderManager renderManagerIn, ModelBase modelBaseIn, float shadowSizeIn, float scaleIn)
{
    super(renderManagerIn, modelBaseIn, shadowSizeIn * scaleIn);
    this.scale = scaleIn;
    this.addLayer(new LayerHeldItem(this));
    this.addLayer(new LayerBipedArmor(this)
    {
        protected void initArmor()
        {
            this.modelLeggings = new ModelZombie(0.5F, true);
            this.modelArmor = new ModelZombie(1.0F, true);
        }
    });
}
 
Example 35
Project: Mods   File: RenderProjectile.java   View source code 5 votes vote down vote up
public RenderProjectile(ModelBase model, ResourceLocation redTexture, ResourceLocation bluTexture,
		RenderManager manager) {
	super(manager);
	// we could have initialized it above, but here is fine as well:
	this.model = model;
	this.texturered = redTexture;
	this.textureblu = bluTexture;
}
 
Example 36
Project: Backmemed   File: ModelAdapterHeadDragon.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelDragonHead))
    {
        return null;
    }
    else
    {
        ModelDragonHead modeldragonhead = (ModelDragonHead)model;
        return modelPart.equals("head") ? (ModelRenderer)Reflector.getFieldValue(modeldragonhead, Reflector.ModelDragonHead_head) : (modelPart.equals("jaw") ? (ModelRenderer)Reflector.getFieldValue(modeldragonhead, Reflector.ModelDragonHead_jaw) : null);
    }
}
 
Example 37
Project: Backmemed   File: ModelAdapterEnderman.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderEnderman renderenderman = new RenderEnderman(rendermanager);
    renderenderman.mainModel = modelBase;
    renderenderman.shadowSize = shadowSize;
    return renderenderman;
}
 
Example 38
Project: Backmemed   File: ModelAdapterArmorStand.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderArmorStand renderarmorstand = new RenderArmorStand(rendermanager);
    renderarmorstand.mainModel = modelBase;
    renderarmorstand.shadowSize = shadowSize;
    return renderarmorstand;
}
 
Example 39
Project: Backmemed   File: ModelAdapterDonkey.java   View source code 5 votes vote down vote up
public IEntityRenderer makeEntityRender(ModelBase modelBase, float shadowSize)
{
    RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    RenderAbstractHorse renderabstracthorse = new RenderAbstractHorse(rendermanager);
    renderabstracthorse.mainModel = modelBase;
    renderabstracthorse.shadowSize = shadowSize;
    return renderabstracthorse;
}
 
Example 40
Project: Backmemed   File: ModelAdapterIronGolem.java   View source code 5 votes vote down vote up
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelIronGolem))
    {
        return null;
    }
    else
    {
        ModelIronGolem modelirongolem = (ModelIronGolem)model;
        return modelPart.equals("head") ? modelirongolem.ironGolemHead : (modelPart.equals("body") ? modelirongolem.ironGolemBody : (modelPart.equals("left_arm") ? modelirongolem.ironGolemLeftArm : (modelPart.equals("right_arm") ? modelirongolem.ironGolemRightArm : (modelPart.equals("left_leg") ? modelirongolem.ironGolemLeftLeg : (modelPart.equals("right_leg") ? modelirongolem.ironGolemRightLeg : null)))));
    }
}