示例#1
0
 // get the mutations file contents
 // This should probably be a loop...
 public static String getDefaultMutations() {
   String data = mutationInstructions; // mutationInstructions
   data = data + '\n' + minecraftMutations; // minecraft mutations
   if (ConfigurationHandler.resourcePlants) {
     data = data + '\n' + agricraftMutations; // agricraft mutations
     if (OreDictHelper.getOreBlockForName("Copper") != null) {
       data = data + '\n' + copperMutation;
     }
     if (OreDictHelper.getOreBlockForName("Tin") != null) {
       data = data + '\n' + tinMutation;
     }
     if (OreDictHelper.getOreBlockForName("Lead") != null) {
       data = data + '\n' + leadMutation;
     }
     if (OreDictHelper.getOreBlockForName("Silver") != null) {
       data = data + '\n' + silverMutation;
     }
     if (OreDictHelper.getOreBlockForName("Aluminum") != null) {
       data = data + '\n' + aluminumMutation;
     }
     if (OreDictHelper.getOreBlockForName("Nickel") != null) {
       data = data + '\n' + nickelMutation;
     }
     if (OreDictHelper.getOreBlockForName("Platinum") != null) {
       data = data + '\n' + platinumMutation;
     }
     if (OreDictHelper.getOreBlockForName("Osmium") != null) {
       data = data + '\n' + osmiumMutation;
     }
   }
   if (ModHelper.allowIntegration(Names.Mods.botania)) {
     data = data + '\n' + botaniaMutations;
   }
   if (ModHelper.allowIntegration(Names.Mods.harvestcraft)
       && ModHelper.allowIntegration(Names.Mods.natura)) {
     data =
         data
             + '\n'
             + harvestcraftMutations
             + '\n'
             + barleyNaturaMutations; // harvestcraft with natura barley
   } else {
     if (ModHelper.allowIntegration(Names.Mods.harvestcraft)) {
       data = data + '\n' + harvestcraftMutations + '\n' + barleyHarvestCraftMutations;
     }
     if (ModHelper.allowIntegration(Names.Mods.natura)) {
       data = data + '\n' + naturaMutations;
     }
   }
   if (ModHelper.allowIntegration(Names.Mods.weeeFlowers)) {
     data = data + '\n' + weeeFlowersMutations;
   }
   if (ModHelper.allowIntegration(Names.Mods.plantMegaPack)) {
     data = data + '\n' + plantMegaPackMutations;
   }
   if (ModHelper.allowIntegration(Names.Mods.chococraft)) {
     if (ModHelper.allowIntegration(Names.Mods.harvestcraft)) {
       data = data + '\n' + chococraft_harvestcraftMutations;
     } else {
       data = data + '\n' + chococraftMutations;
     }
   }
   if (ModHelper.allowIntegration(Names.Mods.psychedelicraft)) {
     data = data + '\n' + psychedelicraftMutations;
   }
   if (ModHelper.allowIntegration(Names.Mods.thaumcraft)
       && ModHelper.allowIntegration(Names.Mods.arsMagica)) {
     data = data + '\n' + thaumcraft_ArsMagicaMutations;
   } else {
     if (ModHelper.allowIntegration(Names.Mods.thaumcraft)) {
       data = data + '\n' + thaumcraftMutations;
     } else if (ModHelper.allowIntegration(Names.Mods.arsMagica)) {
       data = data + '\n' + arsMagicaMutations;
     }
   }
   return data;
 }
示例#2
0
 private static void hideItems() {
   LogHelper.debug("Hiding crops in NEI");
   for (int i = 0; i < 16; i++) {
     // hide crops block
     AgriCraft.proxy.hideItemInNEI(new ItemStack(Blocks.blockCrop, 1, i));
     // hide water pad
     AgriCraft.proxy.hideItemInNEI(new ItemStack(Blocks.waterPad, 1, i));
     // hide sprinkler
     AgriCraft.proxy.hideItemInNEI(new ItemStack(Blocks.blockSprinkler, 1, i));
     // hide debugger
     if (!ConfigurationHandler.debug) {
       AgriCraft.proxy.hideItemInNEI(new ItemStack(Items.debugItem, 1, i));
     }
     // hide plant blocks
     for (BlockModPlant plant : Crops.crops) {
       AgriCraft.proxy.hideItemInNEI(new ItemStack(plant, 1, i));
     }
     // hide botania crops
     if (ModHelper.allowIntegration(Names.Mods.botania)) {
       for (BlockModPlant plant : BotaniaHelper.botaniaCrops) {
         AgriCraft.proxy.hideItemInNEI(new ItemStack(plant, 1, i));
       }
     }
     // hide thaumcraft crops
     if (ModHelper.allowIntegration(Names.Mods.thaumcraft)) {
       for (BlockModPlant plant : ThaumcraftHelper.thaumcraftCrops) {
         AgriCraft.proxy.hideItemInNEI(new ItemStack(plant, 1, i));
       }
     }
     // hide ars magica crops
     if (ModHelper.allowIntegration(Names.Mods.arsMagica)) {
       for (BlockModPlant plant : ArsMagicaHelper.arsMagicaCrops) {
         AgriCraft.proxy.hideItemInNEI(new ItemStack(plant, 1, i));
       }
     }
     // hide resource crops
     if (ConfigurationHandler.resourcePlants) {
       for (BlockModPlant plant : ResourceCrops.vanillaCrops) {
         AgriCraft.proxy.hideItemInNEI(new ItemStack(plant, 1, i));
       }
       for (BlockModPlant plant : ResourceCrops.modCrops) {
         AgriCraft.proxy.hideItemInNEI(new ItemStack(plant, 1, i));
       }
     }
     // hide custom crops
     if (ConfigurationHandler.customCrops) {
       for (BlockModPlant customCrop : CustomCrops.customCrops) {
         AgriCraft.proxy.hideItemInNEI(new ItemStack(customCrop, 1, i));
       }
     }
     // hide debugger
     if (ConfigurationHandler.debug) {
       AgriCraft.proxy.hideItemInNEI(new ItemStack(Items.debugItem, 1, i));
     }
   }
   LogHelper.debug("Hiding custom wood objects");
   Field[] blocks = Blocks.class.getDeclaredFields();
   for (Field field : blocks) {
     if (BlockCustomWood.class.isAssignableFrom(field.getType())) {
       try {
         Block block = (Block) field.get(null);
         if (block == null) {
           continue;
         }
         ItemStack stack = new ItemStack(block);
         ArrayList<ItemStack> list = new ArrayList<ItemStack>();
         list.add(stack);
         API.setItemListEntries(stack.getItem(), list);
       } catch (Exception e) {
         e.printStackTrace();
       }
     }
   }
 }