Prevented face from rendering when blocked by non-opaque block
This commit is contained in:
parent
aef0e8f44e
commit
ee64d65d62
1 changed files with 56 additions and 51 deletions
|
@ -5,6 +5,7 @@ package resonantinduction.render;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
@ -22,6 +23,7 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.ResonantInduction;
|
||||
import resonantinduction.base.Vector3;
|
||||
import resonantinduction.model.ModelBattery;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -66,7 +68,9 @@ public class RenderBattery extends TileEntitySpecialRenderer
|
|||
for (int i = 2; i < 6; i++)
|
||||
{
|
||||
ForgeDirection direction = ForgeDirection.getOrientation(i);
|
||||
|
||||
Block block = Block.blocksList[new Vector3(t).translate(new Vector3(direction)).getBlockID(t.worldObj)];
|
||||
if (block == null || (block != null && block.isOpaqueCube()))
|
||||
{
|
||||
for (int slot = 0; slot < 4; slot++)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
@ -126,6 +130,7 @@ public class RenderBattery extends TileEntitySpecialRenderer
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void renderItemSimple(EntityItem entityItem)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue