Example #1
0
 public BlockList getType(int x, int y, int z) {
   Block b = getBlock(x, y, z);
   if (b == null) {
     return BlockList.AIR;
   } else {
     return b.getType();
   }
 }
Example #2
0
 void updateSurroundingBlocks(int x, int y, int z) {
   Block b1 = getBlock(x, y, z);
   Block b2 = getBlock(x - 1, y, z);
   Block b3 = getBlock(x + 1, y, z);
   Block b4 = getBlock(x, y - 1, z);
   Block b5 = getBlock(x, y + 1, z);
   Block b6 = getBlock(x, y, z - 1);
   Block b7 = getBlock(x, y, z + 1);
   if (b1 != null) {
     b1.update();
   }
   if (b2 != null) {
     b2.update();
   }
   if (b3 != null) {
     b3.update();
   }
   if (b4 != null) {
     b4.update();
   }
   if (b5 != null) {
     b5.update();
   }
   if (b6 != null) {
     b6.update();
   }
   if (b7 != null) {
     b7.update();
   }
 }