This commit is contained in:
AlgorithmX2 2014-05-13 21:57:17 -05:00
commit 322b0a7da7
2 changed files with 20 additions and 1 deletions

View file

@ -326,7 +326,7 @@ public class BusRenderHelper implements IPartRenderHelper
@Override @Override
public void setFacesToRender(EnumSet<ForgeDirection> faces) public void setFacesToRender(EnumSet<ForgeDirection> faces)
{ {
BusRenderer.instance.renderer.faces = faces; BusRenderer.instance.renderer.renderFaces = faces;
} }
public void renderBlockCurrentBounds(int x, int y, int z, RenderBlocks renderer) public void renderBlockCurrentBounds(int x, int y, int z, RenderBlocks renderer)

View file

@ -20,6 +20,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
public boolean calculations = true; public boolean calculations = true;
public EnumSet<ForgeDirection> renderFaces = EnumSet.allOf( ForgeDirection.class );
public EnumSet<ForgeDirection> faces = EnumSet.allOf( ForgeDirection.class ); public EnumSet<ForgeDirection> faces = EnumSet.allOf( ForgeDirection.class );
private class LightingCache implements ISimplifiedBundle private class LightingCache implements ISimplifiedBundle
@ -302,6 +303,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
if ( faces.contains( ForgeDirection.WEST ) ) if ( faces.contains( ForgeDirection.WEST ) )
{ {
if ( !renderFaces.contains( ForgeDirection.WEST ) )
return;
if ( isFacade ) if ( isFacade )
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
@ -353,6 +357,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
if ( faces.contains( ForgeDirection.EAST ) ) if ( faces.contains( ForgeDirection.EAST ) )
{ {
if ( !renderFaces.contains( ForgeDirection.EAST ) )
return;
if ( isFacade ) if ( isFacade )
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
@ -432,6 +439,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
if ( faces.contains( ForgeDirection.DOWN ) ) if ( faces.contains( ForgeDirection.DOWN ) )
{ {
if ( !renderFaces.contains( ForgeDirection.DOWN ) )
return;
if ( isFacade ) if ( isFacade )
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
@ -483,6 +493,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
if ( faces.contains( ForgeDirection.UP ) ) if ( faces.contains( ForgeDirection.UP ) )
{ {
if ( !renderFaces.contains( ForgeDirection.UP ) )
return;
if ( isFacade ) if ( isFacade )
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
@ -534,6 +547,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
if ( faces.contains( ForgeDirection.NORTH ) ) if ( faces.contains( ForgeDirection.NORTH ) )
{ {
if ( !renderFaces.contains( ForgeDirection.NORTH ) )
return;
if ( isFacade ) if ( isFacade )
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
@ -585,6 +601,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
if ( faces.contains( ForgeDirection.SOUTH ) ) if ( faces.contains( ForgeDirection.SOUTH ) )
{ {
if ( !renderFaces.contains( ForgeDirection.SOUTH ) )
return;
if ( isFacade ) if ( isFacade )
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;