Java Code Examples for net.minecraft.inventory.ItemStackHelper#saveAllItems()
The following examples show how to use
net.minecraft.inventory.ItemStackHelper#saveAllItems() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TileEntitySaltFurnace.java From TofuCraftReload with MIT License | 6 votes |
@Override public NBTTagCompound writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setShort("BurnTime", (short) this.furnaceBurnTime); par1NBTTagCompound.setShort("CookTime", (short) this.cookTime); par1NBTTagCompound.setInteger("ItemBurnTime", this.currentItemBurnTime); NBTTagCompound nigariTag = this.nigariTank.writeToNBT(new NBTTagCompound()); par1NBTTagCompound.setTag("NigariTank", nigariTag); ItemStackHelper.saveAllItems(par1NBTTagCompound, this.furnaceItemStacks); if (this.hasCustomName()) { par1NBTTagCompound.setString("CustomName", this.customName); } return par1NBTTagCompound; }
Example 2
Source File: TileEntityTFStorage.java From TofuCraftReload with MIT License | 5 votes |
public void writePacketNBT(NBTTagCompound cmp) { ItemStackHelper.saveAllItems(cmp, this.inventory); cmp.setInteger("workload", this.workload); cmp.setInteger("current", this.current_workload); NBTTagCompound tankTag = this.tank.writeToNBT(new NBTTagCompound()); cmp.setTag("Tank", tankTag); }
Example 3
Source File: TileEntityMapleCauldron.java From Sakura_mod with MIT License | 5 votes |
public void writePacketNBT(NBTTagCompound cmp) { ItemStackHelper.saveAllItems(cmp, this.inventory); cmp.setInteger("MapleTime", this.mapleTime); cmp.setInteger("CookTime", this.cookTime); NBTTagCompound tankTag = this.tank.writeToNBT(new NBTTagCompound()); cmp.setTag("Tank", tankTag); if (tank.getFluid() != null) { liquidForRendering = tank.getFluid().copy(); } }
Example 4
Source File: TileEntityDistillation.java From Sakura_mod with MIT License | 5 votes |
public void writePacketNBT(NBTTagCompound cmp) { NBTTagCompound tankTag = this.tank.writeToNBT(new NBTTagCompound()); ItemStackHelper.saveAllItems(cmp, this.inventory); cmp.setTag("Tank", tankTag); NBTTagCompound resultTankTag = this.resultTank.writeToNBT(new NBTTagCompound()); cmp.setTag("ResultTank", resultTankTag); cmp.setInteger(TAG_PROCESS, processTimer); }
Example 5
Source File: TileEntityStoneMortar.java From Sakura_mod with MIT License | 5 votes |
@Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { compound = super.writeToNBT(compound); ItemStackHelper.saveAllItems(compound, this.inventorySlotItemStack); compound.setInteger("maxProcessTimer", this.maxprocessTimer); compound.setInteger("processTimer", this.processTimer); return compound; }
Example 6
Source File: TileEntityBarrel.java From Sakura_mod with MIT License | 5 votes |
public void writePacketNBT(NBTTagCompound cmp) { NBTTagCompound tankTag = this.tank.writeToNBT(new NBTTagCompound()); ItemStackHelper.saveAllItems(cmp, this.inventory); cmp.setTag("Tank", tankTag); NBTTagCompound resultTankTag = this.resultTank.writeToNBT(new NBTTagCompound()); cmp.setTag("ResultTank", resultTankTag); cmp.setInteger(TAG_PROCESS, processTimer); }
Example 7
Source File: TileEntityCampfirePot.java From Sakura_mod with MIT License | 5 votes |
public void writePacketNBT(NBTTagCompound cmp) { ItemStackHelper.saveAllItems(cmp, this.inventory); cmp.setInteger("BurnTime", this.burnTime); cmp.setInteger("CookTime", this.cookTime); NBTTagCompound tankTag = this.tank.writeToNBT(new NBTTagCompound()); cmp.setTag("Tank", tankTag); if (tank.getFluid() != null) { liquidForRendering = tank.getFluid().copy(); } }
Example 8
Source File: TileEntityMinecoprocessor.java From Minecoprocessors with GNU General Public License v3.0 | 5 votes |
@Override public NBTTagCompound writeToNBT(NBTTagCompound cIn) { NBTTagCompound c = super.writeToNBT(cIn); c.setTag(NBT_PROCESSOR, processor.writeToNBT()); c.setShort(NBT_LOAD_TIME, (short) loadTime); ItemStackHelper.saveAllItems(c, codeItemStacks); if (this.hasCustomName()) { c.setString(NBT_CUSTOM_NAME, this.customName); } return c; }
Example 9
Source File: TileEntitySenderBaseInvenotried.java From TofuCraftReload with MIT License | 4 votes |
@Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); ItemStackHelper.saveAllItems(compound, this.inventory); return compound; }
Example 10
Source File: TileEntityProcessorBaseInventoried.java From TofuCraftReload with MIT License | 4 votes |
@Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); ItemStackHelper.saveAllItems(compound, this.inventory); return compound; }