use of logisticspipes.utils.math.Vector3d in project LogisticsPipes by RS485.
the class SideConfigDisplay method renderScene.
private void renderScene() {
GlStateManager.enableCull();
GlStateManager.enableRescaleNormal();
RenderHelper.disableStandardItemLighting();
mc.entityRenderer.disableLightmap();
RenderUtil.bindBlockTexture();
GlStateManager.disableLighting();
GlStateManager.enableTexture2D();
GlStateManager.enableAlpha();
Vector3d trans = new Vector3d((-origin.x) + eye.x, (-origin.y) + eye.y, (-origin.z) + eye.z);
BlockRenderLayer renderLayer = MinecraftForgeClient.getRenderLayer();
try {
for (BlockRenderLayer layer : BlockRenderLayer.values()) {
ForgeHooksClient.setRenderLayer(layer);
setGlStateForPass(layer, false);
doWorldRenderPass(trans, configurables, layer);
}
if (renderNeighbours) {
for (BlockRenderLayer layer : BlockRenderLayer.values()) {
ForgeHooksClient.setRenderLayer(layer);
setGlStateForPass(layer, true);
doWorldRenderPass(trans, neighbours, layer);
}
}
} finally {
ForgeHooksClient.setRenderLayer(renderLayer);
}
RenderHelper.enableStandardItemLighting();
GlStateManager.enableLighting();
TileEntityRendererDispatcher.instance.entityX = origin.x - eye.x;
TileEntityRendererDispatcher.instance.entityY = origin.y - eye.y;
TileEntityRendererDispatcher.instance.entityZ = origin.z - eye.z;
TileEntityRendererDispatcher.staticPlayerX = origin.x - eye.x;
TileEntityRendererDispatcher.staticPlayerY = origin.y - eye.y;
TileEntityRendererDispatcher.staticPlayerZ = origin.z - eye.z;
for (int pass = 0; pass < 2; pass++) {
ForgeHooksClient.setRenderPass(pass);
setGlStateForPass(pass, false);
doTileEntityRenderPass(configurables, pass);
if (renderNeighbours) {
setGlStateForPass(pass, true);
doTileEntityRenderPass(neighbours, pass);
}
}
ForgeHooksClient.setRenderPass(-1);
setGlStateForPass(0, false);
}
Aggregations