Examples of NBTTagInt


Examples of net.minecraft.nbt.NBTTagInt

     */
    private static NBTTagCompound updateForSet(NBTTagCompound tag, Vector position) {
        checkNotNull(tag);
        checkNotNull(position);

        tag.setTag("x", new NBTTagInt(position.getBlockX()));
        tag.setTag("y", new NBTTagInt(position.getBlockY()));
        tag.setTag("z", new NBTTagInt(position.getBlockZ()));

        return tag;
    }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagInt

            }
            else if (tag instanceof NBTBase.NBTPrimitive)
            {
                String val = tag.toString();

                if (tag.getId() != new NBTTagInt(0).getId())
                {
                    val = val.substring(0, val.length() - 1);
                }

                data.putField(PRIMITIVE, val);
View Full Code Here

Examples of net.minecraft.nbt.NBTTagInt

 
  /** 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);
View Full Code Here

Examples of net.minecraft.nbt.NBTTagInt

      list.appendTag(nbt);
    }
    par1nbtTagCompound.setTag("settings", list);
    list = new NBTTagList();
    for(Integer i:excludedCC) {
      list.appendTag(new NBTTagInt(i));
    }
    par1nbtTagCompound.setTag("excludedCC", list);
  }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagInt

  public void requestList(EntityPlayer player) {
    NBTTagCompound tag = new NBTTagCompound();
    NBTTagList list = new NBTTagList();
    for(Integer i:excludedCC) {
      list.appendTag(new NBTTagInt(i));
    }
    tag.setTag("list", list);
    MainProxy.sendPacketToPlayer(PacketHandler.getPacket(SecurityStationCCIDs.class).setTag(tag).setPosX(xCoord).setPosY(yCoord).setPosZ(zCoord), player);
  }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagInt

  }

  @Override
  public int getInteger(String tag) {
    try {
      NBTTagInt nbtTagInt = (NBTTagInt) tagMap.get(tag);
      return nbtTagInt == null ? 0 : nbtTagInt.data;
    } catch (ClassCastException e) {
      throw new ReportedException(createCrashReport(tag, 3, 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.