/** 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)); } } }
/** Makes entity wear random armor based on difficulty */ protected void addRandomArmor() { super.addRandomArmor(); this.setCurrentItemOrArmor(0, new ItemStack(Items.bow)); }