Examples of mateWith()


Examples of forestry.api.genetics.IPollinatable.mateWith()

      IPollinatable pollinatable = (IPollinatable)entity.worldObj.getTileEntity(rest.posX, rest.posY, rest.posZ);
      if(entity.getPollen() == null) {
        entity.setPollen(pollinatable.getPollen());
        //Proxies.log.finest("A butterfly '%s' grabbed a pollen '%s' at %s/%s/%s.", entity.getButterfly().getIdent(), entity.getPollen().getIdent(), rest.posX, rest.posY, rest.posZ);
      } else if(pollinatable.canMateWith(entity.getPollen())) {
        pollinatable.mateWith(entity.getPollen());
        //Proxies.log.finest("A butterfly '%s' unloaded pollen '%s' at %s/%s/%s.", entity.getButterfly().getIdent(), entity.getPollen().getIdent(), rest.posX, rest.posY, rest.posZ);
        entity.setPollen(null);
      }
      hasPollinated = true;
      entity.cooldownPollination = EntityButterfly.COOLDOWNS;
View Full Code Here

Examples of forestry.api.genetics.IPollinatable.mateWith()

      if (!genome.getFlowerProvider().isAcceptedPollinatable(housing.getWorld(), receiver))
        continue;
      if (!receiver.canMateWith(pollen))
        continue;

      receiver.mateWith(pollen);
      return true;
    }

    return false;
  }
View Full Code Here

Examples of forestry.api.genetics.IPollinatable.mateWith()

      IPollinatable pollinatable = (IPollinatable)target;
      if(!pollinatable.canMateWith(tree))
        return false;

      pollinatable.mateWith(tree);
      Proxies.common.sendFXSignal(PacketFXSignal.VisualFXType.BLOCK_DESTROY, PacketFXSignal.SoundFXType.LEAF, world, x, y, z,
          world.getBlock(x, y, z), 0);
      if (!player.capabilities.isCreativeMode)
        itemstack.stackSize--;
      return true;
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.