public static Entity getEntityActedWith()
	{
		List<Entity>entities = Game.level.getEntities();
		for(int i=0;i<entities.size();i++)
		{
			for(int k=i+1;k<entities.size();k++)
			{
				Entity entity1 = entities.get(i);

				//entity2 is usually player
				Entity entity2= entities.get(k);
				/*
				 * handles action of entities
				 */
				if(entity1 instanceof PlayerEntity || entity2 instanceof PlayerEntity)
				{

					if(entity1.getActionBounds().intersects(entity2.getActionBounds()))
					{
						//System.out.println(entity1+", "+entity2);
						entity1.stopMoving();
						entity2.stopMoving();

						if(entity1 instanceof PlayerEntity)
						{

							return entity2;
						}
						if(entity2 instanceof PlayerEntity)
						{
							return entity1;
						}
						return null;

					}
				}

			}
		}
		return null;
	}