Package net.minecraft.nbt

Examples of net.minecraft.nbt.NBTTagDouble


    double[] adouble = par1ArrayOfDouble;
    int i = par1ArrayOfDouble.length;

    for (int j = 0; j < i; ++j) {
      double d1 = adouble[j];
      nbttaglist.appendTag(new NBTTagDouble(d1));
    }

    return nbttaglist;
  }
View Full Code Here


    double[] adouble = par1ArrayOfDouble;
    int i = par1ArrayOfDouble.length;

    for (int j = 0; j < i; ++j) {
      double d1 = adouble[j];
      nbttaglist.appendTag(new NBTTagDouble(d1));
    }

    return nbttaglist;
  }
View Full Code Here

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

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

        {
            return tag.getDouble(name);
        }
        else if (type.equals(double[].class))
        {
            NBTTagList list = tag.getTagList(name, new NBTTagDouble(0.0).getId());
            double[] array = new double[list.tagCount()];
            for (int i = 0; i < array.length; i++)
            {
                array[i] = list.func_150309_d(i);
            }
View Full Code Here

    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);
    return null;
  }
View Full Code Here

  }

  @Override
  public double getDouble(String tag) {
    try {
      NBTTagDouble nbtTagDouble = (NBTTagDouble) tagMap.get(tag);
      return nbtTagDouble == null ? 0 : nbtTagDouble.data;
    } catch (ClassCastException e) {
      throw new ReportedException(createCrashReport(tag, 6, e));
    }
  }
View Full Code Here

    double[] adouble = par1ArrayOfDouble;
    int i = par1ArrayOfDouble.length;

    for (int j = 0; j < i; ++j) {
      double d1 = adouble[j];
      nbttaglist.appendTag(new NBTTagDouble(d1));
    }

    return nbttaglist;
  }
View Full Code Here

TOP

Related Classes of net.minecraft.nbt.NBTTagDouble

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.