當前位置: 首頁>>代碼示例>>Java>>正文


Java ModelRenderer類代碼示例

本文整理匯總了Java中net.minecraft.client.model.ModelRenderer的典型用法代碼示例。如果您正苦於以下問題:Java ModelRenderer類的具體用法?Java ModelRenderer怎麽用?Java ModelRenderer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ModelRenderer類屬於net.minecraft.client.model包,在下文中一共展示了ModelRenderer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getModelVariable

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelVariable getModelVariable(String name)
{
    String[] astring = Config.tokenize(name, ".");

    if (astring.length != 2)
    {
        return null;
    }
    else
    {
        String s = astring[0];
        String s1 = astring[1];
        ModelRenderer modelrenderer = this.getModelRenderer(s);

        if (modelrenderer == null)
        {
            return null;
        }
        else
        {
            EnumModelVariable enummodelvariable = EnumModelVariable.parse(s1);
            return enummodelvariable == null ? null : new ModelVariable(name, modelrenderer, enummodelvariable);
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:26,代碼來源:ModelResolver.java

示例2: ModelVacuumPump

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelVacuumPump() {
    textureWidth = 64;
    textureHeight = 64;

    turbineCase = new ModelRenderer(this, 0, 47);
    turbineCase.addBox(0F, 0F, 0F, 1, 4, 1);
    turbineCase.setRotationPoint(-0.5F, 14.1F, 0F);
    turbineCase.setTextureSize(64, 64);
    turbineCase.mirror = true;
    setRotation(turbineCase, 0F, 0F, 0F);
    top = new ModelRenderer(this, 0, 47);
    top.addBox(0F, 0F, 0F, 6, 1, 12);
    top.setRotationPoint(-3F, 13F, -6F);
    top.setTextureSize(64, 64);
    top.mirror = true;
    setRotation(top, 0F, 0F, 0F);
    blade = new ModelRenderer(this, 0, 0);
    blade.addBox(0F, 0F, 0F, 1, 4, 2);
    blade.setRotationPoint(-0.5F, 14F, -3F);
    blade.setTextureSize(64, 64);
    blade.mirror = true;
    setRotation(blade, 0F, 0F, 0F);
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:24,代碼來源:ModelVacuumPump.java

示例3: ModelGrenade

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelGrenade() {
	textureWidth = 32;
	textureHeight = 32;

	Shape1 = new ModelRenderer(this, 0, 0);
	Shape1.addBox(0F, 0F, 0F, 4, 4, 5);
	Shape1.setRotationPoint(-2F, -2F, -1F);
	Shape1.setTextureSize(32, 32);
	Shape2 = new ModelRenderer(this, 0, 9);
	Shape2.addBox(0F, 0F, 0F, 3, 3, 1);
	Shape2.setRotationPoint(-1.5F, -1.5F, 4F);
	Shape2.setTextureSize(32, 32);
	Shape3 = new ModelRenderer(this, 0, 9);
	Shape3.addBox(0F, 0F, 0F, 3, 3, 1);
	Shape3.setRotationPoint(-1.5F, -1.5F, -2F);
	Shape3.setTextureSize(32, 32);
	Shape4 = new ModelRenderer(this, 18, 0);
	Shape4.addBox(0F, 0F, 0F, 4, 4, 1);
	Shape4.setRotationPoint(-2F, -2F, -3F);
	Shape4.setTextureSize(32, 32);
}
 
開發者ID:rafradek,項目名稱:Mods,代碼行數:22,代碼來源:ModelGrenade.java

示例4: ModelHerbPouch

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelHerbPouch() {
	this.textureWidth = 32;
	this.textureHeight = 32;

	this.Cuboid = new ModelRenderer(this, 0, 4);
	this.Cuboid.setRotationPoint(-4.0F, 12.0F, -2.5F);
	this.Cuboid.addBox(0.0F, 0.0F, 0.0F, 9, 3, 1);
	this.Cuboid2 = new ModelRenderer(this, 0, 8);
	this.Cuboid2.setRotationPoint(-3.75F, 12.0F, -2.5F);
	this.Cuboid2.addBox(0.0F, 0.0F, -3.0F, 8, 3, 3);
	this.Cuboid3 = new ModelRenderer(this, 0, 14);
	this.Cuboid3.setRotationPoint(-4.0F, 11.5F, -4.0F);
	this.Cuboid3.addBox(0.0F, 0.0F, 0.0F, 9, 1, 4);
	this.Cuboid4 = new ModelRenderer(this, 0, 0);
	this.Cuboid4.setRotationPoint(-4.0F, 12.0F, -4.5F);
	this.Cuboid4.addBox(0.0F, 0.0F, 0.0F, 9, 3, 1);
	this.Cuboid5 = new ModelRenderer(this, 0, 15);
	this.Cuboid5.setRotationPoint(-2.25F, 13.1F, -5.2F);
	this.Cuboid5.addBox(0.0F, 0.0F, 0.6F, 1, 1, 1);
}
 
開發者ID:Um-Mitternacht,項目名稱:Bewitchment,代碼行數:21,代碼來源:ModelHerbPouch.java

示例5: getAttachModel

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public static ModelRenderer getAttachModel(ModelBiped p_getAttachModel_0_, int p_getAttachModel_1_)
{
    switch (p_getAttachModel_1_)
    {
        case 0:
            return p_getAttachModel_0_.bipedBody;

        case 1:
            return p_getAttachModel_0_.bipedHead;

        case 2:
            return p_getAttachModel_0_.bipedLeftArm;

        case 3:
            return p_getAttachModel_0_.bipedRightArm;

        case 4:
            return p_getAttachModel_0_.bipedLeftLeg;

        case 5:
            return p_getAttachModel_0_.bipedRightLeg;

        default:
            return null;
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:27,代碼來源:PlayerItemModel.java

示例6: getModelRenderer

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelRabbit))
    {
        return null;
    }
    else
    {
        ModelRabbit modelrabbit = (ModelRabbit)model;
        Map<String, Integer> map = getMapPartFields();

        if (map.containsKey(modelPart))
        {
            int i = ((Integer)map.get(modelPart)).intValue();
            return (ModelRenderer)Reflector.getFieldValue(modelrabbit, Reflector.ModelRabbit_renderers, i);
        }
        else
        {
            return null;
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:23,代碼來源:ModelAdapterRabbit.java

示例7: ModelFrienderman

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelFrienderman(float scale) {
	super(0.0F, -14.0F, 64, 32);
	bipedHeadwear = new ModelRenderer(this, 0, 16);
	bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, scale - 0.5F);
	bipedHeadwear.setRotationPoint(0.0F, -14.0F, 0.0F);
	bipedBody = new ModelRenderer(this, 32, 16);
	bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, scale);
	bipedBody.setRotationPoint(0.0F, -14.0F, 0.0F);
	bipedRightArm = new ModelRenderer(this, 56, 0);
	bipedRightArm.addBox(-1.0F, -2.0F, -1.0F, 2, 30, 2, scale);
	bipedRightArm.setRotationPoint(-3.0F, -12.0F, 0.0F);
	bipedLeftArm = new ModelRenderer(this, 56, 0);
	bipedLeftArm.mirror = true;
	bipedLeftArm.addBox(-1.0F, -2.0F, -1.0F, 2, 30, 2, scale);
	bipedLeftArm.setRotationPoint(5.0F, -12.0F, 0.0F);
	bipedRightLeg = new ModelRenderer(this, 56, 0);
	bipedRightLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, scale);
	bipedRightLeg.setRotationPoint(-2.0F, -2.0F, 0.0F);
	bipedLeftLeg = new ModelRenderer(this, 56, 0);
	bipedLeftLeg.mirror = true;
	bipedLeftLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, scale);
	bipedLeftLeg.setRotationPoint(2.0F, -2.0F, 0.0F);
}
 
開發者ID:p455w0rd,項目名稱:EndermanEvolution,代碼行數:24,代碼來源:ModelFrienderman.java

示例8: ModelSprite

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelSprite(ModelRenderer p_i59_1_, int p_i59_2_, int p_i59_3_, float p_i59_4_, float p_i59_5_, float p_i59_6_, int p_i59_7_, int p_i59_8_, int p_i59_9_, float p_i59_10_)
{
    this.modelRenderer = p_i59_1_;
    this.textureOffsetX = p_i59_2_;
    this.textureOffsetY = p_i59_3_;
    this.posX = p_i59_4_;
    this.posY = p_i59_5_;
    this.posZ = p_i59_6_;
    this.sizeX = p_i59_7_;
    this.sizeY = p_i59_8_;
    this.sizeZ = p_i59_9_;
    this.sizeAdd = p_i59_10_;
    this.minU = (float)p_i59_2_ / p_i59_1_.textureWidth;
    this.minV = (float)p_i59_3_ / p_i59_1_.textureHeight;
    this.maxU = (float)(p_i59_2_ + p_i59_7_) / p_i59_1_.textureWidth;
    this.maxV = (float)(p_i59_3_ + p_i59_8_) / p_i59_1_.textureHeight;
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:18,代碼來源:ModelSprite.java

示例9: EyeOfSchrodinger

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
EyeOfSchrodinger() {
	this.textureWidth = 32;
	this.textureHeight = 32;
	this.right = new ModelRenderer(this, 4, 12);
	this.right.setRotationPoint(0.0F, 24.0F, 0.0F);
	this.right.addBox(-4.5F, -1.5F, -1.5F, 3, 3, 3, 0.0F);
	this.bottom = new ModelRenderer(this, 4, 6);
	this.bottom.setRotationPoint(0.0F, 24.0F, 0.0F);
	this.bottom.addBox(-4.5F, 1.5F, -1.5F, 9, 3, 3, 0.0F);
	this.top = new ModelRenderer(this, 4, 0);
	this.top.setRotationPoint(0.0F, 24.0F, 0.0F);
	this.top.addBox(-4.5F, -4.5F, -1.5F, 9, 3, 3, 0.0F);
	this.left = new ModelRenderer(this, 16, 12);
	this.left.setRotationPoint(0.0F, 24.0F, 0.0F);
	this.left.addBox(1.5F, -1.5F, -1.5F, 3, 3, 3, 0.0F);
}
 
開發者ID:ArekkuusuJerii,項目名稱:Solar,代碼行數:17,代碼來源:EyeOfSchrodingerRenderer.java

示例10: resetDisplayListModelRenderer

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public static void resetDisplayListModelRenderer(ModelRenderer mrr)
{
    mrr.resetDisplayList();

    if (mrr.childModels != null)
    {
        int i = 0;

        for (int j = mrr.childModels.size(); i < j; ++i)
        {
            resetDisplayListModelRenderer((ModelRenderer)mrr.childModels.get(i));
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:15,代碼來源:Shaders.java

示例11: getModelRenderer

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelRenderer getModelRenderer(ModelBase model, String modelPart)
{
    if (!(model instanceof ModelCreeper))
    {
        return null;
    }
    else
    {
        ModelCreeper modelcreeper = (ModelCreeper)model;
        return modelPart.equals("head") ? modelcreeper.head : (modelPart.equals("armor") ? modelcreeper.creeperArmor : (modelPart.equals("body") ? modelcreeper.body : (modelPart.equals("leg1") ? modelcreeper.leg1 : (modelPart.equals("leg2") ? modelcreeper.leg2 : (modelPart.equals("leg3") ? modelcreeper.leg3 : (modelPart.equals("leg4") ? modelcreeper.leg4 : null))))));
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:13,代碼來源:ModelAdapterCreeper.java

示例12: getModelRenderer

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
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);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:13,代碼來源:ModelAdapterHeadDragon.java

示例13: renderDynamic

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
@Override
protected void renderDynamic(float scale, float partialTicks) {
    ModelRenderer base;
    if (module.getTicksSinceAction() >= 0) {
        base = action;
    } else if (module.getTicksSinceNotEnoughAir() >= 0) {
        base = notEnoughAir;
    } else {
        base = module.hasPower() ? powered : notPowered;
    }
    base.render(scale);
    base2.render(scale);
    renderChannelColorFrame(scale);
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:15,代碼來源:ModelLogistics.java

示例14: CoinTosser_Model

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public CoinTosser_Model()
{
	textureWidth = 64;
	textureHeight = 32;
	
	Barrel = new ModelRenderer(this, 0, 24);
	Barrel.addBox(0F, 0F, 0F, 18, 4, 4);
	Barrel.setRotationPoint(0F, -1F, -1F);
	Barrel.setTextureSize(64, 32);
	Barrel.mirror = true;
	setRotation(Barrel, 0F, 0F, 0F);
	
	Stock1 = new ModelRenderer(this, 45, 27);
	Stock1.addBox(0F, 0F, 0F, 7, 3, 2);
	Stock1.setRotationPoint(-6F, 1F, 0F);
	Stock1.setTextureSize(64, 32);
	Stock1.mirror = true;
	setRotation(Stock1, 0F, 0F, 0F);
	
	Stock2 = new ModelRenderer(this, 45, 27);
	Stock2.addBox(0F, 0F, 0F, 7, 3, 2);
	Stock2.setRotationPoint(-11F, 2F, -0.1F);
	Stock2.setTextureSize(64, 32);
	Stock2.mirror = true;
	setRotation(Stock2, 0F, 0F, 0F);
	
	Ammo = new ModelRenderer(this, 0, 18);
	Ammo.addBox(0F, 0F, 0F, 12, 2, 3);
	Ammo.setRotationPoint(4F, 3F, -0.5F);
	Ammo.setTextureSize(64, 32);
	Ammo.mirror = true;
	setRotation(Ammo, 0F, 0F, 0F);
	
	Trigger = new ModelRenderer(this, 45, 24);
	Trigger.addBox(0F, 0F, 0F, 3, 1, 1);
	Trigger.setRotationPoint(-1F, -2F, 0.5F);
	Trigger.setTextureSize(64, 32);
	Trigger.mirror = true;
	setRotation(Trigger, 0F, 0F, 0F);
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:41,代碼來源:CoinTosser_Model.java

示例15: ModelFlowDetector

import net.minecraft.client.model.ModelRenderer; //導入依賴的package包/類
public ModelFlowDetector(ModuleFlowDetector flowDetector){
    textureWidth = 64;
    textureHeight = 32;

    shape1 = new ModelRenderer(this, 0, 8);
    shape1.addBox(-1F, -3F, -2F, 2, 1, 5);
    shape1.setRotationPoint(0F, 16F, 4.5F);
    shape1.setTextureSize(64, 32);
    shape1.mirror = true;
    setRotation(shape1, 0F, 0F, 0F);
    this.flowDetector = flowDetector;
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:13,代碼來源:ModelFlowDetector.java


注:本文中的net.minecraft.client.model.ModelRenderer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。