Пример #1
0
  /** Makes entity wear random armor based on difficulty */
  protected void addRandomArmor() {
    super.addRandomArmor();

    if (this.rand.nextFloat() < (this.worldObj.difficultySetting == 3 ? 0.05F : 0.01F)) {
      int i = this.rand.nextInt(3);

      if (i == 0) {
        this.setCurrentItemOrArmor(0, new ItemStack(Item.swordIron));
      } else {
        this.setCurrentItemOrArmor(0, new ItemStack(Item.shovelIron));
      }
    }
  }
Пример #2
0
 /** Makes entity wear random armor based on difficulty */
 protected void addRandomArmor() {
   super.addRandomArmor();
   this.setCurrentItemOrArmor(0, new ItemStack(Items.bow));
 }