Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions src/main/java/com/enderio/core/client/render/TechneUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,29 +282,31 @@ public static void renderWithIcon(GroupObject go, IIcon icon, IIcon override, Te
tes.setBrightness(world.getBlock(bx, by, bz).getMixedBrightnessForBlock(world, bx, by, bz));
}

if (vt != null) {
// TODO BLECH
if (vt instanceof VertexRotationFacing) {
normal = ((VertexRotationFacing) vt).rotate(normal);
} else if (vt instanceof VertexTransformComposite) {
for (VertexTransform xform : ((VertexTransformComposite) vt).xforms) {
if (xform instanceof VertexRotationFacing) {
normal = ((VertexRotationFacing) xform).rotate(normal);
}
}
}
}

if (isbrh) {
int c = (int) (0xFF * RenderUtil.getColorMultiplierForFace(normal));
tes.setColorOpaque(c, c, c);
}

for (int i = 0; i < f.vertices.length; i++) {
Vertex vert = f.vertices[i];
Vector3d v = new Vector3d(vert);
Vector3d tv = new Vector3d(v);
tv.add(0.5, 0, 0.5);
if (vt != null) {
vt.apply(v);
// TODO BLECH
if (vt instanceof VertexRotationFacing) {
normal = ((VertexRotationFacing) vt).rotate(normal);
}
if (vt instanceof VertexTransformComposite) {
for (VertexTransform xform : ((VertexTransformComposite) vt).xforms) {
if (xform instanceof VertexRotationFacing) {
normal = ((VertexRotationFacing) xform).rotate(normal);
}
}
}
}

if (isbrh) {
int c = (int) (0xFF * RenderUtil.getColorMultiplierForFace(normal));
tes.setColorOpaque(c, c, c);
}

if (override != null) {
Expand Down