Java Code Examples for cn.nukkit.block.Block#SAND
The following examples show how to use
cn.nukkit.block.Block#SAND .
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: PopulatorCaves.java From Jupiter with GNU General Public License v3.0 | 5 votes |
protected boolean isSuitableBlock(int block, int blockAbove, Biome biome) { if (!(biome instanceof CaveBiome)) { return false; } CaveBiome caveBiome = (CaveBiome) biome; if (block == caveBiome.getStoneBlock()) { return true; } if (block == Block.SAND || block == Block.GRAVEL) { return !(blockAbove == Block.WATER || blockAbove == Block.STILL_WATER || blockAbove == Block.LAVA || blockAbove == Block.STILL_LAVA); } if (block == caveBiome.getGroundBlock()) { return true; } if (block == caveBiome.getSurfaceBlock()) { return true; } // Few hardcoded cases if (block == Block.TERRACOTTA) { return true; } if (block == Block.SANDSTONE) { return true; } // TODO: add red sandstone case in Minecraft 1.8 return block == Block.SNOW; }
Example 2
Source File: PopulatorCaves.java From Nukkit with GNU General Public License v3.0 | 5 votes |
protected boolean isSuitableBlock(int block, int blockAbove, Biome biome) { if (!(biome instanceof CaveBiome)) { return false; } CaveBiome caveBiome = (CaveBiome) biome; if (block == caveBiome.getStoneBlock()) { return true; } if (block == Block.SAND || block == Block.GRAVEL) { return !(blockAbove == Block.WATER || blockAbove == Block.STILL_WATER || blockAbove == Block.LAVA || blockAbove == Block.STILL_LAVA); } if (block == caveBiome.getGroundBlock()) { return true; } if (block == caveBiome.getSurfaceBlock()) { return true; } // Few hardcoded cases if (block == Block.TERRACOTTA) { return true; } if (block == Block.SANDSTONE) { return true; } // TODO: add red sandstone case in Minecraft 1.8 return block == Block.SNOW; }
Example 3
Source File: SandyBiome.java From Jupiter with GNU General Public License v3.0 | 4 votes |
@Override public int getSurfaceBlock() { return Block.SAND; }
Example 4
Source File: SandyBiome.java From Jupiter with GNU General Public License v3.0 | 4 votes |
@Override public int getGroundBlock() { return Block.SAND; }
Example 5
Source File: PopulatorDeadBush.java From Jupiter with GNU General Public License v3.0 | 4 votes |
private boolean canDeadBushStay(int x, int y, int z) { int b = this.level.getBlockIdAt(x, y, z); return (b == Block.AIR && this.level.getBlockIdAt(x, y - 1, z) == Block.SAND); }
Example 6
Source File: PopulatorCactus.java From Jupiter with GNU General Public License v3.0 | 4 votes |
private boolean canCactusStay(int x, int y, int z) { int b = this.level.getBlockIdAt(x, y, z); return (b == Block.AIR && this.level.getBlockIdAt(x, y - 1, z) == Block.SAND && this.level.getBlockIdAt(x + 1, y, z) == Block.AIR && this.level.getBlockIdAt(x - 1, y, z) == Block.AIR && this.level.getBlockIdAt(x, y, z + 1) == Block.AIR && this.level.getBlockIdAt(x, y, z - 1) == Block.AIR); }
Example 7
Source File: PopulatorSugarcane.java From Jupiter with GNU General Public License v3.0 | 4 votes |
private boolean canSugarcaneStay(int x, int y, int z) { int b = this.level.getBlockIdAt(x, y, z); int c = this.level.getBlockIdAt(x, y - 1, z); return (b == Block.AIR) && (c == Block.SAND || c == Block.GRASS) && this.findWater(x, y - 1, z); }
Example 8
Source File: SandyBiome.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public int getSurfaceBlock(int y) { return Block.SAND; }
Example 9
Source File: SandyBiome.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public int getSurfaceBlock() { return Block.SAND; }
Example 10
Source File: SandyBiome.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public int getGroundBlock() { return Block.SAND; }
Example 11
Source File: PopulatorDeadBush.java From Nukkit with GNU General Public License v3.0 | 4 votes |
private boolean canDeadBushStay(int x, int y, int z) { int b = this.level.getBlockIdAt(x, y, z); return (b == Block.AIR && this.level.getBlockIdAt(x, y - 1, z) == Block.SAND); }
Example 12
Source File: PopulatorCactus.java From Nukkit with GNU General Public License v3.0 | 4 votes |
private boolean canCactusStay(int x, int y, int z) { int b = this.level.getBlockIdAt(x, y, z); return (b == Block.AIR && this.level.getBlockIdAt(x, y - 1, z) == Block.SAND && this.level.getBlockIdAt(x + 1, y, z) == Block.AIR && this.level.getBlockIdAt(x - 1, y, z) == Block.AIR && this.level.getBlockIdAt(x, y, z + 1) == Block.AIR && this.level.getBlockIdAt(x, y, z - 1) == Block.AIR); }
Example 13
Source File: PopulatorSugarcane.java From Nukkit with GNU General Public License v3.0 | 4 votes |
private boolean canSugarcaneStay(int x, int y, int z) { int b = this.level.getBlockIdAt(x, y, z); int c = this.level.getBlockIdAt(x, y - 1, z); return (b == Block.AIR) && (c == Block.SAND || c == Block.GRASS) && this.findWater(x, y - 1, z); }