Esempio n. 1
0
  public EntityOcelot b(EntityAgeable entityageable) {
    EntityOcelot entityocelot = new EntityOcelot(this.world);

    if (this.isTamed()) {
      entityocelot.setOwnerUUID(this.getOwnerUUID());
      entityocelot.setTamed(true);
      entityocelot.setCatType(this.getCatType());
    }

    return entityocelot;
  }
Esempio n. 2
0
  /**
   * This function is used when two same-species animals in 'love mode' breed to generate the new
   * baby animal.
   */
  public EntityAnimal spawnBabyAnimal(EntityAnimal par1EntityAnimal) {
    EntityOcelot var2 = new EntityOcelot(this.worldObj);

    if (this.isTamed()) {
      var2.setOwner(this.getOwnerName());
      var2.setTamed(true);
      var2.setTameSkin(this.func_48375_r());
    }

    return var2;
  }
Esempio n. 3
0
 public boolean func_48362_b(EntityAnimal par1EntityAnimal) {
   if (par1EntityAnimal == this) {
     return false;
   } else if (!this.isTamed()) {
     return false;
   } else if (!(par1EntityAnimal instanceof EntityOcelot)) {
     return false;
   } else {
     EntityOcelot var2 = (EntityOcelot) par1EntityAnimal;
     return !var2.isTamed() ? false : this.isInLove() && var2.isInLove();
   }
 }
Esempio n. 4
0
  public boolean mate(EntityAnimal entityanimal) {
    if (entityanimal == this) {
      return false;
    } else if (!this.isTamed()) {
      return false;
    } else if (!(entityanimal instanceof EntityOcelot)) {
      return false;
    } else {
      EntityOcelot entityocelot = (EntityOcelot) entityanimal;

      return !entityocelot.isTamed() ? false : this.ce() && entityocelot.ce();
    }
  }
Esempio n. 5
0
  public GroupDataEntity a(GroupDataEntity groupdataentity) {
    groupdataentity = super.a(groupdataentity);
    if (this.world.random.nextInt(7) == 0) {
      for (int i = 0; i < 2; ++i) {
        EntityOcelot entityocelot = new EntityOcelot(this.world);

        entityocelot.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
        entityocelot.setAge(-24000);
        this.world.addEntity(
            entityocelot,
            org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason
                .OCELOT_BABY); // CraftBukkit - add SpawnReason
      }
    }

    return groupdataentity;
  }