@Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
ItemStack potionstack = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.WATER);
IBlockState statet = Blocks.AIR.getDefaultState();
if (player.getHeldItem(EnumHand.MAIN_HAND).getItem() == Items.GLASS_BOTTLE) {
worldIn.setBlockState(pos, statet);
player.inventory.clearMatchingItems(new ItemStack(Items.GLASS_BOTTLE).getItem(), -1, 1, null);
player.inventory.addItemStackToInventory(potionstack);
}
return false;
}