Java Code Examples for cn.nukkit.item.Item#GRASS

The following examples show how to use cn.nukkit.item.Item#GRASS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TreeGenerator.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
protected boolean canGrowInto(int id) {
    return id == Item.AIR || id == Item.LEAVES || id == Item.GRASS || id == Item.DIRT || id == Item.LOG || id == Item.LOG2 || id == Item.SAPLING || id == Item.VINE;
}
 
Example 2
Source File: TreeGenerator.java    From Jupiter with GNU General Public License v3.0 2 votes vote down vote up
/**
 * returns whether or not a tree can grow into a block
 * For example, a tree will not grow into stone
 */
protected boolean canGrowInto(int id) {
    return id == Item.AIR || id == Item.LEAVES || id == Item.GRASS || id == Item.DIRT || id == Item.LOG || id == Item.LOG2 || id == Item.SAPLING || id == Item.VINE;
}
 
Example 3
Source File: TreeGenerator.java    From Nukkit with GNU General Public License v3.0 2 votes vote down vote up
/**
 * returns whether or not a tree can grow into a block
 * For example, a tree will not grow into stone
 */
protected boolean canGrowInto(int id) {
    return id == Item.AIR || id == Item.LEAVES || id == Item.GRASS || id == Item.DIRT || id == Item.LOG || id == Item.LOG2 || id == Item.SAPLING || id == Item.VINE;
}