From 05c235da6f55b63265453fbaacabc8a440e05054 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 29 Mar 2013 21:24:49 -0400 Subject: [PATCH] Fix lasers --- common/buildcraft/BuildCraftCore.java | 6 ++++++ common/buildcraft/core/proxy/CoreProxyClient.java | 6 ------ common/buildcraft/core/render/RenderEntityBlock.java | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index 6a703761..f5756270 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -324,7 +324,13 @@ public class BuildCraftCore { iconProvider = new CoreIconProvider(); iconProvider.registerIcons(event.map); actionTriggerIconProvider.registerIcons(event.map); + } else if (event.map == Minecraft.getMinecraft().renderEngine.textureMapBlocks) { + BuildCraftCore.redLaserTexture = event.map.registerIcon("buildcraft:blockRedLaser"); + BuildCraftCore.blueLaserTexture = event.map.registerIcon("buildcraft:blockBlueLaser"); + BuildCraftCore.stripesLaserTexture = event.map.registerIcon("buildcraft:blockStripesLaser"); + BuildCraftCore.transparentTexture = event.map.registerIcon("buildcraft:blockTransparentLaser"); } + } public void loadRecipes() { diff --git a/common/buildcraft/core/proxy/CoreProxyClient.java b/common/buildcraft/core/proxy/CoreProxyClient.java index cea72fab..fa078628 100644 --- a/common/buildcraft/core/proxy/CoreProxyClient.java +++ b/common/buildcraft/core/proxy/CoreProxyClient.java @@ -114,12 +114,6 @@ public class CoreProxyClient extends CoreProxy { RenderingRegistry.registerBlockHandler(BuildCraftCore.legacyPipeModel, new RenderingEntityBlocks()); RenderingRegistry.registerBlockHandler(new RenderingOil()); RenderingRegistry.registerBlockHandler(new RenderingMarkers()); - - TextureMap blockTextureMap = Minecraft.getMinecraft().renderEngine.textureMapItems; - BuildCraftCore.redLaserTexture = blockTextureMap.registerIcon("buildcraft:blockRedLaser"); - BuildCraftCore.blueLaserTexture = blockTextureMap.registerIcon("buildcraft:blockBlueLaser"); - BuildCraftCore.stripesLaserTexture = blockTextureMap.registerIcon("buildcraft:blockStripesLaser"); - BuildCraftCore.transparentTexture = blockTextureMap.registerIcon("buildcraft:blockTransparentLaser"); } @Override diff --git a/common/buildcraft/core/render/RenderEntityBlock.java b/common/buildcraft/core/render/RenderEntityBlock.java index 75181375..be2f12da 100644 --- a/common/buildcraft/core/render/RenderEntityBlock.java +++ b/common/buildcraft/core/render/RenderEntityBlock.java @@ -68,6 +68,7 @@ public class RenderEntityBlock extends Render { World world = entity.worldObj; BlockInterface util = new BlockInterface(); util.texture = entity.texture; + loadTexture("/terrain.png"); for (int iBase = 0; iBase < entity.iSize; ++iBase) { for (int jBase = 0; jBase < entity.jSize; ++jBase) { @@ -86,7 +87,7 @@ public class RenderEntityBlock extends Render { util.maxZ = (remainZ > 1.0 ? 1.0 : remainZ); GL11.glPushMatrix(); - GL11.glTranslatef((float) i + 0.5F, (float) j + 0.5F, (float) k + 0.5F); + GL11.glTranslatef((float) i, (float) j, (float) k); GL11.glRotatef(entity.rotationX, 1, 0, 0); GL11.glRotatef(entity.rotationY, 0, 1, 0); GL11.glRotatef(entity.rotationZ, 0, 0, 1);