Java 类cpw.mods.fml.common.registry.VillagerRegistry 实例源码

项目:MidgarCrusade    文件:RenderVillagerDim.java   
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityVillager p_110775_1_)
{
    switch (p_110775_1_.getProfession())
    {
        case 0:
            return farmerVillagerTextures;
        case 1:
            return librarianVillagerTextures;
        case 2:
            return priestVillagerTextures;
        case 3:
            return smithVillagerTextures;
        case 4:
            return butcherVillagerTextures;
        default:
            return VillagerRegistry.getVillagerSkin(p_110775_1_.getProfession(), villagerTextures);
    }
}
项目:PopularMMOS-EpicProportions-Mod    文件:StructureVillagePieces.java   
public static List getStructureVillageWeightedPieceList(Random p_75084_0_, int p_75084_1_)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House1.class, 20, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 2 + p_75084_1_)));

    VillagerRegistry.addExtraVillageComponents(arraylist, p_75084_0_, p_75084_1_);

    Iterator iterator = arraylist.iterator();

    while (iterator.hasNext())
    {
        if (((StructureVillagePieces.PieceWeight)iterator.next()).villagePiecesLimit == 0)
        {
            iterator.remove();
        }
    }

    return arraylist;
}
项目:TectoCraft    文件:TectoCraft.java   
@EventHandler
public void preInit(FMLPreInitializationEvent event){
     if (FMLCommonHandler.instance().getSide().isClient())
        {
            KeyBindings.SetupKeyBindings();
            FMLCommonHandler.instance().bus().register(new KeyInputHandler());
        }
    ModRegistry.preInit();

    NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());

    //FMLCommonHandler.instance().bus().register(new ClientTickHandler());
    System.out.println("[TectoCraft] AutoUpdate System initialized");
    for (int i = 0; i < 5; ++i) {
        VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());
    }
}
项目:MagicalRings    文件:ProxyClient.java   
@Override
public void init() {
    super.init();
    ModLibs.altarRenderID = RenderingRegistry.getNextAvailableRenderId();
    ModLibs.ctRenderID = RenderingRegistry.getNextAvailableRenderId();
    RenderAltar altarRenderer = new RenderAltar();

    RenderingRegistry.registerBlockHandler(new RenderCTBlock(ModLibs.ctRenderID));

    ClientRegistry.bindTileEntitySpecialRenderer(TileAltar.class, altarRenderer);
    ClientRegistry.bindTileEntitySpecialRenderer(TileItemAltar.class, altarRenderer);

    MinecraftForgeClient.registerItemRenderer(ModItems.spellParchment, new RenderSpellParchment());
    MinecraftForgeClient.registerItemRenderer(ModItems.ghostSword, new RenderGhostSword());
    MinecraftForgeClient.registerItemRenderer(ModItems.magicRing, new RenderRing());


    FMLCommonHandler.instance().bus().register(tickClient);

    MinecraftForge.EVENT_BUS.register(renderHandler);

    VillagerRegistry.instance().registerVillagerSkin(ModLibs.villagerID, new ResourceLocation(ModLibs.MOD_ID.toLowerCase() + ":textures/entities/manaVillager.png"));
}
项目:MagicalRings    文件:Proxy.java   
public void preInit() {
    ModItems.loadItems();
    ModBlocks.loadBlocks();
    spellRegistry = new SpellRegistry();
    ringMaterials = new RingMaterialRegistry();
    genManager = new WorldGenHandler();
    tickHandler = new TickHandlerCore();
    manaHandler = new ManaHandler();
    pageUtil = new PageUtil();
    infusionRegistry = new InfusionRegistry();
    renderHandler = new RenderHandler();
    tickClient = new TickHandlerClient();

    VillagerRegistry.instance().registerVillagerId(ModLibs.villagerID);
    VillagerRegistry.instance().registerVillageTradeHandler(ModLibs.villagerID, new RingVillager());
}
项目:Cauldron    文件:StructureVillagePieces.java   
public static List getStructureVillageWeightedPieceList(Random p_75084_0_, int p_75084_1_)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House4Garden.class, 4, MathHelper.getRandomIntegerInRange(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Church.class, 20, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 1 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House1.class, 20, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 2 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.WoodHut.class, 3, MathHelper.getRandomIntegerInRange(p_75084_0_, 2 + p_75084_1_, 5 + p_75084_1_ * 3)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Hall.class, 15, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 2 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Field1.class, 3, MathHelper.getRandomIntegerInRange(p_75084_0_, 1 + p_75084_1_, 4 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Field2.class, 3, MathHelper.getRandomIntegerInRange(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House2.class, 15, MathHelper.getRandomIntegerInRange(p_75084_0_, 0, 1 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House3.class, 8, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 3 + p_75084_1_ * 2)));
    VillagerRegistry.addExtraVillageComponents(arraylist, p_75084_0_, p_75084_1_);

    Iterator iterator = arraylist.iterator();

    while (iterator.hasNext())
    {
        if (((StructureVillagePieces.PieceWeight)iterator.next()).villagePiecesLimit == 0)
        {
            iterator.remove();
        }
    }

    return arraylist;
}
项目:Cauldron    文件:RenderVillager.java   
protected ResourceLocation getEntityTexture(EntityVillager p_110775_1_)
{
    switch (p_110775_1_.getProfession())
    {
        case 0:
            return farmerVillagerTextures;
        case 1:
            return librarianVillagerTextures;
        case 2:
            return priestVillagerTextures;
        case 3:
            return smithVillagerTextures;
        case 4:
            return butcherVillagerTextures;
        default:
            return VillagerRegistry.getVillagerSkin(p_110775_1_.getProfession(), villagerTextures);
    }
}
项目:Cauldron    文件:StructureVillagePieces.java   
public static List getStructureVillageWeightedPieceList(Random p_75084_0_, int p_75084_1_)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House4Garden.class, 4, MathHelper.getRandomIntegerInRange(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Church.class, 20, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 1 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House1.class, 20, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 2 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.WoodHut.class, 3, MathHelper.getRandomIntegerInRange(p_75084_0_, 2 + p_75084_1_, 5 + p_75084_1_ * 3)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Hall.class, 15, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 2 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Field1.class, 3, MathHelper.getRandomIntegerInRange(p_75084_0_, 1 + p_75084_1_, 4 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Field2.class, 3, MathHelper.getRandomIntegerInRange(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House2.class, 15, MathHelper.getRandomIntegerInRange(p_75084_0_, 0, 1 + p_75084_1_)));
    arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House3.class, 8, MathHelper.getRandomIntegerInRange(p_75084_0_, 0 + p_75084_1_, 3 + p_75084_1_ * 2)));
    VillagerRegistry.addExtraVillageComponents(arraylist, p_75084_0_, p_75084_1_);

    Iterator iterator = arraylist.iterator();

    while (iterator.hasNext())
    {
        if (((StructureVillagePieces.PieceWeight)iterator.next()).villagePiecesLimit == 0)
        {
            iterator.remove();
        }
    }

    return arraylist;
}
项目:Cauldron    文件:RenderVillager.java   
protected ResourceLocation getEntityTexture(EntityVillager p_110775_1_)
{
    switch (p_110775_1_.getProfession())
    {
        case 0:
            return farmerVillagerTextures;
        case 1:
            return librarianVillagerTextures;
        case 2:
            return priestVillagerTextures;
        case 3:
            return smithVillagerTextures;
        case 4:
            return butcherVillagerTextures;
        default:
            return VillagerRegistry.getVillagerSkin(p_110775_1_.getProfession(), villagerTextures);
    }
}
项目:RuneCraftery    文件:StructureVillagePieces.java   
public static List getStructureVillageWeightedPieceList(Random par0Random, int par1)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse4_Garden.class, 4, MathHelper.getRandomIntegerInRange(par0Random, 2 + par1, 4 + par1 * 2)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageChurch.class, 20, MathHelper.getRandomIntegerInRange(par0Random, 0 + par1, 1 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse1.class, 20, MathHelper.getRandomIntegerInRange(par0Random, 0 + par1, 2 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageWoodHut.class, 3, MathHelper.getRandomIntegerInRange(par0Random, 2 + par1, 5 + par1 * 3)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHall.class, 15, MathHelper.getRandomIntegerInRange(par0Random, 0 + par1, 2 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageField.class, 3, MathHelper.getRandomIntegerInRange(par0Random, 1 + par1, 4 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageField2.class, 3, MathHelper.getRandomIntegerInRange(par0Random, 2 + par1, 4 + par1 * 2)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse2.class, 15, MathHelper.getRandomIntegerInRange(par0Random, 0, 1 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse3.class, 8, MathHelper.getRandomIntegerInRange(par0Random, 0 + par1, 3 + par1 * 2)));
    VillagerRegistry.addExtraVillageComponents(arraylist, par0Random, par1);

    Iterator iterator = arraylist.iterator();

    while (iterator.hasNext())
    {
        if (((StructureVillagePieceWeight)iterator.next()).villagePiecesLimit == 0)
        {
            iterator.remove();
        }
    }

    return arraylist;
}
项目:RuneCraftery    文件:RenderVillager.java   
protected ResourceLocation func_110902_a(EntityVillager par1EntityVillager)
{
    switch (par1EntityVillager.getProfession())
    {
        case 0:
            return farmerVillagerTextures;
        case 1:
            return librarianVillagerTextures;
        case 2:
            return priestVillagerTextures;
        case 3:
            return smithVillagerTextures;
        case 4:
            return butcherVillagerTextures;
        default:
            return VillagerRegistry.getVillagerSkin(par1EntityVillager.getProfession(), villagerTextures);
    }
}
项目:TheStuffMod    文件:ClientProxy.java   
@Override
public void registerRenderers() {
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPipe.class, new TileEntityRenderPipe());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCable.class, new TileEntityRenderCable());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShell.class, new TileEntityRenderShell());

    MinecraftForgeClient.registerItemRenderer(ModArmour.shell, new CustomItemRenderer(new TileEntityRenderShell(), new TileEntityShell()));

    RenderingRegistry.registerEntityRenderingHandler(EntityMummy.class, new RenderMummy(new ModelZombie(), 0));;
    RenderingRegistry.registerEntityRenderingHandler(EntityPirate.class, new RenderPirate(new ModelPirate(), 0));;
    RenderingRegistry.registerEntityRenderingHandler(EntitySenthant.class, new RenderSenthant(new ModelSenthant(), 0));;
    RenderingRegistry.registerEntityRenderingHandler(EntityTurtle.class, new RenderTurtle(new ModelTurtle(), 0));;
    RenderingRegistry.registerEntityRenderingHandler(EntityBear.class, new RenderBear(new ModelBear(), 0));;
    RenderingRegistry.registerEntityRenderingHandler(EntityPanda.class, new RenderPanda(new ModelBear(), 0));;
    RenderingRegistry.registerEntityRenderingHandler(EntityGrawquat.class, new RenderGrawquat(new ModelGrawquat(), 0));;
    RenderingRegistry.registerEntityRenderingHandler(EntityLyekhwrone.class, new RenderLyekhwrone(new ModelLyekhwrone(), 0));;

    RenderingRegistry.registerEntityRenderingHandler(EntityLyekstone.class, new RenderSnowball(ModItems.lyekstone));

    VillagerRegistry.instance().registerVillagerSkin(56329, new ResourceLocation(Reference.MOD_ID, "textures/entity/villager.png"));
}
项目:TheStuffMod    文件:allthethings.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    ModBlocksPreItems.init();
    ModMisc.init();
    ModOreDictRegister.init();
    ModTileEntities.init();
    ModAchievements.init();
    ModBiomes.init();
    ModEntities.init();
    ModPotions.init();
    ModDungeonLoot.init();
    proxy.registerRenderers();
    GameRegistry.registerFuelHandler(new FuelHandler());
    GameRegistry.registerWorldGenerator(new ModWorldGen(), 0);
    VillagerRegistry.instance().registerVillageCreationHandler(new VillageHouseHandler());
    MapGenStructureIO.func_143031_a(VillageStructureHouse.class, Reference.MOD_ID+":HouseStructure");
    MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
    MinecraftForge.EVENT_BUS.register(new ChatHandler());
    MinecraftForge.TERRAIN_GEN_BUS.register(new FlowerHandler());
    LogHelper.info("World Gen initialised successfully!");
    NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
}
项目:BetterNutritionMod    文件:StructureVillagePieces.java   
public static List getStructureVillageWeightedPieceList(Random par0Random, int par1)
{
    ArrayList arraylist = new ArrayList();
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse4_Garden.class, 4, MathHelper.getRandomIntegerInRange(par0Random, 2 + par1, 4 + par1 * 2)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageChurch.class, 20, MathHelper.getRandomIntegerInRange(par0Random, 0 + par1, 1 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse1.class, 20, MathHelper.getRandomIntegerInRange(par0Random, 0 + par1, 2 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageWoodHut.class, 3, MathHelper.getRandomIntegerInRange(par0Random, 2 + par1, 5 + par1 * 3)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHall.class, 15, MathHelper.getRandomIntegerInRange(par0Random, 0 + par1, 2 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageField.class, 3, MathHelper.getRandomIntegerInRange(par0Random, 1 + par1, 4 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageField2.class, 3, MathHelper.getRandomIntegerInRange(par0Random, 2 + par1, 4 + par1 * 2)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse2.class, 15, MathHelper.getRandomIntegerInRange(par0Random, 0, 1 + par1)));
    arraylist.add(new StructureVillagePieceWeight(ComponentVillageHouse3.class, 8, MathHelper.getRandomIntegerInRange(par0Random, 0 + par1, 3 + par1 * 2)));
    VillagerRegistry.addExtraVillageComponents(arraylist, par0Random, par1);

    Iterator iterator = arraylist.iterator();

    while (iterator.hasNext())
    {
        if (((StructureVillagePieceWeight)iterator.next()).villagePiecesLimit == 0)
        {
            iterator.remove();
        }
    }

    return arraylist;
}
项目:BetterNutritionMod    文件:RenderVillager.java   
protected ResourceLocation func_110902_a(EntityVillager par1EntityVillager)
{
    switch (par1EntityVillager.getProfession())
    {
        case 0:
            return farmerVillagerTextures;
        case 1:
            return librarianVillagerTextures;
        case 2:
            return priestVillagerTextures;
        case 3:
            return smithVillagerTextures;
        case 4:
            return butcherVillagerTextures;
        default:
            return VillagerRegistry.getVillagerSkin(par1EntityVillager.getProfession(), villagerTextures);
    }
}
项目:Technical    文件:Technical.java   
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
    TechnicalBlock.registerBlocks();
    TechnicalItem.registerItems();
    TechnicalTools.registerTools();
    GameRegistry.registerWorldGenerator(this.eventWorldGen, 0);

    proxy.registerTileEntities();

    ((Item) Item.itemRegistry.getObject("water_bucket")).setMaxStackSize(16);

    for (int i = 0; i < 5; ++i) {
        VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());
    }

    Potion[] potionTypes;
    for (Field f : Potion.class.getDeclaredFields()) {
        f.setAccessible(true);
        try {
            if (f.getName().equals("potionTypes") || f.getName().equals("field_76425_a")) {
                Field modfield = Field.class.getDeclaredField("modifiers");
                modfield.setAccessible(true);
                modfield.setInt(f, f.getModifiers() & ~Modifier.FINAL);
                potionTypes = (Potion[]) f.get(null);
                final Potion[] newPotionTypes = new Potion[256];
                System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length);
                f.set(null, newPotionTypes);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    MinecraftForge.EVENT_BUS.register(new TechnicalEventHooks());
    MinecraftForge.ORE_GEN_BUS.register(new TechnicalOreGenEventHooks());
}
项目:MidgarCrusade    文件:CommonProxy.java   
public void load()
{
    BlockRegister.load();
    ItemRegister.load();
    CreativesTabsRegister.load();
    CreativesTabsRegister.loadAll();
    EntityRegister.load(); 
    CraftRegister.load();

    DimensionManager.registerProviderType(Main.DIM_ID, WorldProviderMagic.class, true);
    DimensionManager.registerDimension(Main.DIM_ID, Main.DIM_ID);

    for (Dungeon d : Main.DUNGEONS)
    {
        DimensionManager.registerProviderType(d.DIM_ID, WorldProviderDungeon.class, true);
        DimensionManager.registerDimension(d.DIM_ID, d.DIM_ID);
    }

    GameRegistry.registerWorldGenerator(new WorldGenChestElficStaff(), 0);
       GameRegistry.registerWorldGenerator(new WorldGenOrc(), 0);
       GameRegistry.registerWorldGenerator(new WorldGenFloatingHouse(), 0);
       GameRegistry.registerWorldGenerator(new WorldGenFloatingHouse2(), 0);
       GameRegistry.registerWorldGenerator(new WorldGenFloatingDungeon(), 0);
       GameRegistry.registerWorldGenerator(new WorldGenVillage(), 0);

    ServerPlayerAPI.register("Magic Crusade", ServerPlayerBaseMagic.class);

    for (int i = 0; i < 5; ++i)
        VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());

    this.register_event(new ServerEvent());
    this.register_event(new JoueurEvent());
    this.register_event(new LivingEntityEvent());

    AchievementList.load();
}
项目:Coding    文件:BarWenchCreationHandler.java   
public static void init() {
    BarWenchCreationHandler barWench = new BarWenchCreationHandler();
    VillagerRegistry.instance().registerVillageTradeHandler(BarWenchCreationHandler.BAR_WENCH, barWench);
    VillagerRegistry.instance().registerVillagerId(BarWenchCreationHandler.BAR_WENCH);
    texture = new ResourceLocation(REFERENCE.MODID + ":textures/entity/barwench.png");
    VillagerRegistry.instance().registerVillagerSkin(BarWenchCreationHandler.BAR_WENCH, texture);       
}
项目:Coding    文件:VillagerBakeryTradeHandler.java   
public static void init() {
    VillagerBakeryTradeHandler baker = new VillagerBakeryTradeHandler();
    VillagerRegistry.instance().registerVillageTradeHandler(VillagerBakeryTradeHandler.BAKER, baker);
    VillagerRegistry.instance().registerVillagerId(VillagerBakeryTradeHandler.BAKER);
    texture = new ResourceLocation(REFERENCE.MODID + ":textures/entity/baker.png");
    VillagerRegistry.instance().registerVillagerSkin(VillagerBakeryTradeHandler.BAKER, texture);        
}
项目:Structures    文件:VillagerGenerator.java   
@Override
public void register() {
  if(getVillagerId() > 0) {
    if(!VillagerRegistry.getRegisteredVillagers().contains(getVillagerId())) {
      VillagerRegistry.instance().registerVillagerId(getVillagerId());
    }
  }
  onReload();
}
项目:Structures    文件:VillagerGenerator.java   
@Override
public void onReload() {
  if(creationHandler.hasVillager()) {
    VillagerRegistry.instance().registerVillagerSkin(getVillagerId(), texture);
    VillagerRegistry.instance().registerVillageTradeHandler(getVillagerId(), tradeHandler);
  }    
}
项目:CcmBurialServicesInc    文件:ClientProxy.java   
@Override
public void preInit(FMLPreInitializationEvent event)
{
    super.preInit(event);

    ClientRegistry.bindTileEntitySpecialRenderer(GraveTE.class, new GraveRenderer());
    VillagerRegistry.instance().registerVillagerSkin(BurialServices.getConfig().villagerID, new ResourceLocation(MODID.toLowerCase(), "textures/entity/villagerUndertaker.png"));
}
项目:CcmBurialServicesInc    文件:CommonProxy.java   
public void preInit(FMLPreInitializationEvent event)
{
    new GraveBlock(BurialServices.getConfig().graveBlockID);
    GameRegistry.registerTileEntity(GraveTE.class, "GraveTE");
    GameRegistry.registerBlock(GraveBlock.getInstance(), "GraveBlock");
    LanguageRegistry.addName(GraveBlock.getInstance(), "Grave");

    VillagerRegistry.instance().registerVillagerId(BurialServices.getConfig().villagerID);
    VillagerRegistry.instance().registerVillageTradeHandler(BurialServices.getConfig().villagerID, new VillageTradeHandler());
    VillagerRegistry.instance().registerVillageCreationHandler(new GraveyardHandler());

    EventHandler.INSTANCE.init();
    GuiHandler.INSTANCE.init();
}
项目:Carnival    文件:ModWorld.java   
public static void init()
{
    LogHelper.info("Init World Stuff");
    VillagerRegistry.instance().registerVillageCreationHandler(new VillageBigTop.VillageManager());

    try{
        LogHelper.info("Trying to add big top");
        MapGenStructureIO.func_143031_a(VillageBigTop.class, "CarnivalVillageBigTop");
    }catch (Exception e){
        LogHelper.info("No Big top for you");
    }

}
项目:Magicians-Artifice    文件:MAEntityRegistry.java   
private static void registerVillagers() {
       try {
           MapGenStructureIO.func_143031_a(ComponentMageTower.class, ModInfo.MODID + ":MageTower");
       }
       catch (Throwable e2) {
           MagiciansArtifice.logger.error("Error registering Magician's Artifice Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.2");
       }
       VillageHandlerMagician villageHandler = new VillageHandlerMagician();
    VillagerRegistry.instance().registerVillagerId(villagerID);
    VillagerRegistry.instance().registerVillageTradeHandler(villagerID, villageHandler);
       VillagerRegistry.instance().registerVillageCreationHandler(new VillageHandlerMagician());
}
项目:Magicians-Artifice    文件:ClientProxy.java   
private void renderEntities() {
    VillagerRegistry.instance().registerVillagerSkin(MAEntityRegistry.villagerID, MAEntityRegistry.texture);

    RenderingRegistry.registerEntityRenderingHandler(EntityMagician.class, new RenderEntityMagician(new ModelMagician(), 1F));
    RenderingRegistry.registerEntityRenderingHandler(EntitySoulFragment.class, new RenderEntitySoulFragment(new ModelBiped(), 1F));
    RenderingRegistry.registerEntityRenderingHandler(EntityBossOverworld.class, new RenderBossOverworld(new ModelOverworldBoss(), 1F));
    RenderingRegistry.registerEntityRenderingHandler(EntityBossNether.class, new RenderBossNether(new ModelNetherBoss(), 1F));
    RenderingRegistry.registerEntityRenderingHandler(EntityBossEnder.class, new RenderBossEnder(new ModelEndBoss(), 1F));
    RenderingRegistry.registerEntityRenderingHandler(EntityPetPheonix.class, new RenderPetPheonix(new ModelVillager(0.0F), 1F));
    RenderingRegistry.registerEntityRenderingHandler(EntityPetAppling.class, new RenderPetAppling(new ModelAppling(), 1F));
    RenderingRegistry.registerEntityRenderingHandler(EntityPetRat.class, new RenderPetRat(new ModelVillager(0.0F), 1F));
    RenderingRegistry.registerEntityRenderingHandler(EntityPetDragon.class, new RenderPetDragon(new ModelVillager(0.0F), 1F));
}
项目:GardenCollection    文件:VillagerTradeHandler.java   
public void load () {
    if (GardenContainers.config.enableVillagerTrading) {
        VillagerRegistry.instance().registerVillageTradeHandler(1, this);
        VillagerRegistry.instance().registerVillageTradeHandler(2, this);
        VillagerRegistry.instance().registerVillageTradeHandler(3, this);
    }
}
项目:A-Cup-of-Java    文件:ModVillager.java   
public static void init()
{
    while (VillagerRegistry.getRegisteredVillagers().contains(ACOJ.VILLAGER_ID))
    {
        LogHelper.info(ACOJ.VILLAGER_ID);
        ACOJ.VILLAGER_ID++;
    }
    VillagerRegistry.instance().registerVillagerId(ACOJ.VILLAGER_ID);
    VillagerRegistry.instance().registerVillagerSkin(ACOJ.VILLAGER_ID, ResourceLocations.ACOJVillager);
    VillagerRegistry.instance().registerVillageTradeHandler(ACOJ.VILLAGER_ID, new VillagerTradeHandler());
}
项目:OresPlus    文件:OresPlus.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    RecipeManager.initRecipes();

    GameRegistry.registerTileEntity(TileEntityGrinder.class, "TileEntityGrinder");
    GameRegistry.registerTileEntity(TileEntityCracker.class, "TileEntityCracker");

    MinecraftForge.EVENT_BUS.register(eventHandler);
    MinecraftForge.EVENT_BUS.register(bucketHandler);
    MinecraftForge.ORE_GEN_BUS.register(eventHandler);
    FMLCommonHandler.instance().bus().register(tickHandler);

    NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());

    itemMapHelper = new ItemMapHelper();

    //OresTrigger.registerTriggers();
    //ActionManager.registerTriggerProvider(new TriggerProvider());

    VillagerRegistry.instance().registerVillageTradeHandler(VillagerTradeHandler.VILLAGER_BLACKSMITH, new VillagerTradeHandler(VillagerTradeHandler.VILLAGER_BLACKSMITH));

    NetHandler.init();

    for (Helpers helper : Helpers.values()) {
        helper.init();
    }
}
项目:ForbiddenMagic    文件:Forbidden.java   
@EventHandler
public void crescendo(FMLInitializationEvent event) {
    events = new FMEventHandler();
    MinecraftForge.EVENT_BUS.register(events);
    FMLCommonHandler.instance().bus().register(events);
    VillagerRegistry.instance().registerVillagerId(Config.hereticID);
    VillagerRegistry.instance().registerVillageTradeHandler(Config.hereticID, new VillagerHereticManager());
}
项目:RuneCraftery    文件:ModLoaderVillageTradeHandler.java   
@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random)
{
    for (TradeEntry ent : trades)
    {
        if (ent.buying)
        {
            VillagerRegistry.addEmeraldBuyRecipe(villager, recipeList, random, Item.field_77698_e[ent.id], ent.chance, ent.min, ent.max);
        }
        else
        {
            VillagerRegistry.addEmeraldSellRecipe(villager, recipeList, random, Item.field_77698_e[ent.id], ent.chance, ent.min, ent.max);
        }
    }
}
项目:RuneCraftery    文件:ModLoaderVillageTradeHandler.java   
@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random)
{
    for (TradeEntry ent : trades)
    {
        if (ent.buying)
        {
            VillagerRegistry.addEmeraldBuyRecipe(villager, recipeList, random, Item.itemsList[ent.id], ent.chance, ent.min, ent.max);
        }
        else
        {
            VillagerRegistry.addEmeraldSellRecipe(villager, recipeList, random, Item.itemsList[ent.id], ent.chance, ent.min, ent.max);
        }
    }
}
项目:CFGVillager    文件:CFGVillager.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    for (int i = 0; i < ConfigurationHandler.countVillagers; i++)
    {
        //TODO: figure out how to get the textures from an outside location
        ResourceLocation tPath = new ResourceLocation("cfgvillager" , "villager_" + Integer.toString(i+1) + ".png");
        int id = ConfigurationHandler.idBase + i;

        //registers new villager, first id (int) then texture path (ResourceLocation)
        VillagerRegistry.instance().registerVillagerId(id);
        VillagerRegistry.instance().registerVillagerSkin( id, tPath);

        VillagerRegistryMCA.registerVillagerType(id);

        String villagertrades[][] = ConfigurationHandler.trades[i];

        CFGVillagerHandler newTradeHandler = new CFGVillagerHandler(villagertrades);

        VillagerRegistry.instance().registerVillageTradeHandler(id, newTradeHandler);
    }

    VillagerRegistry.instance();

    //required to get Villagers spawning naturaly
    VillagerRegistry.getRegisteredVillagers();
}
项目:BetterNutritionMod    文件:ModLoaderVillageTradeHandler.java   
@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random)
{
    for (TradeEntry ent : trades)
    {
        if (ent.buying)
        {
            VillagerRegistry.addEmeraldBuyRecipe(villager, recipeList, random, Item.itemsList[ent.id], ent.chance, ent.min, ent.max);
        }
        else
        {
            VillagerRegistry.addEmeraldSellRecipe(villager, recipeList, random, Item.itemsList[ent.id], ent.chance, ent.min, ent.max);
        }
    }
}
项目:Necromancy    文件:Necromancy.java   
private void init() {
    LanguageRegistry.instance().addStringLocalization("itemGroup.Necromancy", "en_US", "Necromancy");
    LanguageRegistry.instance().addStringLocalization("itemGroup.BodyParts", "en_US", "Bodyparts");
    ItemNecromancy.initItems();
    EntityNecromancy.initEntities();
    BlockNecromancy.initBlocks();
    Proxy.init();
    VillagerRegistry.instance().registerVillageCreationHandler(PacketHandler);
    ArrayList<Class<PacketHandler>> villageComponentsList = new ArrayList<Class<PacketHandler>>();
    villageComponentsList.add(PacketHandler.class);

    GameRegistry.registerWorldGenerator(new WorldGenerator());
}
项目:Oceania    文件:Entities.java   
public static void initEntities()
{
    EntityRegistry.registerModEntity(EntityOceaniaBoatNormal.class, "OceaniaBoat", 0, Oceania.INSTANCE, 80, 3, true);
    EntityRegistry.registerModEntity(EntityOceaniaBoatWithChest.class, "OceaniaBoatWithChest", 1, Oceania.INSTANCE, 80, 3, true);
    EntityRegistry.registerModEntity(EntitySubmarine.class, "Submarine", 2, Oceania.INSTANCE, 80, 3, true);

    VILLAGER_OCEANIA_ID = VillagerRegistry.getRegisteredVillagers().size();
    VillagerRegistry.instance().registerVillagerId(VILLAGER_OCEANIA_ID);
    // TODO: Post ModJam - Have a custom skin for the villager.
    if (OUtil.getSide() == Side.CLIENT)
        VillagerRegistry.instance().registerVillagerSkin(VILLAGER_OCEANIA_ID, new ResourceLocation("textures/entity/villager/smith.png"));
    VillagerRegistry.instance().registerVillageTradeHandler(VILLAGER_OCEANIA_ID, new VillageTradeHandler());
}
项目:Coding    文件:WoodHutCreationHandler.java   
public static void init() {
        WoodHutCreationHandler woodHutCreator = new WoodHutCreationHandler();
    VillagerRegistry.instance().registerVillageCreationHandler(woodHutCreator);
}
项目:Coding    文件:House3CreationHandler.java   
public static void init() {
        House3CreationHandler house3Creator = new House3CreationHandler();
    VillagerRegistry.instance().registerVillageCreationHandler(house3Creator);
}
项目:Coding    文件:CatapultTower.java   
public static void init() {
    CatapultTower.addVillagePiece(CatapultTower.class, "ViCatTwr");
    CatapultTowerCreationHandler catapultTower = new CatapultTowerCreationHandler();
    VillagerRegistry.instance().registerVillageCreationHandler(catapultTower);
}
项目:Coding    文件:BallistaTower.java   
public static void init() {
    BallistaTower.addVillagePiece(BallistaTower.class, "ViBallTwr");
    BallistaTowerCreationHandler ballistaTower = new BallistaTowerCreationHandler();
    VillagerRegistry.instance().registerVillageCreationHandler(ballistaTower);
}