本文整理汇总了Java中net.minecraftforge.common.DungeonHooks.addDungeonMob方法的典型用法代码示例。如果您正苦于以下问题:Java DungeonHooks.addDungeonMob方法的具体用法?Java DungeonHooks.addDungeonMob怎么用?Java DungeonHooks.addDungeonMob使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.common.DungeonHooks
的用法示例。
在下文中一共展示了DungeonHooks.addDungeonMob方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EntityCandyMan
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public EntityCandyMan(World var1)
{
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(6, new EntityAIWander(this, 0.6D));
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
this.hasCustomNameTag();
this.setCustomNameTag("�2The Candy Man");
addRandomArmor();
DungeonHooks.addDungeonMob("�2The Candy Man", 180);
}
示例2: EntityPat
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public EntityPat(World var1)
{
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(6, new EntityAIWander(this, 0.6D));
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
this.hasCustomNameTag();
this.setCustomNameTag("FuriousDestroyer");
addRandomArmor();
DungeonHooks.addDungeonMob("FuriousDestroyer", 180);
}
示例3: EntityCaptianCookie
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public EntityCaptianCookie(World var1)
{
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(6, new EntityAIWander(this, 0.6D));
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
this.hasCustomNameTag();
this.setCustomNameTag("Captian Cookie");
addRandomArmor();
DungeonHooks.addDungeonMob("Captian Cookie", 180);
}
示例4: EntityJen
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public EntityJen(World var1)
{
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(6, new EntityAIWander(this, 0.6D));
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
this.hasCustomNameTag();
this.setCustomNameTag("SuperGirlyGamer");
addRandomArmor();
DungeonHooks.addDungeonMob("SuperGirlyGamer", 180);
}
示例5: EntitySpookyPat
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public EntitySpookyPat(World var1)
{
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(6, new EntityAIWander(this, 0.6D));
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
this.hasCustomNameTag();
this.setCustomNameTag("FuriousDestroyer");
addRandomArmor();
DungeonHooks.addDungeonMob("FuriousDestroyer", 180);
}
示例6: EntitySpookyJen
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public EntitySpookyJen(World var1)
{
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(6, new EntityAIWander(this, 0.6D));
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
this.hasCustomNameTag();
this.setCustomNameTag("SuperGirlyGamer");
addRandomArmor();
DungeonHooks.addDungeonMob("SuperGirlyGamer", 180);
}
示例7: EntityGingerBreadMan
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public EntityGingerBreadMan(World var1)
{
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = true;
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
this.tasks.addTask(6, new EntityAIWander(this, 0.6D));
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
this.hasCustomNameTag();
this.setCustomNameTag("GingerBreadMan");
addRandomArmor();
DungeonHooks.addDungeonMob("GingerBreadMan", 180);
}
示例8: registerEntity
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public static void registerEntity(Class entityClass, String name)
{
int entityID = EntityRegistry.findGlobalUniqueEntityId();
long seed = name.hashCode();
Random rand = new Random(seed);
int primaryColor = rand.nextInt() * 0x000000;
int secondaryColor = rand.nextInt() * 0xff00000;
int spawnRateconfig = ConfigurationHandler.xenbeastSpawnRate;
int minSpawnconfig = ConfigurationHandler.xenbeastMinSpawn;
int maxSpawnconfig = ConfigurationHandler.xenbeastMaxSpawn;
EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
EntityRegistry.registerModEntity(entityClass, name, entityID, Xenorite.instance, 64, 1, true);
EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor)); // probablity of space/minimal to spawn/max to spawn
EntityRegistry.addSpawn(XenBeastEntity.class, spawnRateconfig, minSpawnconfig, maxSpawnconfig, EnumCreatureType.monster, new BiomeGenBase[]
{ BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.extremeHills, BiomeGenBase.forest, BiomeGenBase.taiga, BiomeGenBase.swampland, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.icePlains, BiomeGenBase.iceMountains, BiomeGenBase.mushroomIsland, BiomeGenBase.mushroomIslandShore, BiomeGenBase.beach, BiomeGenBase.desertHills, BiomeGenBase.forestHills, BiomeGenBase.taigaHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.jungleEdge, BiomeGenBase.deepOcean, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.roofedForest, BiomeGenBase.coldTaiga, BiomeGenBase.coldTaigaHills, BiomeGenBase.megaTaiga, BiomeGenBase.megaTaigaHills, BiomeGenBase.extremeHillsPlus, BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.mesa, BiomeGenBase.mesaPlateau_F, BiomeGenBase.mesaPlateau });
DungeonHooks.addDungeonMob("XenBeastEntity", 180);
}
示例9: registerEntity
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public static void registerEntity(Class entityClass, String name)
{
int entityID = EntityRegistry.findGlobalUniqueEntityId();
long seed = name.hashCode();
Random rand = new Random(seed);
int primaryColor = rand.nextInt() * 0x0000FF;
int secondaryColor = rand.nextInt() * 0x800080;
int spawnRateconfig = ConfigurationHandler.enderPigIncSpawnRate;
int minSpawnconfig = ConfigurationHandler.enderPigIncMinSpawn;
int maxSpawnconfig = ConfigurationHandler.enderPigIncMaxSpawn;
EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
EntityRegistry.registerModEntity(entityClass, name, entityID, Xenorite.instance, 64, 1, true);
EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor)); // probablity of space/minimal to spawn/max to spawn
EntityRegistry.addSpawn(EnderPigIncEntity.class, spawnRateconfig, minSpawnconfig, maxSpawnconfig, EnumCreatureType.monster, new BiomeGenBase[]
{ BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.extremeHills, BiomeGenBase.forest, BiomeGenBase.taiga, BiomeGenBase.swampland, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.icePlains, BiomeGenBase.iceMountains, BiomeGenBase.mushroomIsland, BiomeGenBase.mushroomIslandShore, BiomeGenBase.beach, BiomeGenBase.desertHills, BiomeGenBase.forestHills, BiomeGenBase.taigaHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.jungleEdge, BiomeGenBase.deepOcean, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.roofedForest, BiomeGenBase.coldTaiga, BiomeGenBase.coldTaigaHills, BiomeGenBase.megaTaiga, BiomeGenBase.megaTaigaHills, BiomeGenBase.extremeHillsPlus, BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.mesa, BiomeGenBase.mesaPlateau_F, BiomeGenBase.mesaPlateau });
DungeonHooks.addDungeonMob("EnderPigIncEntity", 180);
}
示例10: addDungeonHooks
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
private void addDungeonHooks(){
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","abyssalzombie"), 150);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","depthsghoul"), 100);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","shadowcreature"), 120);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","shadowmonster"), 100);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","shadowbeast"), 30);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","antiabyssalzombie"), 50);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","antighoul"), 50);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","antiskeleton"), 50);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","antispider"), 50);
DungeonHooks.addDungeonMob(new ResourceLocation("abyssalcraft","antizombie"), 50);
}
示例11: pickMobSpawner
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
/**
* Randomly decides which spawner to use in a dungeon
*/
private String pickMobSpawner(Random par1Random){
DungeonHooks.removeDungeonMob("Skeleton");
DungeonHooks.removeDungeonMob("Zombie");
DungeonHooks.removeDungeonMob("Spider");
DungeonHooks.addDungeonMob("SoulKotek", 100);
DungeonHooks.addDungeonMob("SoulYeti", 300);
return DungeonHooks.getRandomDungeonMob(par1Random);
}
示例12: init
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
public static void init()
{
Configuration config = new Configuration(new File(NucleumOmnium.getCCMFolder(), "DungeonMaster.cfg"));
List<String> ourDungeonMobs = new ArrayList<String>();
try
{
//noinspection unchecked
ArrayList<DungeonHooks.DungeonMob> dungeonMobs = (ArrayList<DungeonHooks.DungeonMob>) dungeonMobsField.get(null);
for (DungeonHooks.DungeonMob mob : dungeonMobs.toArray(new DungeonHooks.DungeonMob[dungeonMobs.size()]))
{
ourDungeonMobs.add(mob.type + ":" + mob.itemWeight);
DungeonHooks.removeDungeonMob(mob.type);
}
}
catch (IllegalAccessException e)
{
e.printStackTrace();
}
for (String thing : config.get(DUNGEONS_PAWNING, "dungeonList", ourDungeonMobs.toArray(new String[ourDungeonMobs.size()]), DUNGEON_LIST_HELP).getStringList())
{
String[] split = thing.split(":");
DungeonHooks.addDungeonMob(split[0], Integer.parseInt(split[1]));
}
config.save();
}
示例13: modsLoaded
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
@EventHandler
public void modsLoaded(FMLPostInitializationEvent event) {
// Fixes lack of creeper dungeons
DungeonHooks.addDungeonMob("Creeper", 1);
// Etho, of all people, found one. It'd be nice if they were just a bit rarer.
// Scaling everything else up seems like a poor solution tho.
@SuppressWarnings("unused")
String THATS_SOME_VERY_NICE_SOURCE_CODE_YOU_HAVE_THERE[] = {
"## ##",
"## ##",
" ## ",
" #### ",
" # # "
};
proxy.initializeClient();
proxy.registerLoadAlert();
Core.loadBus(this);
if (FzConfig.equal_opportunities_for_mobs) {
Core.loadBus(new MobEqualizer());
}
if (FzConfig.mushroomalize) {
Core.loadBus(new Mushroomalizer());
}
if (FzConfig.proper_projectile_physics) {
Core.loadBus(new ProperProjectilePhysics());
}
if (FzConfig.buffed_nametags) {
Core.loadBus(new BuffNametags());
}
if (FzConfig.limit_integrated_server && FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
Core.loadBus(new TickSynchronizer());
}
if (FzConfig.disable_endermen_griefing) {
int i = 0;
for (Block block : (Iterable<Block>) Block.blockRegistry) {
if (EntityEnderman.getCarriable(block)) {
EntityEnderman.setCarriable(block, false);
i++;
}
}
Core.logInfo("Endermen griefing disabled for " + i + " blocks.");
}
if (FzConfig.blockundo) {
Core.loadBus(BlockUndo.instance);
}
WorldNuller.init();
}
示例14: init
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
@EventHandler
public void init (FMLInitializationEvent event) {
//craftchanting init
ItemStack knockbackItemStack = new ItemStack(Items.stone_sword);
knockbackItemStack.addEnchantment(Enchantment.knockback,1);
//crafting
GameRegistry.addRecipe(new ItemStack(Blocks.iron_ore),"XXX","XXX","XXX",'X',Blocks.cobblestone);
GameRegistry.addRecipe(new ItemStack(Blocks.gold_ore),"XYX","YXY","XYX",'X',Items.iron_ingot,'Y',Blocks.cobblestone);
GameRegistry.addRecipe(new ItemStack(Blocks.obsidian),"XXX","XYX","XXX",'X',Blocks.iron_block,'Y',Blocks.cobblestone);
GameRegistry.addRecipe(new ItemStack(Blocks.redstone_ore),"XXX","XYX","XXX",'X',new ItemStack(Items.dye,1,1),'Y',Blocks.cobblestone);
GameRegistry.addRecipe(new ItemStack(Blocks.diamond_ore),"XYX","XZX","XYX",'X',Items.redstone,'Y',Blocks.iron_block,'Z',Blocks.obsidian);;
GameRegistry.addRecipe(new ItemStack(Blocks.waterlily),"XXX"," XX","XXX",'X',new ItemStack(Blocks.leaves,1,1));
GameRegistry.addRecipe(new ItemStack(Blocks.waterlily),"XXX"," XX","XXX",'X',new ItemStack(Blocks.leaves,1,2));
GameRegistry.addRecipe(new ItemStack(Blocks.waterlily),"XXX"," XX","XXX",'X',new ItemStack(Blocks.leaves,1,3));
GameRegistry.addRecipe(new ItemStack(Blocks.waterlily),"XXX"," XX","XXX",'X',new ItemStack(Blocks.leaves,4));
GameRegistry.addRecipe(new ItemStack(Blocks.waterlily),"XXX"," XX","XXX",'X',Blocks.leaves2);
GameRegistry.addRecipe(new ItemStack(Blocks.waterlily),"XXX"," XX","XXX",'X',new ItemStack(Blocks.leaves2,2));
GameRegistry.addRecipe(new ItemStack(Items.apple),"XXX","XXX","XXX",'X',Blocks.leaves);
GameRegistry.addRecipe(new ItemStack(Items.arrow),"XY","Z ",'X',Items.stick,'Y',Blocks.leaves,'Z',Items.flint);
GameRegistry.addRecipe(new ItemStack(Items.saddle),"X X"," X ",'X',Items.leather);
GameRegistry.addRecipe(new ItemStack(key),"X "," XX"," XX",'X',Items.iron_ingot);
GameRegistry.addRecipe(new ItemStack(Blocks.cobblestone),"XX","XX",'X',shard);
GameRegistry.addRecipe(new ItemStack(chaospickaxe),"XXX"," Y "," Y ",'X',chaosingot,'Y',Items.stick);
GameRegistry.addRecipe(new ItemStack(chaossword),"X","X","Y",'X',chaosingot,'Y',Items.stick);
GameRegistry.addRecipe(new ItemStack(chaoshoe),"XX"," Y"," Y",'X',chaosingot,'Y',Items.stick);
GameRegistry.addRecipe(new ItemStack(chaosaxe),"XX","XY"," Y",'X',chaosingot,'Y',Items.stick);
//shapeless
GameRegistry.addShapelessRecipe(new ItemStack(Items.water_bucket),Blocks.water,Items.bucket);
GameRegistry.addShapelessRecipe(new ItemStack(Items.lava_bucket),Blocks.lava,Items.bucket);
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.obsidian),Blocks.lava,Blocks.water);
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.obsidian),Items.lava_bucket,Items.water_bucket);
GameRegistry.addShapelessRecipe(new ItemStack(Items.dye,2,1),Items.redstone,new ItemStack(Items.dye,1,1));
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.grass),Blocks.dirt,Blocks.vine);
GameRegistry.addShapelessRecipe(new ItemStack(key,1),key,new ItemStack(Items.dye,1));
GameRegistry.addShapelessRecipe(new ItemStack(shard),Blocks.dirt);
//smelting
GameRegistry.addSmelting(Blocks.obsidian, new ItemStack(Blocks.lava), 2L);
GameRegistry.addSmelting(Blocks.ice, new ItemStack(Blocks.water), 2L);
GameRegistry.addSmelting(Blocks.stone,new ItemStack(Blocks.stonebrick), 0.1F);
GameRegistry.addSmelting(Blocks.gravel,new ItemStack(Items.flint),0.1F);
GameRegistry.addSmelting(chaosdust, new ItemStack(chaosingot), 0.2F);
//craftchanting
GameRegistry.addShapelessRecipe(knockbackItemStack,Items.gunpowder,Items.stone_sword);
//dungeon spawn adds
DungeonHooks.addDungeonMob("Pig",17);
DungeonHooks.addDungeonMob("Sheep",17);
DungeonHooks.addDungeonMob("Chicken",17);
DungeonHooks.addDungeonMob("Cow",17);
DungeonHooks.addDungeonMob("Rabbit",16);
DungeonHooks.addDungeonMob("Mooshroom",16);
//dungeon spawn removes
DungeonHooks.removeDungeonMob("Spider");
DungeonHooks.removeDungeonMob("Zombie");
DungeonHooks.removeDungeonMob("Skelton");
//dungeon chests adds
ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent( new ItemStack(Blocks.cobblestone),25,50,10));
//dungeon chests removes
ChestGenHooks.removeItem(ChestGenHooks.DUNGEON_CHEST, new ItemStack(Items.saddle));
}
示例15: load
import net.minecraftforge.common.DungeonHooks; //导入方法依赖的package包/类
@EventHandler
public void load(FMLInitializationEvent evt)
{
Arrows.addHandler(new ArrowFireFlint());
Arrows.addHandler(new ArrowFirerMF());
DungeonHooks.addDungeonMob("MineFantasy.Minotaur", 50);
DungeonHooks.addDungeonMob("MineFantasy.Basilisk", 10);
GameRegistry.registerCraftingHandler(new CraftingHandlerMF());
proxy.registerTileEntities();
ItemListMF.init();
BlockListMF.init();
IWorldGenerator gen = new WorldGenMF();
GameRegistry.registerWorldGenerator(gen);
MinecraftForge.EVENT_BUS.register(new EventManagerMF());
MinecraftForge.EVENT_BUS.register(new ArrowHandlerMF());
MinecraftForge.ORE_GEN_BUS.register(gen);
StatListMF.register();
OreDictionary.registerOre("logWood", new ItemStack(BlockListMF.log, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("treeLeaves", new ItemStack(BlockListMF.leaves, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("treeSapling", new ItemStack(BlockListMF.sapling, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("ingotSteel", new ItemStack(ItemListMF.ingotSteel));
OreDictionary.registerOre("blockLimestone", new ItemStack(BlockListMF.limestone));
OreDictionary.registerOre("blockSteel", new ItemStack(BlockListMF.storage, 1, 0));
OreDictionary.registerOre("blockCopper", new ItemStack(BlockListMF.storage, 1, 1));
OreDictionary.registerOre("blockTin", new ItemStack(BlockListMF.storage, 1, 2));
OreDictionary.registerOre("blockBronze", new ItemStack(BlockListMF.storage, 1, 3));
OreDictionary.registerOre("blockMithril", new ItemStack(BlockListMF.storage, 1, 4));
OreDictionary.registerOre("blockDeepIron", new ItemStack(BlockListMF.storage, 1, 8));
OreDictionary.registerOre("blockSilver", new ItemStack(BlockListMF.storage, 1, 5));
OreDictionary.registerOre("blockIron", new ItemStack(BlockListMF.storage, 1, 7));
OreDictionary.registerOre("ingotTin", new ItemStack(ItemListMF.misc, 1, ItemListMF.ingotTin));
OreDictionary.registerOre("ingotCopper", new ItemStack(ItemListMF.misc, 1, ItemListMF.ingotCopper));
OreDictionary.registerOre("ingotBronze", new ItemStack(ItemListMF.misc, 1, ItemListMF.ingotBronze));
OreDictionary.registerOre("ingotSilver", new ItemStack(ItemListMF.ingotSilver));
OreDictionary.registerOre("chain", new ItemStack(ItemListMF.misc, 1, ItemListMF.chainIron));
OreDictionary.registerOre("oreCopper", new ItemStack(BlockListMF.oreCopper));
OreDictionary.registerOre("oreTin", new ItemStack(BlockListMF.oreTin));
OreDictionary.registerOre("oreSilver", new ItemStack(BlockListMF.oreUtil, 1, 0));
OreDictionary.registerOre("oreNitre", new ItemStack(BlockListMF.oreUtil, 1, 1));
OreDictionary.registerOre("oreNiter", new ItemStack(BlockListMF.oreUtil, 1, 2));
OreDictionary.registerOre("oreSulfur", new ItemStack(BlockListMF.oreUtil, 1, 2));
OreDictionary.registerOre("ingotIron", new ItemStack(ItemListMF.misc, 1, ItemListMF.ingotWroughtIron));
OreDictionary.registerOre("ingotIron", new ItemStack(Item.ingotIron));
OreDictionary.registerOre("salt", ItemListMF.component(ItemListMF.salt));
OreDictionary.registerOre("ingotMithril", new ItemStack(ItemListMF.misc, 1, ItemListMF.ingotMithril));
OreDictionary.registerOre("ingotDeepIron", new ItemStack(ItemListMF.misc, 1, ItemListMF.ingotDeepIron));
}