Skip to content

Commit

Permalink
workaround for OlympiaCore bug
Browse files Browse the repository at this point in the history
added some minor debug code
  • Loading branch information
octarine-noise committed Jul 2, 2015
1 parent d7573a6 commit d496926
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/java/mods/betterfoliage/client/misc/Double3.java
Expand Up @@ -46,4 +46,9 @@ public Double3 scale(double s) {
public Double3 inverse() {
return new Double3(-x, -y, -z);
}

@Override
public String toString() {
return String.format("(%.2f, %.2f, %.2f)", x, y, z);
}
}
Expand Up @@ -43,14 +43,21 @@ public static class ShadingValues {
public float red;
public float green;
public float blue;

public void setGray(float value) {
red = value; green = value; blue = value;
}

public void setColor(int value) {
red = ((value >> 16) & 0xFF) / 256.0f;
green = ((value >> 8) & 0xFF) / 256.0f;
blue = (value & 0xFF) / 256.0f;
}

@Override
public String toString() {
return String.format("Br(%d, %d, %d), Col(%.2f, %.2f, %.2f)", (brightness >> 16) & 0xFF, (brightness >> 8) & 0xFF, (brightness & 0xFF), red, green, blue);
}
}

protected int drawPass = 0;
Expand Down Expand Up @@ -207,7 +214,7 @@ protected void renderWorldBlockBase(int pass, IBlockAccess world, int x, int y,
setAOPassCounters(pass);
setRenderBoundsFromBlock(block);
ISimpleBlockRenderingHandler handler = RenderUtils.getRenderingHandler(block.getRenderType());
if (handler != null) {
if (handler != null && block.getRenderType() != 0) {
handler.renderWorldBlock(world, x, y, z, block, block.getRenderType(), this);
} else {
renderStandardBlock(block, x, y, z);
Expand Down

0 comments on commit d496926

Please sign in to comment.