Re-enabled face culling, re-fixed getPickBlock()

This commit is contained in:
Aidan Brady 2013-07-08 18:52:03 -04:00
parent 745f7d1f44
commit 3f8deb946a
6 changed files with 8 additions and 9 deletions

View file

@ -40,7 +40,6 @@ public class RenderMechanicalPipe extends TileEntitySpecialRenderer
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
GL11.glScalef(1.0F, -1F, -1F);
GL11.glDisable(GL11.GL_CULL_FACE);
boolean[] connectable = PipeUtils.getConnections(tileEntity);

View file

@ -44,7 +44,6 @@ public class RenderPressurizedTube extends TileEntitySpecialRenderer
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
GL11.glScalef(1.0F, -1F, -1F);
GL11.glDisable(GL11.GL_CULL_FACE);
boolean[] connectable = new boolean[] {false, false, false, false, false, false};

View file

@ -37,7 +37,6 @@ public class RenderUniversalCable extends TileEntitySpecialRenderer
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
GL11.glScalef(1.0F, -1F, -1F);
GL11.glDisable(GL11.GL_CULL_FACE);
boolean[] connectable = CableUtils.getConnections(tileEntity);

View file

@ -22,7 +22,6 @@ public class TransmitterRenderer implements ISimpleBlockRenderingHandler
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(180F, 0.0F, -1.0F, 0.0F);
GL11.glTranslated(0.0F, -1.0F, 0.0F);
GL11.glDisable(GL11.GL_CULL_FACE);
switch(metadata)
{

View file

@ -18,6 +18,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.liquids.LiquidContainerRegistry;
@ -383,4 +384,10 @@ public class BlockBasic extends Block
}
}
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
{
return new ItemStack(blockID, 1, world.getBlockMetadata(x, y, z));
}
}

View file

@ -10,7 +10,6 @@ import mekanism.api.Object3D;
import mekanism.common.PacketHandler.Transmission;
import mekanism.common.network.PacketDataRequest;
import mekanism.common.network.PacketTileEntity;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -139,9 +138,6 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer)
{
int id = worldObj.getBlockId(xCoord, yCoord, zCoord);
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
ItemStack drop = new ItemStack(id, 1, meta);
return drop;
return getBlockType().getPickBlock(null, worldObj, xCoord, yCoord, zCoord);
}
}