use of buildcraft.api.transport.pipe_bc8.IPipePropertyProvider.IPipePropertyProviderEditable in project BuildCraft by BuildCraft.
the class PipeContentsEditableItem method readFromNBT.
@Override
public IPipeContentsEditableItem readFromNBT(NBTBase nbt) {
NBTTagCompound tag = (NBTTagCompound) nbt;
ItemStack stack = ItemStack.loadItemStackFromNBT(tag.getCompoundTag("stack"));
EnumContentsJourneyPart journeyPart = NBTUtilBC.readEnum(tag.getTag("journeyPart"), EnumContentsJourneyPart.class);
EnumFacing direction = NBTUtilBC.readEnum(tag.getTag("direction"), EnumFacing.class);
double speed = tag.getDouble("speed");
IPipePropertyProviderEditable provider = propertyProvider.readFromNBT(tag.getTag("properties"));
return new PipeContentsEditableItem(provider, stack, journeyPart, direction, speed);
}
Aggregations