getWorld().getColorAt(getX(),getY())==new Color(51,153,255)
This is the method I'm running. Why won't it work?


getWorld().getBackground().getColorAt(getX(), getY()) == new Color(51, 153, 255)
getWorld().getBackground().getColorAt(getX(), getY()).equals(new Color(51, 153, 255));
getWorld().getBackground().getColorAt(getX(), getY()).equals(new Color(51, 153, 255));