Java Code Examples for cn.nukkit.block.Block#SNOW_LAYER
The following examples show how to use
cn.nukkit.block.Block#SNOW_LAYER .
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: MushroomPopulator.java From Nukkit with GNU General Public License v3.0 | 6 votes |
@Override protected int getHighestWorkableBlock(ChunkManager level, int x, int z, FullChunk chunk) { int y; x &= 0xF; z &= 0xF; for (y = 254; y > 0; --y) { int b = chunk.getBlockId(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 2
Source File: MushroomPopulator.java From Jupiter with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 3
Source File: PopulatorFlower.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y >= 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b != Block.AIR && b != Block.LEAVES && b != Block.LEAVES2 && b != Block.SNOW_LAYER) { break; } } return y == 0 ? -1 : ++y; }
Example 4
Source File: JungleFloorPopulator.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 255; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 5
Source File: DarkOakTreePopulator.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 6
Source File: PopulatorDeadBush.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y >= 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b != Block.AIR && b != Block.LEAVES && b != Block.LEAVES2 && b != Block.SNOW_LAYER) { break; } } return y == 0 ? -1 : ++y; }
Example 7
Source File: PopulatorGrass.java From Jupiter with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y >= 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b != Block.AIR && b != Block.LEAVES && b != Block.LEAVES2 && b != Block.SNOW_LAYER) { break; } } return y == 0 ? -1 : ++y; }
Example 8
Source File: SpruceMegaTreePopulator.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 255; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 9
Source File: SwampTreePopulator.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 10
Source File: JungleTreePopulator.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 255; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 11
Source File: JungleBigTreePopulator.java From Jupiter with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 12
Source File: ObjectTree.java From Nukkit with GNU General Public License v3.0 | 5 votes |
protected boolean overridable(int id) { switch (id) { case Block.AIR: case Block.SAPLING: case Block.LOG: case Block.LEAVES: case Block.SNOW_LAYER: case Block.LOG2: case Block.LEAVES2: return true; default: return false; } }
Example 13
Source File: SpruceBigTreePopulator.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 255; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 14
Source File: JungleTreePopulator.java From Jupiter with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 15
Source File: JungleTreePopulator.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 16
Source File: PopulatorTree.java From Jupiter with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 17
Source File: PopulatorCactus.java From Jupiter with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y >= 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b != Block.AIR && b != Block.LEAVES && b != Block.LEAVES2 && b != Block.SNOW_LAYER) { break; } } return y == 0 ? -1 : ++y; }
Example 18
Source File: SavannaTreePopulator.java From Nukkit with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y > 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b == Block.DIRT || b == Block.GRASS) { break; } else if (b != Block.AIR && b != Block.SNOW_LAYER) { return -1; } } return ++y; }
Example 19
Source File: PopulatorTallGrass.java From Jupiter with GNU General Public License v3.0 | 5 votes |
private int getHighestWorkableBlock(int x, int z) { int y; for (y = 127; y >= 0; --y) { int b = this.level.getBlockIdAt(x, y, z); if (b != Block.AIR && b != Block.LEAVES && b != Block.LEAVES2 && b != Block.SNOW_LAYER) { break; } } return y == 0 ? -1 : ++y; }
Example 20
Source File: PopulatorFlower.java From Jupiter with GNU General Public License v3.0 | 4 votes |
private boolean canFlowerStay(int x, int y, int z) { int b = this.level.getBlockIdAt(x, y, z); return (b == Block.AIR || b == Block.SNOW_LAYER) && this.level.getBlockIdAt(x, y - 1, z) == Block.GRASS; }