Hi I'm trying the following code:
But once I kill the boss... it tells me: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0...
How can i fix that please?
private void mvt2()
{
if(getWorld()!= null)
{
Boss8 boss = (Boss8) getWorld().getObjects(Boss8.class).get(0);
if(Boss8.harvest == true)
{
counter++;
if(counter == 1 || counter == 2)
{
harvestRotation = this.getRotation()+90;
adjust();
}
//harvestRotation = this.getRotation()+90;
if(this.getRotation() != harvestRotation)
{
rotation2++;
adjust();
setRotation(this.getRotation()+rotation2);
}
}
}
}


