Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int face, float hitX, float hitY, float hitZ)
- {
- if (!world.isRemote)
- {
- player.openGui(LimpCraft2.INSTANCE, 0, world, x, y, z);
- ((TileEntityCarbonCondenser) world.getTileEntity(x, y, z)).meta = world.getBlockMetadata(x, y, z);
- ((TileEntityCarbonCondenser) world.getTileEntity(x, y, z)).updateCircuitTextures(world, x, y, z);
- world.markBlockForUpdate(x, y, z);
- }
- return true;
- }
- @Override
- @SideOnly(Side.CLIENT)
- public IIcon getIcon(IBlockAccess block, int x, int y, int z, int side)
- {
- if (side == block.getBlockMetadata(x, y, z))
- {
- return this.sideFront;
- }
- if (side != block.getBlockMetadata(x, y, z))
- {
- if (side == ((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).top)
- {
- if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sTop == 0)
- {
- System.out.println("0");
- return this.blockIcon;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sTop == 1)
- {
- System.out.println("1");
- return this.sideImport;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sTop == 2)
- {
- System.out.println("2");
- return this.sideExport;
- }
- }
- if (side == ((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).left)
- {
- if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sLeft == 0)
- {
- return this.blockIcon;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sLeft == 1)
- {
- return this.sideImport;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sLeft == 2)
- {
- return this.sideExport;
- }
- }
- if (side == ((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).back)
- {
- if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sBack == 0)
- {
- return this.blockIcon;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sBack == 1)
- {
- return this.sideImport;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sBack == 2)
- {
- return this.sideExport;
- }
- }
- if (side == ((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).right)
- {
- if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sRight == 0)
- {
- return this.blockIcon;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sRight == 1)
- {
- return this.sideImport;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sRight == 2)
- {
- return this.sideExport;
- }
- }
- if (side == ((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).bot)
- {
- if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sBot == 0)
- {
- return this.blockIcon;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sBot == 1)
- {
- return this.sideImport;
- }
- else if (((TileEntityCarbonCondenser) block.getTileEntity(x, y, z)).sBot == 2)
- {
- return this.sideExport;
- }
- }
- }
- return this.blockIcon;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement