Tweaks to the laser relay renderer

Closes #360
This commit is contained in:
Ellpeck 2016-11-14 15:30:06 +01:00
parent 6cdf74cd88
commit e1ec9e4afb
2 changed files with 6 additions and 3 deletions

View file

@ -39,10 +39,15 @@ public class RenderLaserRelay extends TileEntitySpecialRenderer{
BlockPos second = pair.getPositions()[1]; BlockPos second = pair.getPositions()[1];
float[] color = relay.type == LaserType.ITEM ? COLOR_ITEM : (relay.type == LaserType.FLUID ? COLOR_FLUIDS : COLOR); float[] color = relay.type == LaserType.ITEM ? COLOR_ITEM : (relay.type == LaserType.FLUID ? COLOR_FLUIDS : COLOR);
AssetUtil.renderLaser(first.getX()+0.5, first.getY()+0.5, first.getZ()+0.5, second.getX()+0.5, second.getY()+0.5, second.getZ()+0.5, 120, 0.5F, 0.05, color); AssetUtil.renderLaser(first.getX()+0.5, first.getY()+0.5, first.getZ()+0.5, second.getX()+0.5, second.getY()+0.5, second.getZ()+0.5, 120, 0.35F, 0.05, color);
} }
} }
} }
} }
} }
@Override
public boolean isGlobalRenderer(TileEntity tile){
return true;
}
} }

View file

@ -233,7 +233,6 @@ public final class AssetUtil{
GlStateManager.disableLighting(); GlStateManager.disableLighting();
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.depthMask(false);
GlStateManager.translate(firstX-TileEntityRendererDispatcher.staticPlayerX, firstY-TileEntityRendererDispatcher.staticPlayerY, firstZ-TileEntityRendererDispatcher.staticPlayerZ); GlStateManager.translate(firstX-TileEntityRendererDispatcher.staticPlayerX, firstY-TileEntityRendererDispatcher.staticPlayerY, firstZ-TileEntityRendererDispatcher.staticPlayerZ);
GlStateManager.rotate((float)(180*yaw/Math.PI), 0, 1, 0); GlStateManager.rotate((float)(180*yaw/Math.PI), 0, 1, 0);
GlStateManager.rotate((float)(180*pitch/Math.PI), 0, 0, 1); GlStateManager.rotate((float)(180*pitch/Math.PI), 0, 0, 1);
@ -313,7 +312,6 @@ public final class AssetUtil{
GlStateManager.disableBlend(); GlStateManager.disableBlend();
GlStateManager.enableLighting(); GlStateManager.enableLighting();
GlStateManager.depthMask(true);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
GlStateManager.enableFog(); GlStateManager.enableFog();