Examples of tagAt()


Examples of net.minecraft.nbt.NBTTagList.tagAt()

        NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items");
        this.furnaceItemStacks = new ItemStack[this.getSizeInventory()];

        for (int i = 0; i < nbttaglist.tagCount(); ++i)
        {
            NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
            byte b0 = nbttagcompound1.getByte("Slot");

            if (b0 >= 0 && b0 < this.furnaceItemStacks.length)
            {
                this.furnaceItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.tagAt()

        NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items");
        this.furnaceItemStacks = new ItemStack[this.getSizeInventory()];

        for (int i = 0; i < nbttaglist.tagCount(); ++i)
        {
            NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
            byte b0 = nbttagcompound1.getByte("Slot");

            if (b0 >= 0 && b0 < this.furnaceItemStacks.length)
            {
                this.furnaceItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.tagAt()

        FMLLog.log(Level.WARNING, e, "Unable to read forced chunk data at %s - it will be ignored", chunkLoaderData.getAbsolutePath());
        return;
      }
      NBTTagList ticketList = forcedChunkData.getTagList("TicketList");
      for (int i = 0; i < ticketList.tagCount(); i++) {
        NBTTagCompound ticketHolder = (NBTTagCompound) ticketList.tagAt(i);
        String modId = ticketHolder.getString("Owner");
        boolean isPlayer = "Forge".equals(modId);

        if (!isPlayer && !Loader.isModLoaded(modId)) {
          FMLLog.warning("Found chunkloading data for mod %s which is currently not available or active - it will be removed from the world save", modId);
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.tagAt()

          continue;
        }

        NBTTagList tickets = ticketHolder.getTagList("Tickets");
        for (int j = 0; j < tickets.tagCount(); j++) {
          NBTTagCompound ticket = (NBTTagCompound) tickets.tagAt(j);
          modId = ticket.hasKey("ModId") ? ticket.getString("ModId") : modId;
          Type type = Type.values()[ticket.getByte("Type")];
          byte ticketChunkDepth = ticket.getByte("ChunkListDepth");
          Ticket tick = new Ticket(modId, type, world);
          if (ticket.hasKey("ModData")) {
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.tagAt()

          }

          // MCPC+ start - save the chunks forced by this ticket (fix for chunkloaders)
          NBTTagList ticketChunks = ticket.getTagList("Chunks");
          for (int k = 0; k < ticketChunks.tagCount(); k++) {
            NBTTagCompound nbtChunk = (NBTTagCompound) ticketChunks.tagAt(k);
            int chunkX = nbtChunk.getInteger("chunkX");
            int chunkZ = nbtChunk.getInteger("chunkZ");
            ChunkCoordIntPair chunkCoordIntPair = new ChunkCoordIntPair(chunkX, chunkZ);
            forceChunkInternal(tick, chunkCoordIntPair);
            chunkProviderServer.cacheChunk(chunkX, chunkZ);
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.tagAt()

    byte b0 = 16;
    ExtendedBlockStorage[] aextendedblockstorage = new ExtendedBlockStorage[b0];
    boolean flag = !world.provider.hasNoSky;

    for (int k = 0; k < nbttaglist.tagCount(); ++k) {
      NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.tagAt(k);
      byte b1 = nbttagcompound1.getByte("Y");
      ExtendedBlockStorage extendedblockstorage = new ExtendedBlockStorage(b1 << 4, flag);
      extendedblockstorage.setBlockLSBArray(nbttagcompound1.getByteArray("Blocks"));

      if (nbttagcompound1.hasKey("Add")) {
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.tagAt()

    NBTTagList nbttaglist1 = nbtTagCompound.getTagList("Entities");

    if (nbttaglist1 != null) {
      for (int l = 0; l < nbttaglist1.tagCount(); ++l) {
        NBTTagCompound nbttagcompound2 = (NBTTagCompound) nbttaglist1.tagAt(l);
        Entity entity = EntityList.createEntityFromNBT(nbttagcompound2, world);
        chunk.hasEntities = true;

        if (entity != null) {
          chunk.addEntity(entity);
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.tagAt()

    NBTTagList nbttaglist2 = nbtTagCompound.getTagList("TileEntities");

    if (nbttaglist2 != null) {
      for (int i1 = 0; i1 < nbttaglist2.tagCount(); ++i1) {
        NBTTagCompound nbttagcompound4 = (NBTTagCompound) nbttaglist2.tagAt(i1);
        TileEntity tileentity = TileEntity.createAndLoadEntity(nbttagcompound4);

        if (tileentity != null) {
          chunk.addTileEntity(tileentity);
        }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagList.tagAt()

    if (nbtTagCompound.hasKey("TileTicks")) {
      NBTTagList nbttaglist3 = nbtTagCompound.getTagList("TileTicks");

      if (nbttaglist3 != null) {
        for (int j1 = 0; j1 < nbttaglist3.tagCount(); ++j1) {
          NBTTagCompound nbttagcompound5 = (NBTTagCompound) nbttaglist3.tagAt(j1);
          world.scheduleBlockUpdateFromLoad(nbttagcompound5.getInteger("x"), nbttagcompound5.getInteger("y"), nbttagcompound5.getInteger("z"), nbttagcompound5.getInteger("i"), nbttagcompound5.getInteger("t"), nbttagcompound5.getInteger("p"));
        }
      }
    }
View Full Code Here

Examples of net.minecraft.src.NBTTagList.tagAt()

       NBTTagList nbttaglist = nbttagcompound.getTagList("stackList");
      
       theInventory = new ItemStack [nbttaglist.tagCount()];
      
       for (int i = 0; i < theInventory.length; ++i) { 
         NBTTagCompound nbttagcompound2 = (NBTTagCompound) nbttaglist
        .tagAt(i)
        
         if (!nbttagcompound2.getBoolean("isNull")) {
           theInventory [i] = ItemStack.loadItemStackFromNBT(nbttagcompound2);
         }
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.