isFalling()
Returns a boolean value indicating whether this particle is in free-fall or not. A particle is falling if it is above the maximum y value and there is nothing in the space immediately underneath it. Be sure not to access the world out of bounds (you cannot fall outside the world).
I have written the above code, but It's showing an error saying "Cannot find Symbol - method getOneAtObjectAtOffset(int, int, boolean)
public boolean isFalling()
{
if (this.getWorld() != null)
{
return (this.getGridY() <
this.getWorld().getHeight() - 1
&& this.getWorld().getOneObjectAtOffset(this.getGridX(),
this.getGridY() + 1, Particle.class == null));
}
return false;
}
