當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。