@SuppressWarnings("unchecked") protected void receiveAttack(Packet c){
  List<EntityAction> vector=(List<EntityAction>)c.getObject(0);
  int charge=c.getIntValue(1);
  boolean addAction=true;
  for (  EntityAction ea : vector) {
    int entityId=ea.getEntityId();
    if ((ea instanceof TorsoTwistAction) && game.hasEntity(entityId)) {
      TorsoTwistAction tta=(TorsoTwistAction)ea;
      Entity entity=game.getEntity(entityId);
      entity.setSecondaryFacing(tta.getFacing());
    }
 else     if ((ea instanceof FlipArmsAction) && game.hasEntity(entityId)) {
      FlipArmsAction faa=(FlipArmsAction)ea;
      Entity entity=game.getEntity(entityId);
      entity.setArmsFlipped(faa.getIsFlipped());
    }
 else     if ((ea instanceof DodgeAction) && game.hasEntity(entityId)) {
      Entity entity=game.getEntity(entityId);
      entity.dodging=true;
      addAction=false;
    }
 else     if (ea instanceof AttackAction) {
      if (ea instanceof ClubAttackAction) {
        ClubAttackAction caa=(ClubAttackAction)ea;
        Mounted club=caa.getClub();
        club.restore();
      }
    }
    if (addAction) {
      if (charge == 0) {
        game.addAction(ea);
      }
 else       if (charge == 1) {
        game.addCharge((AttackAction)ea);
      }
    }
  }
}

@ SuppressWarnings ( "unchecked" ) protected void receiveAttack ( Packet c ) { List < EntityAction > vector = ( List < EntityAction > ) c . getObject ( 0 ) ; int charge = c . getIntValue ( 1 ) ; boolean addAction = true ; for ( EntityAction ea : vector ) { int entityId = ea . getEntityId ( ) ; if ( ( ea instanceof TorsoTwistAction ) && game . hasEntity ( entityId ) ) { TorsoTwistAction tta = ( TorsoTwistAction ) ea ; Entity entity = game . getEntity ( entityId ) ; entity . setSecondaryFacing ( tta . getFacing ( ) ) ; } else if ( ( ea instanceof FlipArmsAction ) && game . hasEntity ( entityId ) ) { FlipArmsAction faa = ( FlipArmsAction ) ea ; Entity entity = game . getEntity ( entityId ) ; entity . setArmsFlipped ( faa . getIsFlipped ( ) ) ; } else if ( ( ea instanceof DodgeAction ) && game . hasEntity ( entityId ) ) { Entity entity = game . getEntity ( entityId ) ; entity . dodging = true ; addAction = false ; } else if ( ea instanceof AttackAction ) { if ( ea instanceof ClubAttackAction ) { ClubAttackAction caa = ( ClubAttackAction ) ea ; Mounted club = caa . getClub ( ) ; club . restore ( ) ; } } if ( addAction ) { if ( charge == 0 ) { game . addAction ( ea ) ; } else if ( charge == 1 ) { game . addCharge ( ( AttackAction ) ea ) ; } } } }
loads entity firing data from the data in the net command
