use of trofers.common.loot.AddEntityTrophy in project trofers by ochotonida.
the class LootModifiers method start.
protected void start() {
for (String modid : trophies.trophies.keySet()) {
HashMap<EntityType<?>, ResourceLocation> trophyMap = new HashMap<>();
for (Trophy trophy : trophies.trophies.get(modid)) {
// noinspection ConstantConditions
EntityType<?> entityType = trophy.entity().getType();
trophyMap.put(entityType, trophy.id());
}
ILootCondition[] conditions = new ILootCondition[] { KilledByPlayer.killedByPlayer().build(), RandomTrophyChanceCondition.randomTrophyChance().build() };
AddEntityTrophy modifier = new AddEntityTrophy(conditions, ModItems.SMALL_PLATE.get(), trophyMap);
String name = Trofers.MODID.equals(modid) ? "vanilla" : modid;
name = name + "_trophies";
add(name, ModLootModifiers.ADD_ENTITY_TROPHY.get(), modifier);
}
}
Aggregations