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


Java ModelBox类代码示例

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


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

示例1: compileDisplayList

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
@SideOnly(Side.CLIENT)
protected void compileDisplayList(float scale)
{
    this.displayList = GLAllocation.generateDisplayLists(1);
    GlStateManager.glNewList(this.displayList, 4864);
    VertexBuffer vertexbuffer = Tessellator.getInstance().getBuffer();

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox) this.cubeList.get(i)).render(vertexbuffer, scale);
    }

    GlStateManager.glEndList();
    this.compiled = true;
}
 
开发者ID:mchorse,项目名称:metamorph,代码行数:19,代码来源:ModelCustomRenderer.java

示例2: ModelToolRack

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
public ModelToolRack() {
	upperStrip = new ModelRendererVC(this);
	lowerStrip = new ModelRendererVC(this);
	
	upperStrip.cubeList.add(new ModelBox(upperStrip, 0, 0, 0F, 8, 0.1F, 32, 3, 2, 0));
	lowerStrip.cubeList.add(new ModelBox(upperStrip, 0, 4, 0F, 24, 0.1F, 32, 3, 2, 0));
	
	for (int i = 0; i < nails.length; i++) {
		nails[i] = new ModelRendererVC(this);
		
		nails[i].cubeList.add(new ModelBox(upperStrip, 0, 0, 
			(i % 2 > 0) ? 3 : 27,					// x 
			(i > 1) ? 9 : 25, 						// y
			2, 										// z
			1, 1, 1, 0));
	}
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:18,代码来源:ModelToolRack.java

示例3: initFillMaterial

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
void initFillMaterial(int height) {
	fillmaterial = new ModelRendererVC(this);
	fillmaterial.cubeList.add(new ModelBox(fillmaterial, 
		0, 
		0, 
		stoneWallPadding + stoneWallThickness,							// x 
		stoneWallThickness, 											// y
		stoneWallPadding + stoneWallThickness,							// z
		stoneWallWidth - stoneWallThickness,							// width 
		height * scale,		 											// height
		stoneWallWidth - stoneWallThickness,							// length
		0
	));
	
	fillmaterialheight = height;
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:17,代码来源:ModelStonePot.java

示例4: HeraldryArmourModel

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
public HeraldryArmourModel(EntityEquipmentSlot par1) {
	super(par1==EntityEquipmentSlot.LEGS ? 0.4F : 1F);
	this.armourSlot = par1;
	bipedHeadwear.cubeList.clear();
	if(armourSlot == EntityEquipmentSlot.LEGS){
		//bipedRightLeg = bipedRightLeg.setTextureOffset(40, 16);

		bipedRightLeg.cubeList.clear();
		bipedRightLeg.setTextureOffset(40, 16);
		bipedRightLeg.mirror = true;
		List<ModelBox> legBoxlist = bipedLeftLeg.cubeList;
		for (ModelBox modelBox : legBoxlist) {
			bipedRightLeg.addBox(modelBox.posX1, modelBox.posY1, modelBox.posZ1, 
					(int)(modelBox.posX2 - modelBox.posX1),
					(int)(modelBox.posY2 - modelBox.posY1),
					(int)(modelBox.posZ2 - modelBox.posZ1));
		}
		
	}
}
 
开发者ID:Mine-and-blade-admin,项目名称:Battlegear2,代码行数:21,代码来源:HeraldryArmourModel.java

示例5: compileDisplayList

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
/**
 * Compiles a GL display list for this model
 */
@SideOnly(Side.CLIENT)
private void compileDisplayList(float par1) {
	this.displayList = GLAllocation.generateDisplayLists(1);
	GL11.glNewList(this.displayList, GL11.GL_COMPILE);
	Tessellator var2 = Tessellator.instance;

	for (int var3 = 0; var3 < this.cubeList.size(); ++var3) {
		((ModelBox) this.cubeList.get(var3)).render(var2, par1);
	}

	for(int i = 0; i < this.objs.size(); i++){
		this.objs.get(i).render(par1);
	}

	GL11.glEndList();
	this.compiled = true;
}
 
开发者ID:uzzaco2002,项目名称:secri,代码行数:21,代码来源:MaemeModelRenderer.java

示例6: compileDisplayList

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
private void compileDisplayList(float par1)
{
    this.displayList = GLAllocation.generateDisplayLists(1);
    GL11.glNewList(this.displayList, GL11.GL_COMPILE);
    Tessellator tessellator = Tessellator.instance;

    for (int i = 0; i < this.cubeList.size(); ++i)
    {
        ((ModelBox) this.cubeList.get(i)).render(tessellator, par1);
    }

    GL11.glEndList();
    this.compiled = true;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:16,代码来源:ModelRendererGC.java

示例7: getModelSize

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
/**
 * Compute model size based on the box in the model renderer
 */
private int[] getModelSize(ModelBox box)
{
    int w = (int) (box.posX2 - box.posX1);
    int h = (int) (box.posY2 - box.posY1);
    int d = (int) (box.posZ2 - box.posZ1);

    return new int[] {w, h, d};
}
 
开发者ID:mchorse,项目名称:blockbuster,代码行数:12,代码来源:ModelExporter.java

示例8: getAnchor

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
/**
 * Compute anchor based on the renderer
 */
private float[] getAnchor(ModelBox box, int[] size)
{
    float w = size[0] != 0 ? -box.posX1 / size[0] : 0;
    float h = size[1] != 0 ? -box.posY1 / size[1] : 0;
    float d = size[2] != 0 ? -box.posZ1 / size[2] : 0;

    return new float[] {w, h, d};
}
 
开发者ID:mchorse,项目名称:blockbuster,代码行数:12,代码来源:ModelExporter.java

示例9: DDScompileDisplayList

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
/**
 * Compiles a GL display list for this model.
 * EDITED VERSION BECAUSE OF THE PRIVATE FIELDS
 */
public void DDScompileDisplayList(float par1)
{
	this.DDSdisplayList = GLAllocation.generateDisplayLists(1);
	GL11.glNewList(this.DDSdisplayList, GL11.GL_COMPILE);
	Tessellator tessellator = Tessellator.instance;

	for (int i = 0; i < this.cubeList.size(); ++i)
	{
		((ModelBox)this.cubeList.get(i)).render(tessellator, par1);
	}

	GL11.glEndList();
	this.DDScompiled = true;
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:19,代码来源:MCAModelRenderer.java

示例10: ModelTopBox

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
public ModelTopBox(ModelRenderer p_i1171_1_, int p_i1171_2_, int p_i1171_3_, float p_i1171_4_, float p_i1171_5_,
		float p_i1171_6_, float p_i1171_7_, float p_i1171_8_, float p_i1171_9_, float p_i1171_10_) {
	super(p_i1171_1_, p_i1171_2_, p_i1171_3_, p_i1171_4_, p_i1171_5_, p_i1171_6_, (int) p_i1171_7_, (int) p_i1171_8_, (int) p_i1171_9_,
			p_i1171_10_);

	try{
		Field field = ModelBox.class.getDeclaredField("quadList");
		quads = (TexturedQuad[]) field.get(this);
	}
	catch(Throwable th){
		th.printStackTrace();
	}
}
 
开发者ID:UnderMybrella,项目名称:Minegate,代码行数:14,代码来源:ModelTopBox.java

示例11: addBox

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public ModelPart addBox(int u, int v,
                        float xOffset, float yOffset, float zOffset,
                        int width, int height, int depth, float scale)
{
    cubeList.add(new ModelBox(this, u, v, xOffset, yOffset, zOffset, width, height, depth, scale));
    return this;
}
 
开发者ID:MrSpring,项目名称:TheKitchenMod,代码行数:9,代码来源:ModelPart.java

示例12: initComponents

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
public void initComponents() {
	hori = new ModelRendererVC(this);
//	vert = new ModelRendererVC(this);
	support = new ModelRendererVC(this);
	
	//      								            x1  y1  z1   wdt hgt depth scalechange
	hori.cubeList.add(new ModelBox(hori,        0, 0, 14f, 12f, 0F,     4, 8, 32, 0));
	hori.cubeList.add(new ModelBox(hori,        0, 0, 12f, 14f, 0.05F,     8, 4, 32, 0));
	//vert.cubeList.add(new ModelBox(hori,        0, 0, 12f, 14f, 0.05F,     8, 4, 32, 0));
	
	support.cubeList.add(new ModelBox(support,  0, 0, 10F,  0f, 4F,     12, 24, 2, 0));
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:13,代码来源:ModelAxle.java

示例13: initComponents

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
public void initComponents() {
		fireclayMolds = new ModelRendererVC(this);
		ingots = new ModelRendererVC(this);
		canal = new ModelRendererVC(this);
		furnaceHole = new ModelRendererVC(this);
		//      								            x1  y1  z1   wdt hgt depth scalechange
//		hori.cubeList.add(new ModelBox(hori,        0, 0, 14f, 12f, 0F,     4, 8, 32, 0));

		// Base
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 0f, 0f, 0f, 32, 24, 32, 0));
		// Left border
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 0f, 24f, 0f, 4, 6, 32, 0));
		// Right border
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 28f, 24f, 0f, 4, 6, 32, 0));
		// Bottom border
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 4f, 24f, 28f, 24, 6, 4, 0));
		// Topleft border
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 4f, 24f, 0f, 10, 6, 4, 0));
		// Topright border
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 18f, 24f, 0f, 10, 6, 4, 0));
		
		// Seperator 1 right
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 18f, 24f, 10.5f, 10, 6, 2, 0));
		// Seperator 2 right
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 18f, 24f, 19f, 10, 6, 2, 0));
		
		// Seperator 1 left
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 4f, 24f, 10.5f, 10, 6, 2, 0));
		// Seperator 2 left
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 4f, 24f, 19f, 10, 6, 2, 0));
		
		// Canal
		fireclayMolds.cubeList.add(new ModelBox(fireclayMolds, 0, 0, 14f, 24f, 0f, 4, 5, 28, 0));
		
		
		canal.cubeList.add(new ModelBox(canal, 0, 0, 14f, 29f, 0f, 4, 1, 28, 0));
		furnaceHole.cubeList.add(new ModelBox(furnaceHole, 0, 0, 12f, 32f, -6f, 8, 8, 7, 0));
		ingots.cubeList.add(new ModelBox(ingots, 0, 0, 4f, 24f, 4f, 24, 5, 24, 0));
	}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:40,代码来源:ModelTallMetallMold.java

示例14: initComponents

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
public void initComponents() {
	base = new ModelRendererVC(this);
	//      								    x1  y1  z1   wdt hgt detph scalechange
	base.cubeList.add(new ModelBox(base, 0, 0,  8F, 8f, 0F,    16, 16, 2, 0));
	
	for (int i = 0; i < pegs.length; i++) {
		pegs[i] = new ModelRendererVC(this);
	}
	
	pegs[0].cubeList.add(new ModelBox(pegs[0], 0, 0,  8F + 0.5f, 8f + 0.5f, 1F, 2, 2, 8, 0));
	pegs[1].cubeList.add(new ModelBox(pegs[1], 0, 0,  8F + 13.5f, 8f + 0.5f, 1F, 2, 2, 8, 0));
	pegs[2].cubeList.add(new ModelBox(pegs[2], 0, 0,  8F + 0.5f, 8f + 13.5f, 1F, 2, 2, 8, 0));
	pegs[3].cubeList.add(new ModelBox(pegs[3], 0, 0,  8F + 13.5f, 8f + 13.5f, 1F, 2, 2, 8, 0));		
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:15,代码来源:ModelGearComponents.java

示例15: ModelVessel

import net.minecraft.client.model.ModelBox; //导入依赖的package包/类
public ModelVessel() {
	boxes = new ModelRendererVC[boxSizes.length];
	int bottom = 0;
	
	for (int i = 0; i < boxSizes.length; i++) {
		boxes[i] = new ModelRendererVC(this);
		
		float wdt = boxSizes[i][0];
		float hgt = boxSizes[i][1];
		float left = 32 - wdt;
		
		boxes[i].cubeList.add(new ModelBox(boxes[i], 0, (int) hgt, left / 2, 22 - bottom - hgt, left/ 2, (int)wdt, (int)hgt, (int)wdt, 0));
		bottom += hgt;
	}
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:16,代码来源:ModelVessel.java


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