Esempio n. 1
0
 /**
  * Load structure piece data of the appropriate type from the given compound tag.
  *
  * @param structurePiece The target structure piece.
  * @param compound The structure piece's tag.
  */
 public void load(T structurePiece, CompoundTag compound) {
   if (compound.isInt("GD")) {
     structurePiece.setGD(compound.getInt("GD"));
   }
   if (compound.isInt("O")) {
     structurePiece.setNumericOrientation(compound.getInt("O"));
   }
   if (compound.isIntArray("BB")) {
     int[] bb = compound.getIntArray("BB");
     if (bb.length == 6) {
       final StructureBoundingBox boundingBox =
           new StructureBoundingBox(
               new Vector(bb[0], bb[1], bb[2]), new Vector(bb[3], bb[4], bb[5]));
       structurePiece.setBoundingBox(boundingBox);
     }
   }
 }