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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
public static void setMobSpawner(final World world, final int x, final int y, final int z, final Random rand) { world.setBlock(x, y, z, Blocks.mob_spawner, 0, 2); final TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)world.getTileEntity(x, y, z); if (tileentitymobspawner != null) { tileentitymobspawner.func_145881_a().setEntityName(DungeonHooks.getRandomDungeonMob(rand)); } else { LogHelper.error("Failed to fetch mob spawner entity at (" + x + ", " + y + ", " + z + ")", new Object[0]); } }
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); }
/** * 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); }
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(); }
@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(); }
@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)); }
/** * Randomly decides which spawner to use in a dungeon */ private String pickMobSpawner(Random p_76543_1_) { return DungeonHooks.getRandomDungeonMob(p_76543_1_); }
@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)); }
/** * Randomly decides which spawner to use in a dungeon */ private String pickMobSpawner(Random par1Random) { return DungeonHooks.getRandomDungeonMob(par1Random); }
private String pickMobSpawner(Random p_76543_1_) { return DungeonHooks.getRandomDungeonMob(p_76543_1_); }
@EventHandler public void loadMod(FMLInitializationEvent event) { PacketHandler.init(); proxy.registerRenderers(); proxy.registerKeyBindings(); OreDictionary.registerOre("ingotDarkIron", MBItems.ingotDarkIron); OreDictionary.registerOre("ingotInferno", MBItems.ingotInferno); MinecraftForge.EVENT_BUS.register(new MBEventHandler()); MinecraftForge.EVENT_BUS.register(new EntityFixEvents()); FMLCommonHandler.instance().bus().register(new CraftingHandler()); EntityRegistry.registerGlobalEntityID(EntityIronZombie.class, "MB-IronZombie", EntityRegistry.findGlobalUniqueEntityId(), Color.GRAY.getRGB(), Color.BLACK.getRGB()); EntityRegistry.registerGlobalEntityID(EntityCrawler.class, "MB-Crawler", EntityRegistry.findGlobalUniqueEntityId(), Color.RED.getRGB(), Color.BLACK.getRGB()); EntityRegistry.registerGlobalEntityID(EntitySuperSlime.class, "MB-SuperSlime", EntityRegistry.findGlobalUniqueEntityId(), Color.GREEN.getRGB(), Color.CYAN.getRGB()); EntityRegistry.registerGlobalEntityID(EntityForestGuard.class, "MB-ForestGuard", EntityRegistry.findGlobalUniqueEntityId(), Color.GREEN.getRGB(), Color.WHITE.getRGB()); EntityRegistry.registerGlobalEntityID(EntityStealthCreeper.class, "MB-StealthCreeper", EntityRegistry.findGlobalUniqueEntityId(), Color.WHITE.getRGB(), Color.GRAY.getRGB()); EntityRegistry.registerGlobalEntityID(EntityLivingBlock.class, "MB-LivingBlock", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerGlobalEntityID(EntityWatcher.class, "MB-Watcher", EntityRegistry.findGlobalUniqueEntityId(), Color.BLACK.getRGB(), Color.WHITE.getRGB()); EntityRegistry.registerGlobalEntityID(EntityFeeder.class, "MB-Feeder", EntityRegistry.findGlobalUniqueEntityId(), Color.RED.getRGB(), Color.WHITE.getRGB()); EntityRegistry.registerGlobalEntityID(EntityTombGuard.class, "MB-TombGuard", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerGlobalEntityID(EntityInfernoGolem.class, "MB-InfernoGolem", EntityRegistry.findGlobalUniqueEntityId(), Color.RED.getRGB(), Color.LIGHT_GRAY.getRGB()); EntityRegistry.registerGlobalEntityID(EntitySprout.class, "MB-Sprout", EntityRegistry.findGlobalUniqueEntityId()); //EntityRegistry.registerGlobalEntityID(EntityStalker.class, "MB-Stalker", EntityRegistry.findGlobalUniqueEntityId(), Color.BLACK.getRGB(), Color.RED.getRGB() + Color.BLUE.getRGB()); EntityRegistry.addSpawn(EntityIronZombie.class, ConfigHelper.ironZombieSpawnRate, 1, 1, EnumCreatureType.MONSTER, BiomeDictionary.getBiomesForType(Type.PLAINS)); EntityRegistry.addSpawn(EntitySuperSlime.class, ConfigHelper.superSlimeSpawnRate, 1, 1, EnumCreatureType.MONSTER, BiomeDictionary.getBiomesForType(Type.SWAMP)); EntityRegistry.addSpawn(EntityForestGuard.class, ConfigHelper.forestGuardSpawnRate, 1, 1, EnumCreatureType.MONSTER, BiomeDictionary.getBiomesForType(Type.FOREST)); EntityRegistry.addSpawn(EntityCrawler.class, ConfigHelper.crawlerSpawnRate, 1, 1, EnumCreatureType.MONSTER, BiomeDictionary.getBiomesForType(Type.PLAINS)); EntityRegistry.addSpawn(EntityStealthCreeper.class, ConfigHelper.stealthCreeperSpawnRate, 1, 1, EnumCreatureType.CREATURE, BiomeDictionary.getBiomesForType(Type.JUNGLE)); EntityRegistry.addSpawn(EntityFeeder.class, 0, 1, 1, EnumCreatureType.MONSTER, BiomeDictionary.getBiomesForType(Type.JUNGLE)); EntityRegistry.addSpawn(EntityInfernoGolem.class, ConfigHelper.infernoGolemSpawnRate, 1, 4, EnumCreatureType.MONSTER, BiomeDictionary.getBiomesForType(Type.NETHER)); if(ConfigHelper.allowSlimeBlockCrafting) { GameRegistry.addRecipe(new ItemStack(MBBlocks.blockSlime, 2), new Object[] {"sss", "sss", "sss", 's', Items.slime_ball}); } if(ConfigHelper.enableGiantSpawn) { EntityRegistry.addSpawn(EntityGiantZombie.class, ConfigHelper.giantSpawnRate, 1, 1, EnumCreatureType.MONSTER, BiomeDictionary.getBiomesForType(Type.PLAINS)); } if(ConfigHelper.addMiniBossesToDungeons) { DungeonHooks.addDungeonMob("MB-IronZombie", 50); DungeonHooks.addDungeonMob("MB-ForestGuard", 50); } if(ConfigHelper.addLootToDungeons) { ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(MBItems.ingotDarkIron, 3), 1, 10, 10)); } GameRegistry.addRecipe(new ShapedOreRecipe(MBItems.darkIronHelm, new Object[] {"iii", "i i", "xxx", 'i', "ingotDarkIron"})); GameRegistry.addRecipe(new ShapedOreRecipe(MBItems.darkIronChest, new Object[] {"i i", "iii", "iii", 'i', "ingotDarkIron"})); GameRegistry.addRecipe(new ShapedOreRecipe(MBItems.darkIronLegs, new Object[] {"iii", "i i", "i i", 'i', "ingotDarkIron"})); GameRegistry.addRecipe(new ShapedOreRecipe(MBItems.darkIronBoots, new Object[] {"xxx", "i i", "i i", 'i', "ingotDarkIron"})); GameRegistry.addRecipe(new ShapedOreRecipe(MBItems.infernoHelm, new Object[] {"iii", "i i", "xxx", 'i', "ingotInferno"})); GameRegistry.addRecipe(new ShapedOreRecipe(MBItems.infernoChest, new Object[] {"i i", "iii", "iii", 'i', "ingotInferno"})); GameRegistry.addRecipe(new ShapedOreRecipe(MBItems.infernoLegs, new Object[] {"iii", "i i", "i i", 'i', "ingotInferno"})); GameRegistry.addRecipe(new ShapedOreRecipe(MBItems.infernoBoots, new Object[] {"xxx", "i i", "i i", 'i', "ingotInferno"})); GameRegistry.addRecipe(new ItemStack(MBBlocks.summoningPillar), new Object[] {"xxx", " x ", "xxx", 'x', Blocks.quartz_block}); GameRegistry.addShapelessRecipe(new ItemStack(MBItems.summonScroll), new Object[] {Blocks.slime_block, Items.redstone, Items.paper, Blocks.slime_block, Blocks.slime_block, Blocks.slime_block}); GameRegistry.addShapelessRecipe(new ItemStack(MBItems.summonScroll), new Object[] {Blocks.iron_block, Blocks.iron_block, Items.paper, Items.rotten_flesh}); GameRegistry.registerWorldGenerator(new MBWorldGenerator(), 1); }
public static void populate(){ //Dungeons DungeonHooks.addDungeonMob("Skidding Glow", 50); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.candentiniumMetaNumber), 1, 7, 75)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemCloakInvis), 1, 1, 5)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.infernalCoalMetaNumber), 2, 6, 100)); //Blacksmiths ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemGlironBoots), 1, 1, 80)); ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemGlironChest), 1, 1, 80)); ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemGlironHelm), 1, 1, 80)); ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.infernalCoalMetaNumber), 2, 6, 100)); ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.glowingIronMetaNumber), 1, 5, 95)); //Mineshafts ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.candentiniumMetaNumber), 1, 7, 90)); ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemCloakInvis), 1, 1, 5)); ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemRedironPick), 1, 1, 75)); ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemScepterLight), 1, 1, 30)); ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemGlironPick), 1, 1, 65)); ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.redIronHandleMetaNumber), 2, 15, 50)); //Desert Pyramids ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemScepterRegen2), 1, 1, 10)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTBlocks.blockCandentinium), 2, 12, 60)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemScepterOmni), 1, 1, 1)); //Jungle Pyramids ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.pureCalciteMetaNumber), 17, 31, 90)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.cloakCoreMetaNumber), 1, 2, 14)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemDarkDoor), 1, 2, 20)); //Strongholds ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemGlironLegs), 1, 1, 60)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemDarkDoor), 1, 2, 20)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.craftingItems, 1, CraftingItems.blueGlassShardMetaNumber), 3, 7, 80)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemGlironSword), 1, 1, 77)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemGlironLegs), 1, 1, 60)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemDarkDoor), 1, 2, 20)); //Bonus Chest ChestGenHooks.getInfo(ChestGenHooks.BONUS_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(GTItems.itemGlironHoe), 1, 1, 50)); }