예제 #1
0
 /**
  * 内容を文字列にして返す。
  *
  * @return
  */
 public String toString() {
   String ls = "";
   for (TargetBlock ltb : targets) {
     if (!ls.isEmpty()) ls += ";";
     ls += ltb.toString();
   }
   if (chain != null) {
     ls += "=" + chain.toString();
   }
   return ls;
 }
예제 #2
0
 public DestroyAllIdentificator(ByteBuf pBuf, int pTargetOrMeta, int pChainOrMeta) {
   this();
   // Target
   if (pBuf.isReadable(4)) {
     for (int li = pBuf.readInt(); li > 0; li--) {
       add(pBuf.readInt(), pBuf.readByte() | pTargetOrMeta);
     }
   }
   // Chain
   if (pBuf.isReadable(4)) {
     int li = pBuf.readInt();
     if (li > 0) {
       chain = new DestroyAllIdentificator();
       for (; li > 0; li--) {
         chain.add(pBuf.readInt(), pBuf.readByte() | pChainOrMeta);
       }
     }
   }
 }
예제 #3
0
 public boolean isChainBlock(Block pBlock, int pMetadata) {
   if (chain != null) {
     return chain.isTargetBlock(pBlock, pMetadata);
   }
   return false;
 }