Module gomint.api

Class Tree

  • Direct Known Subclasses:
    BirchTree, OakTree

    public abstract class Tree
    extends Object
    Version:
    1.0
    Author:
    geNAZt
    • Field Detail

      • treeHeight

        protected int treeHeight
      • trunkBlock

        protected Block trunkBlock
      • leafBlock

        protected Block leafBlock
    • Constructor Detail

      • Tree

        public Tree()
    • Method Detail

      • grow

        public abstract void grow​(World world,
                                  int x,
                                  int y,
                                  int z,
                                  FastRandom random)
      • canPlaceObject

        public boolean canPlaceObject​(World world,
                                      int x,
                                      int y,
                                      int z,
                                      FastRandom random)
        Check if we can place given object
        Parameters:
        world - which we want this object in
        x - position of the object start
        y - position of the object start
        z - position of the object start
        random - with which we want to generate
        Returns:
        true when it can be placed, false otherwise
      • placeObject

        public void placeObject​(World world,
                                int x,
                                int y,
                                int z,
                                FastRandom random)
      • placeTrunk

        protected void placeTrunk​(World world,
                                  int x,
                                  int y,
                                  int z,
                                  FastRandom random,
                                  int trunkHeight)