Package net.minecraftforge.fluids

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


    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

      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

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.