Exemple #1
0
 protected boolean slowCheck() {
   EntityPlayer player = Minecraft.getMinecraft().thePlayer;
   mOpen.clear();
   mClosed.clear();
   boolean newValue = false;
   // Boundry problems because doubles to ints suck, always pick the "good position"
   Pos current = new Pos(Math.ceil(player.posX), Math.ceil(player.posY), Math.ceil(player.posZ));
   if (!goodSuccessor(current, null))
     current = new Pos(Math.floor(player.posX), Math.floor(player.posY), Math.floor(player.posZ));
   while (current != null && !newValue) {
     if (current.isExposed()) {
       newValue = true;
       break;
     }
     mOpen.addAll(successors(current));
     mClosed.add(current);
     current = mOpen.poll();
   }
   return newValue;
 }