Examples of writeToNBT()


Examples of net.minecraft.tileentity.TileEntity.writeToNBT()

        this.flag = 3;
        TileEntity te = world.getTileEntity(x, y, z);
        if (te != null)
        {
            nbt = new NBTTagCompound();
            te.writeToNBT(nbt);
        }
        else nbt = null;
        if (DEBUG)
        {
            System.out.printf("Created BlockSnapshot - [World: %s ][Location: %d,%d,%d ][Block: %s ][Meta: %d ]", world.getWorldInfo().getWorldName(), x, y, z, block, meta);
View Full Code Here

Examples of net.minecraftforge.fluids.FluidStack.writeToNBT()

    FluidStack ft = getFluidType();
    if(ConduitUtil.isFluidValid(ft)) {
      updateTank();
      ft = ft.copy();
      ft.amount = tank.getFluidAmount();
      nbtRoot.setTag("tank", ft.writeToNBT(new NBTTagCompound()));
    }
    nbtRoot.setBoolean("fluidLocked", fluidTypeLocked);
  }

}
View Full Code Here

Examples of net.minecraftforge.fluids.FluidStack.writeToNBT()

    FluidStack stack;
    for(int i = 0; i < tankNames.length; i++) {
      stack = fluids[i];
      if(stack != null) {
        destination.setTag(tankNames[i], stack.writeToNBT(new NBTTagCompound()));
      }
    }
   
    return destination;
  }
View Full Code Here

Examples of net.minecraftforge.fluids.FluidStack.writeToNBT()

      if(toSave > 0)
      {
        FluidStack stack = new FluidStack(getTransmitterNetwork().fluidStored.getFluid(), toSave);
        lastWrite = stack;
        nbtTags.setTag("cacheFluid", stack.writeToNBT(new NBTTagCompound()));
      }
    }

    nbtTags.setInteger("tier", tier.ordinal());
  }
View Full Code Here

Examples of net.minecraftforge.liquids.LiquidStack.writeToNBT()

      {
        NBTTagCompound nbttagcompound1 = new NBTTagCompound();
        nbttagcompound1.setByte("Tank", (byte)i);
       
        LiquidStack l = _tanks[i].getLiquid();
        l.writeToNBT(nbttagcompound1);
        tanks.appendTag(nbttagcompound1);
      }
    }
   
    nbttagcompound.setTag("Tanks", tanks);
View Full Code Here

Examples of thaumcraft.api.aspects.AspectList.writeToNBT()

        if (stack.stackTagCompound == null) {
            stack.setTagCompound(new NBTTagCompound());
        }
        AspectList aspectList = new AspectList().add(aspect, 1);
        NBTTagCompound nbt = new NBTTagCompound();
        aspectList.writeToNBT(nbt);
        stack.stackTagCompound.setTag(NBT_MAIN_ASPECT, nbt);
    }

    public static AspectList getAspectTendencies(ItemStack stack) {
        AspectList aspectList = new AspectList();
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.