Commits
md_5 authored 3d61a853e35
574 574 | |
575 575 | |
576 576 | public void setAI(boolean ai) { |
577 577 | if (this.getHandle() instanceof EntityInsentient) { |
578 578 | ((EntityInsentient) this.getHandle()).setNoAI(!ai); |
579 579 | } |
580 580 | } |
581 581 | |
582 582 | |
583 583 | public boolean hasAI() { |
584 - | return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).isNoAI(): false; |
584 + | return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).isNoAI() : false; |
585 585 | } |
586 586 | |
587 587 | |
588 588 | public void attack(Entity target) { |
589 589 | Preconditions.checkArgument(target != null, "target == null"); |
590 590 | |
591 591 | getHandle().B(((CraftEntity) target).getHandle()); // PAIL rename attack |
592 592 | } |
593 593 | |
594 594 | |