示例#1
0
 /** @return number of hoppers on the island */
 public int getHopperCount() {
   tileEntityCount.clear();
   int result = 0;
   for (int x = getMinProtectedX() / 16;
       x <= (getMinProtectedX() + getProtectionSize() - 1) / 16;
       x++) {
     for (int z = getMinProtectedZ() / 16;
         z <= (getMinProtectedZ() + getProtectionSize() - 1) / 16;
         z++) {
       for (BlockState holder : world.getChunkAt(x, z).getTileEntities()) {
         if (holder instanceof Hopper) {
           result++;
         }
       }
     }
   }
   return result;
 }
 @Override
 public void scanFile(JavaFileScannerContext context) {
   super.scanFile(context);
   returnStatementCounter.clear();
 }
 void reset() {
   state.clear();
   vars.clear();
   counter = 0;
 }