Package net.minecraft.item

Examples of net.minecraft.item.ItemStack.writeToNBT()


      onTunnelConfigChange();

      ItemStack p2pItem = getItemStack( PartItemStack.Wrench );
      String type = p2pItem.getUnlocalizedName();

      p2pItem.writeToNBT( data );
      data.setLong( "freq", freq );

      mc.setMemoryCardContents( is, type + ".name", data );
      mc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
      return true;
View Full Code Here


        ItemStack itemstack = this.dataWatcher.getWatchableObjectItemStack(8);

        if (itemstack != null)
        {
            NBTTagCompound nbttagcompound1 = new NBTTagCompound();
            itemstack.writeToNBT(nbttagcompound1);
            par1NBTTagCompound.setTag("FireworksItem", nbttagcompound1);
        }
    }

    /**
 
View Full Code Here

    if (stack == null) {
      data.writeBoolean(false);
    } else {
      data.writeBoolean(true);
      NBTTagCompound nbt = new NBTTagCompound();
      stack.writeToNBT(nbt);
      Utils.writeNBT(data, nbt);
    }

  }
View Full Code Here

    for (byte slot = 0; slot < inv.getSizeInventory(); slot++) {
      ItemStack stack = inv.getStackInSlot(slot);
      if (stack != null) {
        NBTTagCompound itemTag = new NBTTagCompound();
        itemTag.setByte("Slot", slot);
        stack.writeToNBT(itemTag);
        list.appendTag(itemTag);
      }
    }
    data.setTag(tag, list);
  }
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.