BoundingBox bb = cube.scale(xLen, yLen, zLen);
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
if(d != component.dir && d != component.dir.getOpposite()) {
ForgeDirection vDir = RenderUtil.getVDirForFace(d);
if(component.dir == ForgeDirection.UP || component.dir == ForgeDirection.DOWN) {
vDir = RenderUtil.getUDirForFace(d);
} else if((component.dir == ForgeDirection.NORTH || component.dir == ForgeDirection.SOUTH) && d.offsetY != 0) {
vDir = RenderUtil.getUDirForFace(d);
}
float minU = texture.getMinU();
float maxU = texture.getMaxU();
float minV = texture.getMinV();
float maxV = texture.getMaxV();
float sideScale = Math.max(bb.sizeX(), bb.sizeY()) * 2 / 16f;
sideScale = Math.max(sideScale, bb.sizeZ() * 2 / 16f);
float width = Math.min(bb.sizeX(), bb.sizeY()) * 15f / 16f;
List<Vertex> corners = bb.getCornersWithUvForFace(d, minU, maxU, minV, maxV);
moveEdgeCorners(corners, vDir, width);
moveEdgeCorners(corners, component.dir.getOpposite(), sideScale);
for (Vertex c : corners) {
addVecWithUV(c.xyz, c.uv.x, c.uv.y);
}
corners = bb.getCornersWithUvForFace(d, minU, maxU, minV, maxV);
moveEdgeCorners(corners, vDir.getOpposite(), width);
moveEdgeCorners(corners, component.dir.getOpposite(), sideScale);
for (Vertex c : corners) {
addVecWithUV(c.xyz, c.uv.x, c.uv.y);
}