private @Nonnull static SetDamage setDamage(Item item, int damage) { return new SetDamage(NO_CONDITIONS, new RandomValueRange(damage > 0 ? damage : 1, damage > 0 ? damage : item.getMaxDamage())); }
LootFunction damage = new SetDamage(noCondition, new RandomValueRange(0F, 0.25F)); pool.addEntry(new LootEntryItem(aiots[i], 30-i*5, 0, new LootFunction[]{damage}, noCondition, ActuallyAdditions.MODID+":aiot"+i)); LootFunction damage = new SetDamage(noCondition, new RandomValueRange(0F, 0.75F)); pool.addEntry(new LootEntryItem(armor[i], 50, 0, new LootFunction[]{damage}, noCondition, ActuallyAdditions.MODID+":armor"+i));