mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37:59 +01:00
Rename plane renderer methods to be more in line with PonyRenderer
This commit is contained in:
parent
d94e0953a7
commit
987e24d3a5
9 changed files with 74 additions and 74 deletions
|
@ -572,31 +572,31 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P
|
|||
upperTorso = new PlaneRenderer(this, 24, 0);
|
||||
upperTorso.offset(BODY_CENTRE_X, BODY_CENTRE_Y, BODY_CENTRE_Z)
|
||||
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
|
||||
.tex(24, 0) .addEastPlane( 4, -4, -4, 8, 8, stretch)
|
||||
.tex(4, 0) .addEastPlane( 4, -4, 4, 8, 4, stretch)
|
||||
.tex(56, 0) .addBottomPlane(-4, 4, -4, 8, 8, stretch)
|
||||
.tex(36, 16) .addBackPlane(-4, -4, 8, 8, 4, stretch)
|
||||
.addBackPlane(-4, 0, 8, 8, 4, stretch)
|
||||
.addBottomPlane(-4, 4, 4, 8, 4, stretch)
|
||||
.flipZ().tex(32, 20).addTopPlane(-4, -4, -4, 8, 12, stretch)
|
||||
.tex(24, 0).addWestPlane(-4, -4, -4, 8, 8, stretch)
|
||||
.tex(4, 0) .addWestPlane(-4, -4, 4, 8, 4, stretch)
|
||||
.tex(24, 0) .east( 4, -4, -4, 8, 8, stretch)
|
||||
.tex(4, 0) .east( 4, -4, 4, 8, 4, stretch)
|
||||
.tex(56, 0) .bottom(-4, 4, -4, 8, 8, stretch)
|
||||
.tex(36, 16) .south(-4, -4, 8, 8, 4, stretch)
|
||||
.south(-4, 0, 8, 8, 4, stretch)
|
||||
.bottom(-4, 4, 4, 8, 4, stretch)
|
||||
.flipZ().tex(32, 20).top(-4, -4, -4, 8, 12, stretch)
|
||||
.tex(24, 0).west(-4, -4, -4, 8, 8, stretch)
|
||||
.tex(4, 0) .west(-4, -4, 4, 8, 4, stretch)
|
||||
// Tail stub
|
||||
.child(0)
|
||||
.tex(32, 0).addTopPlane(-1, 2, 2, 2, 6, stretch)
|
||||
.addBottomPlane(-1, 4, 2, 2, 6, stretch)
|
||||
.addEastPlane( 1, 2, 2, 2, 6, stretch)
|
||||
.addBackPlane(-1, 2, 8, 2, 2, stretch)
|
||||
.flipZ().addWestPlane(-1, 2, 2, 2, 6, stretch)
|
||||
.tex(32, 0).top(-1, 2, 2, 2, 6, stretch)
|
||||
.bottom(-1, 4, 2, 2, 6, stretch)
|
||||
.east( 1, 2, 2, 2, 6, stretch)
|
||||
.south(-1, 2, 8, 2, 2, stretch)
|
||||
.flipZ().west(-1, 2, 2, 2, 6, stretch)
|
||||
.rotate(0.5F, 0, 0);
|
||||
|
||||
neck = new PlaneRenderer(this, 0, 16)
|
||||
.at(NECK_CENTRE_X, NECK_CENTRE_Y, NECK_CENTRE_Z)
|
||||
.rotate(NECK_ROT_X, 0, 0).around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
|
||||
.addFrontPlane(0, 0, 0, 4, 4, stretch)
|
||||
.addBackPlane(0, 0, 4, 4, 4, stretch)
|
||||
.addEastPlane(4, 0, 0, 4, 4, stretch)
|
||||
.addWestPlane(0, 0, 0, 4, 4, stretch);
|
||||
.north(0, 0, 0, 4, 4, stretch)
|
||||
.south(0, 0, 4, 4, 4, stretch)
|
||||
.east(4, 0, 0, 4, 4, stretch)
|
||||
.west(0, 0, 0, 4, 4, stretch);
|
||||
}
|
||||
|
||||
protected void preInitLegs() {
|
||||
|
|
|
@ -58,9 +58,9 @@ public class ModelBatWing<T extends AbstractPonyModel & IModelPegasus> extends M
|
|||
extended.child(0).child(skin);
|
||||
|
||||
if (right) {
|
||||
skin .addWestPlane(0.5F, -1, -7, 16, 8, scale);
|
||||
skin .west(0.5F, -1, -7, 16, 8, scale);
|
||||
} else {
|
||||
skin.flip().addWestPlane(0.5F, -1, -7, 16, 8, scale);
|
||||
skin.flip().west(0.5F, -1, -7, 16, 8, scale);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,22 +40,22 @@ public class PonySnout {
|
|||
|
||||
public void init(float yOffset, float stretch) {
|
||||
mare.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
|
||||
.tex(10, 14) .addBackPlane(-2, 2, -5, 4, 2, stretch)
|
||||
.tex(11, 13) .addBackPlane(-1, 1, -5, 2, 1, stretch)
|
||||
.tex(9, 14) .addTopPlane(-2, 2, -5, 1, 1, stretch)
|
||||
.tex(14, 14) .addTopPlane( 1, 2, -5, 1, 1, stretch)
|
||||
.tex(11, 12) .addTopPlane(-1, 1, -5, 2, 1, stretch)
|
||||
.tex(18, 7).addBottomPlane(-2, 4, -5, 4, 1, stretch)
|
||||
.tex(9, 14) .addWestPlane(-2, 2, -5, 2, 1, stretch)
|
||||
.tex(14, 14) .addEastPlane( 2, 2, -5, 2, 1, stretch)
|
||||
.tex(11, 12) .addWestPlane(-1, 1, -5, 1, 1, stretch)
|
||||
.tex(12, 12) .addEastPlane( 1, 1, -5, 1, 1, stretch);
|
||||
.tex(10, 14).south(-2, 2, -5, 4, 2, stretch)
|
||||
.tex(11, 13).south(-1, 1, -5, 2, 1, stretch)
|
||||
.tex(9, 14) .top(-2, 2, -5, 1, 1, stretch)
|
||||
.tex(14, 14) .top( 1, 2, -5, 1, 1, stretch)
|
||||
.tex(11, 12) .top(-1, 1, -5, 2, 1, stretch)
|
||||
.tex(18, 7).bottom(-2, 4, -5, 4, 1, stretch)
|
||||
.tex(9, 14) .west(-2, 2, -5, 2, 1, stretch)
|
||||
.tex(14, 14) .east( 2, 2, -5, 2, 1, stretch)
|
||||
.tex(11, 12) .west(-1, 1, -5, 1, 1, stretch)
|
||||
.tex(12, 12) .east( 1, 1, -5, 1, 1, stretch);
|
||||
stallion.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
|
||||
.tex(10, 13) .addBackPlane(-2, 1, -5, 4, 3, stretch)
|
||||
.tex(10, 13) .addTopPlane(-2, 1, -5, 4, 1, stretch)
|
||||
.tex(18, 7).addBottomPlane(-2, 4, -5, 4, 1, stretch)
|
||||
.tex(10, 13) .addWestPlane(-2, 1, -5, 3, 1, stretch)
|
||||
.tex(13, 13) .addEastPlane( 2, 1, -5, 3, 1, stretch);
|
||||
.tex(10, 13).south(-2, 1, -5, 4, 3, stretch)
|
||||
.tex(10, 13) .top(-2, 1, -5, 4, 1, stretch)
|
||||
.tex(18, 7).bottom(-2, 4, -5, 4, 1, stretch)
|
||||
.tex(10, 13) .west(-2, 1, -5, 3, 1, stretch)
|
||||
.tex(13, 13) .east( 2, 1, -5, 3, 1, stretch);
|
||||
}
|
||||
|
||||
public void setGender(PonyGender gender) {
|
||||
|
|
|
@ -99,14 +99,14 @@ public class PonyTail extends PlaneRenderer implements IModelPart {
|
|||
around(TAIL_RP_X, TAIL_RP_Y + yOffset, 0);
|
||||
|
||||
if (index == 0) {
|
||||
tex(32, 0).addTopPlane(-2, 0, 2, 4, 4, stretch);
|
||||
tex(32, 0).top(-2, 0, 2, 4, 4, stretch);
|
||||
}
|
||||
|
||||
tex(36, texX).addEastPlane( 2, 0, 2, 4, 4, stretch)
|
||||
.addWestPlane(-2, 0, 2, 4, 4, stretch);
|
||||
tex(32, texX).addBackPlane(-2, 0, 2, 4, 4, stretch)
|
||||
.addFrontPlane(-2, 0, 6, 4, 4, stretch);
|
||||
tex(32, 0) .addBottomPlane(-2, 4, 2, 4, 4, stretch);
|
||||
tex(36, texX) .east( 2, 0, 2, 4, 4, stretch)
|
||||
.west(-2, 0, 2, 4, 4, stretch);
|
||||
tex(32, texX).south(-2, 0, 2, 4, 4, stretch)
|
||||
.north(-2, 0, 6, 4, 4, stretch);
|
||||
tex(32, 0) .bottom(-2, 4, 2, 4, 4, stretch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,37 +38,37 @@ public class SaddleBags implements IModelPart {
|
|||
int z = -1;
|
||||
|
||||
strap.offset(-x, y + 0.2F, z + 3).around(0, 4, 4)
|
||||
.tex(56, 31).addTopPlane(0, 0, 0, 8, 1, stretch)
|
||||
.addTopPlane(0, 0, 1, 8, 1, stretch)
|
||||
.addBackPlane(0, 0, 2, 8, 1, stretch)
|
||||
.addFrontPlane(0, 0, 0, 8, 1, stretch)
|
||||
.tex(56, 31).top(0, 0, 0, 8, 1, stretch)
|
||||
.top(0, 0, 1, 8, 1, stretch)
|
||||
.south(0, 0, 2, 8, 1, stretch)
|
||||
.north(0, 0, 0, 8, 1, stretch)
|
||||
.child(0).offset(0, -3, -0.305F).tex(56, 31)
|
||||
.addWestPlane( 4.0002F, 0, 0, 1, 3, stretch) // 0.0001 is there
|
||||
.addWestPlane( 4.0002F, -1, 0, 1, 3, stretch) // otherwise straps
|
||||
.addWestPlane(-4.0002F, 0, 0, 1, 3, stretch) // clip into the body
|
||||
.addWestPlane(-4.0002F, -1, 0, 1, 3, stretch)
|
||||
.west( 4.0002F, 0, 0, 1, 3, stretch) // 0.0001 is there
|
||||
.west( 4.0002F, -1, 0, 1, 3, stretch) // otherwise straps
|
||||
.west(-4.0002F, 0, 0, 1, 3, stretch) // clip into the body
|
||||
.west(-4.0002F, -1, 0, 1, 3, stretch)
|
||||
.rotateAngleX = ROTATE_270;
|
||||
|
||||
leftBag.offset(x, y, z).around(0, 4, 4)
|
||||
.tex(56, 25).addBackPlane(0, 0, 0, 3, 6, stretch)
|
||||
.tex(59, 25).addBackPlane(0, 0, 8, 3, 6, stretch)
|
||||
.tex(56, 19).addWestPlane(3, 0, 0, 6, 8, stretch)
|
||||
.addWestPlane(0, 0, 0, 6, 8, stretch)
|
||||
.tex(56, 25).south(0, 0, 0, 3, 6, stretch)
|
||||
.tex(59, 25).south(0, 0, 8, 3, 6, stretch)
|
||||
.tex(56, 19) .west(3, 0, 0, 6, 8, stretch)
|
||||
.west(0, 0, 0, 6, 8, stretch)
|
||||
.child(0).offset(z, y, -x).tex(56, 16)
|
||||
.addTopPlane(0, 0, -3, 8, 3, stretch)
|
||||
.tex(56, 22).flipZ().addBottomPlane(0, 6, -3, 8, 3, stretch)
|
||||
.top(0, 0, -3, 8, 3, stretch)
|
||||
.tex(56, 22).flipZ().bottom(0, 6, -3, 8, 3, stretch)
|
||||
.rotateAngleY = ROTATE_270;
|
||||
|
||||
x += 3;
|
||||
|
||||
rightBag.offset(-x, y, z).around(0, 4, 4)
|
||||
.tex(56, 25).addBackPlane(0, 0, 0, 3, 6, stretch)
|
||||
.tex(59, 25).addBackPlane(0, 0, 8, 3, 6, stretch)
|
||||
.tex(56, 19).addWestPlane(3, 0, 0, 6, 8, stretch)
|
||||
.addWestPlane(0, 0, 0, 6, 8, stretch)
|
||||
.tex(56, 25).south(0, 0, 0, 3, 6, stretch)
|
||||
.tex(59, 25).south(0, 0, 8, 3, 6, stretch)
|
||||
.tex(56, 19).west(3, 0, 0, 6, 8, stretch)
|
||||
.west(0, 0, 0, 6, 8, stretch)
|
||||
.child(0).offset(z, y, x).tex(56, 16)
|
||||
.flipZ().addTopPlane(0, 0, -3, 8, 3, stretch)
|
||||
.tex(56, 22).flipZ().addBottomPlane(0, 6, -3, 8, 3, stretch)
|
||||
.flipZ().top(0, 0, -3, 8, 3, stretch)
|
||||
.tex(56, 22).flipZ().bottom(0, 6, -3, 8, 3, stretch)
|
||||
.rotateAngleY = ROTATE_270;
|
||||
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ public class SeaponyTail implements IModelPart {
|
|||
.box(0, 0, 0, 2, 6, 1, stretch);
|
||||
|
||||
tailFins.offset(1, 0, 4).rotate(-TAIL_ROTX, 0, 0)
|
||||
.addTopPlane(-8, 0, 0, 8, 8, stretch)
|
||||
.flip().addTopPlane( 0, 0, 0, 8, 8, stretch);
|
||||
.top(-8, 0, 0, 8, 8, stretch)
|
||||
.flip().top( 0, 0, 0, 8, 8, stretch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,15 +43,15 @@ public class ModelSeapony extends ModelUnicorn {
|
|||
|
||||
centerFin = new PlaneRenderer(this, 58, 28)
|
||||
.rotate(PI / 2 - 0.1F, 0, 0).around(0, 6, 9)
|
||||
.addEastPlane(0, -6, 0, 12, 6, stretch);
|
||||
.east(0, -6, 0, 12, 6, stretch);
|
||||
|
||||
leftFin = new PlaneRenderer(this, 56, 16)
|
||||
.rotate(0, FIN_ROT_Y, 0).around(3, -6, 3)
|
||||
.flipZ().addEastPlane(0, 0, 0, 12, 8, stretch);
|
||||
.flipZ().east(0, 0, 0, 12, 8, stretch);
|
||||
|
||||
rightFin = new PlaneRenderer(this, 56, 16)
|
||||
.rotate(0, -FIN_ROT_Y, 0).around(-3, -6, 3)
|
||||
.addWestPlane(0, 0, 0, 12, 8, stretch);
|
||||
.west(0, 0, 0, 12, 8, stretch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -89,10 +89,10 @@ public class ModelVillagerPony extends ModelAlicorn {
|
|||
apron = new PlaneRenderer(this, 56, 16)
|
||||
.offset(BODY_CENTRE_X, BODY_CENTRE_Y, BODY_CENTRE_Z)
|
||||
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
|
||||
.addBackPlane(-4, -4, -9, 8, 10, stretch);
|
||||
.south(-4, -4, -9, 8, 10, stretch);
|
||||
trinket = new PlaneRenderer(this, 0, 3)
|
||||
.offset(BODY_CENTRE_X, BODY_CENTRE_Y, BODY_CENTRE_Z)
|
||||
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
|
||||
.addBackPlane(-2, -4, -9, 4, 5, stretch);
|
||||
.south(-2, -4, -9, 4, 5, stretch);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,27 +43,27 @@ public class PlaneRenderer extends AbstractBoxRenderer<PlaneRenderer> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public PlaneRenderer addTopPlane(float offX, float offY, float offZ, int width, int depth, float scale) {
|
||||
public PlaneRenderer top(float offX, float offY, float offZ, int width, int depth, float scale) {
|
||||
return addPlane(offX, offY, offZ, width, 0, depth, scale, Plane.UP);
|
||||
}
|
||||
|
||||
public PlaneRenderer addBottomPlane(float offX, float offY, float offZ, int width, int depth, float scale) {
|
||||
public PlaneRenderer bottom(float offX, float offY, float offZ, int width, int depth, float scale) {
|
||||
return addPlane(offX, offY, offZ, width, 0, depth, scale, Plane.DOWN);
|
||||
}
|
||||
|
||||
public PlaneRenderer addWestPlane(float offX, float offY, float offZ, int height, int depth, float scale) {
|
||||
public PlaneRenderer west(float offX, float offY, float offZ, int height, int depth, float scale) {
|
||||
return addPlane(offX, offY, offZ, 0, height, depth, scale, Plane.WEST);
|
||||
}
|
||||
|
||||
public PlaneRenderer addEastPlane(float offX, float offY, float offZ, int height, int depth, float scale) {
|
||||
public PlaneRenderer east(float offX, float offY, float offZ, int height, int depth, float scale) {
|
||||
return addPlane(offX, offY, offZ, 0, height, depth, scale, Plane.EAST);
|
||||
}
|
||||
|
||||
public PlaneRenderer addFrontPlane(float offX, float offY, float offZ, int width, int height, float scale) {
|
||||
public PlaneRenderer north(float offX, float offY, float offZ, int width, int height, float scale) {
|
||||
return addPlane(offX, offY, offZ - scale * 2, width, height, 0, scale, Plane.NORTH);
|
||||
}
|
||||
|
||||
public PlaneRenderer addBackPlane(float offX, float offY, float offZ, int width, int height, float scale) {
|
||||
public PlaneRenderer south(float offX, float offY, float offZ, int width, int height, float scale) {
|
||||
return addPlane(offX, offY, offZ + scale * 2, width, height, 0, scale, Plane.SOUTH);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue