Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void addBox(float f, float f1, float f2, int i, int j, int k, float f3, float l)
- {
- float f4 = f / l;
- float f5 = f1 / l;
- float f6 = f2 / l;
- if(f3 == 0.0F){ f3 += 1.0F; }
- float f7 = f3 * l;
- float i2 = i / l;
- float j2 = j / l;
- float k2 = k / l;
- addBox2(f4, f5, f6, i2, j2, k2, f7);
- }
- public void addBox2(float f, float f1, float f2, float i, float j, float k, float f3)
- {
- corners = new PositionTexureVertex[8];
- faces = new TexturedQuad[6];
- float f4 = f + i;
- float f5 = f1 + j;
- float f6 = f2 + k;
- f -= f3;
- f1 -= f3;
- f2 -= f3;
- f4 += f3;
- f5 += f3;
- f6 += f3;
- if(mirror)
- {
- float f7 = f4;
- f4 = f;
- f = f7;
- }
- PositionTexureVertex positiontexurevertex = new PositionTexureVertex(f, f1, f2, 0.0F, 0.0F);
- PositionTexureVertex positiontexurevertex1 = new PositionTexureVertex(f4, f1, f2, 0.0F, 8F);
- PositionTexureVertex positiontexurevertex2 = new PositionTexureVertex(f4, f5, f2, 8F, 8F);
- PositionTexureVertex positiontexurevertex3 = new PositionTexureVertex(f, f5, f2, 8F, 0.0F);
- PositionTexureVertex positiontexurevertex4 = new PositionTexureVertex(f, f1, f6, 0.0F, 0.0F);
- PositionTexureVertex positiontexurevertex5 = new PositionTexureVertex(f4, f1, f6, 0.0F, 8F);
- PositionTexureVertex positiontexurevertex6 = new PositionTexureVertex(f4, f5, f6, 8F, 8F);
- PositionTexureVertex positiontexurevertex7 = new PositionTexureVertex(f, f5, f6, 8F, 0.0F);
- corners[0] = positiontexurevertex;
- corners[1] = positiontexurevertex1;
- corners[2] = positiontexurevertex2;
- corners[3] = positiontexurevertex3;
- corners[4] = positiontexurevertex4;
- corners[5] = positiontexurevertex5;
- corners[6] = positiontexurevertex6;
- corners[7] = positiontexurevertex7;
- faces[0] = new TexturedQuad(new PositionTexureVertex[] {
- positiontexurevertex5, positiontexurevertex1, positiontexurevertex2, positiontexurevertex6
- }, textureOffsetX + (int)k + (int)i, textureOffsetY + (int)k, textureOffsetX + (int)k + (int)i + (int)k, textureOffsetY + (int)k + (int)j);
- faces[1] = new TexturedQuad(new PositionTexureVertex[] {
- positiontexurevertex, positiontexurevertex4, positiontexurevertex7, positiontexurevertex3
- }, textureOffsetX + 0, textureOffsetY + (int)k, textureOffsetX + (int)k, textureOffsetY + (int)k + (int)j);
- faces[2] = new TexturedQuad(new PositionTexureVertex[] {
- positiontexurevertex5, positiontexurevertex4, positiontexurevertex, positiontexurevertex1
- }, textureOffsetX + (int)k, textureOffsetY + 0, textureOffsetX + (int)k + (int)i, textureOffsetY + (int)k);
- faces[3] = new TexturedQuad(new PositionTexureVertex[] {
- positiontexurevertex2, positiontexurevertex3, positiontexurevertex7, positiontexurevertex6
- }, textureOffsetX + (int)k + (int)i, textureOffsetY + 0, textureOffsetX + (int)k + (int)i + (int)i, textureOffsetY + (int)k);
- faces[4] = new TexturedQuad(new PositionTexureVertex[] {
- positiontexurevertex1, positiontexurevertex, positiontexurevertex3, positiontexurevertex2
- }, textureOffsetX + (int)k, textureOffsetY + (int)k, textureOffsetX + (int)k + (int)i, textureOffsetY + (int)k + (int)j);
- faces[5] = new TexturedQuad(new PositionTexureVertex[] {
- positiontexurevertex4, positiontexurevertex5, positiontexurevertex6, positiontexurevertex7
- }, textureOffsetX + (int)k + (int)i + (int)k, textureOffsetY + (int)k, textureOffsetX + (int)k + (int)i + (int)k + (int)i, textureOffsetY + (int)k + (int)j);
- if(mirror)
- {
- for(int l = 0; l < faces.length; l++)
- {
- faces[l].func_809_a();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement