当前位置: 首页>>代码示例>>Java>>正文


Java ModelBase类代码示例

本文整理汇总了Java中net.minecraft.client.model.ModelBase的典型用法代码示例。如果您正苦于以下问题:Java ModelBase类的具体用法?Java ModelBase怎么用?Java ModelBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ModelBase类属于net.minecraft.client.model包,在下文中一共展示了ModelBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeEntityRender

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:18,代码来源:ModelAdapterMinecartTnt.java

示例2: parseItemRenderer

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:PlayerItemParser.java

示例3: getModelRenderer

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:23,代码来源:ModelAdapterOcelot.java

示例4: makeEntityRender

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:18,代码来源:ModelAdapterShulkerBullet.java

示例5: makeEntityRender

import net.minecraft.client.model.ModelBase; //导入依赖的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

示例6: makeEntityRender

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:18,代码来源:ModelAdapterEvokerFangs.java

示例7: getModelRenderer

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:23,代码来源:ModelAdapterHorse.java

示例8: makeEntityRender

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:9,代码来源:ModelAdapterVex.java

示例9: makeEntityRender

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:9,代码来源:ModelAdapterSnowman.java

示例10: newRender

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:10,代码来源:BaseHarshenBiped.java

示例11: getModelRenderer

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:ModelAdapterHeadHumanoid.java

示例12: makeEntityRender

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:9,代码来源:ModelAdapterPig.java

示例13: getModelRenderer

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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)))));
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:ModelAdapterMinecart.java

示例14: getModelRenderer

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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));
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:ModelAdapterBanner.java

示例15: getModelRenderer

import net.minecraft.client.model.ModelBase; //导入依赖的package包/类
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)))));
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:ModelAdapterBat.java


注:本文中的net.minecraft.client.model.ModelBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。