Examples of IBeekeepingMode


Examples of forestry.api.apiculture.IBeekeepingMode

        throw new WrongUsageException("/" + this.getCommandName() + " set [<world-#>] <mode-name>");

      World world = getWorld(sender, arguments);
      String desired = arguments[arguments.length - 1];

      IBeekeepingMode mode = PluginApiculture.beeInterface.getBeekeepingMode(desired);
      if (mode == null)
        throw new CommandException(StringUtil.localize("chat.bees.command.beekeeping.error"), desired);

      PluginApiculture.beeInterface.setBeekeepingMode(world, mode.getName());
      func_152373_a(sender, this, StringUtil.localize("chat.bees.command.beekeeping.set"), mode.getName());

    } else if (arguments[0].matches("save")) {
      if (arguments.length <= 1)
        throw new WrongUsageException("/" + this.getCommandName() + " save <player-name>");
View Full Code Here

Examples of forestry.api.apiculture.IBeekeepingMode

  private void listModeInfo(ICommandSender sender, String[] arguments) {
    if (arguments.length <= 1)
      throw new WrongUsageException("/" + this.getCommandName() + " info <mode-name>");

    IBeekeepingMode found = null;
    for (IBeekeepingMode mode : PluginApiculture.beeInterface.getBeekeepingModes())
      if (mode.getName().equalsIgnoreCase(arguments[1])) {
        found = mode;
        break;
      }

    if (found == null)
      throw new CommandException("No beekeeping mode called '%s' is available.", arguments[1]);

    sendChatMessage(sender, "\u00A7aMode: " + found.getName());
    for (String desc : found.getDescription())
      sendChatMessage(sender, StringUtil.localize(desc));
  }
View Full Code Here

Examples of forestry.api.apiculture.IBeekeepingMode

      list.add("\u00A7c" + GenericRatings.rateActivityTime(genome.getNocturnal(), false));
  }

  @Override
  public void age(World world, float housingLifespanModifier) {
    IBeekeepingMode mode = PluginApiculture.beeInterface.getBeekeepingMode(world);
    float finalModifier = housingLifespanModifier * mode.getLifespanModifier(genome, mate, housingLifespanModifier);

    super.age(world, finalModifier);
  }
View Full Code Here

Examples of forestry.api.apiculture.IBeekeepingMode

    if (housing == null) {
      Proxies.log.warning("Failed to produce in an apiary because the beehousing was null.");
      return null;
    }
    IBeekeepingMode mode = PluginApiculture.beeInterface.getBeekeepingMode(housing.getWorld());
    if (mode == null) {
      Proxies.log.warning("Failed to produce in an apiary because the beekeeping mode was null.");
      return null;
    }

    ArrayList<ItemStack> products = new ArrayList<ItemStack>();

    IAlleleBeeSpecies primary = genome.getPrimary();
    IAlleleBeeSpecies secondary = genome.getSecondary();

    // All work and no play makes queen a dull girl.
    if(mode.isOverworked(this, housing))
      setIsNatural(false);

    // Bee genetic speed * beehousing * beekeeping mode
    float speed = genome.getSpeed() * housing.getProductionModifier(genome, 1f) * mode.getProductionModifier(genome, 1f);

    // / Primary Products
    for (Map.Entry<ItemStack, Integer> entry : primary.getProducts().entrySet())
      if (housing.getWorld().rand.nextInt(100) < entry.getValue() * speed)
        products.add(entry.getKey().copy());
 
View Full Code Here

Examples of forestry.api.apiculture.IBeekeepingMode

    for (int i = 0; i < parent1.length; i++)
      if (parent1[i] != null && parent2[i] != null)
        chromosomes[i] = Chromosome.inheritChromosome(world.rand, parent1[i], parent2[i]);

    IBeekeepingMode mode = PluginApiculture.beeInterface.getBeekeepingMode(world);
    IBee offspring = new Bee(world, new BeeGenome(chromosomes), mode.isNaturalOffspring(this), generation);

    /* Disabling the mutation rate nerf
    // All mutation and no play makes queen a dull girl.
    if(mode.isDegenerating(this, offspring, housing))
      offspring.setIsNatural(false);*/
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.