本文整理汇总了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);
}
}
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
}
示例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;
}
}
}
示例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);
}
示例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;
}
示例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);
}
示例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));
}
}
}
示例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))))));
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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;
}