Examples of TreeType


Examples of com.sk89q.worldedit.util.TreeGenerator.TreeType

            behavior = BindingBehavior.CONSUMES,
            consumedCount = 1)
    public TreeType getTreeType(ArgumentStack context) throws ParameterException, WorldEditException {
        String input = context.next();
        if (input != null) {
            TreeType type = TreeGenerator.lookup(input);
            if (type != null) {
                return type;
            } else {
                throw new ParameterException(
                        String.format("Can't recognize tree type '%s' -- choose from: %s", input, Arrays.toString(TreeType.values())));
View Full Code Here

Examples of org.bukkit.TreeType

    }

    @Override
    public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, Vector pt) {
        World world = getWorld();
        TreeType bukkitType = toBukkitTreeType(type);
        return type != null && world.generateTree(BukkitUtil.toLocation(world, pt), bukkitType,
                new EditSessionBlockChangeDelegate(editSession));
    }
View Full Code Here

Examples of org.bukkit.TreeType

        int data = sapling.getData() & 3;
        int i1 = 0;
        int j1 = 0;
        boolean flag = false;

        TreeType treeType = null;

        if (data == 1) {
            treeType = TreeType.REDWOOD;
        } else if (data == 2) {
            treeType = TreeType.BIRCH;
View Full Code Here

Examples of org.bukkit.TreeType

    @Override
    public void populate(World world, Random random, Chunk source) {
        int centerX = (source.getX() << 4) + random.nextInt(16);
        int centerZ = (source.getZ() << 4) + random.nextInt(16);

        TreeType type = TreeType.TREE;
        int chance = 0;
        int multiplier = 1;

        if (random.nextBoolean()) {
            type = TreeType.BIRCH;
View Full Code Here

Examples of org.cipres.treebase.domain.tree.TreeType

        t.setLabel(label);
        t.setTitle(title);
       
        { // Map type -> treeType
          Collection<TreeType> tts = treeService.findSomethingByString(TreeType.class, "description", type);
          TreeType tt = null;
          if (tts.isEmpty()) {
            warn("Unknown TreeType '" + type + "'; skipping it");
/*            // Or you can manufacture a fresh one here, which is not normally allowed
*                      // Note that tt.setDescription is private, so you will have to make it public to use this code
*                      // 20090320 MJD
View Full Code Here

Examples of org.cipres.treebase.domain.tree.TreeType

      logger.info("\n\t\tRunning Test: " + testName);
    }

    PhyloTreeHome fixture = getFixture();
    String desc = TreeType.TYPE_SINGLE;
    TreeType result = fixture.findTypeByDescription(desc);

    // verify
    assertTrue(result != null);
    assertTrue(result.isSingleTree());

    if (logger.isInfoEnabled()) {
      logger.info(testName + " verified.");
    }
  }
View Full Code Here

Examples of org.cipres.treebase.domain.tree.TreeType

  public TreeType findTypeByDescription(String pDescription) {
    if (TreebaseUtil.isEmpty(pDescription)) {
      return null;
    }
   
    TreeType returnVal = null;

    Criteria c = getSession().createCriteria(TreeType.class).add(
      org.hibernate.criterion.Expression.eq("description", pDescription));

    returnVal = (TreeType) c.uniqueResult();
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.