@SuppressWarnings("unchecked")
 @Override
 public void manipulateTradesForVillager(
     EntityVillager villager, MerchantRecipeList recipeList, Random random) {
   recipeList.add(
       new MerchantRecipe(
           ForestryItem.beePrincessGE.getItemStack(1, Defaults.WILDCARD),
           new ItemStack(Items.emerald, 1)));
   recipeList.add(
       new MerchantRecipe(
           new ItemStack(Items.wheat, 2), ItemHoneycomb.getRandomComb(1, random, false)));
   recipeList.add(
       new MerchantRecipe(
           new ItemStack(Blocks.log, 24, Defaults.WILDCARD),
           ForestryBlock.apiculture.getItemStack(1, Defaults.DEFINITION_APIARY_META)));
   recipeList.add(
       new MerchantRecipe(
           new ItemStack(Items.emerald, 1), ForestryItem.frameProven.getItemStack(6)));
   recipeList.add(
       new MerchantRecipe(
           new ItemStack(Items.emerald, 12),
           ForestryItem.beePrincessGE.getItemStack(1, Defaults.WILDCARD),
           PluginApiculture.beeInterface.getMemberStack(
               PluginApiculture.beeInterface.getBee(
                   villager.worldObj,
                   PluginApiculture.beeInterface.templateAsGenome(
                       BeeTemplates.getMonasticTemplate())),
               EnumBeeType.DRONE.ordinal())));
 }
예제 #2
0
  @Override
  public void postInit() {

    try {

      eeBlock1 =
          new ItemStack((Block) Class.forName("ee.EEBlock").getField("eeStone").get(null), 1, 8);
      eeBlock2 =
          new ItemStack((Block) Class.forName("ee.EEBlock").getField("eeStone").get(null), 1, 9);
      eeRelay2Class = Class.forName("ee.TileRelay2");
      eeRelay2EMCField = eeRelay2Class.getField("scaledEnergy");
      eeRelay3Class = Class.forName("ee.TileRelay3");
      eeRelay3EMCField = eeRelay3Class.getField("scaledEnergy");

    } catch (Exception ex) {
      Proxies.log.fine("Necessary block/classes from EE were not found");
      return;
    }

    IJubilanceProvider jubilanceProviderDarkened = new JubilanceReqRes(eeBlock1);
    IJubilanceProvider jubilanceProviderReddened = new JubilanceReqRes(eeBlock2);

    ((AlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele("forestry.speciesDarkened"))
            .jubilanceProvider =
        jubilanceProviderDarkened;
    ((AlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele("forestry.speciesReddened"))
            .jubilanceProvider =
        jubilanceProviderReddened;
    ((AlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele("forestry.speciesOmega"))
            .jubilanceProvider =
        jubilanceProviderReddened;

    darkenedA =
        new MutationEMC(
            Allele.speciesModest,
            Allele.speciesWintry,
            BeeTemplates.getDarkenedTemplate(),
            100,
            eeBlock1,
            eeRelay2Class,
            eeRelay2EMCField,
            139264);
    reddenedA =
        new MutationEMC(
            Allele.speciesDarkened,
            Allele.speciesTropical,
            BeeTemplates.getReddenedTemplate(),
            100,
            eeBlock2,
            eeRelay3Class,
            eeRelay3EMCField,
            466944);
    omegaA =
        new MutationEMC(
                Allele.speciesDarkened,
                Allele.speciesReddened,
                BeeTemplates.getOmegaTemplate(),
                100,
                eeBlock2,
                eeRelay3Class,
                eeRelay3EMCField,
                933888)
            .restrictBiomeType(BiomeDictionary.Type.NETHER)
            .restrictBiomeType(BiomeDictionary.Type.DESERT);
  }