Package net.minecraft.nbt

Examples of net.minecraft.nbt.NBTTagByteArray


    if (value instanceof Integer) return new NBTTagInt((Integer)value);
    if (value instanceof Long)    return new NBTTagLong((Long)value);
    if (value instanceof Float)   return new NBTTagFloat((Float)value);
    if (value instanceof Doublereturn new NBTTagDouble((Double)value);
    if (value instanceof Stringreturn new NBTTagString((String)value);
    if (value instanceof byte[])  return new NBTTagByteArray((byte[])value);
    if (value instanceof int[])   return new NBTTagIntArray((int[])value);
    return null;
  }
View Full Code Here


  }

  @Override
  public byte[] getByteArray(String tag) {
    try {
      NBTTagByteArray nbtTagByteArray = (NBTTagByteArray) tagMap.get(tag);
      return nbtTagByteArray == null ? new byte[0] : nbtTagByteArray.byteArray;
    } catch (ClassCastException e) {
      throw new ReportedException(createCrashReport(tag, 7, e));
    }
  }
View Full Code Here

TOP

Related Classes of net.minecraft.nbt.NBTTagByteArray

Copyright © 2018 www.massapicom. 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.