Skip to content

Instantly share code, notes, and snippets.

public static Matrix4f getMatrix(EnumFacing facing) {
Matrix4f ret = new Matrix4f();
switch (facing) {
case DOWN: ret = ModelRotation.X90_Y0.getMatrix(); break;
case UP: ret = ModelRotation.X270_Y0.getMatrix(); break;
case NORTH: ret = ModelRotation.X0_Y0.getMatrix(); break;
case SOUTH: ret = ModelRotation.X0_Y180.getMatrix(); break;
case WEST: ret = ModelRotation.X0_Y270.getMatrix(); break;
case EAST: ret = ModelRotation.X0_Y90.getMatrix(); break;
default: ret.setIdentity();