Package net.minecraft.nbt

Examples of net.minecraft.nbt.NBTTagFloat


    float[] afloat = par1ArrayOfFloat;
    int i = par1ArrayOfFloat.length;

    for (int j = 0; j < i; ++j) {
      float f1 = afloat[j];
      nbttaglist.appendTag(new NBTTagFloat(f1));
    }

    return nbttaglist;
  }
View Full Code Here


    float[] afloat = par1ArrayOfFloat;
    int i = par1ArrayOfFloat.length;

    for (int j = 0; j < i; ++j) {
      float f1 = afloat[j];
      nbttaglist.appendTag(new NBTTagFloat(f1));
    }

    return nbttaglist;
  }
View Full Code Here

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

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

        {
            return tag.getFloat(name);
        }
        else if (type.equals(float[].class))
        {
            NBTTagList list = tag.getTagList(name, new NBTTagFloat(0f).getId());
            float[] array = new float[list.tagCount()];
            for (int i = 0; i < array.length; i++)
            {
                array[i] = list.func_150308_e(i);
            }
View Full Code Here

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

  }

  @Override
  public float getFloat(String tag) {
    try {
      NBTTagFloat nbtTagFloat = (NBTTagFloat) tagMap.get(tag);
      return nbtTagFloat == null ? 0 : nbtTagFloat.data;
    } catch (ClassCastException e) {
      throw new ReportedException(createCrashReport(tag, 5, e));
    }
  }
View Full Code Here

    float[] afloat = par1ArrayOfFloat;
    int i = par1ArrayOfFloat.length;

    for (int j = 0; j < i; ++j) {
      float f1 = afloat[j];
      nbttaglist.appendTag(new NBTTagFloat(f1));
    }

    return nbttaglist;
  }
View Full Code Here

TOP

Related Classes of net.minecraft.nbt.NBTTagFloat

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.