Examples of NBTTagLong


Examples of net.minecraft.nbt.NBTTagLong

        {
            NBTTagList list = new NBTTagList();
            long[] array = (long[]) obj;
            for (int i = 0; i < array.length; i++)
            {
                list.appendTag(new NBTTagLong(array[i]));
            }

            tag.setTag(name, list);
        }
        else if (type.equals(Boolean.class))
View Full Code Here

Examples of net.minecraft.nbt.NBTTagLong

        {
            return tag.getInteger(name);
        }
        else if (type.equals(long[].class))
        {
            NBTTagList list = tag.getTagList(name, new NBTTagLong(0).getId());
            long[] array = new long[list.tagCount()];
            for (int i = 0; i < array.length; i++)
            {
                array[i] = ((NBTTagLong) list.removeTag(0)).func_150291_c();
            }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagLong

  /** Creates a tag from a value. The type is determined by the type of the value. */
  public static NBTBase createTag(Object value) {
    if (value instanceof Byte)    return new NBTTagByte((Byte)value);
    if (value instanceof Short)   return new NBTTagShort((Short)value);
    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);
View Full Code Here

Examples of net.minecraft.nbt.NBTTagLong

  }

  @Override
  public long getLong(String tag) {
    try {
      NBTTagLong nbtTagLong = (NBTTagLong) tagMap.get(tag);
      return nbtTagLong == null ? 0 : nbtTagLong.data;
    } catch (ClassCastException e) {
      throw new ReportedException(createCrashReport(tag, 4, e));
    }
  }
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.