Exemplo n.º 1
0
  public void setMyPet(MyPet myPet) {
    if (myPet != null) {
      super.setMyPet(myPet);
      final MySkeleton mySkeleton = (MySkeleton) myPet;
      final EntityMySkeleton entityMySkeleton = this;

      this.setWither(mySkeleton.isWither());

      MyPetPlugin.getPlugin()
          .getServer()
          .getScheduler()
          .runTaskLater(
              MyPetPlugin.getPlugin(),
              new Runnable() {
                public void run() {
                  if (mySkeleton.getStatus() == PetState.Here) {
                    for (EquipmentSlot slot : EquipmentSlot.values()) {
                      if (mySkeleton.getEquipment(slot) != null) {
                        entityMySkeleton.setPetEquipment(
                            slot.getSlotId(), mySkeleton.getEquipment(slot));
                      }
                    }
                  }
                }
              },
              5L);
    }
  }
Exemplo n.º 2
0
  public void setMyPet(MyPet myPet) {
    if (myPet != null) {
      super.setMyPet(myPet);

      this.setColor(getMyPet().getColor().getWoolData());
      this.setSheared(getMyPet().isSheared());
      this.setBaby(getMyPet().isBaby());
    }
  }
Exemplo n.º 3
0
 public void setPathfinder() {
   super.setPathfinder();
   petPathfinderSelector.addGoal("EatGrass", new EatGrass(this, 0.02));
 }
Exemplo n.º 4
0
 protected void initDatawatcher() {
   super.initDatawatcher();
   this.datawatcher.a(12, new Byte((byte) 0)); // age
   this.datawatcher.a(16, new Byte((byte) 0)); // color/sheared
 }
Exemplo n.º 5
0
 protected void initDatawatcher() {
   super.initDatawatcher();
   this.datawatcher.a(13, new Byte((byte) 0)); // skeleton type
 }