Advertisement
robin4002

getBlockTexture

Aug 4th, 2013
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1.     @SideOnly(Side.CLIENT)
  2.     public Icon getBlockTexture(IBlockAccess blockaccess, int x, int y, int z, int side)
  3.     {
  4.         if(blockaccess.getBlockMetadata(x, y, z) == 2)
  5.         {
  6.             TileEntity te = blockaccess.getBlockTileEntity(x, y, z);
  7.             byte direction = ((TileEntityTutorial2)te).getDirection();
  8.             return side == 1 ? Icon3[0] : (side == 0 ? Icon3[1] : (direction == 2 && side == 2 ? Icon3[2] : (direction == 3 && side == 5 ? Icon3[2] : (direction == 0 && side == 3 ? Icon3[2] : (direction == 1 && side == 4 ? Icon3[2] : Icon3[3])))));
  9.         }
  10.         else
  11.         {
  12.             return this.getIcon(side, blockaccess.getBlockMetadata(x, y, z));
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement