Examples of byteArray()


Examples of se.llbit.nbt.AnyTag.byteArray()

  }

  private byte[] extractBiomeData(@NotNull Map<String, AnyTag> data) {
    AnyTag biomesTag = data.get(LEVEL_BIOMES);
    if (biomesTag.isByteArray(X_MAX*Z_MAX)) {
      return biomesTag.byteArray();
    } else {
      return new byte[X_MAX*Z_MAX];
    }
  }

 
View Full Code Here

Examples of se.llbit.nbt.AnyTag.byteArray()

      for (SpecificTag section : ((ListTag) sections).getItemList()) {
        AnyTag yTag = section.get("Y");
        int yOffset = yTag.byteValue() & 0xFF;
        AnyTag blocksTag = section.get("Blocks");
        if (blocksTag.isByteArray(SECTION_BYTES)) {
          System.arraycopy(blocksTag.byteArray(), 0, blocks, SECTION_BYTES*yOffset, SECTION_BYTES);
        }
        AnyTag dataTag = section.get("Data");
        if (dataTag.isByteArray(SECTION_HALF_NIBBLES)) {
          System.arraycopy(dataTag.byteArray(), 0, blockData, SECTION_HALF_NIBBLES*yOffset, SECTION_HALF_NIBBLES);
        }
View Full Code Here

Examples of se.llbit.nbt.AnyTag.byteArray()

        if (blocksTag.isByteArray(SECTION_BYTES)) {
          System.arraycopy(blocksTag.byteArray(), 0, blocks, SECTION_BYTES*yOffset, SECTION_BYTES);
        }
        AnyTag dataTag = section.get("Data");
        if (dataTag.isByteArray(SECTION_HALF_NIBBLES)) {
          System.arraycopy(dataTag.byteArray(), 0, blockData, SECTION_HALF_NIBBLES*yOffset, SECTION_HALF_NIBBLES);
        }
      }
    }
  }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.