Search in sources :

Example 1 with FactionVillagerProfession

use of de.teamlapen.vampirism.entity.FactionVillagerProfession in project Werewolves by TeamLapen.

the class ModVillage method registerProfessions.

static void registerProfessions(IForgeRegistry<VillagerProfession> registry) {
    VillagerProfession werewolf_expert = new FactionVillagerProfession("werewolf_expert", werewolf_faction, ImmutableSet.of(), ImmutableSet.of(), null) {

        @Override
        public IFaction<?> getFaction() {
            return WReference.WEREWOLF_FACTION;
        }
    }.setRegistryName(REFERENCE.MODID, "werewolf_expert");
    registry.register(werewolf_expert);
    VillagerTrades.TRADES.computeIfAbsent(werewolf_expert, trades -> new Int2ObjectOpenHashMap<>()).putAll(getWerewolfTrades());
}
Also used : WReference(de.teamlapen.werewolves.util.WReference) Int2ObjectOpenHashMap(it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap) Arrays(java.util.Arrays) ImmutableSet(com.google.common.collect.ImmutableSet) FactionVillagerProfession(de.teamlapen.vampirism.entity.FactionVillagerProfession) ImmutableMap(com.google.common.collect.ImmutableMap) UtilLib.getNull(de.teamlapen.lib.lib.util.UtilLib.getNull) Set(java.util.Set) IForgeRegistry(net.minecraftforge.registries.IForgeRegistry) PointOfInterestType(net.minecraft.village.PointOfInterestType) VillagerTrades(net.minecraft.entity.merchant.villager.VillagerTrades) VillagerProfession(net.minecraft.entity.merchant.villager.VillagerProfession) Block(net.minecraft.block.Block) ObjectHolder(net.minecraftforge.registries.ObjectHolder) Map(java.util.Map) REFERENCE(de.teamlapen.werewolves.util.REFERENCE) BlockState(net.minecraft.block.BlockState) IFaction(de.teamlapen.vampirism.api.entity.factions.IFaction) FactionPointOfInterestType(de.teamlapen.vampirism.world.FactionPointOfInterestType) Int2ObjectOpenHashMap(it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap) FactionVillagerProfession(de.teamlapen.vampirism.entity.FactionVillagerProfession) VillagerProfession(net.minecraft.entity.merchant.villager.VillagerProfession) FactionVillagerProfession(de.teamlapen.vampirism.entity.FactionVillagerProfession) IFaction(de.teamlapen.vampirism.api.entity.factions.IFaction)

Aggregations

ImmutableMap (com.google.common.collect.ImmutableMap)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 UtilLib.getNull (de.teamlapen.lib.lib.util.UtilLib.getNull)1 IFaction (de.teamlapen.vampirism.api.entity.factions.IFaction)1 FactionVillagerProfession (de.teamlapen.vampirism.entity.FactionVillagerProfession)1 FactionPointOfInterestType (de.teamlapen.vampirism.world.FactionPointOfInterestType)1 REFERENCE (de.teamlapen.werewolves.util.REFERENCE)1 WReference (de.teamlapen.werewolves.util.WReference)1 Int2ObjectOpenHashMap (it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap)1 Arrays (java.util.Arrays)1 Map (java.util.Map)1 Set (java.util.Set)1 Block (net.minecraft.block.Block)1 BlockState (net.minecraft.block.BlockState)1 VillagerProfession (net.minecraft.entity.merchant.villager.VillagerProfession)1 VillagerTrades (net.minecraft.entity.merchant.villager.VillagerTrades)1 PointOfInterestType (net.minecraft.village.PointOfInterestType)1 IForgeRegistry (net.minecraftforge.registries.IForgeRegistry)1 ObjectHolder (net.minecraftforge.registries.ObjectHolder)1