question: public void writeToNBT ( final NBTTagCompound nbt ) { final NBTTagList modulesNbt = new NBTTagList ( ) ; for ( final Module module : modules ) { final NBTTagCompound moduleNbt = new NBTTagCompound ( ) ; if ( module != null ) { module . writeToNBT ( moduleNbt ) ; } modulesNbt . appendTag ( moduleNbt ) ; } nbt . setTag ( TAG_MODULES , modulesNbt ) ; lock . ifPresent ( null ) ; lock . ifPresent ( null ) ; }
target:  Write the state of all modules and pipes to the specified NBT tag.